From fd2516347bf818d75f74d764b2396308c489db42 Mon Sep 17 00:00:00 2001 From: Viacheslav Rudkovskyi Date: Tue, 29 Apr 2025 16:36:04 +0300 Subject: [PATCH 01/12] add typescript support improve entities and services --- .babelrc | 74 - .eslintignore | 4 - .eslintrc.js | 36 - .prettierrc | 8 + build/build.cjs | 33 - build/webpack.base.conf.cjs | 49 - build/webpack.dev.conf.cjs | 9 - build/webpack.node.conf.cjs | 16 - build/webpack.prod.conf.cjs | 20 - build/webpack.test.conf.cjs | 10 - build/webpack.web.conf.cjs | 16 - dist/netlicensing-client.js | 11214 ---------- dist/netlicensing-client.min.js | 2 - dist/netlicensing-client.min.js.LICENSE.txt | 10 - dist/netlicensing-client.node.js | 16981 ---------------- dist/netlicensing-client.node.min.js | 2 - ...etlicensing-client.node.min.js.LICENSE.txt | 24 - docs/client-demo.html | 31 - docs/client-demo.js | 414 - eslint.config.mjs | 84 + package-lock.json | 14835 ++++++-------- package.json | 203 +- src/Constants.js | 226 - src/__mocks__/services/Service.ts | 13 + src/constants/ApiKeyRole.ts | 15 + src/constants/LicenseType.ts | 14 + src/constants/LicenseeSecretMode.ts | 14 + src/constants/LicensingModel.ts | 20 + src/constants/NotificationEvent.ts | 14 + src/constants/NotificationProtocol.ts | 11 + src/constants/PaymentMethodEnum.ts | 15 + src/constants/SecurityMode.ts | 13 + src/constants/TimeVolumePeriod.ts | 14 + src/constants/TokenType.ts | 14 + src/constants/TransactionSource.ts | 35 + src/constants/TransactionStatus.ts | 13 + src/constants/index.ts | 122 + src/converters/itemToBundle.js | 4 - src/converters/itemToBundle.ts | 24 + src/converters/itemToCountry.js | 4 - src/converters/itemToCountry.ts | 16 + src/converters/itemToLicense.js | 4 - src/converters/itemToLicense.ts | 24 + src/converters/itemToLicenseTemplate.js | 4 - src/converters/itemToLicenseTemplate.ts | 14 + src/converters/itemToLicensee.js | 4 - src/converters/itemToLicensee.ts | 14 + src/converters/itemToNotification.js | 4 - src/converters/itemToNotification.ts | 24 + src/converters/itemToObject.js | 25 - src/converters/itemToObject.ts | 34 + src/converters/itemToPaymentMethod.js | 4 - src/converters/itemToPaymentMethod.ts | 14 + src/converters/itemToProduct.js | 15 - src/converters/itemToProduct.ts | 27 + src/converters/itemToProductModule.js | 4 - src/converters/itemToProductModule.ts | 14 + src/converters/itemToToken.js | 4 - src/converters/itemToToken.ts | 24 + src/converters/itemToTransaction.js | 31 - src/converters/itemToTransaction.ts | 46 + src/entities/BaseEntity.js | 230 - src/entities/Bundle.js | 126 - src/entities/Bundle.ts | 126 + src/entities/Country.js | 68 - src/entities/Country.ts | 54 + src/entities/License.js | 131 - src/entities/License.ts | 191 + src/entities/LicenseTemplate.js | 198 - src/entities/LicenseTemplate.ts | 212 + src/entities/LicenseTransactionJoin.js | 30 - src/entities/LicenseTransactionJoin.ts | 37 + src/entities/Licensee.js | 111 - src/entities/Licensee.ts | 96 + src/entities/Notification.js | 114 - src/entities/Notification.ts | 132 + src/entities/PaymentMethod.js | 54 - src/entities/PaymentMethod.ts | 61 + src/entities/Product.js | 225 - src/entities/Product.ts | 161 + src/entities/ProductDiscount.js | 65 - src/entities/ProductDiscount.ts | 85 + src/entities/ProductModule.js | 143 - src/entities/ProductModule.ts | 131 + src/entities/Token.js | 168 - src/entities/Token.ts | 160 + src/entities/Transaction.js | 179 - src/entities/Transaction.ts | 154 + src/entities/defineEntity.ts | 111 + src/errors/NlicError.js | 32 - src/errors/NlicError.ts | 21 + src/index.js | 127 - src/index.ts | 151 + src/services/BundleService.js | 184 - src/services/BundleService.ts | 233 + src/services/LicenseService.js | 184 - src/services/LicenseService.ts | 241 + src/services/LicenseTemplateService.js | 165 - src/services/LicenseTemplateService.ts | 211 + src/services/LicenseeService.js | 269 - src/services/LicenseeService.ts | 332 + src/services/NotificationService.js | 148 - src/services/NotificationService.ts | 201 + src/services/PaymentMethodService.js | 103 - src/services/PaymentMethodService.ts | 136 + src/services/ProductModuleService.js | 161 - src/services/ProductModuleService.ts | 211 + src/services/ProductService.js | 153 - src/services/ProductService.ts | 199 + src/services/Service.js | 239 - src/services/Service/index.ts | 79 + src/services/Service/instance.ts | 24 + src/services/Service/methods.ts | 30 + src/services/Service/request.ts | 152 + src/services/Service/toQueryString.ts | 37 + src/services/TokenService.js | 123 - src/services/TokenService.ts | 164 + src/services/TransactionService.js | 139 - src/services/TransactionService.ts | 176 + src/services/UtilityService.js | 106 - src/services/UtilityService.ts | 133 + src/types/api/response.ts | 39 + src/types/constants/ApiKeyRole.ts | 10 + src/types/constants/LicenseType.ts | 10 + src/types/constants/LicenseeSecretMode.ts | 4 + src/types/constants/LicensingModel.ts | 10 + src/types/constants/NotificationEvent.ts | 10 + src/types/constants/NotificationProtocol.ts | 10 + src/types/constants/PaymentMethodEnum.ts | 4 + src/types/constants/SecurityMode.ts | 4 + src/types/constants/TimeVolumePeriod.ts | 4 + src/types/constants/TokenType.ts | 10 + src/types/constants/TransactionSource.ts | 4 + src/types/constants/TransactionStatus.ts | 4 + src/types/entities/Bundle.ts | 50 + src/types/entities/Country.ts | 26 + src/types/entities/License.ts | 88 + src/types/entities/LicenseTemplate.ts | 95 + src/types/entities/LicenseTransactionJoin.ts | 21 + src/types/entities/Licensee.ts | 43 + src/types/entities/Notification.ts | 55 + src/types/entities/PaymentMethod.ts | 29 + src/types/entities/Product.ts | 67 + src/types/entities/ProductDiscount.ts | 36 + src/types/entities/ProductModule.ts | 59 + src/types/entities/Token.ts | 98 + src/types/entities/Transaction.ts | 91 + src/types/entities/defineEntity.ts | 34 + src/types/services/BundleService.ts | 51 + src/types/services/LicenseService.ts | 47 + src/types/services/LicenseTemplateService.ts | 49 + src/types/services/LicenseeService.ts | 63 + src/types/services/NotificationService.ts | 48 + src/types/services/PaymentMethodService.ts | 31 + src/types/services/ProductModuleService.ts | 49 + src/types/services/ProductService.ts | 44 + src/types/services/Service.ts | 69 + src/types/services/TokenService.ts | 34 + src/types/services/TransactionService.ts | 37 + src/types/services/UtilityService.ts | 24 + src/types/vo/Context.ts | 45 + src/types/vo/Page.ts | 32 + src/types/vo/ValidationParameters.ts | 60 + src/types/vo/ValidationResults.ts | 32 + src/util/CastsUtils.js | 41 - src/util/CheckUtils.js | 24 - src/util/FilterUtils.js | 22 - src/utils/filter.ts | 27 + src/utils/helpers.ts | 17 + src/utils/serialize.ts | 54 + src/utils/validation.ts | 47 + src/vo/Context.js | 237 - src/vo/Context.ts | 85 + src/vo/Page.js | 38 - src/vo/Page.ts | 71 + src/vo/ValidationParameters.js | 149 - src/vo/ValidationParameters.ts | 107 + src/vo/ValidationResults.js | 67 - src/vo/ValidationResults.ts | 72 + test/factories/bundle.js | 12 - test/factories/factory.js | 15 - test/factories/license.js | 12 - test/factories/licenseTemplate.js | 16 - test/factories/licensee.js | 12 - test/factories/notification.js | 16 - test/factories/paymentMethod.js | 12 - test/factories/product.js | 16 - test/factories/productDiscount.js | 24 - test/factories/productModule.js | 13 - test/factories/token.js | 23 - test/factories/transaction.js | 11 - test/factories/utility.js | 16 - test/factories/validate.js | 11 - test/index.js | 5 - test/karma.conf.js | 64 - test/response/Info.js | 34 - test/response/Item.js | 52 - test/response/index.js | 68 - test/specs/.eslintrc | 8 - test/specs/converters/itemToBundle.spec.ts | 44 + test/specs/converters/itemToCountry.spec.ts | 38 + test/specs/converters/itemToLicense.spec.ts | 58 + .../converters/itemToLicenseTemplate.spec.ts | 64 + test/specs/converters/itemToLicensee.spec.ts | 44 + .../converters/itemToNotification.spec.ts | 46 + .../converters/itemToPaymentMethod.spec.ts | 38 + test/specs/converters/itemToProduct.spec.ts | 72 + .../converters/itemToProductModule.spec.ts | 50 + test/specs/converters/itemToToken.spec.ts | 64 + .../converters/itemToTransaction.spec.ts | 77 + test/specs/entities/Bundle.spec.ts | 166 + test/specs/entities/Country.spec.js | 133 - test/specs/entities/Country.spec.ts | 42 + test/specs/entities/License.spec.js | 234 - test/specs/entities/License.spec.ts | 301 + test/specs/entities/LicenseTemplate.spec.js | 368 - test/specs/entities/LicenseTemplate.spec.ts | 352 + test/specs/entities/Licensee.spec.js | 174 - test/specs/entities/Licensee.spec.ts | 157 + test/specs/entities/Notification.spec.js | 169 - test/specs/entities/Notification.spec.ts | 197 + test/specs/entities/PaymentMethod.spec.js | 107 - test/specs/entities/PaymentMethod.spec.ts | 51 + test/specs/entities/Product.spec.js | 258 - test/specs/entities/Product.spec.ts | 225 + test/specs/entities/ProductDiscount.spec.js | 147 - test/specs/entities/ProductDiscount.spec.ts | 170 + test/specs/entities/ProductModule.spec.js | 246 - test/specs/entities/ProductModule.spec.ts | 212 + test/specs/entities/Token.spec.js | 267 - test/specs/entities/Token.spec.ts | 359 + test/specs/entities/Transaction.spec.js | 293 - test/specs/entities/Transaction.spec.ts | 279 + test/specs/entities/defineEntity.spec.ts | 103 + test/specs/services/BundleService.spec.js | 171 - test/specs/services/BundleService.spec.ts | 226 + test/specs/services/LicenseService.spec.js | 182 - test/specs/services/LicenseService.spec.ts | 218 + .../services/LicenseTemplateService.spec.js | 187 - .../services/LicenseTemplateService.spec.ts | 225 + test/specs/services/LicenseeService.spec.js | 213 - test/specs/services/LicenseeService.spec.ts | 269 + .../services/NotificationService.spec.js | 192 - .../services/NotificationService.spec.ts | 226 + .../services/PaymentMethodService.spec.js | 117 - .../services/PaymentMethodService.spec.ts | 159 + .../services/ProductModuleService.spec.js | 174 - .../services/ProductModuleService.spec.ts | 273 + test/specs/services/ProductService.spec.js | 213 - test/specs/services/ProductService.spec.ts | 313 + test/specs/services/Service.spec.ts | 126 + test/specs/services/Token.spec.ts | 251 + test/specs/services/TokenService.spec.js | 162 - .../specs/services/TransactionService.spec.js | 155 - .../specs/services/TransactionService.spec.ts | 303 + test/specs/services/UtilityService.spec.js | 194 - test/specs/services/UtilityService.spec.ts | 110 + test/specs/utils/filter.spec.ts | 42 + test/specs/utils/serialize.spec.ts | 109 + test/utils/createMockAxiosInstance.ts | 35 + test/utils/expectEntity.ts | 35 + test/utils/expectEntityProp.ts | 40 + test/utils/nlic.ts | 64 + tsconfig.json | 31 + tsup.config.ts | 16 + vitest.config.mjs | 16 + 266 files changed, 19428 insertions(+), 47779 deletions(-) delete mode 100644 .babelrc delete mode 100644 .eslintignore delete mode 100644 .eslintrc.js create mode 100644 .prettierrc delete mode 100644 build/build.cjs delete mode 100644 build/webpack.base.conf.cjs delete mode 100644 build/webpack.dev.conf.cjs delete mode 100644 build/webpack.node.conf.cjs delete mode 100644 build/webpack.prod.conf.cjs delete mode 100644 build/webpack.test.conf.cjs delete mode 100644 build/webpack.web.conf.cjs delete mode 100644 dist/netlicensing-client.js delete mode 100644 dist/netlicensing-client.min.js delete mode 100644 dist/netlicensing-client.min.js.LICENSE.txt delete mode 100644 dist/netlicensing-client.node.js delete mode 100644 dist/netlicensing-client.node.min.js delete mode 100644 dist/netlicensing-client.node.min.js.LICENSE.txt delete mode 100644 docs/client-demo.html delete mode 100644 docs/client-demo.js create mode 100644 eslint.config.mjs delete mode 100644 src/Constants.js create mode 100644 src/__mocks__/services/Service.ts create mode 100644 src/constants/ApiKeyRole.ts create mode 100644 src/constants/LicenseType.ts create mode 100644 src/constants/LicenseeSecretMode.ts create mode 100644 src/constants/LicensingModel.ts create mode 100644 src/constants/NotificationEvent.ts create mode 100644 src/constants/NotificationProtocol.ts create mode 100644 src/constants/PaymentMethodEnum.ts create mode 100644 src/constants/SecurityMode.ts create mode 100644 src/constants/TimeVolumePeriod.ts create mode 100644 src/constants/TokenType.ts create mode 100644 src/constants/TransactionSource.ts create mode 100644 src/constants/TransactionStatus.ts create mode 100644 src/constants/index.ts delete mode 100644 src/converters/itemToBundle.js create mode 100644 src/converters/itemToBundle.ts delete mode 100644 src/converters/itemToCountry.js create mode 100644 src/converters/itemToCountry.ts delete mode 100644 src/converters/itemToLicense.js create mode 100644 src/converters/itemToLicense.ts delete mode 100644 src/converters/itemToLicenseTemplate.js create mode 100644 src/converters/itemToLicenseTemplate.ts delete mode 100644 src/converters/itemToLicensee.js create mode 100644 src/converters/itemToLicensee.ts delete mode 100644 src/converters/itemToNotification.js create mode 100644 src/converters/itemToNotification.ts delete mode 100644 src/converters/itemToObject.js create mode 100644 src/converters/itemToObject.ts delete mode 100644 src/converters/itemToPaymentMethod.js create mode 100644 src/converters/itemToPaymentMethod.ts delete mode 100644 src/converters/itemToProduct.js create mode 100644 src/converters/itemToProduct.ts delete mode 100644 src/converters/itemToProductModule.js create mode 100644 src/converters/itemToProductModule.ts delete mode 100644 src/converters/itemToToken.js create mode 100644 src/converters/itemToToken.ts delete mode 100644 src/converters/itemToTransaction.js create mode 100644 src/converters/itemToTransaction.ts delete mode 100644 src/entities/BaseEntity.js delete mode 100644 src/entities/Bundle.js create mode 100644 src/entities/Bundle.ts delete mode 100644 src/entities/Country.js create mode 100644 src/entities/Country.ts delete mode 100644 src/entities/License.js create mode 100644 src/entities/License.ts delete mode 100644 src/entities/LicenseTemplate.js create mode 100644 src/entities/LicenseTemplate.ts delete mode 100644 src/entities/LicenseTransactionJoin.js create mode 100644 src/entities/LicenseTransactionJoin.ts delete mode 100644 src/entities/Licensee.js create mode 100644 src/entities/Licensee.ts delete mode 100644 src/entities/Notification.js create mode 100644 src/entities/Notification.ts delete mode 100644 src/entities/PaymentMethod.js create mode 100644 src/entities/PaymentMethod.ts delete mode 100644 src/entities/Product.js create mode 100644 src/entities/Product.ts delete mode 100644 src/entities/ProductDiscount.js create mode 100644 src/entities/ProductDiscount.ts delete mode 100644 src/entities/ProductModule.js create mode 100644 src/entities/ProductModule.ts delete mode 100644 src/entities/Token.js create mode 100644 src/entities/Token.ts delete mode 100644 src/entities/Transaction.js create mode 100644 src/entities/Transaction.ts create mode 100644 src/entities/defineEntity.ts delete mode 100644 src/errors/NlicError.js create mode 100644 src/errors/NlicError.ts delete mode 100644 src/index.js create mode 100644 src/index.ts delete mode 100644 src/services/BundleService.js create mode 100644 src/services/BundleService.ts delete mode 100644 src/services/LicenseService.js create mode 100644 src/services/LicenseService.ts delete mode 100644 src/services/LicenseTemplateService.js create mode 100644 src/services/LicenseTemplateService.ts delete mode 100644 src/services/LicenseeService.js create mode 100644 src/services/LicenseeService.ts delete mode 100644 src/services/NotificationService.js create mode 100644 src/services/NotificationService.ts delete mode 100644 src/services/PaymentMethodService.js create mode 100644 src/services/PaymentMethodService.ts delete mode 100644 src/services/ProductModuleService.js create mode 100644 src/services/ProductModuleService.ts delete mode 100644 src/services/ProductService.js create mode 100644 src/services/ProductService.ts delete mode 100644 src/services/Service.js create mode 100644 src/services/Service/index.ts create mode 100644 src/services/Service/instance.ts create mode 100644 src/services/Service/methods.ts create mode 100644 src/services/Service/request.ts create mode 100644 src/services/Service/toQueryString.ts delete mode 100644 src/services/TokenService.js create mode 100644 src/services/TokenService.ts delete mode 100644 src/services/TransactionService.js create mode 100644 src/services/TransactionService.ts delete mode 100644 src/services/UtilityService.js create mode 100644 src/services/UtilityService.ts create mode 100644 src/types/api/response.ts create mode 100644 src/types/constants/ApiKeyRole.ts create mode 100644 src/types/constants/LicenseType.ts create mode 100644 src/types/constants/LicenseeSecretMode.ts create mode 100644 src/types/constants/LicensingModel.ts create mode 100644 src/types/constants/NotificationEvent.ts create mode 100644 src/types/constants/NotificationProtocol.ts create mode 100644 src/types/constants/PaymentMethodEnum.ts create mode 100644 src/types/constants/SecurityMode.ts create mode 100644 src/types/constants/TimeVolumePeriod.ts create mode 100644 src/types/constants/TokenType.ts create mode 100644 src/types/constants/TransactionSource.ts create mode 100644 src/types/constants/TransactionStatus.ts create mode 100644 src/types/entities/Bundle.ts create mode 100644 src/types/entities/Country.ts create mode 100644 src/types/entities/License.ts create mode 100644 src/types/entities/LicenseTemplate.ts create mode 100644 src/types/entities/LicenseTransactionJoin.ts create mode 100644 src/types/entities/Licensee.ts create mode 100644 src/types/entities/Notification.ts create mode 100644 src/types/entities/PaymentMethod.ts create mode 100644 src/types/entities/Product.ts create mode 100644 src/types/entities/ProductDiscount.ts create mode 100644 src/types/entities/ProductModule.ts create mode 100644 src/types/entities/Token.ts create mode 100644 src/types/entities/Transaction.ts create mode 100644 src/types/entities/defineEntity.ts create mode 100644 src/types/services/BundleService.ts create mode 100644 src/types/services/LicenseService.ts create mode 100644 src/types/services/LicenseTemplateService.ts create mode 100644 src/types/services/LicenseeService.ts create mode 100644 src/types/services/NotificationService.ts create mode 100644 src/types/services/PaymentMethodService.ts create mode 100644 src/types/services/ProductModuleService.ts create mode 100644 src/types/services/ProductService.ts create mode 100644 src/types/services/Service.ts create mode 100644 src/types/services/TokenService.ts create mode 100644 src/types/services/TransactionService.ts create mode 100644 src/types/services/UtilityService.ts create mode 100644 src/types/vo/Context.ts create mode 100644 src/types/vo/Page.ts create mode 100644 src/types/vo/ValidationParameters.ts create mode 100644 src/types/vo/ValidationResults.ts delete mode 100644 src/util/CastsUtils.js delete mode 100644 src/util/CheckUtils.js delete mode 100644 src/util/FilterUtils.js create mode 100644 src/utils/filter.ts create mode 100644 src/utils/helpers.ts create mode 100644 src/utils/serialize.ts create mode 100644 src/utils/validation.ts delete mode 100644 src/vo/Context.js create mode 100644 src/vo/Context.ts delete mode 100644 src/vo/Page.js create mode 100644 src/vo/Page.ts delete mode 100644 src/vo/ValidationParameters.js create mode 100644 src/vo/ValidationParameters.ts delete mode 100644 src/vo/ValidationResults.js create mode 100644 src/vo/ValidationResults.ts delete mode 100644 test/factories/bundle.js delete mode 100644 test/factories/factory.js delete mode 100644 test/factories/license.js delete mode 100644 test/factories/licenseTemplate.js delete mode 100644 test/factories/licensee.js delete mode 100644 test/factories/notification.js delete mode 100644 test/factories/paymentMethod.js delete mode 100644 test/factories/product.js delete mode 100644 test/factories/productDiscount.js delete mode 100644 test/factories/productModule.js delete mode 100644 test/factories/token.js delete mode 100644 test/factories/transaction.js delete mode 100644 test/factories/utility.js delete mode 100644 test/factories/validate.js delete mode 100644 test/index.js delete mode 100644 test/karma.conf.js delete mode 100644 test/response/Info.js delete mode 100644 test/response/Item.js delete mode 100644 test/response/index.js delete mode 100644 test/specs/.eslintrc create mode 100644 test/specs/converters/itemToBundle.spec.ts create mode 100644 test/specs/converters/itemToCountry.spec.ts create mode 100644 test/specs/converters/itemToLicense.spec.ts create mode 100644 test/specs/converters/itemToLicenseTemplate.spec.ts create mode 100644 test/specs/converters/itemToLicensee.spec.ts create mode 100644 test/specs/converters/itemToNotification.spec.ts create mode 100644 test/specs/converters/itemToPaymentMethod.spec.ts create mode 100644 test/specs/converters/itemToProduct.spec.ts create mode 100644 test/specs/converters/itemToProductModule.spec.ts create mode 100644 test/specs/converters/itemToToken.spec.ts create mode 100644 test/specs/converters/itemToTransaction.spec.ts create mode 100644 test/specs/entities/Bundle.spec.ts delete mode 100644 test/specs/entities/Country.spec.js create mode 100644 test/specs/entities/Country.spec.ts delete mode 100644 test/specs/entities/License.spec.js create mode 100644 test/specs/entities/License.spec.ts delete mode 100644 test/specs/entities/LicenseTemplate.spec.js create mode 100644 test/specs/entities/LicenseTemplate.spec.ts delete mode 100644 test/specs/entities/Licensee.spec.js create mode 100644 test/specs/entities/Licensee.spec.ts delete mode 100644 test/specs/entities/Notification.spec.js create mode 100644 test/specs/entities/Notification.spec.ts delete mode 100644 test/specs/entities/PaymentMethod.spec.js create mode 100644 test/specs/entities/PaymentMethod.spec.ts delete mode 100644 test/specs/entities/Product.spec.js create mode 100644 test/specs/entities/Product.spec.ts delete mode 100644 test/specs/entities/ProductDiscount.spec.js create mode 100644 test/specs/entities/ProductDiscount.spec.ts delete mode 100644 test/specs/entities/ProductModule.spec.js create mode 100644 test/specs/entities/ProductModule.spec.ts delete mode 100644 test/specs/entities/Token.spec.js create mode 100644 test/specs/entities/Token.spec.ts delete mode 100644 test/specs/entities/Transaction.spec.js create mode 100644 test/specs/entities/Transaction.spec.ts create mode 100644 test/specs/entities/defineEntity.spec.ts delete mode 100644 test/specs/services/BundleService.spec.js create mode 100644 test/specs/services/BundleService.spec.ts delete mode 100644 test/specs/services/LicenseService.spec.js create mode 100644 test/specs/services/LicenseService.spec.ts delete mode 100644 test/specs/services/LicenseTemplateService.spec.js create mode 100644 test/specs/services/LicenseTemplateService.spec.ts delete mode 100644 test/specs/services/LicenseeService.spec.js create mode 100644 test/specs/services/LicenseeService.spec.ts delete mode 100644 test/specs/services/NotificationService.spec.js create mode 100644 test/specs/services/NotificationService.spec.ts delete mode 100644 test/specs/services/PaymentMethodService.spec.js create mode 100644 test/specs/services/PaymentMethodService.spec.ts delete mode 100644 test/specs/services/ProductModuleService.spec.js create mode 100644 test/specs/services/ProductModuleService.spec.ts delete mode 100644 test/specs/services/ProductService.spec.js create mode 100644 test/specs/services/ProductService.spec.ts create mode 100644 test/specs/services/Service.spec.ts create mode 100644 test/specs/services/Token.spec.ts delete mode 100644 test/specs/services/TokenService.spec.js delete mode 100644 test/specs/services/TransactionService.spec.js create mode 100644 test/specs/services/TransactionService.spec.ts delete mode 100644 test/specs/services/UtilityService.spec.js create mode 100644 test/specs/services/UtilityService.spec.ts create mode 100644 test/specs/utils/filter.spec.ts create mode 100644 test/specs/utils/serialize.spec.ts create mode 100644 test/utils/createMockAxiosInstance.ts create mode 100644 test/utils/expectEntity.ts create mode 100644 test/utils/expectEntityProp.ts create mode 100644 test/utils/nlic.ts create mode 100644 tsconfig.json create mode 100644 tsup.config.ts create mode 100644 vitest.config.mjs diff --git a/.babelrc b/.babelrc deleted file mode 100644 index a2d7eda..0000000 --- a/.babelrc +++ /dev/null @@ -1,74 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "modules": false, - "targets": { - "browsers": [ - "> 1%", - "last 2 versions", - "not ie <= 8" - ] - } - } - ] - ], - "plugins": [ - "@babel/plugin-transform-runtime", - [ - "@babel/plugin-proposal-decorators", - { - "legacy": true - } - ], - [ - "@babel/plugin-transform-modules-commonjs", - { - "allowTopLevelThis": true - } - ], - "@babel/plugin-proposal-function-sent", - "@babel/plugin-proposal-export-namespace-from", - "@babel/plugin-proposal-numeric-separator", - "@babel/plugin-proposal-throw-expressions", - "@babel/plugin-syntax-dynamic-import", - "@babel/plugin-syntax-import-meta", - [ - "@babel/plugin-proposal-class-properties", - { - "loose": false - } - ], - "@babel/plugin-proposal-json-strings" - ], - "env": { - "test": { - "presets": [ - "@babel/preset-env" - ], - "plugins": [ - "istanbul", - [ - "@babel/plugin-proposal-decorators", - { - "legacy": true - } - ], - "@babel/plugin-proposal-function-sent", - "@babel/plugin-proposal-export-namespace-from", - "@babel/plugin-proposal-numeric-separator", - "@babel/plugin-proposal-throw-expressions", - "@babel/plugin-syntax-dynamic-import", - "@babel/plugin-syntax-import-meta", - [ - "@babel/plugin-proposal-class-properties", - { - "loose": false - } - ], - "@babel/plugin-proposal-json-strings" - ] - } - } -} diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 6fdf93c..0000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -/build -/dist -/node_modules -/docs \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5c625b2..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,36 +0,0 @@ -// https://eslint.org/docs/user-guide/configuring - -module.exports = { - root: true, - parserOptions: { - parser: 'babel-eslint', - }, - env: { - browser: true, - }, - extends: ['airbnb-base'], - // check if imports actually resolve - settings: { - 'import/resolver': { - webpack: { - config: 'build/webpack.base.conf.cjs', - }, - }, - }, - // add your custom rules here - rules: { - // allow optionalDependencies - 'import/no-extraneous-dependencies': ['error', { - optionalDependencies: ['test/index.js'], - }], - // allow debugger during development - 'no-debugger': 'error', - // custom spaces rules - indent: 'off', - 'indent-legacy': ['error', 4, { SwitchCase: 1 }], - 'linebreak-style': 0, - 'max-len': ['error', 120, { ignoreComments: true }], - 'vue/no-template-key': 'off', - 'object-curly-newline': ['error', { consistent: true }], - }, -}; diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..bb5425a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "semi": true, + "singleQuote": true, + "trailingComma": "all", + "bracketSpacing": true, + "arrowParens": "always", + "printWidth": 120 +} diff --git a/build/build.cjs b/build/build.cjs deleted file mode 100644 index f5ccfb7..0000000 --- a/build/build.cjs +++ /dev/null @@ -1,33 +0,0 @@ -const path = require('path'); - -const ora = require('ora'); - -const rm = require('rimraf'); -const chalk = require('chalk'); -const webpack = require('webpack'); -const webpackConfig = require('./webpack.prod.conf.cjs'); - -const spinner = ora('building for production... '); -spinner.start(); - -rm(path.resolve(__dirname, '../dist'), (e) => { - if (e) throw e; - webpack(webpackConfig, (err, stats) => { - spinner.stop(); - if (err) throw err; - process.stdout.write(`${stats.toString({ - colors: true, - modules: false, - children: false, - chunks: false, - chunkModules: false, - })}\n\n`); - - if (stats.hasErrors()) { - spinner.fail(chalk.red('Build failed with errors.\n')) - process.exit(1); - } - - spinner.succeed(chalk.cyan('Build complete.\n')) - }); -}); diff --git a/build/webpack.base.conf.cjs b/build/webpack.base.conf.cjs deleted file mode 100644 index 4435d94..0000000 --- a/build/webpack.base.conf.cjs +++ /dev/null @@ -1,49 +0,0 @@ -const path = require('path'); -const eslintFriendlyFormatter = require('eslint-friendly-formatter'); -const ESLintPlugin = require('eslint-webpack-plugin'); -const pkg = require('../package.json'); - -const namespace = 'NetLicensing'; - -function resolve(dir) { - return path.join(__dirname, '..', dir); -} - -module.exports = { - context: path.resolve(__dirname, '../'), - output: { - path: path.resolve(__dirname, '../dist'), - filename: '[name].js', - library: namespace, - libraryTarget: 'umd', - umdNamedDefine: true, - globalObject: 'this', - }, - resolve: { - extensions: ['.js', '.json'], - alias: { - '@': resolve('src'), - 'test@': resolve('test'), - }, - }, - module: { - rules: [ - { - test: /\.js$/, - loader: 'babel-loader', - exclude: /node_modules/, - include: [resolve('src'), resolve('test')], - }, - // { - // test: /(\.jsx|\.js)$/, - // loader: 'eslint-loader', - // include: [resolve('src'), resolve('test')], - // options: { - // formatter: eslintFriendlyFormatter, - // emitWarning: true, - // }, - // }, - ], - }, - plugins: [new ESLintPlugin()], -}; diff --git a/build/webpack.dev.conf.cjs b/build/webpack.dev.conf.cjs deleted file mode 100644 index db35799..0000000 --- a/build/webpack.dev.conf.cjs +++ /dev/null @@ -1,9 +0,0 @@ -const { merge } = require('webpack-merge'); -const webWebpackConfig = require('./webpack.web.conf.cjs'); - -const webpackConfig = merge(webWebpackConfig, { - mode: 'development', - devtool: 'source-map', -}); - -module.exports = webpackConfig; diff --git a/build/webpack.node.conf.cjs b/build/webpack.node.conf.cjs deleted file mode 100644 index c2a9ba9..0000000 --- a/build/webpack.node.conf.cjs +++ /dev/null @@ -1,16 +0,0 @@ -const { merge } = require('webpack-merge'); -const pkg = require('../package.json'); -const baseWebpackConfig = require('./webpack.base.conf.cjs'); - -const { name } = pkg; - -module.exports = merge( - baseWebpackConfig, - { - target: 'node', - entry: { - [`${name}.node`]: './src', - [`${name}.node.min`]: './src', - }, - }, -); diff --git a/build/webpack.prod.conf.cjs b/build/webpack.prod.conf.cjs deleted file mode 100644 index a6d9b08..0000000 --- a/build/webpack.prod.conf.cjs +++ /dev/null @@ -1,20 +0,0 @@ -const { merge } = require('webpack-merge'); -const TerserPlugin = require("terser-webpack-plugin"); -const webWebpackConfig = require('./webpack.web.conf.cjs'); -const nodeWebpackConfig = require('./webpack.node.conf.cjs'); - -const webpackConfig = { - mode: 'production', - devtool: false, - performance: { hints: false }, - optimization: { - minimizer: [ - new TerserPlugin({ - parallel: true, - test: /\.min\.js$/, - }), - ], - }, -}; - -module.exports = [merge(webWebpackConfig, webpackConfig), merge(nodeWebpackConfig, webpackConfig)]; diff --git a/build/webpack.test.conf.cjs b/build/webpack.test.conf.cjs deleted file mode 100644 index 37da6e9..0000000 --- a/build/webpack.test.conf.cjs +++ /dev/null @@ -1,10 +0,0 @@ -// This is the webpack config used for unit tests. -const { merge } = require('webpack-merge'); -const baseWebpackConfig = require('./webpack.base.conf.cjs'); - -const webpackConfig = merge(baseWebpackConfig, { - mode: 'development', - devtool: 'inline-source-map', -}); - -module.exports = webpackConfig; diff --git a/build/webpack.web.conf.cjs b/build/webpack.web.conf.cjs deleted file mode 100644 index d1c117c..0000000 --- a/build/webpack.web.conf.cjs +++ /dev/null @@ -1,16 +0,0 @@ -const { merge } = require('webpack-merge'); -const pkg = require('../package.json'); -const baseWebpackConfig = require('./webpack.base.conf.cjs'); - -const { name } = pkg; - -module.exports = merge( - baseWebpackConfig, - { - target: 'web', - entry: { - [name]: './src', - [`${name}.min`]: './src', - }, - }, -); diff --git a/dist/netlicensing-client.js b/dist/netlicensing-client.js deleted file mode 100644 index 98653e2..0000000 --- a/dist/netlicensing-client.js +++ /dev/null @@ -1,11214 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define("NetLicensing", [], factory); - else if(typeof exports === 'object') - exports["NetLicensing"] = factory(); - else - root["NetLicensing"] = factory(); -})(this, () => { -return /******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 52: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _LicenseTemplate = _interopRequireDefault(__webpack_require__(2476)); -var _default = exports["default"] = function _default(item) { - return new _LicenseTemplate.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 79: -/***/ ((module) => { - -function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 269: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -var _LicenseTransactionJoin = _interopRequireDefault(__webpack_require__(3716)); -var _License = _interopRequireDefault(__webpack_require__(1938)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * Transaction entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the transaction. This number is - * always generated by NetLicensing. - * @property string number - * - * always true for transactions - * @property boolean active - * - * Status of transaction. "CANCELLED", "CLOSED", "PENDING". - * @property string status - * - * "SHOP". AUTO transaction for internal use only. - * @property string source - * - * grand total for SHOP transaction (see source). - * @property float grandTotal - * - * discount for SHOP transaction (see source). - * @property float discount - * - * specifies currency for money fields (grandTotal and discount). Check data types to discover which - * @property string currency - * - * Date created. Optional. - * @property string dateCreated - * - * Date closed. Optional. - * @property string dateClosed - * - * @constructor - */ -var Transaction = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Transaction(properties) { - (0, _classCallCheck2.default)(this, Transaction); - return _callSuper(this, Transaction, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - name: 'string', - status: 'string', - source: 'string', - grandTotal: 'float', - discount: 'float', - currency: 'string', - dateCreated: 'date', - dateClosed: 'date', - active: 'boolean', - paymentMethod: 'string' - } - }]); - } - (0, _inherits2.default)(Transaction, _BaseEntity); - return (0, _createClass2.default)(Transaction, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setStatus", - value: function setStatus(status) { - return this.setProperty('status', status); - } - }, { - key: "getStatus", - value: function getStatus(def) { - return this.getProperty('status', def); - } - }, { - key: "setSource", - value: function setSource(source) { - return this.setProperty('source', source); - } - }, { - key: "getSource", - value: function getSource(def) { - return this.getProperty('source', def); - } - }, { - key: "setGrandTotal", - value: function setGrandTotal(grandTotal) { - return this.setProperty('grandTotal', grandTotal); - } - }, { - key: "getGrandTotal", - value: function getGrandTotal(def) { - return this.getProperty('grandTotal', def); - } - }, { - key: "setDiscount", - value: function setDiscount(discount) { - return this.setProperty('discount', discount); - } - }, { - key: "getDiscount", - value: function getDiscount(def) { - return this.getProperty('discount', def); - } - }, { - key: "setCurrency", - value: function setCurrency(currency) { - return this.setProperty('currency', currency); - } - }, { - key: "getCurrency", - value: function getCurrency(def) { - return this.getProperty('currency', def); - } - }, { - key: "setDateCreated", - value: function setDateCreated(dateCreated) { - return this.setProperty('dateCreated', dateCreated); - } - }, { - key: "getDateCreated", - value: function getDateCreated(def) { - return this.getProperty('dateCreated', def); - } - }, { - key: "setDateClosed", - value: function setDateClosed(dateClosed) { - return this.setProperty('dateClosed', dateClosed); - } - }, { - key: "getDateClosed", - value: function getDateClosed(def) { - return this.getProperty('dateClosed', def); - } - }, { - key: "setPaymentMethod", - value: function setPaymentMethod(paymentMethod) { - return this.setProperty('paymentMethod', paymentMethod); - } - }, { - key: "getPaymentMethod", - value: function getPaymentMethod(def) { - return this.getProperty('paymentMethod', def); - } - }, { - key: "setActive", - value: function setActive() { - return this.setProperty('active', true); - } - }, { - key: "getLicenseTransactionJoins", - value: function getLicenseTransactionJoins(def) { - return this.getProperty('licenseTransactionJoins', def); - } - }, { - key: "setLicenseTransactionJoins", - value: function setLicenseTransactionJoins(licenseTransactionJoins) { - return this.setProperty('licenseTransactionJoins', licenseTransactionJoins); - } - }, { - key: "setListLicenseTransactionJoin", - value: function setListLicenseTransactionJoin(properties) { - if (!properties) return; - var licenseTransactionJoins = this.getProperty('licenseTransactionJoins', []); - var licenseTransactionJoin = new _LicenseTransactionJoin.default(); - properties.forEach(function (property) { - if (property.name === 'licenseNumber') { - licenseTransactionJoin.setLicense(new _License.default({ - number: property.value - })); - } - if (property.name === 'transactionNumber') { - licenseTransactionJoin.setTransaction(new Transaction({ - number: property.value - })); - } - }); - licenseTransactionJoins.push(licenseTransactionJoin); - this.setProperty('licenseTransactionJoins', licenseTransactionJoins); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 584: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * Product module entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number - * @property string number - * - * If set to false, the token is disabled. - * @property boolean active - * - * Expiration Time - * @property string expirationTime - * - * @property string vendorNumber - * - * Token type to be generated. - * DEFAULT - default one-time token (will be expired after first request) - * SHOP - shop token is used to redirect customer to the netlicensingShop(licenseeNumber is mandatory) - * APIKEY - APIKey-token - * @property string tokenType - * - * @property string licenseeNumber - * - * @constructor - */ -var Token = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Token(properties) { - (0, _classCallCheck2.default)(this, Token); - return _callSuper(this, Token, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - expirationTime: 'date', - vendorNumber: 'string', - tokenType: 'string', - licenseeNumber: 'string', - successURL: 'string', - successURLTitle: 'string', - cancelURL: 'string', - cancelURLTitle: 'string', - shopURL: 'string' - } - }]); - } - (0, _inherits2.default)(Token, _BaseEntity); - return (0, _createClass2.default)(Token, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setExpirationTime", - value: function setExpirationTime(expirationTime) { - return this.setProperty('expirationTime', expirationTime); - } - }, { - key: "getExpirationTime", - value: function getExpirationTime(def) { - return this.getProperty('expirationTime', def); - } - }, { - key: "setVendorNumber", - value: function setVendorNumber(vendorNumber) { - return this.setProperty('vendorNumber', vendorNumber); - } - }, { - key: "getVendorNumber", - value: function getVendorNumber(def) { - return this.getProperty('vendorNumber', def); - } - }, { - key: "setTokenType", - value: function setTokenType(tokenType) { - return this.setProperty('tokenType', tokenType); - } - }, { - key: "getTokenType", - value: function getTokenType(def) { - return this.getProperty('tokenType', def); - } - }, { - key: "setLicenseeNumber", - value: function setLicenseeNumber(licenseeNumber) { - return this.setProperty('licenseeNumber', licenseeNumber); - } - }, { - key: "getLicenseeNumber", - value: function getLicenseeNumber(def) { - return this.getProperty('licenseeNumber', def); - } - }, { - key: "setSuccessURL", - value: function setSuccessURL(successURL) { - return this.setProperty('successURL', successURL); - } - }, { - key: "getSuccessURL", - value: function getSuccessURL(def) { - return this.getProperty('successURL', def); - } - }, { - key: "setSuccessURLTitle", - value: function setSuccessURLTitle(successURLTitle) { - return this.setProperty('successURLTitle', successURLTitle); - } - }, { - key: "getSuccessURLTitle", - value: function getSuccessURLTitle(def) { - return this.getProperty('successURLTitle', def); - } - }, { - key: "setCancelURL", - value: function setCancelURL(cancelURL) { - return this.setProperty('cancelURL', cancelURL); - } - }, { - key: "getCancelURL", - value: function getCancelURL(def) { - return this.getProperty('cancelURL', def); - } - }, { - key: "setCancelURLTitle", - value: function setCancelURLTitle(cancelURLTitle) { - return this.setProperty('cancelURLTitle', cancelURLTitle); - } - }, { - key: "getCancelURLTitle", - value: function getCancelURLTitle(def) { - return this.getProperty('cancelURLTitle', def); - } - }, { - key: "getShopURL", - value: function getShopURL(def) { - return this.getProperty('shopURL', def); - } - - /** - * @deprecated - * @alias setApiKeyRole - * @param role - * @returns {*} - */ - }, { - key: "setRole", - value: function setRole(role) { - return this.setApiKeyRole(role); - } - - /** - * @deprecated - * @alias getApiKeyRole - * @param def - * @returns {*} - */ - }, { - key: "getRole", - value: function getRole(def) { - return this.getApiKeyRole(def); - } - }, { - key: "setApiKeyRole", - value: function setApiKeyRole(apiKeyRole) { - return this.setProperty('apiKeyRole', apiKeyRole); - } - }, { - key: "getApiKeyRole", - value: function getApiKeyRole(def) { - return this.getProperty('apiKeyRole', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 635: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(3693)); -var _typeof2 = _interopRequireDefault(__webpack_require__(3738)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _CastsUtils = _interopRequireDefault(__webpack_require__(8769)); -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * The entity properties. - * @type {{}} - * @private - */ -var propertiesMap = new WeakMap(); - -/** - * List of properties that was defined - * @type {{}} - * @private - */ - -var definedMap = new WeakMap(); - -/** - * List of properties that need be casts - * @type {{}} - * @private - */ -var castsMap = new WeakMap(); -var BaseEntity = exports["default"] = /*#__PURE__*/function () { - function BaseEntity(_ref) { - var properties = _ref.properties, - casts = _ref.casts; - (0, _classCallCheck2.default)(this, BaseEntity); - propertiesMap.set(this, {}); - definedMap.set(this, {}); - castsMap.set(this, casts || []); - if (properties) { - this.setProperties(properties); - } - } - - /** - * Set a given property on the entity. - * @param property - * @param value - * @returns {BaseEntity} - */ - return (0, _createClass2.default)(BaseEntity, [{ - key: "setProperty", - value: function setProperty(property, value) { - // if property name has bad native type - if (!_CheckUtils.default.isValid(property) || (0, _typeof2.default)(property) === 'object') { - throw new TypeError("Bad property name:".concat(property)); - } - var castedValue = this.cast(property, value); - - // define to property - this.define(property); - - // save property to propertiesMap - var properties = propertiesMap.get(this); - properties[property] = castedValue; - return this; - } - - /** - * Alias for setProperty - * @param property - * @param value - * @returns {BaseEntity} - */ - }, { - key: "addProperty", - value: function addProperty(property, value) { - return this.setProperty(property, value); - } - - /** - * Set the entity properties. - * @param properties - * @returns {BaseEntity} - */ - }, { - key: "setProperties", - value: function setProperties(properties) { - var _this = this; - this.removeProperties(); - var has = Object.prototype.hasOwnProperty; - Object.keys(properties).forEach(function (key) { - if (has.call(properties, key)) { - _this.setProperty(key, properties[key]); - } - }); - return this; - } - - /** - * Check if we has property - * @param property - * @protected - */ - }, { - key: "hasProperty", - value: function hasProperty(property) { - return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property); - } - - /** - * Get an property from the entity. - * @param property - * @param def - * @returns {*} - */ - }, { - key: "getProperty", - value: function getProperty(property, def) { - return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property) ? propertiesMap.get(this)[property] : def; - } - - /** - * Get all of the current properties on the entity. - */ - }, { - key: "getProperties", - value: function getProperties() { - return _objectSpread({}, propertiesMap.get(this)); - } - - /** - * Remove property - * @param property - * @returns {BaseEntity} - */ - }, { - key: "removeProperty", - value: function removeProperty(property) { - var properties = propertiesMap.get(this); - delete properties[property]; - this.removeDefine(property); - return this; - } - - /** - * Remove properties - * @param properties - */ - }, { - key: "removeProperties", - value: function removeProperties(properties) { - var _this2 = this; - var propertiesForRemove = properties || Object.keys(propertiesMap.get(this)); - propertiesForRemove.forEach(function (property) { - _this2.removeProperty(property); - }); - } - }, { - key: "cast", - value: function cast(property, value) { - if (!castsMap.get(this)[property]) return value; - return (0, _CastsUtils.default)(castsMap.get(this)[property], value); - } - - /** - * Check if property has defined - * @param property - * @protected - */ - }, { - key: "hasDefine", - value: function hasDefine(property) { - return Boolean(definedMap.get(this)[property]); - } - - /** - * Define property getter and setter - * @param property - * @protected - */ - }, { - key: "define", - value: function define(property) { - if (this.hasDefine(property)) return; - if (!_CheckUtils.default.isValid(property) || (0, _typeof2.default)(property) === 'object') { - throw new TypeError("Bad property name:".concat(property)); - } - var self = this; - - // delete property - delete this[property]; - var descriptors = { - enumerable: true, - configurable: true, - get: function get() { - return self.getProperty(property); - }, - set: function set(value) { - self.setProperty(property, value); - } - }; - var defined = definedMap.get(this); - defined[property] = true; - Object.defineProperty(this, property, descriptors); - } - - /** - * Remove property getter and setter - * @param property - * @protected - */ - }, { - key: "removeDefine", - value: function removeDefine(property) { - if (!this.hasDefine(property)) return; - var defined = definedMap.get(this); - delete defined[property]; - delete this[property]; - } - - /** - * Get properties map - */ - }, { - key: "asPropertiesMap", - value: function asPropertiesMap() { - var _this3 = this; - var properties = this.getProperties(); - var customProperties = {}; - var has = Object.prototype.hasOwnProperty; - Object.keys(this).forEach(function (key) { - if (!has.call(_this3, key)) return; - customProperties[key] = _this3[key]; - }); - return _objectSpread(_objectSpread({}, customProperties), properties); - } - }]); -}(); - -/***/ }), - -/***/ 662: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(3693)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var ValidationParameters = exports["default"] = /*#__PURE__*/function () { - function ValidationParameters() { - (0, _classCallCheck2.default)(this, ValidationParameters); - this.parameters = {}; - this.licenseeProperties = {}; - } - - /** - * Sets the target product - * - * optional productNumber, must be provided in case licensee auto-create is enabled - * @param productNumber - * @returns {ValidationParameters} - */ - return (0, _createClass2.default)(ValidationParameters, [{ - key: "setProductNumber", - value: function setProductNumber(productNumber) { - this.productNumber = productNumber; - return this; - } - - /** - * Get the target product - * @returns {*} - */ - }, { - key: "getProductNumber", - value: function getProductNumber() { - return this.productNumber; - } - - /** - * Sets the name for the new licensee - * - * optional human-readable licensee name in case licensee will be auto-created. This parameter must not - * be the name, but can be used to store any other useful string information with new licensees, up to - * 1000 characters. - * @param licenseeName - * @returns {ValidationParameters} - */ - }, { - key: "setLicenseeName", - value: function setLicenseeName(licenseeName) { - this.licenseeProperties.licenseeName = licenseeName; - return this; - } - - /** - * Get the licensee name - * @returns {*} - */ - }, { - key: "getLicenseeName", - value: function getLicenseeName() { - return this.licenseeProperties.licenseeName; - } - - /** - * Sets the licensee secret - * - * licensee secret stored on the client side. Refer to Licensee Secret documentation for details. - * @param licenseeSecret - * @returns {ValidationParameters} - * @deprecated use 'NodeLocked' licensingModel instead - */ - }, { - key: "setLicenseeSecret", - value: function setLicenseeSecret(licenseeSecret) { - this.licenseeProperties.licenseeSecret = licenseeSecret; - return this; - } - - /** - * Get the licensee secret - * @returns {*} - * @deprecated use 'NodeLocked' licensingModel instead - */ - }, { - key: "getLicenseeSecret", - value: function getLicenseeSecret() { - return this.licenseeProperties.licenseeSecret; - } - - /** - * Get all licensee properties - */ - }, { - key: "getLicenseeProperties", - value: function getLicenseeProperties() { - return this.licenseeProperties; - } - - /** - * Set licensee property - * @param key - * @param value - */ - }, { - key: "setLicenseeProperty", - value: function setLicenseeProperty(key, value) { - this.licenseeProperties[key] = value; - return this; - } - - /** - * Get licensee property - * @param key - */ - }, { - key: "getLicenseeProperty", - value: function getLicenseeProperty(key, def) { - return this.licenseeProperties[key] || def; - } - - /** - * Indicates, that the validation response is intended the offline use - * - * @param forOfflineUse - * if "true", validation response will be extended with data required for the offline use - */ - }, { - key: "setForOfflineUse", - value: function setForOfflineUse(forOfflineUse) { - this.forOfflineUse = !!forOfflineUse; - return this; - } - }, { - key: "isForOfflineUse", - value: function isForOfflineUse() { - return !!this.forOfflineUse; - } - }, { - key: "setDryRun", - value: function setDryRun(dryRun) { - this.dryRun = !!dryRun; - return this; - } - }, { - key: "getDryRun", - value: function getDryRun(def) { - return this.dryRun || def; - } - - /** - * Get validation parameters - * @returns {*} - */ - }, { - key: "getParameters", - value: function getParameters() { - return _objectSpread({}, this.parameters); - } - }, { - key: "getProductModuleValidationParameters", - value: function getProductModuleValidationParameters(productModuleNumber) { - return _objectSpread({}, this.parameters[productModuleNumber]); - } - }, { - key: "setProductModuleValidationParameters", - value: function setProductModuleValidationParameters(productModuleNumber, productModuleParameters) { - if (this.parameters[productModuleNumber] === undefined || !Object.keys(this.parameters[productModuleNumber]).length) { - this.parameters[productModuleNumber] = {}; - } - this.parameters[productModuleNumber] = _objectSpread(_objectSpread({}, this.parameters[productModuleNumber]), productModuleParameters); - return this; - } - }]); -}(); - -/***/ }), - -/***/ 670: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = function itemToObject(item) { - var object = {}; - var property = item.property, - list = item.list; - if (property && Array.isArray(property)) { - property.forEach(function (p) { - var name = p.name, - value = p.value; - if (name) object[name] = value; - }); - } - if (list && Array.isArray(list)) { - list.forEach(function (l) { - var name = l.name; - if (name) { - object[name] = object[name] || []; - object[name].push(_itemToObject(l)); - } - }); - } - return object; -}; -var _default = exports["default"] = _itemToObject; - -/***/ }), - -/***/ 691: -/***/ ((module) => { - -function _isNativeFunction(t) { - try { - return -1 !== Function.toString.call(t).indexOf("[native code]"); - } catch (n) { - return "function" == typeof t; - } -} -module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 822: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Product = _interopRequireDefault(__webpack_require__(3262)); -var _default = exports["default"] = function _default(item) { - var object = (0, _itemToObject.default)(item); - var discounts = object.discount; - delete object.discount; - var product = new _Product.default(object); - product.setProductDiscounts(discounts); - return product; -}; - -/***/ }), - -/***/ 1156: -/***/ ((module) => { - -function _iterableToArrayLimit(r, l) { - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (null != t) { - var e, - n, - i, - u, - a = [], - f = !0, - o = !1; - try { - if (i = (t = t.call(r)).next, 0 === l) { - if (Object(t) !== t) return; - f = !1; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); - } catch (r) { - o = !0, n = r; - } finally { - try { - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; - } finally { - if (o) throw n; - } - } - return a; - } -} -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 1305: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var _default = exports["default"] = { - isValid: function isValid(value) { - var valid = value !== undefined && typeof value !== 'function'; - if (typeof value === 'number') valid = Number.isFinite(value) && !Number.isNaN(value); - return valid; - }, - paramNotNull: function paramNotNull(parameter, parameterName) { - if (!this.isValid(parameter)) throw new TypeError("Parameter ".concat(parameterName, " has bad value ").concat(parameter)); - if (parameter === null) throw new TypeError("Parameter ".concat(parameterName, " cannot be null")); - }, - paramNotEmpty: function paramNotEmpty(parameter, parameterName) { - if (!this.isValid(parameter)) throw new TypeError("Parameter ".concat(parameterName, " has bad value ").concat(parameter)); - if (!parameter) throw new TypeError("Parameter ".concat(parameterName, " cannot be null or empty string")); - } -}; - -/***/ }), - -/***/ 1692: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToNotification = _interopRequireDefault(__webpack_require__(5270)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Notification Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/notification-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new notification with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#create-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param notification NetLicensing.Notification - * - * return the newly created notification object in promise - * @returns {Promise} - */ - create: function create(context, notification) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.post(context, _Constants.default.Notification.ENDPOINT_PATH, notification.asPropertiesMap()); - case 2: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Notification'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToNotification.default)(item)); - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets notification by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#get-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the notification number - * @param number string - * - * return the notification object in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Notification.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Notification'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToNotification.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns notifications of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#notifications-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of notification entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Notification.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Notification'; - }).map(function (v) { - return (0, _itemToNotification.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates notification properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#update-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * notification number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param notification NetLicensing.Notification - * - * updated notification in promise. - * @returns {Promise} - */ - update: function update(context, number, notification) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.Notification.ENDPOINT_PATH, "/").concat(number), notification.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'Notification'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToNotification.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes notification.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#delete-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * notification number - * @param number string - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - return _Service.default.delete(context, "".concat(_Constants.default.Notification.ENDPOINT_PATH, "/").concat(number)); - } -}; - -/***/ }), - -/***/ 1717: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Transaction = _interopRequireDefault(__webpack_require__(269)); -var _License = _interopRequireDefault(__webpack_require__(1938)); -var _LicenseTransactionJoin = _interopRequireDefault(__webpack_require__(3716)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _default = exports["default"] = function _default(item) { - var object = (0, _itemToObject.default)(item); - var licenseTransactionJoin = object.licenseTransactionJoin; - delete object.licenseTransactionJoin; - var transaction = new _Transaction.default(object); - if (licenseTransactionJoin) { - var joins = []; - licenseTransactionJoin.forEach(function (v) { - var join = new _LicenseTransactionJoin.default(); - join.setLicense(new _License.default({ - number: v[_Constants.default.License.LICENSE_NUMBER] - })); - join.setTransaction(new _Transaction.default({ - number: v[_Constants.default.Transaction.TRANSACTION_NUMBER] - })); - joins.push(join); - }); - transaction.setLicenseTransactionJoins(joins); - } - return transaction; -}; - -/***/ }), - -/***/ 1721: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var ProductDiscount = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function ProductDiscount(properties) { - (0, _classCallCheck2.default)(this, ProductDiscount); - return _callSuper(this, ProductDiscount, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - totalPrice: 'float', - currency: 'string', - amountFix: 'float', - amountPercent: 'int' - } - }]); - } - (0, _inherits2.default)(ProductDiscount, _BaseEntity); - return (0, _createClass2.default)(ProductDiscount, [{ - key: "setTotalPrice", - value: function setTotalPrice(totalPrice) { - return this.setProperty('totalPrice', totalPrice); - } - }, { - key: "getTotalPrice", - value: function getTotalPrice(def) { - return this.getProperty('totalPrice', def); - } - }, { - key: "setCurrency", - value: function setCurrency(currency) { - return this.setProperty('currency', currency); - } - }, { - key: "getCurrency", - value: function getCurrency(def) { - return this.getProperty('currency', def); - } - }, { - key: "setAmountFix", - value: function setAmountFix(amountFix) { - return this.setProperty('amountFix', amountFix).removeProperty('amountPercent'); - } - }, { - key: "getAmountFix", - value: function getAmountFix(def) { - return this.getProperty('amountFix', def); - } - }, { - key: "setAmountPercent", - value: function setAmountPercent(amountPercent) { - return this.setProperty('amountPercent', amountPercent).removeProperty('amountFix'); - } - }, { - key: "getAmountPercent", - value: function getAmountPercent(def) { - return this.getProperty('amountPercent', def); - } - }, { - key: "toString", - value: function toString() { - var totalPrice = this.getTotalPrice(); - var currency = this.getCurrency(); - var amount = 0; - if (this.getAmountFix(null)) amount = this.getAmountFix(); - if (this.getAmountPercent(null)) amount = "".concat(this.getAmountPercent(), "%"); - return "".concat(totalPrice, ";").concat(currency, ";").concat(amount); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 1837: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var getPrototypeOf = __webpack_require__(3072); -var setPrototypeOf = __webpack_require__(5636); -var isNativeFunction = __webpack_require__(691); -var construct = __webpack_require__(9646); -function _wrapNativeSuper(t) { - var r = "function" == typeof Map ? new Map() : void 0; - return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { - if (null === t || !isNativeFunction(t)) return t; - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); - if (void 0 !== r) { - if (r.has(t)) return r.get(t); - r.set(t, Wrapper); - } - function Wrapper() { - return construct(t, arguments, getPrototypeOf(this).constructor); - } - return Wrapper.prototype = Object.create(t.prototype, { - constructor: { - value: Wrapper, - enumerable: !1, - writable: !0, - configurable: !0 - } - }), setPrototypeOf(Wrapper, t); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); -} -module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 1938: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * License entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can - * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation - * transaction status is set to closed. - * @property string number - * - * Name for the licensed item. Set from license template on creation, if not specified explicitly. - * @property string name - * - * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled, - * the license is excluded from the validation process. - * @property boolean active - * - * price for the license. If >0, it must always be accompanied by the currency specification. Read-only, - * set from license template on creation. - * @property float price - * - * specifies currency for the license price. Check data types to discover which currencies are - * supported. Read-only, set from license template on creation. - * @property string currency - * - * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license - * template on creation, if not specified explicitly. - * @property boolean hidden - * - * @property string startDate - * - * Arbitrary additional user properties of string type may be associated with each license. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber, - * licenseTemplateNumber. - */ -var License = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function License(properties) { - (0, _classCallCheck2.default)(this, License); - return _callSuper(this, License, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - price: 'float', - hidden: 'boolean', - parentfeature: 'string', - timeVolume: 'int', - startDate: 'date', - inUse: 'boolean' - } - }]); - } - (0, _inherits2.default)(License, _BaseEntity); - return (0, _createClass2.default)(License, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setHidden", - value: function setHidden(hidden) { - return this.setProperty('hidden', hidden); - } - }, { - key: "getHidden", - value: function getHidden(def) { - return this.getProperty('hidden', def); - } - }, { - key: "setParentfeature", - value: function setParentfeature(parentfeature) { - return this.setProperty('parentfeature', parentfeature); - } - }, { - key: "getParentfeature", - value: function getParentfeature(def) { - return this.getProperty('parentfeature', def); - } - }, { - key: "setTimeVolume", - value: function setTimeVolume(timeVolume) { - return this.setProperty('timeVolume', timeVolume); - } - }, { - key: "getTimeVolume", - value: function getTimeVolume(def) { - return this.getProperty('timeVolume', def); - } - }, { - key: "setStartDate", - value: function setStartDate(startDate) { - return this.setProperty('startDate', startDate); - } - }, { - key: "getStartDate", - value: function getStartDate(def) { - return this.getProperty('startDate', def); - } - }, { - key: "getInUse", - value: function getInUse(def) { - return this.getProperty('inUse', def); - } - }, { - key: "getPrice", - value: function getPrice(def) { - return this.getProperty('price', def); - } - }, { - key: "getCurrency", - value: function getCurrency(def) { - return this.getProperty('currency', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 2302: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _typeof2 = _interopRequireDefault(__webpack_require__(3738)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(3693)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * The context values. - * @type {{}} - * @private - */ -var valuesMap = new WeakMap(); - -/** - * List of values that was defined - * @type {{}} - * @private - */ -var definedMap = new WeakMap(); - -/** - * Context defaults - * @type {{baseUrl: string, securityMode}} - * @private - */ -var defaultsMap = new WeakMap(); -var Context = exports["default"] = /*#__PURE__*/function () { - function Context(values) { - (0, _classCallCheck2.default)(this, Context); - defaultsMap.set(this, { - baseUrl: 'https://go.netlicensing.io/core/v2/rest', - securityMode: _Constants.default.BASIC_AUTHENTICATION - }); - valuesMap.set(this, {}); - definedMap.set(this, {}); - this.setValues(_objectSpread(_objectSpread({}, defaultsMap.get(this)), values)); - } - return (0, _createClass2.default)(Context, [{ - key: "setBaseUrl", - value: function setBaseUrl(baseUrl) { - return this.setValue('baseUrl', baseUrl); - } - }, { - key: "getBaseUrl", - value: function getBaseUrl(def) { - return this.getValue('baseUrl', def); - } - }, { - key: "setUsername", - value: function setUsername(username) { - return this.setValue('username', username); - } - }, { - key: "getUsername", - value: function getUsername(def) { - return this.getValue('username', def); - } - }, { - key: "setPassword", - value: function setPassword(password) { - return this.setValue('password', password); - } - }, { - key: "getPassword", - value: function getPassword(def) { - return this.getValue('password', def); - } - }, { - key: "setApiKey", - value: function setApiKey(apiKey) { - return this.setValue('apiKey', apiKey); - } - }, { - key: "getApiKey", - value: function getApiKey(def) { - return this.getValue('apiKey', def); - } - }, { - key: "setSecurityMode", - value: function setSecurityMode(securityMode) { - return this.setValue('securityMode', securityMode); - } - }, { - key: "getSecurityMode", - value: function getSecurityMode(def) { - return this.getValue('securityMode', def); - } - }, { - key: "setVendorNumber", - value: function setVendorNumber(vendorNumber) { - return this.setValue('vendorNumber', vendorNumber); - } - }, { - key: "getVendorNumber", - value: function getVendorNumber(def) { - return this.getValue('vendorNumber', def); - } - - /** - * Set a given values on the context. - * @param key - * @param value - * @returns {Context} - */ - }, { - key: "setValue", - value: function setValue(key, value) { - // check values - if (!_CheckUtils.default.isValid(key) || (0, _typeof2.default)(key) === 'object') throw new Error("Bad value key:".concat(key)); - if (!_CheckUtils.default.isValid(value)) throw new Error("Value ".concat(key, " has wrong value").concat(value)); - - // define keys - this.define(key); - var copedValue = value; - if ((0, _typeof2.default)(value) === 'object' && value !== null) { - copedValue = Array.isArray(value) ? Object.assign([], value) : _objectSpread({}, value); - } - var values = valuesMap.get(this); - values[key] = copedValue; - return this; - } - - /** - * Set the array of context values. - * @param values - * @returns {Context} - */ - }, { - key: "setValues", - value: function setValues(values) { - var _this = this; - this.removeValues(); - var has = Object.prototype.hasOwnProperty; - Object.keys(values).forEach(function (key) { - if (has.call(values, key)) { - _this.setValue(key, values[key]); - } - }); - return this; - } - - /** - * Get an value from the context. - * @param key - * @param def - * @returns {*} - */ - }, { - key: "getValue", - value: function getValue(key, def) { - return key in valuesMap.get(this) ? valuesMap.get(this)[key] : def; - } - - /** - * Get all of the current value on the context. - */ - }, { - key: "getValues", - value: function getValues() { - return _objectSpread({}, valuesMap.get(this)); - } - - /** - * Remove value - * @param key - * @returns {Context} - */ - }, { - key: "removeValue", - value: function removeValue(key) { - var values = valuesMap.get(this); - delete values[key]; - this.removeDefine(key); - return this; - } - - /** - * Remove values - * @param keys - */ - }, { - key: "removeValues", - value: function removeValues(keys) { - var _this2 = this; - var keysAr = keys || Object.keys(valuesMap.get(this)); - keysAr.forEach(function (key) { - return _this2.removeValue(key); - }); - } - - /** - * Define value getter and setter - * @param key - * @param onlyGetter - * @private - */ - }, { - key: "define", - value: function define(key, onlyGetter) { - if (this.hasDefine(key)) return; - if (!_CheckUtils.default.isValid(key) || (typeof property === "undefined" ? "undefined" : (0, _typeof2.default)(property)) === 'object') { - throw new TypeError("Bad value name:".concat(key)); - } - var self = this; - - // delete property - delete this[key]; - var descriptors = { - enumerable: true, - configurable: true, - get: function get() { - return self.getValue(key); - } - }; - if (!onlyGetter) { - descriptors.set = function (value) { - return self.setValue(key, value); - }; - } - var defined = definedMap.get(this); - defined[key] = true; - Object.defineProperty(this, key, descriptors); - } - - /** - * Check if value has defined - * @param key - * @private - */ - }, { - key: "hasDefine", - value: function hasDefine(key) { - return Boolean(definedMap.get(this)[key]); - } - - /** - * Remove value getter and setter - * @param key - * @private - */ - }, { - key: "removeDefine", - value: function removeDefine(key) { - if (!this.hasDefine(key)) return; - var defined = definedMap.get(this); - delete defined[key]; - delete this[key]; - } - }]); -}(); - -/***/ }), - -/***/ 2395: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var superPropBase = __webpack_require__(9552); -function _get() { - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { - var p = superPropBase(e, t); - if (p) { - var n = Object.getOwnPropertyDescriptor(p, t); - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; - } - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); -} -module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 2430: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _PaymentMethod = _interopRequireDefault(__webpack_require__(3014)); -var _default = exports["default"] = function _default(item) { - return new _PaymentMethod.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 2475: -/***/ ((module) => { - -function _assertThisInitialized(e) { - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - return e; -} -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 2476: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * License template entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the license template. Vendor can - * assign this number when creating a license template or let NetLicensing generate one. - * Read-only after creation of the first license from this license template. - * @property string number - * - * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this - * license template. - * @property boolean active - * - * Name for the licensed item. - * @property string name - * - * Type of licenses created from this license template. Supported types: "FEATURE", "TIMEVOLUME", - * "FLOATING", "QUANTITY" - * @property string licenseType - * - * Price for the license. If >0, it must always be accompanied by the currency specification. - * @property double price - * - * Specifies currency for the license price. Check data types to discover which currencies are - * supported. - * @property string currency - * - * If set to true, every new licensee automatically gets one license out of this license template on - * creation. Automatic licenses must have their price set to 0. - * @property boolean automatic - * - * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase. - * @property boolean hidden - * - * If set to true, licenses from this license template are not visible to the end customer, but - * participate in validation. - * @property boolean hideLicenses - * - * If set to true, this license template defines grace period of validity granted after subscription expiration. - * @property boolean gracePeriod - * - * Mandatory for 'TIMEVOLUME' license type. - * @property integer timeVolume - * - * Time volume period for 'TIMEVOLUME' license type. Supported types: "DAY", "WEEK", "MONTH", "YEAR" - * @property integer timeVolumePeriod - * - * Mandatory for 'FLOATING' license type. - * @property integer maxSessions - * - * Mandatory for 'QUANTITY' license type. - * @property integer quantity - * - * @constructor - */ -var LicenseTemplate = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function LicenseTemplate(properties) { - (0, _classCallCheck2.default)(this, LicenseTemplate); - return _callSuper(this, LicenseTemplate, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - licenseType: 'string', - price: 'double', - currency: 'string', - automatic: 'boolean', - hidden: 'boolean', - hideLicenses: 'boolean', - gracePeriod: 'boolean', - timeVolume: 'int', - timeVolumePeriod: 'string', - maxSessions: 'int', - quantity: 'int', - inUse: 'boolean' - } - }]); - } - (0, _inherits2.default)(LicenseTemplate, _BaseEntity); - return (0, _createClass2.default)(LicenseTemplate, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setLicenseType", - value: function setLicenseType(licenseType) { - return this.setProperty('licenseType', licenseType); - } - }, { - key: "getLicenseType", - value: function getLicenseType(def) { - return this.getProperty('licenseType', def); - } - }, { - key: "setPrice", - value: function setPrice(price) { - return this.setProperty('price', price); - } - }, { - key: "getPrice", - value: function getPrice(def) { - return this.getProperty('price', def); - } - }, { - key: "setCurrency", - value: function setCurrency(currency) { - return this.setProperty('currency', currency); - } - }, { - key: "getCurrency", - value: function getCurrency(def) { - return this.getProperty('currency', def); - } - }, { - key: "setAutomatic", - value: function setAutomatic(automatic) { - return this.setProperty('automatic', automatic); - } - }, { - key: "getAutomatic", - value: function getAutomatic(def) { - return this.getProperty('automatic', def); - } - }, { - key: "setHidden", - value: function setHidden(hidden) { - return this.setProperty('hidden', hidden); - } - }, { - key: "getHidden", - value: function getHidden(def) { - return this.getProperty('hidden', def); - } - }, { - key: "setHideLicenses", - value: function setHideLicenses(hideLicenses) { - return this.setProperty('hideLicenses', hideLicenses); - } - }, { - key: "getHideLicenses", - value: function getHideLicenses(def) { - return this.getProperty('hideLicenses', def); - } - }, { - key: "setTimeVolume", - value: function setTimeVolume(timeVolume) { - return this.setProperty('timeVolume', timeVolume); - } - }, { - key: "getTimeVolume", - value: function getTimeVolume(def) { - return this.getProperty('timeVolume', def); - } - }, { - key: "setTimeVolumePeriod", - value: function setTimeVolumePeriod(timeVolumePeriod) { - return this.setProperty('timeVolumePeriod', timeVolumePeriod); - } - }, { - key: "getTimeVolumePeriod", - value: function getTimeVolumePeriod(def) { - return this.getProperty('timeVolumePeriod', def); - } - }, { - key: "setMaxSessions", - value: function setMaxSessions(maxSessions) { - return this.setProperty('maxSessions', maxSessions); - } - }, { - key: "getMaxSessions", - value: function getMaxSessions(def) { - return this.getProperty('maxSessions', def); - } - }, { - key: "setQuantity", - value: function setQuantity(quantity) { - return this.setProperty('quantity', quantity); - } - }, { - key: "getQuantity", - value: function getQuantity(def) { - return this.getProperty('quantity', def); - } - }, { - key: "getInUse", - value: function getInUse(def) { - return this.getProperty('inUse', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 2579: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToTransaction = _interopRequireDefault(__webpack_require__(1717)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Transaction Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/transaction-services - * - * Transaction is created each time change to LicenseService licenses happens. For instance licenses are - * obtained by a licensee, licenses disabled by vendor, licenses deleted, etc. Transaction is created no matter what - * source has initiated the change to licenses: it can be either a direct purchase of licenses by a licensee via - * NetLicensing Shop, or licenses can be given to a licensee by a vendor. Licenses can also be assigned implicitly by - * NetLicensing if it is defined so by a license model (e.g. evaluation license may be given automatically). All these - * events are reflected in transactions. Of all the transaction handling routines only read-only routines are exposed to - * the public API, as transactions are only allowed to be created and modified by NetLicensing internally. - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new transaction object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#create-transaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param transaction NetLicensing.Transaction - * - * return the newly created transaction object in promise - * @returns {Promise} - */ - create: function create(context, transaction) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.post(context, _Constants.default.Transaction.ENDPOINT_PATH, transaction.asPropertiesMap()); - case 2: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Transaction'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToTransaction.default)(item)); - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets transaction by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#get-transaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the transaction number - * @param number string - * - * return the transaction in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Transaction.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Transaction'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToTransaction.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns all transactions of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#transactions-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string - * - * array of transaction entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Transaction.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Transaction'; - }).map(function (v) { - return (0, _itemToTransaction.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates transaction properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#update-transaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * transaction number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param transaction NetLicensing.Transaction - * - * return updated transaction in promise. - * @returns {Promise} - */ - update: function update(context, number, transaction) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.Transaction.ENDPOINT_PATH, "/").concat(number), transaction.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'Transaction'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToTransaction.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - } -}; - -/***/ }), - -/***/ 2987: -/***/ ((module) => { - -function _arrayWithHoles(r) { - if (Array.isArray(r)) return r; -} -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 3014: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * PaymentMethod entity used internally by NetLicensing. - * - * @property string number - * @property boolean active - * - * @constructor - */ -var PaymentMethod = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function PaymentMethod(properties) { - (0, _classCallCheck2.default)(this, PaymentMethod); - return _callSuper(this, PaymentMethod, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - 'paypal.subject': 'string' - } - }]); - } - (0, _inherits2.default)(PaymentMethod, _BaseEntity); - return (0, _createClass2.default)(PaymentMethod, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setPaypalSubject", - value: function setPaypalSubject(paypalSubject) { - return this.setProperty('paypal.subject', paypalSubject); - } - }, { - key: "getPaypalSubject", - value: function getPaypalSubject(def) { - return this.getProperty('paypal.subject', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 3072: -/***/ ((module) => { - -function _getPrototypeOf(t) { - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); -} -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 3140: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToLicenseTemplate = _interopRequireDefault(__webpack_require__(52)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the ProductModule Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/license-template-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new license template object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#create-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent product module to which the new license template is to be added - * @param productModuleNumber - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param licenseTemplate NetLicensing.LicenseTemplate - * - * the newly created license template object in promise - * @returns {Promise} - */ - create: function create(context, productModuleNumber, licenseTemplate) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _CheckUtils.default.paramNotEmpty(productModuleNumber, _Constants.default.ProductModule.PRODUCT_MODULE_NUMBER); - licenseTemplate.setProperty(_Constants.default.ProductModule.PRODUCT_MODULE_NUMBER, productModuleNumber); - _context.next = 4; - return _Service.default.post(context, _Constants.default.LicenseTemplate.ENDPOINT_PATH, licenseTemplate.asPropertiesMap()); - case 4: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'LicenseTemplate'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToLicenseTemplate.default)(item)); - case 8: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets license template by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#get-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the license template number - * @param number string - * - * return the license template object in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.LicenseTemplate.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'LicenseTemplate'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToLicenseTemplate.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns all license templates of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#license-templates-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of license templates (of all products/modules) or null/empty list if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.LicenseTemplate.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'LicenseTemplate'; - }).map(function (v) { - return (0, _itemToLicenseTemplate.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates license template properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#update-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license template number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param licenseTemplate NetLicensing.LicenseTemplate - * - * updated license template in promise. - * @returns {Promise} - */ - update: function update(context, number, licenseTemplate) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var path, _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - path = "".concat(_Constants.default.LicenseTemplate.ENDPOINT_PATH, "/").concat(number); - _context4.next = 4; - return _Service.default.post(context, path, licenseTemplate.asPropertiesMap()); - case 4: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'LicenseTemplate'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToLicenseTemplate.default)(item)); - case 8: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes license template.See NetLicensingAPI JavaDoc for details: - * @see https://netlicensing.io/wiki/license-template-services#delete-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license template number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.LicenseTemplate.ENDPOINT_PATH, "/").concat(number), queryParams); - } -}; - -/***/ }), - -/***/ 3262: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _get2 = _interopRequireDefault(__webpack_require__(2395)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -var _ProductDiscount = _interopRequireDefault(__webpack_require__(1721)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * The discounts map - * @type {{}} - * @private - */ -var discountsMap = new WeakMap(); - -/** - * An identifier that show if discounts was touched - * @type {{}} - * @private - */ -var discountsTouched = new WeakMap(); - -/** - * NetLicensing Product entity. - * - * Properties visible via NetLicensing API: - * - * Unique number that identifies the product. Vendor can assign this number when creating a product or - * let NetLicensing generate one. Read-only after creation of the first licensee for the product. - * @property string number - * - * If set to false, the product is disabled. No new licensees can be registered for the product, - * existing licensees can not obtain new licenses. - * @property boolean active - * - * Product name. Together with the version identifies the product for the end customer. - * @property string name - * - * Product version. Convenience parameter, additional to the product name. - * @property float version - * - * If set to 'true', non-existing licensees will be created at first validation attempt. - * @property boolean licenseeAutoCreate - * - * Licensee secret mode for product.Supported types: "DISABLED", "PREDEFINED", "CLIENT" - * @property boolean licenseeSecretMode - * - * Product description. Optional. - * @property string description - * - * Licensing information. Optional. - * @property string licensingInfo - * - * @property boolean inUse - * - * Arbitrary additional user properties of string type may be associated with each product. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted. - * - * @constructor - */ -var Product = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Product(properties) { - var _this; - (0, _classCallCheck2.default)(this, Product); - _this = _callSuper(this, Product, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - version: 'string', - description: 'string', - licensingInfo: 'string', - licenseeAutoCreate: 'boolean', - licenseeSecretMode: 'string', - inUse: 'boolean' - } - }]); - discountsMap.set(_this, []); - discountsTouched.set(_this, false); - return _this; - } - (0, _inherits2.default)(Product, _BaseEntity); - return (0, _createClass2.default)(Product, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setVersion", - value: function setVersion(version) { - return this.setProperty('version', version); - } - }, { - key: "getVersion", - value: function getVersion(def) { - return this.getProperty('version', def); - } - }, { - key: "setLicenseeAutoCreate", - value: function setLicenseeAutoCreate(licenseeAutoCreate) { - return this.setProperty('licenseeAutoCreate', licenseeAutoCreate); - } - }, { - key: "getLicenseeAutoCreate", - value: function getLicenseeAutoCreate(def) { - return this.getProperty('licenseeAutoCreate', def); - } - - /** - * @deprecated use ProductModule.setLicenseeSecretMode instead - */ - }, { - key: "setLicenseeSecretMode", - value: function setLicenseeSecretMode(licenseeSecretMode) { - return this.setProperty('licenseeSecretMode', licenseeSecretMode); - } - - /** - * @deprecated use ProductModule.getLicenseeSecretMode instead - */ - }, { - key: "getLicenseeSecretMode", - value: function getLicenseeSecretMode(def) { - return this.getProperty('licenseeSecretMode', def); - } - }, { - key: "setDescription", - value: function setDescription(description) { - return this.setProperty('description', description); - } - }, { - key: "getDescription", - value: function getDescription(def) { - return this.getProperty('description', def); - } - }, { - key: "setLicensingInfo", - value: function setLicensingInfo(licensingInfo) { - return this.setProperty('licensingInfo', licensingInfo); - } - }, { - key: "getLicensingInfo", - value: function getLicensingInfo(def) { - return this.getProperty('licensingInfo', def); - } - }, { - key: "getInUse", - value: function getInUse(def) { - return this.getProperty('inUse', def); - } - - /** - * Add discount to product - * - * @param discount NetLicensing.ProductDiscount - * @returns {NetLicensing.Product} - */ - }, { - key: "addDiscount", - value: function addDiscount(discount) { - var discounts = discountsMap.get(this); - var productDiscount = discount; - if (typeof productDiscount !== 'string' && !(productDiscount instanceof _ProductDiscount.default)) { - productDiscount = new _ProductDiscount.default(productDiscount); - } - discounts.push(productDiscount); - discountsMap.set(this, discounts); - discountsTouched.set(this, true); - return this; - } - - /** - * Set discounts to product - * @param discounts - */ - }, { - key: "setProductDiscounts", - value: function setProductDiscounts(discounts) { - var _this2 = this; - discountsMap.set(this, []); - discountsTouched.set(this, true); - if (!discounts) return this; - if (Array.isArray(discounts)) { - discounts.forEach(function (discount) { - _this2.addDiscount(discount); - }); - return this; - } - this.addDiscount(discounts); - return this; - } - - /** - * Get array of objects discounts - * @returns {Array} - */ - }, { - key: "getProductDiscounts", - value: function getProductDiscounts() { - return Object.assign([], discountsMap.get(this)); - } - }, { - key: "asPropertiesMap", - value: function asPropertiesMap() { - var propertiesMap = _superPropGet(Product, "asPropertiesMap", this, 3)([]); - if (discountsMap.get(this).length) { - propertiesMap.discount = discountsMap.get(this).map(function (discount) { - return discount.toString(); - }); - } - if (!propertiesMap.discount && discountsTouched.get(this)) { - propertiesMap.discount = ''; - } - return propertiesMap; - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 3401: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _typeof2 = _interopRequireDefault(__webpack_require__(3738)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _readOnlyError2 = _interopRequireDefault(__webpack_require__(5407)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _axios = _interopRequireDefault(__webpack_require__(6425)); -var _btoa = _interopRequireDefault(__webpack_require__(7131)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _NlicError = _interopRequireDefault(__webpack_require__(6469)); -var _package = _interopRequireDefault(__webpack_require__(8330)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -var httpXHR = {}; -var axiosInstance = null; -var Service = exports["default"] = /*#__PURE__*/function () { - function Service() { - (0, _classCallCheck2.default)(this, Service); - } - return (0, _createClass2.default)(Service, null, [{ - key: "getAxiosInstance", - value: function getAxiosInstance() { - return axiosInstance || _axios.default; - } - }, { - key: "setAxiosInstance", - value: function setAxiosInstance(instance) { - axiosInstance = instance; - } - }, { - key: "getLastHttpRequestInfo", - value: function getLastHttpRequestInfo() { - return httpXHR; - } - - /** - * Helper method for performing GET request to N - etLicensing API services. Finds and returns first suitable item with - * type resultType from the response. - * - * Context for the NetLicensing API call - * @param context - * - * the REST URL template - * @param urlTemplate - * - * The REST query parameters values. May be null if there are no parameters. - * @param queryParams - * - * @returns {Promise} - */ - }, { - key: "get", - value: function get(context, urlTemplate, queryParams) { - return Service.request(context, 'get', urlTemplate, queryParams); - } - - /** - * Helper method for performing POST request to NetLicensing API services. Finds and returns first suitable item - * with type resultType from the response. - * - * context for the NetLicensing API call - * @param context - * - * the REST URL template - * @param urlTemplate - * - * The REST query parameters values. May be null if there are no parameters. - * @param queryParams - * - * @returns {Promise} - */ - }, { - key: "post", - value: function post(context, urlTemplate, queryParams) { - return Service.request(context, 'post', urlTemplate, queryParams); - } - - /** - * - * @param context - * @param urlTemplate - * @param queryParams - * @returns {Promise} - */ - }, { - key: "delete", - value: function _delete(context, urlTemplate, queryParams) { - return Service.request(context, 'delete', urlTemplate, queryParams); - } - - /** - * Send request to NetLicensing RestApi - * @param context - * @param method - * @param urlTemplate - * @param queryParams - * @returns {Promise} - */ - }, { - key: "request", - value: function request(context, method, urlTemplate, queryParams) { - var template = String(urlTemplate); - var params = queryParams || {}; - if (!template) throw new TypeError('Url template must be specified'); - - // validate http method - if (['get', 'post', 'delete'].indexOf(method.toLowerCase()) < 0) { - throw new Error("Invalid request type:".concat(method, ", allowed requests types: GET, POST, DELETE.")); - } - - // validate context - if (!context.getBaseUrl(null)) { - throw new Error('Base url must be specified'); - } - var request = { - url: encodeURI("".concat(context.getBaseUrl(), "/").concat(template)), - method: method.toLowerCase(), - responseType: 'json', - headers: { - Accept: 'application/json', - 'X-Requested-With': 'XMLHttpRequest' - }, - transformRequest: [function (data, headers) { - if (headers['Content-Type'] === 'application/x-www-form-urlencoded') { - return Service.toQueryString(data); - } - if (!headers['NetLicensing-Origin']) { - // eslint-disable-next-line no-param-reassign - headers['NetLicensing-Origin'] = "NetLicensing/Javascript ".concat(_package.default.version); - } - return data; - }] - }; - - // only node.js has a process variable that is of [[Class]] process - if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - request.headers['User-agent'] = "NetLicensing/Javascript ".concat(_package.default.version, "/node&").concat(process.version); - } - if (['put', 'post', 'patch'].indexOf(request.method) >= 0) { - if (request.method === 'post') { - request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; - } - request.data = params; - } else { - request.params = params; - } - switch (context.getSecurityMode()) { - // Basic Auth - case _Constants.default.BASIC_AUTHENTICATION: - if (!context.getUsername()) throw new Error('Missing parameter "username"'); - if (!context.getPassword()) throw new Error('Missing parameter "password"'); - request.auth = { - username: context.getUsername(), - password: context.getPassword() - }; - break; - // ApiKey Auth - case _Constants.default.APIKEY_IDENTIFICATION: - if (!context.getApiKey()) throw new Error('Missing parameter "apiKey"'); - request.headers.Authorization = "Basic ".concat((0, _btoa.default)("apiKey:".concat(context.getApiKey()))); - break; - // without authorization - case _Constants.default.ANONYMOUS_IDENTIFICATION: - break; - default: - throw new Error('Unknown security mode'); - } - return Service.getAxiosInstance()(request).then(function (response) { - response.infos = Service.getInfo(response, []); - var errors = response.infos.filter(function (_ref) { - var type = _ref.type; - return type === 'ERROR'; - }); - if (errors.length) { - var error = new Error(errors[0].value); - error.config = response.config; - error.request = response.request; - error.response = response; - throw error; - } - httpXHR = response; - return response; - }).catch(function (e) { - if (e.response) { - httpXHR = e.response; - - // The request was made and the server responded with a status code - // that falls out of the range of 2xx - - var error = new _NlicError.default(e); - error.config = e.config; - error.code = e.code; - error.request = e.request; - error.response = e.response; - - // The request was made and the server responded with a status code - // that falls out of the range of 2xx - var data = e.response.data; - if (data) { - error.infos = Service.getInfo(e.response, []); - var _error$infos$filter = error.infos.filter(function (_ref2) { - var type = _ref2.type; - return type === 'ERROR'; - }), - _error$infos$filter2 = (0, _slicedToArray2.default)(_error$infos$filter, 1), - _error$infos$filter2$ = _error$infos$filter2[0], - info = _error$infos$filter2$ === void 0 ? {} : _error$infos$filter2$; - error.message = info.value || 'Unknown'; - } - throw error; - } - throw e; - }); - } - }, { - key: "getInfo", - value: function getInfo(response, def) { - try { - return response.data.infos.info || def; - } catch (e) { - return def; - } - } - }, { - key: "toQueryString", - value: function toQueryString(data, prefix) { - var query = []; - var has = Object.prototype.hasOwnProperty; - Object.keys(data).forEach(function (key) { - if (has.call(data, key)) { - var k = prefix ? "".concat(prefix, "[").concat(key, "]") : key; - var v = data[key]; - v = v instanceof Date ? v.toISOString() : v; - query.push(v !== null && (0, _typeof2.default)(v) === 'object' ? Service.toQueryString(v, k) : "".concat(encodeURIComponent(k), "=").concat(encodeURIComponent(v))); - } - }); - return query.join('&').replace(/%5B[0-9]+%5D=/g, '='); - } - }]); -}(); - -/***/ }), - -/***/ 3648: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Token = _interopRequireDefault(__webpack_require__(584)); -var _default = exports["default"] = function _default(item) { - return new _Token.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 3693: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var toPropertyKey = __webpack_require__(7736); -function _defineProperty(e, r, t) { - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; -} -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 3716: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var LicenseTransactionJoin = exports["default"] = /*#__PURE__*/function () { - function LicenseTransactionJoin(transaction, license) { - (0, _classCallCheck2.default)(this, LicenseTransactionJoin); - this.transaction = transaction; - this.license = license; - } - return (0, _createClass2.default)(LicenseTransactionJoin, [{ - key: "setTransaction", - value: function setTransaction(transaction) { - this.transaction = transaction; - return this; - } - }, { - key: "getTransaction", - value: function getTransaction(def) { - return this.transaction || def; - } - }, { - key: "setLicense", - value: function setLicense(license) { - this.license = license; - return this; - } - }, { - key: "getLicense", - value: function getLicense(def) { - return this.license || def; - } - }]); -}(); - -/***/ }), - -/***/ 3738: -/***/ ((module) => { - -function _typeof(o) { - "@babel/helpers - typeof"; - - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); -} -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 3849: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Bundle = _interopRequireDefault(__webpack_require__(9633)); -var _default = exports["default"] = function _default(item) { - return new _Bundle.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 3950: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToProductModule = _interopRequireDefault(__webpack_require__(4398)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the ProductModule Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/product-module-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new product module object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#create-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent product to which the new product module is to be added - * @param productNumber string - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param productModule NetLicensing.ProductModule - * - * the newly created product module object in promise - * @returns {Promise} - */ - create: function create(context, productNumber, productModule) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _CheckUtils.default.paramNotEmpty(productNumber, _Constants.default.Product.PRODUCT_NUMBER); - productModule.setProperty(_Constants.default.Product.PRODUCT_NUMBER, productNumber); - _context.next = 4; - return _Service.default.post(context, _Constants.default.ProductModule.ENDPOINT_PATH, productModule.asPropertiesMap()); - case 4: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'ProductModule'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToProductModule.default)(item)); - case 8: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets product module by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#get-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the product module number - * @param number string - * - * return the product module object in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.ProductModule.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'ProductModule'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToProductModule.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns products of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#product-modules-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of product modules entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.ProductModule.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'ProductModule'; - }).map(function (v) { - return (0, _itemToProductModule.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates product module properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#update-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product module number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param productModule NetLicensing.ProductModule - * - * updated product module in promise. - * @returns {Promise} - */ - update: function update(context, number, productModule) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.ProductModule.ENDPOINT_PATH, "/").concat(number), productModule.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'ProductModule'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToProductModule.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes product module.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#delete-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product module number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.ProductModule.ENDPOINT_PATH, "/").concat(number), queryParams); - } -}; - -/***/ }), - -/***/ 4034: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = exports["default"] = function _default() { - var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var pageNumber = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var itemsNumber = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var totalPages = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - var totalItems = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; - var paginator = { - getContent: function getContent() { - return content; - }, - getPageNumber: function getPageNumber() { - return pageNumber; - }, - getItemsNumber: function getItemsNumber() { - return itemsNumber; - }, - getTotalPages: function getTotalPages() { - return totalPages; - }, - getTotalItems: function getTotalItems() { - return totalItems; - }, - hasNext: function hasNext() { - return totalPages > pageNumber + 1; - } - }; - var paginatorKeys = Object.keys(paginator); - return new Proxy(content, { - get: function get(target, key) { - if (paginatorKeys.indexOf(key) !== -1) { - return paginator[key]; - } - return target[key]; - } - }); -}; - -/***/ }), - -/***/ 4067: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Licensee = _interopRequireDefault(__webpack_require__(9899)); -var _default = exports["default"] = function _default(item) { - return new _Licensee.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 4398: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _ProductModule = _interopRequireDefault(__webpack_require__(9142)); -var _default = exports["default"] = function _default(item) { - return new _ProductModule.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 4579: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var toPropertyKey = __webpack_require__(7736); -function _defineProperties(e, r) { - for (var t = 0; t < r.length; t++) { - var o = r[t]; - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); - } -} -function _createClass(e, r, t) { - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { - writable: !1 - }), e; -} -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 4633: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var _typeof = (__webpack_require__(3738)["default"]); -function _regeneratorRuntime() { - "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ - module.exports = _regeneratorRuntime = function _regeneratorRuntime() { - return e; - }, module.exports.__esModule = true, module.exports["default"] = module.exports; - var t, - e = {}, - r = Object.prototype, - n = r.hasOwnProperty, - o = Object.defineProperty || function (t, e, r) { - t[e] = r.value; - }, - i = "function" == typeof Symbol ? Symbol : {}, - a = i.iterator || "@@iterator", - c = i.asyncIterator || "@@asyncIterator", - u = i.toStringTag || "@@toStringTag"; - function define(t, e, r) { - return Object.defineProperty(t, e, { - value: r, - enumerable: !0, - configurable: !0, - writable: !0 - }), t[e]; - } - try { - define({}, ""); - } catch (t) { - define = function define(t, e, r) { - return t[e] = r; - }; - } - function wrap(t, e, r, n) { - var i = e && e.prototype instanceof Generator ? e : Generator, - a = Object.create(i.prototype), - c = new Context(n || []); - return o(a, "_invoke", { - value: makeInvokeMethod(t, r, c) - }), a; - } - function tryCatch(t, e, r) { - try { - return { - type: "normal", - arg: t.call(e, r) - }; - } catch (t) { - return { - type: "throw", - arg: t - }; - } - } - e.wrap = wrap; - var h = "suspendedStart", - l = "suspendedYield", - f = "executing", - s = "completed", - y = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - var p = {}; - define(p, a, function () { - return this; - }); - var d = Object.getPrototypeOf, - v = d && d(d(values([]))); - v && v !== r && n.call(v, a) && (p = v); - var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); - function defineIteratorMethods(t) { - ["next", "throw", "return"].forEach(function (e) { - define(t, e, function (t) { - return this._invoke(e, t); - }); - }); - } - function AsyncIterator(t, e) { - function invoke(r, o, i, a) { - var c = tryCatch(t[r], t, o); - if ("throw" !== c.type) { - var u = c.arg, - h = u.value; - return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { - invoke("next", t, i, a); - }, function (t) { - invoke("throw", t, i, a); - }) : e.resolve(h).then(function (t) { - u.value = t, i(u); - }, function (t) { - return invoke("throw", t, i, a); - }); - } - a(c.arg); - } - var r; - o(this, "_invoke", { - value: function value(t, n) { - function callInvokeWithMethodAndArg() { - return new e(function (e, r) { - invoke(t, n, e, r); - }); - } - return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); - } - }); - } - function makeInvokeMethod(e, r, n) { - var o = h; - return function (i, a) { - if (o === f) throw Error("Generator is already running"); - if (o === s) { - if ("throw" === i) throw a; - return { - value: t, - done: !0 - }; - } - for (n.method = i, n.arg = a;;) { - var c = n.delegate; - if (c) { - var u = maybeInvokeDelegate(c, n); - if (u) { - if (u === y) continue; - return u; - } - } - if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { - if (o === h) throw o = s, n.arg; - n.dispatchException(n.arg); - } else "return" === n.method && n.abrupt("return", n.arg); - o = f; - var p = tryCatch(e, r, n); - if ("normal" === p.type) { - if (o = n.done ? s : l, p.arg === y) continue; - return { - value: p.arg, - done: n.done - }; - } - "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); - } - }; - } - function maybeInvokeDelegate(e, r) { - var n = r.method, - o = e.iterator[n]; - if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; - var i = tryCatch(o, e.iterator, r.arg); - if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; - var a = i.arg; - return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); - } - function pushTryEntry(t) { - var e = { - tryLoc: t[0] - }; - 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); - } - function resetTryEntry(t) { - var e = t.completion || {}; - e.type = "normal", delete e.arg, t.completion = e; - } - function Context(t) { - this.tryEntries = [{ - tryLoc: "root" - }], t.forEach(pushTryEntry, this), this.reset(!0); - } - function values(e) { - if (e || "" === e) { - var r = e[a]; - if (r) return r.call(e); - if ("function" == typeof e.next) return e; - if (!isNaN(e.length)) { - var o = -1, - i = function next() { - for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; - return next.value = t, next.done = !0, next; - }; - return i.next = i; - } - } - throw new TypeError(_typeof(e) + " is not iterable"); - } - return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { - value: GeneratorFunctionPrototype, - configurable: !0 - }), o(GeneratorFunctionPrototype, "constructor", { - value: GeneratorFunction, - configurable: !0 - }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { - var e = "function" == typeof t && t.constructor; - return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); - }, e.mark = function (t) { - return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; - }, e.awrap = function (t) { - return { - __await: t - }; - }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { - return this; - }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { - void 0 === i && (i = Promise); - var a = new AsyncIterator(wrap(t, r, n, o), i); - return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { - return t.done ? t.value : a.next(); - }); - }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { - return this; - }), define(g, "toString", function () { - return "[object Generator]"; - }), e.keys = function (t) { - var e = Object(t), - r = []; - for (var n in e) r.push(n); - return r.reverse(), function next() { - for (; r.length;) { - var t = r.pop(); - if (t in e) return next.value = t, next.done = !1, next; - } - return next.done = !0, next; - }; - }, e.values = values, Context.prototype = { - constructor: Context, - reset: function reset(e) { - if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); - }, - stop: function stop() { - this.done = !0; - var t = this.tryEntries[0].completion; - if ("throw" === t.type) throw t.arg; - return this.rval; - }, - dispatchException: function dispatchException(e) { - if (this.done) throw e; - var r = this; - function handle(n, o) { - return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; - } - for (var o = this.tryEntries.length - 1; o >= 0; --o) { - var i = this.tryEntries[o], - a = i.completion; - if ("root" === i.tryLoc) return handle("end"); - if (i.tryLoc <= this.prev) { - var c = n.call(i, "catchLoc"), - u = n.call(i, "finallyLoc"); - if (c && u) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } else if (c) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - } else { - if (!u) throw Error("try statement without catch or finally"); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } - } - } - }, - abrupt: function abrupt(t, e) { - for (var r = this.tryEntries.length - 1; r >= 0; --r) { - var o = this.tryEntries[r]; - if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { - var i = o; - break; - } - } - i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); - var a = i ? i.completion : {}; - return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); - }, - complete: function complete(t, e) { - if ("throw" === t.type) throw t.arg; - return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; - }, - finish: function finish(t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; - } - }, - "catch": function _catch(t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.tryLoc === t) { - var n = r.completion; - if ("throw" === n.type) { - var o = n.arg; - resetTryEntry(r); - } - return o; - } - } - throw Error("illegal catch attempt"); - }, - delegateYield: function delegateYield(e, r, n) { - return this.delegate = { - iterator: values(e), - resultName: r, - nextLoc: n - }, "next" === this.method && (this.arg = t), y; - } - }, e; -} -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 4756: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// TODO(Babel 8): Remove this file. - -var runtime = __webpack_require__(4633)(); -module.exports = runtime; - -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= -try { - regeneratorRuntime = runtime; -} catch (accidentalStrictMode) { - if (typeof globalThis === "object") { - globalThis.regeneratorRuntime = runtime; - } else { - Function("r", "regeneratorRuntime = r")(runtime); - } -} - - -/***/ }), - -/***/ 4994: -/***/ ((module) => { - -function _interopRequireDefault(e) { - return e && e.__esModule ? e : { - "default": e - }; -} -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 5114: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToProduct = _interopRequireDefault(__webpack_require__(822)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Product Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/product-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new product with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#create-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param product NetLicensing.Product - * - * return the newly created product object in promise - * @returns {Promise} - */ - create: function create(context, product) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.post(context, _Constants.default.Product.ENDPOINT_PATH, product.asPropertiesMap()); - case 2: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Product'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToProduct.default)(item)); - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets product by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#get-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the product number - * @param number string - * - * return the product object in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Product.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Product'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToProduct.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns products of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#products-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of product entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Product.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Product'; - }).map(function (v) { - return (0, _itemToProduct.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates product properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#update-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param product NetLicensing.Product - * - * updated product in promise. - * @returns {Promise} - */ - update: function update(context, number, product) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.Product.ENDPOINT_PATH, "/").concat(number), product.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'Product'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToProduct.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes product.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#delete-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.Product.ENDPOINT_PATH, "/").concat(number), queryParams); - } -}; - -/***/ }), - -/***/ 5192: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToToken = _interopRequireDefault(__webpack_require__(3648)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Token Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/token-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new token.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#create-token - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param token NetLicensing.Token - * - * return created token in promise - * @returns {Promise} - */ - create: function create(context, token) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.post(context, _Constants.default.Token.ENDPOINT_PATH, token.asPropertiesMap()); - case 2: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Token'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToToken.default)(item)); - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets token by its number..See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#get-token - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the token number - * @param number - * - * return the token in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Token.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Token'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToToken.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns tokens of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#tokens-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of token entities or empty array if nothing found. - * @return array - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Token.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Token'; - }).map(function (v) { - return (0, _itemToToken.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Delete token by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#delete-token - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the token number - * @param number string - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - return _Service.default.delete(context, "".concat(_Constants.default.Token.ENDPOINT_PATH, "/").concat(number)); - } -}; - -/***/ }), - -/***/ 5270: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Notification = _interopRequireDefault(__webpack_require__(5454)); -var _default = exports["default"] = function _default(item) { - return new _Notification.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 5402: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _License = _interopRequireDefault(__webpack_require__(1938)); -var _default = exports["default"] = function _default(item) { - return new _License.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 5407: -/***/ ((module) => { - -function _readOnlyError(r) { - throw new TypeError('"' + r + '" is read-only'); -} -module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 5454: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * NetLicensing Notification entity. - * - * Properties visible via NetLicensing API: - * - * Unique number that identifies the notification. Vendor can assign this number when creating a notification or - * let NetLicensing generate one. - * @property string number - * - * If set to false, the notification is disabled. The notification will not be fired when the event triggered. - * @property boolean active - * - * Notification name. - * @property string name - * - * Notification type. Indicate the method of transmitting notification, ex: EMAIL, WEBHOOK. - * @property float type - * - * Comma separated string of events that fire the notification when emitted. - * @property string events - * - * Notification response payload. - * @property string payload - * - * Notification response url. Optional. Uses only for WEBHOOK type notification. - * @property string url - * - * Arbitrary additional user properties of string type may be associated with each notification. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted. - * - * @constructor - */ -var Notification = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Notification(properties) { - (0, _classCallCheck2.default)(this, Notification); - return _callSuper(this, Notification, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - protocol: 'string', - events: 'string', - payload: 'string', - endpoint: 'string' - } - }]); - } - (0, _inherits2.default)(Notification, _BaseEntity); - return (0, _createClass2.default)(Notification, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setProtocol", - value: function setProtocol(type) { - return this.setProperty('protocol', type); - } - }, { - key: "getProtocol", - value: function getProtocol(def) { - return this.getProperty('protocol', def); - } - }, { - key: "setEvents", - value: function setEvents(events) { - return this.setProperty('events', events); - } - }, { - key: "getEvents", - value: function getEvents(def) { - return this.getProperty('events', def); - } - }, { - key: "setPayload", - value: function setPayload(payload) { - return this.setProperty('payload', payload); - } - }, { - key: "getPayload", - value: function getPayload(def) { - return this.getProperty('payload', def); - } - }, { - key: "setEndpoint", - value: function setEndpoint(endpoint) { - return this.setProperty('endpoint', endpoint); - } - }, { - key: "getEndpoint", - value: function getEndpoint(def) { - return this.getProperty('endpoint', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 5636: -/***/ ((module) => { - -function _setPrototypeOf(t, e) { - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { - return t.__proto__ = e, t; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); -} -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 5715: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var arrayWithHoles = __webpack_require__(2987); -var iterableToArrayLimit = __webpack_require__(1156); -var unsupportedIterableToArray = __webpack_require__(7122); -var nonIterableRest = __webpack_require__(7752); -function _slicedToArray(r, e) { - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); -} -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 6232: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var _default = exports["default"] = { - BASIC_AUTHENTICATION: 'BASIC_AUTH', - APIKEY_IDENTIFICATION: 'APIKEY', - ANONYMOUS_IDENTIFICATION: 'ANONYMOUS', - ACTIVE: 'active', - NUMBER: 'number', - NAME: 'name', - VERSION: 'version', - DELETED: 'deleted', - CASCADE: 'forceCascade', - PRICE: 'price', - DISCOUNT: 'discount', - CURRENCY: 'currency', - IN_USE: 'inUse', - FILTER: 'filter', - BASE_URL: 'baseUrl', - USERNAME: 'username', - PASSWORD: 'password', - SECURITY_MODE: 'securityMode', - LicensingModel: { - VALID: 'valid', - TryAndBuy: { - NAME: 'TryAndBuy' - }, - Rental: { - NAME: 'Rental', - RED_THRESHOLD: 'redThreshold', - YELLOW_THRESHOLD: 'yellowThreshold' - }, - Subscription: { - NAME: 'Subscription' - }, - Floating: { - NAME: 'Floating' - }, - MultiFeature: { - NAME: 'MultiFeature' - }, - PayPerUse: { - NAME: 'PayPerUse' - }, - PricingTable: { - NAME: 'PricingTable' - }, - Quota: { - NAME: 'Quota' - }, - NodeLocked: { - NAME: 'NodeLocked' - } - }, - Vendor: { - VENDOR_NUMBER: 'vendorNumber', - VENDOR_TYPE: 'Vendor' - }, - Product: { - ENDPOINT_PATH: 'product', - PRODUCT_NUMBER: 'productNumber', - LICENSEE_AUTO_CREATE: 'licenseeAutoCreate', - DESCRIPTION: 'description', - LICENSING_INFO: 'licensingInfo', - DISCOUNTS: 'discounts', - /** - * @deprecated use ProductModule.PROP_LICENSEE_SECRET_MODE instead - */ - PROP_LICENSEE_SECRET_MODE: 'licenseeSecretMode', - PROP_VAT_MODE: 'vatMode', - Discount: { - TOTAL_PRICE: 'totalPrice', - AMOUNT_FIX: 'amountFix', - AMOUNT_PERCENT: 'amountPercent' - }, - LicenseeSecretMode: { - /** - * @deprecated DISABLED mode is deprecated - */ - DISABLED: 'DISABLED', - PREDEFINED: 'PREDEFINED', - CLIENT: 'CLIENT' - } - }, - ProductModule: { - ENDPOINT_PATH: 'productmodule', - PRODUCT_MODULE_NUMBER: 'productModuleNumber', - PRODUCT_MODULE_NAME: 'productModuleName', - LICENSING_MODEL: 'licensingModel', - PROP_LICENSEE_SECRET_MODE: 'licenseeSecretMode' - }, - LicenseTemplate: { - ENDPOINT_PATH: 'licensetemplate', - LICENSE_TEMPLATE_NUMBER: 'licenseTemplateNumber', - LICENSE_TYPE: 'licenseType', - AUTOMATIC: 'automatic', - HIDDEN: 'hidden', - HIDE_LICENSES: 'hideLicenses', - PROP_LICENSEE_SECRET: 'licenseeSecret', - LicenseType: { - FEATURE: 'FEATURE', - TIMEVOLUME: 'TIMEVOLUME', - FLOATING: 'FLOATING', - QUANTITY: 'QUANTITY' - } - }, - Token: { - ENDPOINT_PATH: 'token', - EXPIRATION_TIME: 'expirationTime', - TOKEN_TYPE: 'tokenType', - API_KEY: 'apiKey', - TOKEN_PROP_EMAIL: 'email', - TOKEN_PROP_VENDORNUMBER: 'vendorNumber', - TOKEN_PROP_SHOP_URL: 'shopURL', - Type: { - DEFAULT: 'DEFAULT', - SHOP: 'SHOP', - APIKEY: 'APIKEY' - } - }, - Transaction: { - ENDPOINT_PATH: 'transaction', - TRANSACTION_NUMBER: 'transactionNumber', - GRAND_TOTAL: 'grandTotal', - STATUS: 'status', - SOURCE: 'source', - DATE_CREATED: 'datecreated', - DATE_CLOSED: 'dateclosed', - VAT: 'vat', - VAT_MODE: 'vatMode', - LICENSE_TRANSACTION_JOIN: 'licenseTransactionJoin', - SOURCE_SHOP_ONLY: 'shopOnly', - /** - * @deprecated - */ - Status: { - CANCELLED: 'CANCELLED', - CLOSED: 'CLOSED', - PENDING: 'PENDING' - } - }, - Licensee: { - ENDPOINT_PATH: 'licensee', - ENDPOINT_PATH_VALIDATE: 'validate', - ENDPOINT_PATH_TRANSFER: 'transfer', - LICENSEE_NUMBER: 'licenseeNumber', - SOURCE_LICENSEE_NUMBER: 'sourceLicenseeNumber', - PROP_LICENSEE_NAME: 'licenseeName', - /** - * @deprecated use License.PROP_LICENSEE_SECRET - */ - PROP_LICENSEE_SECRET: 'licenseeSecret', - PROP_MARKED_FOR_TRANSFER: 'markedForTransfer' - }, - License: { - ENDPOINT_PATH: 'license', - LICENSE_NUMBER: 'licenseNumber', - HIDDEN: 'hidden', - PROP_LICENSEE_SECRET: 'licenseeSecret' - }, - PaymentMethod: { - ENDPOINT_PATH: 'paymentmethod' - }, - Utility: { - ENDPOINT_PATH: 'utility', - ENDPOINT_PATH_LICENSE_TYPES: 'licenseTypes', - ENDPOINT_PATH_LICENSING_MODELS: 'licensingModels', - ENDPOINT_PATH_COUNTRIES: 'countries', - LICENSING_MODEL_PROPERTIES: 'LicensingModelProperties', - LICENSE_TYPE: 'LicenseType' - }, - APIKEY: { - ROLE_APIKEY_LICENSEE: 'ROLE_APIKEY_LICENSEE', - ROLE_APIKEY_ANALYTICS: 'ROLE_APIKEY_ANALYTICS', - ROLE_APIKEY_OPERATION: 'ROLE_APIKEY_OPERATION', - ROLE_APIKEY_MAINTENANCE: 'ROLE_APIKEY_MAINTENANCE', - ROLE_APIKEY_ADMIN: 'ROLE_APIKEY_ADMIN' - }, - Validation: { - FOR_OFFLINE_USE: 'forOfflineUse' - }, - WarningLevel: { - GREEN: 'GREEN', - YELLOW: 'YELLOW', - RED: 'RED' - }, - Bundle: { - ENDPOINT_PATH: 'bundle', - ENDPOINT_OBTAIN_PATH: 'obtain' - }, - Notification: { - ENDPOINT_PATH: 'notification', - Protocol: { - WEBHOOK: 'WEBHOOK' - }, - Event: { - LICENSEE_CREATED: 'LICENSEE_CREATED', - LICENSE_CREATED: 'LICENSE_CREATED', - WARNING_LEVEL_CHANGED: 'WARNING_LEVEL_CHANGED', - PAYMENT_TRANSACTION_PROCESSED: 'PAYMENT_TRANSACTION_PROCESSED' - } - } -}; - -/***/ }), - -/***/ 6359: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -var _itemToCountry = _interopRequireDefault(__webpack_require__(6899)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Utility Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/utility-services - * @constructor - */ -var _default = exports["default"] = { - /** - * Returns all license types. See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/utility-services#license-types-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * array of available license types or empty array if nothing found in promise. - * @returns {Promise} - */ - listLicenseTypes: function listLicenseTypes(context) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$get, data; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.get(context, "".concat(_Constants.default.Utility.ENDPOINT_PATH, "/").concat(_Constants.default.Utility.ENDPOINT_PATH_LICENSE_TYPES)); - case 2: - _yield$Service$get = _context.sent; - data = _yield$Service$get.data; - return _context.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref) { - var type = _ref.type; - return type === 'LicenseType'; - }).map(function (v) { - return (0, _itemToObject.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 5: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Returns all license models. See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/utility-services#licensing-models-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * array of available license models or empty array if nothing found in promise. - * @returns {Promise} - */ - listLicensingModels: function listLicensingModels(context) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _context2.next = 2; - return _Service.default.get(context, "".concat(_Constants.default.Utility.ENDPOINT_PATH, "/").concat(_Constants.default.Utility.ENDPOINT_PATH_LICENSING_MODELS)); - case 2: - _yield$Service$get2 = _context2.sent; - data = _yield$Service$get2.data; - return _context2.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref2) { - var type = _ref2.type; - return type === 'LicensingModelProperties'; - }).map(function (v) { - return (0, _itemToObject.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 5: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns all countries. - * - * determines the vendor on whose behalf the call is performed - * @param context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter - * - * collection of available countries or null/empty list if nothing found in promise. - * @returns {Promise} - */ - listCountries: function listCountries(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get3, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, "".concat(_Constants.default.Utility.ENDPOINT_PATH, "/").concat(_Constants.default.Utility.ENDPOINT_PATH_COUNTRIES), queryParams); - case 7: - _yield$Service$get3 = _context3.sent; - data = _yield$Service$get3.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Country'; - }).map(function (v) { - return (0, _itemToCountry.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - } -}; - -/***/ }), - -/***/ 6425: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -/*! Axios v1.8.2 Copyright (c) 2025 Matt Zabriskie and contributors */ - - -function bind(fn, thisArg) { - return function wrap() { - return fn.apply(thisArg, arguments); - }; -} - -// utils is a library of generic helper functions non-specific to axios - -const {toString} = Object.prototype; -const {getPrototypeOf} = Object; - -const kindOf = (cache => thing => { - const str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); -})(Object.create(null)); - -const kindOfTest = (type) => { - type = type.toLowerCase(); - return (thing) => kindOf(thing) === type -}; - -const typeOfTest = type => thing => typeof thing === type; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * - * @returns {boolean} True if value is an Array, otherwise false - */ -const {isArray} = Array; - -/** - * Determine if a value is undefined - * - * @param {*} val The value to test - * - * @returns {boolean} True if the value is undefined, otherwise false - */ -const isUndefined = typeOfTest('undefined'); - -/** - * Determine if a value is a Buffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -const isArrayBuffer = kindOfTest('ArrayBuffer'); - - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - let result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a String, otherwise false - */ -const isString = typeOfTest('string'); - -/** - * Determine if a value is a Function - * - * @param {*} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -const isFunction = typeOfTest('function'); - -/** - * Determine if a value is a Number - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Number, otherwise false - */ -const isNumber = typeOfTest('number'); - -/** - * Determine if a value is an Object - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an Object, otherwise false - */ -const isObject = (thing) => thing !== null && typeof thing === 'object'; - -/** - * Determine if a value is a Boolean - * - * @param {*} thing The value to test - * @returns {boolean} True if value is a Boolean, otherwise false - */ -const isBoolean = thing => thing === true || thing === false; - -/** - * Determine if a value is a plain Object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a plain Object, otherwise false - */ -const isPlainObject = (val) => { - if (kindOf(val) !== 'object') { - return false; - } - - const prototype = getPrototypeOf(val); - return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); -}; - -/** - * Determine if a value is a Date - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Date, otherwise false - */ -const isDate = kindOfTest('Date'); - -/** - * Determine if a value is a File - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFile = kindOfTest('File'); - -/** - * Determine if a value is a Blob - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Blob, otherwise false - */ -const isBlob = kindOfTest('Blob'); - -/** - * Determine if a value is a FileList - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFileList = kindOfTest('FileList'); - -/** - * Determine if a value is a Stream - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Stream, otherwise false - */ -const isStream = (val) => isObject(val) && isFunction(val.pipe); - -/** - * Determine if a value is a FormData - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an FormData, otherwise false - */ -const isFormData = (thing) => { - let kind; - return thing && ( - (typeof FormData === 'function' && thing instanceof FormData) || ( - isFunction(thing.append) && ( - (kind = kindOf(thing)) === 'formdata' || - // detect form-data instance - (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') - ) - ) - ) -}; - -/** - * Determine if a value is a URLSearchParams object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -const isURLSearchParams = kindOfTest('URLSearchParams'); - -const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * - * @returns {String} The String freed of excess whitespace - */ -const trim = (str) => str.trim ? - str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - * - * @param {Boolean} [allOwnKeys = false] - * @returns {any} - */ -function forEach(obj, fn, {allOwnKeys = false} = {}) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - let i; - let l; - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); - const len = keys.length; - let key; - - for (i = 0; i < len; i++) { - key = keys[i]; - fn.call(null, obj[key], key, obj); - } - } -} - -function findKey(obj, key) { - key = key.toLowerCase(); - const keys = Object.keys(obj); - let i = keys.length; - let _key; - while (i-- > 0) { - _key = keys[i]; - if (key === _key.toLowerCase()) { - return _key; - } - } - return null; -} - -const _global = (() => { - /*eslint no-undef:0*/ - if (typeof globalThis !== "undefined") return globalThis; - return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : __webpack_require__.g) -})(); - -const isContextDefined = (context) => !isUndefined(context) && context !== _global; - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - const {caseless} = isContextDefined(this) && this || {}; - const result = {}; - const assignValue = (val, key) => { - const targetKey = caseless && findKey(result, key) || key; - if (isPlainObject(result[targetKey]) && isPlainObject(val)) { - result[targetKey] = merge(result[targetKey], val); - } else if (isPlainObject(val)) { - result[targetKey] = merge({}, val); - } else if (isArray(val)) { - result[targetKey] = val.slice(); - } else { - result[targetKey] = val; - } - }; - - for (let i = 0, l = arguments.length; i < l; i++) { - arguments[i] && forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * - * @param {Boolean} [allOwnKeys] - * @returns {Object} The resulting value of object a - */ -const extend = (a, b, thisArg, {allOwnKeys}= {}) => { - forEach(b, (val, key) => { - if (thisArg && isFunction(val)) { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }, {allOwnKeys}); - return a; -}; - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * - * @returns {string} content value without BOM - */ -const stripBOM = (content) => { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -}; - -/** - * Inherit the prototype methods from one constructor into another - * @param {function} constructor - * @param {function} superConstructor - * @param {object} [props] - * @param {object} [descriptors] - * - * @returns {void} - */ -const inherits = (constructor, superConstructor, props, descriptors) => { - constructor.prototype = Object.create(superConstructor.prototype, descriptors); - constructor.prototype.constructor = constructor; - Object.defineProperty(constructor, 'super', { - value: superConstructor.prototype - }); - props && Object.assign(constructor.prototype, props); -}; - -/** - * Resolve object with deep prototype chain to a flat object - * @param {Object} sourceObj source object - * @param {Object} [destObj] - * @param {Function|Boolean} [filter] - * @param {Function} [propFilter] - * - * @returns {Object} - */ -const toFlatObject = (sourceObj, destObj, filter, propFilter) => { - let props; - let i; - let prop; - const merged = {}; - - destObj = destObj || {}; - // eslint-disable-next-line no-eq-null,eqeqeq - if (sourceObj == null) return destObj; - - do { - props = Object.getOwnPropertyNames(sourceObj); - i = props.length; - while (i-- > 0) { - prop = props[i]; - if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { - destObj[prop] = sourceObj[prop]; - merged[prop] = true; - } - } - sourceObj = filter !== false && getPrototypeOf(sourceObj); - } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); - - return destObj; -}; - -/** - * Determines whether a string ends with the characters of a specified string - * - * @param {String} str - * @param {String} searchString - * @param {Number} [position= 0] - * - * @returns {boolean} - */ -const endsWith = (str, searchString, position) => { - str = String(str); - if (position === undefined || position > str.length) { - position = str.length; - } - position -= searchString.length; - const lastIndex = str.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; -}; - - -/** - * Returns new array from array like object or null if failed - * - * @param {*} [thing] - * - * @returns {?Array} - */ -const toArray = (thing) => { - if (!thing) return null; - if (isArray(thing)) return thing; - let i = thing.length; - if (!isNumber(i)) return null; - const arr = new Array(i); - while (i-- > 0) { - arr[i] = thing[i]; - } - return arr; -}; - -/** - * Checking if the Uint8Array exists and if it does, it returns a function that checks if the - * thing passed in is an instance of Uint8Array - * - * @param {TypedArray} - * - * @returns {Array} - */ -// eslint-disable-next-line func-names -const isTypedArray = (TypedArray => { - // eslint-disable-next-line func-names - return thing => { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); - -/** - * For each entry in the object, call the function with the key and value. - * - * @param {Object} obj - The object to iterate over. - * @param {Function} fn - The function to call for each entry. - * - * @returns {void} - */ -const forEachEntry = (obj, fn) => { - const generator = obj && obj[Symbol.iterator]; - - const iterator = generator.call(obj); - - let result; - - while ((result = iterator.next()) && !result.done) { - const pair = result.value; - fn.call(obj, pair[0], pair[1]); - } -}; - -/** - * It takes a regular expression and a string, and returns an array of all the matches - * - * @param {string} regExp - The regular expression to match against. - * @param {string} str - The string to search. - * - * @returns {Array} - */ -const matchAll = (regExp, str) => { - let matches; - const arr = []; - - while ((matches = regExp.exec(str)) !== null) { - arr.push(matches); - } - - return arr; -}; - -/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ -const isHTMLForm = kindOfTest('HTMLFormElement'); - -const toCamelCase = str => { - return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, - function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; - } - ); -}; - -/* Creating a function that will check if an object has a property. */ -const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); - -/** - * Determine if a value is a RegExp object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a RegExp object, otherwise false - */ -const isRegExp = kindOfTest('RegExp'); - -const reduceDescriptors = (obj, reducer) => { - const descriptors = Object.getOwnPropertyDescriptors(obj); - const reducedDescriptors = {}; - - forEach(descriptors, (descriptor, name) => { - let ret; - if ((ret = reducer(descriptor, name, obj)) !== false) { - reducedDescriptors[name] = ret || descriptor; - } - }); - - Object.defineProperties(obj, reducedDescriptors); -}; - -/** - * Makes all methods read-only - * @param {Object} obj - */ - -const freezeMethods = (obj) => { - reduceDescriptors(obj, (descriptor, name) => { - // skip restricted props in strict mode - if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { - return false; - } - - const value = obj[name]; - - if (!isFunction(value)) return; - - descriptor.enumerable = false; - - if ('writable' in descriptor) { - descriptor.writable = false; - return; - } - - if (!descriptor.set) { - descriptor.set = () => { - throw Error('Can not rewrite read-only method \'' + name + '\''); - }; - } - }); -}; - -const toObjectSet = (arrayOrString, delimiter) => { - const obj = {}; - - const define = (arr) => { - arr.forEach(value => { - obj[value] = true; - }); - }; - - isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); - - return obj; -}; - -const noop = () => {}; - -const toFiniteNumber = (value, defaultValue) => { - return value != null && Number.isFinite(value = +value) ? value : defaultValue; -}; - -/** - * If the thing is a FormData object, return true, otherwise return false. - * - * @param {unknown} thing - The thing to check. - * - * @returns {boolean} - */ -function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); -} - -const toJSONObject = (obj) => { - const stack = new Array(10); - - const visit = (source, i) => { - - if (isObject(source)) { - if (stack.indexOf(source) >= 0) { - return; - } - - if(!('toJSON' in source)) { - stack[i] = source; - const target = isArray(source) ? [] : {}; - - forEach(source, (value, key) => { - const reducedValue = visit(value, i + 1); - !isUndefined(reducedValue) && (target[key] = reducedValue); - }); - - stack[i] = undefined; - - return target; - } - } - - return source; - }; - - return visit(obj, 0); -}; - -const isAsyncFn = kindOfTest('AsyncFunction'); - -const isThenable = (thing) => - thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); - -// original code -// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 - -const _setImmediate = ((setImmediateSupported, postMessageSupported) => { - if (setImmediateSupported) { - return setImmediate; - } - - return postMessageSupported ? ((token, callbacks) => { - _global.addEventListener("message", ({source, data}) => { - if (source === _global && data === token) { - callbacks.length && callbacks.shift()(); - } - }, false); - - return (cb) => { - callbacks.push(cb); - _global.postMessage(token, "*"); - } - })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); -})( - typeof setImmediate === 'function', - isFunction(_global.postMessage) -); - -const asap = typeof queueMicrotask !== 'undefined' ? - queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate); - -// ********************* - -var utils$1 = { - isArray, - isArrayBuffer, - isBuffer, - isFormData, - isArrayBufferView, - isString, - isNumber, - isBoolean, - isObject, - isPlainObject, - isReadableStream, - isRequest, - isResponse, - isHeaders, - isUndefined, - isDate, - isFile, - isBlob, - isRegExp, - isFunction, - isStream, - isURLSearchParams, - isTypedArray, - isFileList, - forEach, - merge, - extend, - trim, - stripBOM, - inherits, - toFlatObject, - kindOf, - kindOfTest, - endsWith, - toArray, - forEachEntry, - matchAll, - isHTMLForm, - hasOwnProperty, - hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection - reduceDescriptors, - freezeMethods, - toObjectSet, - toCamelCase, - noop, - toFiniteNumber, - findKey, - global: _global, - isContextDefined, - isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable, - setImmediate: _setImmediate, - asap -}; - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [config] The config. - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * - * @returns {Error} The created error. - */ -function AxiosError(message, code, config, request, response) { - Error.call(this); - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = (new Error()).stack; - } - - this.message = message; - this.name = 'AxiosError'; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - if (response) { - this.response = response; - this.status = response.status ? response.status : null; - } -} - -utils$1.inherits(AxiosError, Error, { - toJSON: function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: utils$1.toJSONObject(this.config), - code: this.code, - status: this.status - }; - } -}); - -const prototype$1 = AxiosError.prototype; -const descriptors = {}; - -[ - 'ERR_BAD_OPTION_VALUE', - 'ERR_BAD_OPTION', - 'ECONNABORTED', - 'ETIMEDOUT', - 'ERR_NETWORK', - 'ERR_FR_TOO_MANY_REDIRECTS', - 'ERR_DEPRECATED', - 'ERR_BAD_RESPONSE', - 'ERR_BAD_REQUEST', - 'ERR_CANCELED', - 'ERR_NOT_SUPPORT', - 'ERR_INVALID_URL' -// eslint-disable-next-line func-names -].forEach(code => { - descriptors[code] = {value: code}; -}); - -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype$1, 'isAxiosError', {value: true}); - -// eslint-disable-next-line func-names -AxiosError.from = (error, code, config, request, response, customProps) => { - const axiosError = Object.create(prototype$1); - - utils$1.toFlatObject(error, axiosError, function filter(obj) { - return obj !== Error.prototype; - }, prop => { - return prop !== 'isAxiosError'; - }); - - AxiosError.call(axiosError, error.message, code, config, request, response); - - axiosError.cause = error; - - axiosError.name = error.name; - - customProps && Object.assign(axiosError, customProps); - - return axiosError; -}; - -// eslint-disable-next-line strict -var httpAdapter = null; - -/** - * Determines if the given thing is a array or js object. - * - * @param {string} thing - The object or array to be visited. - * - * @returns {boolean} - */ -function isVisitable(thing) { - return utils$1.isPlainObject(thing) || utils$1.isArray(thing); -} - -/** - * It removes the brackets from the end of a string - * - * @param {string} key - The key of the parameter. - * - * @returns {string} the key without the brackets. - */ -function removeBrackets(key) { - return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key; -} - -/** - * It takes a path, a key, and a boolean, and returns a string - * - * @param {string} path - The path to the current key. - * @param {string} key - The key of the current object being iterated over. - * @param {string} dots - If true, the key will be rendered with dots instead of brackets. - * - * @returns {string} The path to the current key. - */ -function renderKey(path, key, dots) { - if (!path) return key; - return path.concat(key).map(function each(token, i) { - // eslint-disable-next-line no-param-reassign - token = removeBrackets(token); - return !dots && i ? '[' + token + ']' : token; - }).join(dots ? '.' : ''); -} - -/** - * If the array is an array and none of its elements are visitable, then it's a flat array. - * - * @param {Array} arr - The array to check - * - * @returns {boolean} - */ -function isFlatArray(arr) { - return utils$1.isArray(arr) && !arr.some(isVisitable); -} - -const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) { - return /^is[A-Z]/.test(prop); -}); - -/** - * Convert a data object to FormData - * - * @param {Object} obj - * @param {?Object} [formData] - * @param {?Object} [options] - * @param {Function} [options.visitor] - * @param {Boolean} [options.metaTokens = true] - * @param {Boolean} [options.dots = false] - * @param {?Boolean} [options.indexes = false] - * - * @returns {Object} - **/ - -/** - * It converts an object into a FormData object - * - * @param {Object} obj - The object to convert to form data. - * @param {string} formData - The FormData object to append to. - * @param {Object} options - * - * @returns - */ -function toFormData(obj, formData, options) { - if (!utils$1.isObject(obj)) { - throw new TypeError('target must be an object'); - } - - // eslint-disable-next-line no-param-reassign - formData = formData || new (FormData)(); - - // eslint-disable-next-line no-param-reassign - options = utils$1.toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - // eslint-disable-next-line no-eq-null,eqeqeq - return !utils$1.isUndefined(source[option]); - }); - - const metaTokens = options.metaTokens; - // eslint-disable-next-line no-use-before-define - const visitor = options.visitor || defaultVisitor; - const dots = options.dots; - const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; - const useBlob = _Blob && utils$1.isSpecCompliantForm(formData); - - if (!utils$1.isFunction(visitor)) { - throw new TypeError('visitor must be a function'); - } - - function convertValue(value) { - if (value === null) return ''; - - if (utils$1.isDate(value)) { - return value.toISOString(); - } - - if (!useBlob && utils$1.isBlob(value)) { - throw new AxiosError('Blob is not supported. Use a Buffer instead.'); - } - - if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { - return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); - } - - return value; - } - - /** - * Default visitor. - * - * @param {*} value - * @param {String|Number} key - * @param {Array} path - * @this {FormData} - * - * @returns {boolean} return true to visit the each prop of the value recursively - */ - function defaultVisitor(value, key, path) { - let arr = value; - - if (value && !path && typeof value === 'object') { - if (utils$1.endsWith(key, '{}')) { - // eslint-disable-next-line no-param-reassign - key = metaTokens ? key : key.slice(0, -2); - // eslint-disable-next-line no-param-reassign - value = JSON.stringify(value); - } else if ( - (utils$1.isArray(value) && isFlatArray(value)) || - ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)) - )) { - // eslint-disable-next-line no-param-reassign - key = removeBrackets(key); - - arr.forEach(function each(el, index) { - !(utils$1.isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), - convertValue(el) - ); - }); - return false; - } - } - - if (isVisitable(value)) { - return true; - } - - formData.append(renderKey(path, key, dots), convertValue(value)); - - return false; - } - - const stack = []; - - const exposedHelpers = Object.assign(predicates, { - defaultVisitor, - convertValue, - isVisitable - }); - - function build(value, path) { - if (utils$1.isUndefined(value)) return; - - if (stack.indexOf(value) !== -1) { - throw Error('Circular reference detected in ' + path.join('.')); - } - - stack.push(value); - - utils$1.forEach(value, function each(el, key) { - const result = !(utils$1.isUndefined(el) || el === null) && visitor.call( - formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers - ); - - if (result === true) { - build(el, path ? path.concat(key) : [key]); - } - }); - - stack.pop(); - } - - if (!utils$1.isObject(obj)) { - throw new TypeError('data must be an object'); - } - - build(obj); - - return formData; -} - -/** - * It encodes a string by replacing all characters that are not in the unreserved set with - * their percent-encoded equivalents - * - * @param {string} str - The string to encode. - * - * @returns {string} The encoded string. - */ -function encode$1(str) { - const charMap = { - '!': '%21', - "'": '%27', - '(': '%28', - ')': '%29', - '~': '%7E', - '%20': '+', - '%00': '\x00' - }; - return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { - return charMap[match]; - }); -} - -/** - * It takes a params object and converts it to a FormData object - * - * @param {Object} params - The parameters to be converted to a FormData object. - * @param {Object} options - The options object passed to the Axios constructor. - * - * @returns {void} - */ -function AxiosURLSearchParams(params, options) { - this._pairs = []; - - params && toFormData(params, this, options); -} - -const prototype = AxiosURLSearchParams.prototype; - -prototype.append = function append(name, value) { - this._pairs.push([name, value]); -}; - -prototype.toString = function toString(encoder) { - const _encode = encoder ? function(value) { - return encoder.call(this, value, encode$1); - } : encode$1; - - return this._pairs.map(function each(pair) { - return _encode(pair[0]) + '=' + _encode(pair[1]); - }, '').join('&'); -}; - -/** - * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their - * URI encoded counterparts - * - * @param {string} val The value to be encoded. - * - * @returns {string} The encoded value. - */ -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @param {?(object|Function)} options - * - * @returns {string} The formatted url - */ -function buildURL(url, params, options) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - const _encode = options && options.encode || encode; - - if (utils$1.isFunction(options)) { - options = { - serialize: options - }; - } - - const serializeFn = options && options.serialize; - - let serializedParams; - - if (serializeFn) { - serializedParams = serializeFn(params, options); - } else { - serializedParams = utils$1.isURLSearchParams(params) ? - params.toString() : - new AxiosURLSearchParams(params, options).toString(_encode); - } - - if (serializedParams) { - const hashmarkIndex = url.indexOf("#"); - - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -} - -class InterceptorManager { - constructor() { - this.handlers = []; - } - - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ - use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled, - rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; - } - - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - * - * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise - */ - eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - } - - /** - * Clear all interceptors from the stack - * - * @returns {void} - */ - clear() { - if (this.handlers) { - this.handlers = []; - } - } - - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - * - * @returns {void} - */ - forEach(fn) { - utils$1.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - } -} - -var InterceptorManager$1 = InterceptorManager; - -var transitionalDefaults = { - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false -}; - -var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; - -var FormData$1 = typeof FormData !== 'undefined' ? FormData : null; - -var Blob$1 = typeof Blob !== 'undefined' ? Blob : null; - -var platform$1 = { - isBrowser: true, - classes: { - URLSearchParams: URLSearchParams$1, - FormData: FormData$1, - Blob: Blob$1 - }, - protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] -}; - -const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; - -const _navigator = typeof navigator === 'object' && navigator || undefined; - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - * - * @returns {boolean} - */ -const hasStandardBrowserEnv = hasBrowserEnv && - (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); - -/** - * Determine if we're running in a standard browser webWorker environment - * - * Although the `isStandardBrowserEnv` method indicates that - * `allows axios to run in a web worker`, the WebWorker will still be - * filtered out due to its judgment standard - * `typeof window !== 'undefined' && typeof document !== 'undefined'`. - * This leads to a problem when axios post `FormData` in webWorker - */ -const hasStandardBrowserWebWorkerEnv = (() => { - return ( - typeof WorkerGlobalScope !== 'undefined' && - // eslint-disable-next-line no-undef - self instanceof WorkerGlobalScope && - typeof self.importScripts === 'function' - ); -})(); - -const origin = hasBrowserEnv && window.location.href || 'http://localhost'; - -var utils = /*#__PURE__*/Object.freeze({ - __proto__: null, - hasBrowserEnv: hasBrowserEnv, - hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, - hasStandardBrowserEnv: hasStandardBrowserEnv, - navigator: _navigator, - origin: origin -}); - -var platform = { - ...utils, - ...platform$1 -}; - -function toURLEncodedForm(data, options) { - return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { - if (platform.isNode && utils$1.isBuffer(value)) { - this.append(key, value.toString('base64')); - return false; - } - - return helpers.defaultVisitor.apply(this, arguments); - } - }, options)); -} - -/** - * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] - * - * @param {string} name - The name of the property to get. - * - * @returns An array of strings. - */ -function parsePropPath(name) { - // foo[x][y][z] - // foo.x.y.z - // foo-x-y-z - // foo x y z - return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => { - return match[0] === '[]' ? '' : match[1] || match[0]; - }); -} - -/** - * Convert an array to an object. - * - * @param {Array} arr - The array to convert to an object. - * - * @returns An object with the same keys and values as the array. - */ -function arrayToObject(arr) { - const obj = {}; - const keys = Object.keys(arr); - let i; - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - obj[key] = arr[key]; - } - return obj; -} - -/** - * It takes a FormData object and returns a JavaScript object - * - * @param {string} formData The FormData object to convert to JSON. - * - * @returns {Object | null} The converted object. - */ -function formDataToJSON(formData) { - function buildPath(path, value, target, index) { - let name = path[index++]; - - if (name === '__proto__') return true; - - const isNumericKey = Number.isFinite(+name); - const isLast = index >= path.length; - name = !name && utils$1.isArray(target) ? target.length : name; - - if (isLast) { - if (utils$1.hasOwnProp(target, name)) { - target[name] = [target[name], value]; - } else { - target[name] = value; - } - - return !isNumericKey; - } - - if (!target[name] || !utils$1.isObject(target[name])) { - target[name] = []; - } - - const result = buildPath(path, value, target[name], index); - - if (result && utils$1.isArray(target[name])) { - target[name] = arrayToObject(target[name]); - } - - return !isNumericKey; - } - - if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) { - const obj = {}; - - utils$1.forEachEntry(formData, (name, value) => { - buildPath(parsePropPath(name), value, obj, 0); - }); - - return obj; - } - - return null; -} - -/** - * It takes a string, tries to parse it, and if it fails, it returns the stringified version - * of the input - * - * @param {any} rawValue - The value to be stringified. - * @param {Function} parser - A function that parses a string into a JavaScript object. - * @param {Function} encoder - A function that takes a value and returns a string. - * - * @returns {string} A stringified version of the rawValue. - */ -function stringifySafely(rawValue, parser, encoder) { - if (utils$1.isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return utils$1.trim(rawValue); - } catch (e) { - if (e.name !== 'SyntaxError') { - throw e; - } - } - } - - return (encoder || JSON.stringify)(rawValue); -} - -const defaults = { - - transitional: transitionalDefaults, - - adapter: ['xhr', 'http', 'fetch'], - - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ''; - const hasJSONContentType = contentType.indexOf('application/json') > -1; - const isObjectPayload = utils$1.isObject(data); - - if (isObjectPayload && utils$1.isHTMLForm(data)) { - data = new FormData(data); - } - - const isFormData = utils$1.isFormData(data); - - if (isFormData) { - return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; - } - - if (utils$1.isArrayBuffer(data) || - utils$1.isBuffer(data) || - utils$1.isStream(data) || - utils$1.isFile(data) || - utils$1.isBlob(data) || - utils$1.isReadableStream(data) - ) { - return data; - } - if (utils$1.isArrayBufferView(data)) { - return data.buffer; - } - if (utils$1.isURLSearchParams(data)) { - headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); - return data.toString(); - } - - let isFileList; - - if (isObjectPayload) { - if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { - return toURLEncodedForm(data, this.formSerializer).toString(); - } - - if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { - const _FormData = this.env && this.env.FormData; - - return toFormData( - isFileList ? {'files[]': data} : data, - _FormData && new _FormData(), - this.formSerializer - ); - } - } - - if (isObjectPayload || hasJSONContentType ) { - headers.setContentType('application/json', false); - return stringifySafely(data); - } - - return data; - }], - - transformResponse: [function transformResponse(data) { - const transitional = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional && transitional.forcedJSONParsing; - const JSONRequested = this.responseType === 'json'; - - if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { - return data; - } - - if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { - const silentJSONParsing = transitional && transitional.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; - - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response); - } - throw e; - } - } - } - - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - env: { - FormData: platform.classes.FormData, - Blob: platform.classes.Blob - }, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - - headers: { - common: { - 'Accept': 'application/json, text/plain, */*', - 'Content-Type': undefined - } - } -}; - -utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { - defaults.headers[method] = {}; -}); - -var defaults$1 = defaults; - -// RawAxiosHeaders whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -const ignoreDuplicateOf = utils$1.toObjectSet([ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]); - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} rawHeaders Headers needing to be parsed - * - * @returns {Object} Headers parsed into an object - */ -var parseHeaders = rawHeaders => { - const parsed = {}; - let key; - let val; - let i; - - rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { - i = line.indexOf(':'); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); - - if (!key || (parsed[key] && ignoreDuplicateOf[key])) { - return; - } - - if (key === 'set-cookie') { - if (parsed[key]) { - parsed[key].push(val); - } else { - parsed[key] = [val]; - } - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - }); - - return parsed; -}; - -const $internals = Symbol('internals'); - -function normalizeHeader(header) { - return header && String(header).trim().toLowerCase(); -} - -function normalizeValue(value) { - if (value === false || value == null) { - return value; - } - - return utils$1.isArray(value) ? value.map(normalizeValue) : String(value); -} - -function parseTokens(str) { - const tokens = Object.create(null); - const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let match; - - while ((match = tokensRE.exec(str))) { - tokens[match[1]] = match[2]; - } - - return tokens; -} - -const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); - -function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { - if (utils$1.isFunction(filter)) { - return filter.call(this, value, header); - } - - if (isHeaderNameFilter) { - value = header; - } - - if (!utils$1.isString(value)) return; - - if (utils$1.isString(filter)) { - return value.indexOf(filter) !== -1; - } - - if (utils$1.isRegExp(filter)) { - return filter.test(value); - } -} - -function formatHeader(header) { - return header.trim() - .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { - return char.toUpperCase() + str; - }); -} - -function buildAccessors(obj, header) { - const accessorName = utils$1.toCamelCase(' ' + header); - - ['get', 'set', 'has'].forEach(methodName => { - Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { - return this[methodName].call(this, header, arg1, arg2, arg3); - }, - configurable: true - }); - }); -} - -class AxiosHeaders { - constructor(headers) { - headers && this.set(headers); - } - - set(header, valueOrRewrite, rewrite) { - const self = this; - - function setHeader(_value, _header, _rewrite) { - const lHeader = normalizeHeader(_header); - - if (!lHeader) { - throw new Error('header name must be a non-empty string'); - } - - const key = utils$1.findKey(self, lHeader); - - if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { - self[key || _header] = normalizeValue(_value); - } - } - - const setHeaders = (headers, _rewrite) => - utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - - if (utils$1.isPlainObject(header) || header instanceof this.constructor) { - setHeaders(header, valueOrRewrite); - } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { - setHeaders(parseHeaders(header), valueOrRewrite); - } else if (utils$1.isHeaders(header)) { - for (const [key, value] of header.entries()) { - setHeader(value, key, rewrite); - } - } else { - header != null && setHeader(valueOrRewrite, header, rewrite); - } - - return this; - } - - get(header, parser) { - header = normalizeHeader(header); - - if (header) { - const key = utils$1.findKey(this, header); - - if (key) { - const value = this[key]; - - if (!parser) { - return value; - } - - if (parser === true) { - return parseTokens(value); - } - - if (utils$1.isFunction(parser)) { - return parser.call(this, value, key); - } - - if (utils$1.isRegExp(parser)) { - return parser.exec(value); - } - - throw new TypeError('parser must be boolean|regexp|function'); - } - } - } - - has(header, matcher) { - header = normalizeHeader(header); - - if (header) { - const key = utils$1.findKey(this, header); - - return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); - } - - return false; - } - - delete(header, matcher) { - const self = this; - let deleted = false; - - function deleteHeader(_header) { - _header = normalizeHeader(_header); - - if (_header) { - const key = utils$1.findKey(self, _header); - - if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { - delete self[key]; - - deleted = true; - } - } - } - - if (utils$1.isArray(header)) { - header.forEach(deleteHeader); - } else { - deleteHeader(header); - } - - return deleted; - } - - clear(matcher) { - const keys = Object.keys(this); - let i = keys.length; - let deleted = false; - - while (i--) { - const key = keys[i]; - if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { - delete this[key]; - deleted = true; - } - } - - return deleted; - } - - normalize(format) { - const self = this; - const headers = {}; - - utils$1.forEach(this, (value, header) => { - const key = utils$1.findKey(headers, header); - - if (key) { - self[key] = normalizeValue(value); - delete self[header]; - return; - } - - const normalized = format ? formatHeader(header) : String(header).trim(); - - if (normalized !== header) { - delete self[header]; - } - - self[normalized] = normalizeValue(value); - - headers[normalized] = true; - }); - - return this; - } - - concat(...targets) { - return this.constructor.concat(this, ...targets); - } - - toJSON(asStrings) { - const obj = Object.create(null); - - utils$1.forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); - }); - - return obj; - } - - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - - toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); - } - - get [Symbol.toStringTag]() { - return 'AxiosHeaders'; - } - - static from(thing) { - return thing instanceof this ? thing : new this(thing); - } - - static concat(first, ...targets) { - const computed = new this(first); - - targets.forEach((target) => computed.set(target)); - - return computed; - } - - static accessor(header) { - const internals = this[$internals] = (this[$internals] = { - accessors: {} - }); - - const accessors = internals.accessors; - const prototype = this.prototype; - - function defineAccessor(_header) { - const lHeader = normalizeHeader(_header); - - if (!accessors[lHeader]) { - buildAccessors(prototype, _header); - accessors[lHeader] = true; - } - } - - utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); - - return this; - } -} - -AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); - -// reserved names hotfix -utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { - let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` - return { - get: () => value, - set(headerValue) { - this[mapped] = headerValue; - } - } -}); - -utils$1.freezeMethods(AxiosHeaders); - -var AxiosHeaders$1 = AxiosHeaders; - -/** - * Transform the data for a request or a response - * - * @param {Array|Function} fns A single function or Array of functions - * @param {?Object} response The response object - * - * @returns {*} The resulting transformed data - */ -function transformData(fns, response) { - const config = this || defaults$1; - const context = response || config; - const headers = AxiosHeaders$1.from(context.headers); - let data = context.data; - - utils$1.forEach(fns, function transform(fn) { - data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); - }); - - headers.normalize(); - - return data; -} - -function isCancel(value) { - return !!(value && value.__CANCEL__); -} - -/** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @param {string=} message The message. - * @param {Object=} config The config. - * @param {Object=} request The request. - * - * @returns {CanceledError} The created error. - */ -function CanceledError(message, config, request) { - // eslint-disable-next-line no-eq-null,eqeqeq - AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request); - this.name = 'CanceledError'; -} - -utils$1.inherits(CanceledError, AxiosError, { - __CANCEL__: true -}); - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - * - * @returns {object} The response. - */ -function settle(resolve, reject, response) { - const validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(new AxiosError( - 'Request failed with status code ' + response.status, - [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - )); - } -} - -function parseProtocol(url) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; -} - -/** - * Calculate data maxRate - * @param {Number} [samplesCount= 10] - * @param {Number} [min= 1000] - * @returns {Function} - */ -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - - min = min !== undefined ? min : 1000; - - return function push(chunkLength) { - const now = Date.now(); - - const startedAt = timestamps[tail]; - - if (!firstSampleTS) { - firstSampleTS = now; - } - - bytes[head] = chunkLength; - timestamps[head] = now; - - let i = tail; - let bytesCount = 0; - - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - - head = (head + 1) % samplesCount; - - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - - if (now - firstSampleTS < min) { - return; - } - - const passed = startedAt && now - startedAt; - - return passed ? Math.round(bytesCount * 1000 / passed) : undefined; - }; -} - -/** - * Throttle decorator - * @param {Function} fn - * @param {Number} freq - * @return {Function} - */ -function throttle(fn, freq) { - let timestamp = 0; - let threshold = 1000 / freq; - let lastArgs; - let timer; - - const invoke = (args, now = Date.now()) => { - timestamp = now; - lastArgs = null; - if (timer) { - clearTimeout(timer); - timer = null; - } - fn.apply(null, args); - }; - - const throttled = (...args) => { - const now = Date.now(); - const passed = now - timestamp; - if ( passed >= threshold) { - invoke(args, now); - } else { - lastArgs = args; - if (!timer) { - timer = setTimeout(() => { - timer = null; - invoke(lastArgs); - }, threshold - passed); - } - } - }; - - const flush = () => lastArgs && invoke(lastArgs); - - return [throttled, flush]; -} - -const progressEventReducer = (listener, isDownloadStream, freq = 3) => { - let bytesNotified = 0; - const _speedometer = speedometer(50, 250); - - return throttle(e => { - const loaded = e.loaded; - const total = e.lengthComputable ? e.total : undefined; - const progressBytes = loaded - bytesNotified; - const rate = _speedometer(progressBytes); - const inRange = loaded <= total; - - bytesNotified = loaded; - - const data = { - loaded, - total, - progress: total ? (loaded / total) : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && total && inRange ? (total - loaded) / rate : undefined, - event: e, - lengthComputable: total != null, - [isDownloadStream ? 'download' : 'upload']: true - }; - - listener(data); - }, freq); -}; - -const progressEventDecorator = (total, throttled) => { - const lengthComputable = total != null; - - return [(loaded) => throttled[0]({ - lengthComputable, - total, - loaded - }), throttled[1]]; -}; - -const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args)); - -var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => { - url = new URL(url, platform.origin); - - return ( - origin.protocol === url.protocol && - origin.host === url.host && - (isMSIE || origin.port === url.port) - ); -})( - new URL(platform.origin), - platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent) -) : () => true; - -var cookies = platform.hasStandardBrowserEnv ? - - // Standard browser envs support document.cookie - { - write(name, value, expires, path, domain, secure) { - const cookie = [name + '=' + encodeURIComponent(value)]; - - utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); - - utils$1.isString(path) && cookie.push('path=' + path); - - utils$1.isString(domain) && cookie.push('domain=' + domain); - - secure === true && cookie.push('secure'); - - document.cookie = cookie.join('; '); - }, - - read(name) { - const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove(name) { - this.write(name, '', Date.now() - 86400000); - } - } - - : - - // Non-standard browser env (web workers, react-native) lack needed support. - { - write() {}, - read() { - return null; - }, - remove() {} - }; - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); -} - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * - * @returns {string} The combined URL - */ -function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -} - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * - * @returns {string} The combined full path - */ -function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { - let isRelativeUrl = !isAbsoluteURL(requestedURL); - if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; -} - -const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing; - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * - * @returns {Object} New object resulting from merging config2 to config1 - */ -function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - const config = {}; - - function getMergedValue(target, source, prop, caseless) { - if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { - return utils$1.merge.call({caseless}, target, source); - } else if (utils$1.isPlainObject(source)) { - return utils$1.merge({}, source); - } else if (utils$1.isArray(source)) { - return source.slice(); - } - return source; - } - - // eslint-disable-next-line consistent-return - function mergeDeepProperties(a, b, prop , caseless) { - if (!utils$1.isUndefined(b)) { - return getMergedValue(a, b, prop , caseless); - } else if (!utils$1.isUndefined(a)) { - return getMergedValue(undefined, a, prop , caseless); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(a, b) { - if (!utils$1.isUndefined(b)) { - return getMergedValue(undefined, b); - } - } - - // eslint-disable-next-line consistent-return - function defaultToConfig2(a, b) { - if (!utils$1.isUndefined(b)) { - return getMergedValue(undefined, b); - } else if (!utils$1.isUndefined(a)) { - return getMergedValue(undefined, a); - } - } - - // eslint-disable-next-line consistent-return - function mergeDirectKeys(a, b, prop) { - if (prop in config2) { - return getMergedValue(a, b); - } else if (prop in config1) { - return getMergedValue(undefined, a); - } - } - - const mergeMap = { - url: valueFromConfig2, - method: valueFromConfig2, - data: valueFromConfig2, - baseURL: defaultToConfig2, - transformRequest: defaultToConfig2, - transformResponse: defaultToConfig2, - paramsSerializer: defaultToConfig2, - timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, - withCredentials: defaultToConfig2, - withXSRFToken: defaultToConfig2, - adapter: defaultToConfig2, - responseType: defaultToConfig2, - xsrfCookieName: defaultToConfig2, - xsrfHeaderName: defaultToConfig2, - onUploadProgress: defaultToConfig2, - onDownloadProgress: defaultToConfig2, - decompress: defaultToConfig2, - maxContentLength: defaultToConfig2, - maxBodyLength: defaultToConfig2, - beforeRedirect: defaultToConfig2, - transport: defaultToConfig2, - httpAgent: defaultToConfig2, - httpsAgent: defaultToConfig2, - cancelToken: defaultToConfig2, - socketPath: defaultToConfig2, - responseEncoding: defaultToConfig2, - validateStatus: mergeDirectKeys, - headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true) - }; - - utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { - const merge = mergeMap[prop] || mergeDeepProperties; - const configValue = merge(config1[prop], config2[prop], prop); - (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); - }); - - return config; -} - -var resolveConfig = (config) => { - const newConfig = mergeConfig({}, config); - - let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; - - newConfig.headers = headers = AxiosHeaders$1.from(headers); - - newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); - - // HTTP basic authentication - if (auth) { - headers.set('Authorization', 'Basic ' + - btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) - ); - } - - let contentType; - - if (utils$1.isFormData(data)) { - if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) { - headers.setContentType(undefined); // Let the browser set it - } else if ((contentType = headers.getContentType()) !== false) { - // fix semicolon duplication issue for ReactNative FormData implementation - const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; - headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); - } - } - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - - if (platform.hasStandardBrowserEnv) { - withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); - - if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) { - // Add xsrf header - const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName); - - if (xsrfValue) { - headers.set(xsrfHeaderName, xsrfValue); - } - } - } - - return newConfig; -}; - -const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; - -var xhrAdapter = isXHRAdapterSupported && function (config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - const _config = resolveConfig(config); - let requestData = _config.data; - const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize(); - let {responseType, onUploadProgress, onDownloadProgress} = _config; - let onCanceled; - let uploadThrottled, downloadThrottled; - let flushUpload, flushDownload; - - function done() { - flushUpload && flushUpload(); // flush events - flushDownload && flushDownload(); // flush events - - _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); - - _config.signal && _config.signal.removeEventListener('abort', onCanceled); - } - - let request = new XMLHttpRequest(); - - request.open(_config.method.toUpperCase(), _config.url, true); - - // Set the request timeout in MS - request.timeout = _config.timeout; - - function onloadend() { - if (!request) { - return; - } - // Prepare the response - const responseHeaders = AxiosHeaders$1.from( - 'getAllResponseHeaders' in request && request.getAllResponseHeaders() - ); - const responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - const response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config, - request - }; - - settle(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); - - // Clean up request - request = null; - } - - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = _config.transitional || transitionalDefaults; - if (_config.timeoutErrorMessage) { - timeoutErrorMessage = _config.timeoutErrorMessage; - } - reject(new AxiosError( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, - config, - request)); - - // Clean up request - request = null; - }; - - // Remove Content-Type if data is undefined - requestData === undefined && requestHeaders.setContentType(null); - - // Add headers to the request - if ('setRequestHeader' in request) { - utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { - request.setRequestHeader(key, val); - }); - } - - // Add withCredentials to request if needed - if (!utils$1.isUndefined(_config.withCredentials)) { - request.withCredentials = !!_config.withCredentials; - } - - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = _config.responseType; - } - - // Handle progress if needed - if (onDownloadProgress) { - ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true)); - request.addEventListener('progress', downloadThrottled); - } - - // Not all browsers support upload events - if (onUploadProgress && request.upload) { - ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress)); - - request.upload.addEventListener('progress', uploadThrottled); - - request.upload.addEventListener('loadend', flushUpload); - } - - if (_config.cancelToken || _config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = cancel => { - if (!request) { - return; - } - reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); - request.abort(); - request = null; - }; - - _config.cancelToken && _config.cancelToken.subscribe(onCanceled); - if (_config.signal) { - _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); - } - } - - const protocol = parseProtocol(_config.url); - - if (protocol && platform.protocols.indexOf(protocol) === -1) { - reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); - return; - } - - - // Send the request - request.send(requestData || null); - }); -}; - -const composeSignals = (signals, timeout) => { - const {length} = (signals = signals ? signals.filter(Boolean) : []); - - if (timeout || length) { - let controller = new AbortController(); - - let aborted; - - const onabort = function (reason) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = reason instanceof Error ? reason : this.reason; - controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err)); - } - }; - - let timer = timeout && setTimeout(() => { - timer = null; - onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT)); - }, timeout); - - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); - timer = null; - signals.forEach(signal => { - signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); - }); - signals = null; - } - }; - - signals.forEach((signal) => signal.addEventListener('abort', onabort)); - - const {signal} = controller; - - signal.unsubscribe = () => utils$1.asap(unsubscribe); - - return signal; - } -}; - -var composeSignals$1 = composeSignals; - -const streamChunk = function* (chunk, chunkSize) { - let len = chunk.byteLength; - - if (!chunkSize || len < chunkSize) { - yield chunk; - return; - } - - let pos = 0; - let end; - - while (pos < len) { - end = pos + chunkSize; - yield chunk.slice(pos, end); - pos = end; - } -}; - -const readBytes = async function* (iterable, chunkSize) { - for await (const chunk of readStream(iterable)) { - yield* streamChunk(chunk, chunkSize); - } -}; - -const readStream = async function* (stream) { - if (stream[Symbol.asyncIterator]) { - yield* stream; - return; - } - - const reader = stream.getReader(); - try { - for (;;) { - const {done, value} = await reader.read(); - if (done) { - break; - } - yield value; - } - } finally { - await reader.cancel(); - } -}; - -const trackStream = (stream, chunkSize, onProgress, onFinish) => { - const iterator = readBytes(stream, chunkSize); - - let bytes = 0; - let done; - let _onFinish = (e) => { - if (!done) { - done = true; - onFinish && onFinish(e); - } - }; - - return new ReadableStream({ - async pull(controller) { - try { - const {done, value} = await iterator.next(); - - if (done) { - _onFinish(); - controller.close(); - return; - } - - let len = value.byteLength; - if (onProgress) { - let loadedBytes = bytes += len; - onProgress(loadedBytes); - } - controller.enqueue(new Uint8Array(value)); - } catch (err) { - _onFinish(err); - throw err; - } - }, - cancel(reason) { - _onFinish(reason); - return iterator.return(); - } - }, { - highWaterMark: 2 - }) -}; - -const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; -const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; - -// used only inside the fetch adapter -const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? - ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : - async (str) => new Uint8Array(await new Response(str).arrayBuffer()) -); - -const test = (fn, ...args) => { - try { - return !!fn(...args); - } catch (e) { - return false - } -}; - -const supportsRequestStream = isReadableStreamSupported && test(() => { - let duplexAccessed = false; - - const hasContentType = new Request(platform.origin, { - body: new ReadableStream(), - method: 'POST', - get duplex() { - duplexAccessed = true; - return 'half'; - }, - }).headers.has('Content-Type'); - - return duplexAccessed && !hasContentType; -}); - -const DEFAULT_CHUNK_SIZE = 64 * 1024; - -const supportsResponseStream = isReadableStreamSupported && - test(() => utils$1.isReadableStream(new Response('').body)); - - -const resolvers = { - stream: supportsResponseStream && ((res) => res.body) -}; - -isFetchSupported && (((res) => { - ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { - !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() : - (_, config) => { - throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config); - }); - }); -})(new Response)); - -const getBodyLength = async (body) => { - if (body == null) { - return 0; - } - - if(utils$1.isBlob(body)) { - return body.size; - } - - if(utils$1.isSpecCompliantForm(body)) { - const _request = new Request(platform.origin, { - method: 'POST', - body, - }); - return (await _request.arrayBuffer()).byteLength; - } - - if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) { - return body.byteLength; - } - - if(utils$1.isURLSearchParams(body)) { - body = body + ''; - } - - if(utils$1.isString(body)) { - return (await encodeText(body)).byteLength; - } -}; - -const resolveBodyLength = async (headers, body) => { - const length = utils$1.toFiniteNumber(headers.getContentLength()); - - return length == null ? getBodyLength(body) : length; -}; - -var fetchAdapter = isFetchSupported && (async (config) => { - let { - url, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = 'same-origin', - fetchOptions - } = resolveConfig(config); - - responseType = responseType ? (responseType + '').toLowerCase() : 'text'; - - let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout); - - let request; - - const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { - composedSignal.unsubscribe(); - }); - - let requestContentLength; - - try { - if ( - onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && - (requestContentLength = await resolveBodyLength(headers, data)) !== 0 - ) { - let _request = new Request(url, { - method: 'POST', - body: data, - duplex: "half" - }); - - let contentTypeHeader; - - if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { - headers.setContentType(contentTypeHeader); - } - - if (_request.body) { - const [onProgress, flush] = progressEventDecorator( - requestContentLength, - progressEventReducer(asyncDecorator(onUploadProgress)) - ); - - data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); - } - } - - if (!utils$1.isString(withCredentials)) { - withCredentials = withCredentials ? 'include' : 'omit'; - } - - // Cloudflare Workers throws when credentials are defined - // see https://github.com/cloudflare/workerd/issues/902 - const isCredentialsSupported = "credentials" in Request.prototype; - request = new Request(url, { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: headers.normalize().toJSON(), - body: data, - duplex: "half", - credentials: isCredentialsSupported ? withCredentials : undefined - }); - - let response = await fetch(request); - - const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); - - if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { - const options = {}; - - ['status', 'statusText', 'headers'].forEach(prop => { - options[prop] = response[prop]; - }); - - const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length')); - - const [onProgress, flush] = onDownloadProgress && progressEventDecorator( - responseContentLength, - progressEventReducer(asyncDecorator(onDownloadProgress), true) - ) || []; - - response = new Response( - trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { - flush && flush(); - unsubscribe && unsubscribe(); - }), - options - ); - } - - responseType = responseType || 'text'; - - let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config); - - !isStreamResponse && unsubscribe && unsubscribe(); - - return await new Promise((resolve, reject) => { - settle(resolve, reject, { - data: responseData, - headers: AxiosHeaders$1.from(response.headers), - status: response.status, - statusText: response.statusText, - config, - request - }); - }) - } catch (err) { - unsubscribe && unsubscribe(); - - if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) { - throw Object.assign( - new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), - { - cause: err.cause || err - } - ) - } - - throw AxiosError.from(err, err && err.code, config, request); - } -}); - -const knownAdapters = { - http: httpAdapter, - xhr: xhrAdapter, - fetch: fetchAdapter -}; - -utils$1.forEach(knownAdapters, (fn, value) => { - if (fn) { - try { - Object.defineProperty(fn, 'name', {value}); - } catch (e) { - // eslint-disable-next-line no-empty - } - Object.defineProperty(fn, 'adapterName', {value}); - } -}); - -const renderReason = (reason) => `- ${reason}`; - -const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false; - -var adapters = { - getAdapter: (adapters) => { - adapters = utils$1.isArray(adapters) ? adapters : [adapters]; - - const {length} = adapters; - let nameOrAdapter; - let adapter; - - const rejectedReasons = {}; - - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; - - adapter = nameOrAdapter; - - if (!isResolvedHandle(nameOrAdapter)) { - adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - - if (adapter === undefined) { - throw new AxiosError(`Unknown adapter '${id}'`); - } - } - - if (adapter) { - break; - } - - rejectedReasons[id || '#' + i] = adapter; - } - - if (!adapter) { - - const reasons = Object.entries(rejectedReasons) - .map(([id, state]) => `adapter ${id} ` + - (state === false ? 'is not supported by the environment' : 'is not available in the build') - ); - - let s = length ? - (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : - 'as no adapter specified'; - - throw new AxiosError( - `There is no suitable adapter to dispatch the request ` + s, - 'ERR_NOT_SUPPORT' - ); - } - - return adapter; - }, - adapters: knownAdapters -}; - -/** - * Throws a `CanceledError` if cancellation has been requested. - * - * @param {Object} config The config that is to be used for the request - * - * @returns {void} - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - - if (config.signal && config.signal.aborted) { - throw new CanceledError(null, config); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * - * @returns {Promise} The Promise to be fulfilled - */ -function dispatchRequest(config) { - throwIfCancellationRequested(config); - - config.headers = AxiosHeaders$1.from(config.headers); - - // Transform request data - config.data = transformData.call( - config, - config.transformRequest - ); - - if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { - config.headers.setContentType('application/x-www-form-urlencoded', false); - } - - const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter); - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = transformData.call( - config, - config.transformResponse, - response - ); - - response.headers = AxiosHeaders$1.from(response.headers); - - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData.call( - config, - config.transformResponse, - reason.response - ); - reason.response.headers = AxiosHeaders$1.from(reason.response.headers); - } - } - - return Promise.reject(reason); - }); -} - -const VERSION = "1.8.2"; - -const validators$1 = {}; - -// eslint-disable-next-line func-names -['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { - validators$1[type] = function validator(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; - }; -}); - -const deprecatedWarnings = {}; - -/** - * Transitional option validator - * - * @param {function|boolean?} validator - set to false if the transitional option has been removed - * @param {string?} version - deprecated version / removed since version - * @param {string?} message - some message with additional info - * - * @returns {function} - */ -validators$1.transitional = function transitional(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); - } - - // eslint-disable-next-line func-names - return (value, opt, opts) => { - if (validator === false) { - throw new AxiosError( - formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), - AxiosError.ERR_DEPRECATED - ); - } - - if (version && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - // eslint-disable-next-line no-console - console.warn( - formatMessage( - opt, - ' has been deprecated since v' + version + ' and will be removed in the near future' - ) - ); - } - - return validator ? validator(value, opt, opts) : true; - }; -}; - -validators$1.spelling = function spelling(correctSpelling) { - return (value, opt) => { - // eslint-disable-next-line no-console - console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); - return true; - } -}; - -/** - * Assert object's properties type - * - * @param {object} options - * @param {object} schema - * @param {boolean?} allowUnknown - * - * @returns {object} - */ - -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== 'object') { - throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); - } - const keys = Object.keys(options); - let i = keys.length; - while (i-- > 0) { - const opt = keys[i]; - const validator = schema[opt]; - if (validator) { - const value = options[opt]; - const result = value === undefined || validator(value, opt, options); - if (result !== true) { - throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); - } - continue; - } - if (allowUnknown !== true) { - throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); - } - } -} - -var validator = { - assertOptions, - validators: validators$1 -}; - -const validators = validator.validators; - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - * - * @return {Axios} A new instance of Axios - */ -class Axios { - constructor(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager$1(), - response: new InterceptorManager$1() - }; - } - - /** - * Dispatch a request - * - * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) - * @param {?Object} config - * - * @returns {Promise} The Promise to be fulfilled - */ - async request(configOrUrl, config) { - try { - return await this._request(configOrUrl, config); - } catch (err) { - if (err instanceof Error) { - let dummy = {}; - - Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error()); - - // slice off the Error: ... line - const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; - try { - if (!err.stack) { - err.stack = stack; - // match without the 2 top stack lines - } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { - err.stack += '\n' + stack; - } - } catch (e) { - // ignore the case where "stack" is an un-writable property - } - } - - throw err; - } - } - - _request(configOrUrl, config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof configOrUrl === 'string') { - config = config || {}; - config.url = configOrUrl; - } else { - config = configOrUrl || {}; - } - - config = mergeConfig(this.defaults, config); - - const {transitional, paramsSerializer, headers} = config; - - if (transitional !== undefined) { - validator.assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); - } - - if (paramsSerializer != null) { - if (utils$1.isFunction(paramsSerializer)) { - config.paramsSerializer = { - serialize: paramsSerializer - }; - } else { - validator.assertOptions(paramsSerializer, { - encode: validators.function, - serialize: validators.function - }, true); - } - } - - // Set config.allowAbsoluteUrls - if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) { - config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; - } else { - config.allowAbsoluteUrls = true; - } - - validator.assertOptions(config, { - baseUrl: validators.spelling('baseURL'), - withXsrfToken: validators.spelling('withXSRFToken') - }, true); - - // Set config.method - config.method = (config.method || this.defaults.method || 'get').toLowerCase(); - - // Flatten headers - let contextHeaders = headers && utils$1.merge( - headers.common, - headers[config.method] - ); - - headers && utils$1.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - (method) => { - delete headers[method]; - } - ); - - config.headers = AxiosHeaders$1.concat(contextHeaders, headers); - - // filter out skipped interceptors - const requestInterceptorChain = []; - let synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { - return; - } - - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - const responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - - let promise; - let i = 0; - let len; - - if (!synchronousRequestInterceptors) { - const chain = [dispatchRequest.bind(this), undefined]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); - len = chain.length; - - promise = Promise.resolve(config); - - while (i < len) { - promise = promise.then(chain[i++], chain[i++]); - } - - return promise; - } - - len = requestInterceptorChain.length; - - let newConfig = config; - - i = 0; - - while (i < len) { - const onFulfilled = requestInterceptorChain[i++]; - const onRejected = requestInterceptorChain[i++]; - try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected.call(this, error); - break; - } - } - - try { - promise = dispatchRequest.call(this, newConfig); - } catch (error) { - return Promise.reject(error); - } - - i = 0; - len = responseInterceptorChain.length; - - while (i < len) { - promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); - } - - return promise; - } - - getUri(config) { - config = mergeConfig(this.defaults, config); - const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); - return buildURL(fullPath, config.params, config.paramsSerializer); - } -} - -// Provide aliases for supported request methods -utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method, - url, - data: (config || {}).data - })); - }; -}); - -utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - - function generateHTTPMethod(isForm) { - return function httpMethod(url, data, config) { - return this.request(mergeConfig(config || {}, { - method, - headers: isForm ? { - 'Content-Type': 'multipart/form-data' - } : {}, - url, - data - })); - }; - } - - Axios.prototype[method] = generateHTTPMethod(); - - Axios.prototype[method + 'Form'] = generateHTTPMethod(true); -}); - -var Axios$1 = Axios; - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @param {Function} executor The executor function. - * - * @returns {CancelToken} - */ -class CancelToken { - constructor(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - let resolvePromise; - - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - const token = this; - - // eslint-disable-next-line func-names - this.promise.then(cancel => { - if (!token._listeners) return; - - let i = token._listeners.length; - - while (i-- > 0) { - token._listeners[i](cancel); - } - token._listeners = null; - }); - - // eslint-disable-next-line func-names - this.promise.then = onfulfilled => { - let _resolve; - // eslint-disable-next-line func-names - const promise = new Promise(resolve => { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - - return promise; - }; - - executor(function cancel(message, config, request) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new CanceledError(message, config, request); - resolvePromise(token.reason); - }); - } - - /** - * Throws a `CanceledError` if cancellation has been requested. - */ - throwIfRequested() { - if (this.reason) { - throw this.reason; - } - } - - /** - * Subscribe to the cancel signal - */ - - subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } - } - - /** - * Unsubscribe from the cancel signal - */ - - unsubscribe(listener) { - if (!this._listeners) { - return; - } - const index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } - } - - toAbortSignal() { - const controller = new AbortController(); - - const abort = (err) => { - controller.abort(err); - }; - - this.subscribe(abort); - - controller.signal.unsubscribe = () => this.unsubscribe(abort); - - return controller.signal; - } - - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - static source() { - let cancel; - const token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token, - cancel - }; - } -} - -var CancelToken$1 = CancelToken; - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * - * @returns {Function} - */ -function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -} - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -function isAxiosError(payload) { - return utils$1.isObject(payload) && (payload.isAxiosError === true); -} - -const HttpStatusCode = { - Continue: 100, - SwitchingProtocols: 101, - Processing: 102, - EarlyHints: 103, - Ok: 200, - Created: 201, - Accepted: 202, - NonAuthoritativeInformation: 203, - NoContent: 204, - ResetContent: 205, - PartialContent: 206, - MultiStatus: 207, - AlreadyReported: 208, - ImUsed: 226, - MultipleChoices: 300, - MovedPermanently: 301, - Found: 302, - SeeOther: 303, - NotModified: 304, - UseProxy: 305, - Unused: 306, - TemporaryRedirect: 307, - PermanentRedirect: 308, - BadRequest: 400, - Unauthorized: 401, - PaymentRequired: 402, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - NotAcceptable: 406, - ProxyAuthenticationRequired: 407, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - LengthRequired: 411, - PreconditionFailed: 412, - PayloadTooLarge: 413, - UriTooLong: 414, - UnsupportedMediaType: 415, - RangeNotSatisfiable: 416, - ExpectationFailed: 417, - ImATeapot: 418, - MisdirectedRequest: 421, - UnprocessableEntity: 422, - Locked: 423, - FailedDependency: 424, - TooEarly: 425, - UpgradeRequired: 426, - PreconditionRequired: 428, - TooManyRequests: 429, - RequestHeaderFieldsTooLarge: 431, - UnavailableForLegalReasons: 451, - InternalServerError: 500, - NotImplemented: 501, - BadGateway: 502, - ServiceUnavailable: 503, - GatewayTimeout: 504, - HttpVersionNotSupported: 505, - VariantAlsoNegotiates: 506, - InsufficientStorage: 507, - LoopDetected: 508, - NotExtended: 510, - NetworkAuthenticationRequired: 511, -}; - -Object.entries(HttpStatusCode).forEach(([key, value]) => { - HttpStatusCode[value] = key; -}); - -var HttpStatusCode$1 = HttpStatusCode; - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * - * @returns {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - const context = new Axios$1(defaultConfig); - const instance = bind(Axios$1.prototype.request, context); - - // Copy axios.prototype to instance - utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true}); - - // Copy context to instance - utils$1.extend(instance, context, null, {allOwnKeys: true}); - - // Factory for creating new instances - instance.create = function create(instanceConfig) { - return createInstance(mergeConfig(defaultConfig, instanceConfig)); - }; - - return instance; -} - -// Create the default instance to be exported -const axios = createInstance(defaults$1); - -// Expose Axios class to allow class inheritance -axios.Axios = Axios$1; - -// Expose Cancel & CancelToken -axios.CanceledError = CanceledError; -axios.CancelToken = CancelToken$1; -axios.isCancel = isCancel; -axios.VERSION = VERSION; -axios.toFormData = toFormData; - -// Expose AxiosError class -axios.AxiosError = AxiosError; - -// alias for CanceledError for backward compatibility -axios.Cancel = axios.CanceledError; - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; - -axios.spread = spread; - -// Expose isAxiosError -axios.isAxiosError = isAxiosError; - -// Expose mergeConfig -axios.mergeConfig = mergeConfig; - -axios.AxiosHeaders = AxiosHeaders$1; - -axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); - -axios.getAdapter = adapters.getAdapter; - -axios.HttpStatusCode = HttpStatusCode$1; - -axios.default = axios; - -module.exports = axios; -//# sourceMappingURL=axios.cjs.map - - -/***/ }), - -/***/ 6469: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(1837)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var NlicError = exports["default"] = /*#__PURE__*/function (_Error) { - function NlicError() { - var _this; - (0, _classCallCheck2.default)(this, NlicError); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - _this = _callSuper(this, NlicError, [].concat(args)); - _this.config = {}; - _this.response = {}; - _this.request = {}; - _this.code = ''; - _this.isNlicError = true; - _this.isAxiosError = true; - return _this; - } - (0, _inherits2.default)(NlicError, _Error); - return (0, _createClass2.default)(NlicError, [{ - key: "toJSON", - value: function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code - }; - } - }]); -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); - -/***/ }), - -/***/ 6798: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToPaymentMethod = _interopRequireDefault(__webpack_require__(2430)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var _default = exports["default"] = { - /** - * Gets payment method by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/payment-method-services#get-payment-method - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the payment method number - * @param number string - * - * return the payment method in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$get, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.PaymentMethod.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context.sent; - items = _yield$Service$get.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'PaymentMethod'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToPaymentMethod.default)(item)); - case 7: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Returns payment methods of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/payment-method-services#payment-methods-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of payment method entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - queryParams = {}; - if (!filter) { - _context2.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context2.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context2.next = 7; - return _Service.default.get(context, _Constants.default.PaymentMethod.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context2.sent; - data = _yield$Service$get2.data; - return _context2.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref2) { - var type = _ref2.type; - return type === 'PaymentMethod'; - }).map(function (v) { - return (0, _itemToPaymentMethod.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Updates payment method properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/payment-method-services#update-payment-method - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the payment method number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param paymentMethod NetLicensing.PaymentMethod - * - * return updated payment method in promise. - * @returns {Promise} - */ - update: function update(context, number, paymentMethod) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var path, _yield$Service$post, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - path = "".concat(_Constants.default.PaymentMethod.ENDPOINT_PATH, "/").concat(number); - _context3.next = 4; - return _Service.default.post(context, path, paymentMethod.asPropertiesMap()); - case 4: - _yield$Service$post = _context3.sent; - items = _yield$Service$post.data.items.item; - _items$filter3 = items.filter(function (_ref3) { - var type = _ref3.type; - return type === 'PaymentMethod'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context3.abrupt("return", (0, _itemToPaymentMethod.default)(item)); - case 8: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - } -}; - -/***/ }), - -/***/ 6899: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Country = _interopRequireDefault(__webpack_require__(7147)); -var _default = exports["default"] = function _default(item) { - return new _Country.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 7122: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var arrayLikeToArray = __webpack_require__(79); -function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; - } -} -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7131: -/***/ ((module) => { - -(function () { - "use strict"; - - function btoa(str) { - var buffer; - - if (str instanceof Buffer) { - buffer = str; - } else { - buffer = Buffer.from(str.toString(), 'binary'); - } - - return buffer.toString('base64'); - } - - module.exports = btoa; -}()); - - -/***/ }), - -/***/ 7147: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * Country entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * @property code - Unique code of country. - * - * @property name - Unique name of country - * - * @property vatPercent - Country vat. - * - * @property isEu - is country in EU. - */ -var Country = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Country(properties) { - (0, _classCallCheck2.default)(this, Country); - return _callSuper(this, Country, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - code: 'string', - name: 'string', - vatPercent: 'int', - isEu: 'boolean' - } - }]); - } - (0, _inherits2.default)(Country, _BaseEntity); - return (0, _createClass2.default)(Country, [{ - key: "setCode", - value: function setCode(code) { - return this.setProperty('code', code); - } - }, { - key: "getCode", - value: function getCode(def) { - return this.getProperty('code', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setVatPercent", - value: function setVatPercent(vat) { - return this.setProperty('vatPercent', vat); - } - }, { - key: "getVatPercent", - value: function getVatPercent(def) { - return this.getProperty('vatPercent', def); - } - }, { - key: "setIsEu", - value: function setIsEu(isEu) { - return this.setProperty('isEu', isEu); - } - }, { - key: "getIsEu", - value: function getIsEu(def) { - return this.getProperty('isEu', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 7211: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _ValidationResults = _interopRequireDefault(__webpack_require__(8506)); -var _itemToLicensee = _interopRequireDefault(__webpack_require__(4067)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Licensee Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/licensee-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new licensee object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#create-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent product to which the new licensee is to be added - * @param productNumber string - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param licensee NetLicensing.Licensee - * - * return the newly created licensee object in promise - * @returns {Promise} - */ - create: function create(context, productNumber, licensee) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _CheckUtils.default.paramNotEmpty(productNumber, _Constants.default.Product.PRODUCT_NUMBER); - licensee.setProperty(_Constants.default.Product.PRODUCT_NUMBER, productNumber); - _context.next = 4; - return _Service.default.post(context, _Constants.default.Licensee.ENDPOINT_PATH, licensee.asPropertiesMap()); - case 4: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Licensee'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToLicensee.default)(item)); - case 8: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets licensee by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#get-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the licensee number - * @param number string - * - * return the licensee in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Licensee.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Licensee'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToLicensee.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns all licensees of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#licensees-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of licensees (of all products) or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Licensee.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Licensee'; - }).map(function (v) { - return (0, _itemToLicensee.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates licensee properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#update-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * licensee number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param licensee NetLicensing.Licensee - * - * return updated licensee in promise. - * @returns {Promise} - */ - update: function update(context, number, licensee) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.Licensee.ENDPOINT_PATH, "/").concat(number), licensee.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'Licensee'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToLicensee.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes licensee.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#delete-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * licensee number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.Licensee.ENDPOINT_PATH, "/").concat(number), queryParams); - }, - /** - * Validates active licenses of the licensee. - * In the case of multiple product modules validation, - * required parameters indexes will be added automatically. - * See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#validate-licensee - * - * @param context NetLicensing.Context - * - * licensee number - * @param number string - * - * optional validation parameters. See ValidationParameters and licensing model documentation for - * details. - * @param validationParameters NetLicensing.ValidationParameters. - * - * @returns {ValidationResults} - */ - validate: function validate(context, number, validationParameters) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() { - var queryParams, pmIndex, parameters, has, _yield$Service$post3, _yield$Service$post3$, items, ttl, validationResults; - return _regenerator.default.wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - queryParams = {}; - if (validationParameters.getProductNumber()) { - queryParams.productNumber = validationParameters.getProductNumber(); - } - Object.keys(validationParameters.getLicenseeProperties()).forEach(function (key) { - queryParams[key] = validationParameters.getLicenseeProperty(key); - }); - if (validationParameters.isForOfflineUse()) { - queryParams.forOfflineUse = true; - } - if (validationParameters.getDryRun()) { - queryParams.dryRun = true; - } - pmIndex = 0; - parameters = validationParameters.getParameters(); - has = Object.prototype.hasOwnProperty; - Object.keys(parameters).forEach(function (productModuleName) { - queryParams["".concat(_Constants.default.ProductModule.PRODUCT_MODULE_NUMBER).concat(pmIndex)] = productModuleName; - if (!has.call(parameters, productModuleName)) return; - var parameter = parameters[productModuleName]; - Object.keys(parameter).forEach(function (key) { - if (has.call(parameter, key)) { - queryParams[key + pmIndex] = parameter[key]; - } - }); - pmIndex += 1; - }); - _context5.next = 12; - return _Service.default.post(context, "".concat(_Constants.default.Licensee.ENDPOINT_PATH, "/").concat(number, "/").concat(_Constants.default.Licensee.ENDPOINT_PATH_VALIDATE), queryParams); - case 12: - _yield$Service$post3 = _context5.sent; - _yield$Service$post3$ = _yield$Service$post3.data; - items = _yield$Service$post3$.items.item; - ttl = _yield$Service$post3$.ttl; - validationResults = new _ValidationResults.default(); - validationResults.setTtl(ttl); - items.filter(function (_ref5) { - var type = _ref5.type; - return type === 'ProductModuleValidation'; - }).forEach(function (v) { - var item = (0, _itemToObject.default)(v); - validationResults.setProductModuleValidation(item[_Constants.default.ProductModule.PRODUCT_MODULE_NUMBER], item); - }); - return _context5.abrupt("return", validationResults); - case 20: - case "end": - return _context5.stop(); - } - }, _callee5); - }))(); - }, - /** - * Transfer licenses between licensees. - * @see https://netlicensing.io/wiki/licensee-services#transfer-licenses - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the number of the licensee receiving licenses - * @param number string - * - * the number of the licensee delivering licenses - * @param sourceLicenseeNumber string - * - * @returns {Promise} - */ - transfer: function transfer(context, number, sourceLicenseeNumber) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _CheckUtils.default.paramNotEmpty(sourceLicenseeNumber, _Constants.default.Licensee.SOURCE_LICENSEE_NUMBER); - var queryParams = { - sourceLicenseeNumber: sourceLicenseeNumber - }; - return _Service.default.post(context, "".concat(_Constants.default.Licensee.ENDPOINT_PATH, "/").concat(number, "/").concat(_Constants.default.Licensee.ENDPOINT_PATH_TRANSFER), queryParams); - } -}; - -/***/ }), - -/***/ 7383: -/***/ ((module) => { - -function _classCallCheck(a, n) { - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); -} -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7394: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToLicense = _interopRequireDefault(__webpack_require__(5402)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the License Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/license-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new license object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#create-license - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent licensee to which the new license is to be added - * @param licenseeNumber string - * - * license template that the license is created from - * @param licenseTemplateNumber string - * - * For privileged logins specifies transaction for the license creation. For regular logins new - * transaction always created implicitly, and the operation will be in a separate transaction. - * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with - * auto-generated number. - * @param transactionNumber null|string - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param license NetLicensing.License - * - * return the newly created license object in promise - * @returns {Promise} - */ - create: function create(context, licenseeNumber, licenseTemplateNumber, transactionNumber, license) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _CheckUtils.default.paramNotEmpty(licenseeNumber, _Constants.default.Licensee.LICENSEE_NUMBER); - _CheckUtils.default.paramNotEmpty(licenseTemplateNumber, _Constants.default.LicenseTemplate.LICENSE_TEMPLATE_NUMBER); - license.setProperty(_Constants.default.Licensee.LICENSEE_NUMBER, licenseeNumber); - license.setProperty(_Constants.default.LicenseTemplate.LICENSE_TEMPLATE_NUMBER, licenseTemplateNumber); - if (transactionNumber) license.setProperty(_Constants.default.Transaction.TRANSACTION_NUMBER, transactionNumber); - _context.next = 7; - return _Service.default.post(context, _Constants.default.License.ENDPOINT_PATH, license.asPropertiesMap()); - case 7: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'License'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToLicense.default)(item)); - case 11: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets license by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#get-license - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the license number - * @param number string - * - * return the license in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.License.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'License'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToLicense.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns licenses of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#licenses-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * return array of licenses (of all products) or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.License.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'License'; - }).map(function (v) { - return (0, _itemToLicense.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates license properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#update-license - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license number - * @param number string - * - * transaction for the license update. Created implicitly if transactionNumber is null. In this case the - * operation will be in a separate transaction. - * @param transactionNumber string|null - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param license NetLicensing.License - * - * return updated license in promise. - * @returns {Promise} - */ - update: function update(context, number, transactionNumber, license) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - if (transactionNumber) license.setProperty(_Constants.default.Transaction.TRANSACTION_NUMBER, transactionNumber); - _context4.next = 4; - return _Service.default.post(context, "".concat(_Constants.default.License.ENDPOINT_PATH, "/").concat(number), license.asPropertiesMap()); - case 4: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'License'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToLicense.default)(item)); - case 8: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes license.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#delete-license - * - * When any license is deleted, corresponding transaction is created automatically. - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.License.ENDPOINT_PATH, "/").concat(number), queryParams); - } -}; - -/***/ }), - -/***/ 7550: -/***/ ((module) => { - -function _isNativeReflectConstruct() { - try { - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (t) {} - return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { - return !!t; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); -} -module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7736: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var _typeof = (__webpack_require__(3738)["default"]); -var toPrimitive = __webpack_require__(9045); -function toPropertyKey(t) { - var i = toPrimitive(t, "string"); - return "symbol" == _typeof(i) ? i : i + ""; -} -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7752: -/***/ ((module) => { - -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 8330: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"netlicensing-client","version":"1.2.38","description":"JavaScript Wrapper for Labs64 NetLicensing RESTful API","keywords":["labs64","netlicensing","licensing","licensing-as-a-service","license","license-management","software-license","client","restful","restful-api","javascript","wrapper","api","client"],"license":"Apache-2.0","author":"Labs64 GmbH","homepage":"https://netlicensing.io","repository":{"type":"git","url":"https://github.com/Labs64/NetLicensingClient-javascript"},"bugs":{"url":"https://github.com/Labs64/NetLicensingClient-javascript/issues"},"contributors":[{"name":"Ready Brown","email":"ready.brown@hotmail.de","url":"https://github.com/r-brown"},{"name":"Viacheslav Rudkovskiy","email":"viachaslau.rudkovski@labs64.de","url":"https://github.com/v-rudkovskiy"},{"name":"Andrei Yushkevich","email":"yushkevich@me.com","url":"https://github.com/yushkevich"}],"main":"dist/netlicensing-client.js","files":["dist"],"scripts":{"build":"node build/build.cjs","release":"npm run build && npm run test","dev":"webpack --progress --watch --config build/webpack.dev.conf.cjs","test":"karma start test/karma.conf.js --single-run","test-mocha":"webpack --config build/webpack.test.conf.cjs","test-for-travis":"karma start test/karma.conf.js --single-run --browsers Firefox","lint":"eslint --ext .js,.vue src test"},"dependencies":{"axios":"^1.8.2","btoa":"^1.2.1","es6-promise":"^4.2.8"},"devDependencies":{"@babel/core":"^7.26.9","@babel/plugin-proposal-class-properties":"^7.16.7","@babel/plugin-proposal-decorators":"^7.25.9","@babel/plugin-proposal-export-namespace-from":"^7.16.7","@babel/plugin-proposal-function-sent":"^7.25.9","@babel/plugin-proposal-json-strings":"^7.16.7","@babel/plugin-proposal-numeric-separator":"^7.16.7","@babel/plugin-proposal-throw-expressions":"^7.25.9","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-meta":"^7.10.4","@babel/plugin-transform-modules-commonjs":"^7.26.3","@babel/plugin-transform-runtime":"^7.26.9","@babel/preset-env":"^7.26.9","@babel/runtime":"^7.26.9","axios-mock-adapter":"^2.1.0","babel-eslint":"^10.1.0","babel-loader":"^9.2.1","chalk":"^4.1.2","eslint":"^8.2.0","eslint-config-airbnb-base":"^15.0.0","eslint-friendly-formatter":"^4.0.1","eslint-import-resolver-webpack":"^0.13.10","eslint-plugin-import":"^2.31.0","eslint-plugin-jasmine":"^4.2.2","eslint-webpack-plugin":"^4.2.0","faker":"^5.5.3","is-docker":"^2.2.1","jasmine":"^4.0.2","jasmine-core":"^4.0.1","karma":"^6.3.17","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^4.0.2","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"0.0.33","karma-webpack":"^5.0.0","lodash":"^4.17.21","ora":"^5.4.1","rimraf":"^3.0.2","terser-webpack-plugin":"^5.3.1","webpack":"^5.76.0","webpack-cli":"^5.1.1","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.0.0","npm":">= 8.0.0"},"browserslist":["> 1%","last 2 versions","not ie <= 10"]}'); - -/***/ }), - -/***/ 8452: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var _typeof = (__webpack_require__(3738)["default"]); -var assertThisInitialized = __webpack_require__(2475); -function _possibleConstructorReturn(t, e) { - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); - return assertThisInitialized(t); -} -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 8506: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _typeof2 = _interopRequireDefault(__webpack_require__(3738)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(3693)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var ValidationResults = exports["default"] = /*#__PURE__*/function () { - function ValidationResults() { - (0, _classCallCheck2.default)(this, ValidationResults); - this.validators = {}; - } - return (0, _createClass2.default)(ValidationResults, [{ - key: "getValidators", - value: function getValidators() { - return _objectSpread({}, this.validators); - } - }, { - key: "setProductModuleValidation", - value: function setProductModuleValidation(productModuleNumber, productModuleValidation) { - if (!_CheckUtils.default.isValid(productModuleNumber) || (0, _typeof2.default)(productModuleNumber) === 'object') { - throw new TypeError("Bad productModuleNumber:".concat(productModuleNumber)); - } - this.validators[productModuleNumber] = productModuleValidation; - return this; - } - }, { - key: "getProductModuleValidation", - value: function getProductModuleValidation(productModuleNumber) { - if (!_CheckUtils.default.isValid(productModuleNumber) || (0, _typeof2.default)(productModuleNumber) === 'object') { - throw new TypeError("Bad productModuleNumber:".concat(productModuleNumber)); - } - return this.validators[productModuleNumber]; - } - }, { - key: "setTtl", - value: function setTtl(ttl) { - if (!_CheckUtils.default.isValid(ttl) || (0, _typeof2.default)(ttl) === 'object') { - throw new TypeError("Bad ttl:".concat(ttl)); - } - this.ttl = new Date(String(ttl)); - return this; - } - }, { - key: "getTtl", - value: function getTtl() { - return this.ttl ? new Date(this.ttl) : undefined; - } - }, { - key: "toString", - value: function toString() { - var data = 'ValidationResult ['; - var validators = this.getValidators(); - var has = Object.prototype.hasOwnProperty; - Object.keys(validators).forEach(function (productModuleNumber) { - data += "ProductModule<".concat(productModuleNumber, ">"); - if (has.call(validators, productModuleNumber)) { - data += JSON.stringify(validators[productModuleNumber]); - } - }); - data += ']'; - return data; - } - }]); -}(); - -/***/ }), - -/***/ 8769: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -// Cast an attribute to a native JS type. -var _default = exports["default"] = function _default(key, value) { - switch (key.trim().toLowerCase()) { - case 'str': - case 'string': - return String(value); - case 'int': - case 'integer': - { - var n = parseInt(value, 10); - return Number.isNaN(n) ? value : n; - } - case 'float': - case 'double': - { - var _n = parseFloat(value); - return Number.isNaN(_n) ? value : _n; - } - case 'bool': - case 'boolean': - switch (value) { - case 'true': - case 'TRUE': - return true; - case 'false': - case 'FALSE': - return false; - default: - return Boolean(value); - } - case 'date': - return value === 'now' ? 'now' : new Date(String(value)); - default: - return value; - } -}; - -/***/ }), - -/***/ 8833: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _default = exports["default"] = { - FILTER_DELIMITER: ';', - FILTER_PAIR_DELIMITER: '=', - encode: function encode() { - var _this = this; - var filter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var query = []; - var has = Object.prototype.hasOwnProperty; - Object.keys(filter).forEach(function (key) { - if (has.call(filter, key)) { - query.push("".concat(key).concat(_this.FILTER_PAIR_DELIMITER).concat(filter[key])); - } - }); - return query.join(this.FILTER_DELIMITER); - }, - decode: function decode() { - var _this2 = this; - var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; - var filter = {}; - query.split(this.FILTER_DELIMITER).forEach(function (v) { - var _v$split = v.split(_this2.FILTER_PAIR_DELIMITER), - _v$split2 = (0, _slicedToArray2.default)(_v$split, 2), - name = _v$split2[0], - value = _v$split2[1]; - filter[name] = value; - }); - return filter; - } -}; - -/***/ }), - -/***/ 9045: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var _typeof = (__webpack_require__(3738)["default"]); -function toPrimitive(t, r) { - if ("object" != _typeof(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 9089: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(3693)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToBundle = _interopRequireDefault(__webpack_require__(3849)); -var _itemToLicense = _interopRequireDefault(__webpack_require__(5402)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Bundle Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/bundle-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new bundle with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#create-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param bundle NetLicensing.Bundle - * - * return the newly created bundle object in promise - * @returns {Promise} - */ - create: function create(context, bundle) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.post(context, _Constants.default.Bundle.ENDPOINT_PATH, bundle.asPropertiesMap()); - case 2: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Bundle'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToBundle.default)(item)); - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets bundle by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#get-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the bundle number - * @param number string - * - * return the bundle object in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Bundle.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Bundle'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToBundle.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns bundle of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#bundles-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of bundle entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Bundle.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Bundle'; - }).map(function (v) { - return (0, _itemToBundle.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates bundle properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#update-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * bundle number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param bundle NetLicensing.Bundle - * - * updated bundle in promise. - * @returns {Promise} - */ - update: function update(context, number, bundle) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.Bundle.ENDPOINT_PATH, "/").concat(number), bundle.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'Bundle'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToBundle.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes bundle.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#delete-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * bundle number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.Bundle.ENDPOINT_PATH, "/").concat(number), queryParams); - }, - /** - * Obtain bundle.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#obtain-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * bundle number - * @param number string - * - * licensee number - * @param licenseeNumber String - * - * return array of licenses - * @returns {Promise} - */ - obtain: function obtain(context, number, licenseeNumber) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() { - var _Constants$Bundle, ENDPOINT_PATH, ENDPOINT_OBTAIN_PATH, queryParams, _yield$Service$post3, items; - return _regenerator.default.wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _CheckUtils.default.paramNotEmpty(licenseeNumber, _Constants.default.Licensee.LICENSEE_NUMBER); - _Constants$Bundle = _Constants.default.Bundle, ENDPOINT_PATH = _Constants$Bundle.ENDPOINT_PATH, ENDPOINT_OBTAIN_PATH = _Constants$Bundle.ENDPOINT_OBTAIN_PATH; - queryParams = (0, _defineProperty2.default)({}, _Constants.default.Licensee.LICENSEE_NUMBER, licenseeNumber); - _context5.next = 6; - return _Service.default.post(context, "".concat(ENDPOINT_PATH, "/").concat(number, "/").concat(ENDPOINT_OBTAIN_PATH), queryParams); - case 6: - _yield$Service$post3 = _context5.sent; - items = _yield$Service$post3.data.items.item; - return _context5.abrupt("return", items.filter(function (_ref5) { - var type = _ref5.type; - return type === 'License'; - }).map(function (i) { - return (0, _itemToLicense.default)(i); - })); - case 9: - case "end": - return _context5.stop(); - } - }, _callee5); - }))(); - } -}; - -/***/ }), - -/***/ 9142: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * Product module entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign - * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first - * licensee for the product. - * @property string number - * - * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this - * product module. - * @property boolean active - * - * Product module name that is visible to the end customers in NetLicensing Shop. - * @property string name - * - * Licensing model applied to this product module. Defines what license templates can be - * configured for the product module and how licenses for this product module are processed during validation. - * @property string licensingModel - * - * Maximum checkout validity (days). Mandatory for 'Floating' licensing model. - * @property integer maxCheckoutValidity - * - * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model. - * @property integer yellowThreshold - * - * Remaining time volume for red level. Mandatory for 'Rental' licensing model. - * @property integer redThreshold - * - * License template. Mandatory for 'Try & Buy' licensing model. Supported types: "TIMEVOLUME", "FEATURE". - * @property string licenseTemplate - * - * Licensee secret mode for product.Supported types: "PREDEFINED", "CLIENT" - * @property boolean licenseeSecretMode - * - * @constructor - */ -var ProductModule = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function ProductModule(properties) { - (0, _classCallCheck2.default)(this, ProductModule); - return _callSuper(this, ProductModule, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - licensingModel: 'string', - maxCheckoutValidity: 'int', - yellowThreshold: 'int', - redThreshold: 'int', - licenseTemplate: 'string', - inUse: 'boolean', - licenseeSecretMode: 'string' - } - }]); - } - (0, _inherits2.default)(ProductModule, _BaseEntity); - return (0, _createClass2.default)(ProductModule, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setLicensingModel", - value: function setLicensingModel(licensingModel) { - return this.setProperty('licensingModel', licensingModel); - } - }, { - key: "getLicensingModel", - value: function getLicensingModel(def) { - return this.getProperty('licensingModel', def); - } - }, { - key: "setMaxCheckoutValidity", - value: function setMaxCheckoutValidity(maxCheckoutValidity) { - return this.setProperty('maxCheckoutValidity', maxCheckoutValidity); - } - }, { - key: "getMaxCheckoutValidity", - value: function getMaxCheckoutValidity(def) { - return this.getProperty('maxCheckoutValidity', def); - } - }, { - key: "setYellowThreshold", - value: function setYellowThreshold(yellowThreshold) { - return this.setProperty('yellowThreshold', yellowThreshold); - } - }, { - key: "getYellowThreshold", - value: function getYellowThreshold(def) { - return this.getProperty('yellowThreshold', def); - } - }, { - key: "setRedThreshold", - value: function setRedThreshold(redThreshold) { - return this.setProperty('redThreshold', redThreshold); - } - }, { - key: "getRedThreshold", - value: function getRedThreshold(def) { - return this.getProperty('redThreshold', def); - } - }, { - key: "setLicenseTemplate", - value: function setLicenseTemplate(licenseTemplate) { - return this.setProperty('licenseTemplate', licenseTemplate); - } - }, { - key: "getLicenseTemplate", - value: function getLicenseTemplate(def) { - return this.getProperty('licenseTemplate', def); - } - }, { - key: "getInUse", - value: function getInUse(def) { - return this.getProperty('inUse', def); - } - }, { - key: "setLicenseeSecretMode", - value: function setLicenseeSecretMode(licenseeSecretMode) { - return this.setProperty('licenseeSecretMode', licenseeSecretMode); - } - }, { - key: "getLicenseeSecretMode", - value: function getLicenseeSecretMode(def) { - return this.getProperty('licenseeSecretMode', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 9293: -/***/ ((module) => { - -function asyncGeneratorStep(n, t, e, r, o, a, c) { - try { - var i = n[a](c), - u = i.value; - } catch (n) { - return void e(n); - } - i.done ? t(u) : Promise.resolve(u).then(r, o); -} -function _asyncToGenerator(n) { - return function () { - var t = this, - e = arguments; - return new Promise(function (r, o) { - var a = n.apply(t, e); - function _next(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); - } - function _throw(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); - } - _next(void 0); - }); - }; -} -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 9511: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var setPrototypeOf = __webpack_require__(5636); -function _inherits(t, e) { - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); - t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - writable: !0, - configurable: !0 - } - }), Object.defineProperty(t, "prototype", { - writable: !1 - }), e && setPrototypeOf(t, e); -} -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 9552: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var getPrototypeOf = __webpack_require__(3072); -function _superPropBase(t, o) { - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); - return t; -} -module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 9633: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * NetLicensing Bundle entity. - * - * Properties visible via NetLicensing API: - * - * Unique number that identifies the bundle. Vendor can assign this number when creating a bundle or - * let NetLicensing generate one. - * @property string number - * - * If set to false, the bundle is disabled. - * @property boolean active - * - * Bundle name. - * @property string name - * - * Price for the bundle. If >0, it must always be accompanied by the currency specification. - * @property double price - * - * Specifies currency for the bundle price. Check data types to discover which currencies are - * supported. - * @property string currency - * - * Arbitrary additional user properties of string type may be associated with each bundle. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted. - * - * @constructor - */ -var Bundle = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Bundle(properties) { - (0, _classCallCheck2.default)(this, Bundle); - return _callSuper(this, Bundle, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - price: 'double', - currency: 'string' - } - }]); - } - (0, _inherits2.default)(Bundle, _BaseEntity); - return (0, _createClass2.default)(Bundle, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setDescription", - value: function setDescription(description) { - return this.setProperty('description', description); - } - }, { - key: "getDescription", - value: function getDescription(def) { - return this.getProperty('description', def); - } - }, { - key: "setPrice", - value: function setPrice(price) { - return this.setProperty('price', price); - } - }, { - key: "getPrice", - value: function getPrice(def) { - return this.getProperty('price', def); - } - }, { - key: "setCurrency", - value: function setCurrency(currency) { - return this.setProperty('currency', currency); - } - }, { - key: "getCurrency", - value: function getCurrency(def) { - return this.getProperty('currency', def); - } - }, { - key: "setLicenseTemplateNumbers", - value: function setLicenseTemplateNumbers(licenseTemplateNumbers) { - var numbers = Array.isArray(licenseTemplateNumbers) ? licenseTemplateNumbers.join(',') : licenseTemplateNumbers; - return this.setProperty('licenseTemplateNumbers', numbers); - } - }, { - key: "getLicenseTemplateNumbers", - value: function getLicenseTemplateNumbers(def) { - var numbers = this.getProperty('licenseTemplateNumbers', def); - return numbers ? numbers.split(',') : numbers; - } - }, { - key: "addLicenseTemplateNumber", - value: function addLicenseTemplateNumber(licenseTemplateNumber) { - var numbers = this.getLicenseTemplateNumbers([]); - numbers.push(licenseTemplateNumber); - return this.setLicenseTemplateNumbers(numbers); - } - }, { - key: "removeLicenseTemplateNumber", - value: function removeLicenseTemplateNumber(licenseTemplateNumber) { - var numbers = this.getLicenseTemplateNumbers([]); - numbers.splice(numbers.indexOf(licenseTemplateNumber), 1); - return this.setLicenseTemplateNumbers(numbers); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 9646: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var isNativeReflectConstruct = __webpack_require__(7550); -var setPrototypeOf = __webpack_require__(5636); -function _construct(t, e, r) { - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); - var o = [null]; - o.push.apply(o, e); - var p = new (t.bind.apply(t, o))(); - return r && setPrototypeOf(p, r.prototype), p; -} -module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 9899: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * Licensee entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this - * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for - * the licensee. - * @property string number - * - * Licensee name. - * @property string name - * - * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is - * disabled (tbd). - * @property boolean active - * - * Licensee Secret for licensee - * @property string licenseeSecret - * - * Mark licensee for transfer. - * @property boolean markedForTransfer - * - * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber - * - * @constructor - */ -var Licensee = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Licensee(properties) { - (0, _classCallCheck2.default)(this, Licensee); - return _callSuper(this, Licensee, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - licenseeSecret: 'string', - markedForTransfer: 'boolean', - inUse: 'boolean' - } - }]); - } - (0, _inherits2.default)(Licensee, _BaseEntity); - return (0, _createClass2.default)(Licensee, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setProductNumber", - value: function setProductNumber(productNumber) { - return this.setProperty('productNumber', productNumber); - } - }, { - key: "getProductNumber", - value: function getProductNumber(def) { - return this.getProperty('productNumber', def); - } - - /** - * @deprecated - */ - }, { - key: "setLicenseeSecret", - value: function setLicenseeSecret(licenseeSecret) { - return this.setProperty('licenseeSecret', licenseeSecret); - } - - /** - * @deprecated - */ - }, { - key: "getLicenseeSecret", - value: function getLicenseeSecret(def) { - return this.getProperty('licenseeSecret', def); - } - }, { - key: "setMarkedForTransfer", - value: function setMarkedForTransfer(markedForTransfer) { - return this.setProperty('markedForTransfer', markedForTransfer); - } - }, { - key: "getMarkedForTransfer", - value: function getMarkedForTransfer(def) { - return this.getProperty('markedForTransfer', def); - } - }, { - key: "getInUse", - value: function getInUse(def) { - return this.getProperty('inUse', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/global */ -/******/ (() => { -/******/ __webpack_require__.g = (function() { -/******/ if (typeof globalThis === 'object') return globalThis; -/******/ try { -/******/ return this || new Function('return this')(); -/******/ } catch (e) { -/******/ if (typeof window === 'object') return window; -/******/ } -/******/ })(); -/******/ })(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. -(() => { -"use strict"; -var exports = __webpack_exports__; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "BaseEntity", ({ - enumerable: true, - get: function get() { - return _BaseEntity.default; - } -})); -Object.defineProperty(exports, "Bundle", ({ - enumerable: true, - get: function get() { - return _Bundle.default; - } -})); -Object.defineProperty(exports, "BundleService", ({ - enumerable: true, - get: function get() { - return _BundleService.default; - } -})); -Object.defineProperty(exports, "CastsUtils", ({ - enumerable: true, - get: function get() { - return _CastsUtils.default; - } -})); -Object.defineProperty(exports, "CheckUtils", ({ - enumerable: true, - get: function get() { - return _CheckUtils.default; - } -})); -Object.defineProperty(exports, "Constants", ({ - enumerable: true, - get: function get() { - return _Constants.default; - } -})); -Object.defineProperty(exports, "Context", ({ - enumerable: true, - get: function get() { - return _Context.default; - } -})); -Object.defineProperty(exports, "Country", ({ - enumerable: true, - get: function get() { - return _Country.default; - } -})); -Object.defineProperty(exports, "FilterUtils", ({ - enumerable: true, - get: function get() { - return _FilterUtils.default; - } -})); -Object.defineProperty(exports, "License", ({ - enumerable: true, - get: function get() { - return _License.default; - } -})); -Object.defineProperty(exports, "LicenseService", ({ - enumerable: true, - get: function get() { - return _LicenseService.default; - } -})); -Object.defineProperty(exports, "LicenseTemplate", ({ - enumerable: true, - get: function get() { - return _LicenseTemplate.default; - } -})); -Object.defineProperty(exports, "LicenseTemplateService", ({ - enumerable: true, - get: function get() { - return _LicenseTemplateService.default; - } -})); -Object.defineProperty(exports, "LicenseTransactionJoin", ({ - enumerable: true, - get: function get() { - return _LicenseTransactionJoin.default; - } -})); -Object.defineProperty(exports, "Licensee", ({ - enumerable: true, - get: function get() { - return _Licensee.default; - } -})); -Object.defineProperty(exports, "LicenseeService", ({ - enumerable: true, - get: function get() { - return _LicenseeService.default; - } -})); -Object.defineProperty(exports, "NlicError", ({ - enumerable: true, - get: function get() { - return _NlicError.default; - } -})); -Object.defineProperty(exports, "Notification", ({ - enumerable: true, - get: function get() { - return _Notification.default; - } -})); -Object.defineProperty(exports, "NotificationService", ({ - enumerable: true, - get: function get() { - return _NotificationService.default; - } -})); -Object.defineProperty(exports, "Page", ({ - enumerable: true, - get: function get() { - return _Page.default; - } -})); -Object.defineProperty(exports, "PaymentMethod", ({ - enumerable: true, - get: function get() { - return _PaymentMethod.default; - } -})); -Object.defineProperty(exports, "PaymentMethodService", ({ - enumerable: true, - get: function get() { - return _PaymentMethodService.default; - } -})); -Object.defineProperty(exports, "Product", ({ - enumerable: true, - get: function get() { - return _Product.default; - } -})); -Object.defineProperty(exports, "ProductDiscount", ({ - enumerable: true, - get: function get() { - return _ProductDiscount.default; - } -})); -Object.defineProperty(exports, "ProductModule", ({ - enumerable: true, - get: function get() { - return _ProductModule.default; - } -})); -Object.defineProperty(exports, "ProductModuleService", ({ - enumerable: true, - get: function get() { - return _ProductModuleService.default; - } -})); -Object.defineProperty(exports, "ProductService", ({ - enumerable: true, - get: function get() { - return _ProductService.default; - } -})); -Object.defineProperty(exports, "Service", ({ - enumerable: true, - get: function get() { - return _Service.default; - } -})); -Object.defineProperty(exports, "Token", ({ - enumerable: true, - get: function get() { - return _Token.default; - } -})); -Object.defineProperty(exports, "TokenService", ({ - enumerable: true, - get: function get() { - return _TokenService.default; - } -})); -Object.defineProperty(exports, "Transaction", ({ - enumerable: true, - get: function get() { - return _Transaction.default; - } -})); -Object.defineProperty(exports, "TransactionService", ({ - enumerable: true, - get: function get() { - return _TransactionService.default; - } -})); -Object.defineProperty(exports, "UtilityService", ({ - enumerable: true, - get: function get() { - return _UtilityService.default; - } -})); -Object.defineProperty(exports, "ValidationParameters", ({ - enumerable: true, - get: function get() { - return _ValidationParameters.default; - } -})); -Object.defineProperty(exports, "ValidationResults", ({ - enumerable: true, - get: function get() { - return _ValidationResults.default; - } -})); -Object.defineProperty(exports, "itemToBundle", ({ - enumerable: true, - get: function get() { - return _itemToBundle.default; - } -})); -Object.defineProperty(exports, "itemToCountry", ({ - enumerable: true, - get: function get() { - return _itemToCountry.default; - } -})); -Object.defineProperty(exports, "itemToLicense", ({ - enumerable: true, - get: function get() { - return _itemToLicense.default; - } -})); -Object.defineProperty(exports, "itemToLicenseTemplate", ({ - enumerable: true, - get: function get() { - return _itemToLicenseTemplate.default; - } -})); -Object.defineProperty(exports, "itemToLicensee", ({ - enumerable: true, - get: function get() { - return _itemToLicensee.default; - } -})); -Object.defineProperty(exports, "itemToObject", ({ - enumerable: true, - get: function get() { - return _itemToObject.default; - } -})); -Object.defineProperty(exports, "itemToPaymentMethod", ({ - enumerable: true, - get: function get() { - return _itemToPaymentMethod.default; - } -})); -Object.defineProperty(exports, "itemToProduct", ({ - enumerable: true, - get: function get() { - return _itemToProduct.default; - } -})); -Object.defineProperty(exports, "itemToProductModule", ({ - enumerable: true, - get: function get() { - return _itemToProductModule.default; - } -})); -Object.defineProperty(exports, "itemToToken", ({ - enumerable: true, - get: function get() { - return _itemToToken.default; - } -})); -Object.defineProperty(exports, "itemToTransaction", ({ - enumerable: true, - get: function get() { - return _itemToTransaction.default; - } -})); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Context = _interopRequireDefault(__webpack_require__(2302)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -var _ValidationParameters = _interopRequireDefault(__webpack_require__(662)); -var _ValidationResults = _interopRequireDefault(__webpack_require__(8506)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _LicenseeService = _interopRequireDefault(__webpack_require__(7211)); -var _LicenseService = _interopRequireDefault(__webpack_require__(7394)); -var _LicenseTemplateService = _interopRequireDefault(__webpack_require__(3140)); -var _PaymentMethodService = _interopRequireDefault(__webpack_require__(6798)); -var _ProductModuleService = _interopRequireDefault(__webpack_require__(3950)); -var _ProductService = _interopRequireDefault(__webpack_require__(5114)); -var _TokenService = _interopRequireDefault(__webpack_require__(5192)); -var _TransactionService = _interopRequireDefault(__webpack_require__(2579)); -var _UtilityService = _interopRequireDefault(__webpack_require__(6359)); -var _BundleService = _interopRequireDefault(__webpack_require__(9089)); -var _NotificationService = _interopRequireDefault(__webpack_require__(1692)); -var _BaseEntity = _interopRequireDefault(__webpack_require__(635)); -var _Country = _interopRequireDefault(__webpack_require__(7147)); -var _License = _interopRequireDefault(__webpack_require__(1938)); -var _Licensee = _interopRequireDefault(__webpack_require__(9899)); -var _LicenseTemplate = _interopRequireDefault(__webpack_require__(2476)); -var _PaymentMethod = _interopRequireDefault(__webpack_require__(3014)); -var _Product = _interopRequireDefault(__webpack_require__(3262)); -var _ProductDiscount = _interopRequireDefault(__webpack_require__(1721)); -var _ProductModule = _interopRequireDefault(__webpack_require__(9142)); -var _Token = _interopRequireDefault(__webpack_require__(584)); -var _Transaction = _interopRequireDefault(__webpack_require__(269)); -var _LicenseTransactionJoin = _interopRequireDefault(__webpack_require__(3716)); -var _Bundle = _interopRequireDefault(__webpack_require__(9633)); -var _Notification = _interopRequireDefault(__webpack_require__(5454)); -var _itemToCountry = _interopRequireDefault(__webpack_require__(6899)); -var _itemToLicense = _interopRequireDefault(__webpack_require__(5402)); -var _itemToLicensee = _interopRequireDefault(__webpack_require__(4067)); -var _itemToLicenseTemplate = _interopRequireDefault(__webpack_require__(52)); -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _itemToPaymentMethod = _interopRequireDefault(__webpack_require__(2430)); -var _itemToProduct = _interopRequireDefault(__webpack_require__(822)); -var _itemToProductModule = _interopRequireDefault(__webpack_require__(4398)); -var _itemToToken = _interopRequireDefault(__webpack_require__(3648)); -var _itemToTransaction = _interopRequireDefault(__webpack_require__(1717)); -var _itemToBundle = _interopRequireDefault(__webpack_require__(3849)); -var _CastsUtils = _interopRequireDefault(__webpack_require__(8769)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _NlicError = _interopRequireDefault(__webpack_require__(6469)); -})(); - -/******/ return __webpack_exports__; -/******/ })() -; -}); \ No newline at end of file diff --git a/dist/netlicensing-client.min.js b/dist/netlicensing-client.min.js deleted file mode 100644 index 7de8004..0000000 --- a/dist/netlicensing-client.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see netlicensing-client.min.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("NetLicensing",[],t):"object"==typeof exports?exports.NetLicensing=t():e.NetLicensing=t()}(this,(()=>(()=>{var e={52:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(670)),a=n(r(2476));t.default=function(e){return new a.default((0,o.default)(e))}},79:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(635)),l=n(r(3716)),f=n(r(1938));function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}t.default=function(e){function t(e){return(0,o.default)(this,t),r=this,n=t,a=[{properties:e,casts:{number:"string",name:"string",status:"string",source:"string",grandTotal:"float",discount:"float",currency:"string",dateCreated:"date",dateClosed:"date",active:"boolean",paymentMethod:"string"}}],n=(0,i.default)(n),(0,u.default)(r,d()?Reflect.construct(n,a||[],(0,i.default)(r).constructor):n.apply(r,a));var r,n,a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setStatus",value:function(e){return this.setProperty("status",e)}},{key:"getStatus",value:function(e){return this.getProperty("status",e)}},{key:"setSource",value:function(e){return this.setProperty("source",e)}},{key:"getSource",value:function(e){return this.getProperty("source",e)}},{key:"setGrandTotal",value:function(e){return this.setProperty("grandTotal",e)}},{key:"getGrandTotal",value:function(e){return this.getProperty("grandTotal",e)}},{key:"setDiscount",value:function(e){return this.setProperty("discount",e)}},{key:"getDiscount",value:function(e){return this.getProperty("discount",e)}},{key:"setCurrency",value:function(e){return this.setProperty("currency",e)}},{key:"getCurrency",value:function(e){return this.getProperty("currency",e)}},{key:"setDateCreated",value:function(e){return this.setProperty("dateCreated",e)}},{key:"getDateCreated",value:function(e){return this.getProperty("dateCreated",e)}},{key:"setDateClosed",value:function(e){return this.setProperty("dateClosed",e)}},{key:"getDateClosed",value:function(e){return this.getProperty("dateClosed",e)}},{key:"setPaymentMethod",value:function(e){return this.setProperty("paymentMethod",e)}},{key:"getPaymentMethod",value:function(e){return this.getProperty("paymentMethod",e)}},{key:"setActive",value:function(){return this.setProperty("active",!0)}},{key:"getLicenseTransactionJoins",value:function(e){return this.getProperty("licenseTransactionJoins",e)}},{key:"setLicenseTransactionJoins",value:function(e){return this.setProperty("licenseTransactionJoins",e)}},{key:"setListLicenseTransactionJoin",value:function(e){if(e){var r=this.getProperty("licenseTransactionJoins",[]),n=new l.default;e.forEach((function(e){"licenseNumber"===e.name&&n.setLicense(new f.default({number:e.value})),"transactionNumber"===e.name&&n.setTransaction(new t({number:e.value}))})),r.push(n),this.setProperty("licenseTransactionJoins",r)}}}])}(c.default)},584:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(635));function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}t.default=function(e){function t(e){return(0,o.default)(this,t),r=this,n=t,a=[{properties:e,casts:{number:"string",active:"boolean",expirationTime:"date",vendorNumber:"string",tokenType:"string",licenseeNumber:"string",successURL:"string",successURLTitle:"string",cancelURL:"string",cancelURLTitle:"string",shopURL:"string"}}],n=(0,i.default)(n),(0,u.default)(r,l()?Reflect.construct(n,a||[],(0,i.default)(r).constructor):n.apply(r,a));var r,n,a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setExpirationTime",value:function(e){return this.setProperty("expirationTime",e)}},{key:"getExpirationTime",value:function(e){return this.getProperty("expirationTime",e)}},{key:"setVendorNumber",value:function(e){return this.setProperty("vendorNumber",e)}},{key:"getVendorNumber",value:function(e){return this.getProperty("vendorNumber",e)}},{key:"setTokenType",value:function(e){return this.setProperty("tokenType",e)}},{key:"getTokenType",value:function(e){return this.getProperty("tokenType",e)}},{key:"setLicenseeNumber",value:function(e){return this.setProperty("licenseeNumber",e)}},{key:"getLicenseeNumber",value:function(e){return this.getProperty("licenseeNumber",e)}},{key:"setSuccessURL",value:function(e){return this.setProperty("successURL",e)}},{key:"getSuccessURL",value:function(e){return this.getProperty("successURL",e)}},{key:"setSuccessURLTitle",value:function(e){return this.setProperty("successURLTitle",e)}},{key:"getSuccessURLTitle",value:function(e){return this.getProperty("successURLTitle",e)}},{key:"setCancelURL",value:function(e){return this.setProperty("cancelURL",e)}},{key:"getCancelURL",value:function(e){return this.getProperty("cancelURL",e)}},{key:"setCancelURLTitle",value:function(e){return this.setProperty("cancelURLTitle",e)}},{key:"getCancelURLTitle",value:function(e){return this.getProperty("cancelURLTitle",e)}},{key:"getShopURL",value:function(e){return this.getProperty("shopURL",e)}},{key:"setRole",value:function(e){return this.setApiKeyRole(e)}},{key:"getRole",value:function(e){return this.getApiKeyRole(e)}},{key:"setApiKeyRole",value:function(e){return this.setProperty("apiKeyRole",e)}},{key:"getApiKeyRole",value:function(e){return this.getProperty("apiKeyRole",e)}}])}(c.default)},635:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(3693)),a=n(r(3738)),u=n(r(7383)),i=n(r(4579)),s=n(r(1305)),c=n(r(8769));function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(3693)),a=n(r(7383)),u=n(r(4579));function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){var t={},n=e.property,o=e.list;return n&&Array.isArray(n)&&n.forEach((function(e){var r=e.name,n=e.value;r&&(t[r]=n)})),o&&Array.isArray(o)&&o.forEach((function(e){var n=e.name;n&&(t[n]=t[n]||[],t[n].push(r(e)))})),t};t.default=r},691:e=>{e.exports=function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}},e.exports.__esModule=!0,e.exports.default=e.exports},822:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(670)),a=n(r(3262));t.default=function(e){var t=(0,o.default)(e),r=t.discount;delete t.discount;var n=new a.default(t);return n.setProductDiscounts(r),n}},1156:e=>{e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,u,i=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(c)throw o}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},1305:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={isValid:function(e){var t=void 0!==e&&"function"!=typeof e;return"number"==typeof e&&(t=Number.isFinite(e)&&!Number.isNaN(e)),t},paramNotNull:function(e,t){if(!this.isValid(e))throw new TypeError("Parameter ".concat(t," has bad value ").concat(e));if(null===e)throw new TypeError("Parameter ".concat(t," cannot be null"))},paramNotEmpty:function(e,t){if(!this.isValid(e))throw new TypeError("Parameter ".concat(t," has bad value ").concat(e));if(!e)throw new TypeError("Parameter ".concat(t," cannot be null or empty string"))}}},1692:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4756)),a=n(r(5715)),u=n(r(9293)),i=n(r(3401)),s=n(r(6232)),c=n(r(1305)),l=n(r(8833)),f=n(r(5270)),d=n(r(4034));t.default={create:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,c,l,d;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,i.default.post(e,s.default.Notification.ENDPOINT_PATH,t.asPropertiesMap());case 2:return n=r.sent,u=n.data.items.item,c=u.filter((function(e){return"Notification"===e.type})),l=(0,a.default)(c,1),d=l[0],r.abrupt("return",(0,f.default)(d));case 6:case"end":return r.stop()}}),r)})))()},get:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,l,d,p;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c.default.paramNotEmpty(t,s.default.NUMBER),r.next=3,i.default.get(e,"".concat(s.default.Notification.ENDPOINT_PATH,"/").concat(t));case 3:return n=r.sent,u=n.data.items.item,l=u.filter((function(e){return"Notification"===e.type})),d=(0,a.default)(l,1),p=d[0],r.abrupt("return",(0,f.default)(p));case 7:case"end":return r.stop()}}),r)})))()},list:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,a,u;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},!t){r.next=5;break}if(c.default.isValid(t)){r.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:n[s.default.FILTER]="string"==typeof t?t:l.default.encode(t);case 5:return r.next=7,i.default.get(e,s.default.Notification.ENDPOINT_PATH,n);case 7:return a=r.sent,u=a.data,r.abrupt("return",(0,d.default)(u.items.item.filter((function(e){return"Notification"===e.type})).map((function(e){return(0,f.default)(e)})),u.items.pagenumber,u.items.itemsnumber,u.items.totalpages,u.items.totalitems));case 10:case"end":return r.stop()}}),r)})))()},update:function(e,t,r){return(0,u.default)(o.default.mark((function n(){var u,l,d,p,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c.default.paramNotEmpty(t,s.default.NUMBER),n.next=3,i.default.post(e,"".concat(s.default.Notification.ENDPOINT_PATH,"/").concat(t),r.asPropertiesMap());case 3:return u=n.sent,l=u.data.items.item,d=l.filter((function(e){return"Notification"===e.type})),p=(0,a.default)(d,1),y=p[0],n.abrupt("return",(0,f.default)(y));case 7:case"end":return n.stop()}}),n)})))()},delete:function(e,t){return c.default.paramNotEmpty(t,s.default.NUMBER),i.default.delete(e,"".concat(s.default.Notification.ENDPOINT_PATH,"/").concat(t))}}},1717:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(670)),a=n(r(269)),u=n(r(1938)),i=n(r(3716)),s=n(r(6232));t.default=function(e){var t=(0,o.default)(e),r=t.licenseTransactionJoin;delete t.licenseTransactionJoin;var n=new a.default(t);if(r){var c=[];r.forEach((function(e){var t=new i.default;t.setLicense(new u.default({number:e[s.default.License.LICENSE_NUMBER]})),t.setTransaction(new a.default({number:e[s.default.Transaction.TRANSACTION_NUMBER]})),c.push(t)})),n.setLicenseTransactionJoins(c)}return n}},1721:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(635));function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}t.default=function(e){function t(e){return(0,o.default)(this,t),r=this,n=t,a=[{properties:e,casts:{totalPrice:"float",currency:"string",amountFix:"float",amountPercent:"int"}}],n=(0,i.default)(n),(0,u.default)(r,l()?Reflect.construct(n,a||[],(0,i.default)(r).constructor):n.apply(r,a));var r,n,a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"setTotalPrice",value:function(e){return this.setProperty("totalPrice",e)}},{key:"getTotalPrice",value:function(e){return this.getProperty("totalPrice",e)}},{key:"setCurrency",value:function(e){return this.setProperty("currency",e)}},{key:"getCurrency",value:function(e){return this.getProperty("currency",e)}},{key:"setAmountFix",value:function(e){return this.setProperty("amountFix",e).removeProperty("amountPercent")}},{key:"getAmountFix",value:function(e){return this.getProperty("amountFix",e)}},{key:"setAmountPercent",value:function(e){return this.setProperty("amountPercent",e).removeProperty("amountFix")}},{key:"getAmountPercent",value:function(e){return this.getProperty("amountPercent",e)}},{key:"toString",value:function(){var e=this.getTotalPrice(),t=this.getCurrency(),r=0;return this.getAmountFix(null)&&(r=this.getAmountFix()),this.getAmountPercent(null)&&(r="".concat(this.getAmountPercent(),"%")),"".concat(e,";").concat(t,";").concat(r)}}])}(c.default)},1837:(e,t,r)=>{var n=r(3072),o=r(5636),a=r(691),u=r(9646);function i(t){var r="function"==typeof Map?new Map:void 0;return e.exports=i=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return u(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},1938:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(635));function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}t.default=function(e){function t(e){return(0,o.default)(this,t),r=this,n=t,a=[{properties:e,casts:{number:"string",active:"boolean",name:"string",price:"float",hidden:"boolean",parentfeature:"string",timeVolume:"int",startDate:"date",inUse:"boolean"}}],n=(0,i.default)(n),(0,u.default)(r,l()?Reflect.construct(n,a||[],(0,i.default)(r).constructor):n.apply(r,a));var r,n,a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setHidden",value:function(e){return this.setProperty("hidden",e)}},{key:"getHidden",value:function(e){return this.getProperty("hidden",e)}},{key:"setParentfeature",value:function(e){return this.setProperty("parentfeature",e)}},{key:"getParentfeature",value:function(e){return this.getProperty("parentfeature",e)}},{key:"setTimeVolume",value:function(e){return this.setProperty("timeVolume",e)}},{key:"getTimeVolume",value:function(e){return this.getProperty("timeVolume",e)}},{key:"setStartDate",value:function(e){return this.setProperty("startDate",e)}},{key:"getStartDate",value:function(e){return this.getProperty("startDate",e)}},{key:"getInUse",value:function(e){return this.getProperty("inUse",e)}},{key:"getPrice",value:function(e){return this.getProperty("price",e)}},{key:"getCurrency",value:function(e){return this.getProperty("currency",e)}}])}(c.default)},2302:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(3738)),a=n(r(3693)),u=n(r(7383)),i=n(r(4579)),s=n(r(6232)),c=n(r(1305));function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t{var n=r(9552);function o(){return e.exports=o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var o=n(e,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?e:r):a.value}},e.exports.__esModule=!0,e.exports.default=e.exports,o.apply(null,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},2430:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(670)),a=n(r(3014));t.default=function(e){return new a.default((0,o.default)(e))}},2475:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},2476:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(635));function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}t.default=function(e){function t(e){return(0,o.default)(this,t),r=this,n=t,a=[{properties:e,casts:{number:"string",active:"boolean",name:"string",licenseType:"string",price:"double",currency:"string",automatic:"boolean",hidden:"boolean",hideLicenses:"boolean",gracePeriod:"boolean",timeVolume:"int",timeVolumePeriod:"string",maxSessions:"int",quantity:"int",inUse:"boolean"}}],n=(0,i.default)(n),(0,u.default)(r,l()?Reflect.construct(n,a||[],(0,i.default)(r).constructor):n.apply(r,a));var r,n,a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setLicenseType",value:function(e){return this.setProperty("licenseType",e)}},{key:"getLicenseType",value:function(e){return this.getProperty("licenseType",e)}},{key:"setPrice",value:function(e){return this.setProperty("price",e)}},{key:"getPrice",value:function(e){return this.getProperty("price",e)}},{key:"setCurrency",value:function(e){return this.setProperty("currency",e)}},{key:"getCurrency",value:function(e){return this.getProperty("currency",e)}},{key:"setAutomatic",value:function(e){return this.setProperty("automatic",e)}},{key:"getAutomatic",value:function(e){return this.getProperty("automatic",e)}},{key:"setHidden",value:function(e){return this.setProperty("hidden",e)}},{key:"getHidden",value:function(e){return this.getProperty("hidden",e)}},{key:"setHideLicenses",value:function(e){return this.setProperty("hideLicenses",e)}},{key:"getHideLicenses",value:function(e){return this.getProperty("hideLicenses",e)}},{key:"setTimeVolume",value:function(e){return this.setProperty("timeVolume",e)}},{key:"getTimeVolume",value:function(e){return this.getProperty("timeVolume",e)}},{key:"setTimeVolumePeriod",value:function(e){return this.setProperty("timeVolumePeriod",e)}},{key:"getTimeVolumePeriod",value:function(e){return this.getProperty("timeVolumePeriod",e)}},{key:"setMaxSessions",value:function(e){return this.setProperty("maxSessions",e)}},{key:"getMaxSessions",value:function(e){return this.getProperty("maxSessions",e)}},{key:"setQuantity",value:function(e){return this.setProperty("quantity",e)}},{key:"getQuantity",value:function(e){return this.getProperty("quantity",e)}},{key:"getInUse",value:function(e){return this.getProperty("inUse",e)}}])}(c.default)},2579:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4756)),a=n(r(5715)),u=n(r(9293)),i=n(r(6232)),s=n(r(3401)),c=n(r(1305)),l=n(r(8833)),f=n(r(1717)),d=n(r(4034));t.default={create:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,c,l,d;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,s.default.post(e,i.default.Transaction.ENDPOINT_PATH,t.asPropertiesMap());case 2:return n=r.sent,u=n.data.items.item,c=u.filter((function(e){return"Transaction"===e.type})),l=(0,a.default)(c,1),d=l[0],r.abrupt("return",(0,f.default)(d));case 6:case"end":return r.stop()}}),r)})))()},get:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,l,d,p;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c.default.paramNotEmpty(t,i.default.NUMBER),r.next=3,s.default.get(e,"".concat(i.default.Transaction.ENDPOINT_PATH,"/").concat(t));case 3:return n=r.sent,u=n.data.items.item,l=u.filter((function(e){return"Transaction"===e.type})),d=(0,a.default)(l,1),p=d[0],r.abrupt("return",(0,f.default)(p));case 7:case"end":return r.stop()}}),r)})))()},list:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,a,u;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},!t){r.next=5;break}if(c.default.isValid(t)){r.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:n[i.default.FILTER]="string"==typeof t?t:l.default.encode(t);case 5:return r.next=7,s.default.get(e,i.default.Transaction.ENDPOINT_PATH,n);case 7:return a=r.sent,u=a.data,r.abrupt("return",(0,d.default)(u.items.item.filter((function(e){return"Transaction"===e.type})).map((function(e){return(0,f.default)(e)})),u.items.pagenumber,u.items.itemsnumber,u.items.totalpages,u.items.totalitems));case 10:case"end":return r.stop()}}),r)})))()},update:function(e,t,r){return(0,u.default)(o.default.mark((function n(){var u,l,d,p,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c.default.paramNotEmpty(t,i.default.NUMBER),n.next=3,s.default.post(e,"".concat(i.default.Transaction.ENDPOINT_PATH,"/").concat(t),r.asPropertiesMap());case 3:return u=n.sent,l=u.data.items.item,d=l.filter((function(e){return"Transaction"===e.type})),p=(0,a.default)(d,1),y=p[0],n.abrupt("return",(0,f.default)(y));case 7:case"end":return n.stop()}}),n)})))()}}},2987:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},3014:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(635));function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}t.default=function(e){function t(e){return(0,o.default)(this,t),r=this,n=t,a=[{properties:e,casts:{number:"string",active:"boolean","paypal.subject":"string"}}],n=(0,i.default)(n),(0,u.default)(r,l()?Reflect.construct(n,a||[],(0,i.default)(r).constructor):n.apply(r,a));var r,n,a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setPaypalSubject",value:function(e){return this.setProperty("paypal.subject",e)}},{key:"getPaypalSubject",value:function(e){return this.getProperty("paypal.subject",e)}}])}(c.default)},3072:e=>{function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3140:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4756)),a=n(r(5715)),u=n(r(9293)),i=n(r(1305)),s=n(r(6232)),c=n(r(3401)),l=n(r(8833)),f=n(r(52)),d=n(r(4034));t.default={create:function(e,t,r){return(0,u.default)(o.default.mark((function n(){var u,l,d,p,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i.default.paramNotEmpty(t,s.default.ProductModule.PRODUCT_MODULE_NUMBER),r.setProperty(s.default.ProductModule.PRODUCT_MODULE_NUMBER,t),n.next=4,c.default.post(e,s.default.LicenseTemplate.ENDPOINT_PATH,r.asPropertiesMap());case 4:return u=n.sent,l=u.data.items.item,d=l.filter((function(e){return"LicenseTemplate"===e.type})),p=(0,a.default)(d,1),y=p[0],n.abrupt("return",(0,f.default)(y));case 8:case"end":return n.stop()}}),n)})))()},get:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,l,d,p;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i.default.paramNotEmpty(t,s.default.NUMBER),r.next=3,c.default.get(e,"".concat(s.default.LicenseTemplate.ENDPOINT_PATH,"/").concat(t));case 3:return n=r.sent,u=n.data.items.item,l=u.filter((function(e){return"LicenseTemplate"===e.type})),d=(0,a.default)(l,1),p=d[0],r.abrupt("return",(0,f.default)(p));case 7:case"end":return r.stop()}}),r)})))()},list:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,a,u;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},!t){r.next=5;break}if(i.default.isValid(t)){r.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:n[s.default.FILTER]="string"==typeof t?t:l.default.encode(t);case 5:return r.next=7,c.default.get(e,s.default.LicenseTemplate.ENDPOINT_PATH,n);case 7:return a=r.sent,u=a.data,r.abrupt("return",(0,d.default)(u.items.item.filter((function(e){return"LicenseTemplate"===e.type})).map((function(e){return(0,f.default)(e)})),u.items.pagenumber,u.items.itemsnumber,u.items.totalpages,u.items.totalitems));case 10:case"end":return r.stop()}}),r)})))()},update:function(e,t,r){return(0,u.default)(o.default.mark((function n(){var u,l,d,p,y,h;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i.default.paramNotEmpty(t,s.default.NUMBER),u="".concat(s.default.LicenseTemplate.ENDPOINT_PATH,"/").concat(t),n.next=4,c.default.post(e,u,r.asPropertiesMap());case 4:return l=n.sent,d=l.data.items.item,p=d.filter((function(e){return"LicenseTemplate"===e.type})),y=(0,a.default)(p,1),h=y[0],n.abrupt("return",(0,f.default)(h));case 8:case"end":return n.stop()}}),n)})))()},delete:function(e,t,r){i.default.paramNotEmpty(t,s.default.NUMBER);var n={forceCascade:Boolean(r)};return c.default.delete(e,"".concat(s.default.LicenseTemplate.ENDPOINT_PATH,"/").concat(t),n)}}},3262:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(2395)),c=n(r(9511)),l=n(r(635)),f=n(r(1721));function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}var p=new WeakMap,y=new WeakMap;t.default=function(e){function t(e){var r,n,a,s;return(0,o.default)(this,t),n=this,a=t,s=[{properties:e,casts:{number:"string",active:"boolean",name:"string",version:"string",description:"string",licensingInfo:"string",licenseeAutoCreate:"boolean",licenseeSecretMode:"string",inUse:"boolean"}}],a=(0,i.default)(a),r=(0,u.default)(n,d()?Reflect.construct(a,s||[],(0,i.default)(n).constructor):a.apply(n,s)),p.set(r,[]),y.set(r,!1),r}return(0,c.default)(t,e),(0,a.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setVersion",value:function(e){return this.setProperty("version",e)}},{key:"getVersion",value:function(e){return this.getProperty("version",e)}},{key:"setLicenseeAutoCreate",value:function(e){return this.setProperty("licenseeAutoCreate",e)}},{key:"getLicenseeAutoCreate",value:function(e){return this.getProperty("licenseeAutoCreate",e)}},{key:"setLicenseeSecretMode",value:function(e){return this.setProperty("licenseeSecretMode",e)}},{key:"getLicenseeSecretMode",value:function(e){return this.getProperty("licenseeSecretMode",e)}},{key:"setDescription",value:function(e){return this.setProperty("description",e)}},{key:"getDescription",value:function(e){return this.getProperty("description",e)}},{key:"setLicensingInfo",value:function(e){return this.setProperty("licensingInfo",e)}},{key:"getLicensingInfo",value:function(e){return this.getProperty("licensingInfo",e)}},{key:"getInUse",value:function(e){return this.getProperty("inUse",e)}},{key:"addDiscount",value:function(e){var t=p.get(this),r=e;return"string"==typeof r||r instanceof f.default||(r=new f.default(r)),t.push(r),p.set(this,t),y.set(this,!0),this}},{key:"setProductDiscounts",value:function(e){var t=this;return p.set(this,[]),y.set(this,!0),e?Array.isArray(e)?(e.forEach((function(e){t.addDiscount(e)})),this):(this.addDiscount(e),this):this}},{key:"getProductDiscounts",value:function(){return Object.assign([],p.get(this))}},{key:"asPropertiesMap",value:function(){var e,r,n,o,a,u=(e=t,r="asPropertiesMap",n=this,o=3,a=(0,s.default)((0,i.default)(1&o?e.prototype:e),r,n),2&o&&"function"==typeof a?function(e){return a.apply(n,e)}:a)([]);return p.get(this).length&&(u.discount=p.get(this).map((function(e){return e.toString()}))),!u.discount&&y.get(this)&&(u.discount=""),u}}])}(l.default)},3401:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(3738)),a=n(r(5715)),u=(n(r(5407)),n(r(7383))),i=n(r(4579)),s=n(r(6425)),c=n(r(7131)),l=n(r(6232)),f=n(r(6469)),d=n(r(8330)),p={},y=null;t.default=function(){function e(){(0,u.default)(this,e)}return(0,i.default)(e,null,[{key:"getAxiosInstance",value:function(){return y||s.default}},{key:"setAxiosInstance",value:function(e){y=e}},{key:"getLastHttpRequestInfo",value:function(){return p}},{key:"get",value:function(t,r,n){return e.request(t,"get",r,n)}},{key:"post",value:function(t,r,n){return e.request(t,"post",r,n)}},{key:"delete",value:function(t,r,n){return e.request(t,"delete",r,n)}},{key:"request",value:function(t,r,n,o){var u=String(n),i=o||{};if(!u)throw new TypeError("Url template must be specified");if(["get","post","delete"].indexOf(r.toLowerCase())<0)throw new Error("Invalid request type:".concat(r,", allowed requests types: GET, POST, DELETE."));if(!t.getBaseUrl(null))throw new Error("Base url must be specified");var s={url:encodeURI("".concat(t.getBaseUrl(),"/").concat(u)),method:r.toLowerCase(),responseType:"json",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"},transformRequest:[function(t,r){return"application/x-www-form-urlencoded"===r["Content-Type"]?e.toQueryString(t):(r["NetLicensing-Origin"]||(r["NetLicensing-Origin"]="NetLicensing/Javascript ".concat(d.default.version)),t)}]};switch("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(s.headers["User-agent"]="NetLicensing/Javascript ".concat(d.default.version,"/node&").concat(process.version)),["put","post","patch"].indexOf(s.method)>=0?("post"===s.method&&(s.headers["Content-Type"]="application/x-www-form-urlencoded"),s.data=i):s.params=i,t.getSecurityMode()){case l.default.BASIC_AUTHENTICATION:if(!t.getUsername())throw new Error('Missing parameter "username"');if(!t.getPassword())throw new Error('Missing parameter "password"');s.auth={username:t.getUsername(),password:t.getPassword()};break;case l.default.APIKEY_IDENTIFICATION:if(!t.getApiKey())throw new Error('Missing parameter "apiKey"');s.headers.Authorization="Basic ".concat((0,c.default)("apiKey:".concat(t.getApiKey())));break;case l.default.ANONYMOUS_IDENTIFICATION:break;default:throw new Error("Unknown security mode")}return e.getAxiosInstance()(s).then((function(t){t.infos=e.getInfo(t,[]);var r=t.infos.filter((function(e){return"ERROR"===e.type}));if(r.length){var n=new Error(r[0].value);throw n.config=t.config,n.request=t.request,n.response=t,n}return p=t,t})).catch((function(t){if(t.response){p=t.response;var r=new f.default(t);if(r.config=t.config,r.code=t.code,r.request=t.request,r.response=t.response,t.response.data){r.infos=e.getInfo(t.response,[]);var n=r.infos.filter((function(e){return"ERROR"===e.type})),o=(0,a.default)(n,1)[0],u=void 0===o?{}:o;r.message=u.value||"Unknown"}throw r}throw t}))}},{key:"getInfo",value:function(e,t){try{return e.data.infos.info||t}catch(e){return t}}},{key:"toQueryString",value:function(t,r){var n=[],a=Object.prototype.hasOwnProperty;return Object.keys(t).forEach((function(u){if(a.call(t,u)){var i=r?"".concat(r,"[").concat(u,"]"):u,s=t[u];s=s instanceof Date?s.toISOString():s,n.push(null!==s&&"object"===(0,o.default)(s)?e.toQueryString(s,i):"".concat(encodeURIComponent(i),"=").concat(encodeURIComponent(s)))}})),n.join("&").replace(/%5B[0-9]+%5D=/g,"=")}}])}()},3648:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(670)),a=n(r(584));t.default=function(e){return new a.default((0,o.default)(e))}},3693:(e,t,r)=>{var n=r(7736);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},3716:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579));t.default=function(){return(0,a.default)((function e(t,r){(0,o.default)(this,e),this.transaction=t,this.license=r}),[{key:"setTransaction",value:function(e){return this.transaction=e,this}},{key:"getTransaction",value:function(e){return this.transaction||e}},{key:"setLicense",value:function(e){return this.license=e,this}},{key:"getLicense",value:function(e){return this.license||e}}])}()},3738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3849:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(670)),a=n(r(9633));t.default=function(e){return new a.default((0,o.default)(e))}},3950:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4756)),a=n(r(5715)),u=n(r(9293)),i=n(r(1305)),s=n(r(6232)),c=n(r(3401)),l=n(r(8833)),f=n(r(4398)),d=n(r(4034));t.default={create:function(e,t,r){return(0,u.default)(o.default.mark((function n(){var u,l,d,p,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i.default.paramNotEmpty(t,s.default.Product.PRODUCT_NUMBER),r.setProperty(s.default.Product.PRODUCT_NUMBER,t),n.next=4,c.default.post(e,s.default.ProductModule.ENDPOINT_PATH,r.asPropertiesMap());case 4:return u=n.sent,l=u.data.items.item,d=l.filter((function(e){return"ProductModule"===e.type})),p=(0,a.default)(d,1),y=p[0],n.abrupt("return",(0,f.default)(y));case 8:case"end":return n.stop()}}),n)})))()},get:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,l,d,p;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i.default.paramNotEmpty(t,s.default.NUMBER),r.next=3,c.default.get(e,"".concat(s.default.ProductModule.ENDPOINT_PATH,"/").concat(t));case 3:return n=r.sent,u=n.data.items.item,l=u.filter((function(e){return"ProductModule"===e.type})),d=(0,a.default)(l,1),p=d[0],r.abrupt("return",(0,f.default)(p));case 7:case"end":return r.stop()}}),r)})))()},list:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,a,u;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},!t){r.next=5;break}if(i.default.isValid(t)){r.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:n[s.default.FILTER]="string"==typeof t?t:l.default.encode(t);case 5:return r.next=7,c.default.get(e,s.default.ProductModule.ENDPOINT_PATH,n);case 7:return a=r.sent,u=a.data,r.abrupt("return",(0,d.default)(u.items.item.filter((function(e){return"ProductModule"===e.type})).map((function(e){return(0,f.default)(e)})),u.items.pagenumber,u.items.itemsnumber,u.items.totalpages,u.items.totalitems));case 10:case"end":return r.stop()}}),r)})))()},update:function(e,t,r){return(0,u.default)(o.default.mark((function n(){var u,l,d,p,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i.default.paramNotEmpty(t,s.default.NUMBER),n.next=3,c.default.post(e,"".concat(s.default.ProductModule.ENDPOINT_PATH,"/").concat(t),r.asPropertiesMap());case 3:return u=n.sent,l=u.data.items.item,d=l.filter((function(e){return"ProductModule"===e.type})),p=(0,a.default)(d,1),y=p[0],n.abrupt("return",(0,f.default)(y));case 7:case"end":return n.stop()}}),n)})))()},delete:function(e,t,r){i.default.paramNotEmpty(t,s.default.NUMBER);var n={forceCascade:Boolean(r)};return c.default.delete(e,"".concat(s.default.ProductModule.ENDPOINT_PATH,"/").concat(t),n)}}},4034:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a={getContent:function(){return e},getPageNumber:function(){return t},getItemsNumber:function(){return r},getTotalPages:function(){return n},getTotalItems:function(){return o},hasNext:function(){return n>t+1}},u=Object.keys(a);return new Proxy(e,{get:function(e,t){return-1!==u.indexOf(t)?a[t]:e[t]}})}},4067:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(670)),a=n(r(9899));t.default=function(e){return new a.default((0,o.default)(e))}},4398:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(670)),a=n(r(9142));t.default=function(e){return new a.default((0,o.default)(e))}},4579:(e,t,r)=>{var n=r(7736);function o(e,t){for(var r=0;r{var n=r(3738).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},a=Object.prototype,u=a.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",f=s.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(t){d=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof P?t:P,a=Object.create(o.prototype),u=new M(n||[]);return i(a,"_invoke",{value:x(e,r,u)}),a}function y(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var h="suspendedStart",m="suspendedYield",v="executing",g="completed",b={};function P(){}function E(){}function N(){}var T={};d(T,c,(function(){return this}));var O=Object.getPrototypeOf,w=O&&O(O(j([])));w&&w!==a&&u.call(w,c)&&(T=w);var k=N.prototype=P.prototype=Object.create(T);function _(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(o,a,i,s){var c=y(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&u.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(f).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}})}function x(e,r,n){var o=h;return function(a,u){if(o===v)throw Error("Generator is already running");if(o===g){if("throw"===a)throw u;return{value:t,done:!0}}for(n.method=a,n.arg=u;;){var i=n.delegate;if(i){var s=A(i,n);if(s){if(s===b)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var c=y(e,r,n);if("normal"===c.type){if(o=n.done?g:m,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=g,n.method="throw",n.arg=c.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var a=y(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,b;var u=a.arg;return u?u.done?(r[e.resultName]=u.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function j(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=u.call(a,"catchLoc"),c=u.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&u.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:j(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},4756:(e,t,r)=>{var n=r(4633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},5114:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4756)),a=n(r(5715)),u=n(r(9293)),i=n(r(3401)),s=n(r(6232)),c=n(r(1305)),l=n(r(8833)),f=n(r(822)),d=n(r(4034));t.default={create:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,c,l,d;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,i.default.post(e,s.default.Product.ENDPOINT_PATH,t.asPropertiesMap());case 2:return n=r.sent,u=n.data.items.item,c=u.filter((function(e){return"Product"===e.type})),l=(0,a.default)(c,1),d=l[0],r.abrupt("return",(0,f.default)(d));case 6:case"end":return r.stop()}}),r)})))()},get:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,l,d,p;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c.default.paramNotEmpty(t,s.default.NUMBER),r.next=3,i.default.get(e,"".concat(s.default.Product.ENDPOINT_PATH,"/").concat(t));case 3:return n=r.sent,u=n.data.items.item,l=u.filter((function(e){return"Product"===e.type})),d=(0,a.default)(l,1),p=d[0],r.abrupt("return",(0,f.default)(p));case 7:case"end":return r.stop()}}),r)})))()},list:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,a,u;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},!t){r.next=5;break}if(c.default.isValid(t)){r.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:n[s.default.FILTER]="string"==typeof t?t:l.default.encode(t);case 5:return r.next=7,i.default.get(e,s.default.Product.ENDPOINT_PATH,n);case 7:return a=r.sent,u=a.data,r.abrupt("return",(0,d.default)(u.items.item.filter((function(e){return"Product"===e.type})).map((function(e){return(0,f.default)(e)})),u.items.pagenumber,u.items.itemsnumber,u.items.totalpages,u.items.totalitems));case 10:case"end":return r.stop()}}),r)})))()},update:function(e,t,r){return(0,u.default)(o.default.mark((function n(){var u,l,d,p,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c.default.paramNotEmpty(t,s.default.NUMBER),n.next=3,i.default.post(e,"".concat(s.default.Product.ENDPOINT_PATH,"/").concat(t),r.asPropertiesMap());case 3:return u=n.sent,l=u.data.items.item,d=l.filter((function(e){return"Product"===e.type})),p=(0,a.default)(d,1),y=p[0],n.abrupt("return",(0,f.default)(y));case 7:case"end":return n.stop()}}),n)})))()},delete:function(e,t,r){c.default.paramNotEmpty(t,s.default.NUMBER);var n={forceCascade:Boolean(r)};return i.default.delete(e,"".concat(s.default.Product.ENDPOINT_PATH,"/").concat(t),n)}}},5192:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4756)),a=n(r(5715)),u=n(r(9293)),i=n(r(6232)),s=n(r(3401)),c=n(r(1305)),l=n(r(8833)),f=n(r(3648)),d=n(r(4034));t.default={create:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,c,l,d;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,s.default.post(e,i.default.Token.ENDPOINT_PATH,t.asPropertiesMap());case 2:return n=r.sent,u=n.data.items.item,c=u.filter((function(e){return"Token"===e.type})),l=(0,a.default)(c,1),d=l[0],r.abrupt("return",(0,f.default)(d));case 6:case"end":return r.stop()}}),r)})))()},get:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,l,d,p;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c.default.paramNotEmpty(t,i.default.NUMBER),r.next=3,s.default.get(e,"".concat(i.default.Token.ENDPOINT_PATH,"/").concat(t));case 3:return n=r.sent,u=n.data.items.item,l=u.filter((function(e){return"Token"===e.type})),d=(0,a.default)(l,1),p=d[0],r.abrupt("return",(0,f.default)(p));case 7:case"end":return r.stop()}}),r)})))()},list:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,a,u;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},!t){r.next=5;break}if(c.default.isValid(t)){r.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:n[i.default.FILTER]="string"==typeof t?t:l.default.encode(t);case 5:return r.next=7,s.default.get(e,i.default.Token.ENDPOINT_PATH,n);case 7:return a=r.sent,u=a.data,r.abrupt("return",(0,d.default)(u.items.item.filter((function(e){return"Token"===e.type})).map((function(e){return(0,f.default)(e)})),u.items.pagenumber,u.items.itemsnumber,u.items.totalpages,u.items.totalitems));case 10:case"end":return r.stop()}}),r)})))()},delete:function(e,t){return c.default.paramNotEmpty(t,i.default.NUMBER),s.default.delete(e,"".concat(i.default.Token.ENDPOINT_PATH,"/").concat(t))}}},5270:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(670)),a=n(r(5454));t.default=function(e){return new a.default((0,o.default)(e))}},5402:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(670)),a=n(r(1938));t.default=function(e){return new a.default((0,o.default)(e))}},5407:e=>{e.exports=function(e){throw new TypeError('"'+e+'" is read-only')},e.exports.__esModule=!0,e.exports.default=e.exports},5454:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(635));function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}t.default=function(e){function t(e){return(0,o.default)(this,t),r=this,n=t,a=[{properties:e,casts:{number:"string",active:"boolean",name:"string",protocol:"string",events:"string",payload:"string",endpoint:"string"}}],n=(0,i.default)(n),(0,u.default)(r,l()?Reflect.construct(n,a||[],(0,i.default)(r).constructor):n.apply(r,a));var r,n,a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setProtocol",value:function(e){return this.setProperty("protocol",e)}},{key:"getProtocol",value:function(e){return this.getProperty("protocol",e)}},{key:"setEvents",value:function(e){return this.setProperty("events",e)}},{key:"getEvents",value:function(e){return this.getProperty("events",e)}},{key:"setPayload",value:function(e){return this.setProperty("payload",e)}},{key:"getPayload",value:function(e){return this.getProperty("payload",e)}},{key:"setEndpoint",value:function(e){return this.setProperty("endpoint",e)}},{key:"getEndpoint",value:function(e){return this.getProperty("endpoint",e)}}])}(c.default)},5636:e=>{function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5715:(e,t,r)=>{var n=r(2987),o=r(1156),a=r(7122),u=r(7752);e.exports=function(e,t){return n(e)||o(e,t)||a(e,t)||u()},e.exports.__esModule=!0,e.exports.default=e.exports},6232:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",ANONYMOUS_IDENTIFICATION:"ANONYMOUS",ACTIVE:"active",NUMBER:"number",NAME:"name",VERSION:"version",DELETED:"deleted",CASCADE:"forceCascade",PRICE:"price",DISCOUNT:"discount",CURRENCY:"currency",IN_USE:"inUse",FILTER:"filter",BASE_URL:"baseUrl",USERNAME:"username",PASSWORD:"password",SECURITY_MODE:"securityMode",LicensingModel:{VALID:"valid",TryAndBuy:{NAME:"TryAndBuy"},Rental:{NAME:"Rental",RED_THRESHOLD:"redThreshold",YELLOW_THRESHOLD:"yellowThreshold"},Subscription:{NAME:"Subscription"},Floating:{NAME:"Floating"},MultiFeature:{NAME:"MultiFeature"},PayPerUse:{NAME:"PayPerUse"},PricingTable:{NAME:"PricingTable"},Quota:{NAME:"Quota"},NodeLocked:{NAME:"NodeLocked"}},Vendor:{VENDOR_NUMBER:"vendorNumber",VENDOR_TYPE:"Vendor"},Product:{ENDPOINT_PATH:"product",PRODUCT_NUMBER:"productNumber",LICENSEE_AUTO_CREATE:"licenseeAutoCreate",DESCRIPTION:"description",LICENSING_INFO:"licensingInfo",DISCOUNTS:"discounts",PROP_LICENSEE_SECRET_MODE:"licenseeSecretMode",PROP_VAT_MODE:"vatMode",Discount:{TOTAL_PRICE:"totalPrice",AMOUNT_FIX:"amountFix",AMOUNT_PERCENT:"amountPercent"},LicenseeSecretMode:{DISABLED:"DISABLED",PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}},ProductModule:{ENDPOINT_PATH:"productmodule",PRODUCT_MODULE_NUMBER:"productModuleNumber",PRODUCT_MODULE_NAME:"productModuleName",LICENSING_MODEL:"licensingModel",PROP_LICENSEE_SECRET_MODE:"licenseeSecretMode"},LicenseTemplate:{ENDPOINT_PATH:"licensetemplate",LICENSE_TEMPLATE_NUMBER:"licenseTemplateNumber",LICENSE_TYPE:"licenseType",AUTOMATIC:"automatic",HIDDEN:"hidden",HIDE_LICENSES:"hideLicenses",PROP_LICENSEE_SECRET:"licenseeSecret",LicenseType:{FEATURE:"FEATURE",TIMEVOLUME:"TIMEVOLUME",FLOATING:"FLOATING",QUANTITY:"QUANTITY"}},Token:{ENDPOINT_PATH:"token",EXPIRATION_TIME:"expirationTime",TOKEN_TYPE:"tokenType",API_KEY:"apiKey",TOKEN_PROP_EMAIL:"email",TOKEN_PROP_VENDORNUMBER:"vendorNumber",TOKEN_PROP_SHOP_URL:"shopURL",Type:{DEFAULT:"DEFAULT",SHOP:"SHOP",APIKEY:"APIKEY"}},Transaction:{ENDPOINT_PATH:"transaction",TRANSACTION_NUMBER:"transactionNumber",GRAND_TOTAL:"grandTotal",STATUS:"status",SOURCE:"source",DATE_CREATED:"datecreated",DATE_CLOSED:"dateclosed",VAT:"vat",VAT_MODE:"vatMode",LICENSE_TRANSACTION_JOIN:"licenseTransactionJoin",SOURCE_SHOP_ONLY:"shopOnly",Status:{CANCELLED:"CANCELLED",CLOSED:"CLOSED",PENDING:"PENDING"}},Licensee:{ENDPOINT_PATH:"licensee",ENDPOINT_PATH_VALIDATE:"validate",ENDPOINT_PATH_TRANSFER:"transfer",LICENSEE_NUMBER:"licenseeNumber",SOURCE_LICENSEE_NUMBER:"sourceLicenseeNumber",PROP_LICENSEE_NAME:"licenseeName",PROP_LICENSEE_SECRET:"licenseeSecret",PROP_MARKED_FOR_TRANSFER:"markedForTransfer"},License:{ENDPOINT_PATH:"license",LICENSE_NUMBER:"licenseNumber",HIDDEN:"hidden",PROP_LICENSEE_SECRET:"licenseeSecret"},PaymentMethod:{ENDPOINT_PATH:"paymentmethod"},Utility:{ENDPOINT_PATH:"utility",ENDPOINT_PATH_LICENSE_TYPES:"licenseTypes",ENDPOINT_PATH_LICENSING_MODELS:"licensingModels",ENDPOINT_PATH_COUNTRIES:"countries",LICENSING_MODEL_PROPERTIES:"LicensingModelProperties",LICENSE_TYPE:"LicenseType"},APIKEY:{ROLE_APIKEY_LICENSEE:"ROLE_APIKEY_LICENSEE",ROLE_APIKEY_ANALYTICS:"ROLE_APIKEY_ANALYTICS",ROLE_APIKEY_OPERATION:"ROLE_APIKEY_OPERATION",ROLE_APIKEY_MAINTENANCE:"ROLE_APIKEY_MAINTENANCE",ROLE_APIKEY_ADMIN:"ROLE_APIKEY_ADMIN"},Validation:{FOR_OFFLINE_USE:"forOfflineUse"},WarningLevel:{GREEN:"GREEN",YELLOW:"YELLOW",RED:"RED"},Bundle:{ENDPOINT_PATH:"bundle",ENDPOINT_OBTAIN_PATH:"obtain"},Notification:{ENDPOINT_PATH:"notification",Protocol:{WEBHOOK:"WEBHOOK"},Event:{LICENSEE_CREATED:"LICENSEE_CREATED",LICENSE_CREATED:"LICENSE_CREATED",WARNING_LEVEL_CHANGED:"WARNING_LEVEL_CHANGED",PAYMENT_TRANSACTION_PROCESSED:"PAYMENT_TRANSACTION_PROCESSED"}}}},6359:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4756)),a=n(r(9293)),u=n(r(6232)),i=n(r(3401)),s=n(r(1305)),c=n(r(8833)),l=n(r(670)),f=n(r(4034)),d=n(r(6899));t.default={listLicenseTypes:function(e){return(0,a.default)(o.default.mark((function t(){var r,n;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.default.get(e,"".concat(u.default.Utility.ENDPOINT_PATH,"/").concat(u.default.Utility.ENDPOINT_PATH_LICENSE_TYPES));case 2:return r=t.sent,n=r.data,t.abrupt("return",(0,f.default)(n.items.item.filter((function(e){return"LicenseType"===e.type})).map((function(e){return(0,l.default)(e)})),n.items.pagenumber,n.items.itemsnumber,n.items.totalpages,n.items.totalitems));case 5:case"end":return t.stop()}}),t)})))()},listLicensingModels:function(e){return(0,a.default)(o.default.mark((function t(){var r,n;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.default.get(e,"".concat(u.default.Utility.ENDPOINT_PATH,"/").concat(u.default.Utility.ENDPOINT_PATH_LICENSING_MODELS));case 2:return r=t.sent,n=r.data,t.abrupt("return",(0,f.default)(n.items.item.filter((function(e){return"LicensingModelProperties"===e.type})).map((function(e){return(0,l.default)(e)})),n.items.pagenumber,n.items.itemsnumber,n.items.totalpages,n.items.totalitems));case 5:case"end":return t.stop()}}),t)})))()},listCountries:function(e,t){return(0,a.default)(o.default.mark((function r(){var n,a,l;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},!t){r.next=5;break}if(s.default.isValid(t)){r.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:n[u.default.FILTER]="string"==typeof t?t:c.default.encode(t);case 5:return r.next=7,i.default.get(e,"".concat(u.default.Utility.ENDPOINT_PATH,"/").concat(u.default.Utility.ENDPOINT_PATH_COUNTRIES),n);case 7:return a=r.sent,l=a.data,r.abrupt("return",(0,f.default)(l.items.item.filter((function(e){return"Country"===e.type})).map((function(e){return(0,d.default)(e)})),l.items.pagenumber,l.items.itemsnumber,l.items.totalpages,l.items.totalitems));case 10:case"end":return r.stop()}}),r)})))()}}},6425:(e,t,r)=>{"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:a}=Object,u=(i=Object.create(null),e=>{const t=o.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())});var i;const s=e=>(e=e.toLowerCase(),t=>u(t)===e),c=e=>t=>typeof t===e,{isArray:l}=Array,f=c("undefined");const d=s("ArrayBuffer");const p=c("string"),y=c("function"),h=c("number"),m=e=>null!==e&&"object"==typeof e,v=e=>{if("object"!==u(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},g=s("Date"),b=s("File"),P=s("Blob"),E=s("FileList"),N=s("URLSearchParams"),[T,O,w,k]=["ReadableStream","Request","Response","Headers"].map(s);function _(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),l(e))for(n=0,o=e.length;n0;)if(n=r[o],t===n.toLowerCase())return n;return null}const x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,A=e=>!f(e)&&e!==x;const L=(S="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>S&&e instanceof S);var S;const M=s("HTMLFormElement"),j=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),I=s("RegExp"),D=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};_(r,((r,o)=>{let a;!1!==(a=t(r,o,e))&&(n[o]=a||r)})),Object.defineProperties(e,n)};const U=s("AsyncFunction"),C=(B="function"==typeof setImmediate,F=y(x.postMessage),B?setImmediate:F?(H=`axios@${Math.random()}`,V=[],x.addEventListener("message",(({source:e,data:t})=>{e===x&&t===H&&V.length&&V.shift()()}),!1),e=>{V.push(e),x.postMessage(H,"*")}):e=>setTimeout(e));var B,F,H,V;const q="undefined"!=typeof queueMicrotask?queueMicrotask.bind(x):"undefined"!=typeof process&&process.nextTick||C;var K={isArray:l,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&y(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||y(e.append)&&("formdata"===(t=u(e))||"object"===t&&y(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer),t},isString:p,isNumber:h,isBoolean:e=>!0===e||!1===e,isObject:m,isPlainObject:v,isReadableStream:T,isRequest:O,isResponse:w,isHeaders:k,isUndefined:f,isDate:g,isFile:b,isBlob:P,isRegExp:I,isFunction:y,isStream:e=>m(e)&&y(e.pipe),isURLSearchParams:N,isTypedArray:L,isFileList:E,forEach:_,merge:function e(){const{caseless:t}=A(this)&&this||{},r={},n=(n,o)=>{const a=t&&R(r,o)||o;v(r[a])&&v(n)?r[a]=e(r[a],n):v(n)?r[a]=e({},n):l(n)?r[a]=n.slice():r[a]=n};for(let e=0,t=arguments.length;e(_(t,((t,o)=>{r&&y(t)?e[o]=n(t,r):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,u,i;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),u=o.length;u-- >0;)i=o[u],n&&!n(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==r&&a(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:u,kindOfTest:s,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!h(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:M,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:D,freezeMethods:e=>{D(e,((t,r)=>{if(y(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];y(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return l(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:R,global:x,isContextDefined:A,isSpecCompliantForm:function(e){return!!(e&&y(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(m(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=l(e)?[]:{};return _(e,((e,t)=>{const a=r(e,n+1);!f(a)&&(o[t]=a)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:U,isThenable:e=>e&&(m(e)||y(e))&&y(e.then)&&y(e.catch),setImmediate:C,asap:q};function Y(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}K.inherits(Y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const J=Y.prototype,W={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{W[e]={value:e}})),Object.defineProperties(Y,W),Object.defineProperty(J,"isAxiosError",{value:!0}),Y.from=(e,t,r,n,o,a)=>{const u=Object.create(J);return K.toFlatObject(e,u,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Y.call(u,e.message,t,r,n,o),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};function G(e){return K.isPlainObject(e)||K.isArray(e)}function z(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function $(e,t,r){return e?e.concat(t).map((function(e,t){return e=z(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const X=K.toFlatObject(K,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Q(e,t,r){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=K.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!K.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,a=r.dots,u=r.indexes,i=(r.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!i&&K.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){let i=e;if(e&&!o&&"object"==typeof e)if(K.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(G)}(e)||(K.isFileList(e)||K.endsWith(r,"[]"))&&(i=K.toArray(e)))return r=z(r),i.forEach((function(e,n){!K.isUndefined(e)&&null!==e&&t.append(!0===u?$([r],n,a):null===u?r:r+"[]",s(e))})),!1;return!!G(e)||(t.append($(o,r,a),s(e)),!1)}const l=[],f=Object.assign(X,{defaultVisitor:c,convertValue:s,isVisitable:G});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!K.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),K.forEach(r,(function(r,a){!0===(!(K.isUndefined(r)||null===r)&&o.call(t,r,K.isString(a)?a.trim():a,n,f))&&e(r,n?n.concat(a):[a])})),l.pop()}}(e),t}function Z(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ee(e,t){this._pairs=[],e&&Q(e,this,t)}const te=ee.prototype;function re(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ne(e,t,r){if(!t)return e;const n=r&&r.encode||re;K.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let a;if(a=o?o(t,r):K.isURLSearchParams(t)?t.toString():new ee(t,r).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}te.append=function(e,t){this._pairs.push([e,t])},te.toString=function(e){const t=e?function(t){return e.call(this,t,Z)}:Z;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var oe=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ae={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ee,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ie="undefined"!=typeof window&&"undefined"!=typeof document,se="object"==typeof navigator&&navigator||void 0,ce=ie&&(!se||["ReactNative","NativeScript","NS"].indexOf(se.product)<0),le="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,fe=ie&&window.location.href||"http://localhost";var de={...Object.freeze({__proto__:null,hasBrowserEnv:ie,hasStandardBrowserWebWorkerEnv:le,hasStandardBrowserEnv:ce,navigator:se,origin:fe}),...ue};function pe(e){function t(e,r,n,o){let a=e[o++];if("__proto__"===a)return!0;const u=Number.isFinite(+a),i=o>=e.length;if(a=!a&&K.isArray(n)?n.length:a,i)return K.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!u;n[a]&&K.isObject(n[a])||(n[a]=[]);return t(e,r,n[a],o)&&K.isArray(n[a])&&(n[a]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let a;for(n=0;n{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const ye={transitional:ae,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=K.isObject(e);o&&K.isHTMLForm(e)&&(e=new FormData(e));if(K.isFormData(e))return n?JSON.stringify(pe(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Q(e,new de.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return de.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=K.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Q(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ye.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:de.classes.FormData,Blob:de.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],(e=>{ye.headers[e]={}}));var he=ye;const me=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const ve=Symbol("internals");function ge(e){return e&&String(e).trim().toLowerCase()}function be(e){return!1===e||null==e?e:K.isArray(e)?e.map(be):String(e)}function Pe(e,t,r,n,o){return K.isFunction(n)?n.call(this,t,r):(o&&(t=r),K.isString(t)?K.isString(n)?-1!==t.indexOf(n):K.isRegExp(n)?n.test(t):void 0:void 0)}class Ee{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=ge(t);if(!o)throw new Error("header name must be a non-empty string");const a=K.findKey(n,o);(!a||void 0===n[a]||!0===r||void 0===r&&!1!==n[a])&&(n[a||t]=be(e))}const a=(e,t)=>K.forEach(e,((e,r)=>o(e,r,t)));if(K.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&me[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(K.isHeaders(e))for(const[t,n]of e.entries())o(n,t,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=ge(e)){const r=K.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(K.isFunction(t))return t.call(this,e,r);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ge(e)){const r=K.findKey(this,e);return!(!r||void 0===this[r]||t&&!Pe(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=ge(e)){const o=K.findKey(r,e);!o||t&&!Pe(0,r[o],o,t)||(delete r[o],n=!0)}}return K.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!Pe(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return K.forEach(this,((n,o)=>{const a=K.findKey(r,o);if(a)return t[a]=be(n),void delete t[o];const u=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();u!==o&&delete t[o],t[u]=be(n),r[u]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&K.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[ve]=this[ve]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ge(e);t[n]||(!function(e,t){const r=K.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return K.isArray(e)?e.forEach(n):n(e),this}}Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(Ee.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),K.freezeMethods(Ee);var Ne=Ee;function Te(e,t){const r=this||he,n=t||r,o=Ne.from(n.headers);let a=n.data;return K.forEach(e,(function(e){a=e.call(r,a,o.normalize(),t?t.status:void 0)})),o.normalize(),a}function Oe(e){return!(!e||!e.__CANCEL__)}function we(e,t,r){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,r),this.name="CanceledError"}function ke(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Y("Request failed with status code "+r.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}K.inherits(we,Y,{__CANCEL__:!0});const _e=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,a=0,u=0;return t=void 0!==t?t:1e3,function(i){const s=Date.now(),c=n[u];o||(o=s),r[a]=i,n[a]=s;let l=u,f=0;for(;l!==a;)f+=r[l++],l%=e;if(a=(a+1)%e,a===u&&(u=(u+1)%e),s-o{o=a,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-o;i>=a?u(e,t):(r=e,n||(n=setTimeout((()=>{n=null,u(r)}),a-i)))},()=>r&&u(r)]}((r=>{const a=r.loaded,u=r.lengthComputable?r.total:void 0,i=a-n,s=o(i);n=a;e({loaded:a,total:u,progress:u?a/u:void 0,bytes:i,rate:s||void 0,estimated:s&&u&&a<=u?(u-a)/s:void 0,event:r,lengthComputable:null!=u,[t?"download":"upload"]:!0})}),r)},Re=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},xe=e=>(...t)=>K.asap((()=>e(...t)));var Ae=de.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,de.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(de.origin),de.navigator&&/(msie|trident)/i.test(de.navigator.userAgent)):()=>!0,Le=de.hasStandardBrowserEnv?{write(e,t,r,n,o,a){const u=[e+"="+encodeURIComponent(t)];K.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),K.isString(n)&&u.push("path="+n),K.isString(o)&&u.push("domain="+o),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Se(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&n||0==r?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Me=e=>e instanceof Ne?{...e}:e;function je(e,t){t=t||{};const r={};function n(e,t,r,n){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:n},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function o(e,t,r,o){return K.isUndefined(t)?K.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function a(e,t){if(!K.isUndefined(t))return n(void 0,t)}function u(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function i(r,o,a){return a in t?n(r,o):a in e?n(void 0,r):void 0}const s={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:i,headers:(e,t,r)=>o(Me(e),Me(t),0,!0)};return K.forEach(Object.keys(Object.assign({},e,t)),(function(n){const a=s[n]||o,u=a(e[n],t[n],n);K.isUndefined(u)&&a!==i||(r[n]=u)})),r}var Ie=e=>{const t=je({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:a,xsrfCookieName:u,headers:i,auth:s}=t;if(t.headers=i=Ne.from(i),t.url=ne(Se(t.baseURL,t.url),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),K.isFormData(n))if(de.hasStandardBrowserEnv||de.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(!1!==(r=i.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}if(de.hasStandardBrowserEnv&&(o&&K.isFunction(o)&&(o=o(t)),o||!1!==o&&Ae(t.url))){const e=a&&u&&Le.read(u);e&&i.set(a,e)}return t};var De="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Ie(e);let o=n.data;const a=Ne.from(n.headers).normalize();let u,i,s,c,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=n;function y(){c&&c(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;function m(){if(!h)return;const n=Ne.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());ke((function(e){t(e),y()}),(function(e){r(e),y()}),{data:f&&"text"!==f&&"json"!==f?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout,"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(m)},h.onabort=function(){h&&(r(new Y("Request aborted",Y.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Y("Network Error",Y.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||ae;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Y(t,o.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,h)),h=null},void 0===o&&a.setContentType(null),"setRequestHeader"in h&&K.forEach(a.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),K.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),f&&"json"!==f&&(h.responseType=n.responseType),p&&([s,l]=_e(p,!0),h.addEventListener("progress",s)),d&&h.upload&&([i,c]=_e(d),h.upload.addEventListener("progress",i),h.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(u=t=>{h&&(r(!t||t.type?new we(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);v&&-1===de.protocols.indexOf(v)?r(new Y("Unsupported protocol "+v+":",Y.ERR_BAD_REQUEST,e)):h.send(o||null)}))};var Ue=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,u();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Y?t:new we(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{a=null,o(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))}),t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:i}=n;return i.unsubscribe=()=>K.asap(u),i}};const Ce=function*(e,t){let r=e.byteLength;if(!t||r{const o=async function*(e,t){for await(const r of Be(e))yield*Ce(r,t)}(e,t);let a,u=0,i=e=>{a||(a=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return i(),void e.close();let a=n.byteLength;if(r){let e=u+=a;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw i(e),e}},cancel:e=>(i(e),o.return())},{highWaterMark:2})},He="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ve=He&&"function"==typeof ReadableStream,qe=He&&("function"==typeof TextEncoder?(Ke=new TextEncoder,e=>Ke.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ke;const Ye=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Je=Ve&&Ye((()=>{let e=!1;const t=new Request(de.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),We=Ve&&Ye((()=>K.isReadableStream(new Response("").body))),Ge={stream:We&&(e=>e.body)};var ze;He&&(ze=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ge[e]&&(Ge[e]=K.isFunction(ze[e])?t=>t[e]():(t,r)=>{throw new Y(`Response type '${e}' is not supported`,Y.ERR_NOT_SUPPORT,r)})})));const $e=async(e,t)=>{const r=K.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e)){const t=new Request(de.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return K.isArrayBufferView(e)||K.isArrayBuffer(e)?e.byteLength:(K.isURLSearchParams(e)&&(e+=""),K.isString(e)?(await qe(e)).byteLength:void 0)})(t):r};const Xe={http:null,xhr:De,fetch:He&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:a,timeout:u,onDownloadProgress:i,onUploadProgress:s,responseType:c,headers:l,withCredentials:f="same-origin",fetchOptions:d}=Ie(e);c=c?(c+"").toLowerCase():"text";let p,y=Ue([o,a&&a.toAbortSignal()],u);const h=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let m;try{if(s&&Je&&"get"!==r&&"head"!==r&&0!==(m=await $e(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(K.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=Re(m,_e(xe(s)));n=Fe(r.body,65536,e,t)}}K.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...d,signal:y,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?f:void 0});let a=await fetch(p);const u=We&&("stream"===c||"response"===c);if(We&&(i||u&&h)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=a[t]}));const t=K.toFiniteNumber(a.headers.get("content-length")),[r,n]=i&&Re(t,_e(xe(i),!0))||[];a=new Response(Fe(a.body,65536,r,(()=>{n&&n(),h&&h()})),e)}c=c||"text";let v=await Ge[K.findKey(Ge,c)||"text"](a,e);return!u&&h&&h(),await new Promise(((t,r)=>{ke(t,r,{data:v,headers:Ne.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:p})}))}catch(t){if(h&&h(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,p),{cause:t.cause||t});throw Y.from(t,t&&t.code,e,p)}})};K.forEach(Xe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Qe=e=>`- ${e}`,Ze=e=>K.isFunction(e)||null===e||!1===e;var et=e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let a=0;a`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Y("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Qe).join("\n"):" "+Qe(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function tt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new we(null,e)}function rt(e){tt(e),e.headers=Ne.from(e.headers),e.data=Te.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return et(e.adapter||he.adapter)(e).then((function(t){return tt(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Ne.from(t.headers),t}),(function(t){return Oe(t)||(tt(e),t&&t.response&&(t.response.data=Te.call(e,e.transformResponse,t.response),t.response.headers=Ne.from(t.response.headers))),Promise.reject(t)}))}const nt="1.8.2",ot={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ot[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const at={};ot.transitional=function(e,t,r){function n(e,t){return"[Axios v1.8.2] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,a)=>{if(!1===e)throw new Y(n(o," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!at[o]&&(at[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,a)}},ot.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var ut={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const a=n[o],u=t[a];if(u){const t=e[a],r=void 0===t||u(t,a,e);if(!0!==r)throw new Y("option "+a+" must be "+r,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Y("Unknown option "+a,Y.ERR_BAD_OPTION)}},validators:ot};const it=ut.validators;class st{constructor(e){this.defaults=e,this.interceptors={request:new oe,response:new oe}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=je(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&ut.assertOptions(r,{silentJSONParsing:it.transitional(it.boolean),forcedJSONParsing:it.transitional(it.boolean),clarifyTimeoutError:it.transitional(it.boolean)},!1),null!=n&&(K.isFunction(n)?t.paramsSerializer={serialize:n}:ut.assertOptions(n,{encode:it.function,serialize:it.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ut.assertOptions(t,{baseUrl:it.spelling("baseURL"),withXsrfToken:it.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&K.merge(o.common,o[t.method]);o&&K.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ne.concat(a,o);const u=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,u.unshift(e.fulfilled,e.rejected))}));const s=[];let c;this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)}));let l,f=0;if(!i){const e=[rt.bind(this),void 0];for(e.unshift.apply(e,u),e.push.apply(e,s),l=e.length,c=Promise.resolve(t);f{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new we(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new lt((function(t){e=t})),cancel:e}}}var ft=lt;const dt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(dt).forEach((([e,t])=>{dt[t]=e}));var pt=dt;const yt=function e(t){const r=new ct(t),o=n(ct.prototype.request,r);return K.extend(o,ct.prototype,r,{allOwnKeys:!0}),K.extend(o,r,null,{allOwnKeys:!0}),o.create=function(r){return e(je(t,r))},o}(he);yt.Axios=ct,yt.CanceledError=we,yt.CancelToken=ft,yt.isCancel=Oe,yt.VERSION=nt,yt.toFormData=Q,yt.AxiosError=Y,yt.Cancel=yt.CanceledError,yt.all=function(e){return Promise.all(e)},yt.spread=function(e){return function(t){return e.apply(null,t)}},yt.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},yt.mergeConfig=je,yt.AxiosHeaders=Ne,yt.formToJSON=e=>pe(K.isHTMLForm(e)?new FormData(e):e),yt.getAdapter=et,yt.HttpStatusCode=pt,yt.default=yt,e.exports=yt},6469:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(1837));function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}t.default=function(e){function t(){var e,r,n,a;(0,o.default)(this,t);for(var s=arguments.length,c=new Array(s),f=0;f{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4756)),a=n(r(5715)),u=n(r(9293)),i=n(r(6232)),s=n(r(1305)),c=n(r(3401)),l=n(r(8833)),f=n(r(2430)),d=n(r(4034));t.default={get:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,l,d,p;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return s.default.paramNotEmpty(t,i.default.NUMBER),r.next=3,c.default.get(e,"".concat(i.default.PaymentMethod.ENDPOINT_PATH,"/").concat(t));case 3:return n=r.sent,u=n.data.items.item,l=u.filter((function(e){return"PaymentMethod"===e.type})),d=(0,a.default)(l,1),p=d[0],r.abrupt("return",(0,f.default)(p));case 7:case"end":return r.stop()}}),r)})))()},list:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,a,u;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},!t){r.next=5;break}if(s.default.isValid(t)){r.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:n[i.default.FILTER]="string"==typeof t?t:l.default.encode(t);case 5:return r.next=7,c.default.get(e,i.default.PaymentMethod.ENDPOINT_PATH,n);case 7:return a=r.sent,u=a.data,r.abrupt("return",(0,d.default)(u.items.item.filter((function(e){return"PaymentMethod"===e.type})).map((function(e){return(0,f.default)(e)})),u.items.pagenumber,u.items.itemsnumber,u.items.totalpages,u.items.totalitems));case 10:case"end":return r.stop()}}),r)})))()},update:function(e,t,r){return(0,u.default)(o.default.mark((function n(){var u,l,d,p,y,h;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s.default.paramNotEmpty(t,i.default.NUMBER),u="".concat(i.default.PaymentMethod.ENDPOINT_PATH,"/").concat(t),n.next=4,c.default.post(e,u,r.asPropertiesMap());case 4:return l=n.sent,d=l.data.items.item,p=d.filter((function(e){return"PaymentMethod"===e.type})),y=(0,a.default)(p,1),h=y[0],n.abrupt("return",(0,f.default)(h));case 8:case"end":return n.stop()}}),n)})))()}}},6899:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(670)),a=n(r(7147));t.default=function(e){return new a.default((0,o.default)(e))}},7122:(e,t,r)=>{var n=r(79);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},7131:e=>{!function(){"use strict";e.exports=function(e){return(e instanceof Buffer?e:Buffer.from(e.toString(),"binary")).toString("base64")}}()},7147:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(635));function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}t.default=function(e){function t(e){return(0,o.default)(this,t),r=this,n=t,a=[{properties:e,casts:{code:"string",name:"string",vatPercent:"int",isEu:"boolean"}}],n=(0,i.default)(n),(0,u.default)(r,l()?Reflect.construct(n,a||[],(0,i.default)(r).constructor):n.apply(r,a));var r,n,a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"setCode",value:function(e){return this.setProperty("code",e)}},{key:"getCode",value:function(e){return this.getProperty("code",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setVatPercent",value:function(e){return this.setProperty("vatPercent",e)}},{key:"getVatPercent",value:function(e){return this.getProperty("vatPercent",e)}},{key:"setIsEu",value:function(e){return this.setProperty("isEu",e)}},{key:"getIsEu",value:function(e){return this.getProperty("isEu",e)}}])}(c.default)},7211:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4756)),a=n(r(5715)),u=n(r(9293)),i=n(r(1305)),s=n(r(8833)),c=n(r(6232)),l=n(r(3401)),f=n(r(8506)),d=n(r(4067)),p=n(r(4034)),y=n(r(670));t.default={create:function(e,t,r){return(0,u.default)(o.default.mark((function n(){var u,s,f,p,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i.default.paramNotEmpty(t,c.default.Product.PRODUCT_NUMBER),r.setProperty(c.default.Product.PRODUCT_NUMBER,t),n.next=4,l.default.post(e,c.default.Licensee.ENDPOINT_PATH,r.asPropertiesMap());case 4:return u=n.sent,s=u.data.items.item,f=s.filter((function(e){return"Licensee"===e.type})),p=(0,a.default)(f,1),y=p[0],n.abrupt("return",(0,d.default)(y));case 8:case"end":return n.stop()}}),n)})))()},get:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,s,f,p;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i.default.paramNotEmpty(t,c.default.NUMBER),r.next=3,l.default.get(e,"".concat(c.default.Licensee.ENDPOINT_PATH,"/").concat(t));case 3:return n=r.sent,u=n.data.items.item,s=u.filter((function(e){return"Licensee"===e.type})),f=(0,a.default)(s,1),p=f[0],r.abrupt("return",(0,d.default)(p));case 7:case"end":return r.stop()}}),r)})))()},list:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,a,u;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},!t){r.next=5;break}if(i.default.isValid(t)){r.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:n[c.default.FILTER]="string"==typeof t?t:s.default.encode(t);case 5:return r.next=7,l.default.get(e,c.default.Licensee.ENDPOINT_PATH,n);case 7:return a=r.sent,u=a.data,r.abrupt("return",(0,p.default)(u.items.item.filter((function(e){return"Licensee"===e.type})).map((function(e){return(0,d.default)(e)})),u.items.pagenumber,u.items.itemsnumber,u.items.totalpages,u.items.totalitems));case 10:case"end":return r.stop()}}),r)})))()},update:function(e,t,r){return(0,u.default)(o.default.mark((function n(){var u,s,f,p,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i.default.paramNotEmpty(t,c.default.NUMBER),n.next=3,l.default.post(e,"".concat(c.default.Licensee.ENDPOINT_PATH,"/").concat(t),r.asPropertiesMap());case 3:return u=n.sent,s=u.data.items.item,f=s.filter((function(e){return"Licensee"===e.type})),p=(0,a.default)(f,1),y=p[0],n.abrupt("return",(0,d.default)(y));case 7:case"end":return n.stop()}}),n)})))()},delete:function(e,t,r){i.default.paramNotEmpty(t,c.default.NUMBER);var n={forceCascade:Boolean(r)};return l.default.delete(e,"".concat(c.default.Licensee.ENDPOINT_PATH,"/").concat(t),n)},validate:function(e,t,r){return(0,u.default)(o.default.mark((function n(){var a,u,s,d,p,h,m,v,g;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i.default.paramNotEmpty(t,c.default.NUMBER),a={},r.getProductNumber()&&(a.productNumber=r.getProductNumber()),Object.keys(r.getLicenseeProperties()).forEach((function(e){a[e]=r.getLicenseeProperty(e)})),r.isForOfflineUse()&&(a.forOfflineUse=!0),r.getDryRun()&&(a.dryRun=!0),u=0,s=r.getParameters(),d=Object.prototype.hasOwnProperty,Object.keys(s).forEach((function(e){if(a["".concat(c.default.ProductModule.PRODUCT_MODULE_NUMBER).concat(u)]=e,d.call(s,e)){var t=s[e];Object.keys(t).forEach((function(e){d.call(t,e)&&(a[e+u]=t[e])})),u+=1}})),n.next=12,l.default.post(e,"".concat(c.default.Licensee.ENDPOINT_PATH,"/").concat(t,"/").concat(c.default.Licensee.ENDPOINT_PATH_VALIDATE),a);case 12:return p=n.sent,h=p.data,m=h.items.item,v=h.ttl,(g=new f.default).setTtl(v),m.filter((function(e){return"ProductModuleValidation"===e.type})).forEach((function(e){var t=(0,y.default)(e);g.setProductModuleValidation(t[c.default.ProductModule.PRODUCT_MODULE_NUMBER],t)})),n.abrupt("return",g);case 20:case"end":return n.stop()}}),n)})))()},transfer:function(e,t,r){i.default.paramNotEmpty(t,c.default.NUMBER),i.default.paramNotEmpty(r,c.default.Licensee.SOURCE_LICENSEE_NUMBER);var n={sourceLicenseeNumber:r};return l.default.post(e,"".concat(c.default.Licensee.ENDPOINT_PATH,"/").concat(t,"/").concat(c.default.Licensee.ENDPOINT_PATH_TRANSFER),n)}}},7383:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},7394:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4756)),a=n(r(5715)),u=n(r(9293)),i=n(r(1305)),s=n(r(6232)),c=n(r(3401)),l=n(r(8833)),f=n(r(5402)),d=n(r(4034));t.default={create:function(e,t,r,n,l){return(0,u.default)(o.default.mark((function u(){var d,p,y,h,m;return o.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i.default.paramNotEmpty(t,s.default.Licensee.LICENSEE_NUMBER),i.default.paramNotEmpty(r,s.default.LicenseTemplate.LICENSE_TEMPLATE_NUMBER),l.setProperty(s.default.Licensee.LICENSEE_NUMBER,t),l.setProperty(s.default.LicenseTemplate.LICENSE_TEMPLATE_NUMBER,r),n&&l.setProperty(s.default.Transaction.TRANSACTION_NUMBER,n),o.next=7,c.default.post(e,s.default.License.ENDPOINT_PATH,l.asPropertiesMap());case 7:return d=o.sent,p=d.data.items.item,y=p.filter((function(e){return"License"===e.type})),h=(0,a.default)(y,1),m=h[0],o.abrupt("return",(0,f.default)(m));case 11:case"end":return o.stop()}}),u)})))()},get:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,u,l,d,p;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i.default.paramNotEmpty(t,s.default.NUMBER),r.next=3,c.default.get(e,"".concat(s.default.License.ENDPOINT_PATH,"/").concat(t));case 3:return n=r.sent,u=n.data.items.item,l=u.filter((function(e){return"License"===e.type})),d=(0,a.default)(l,1),p=d[0],r.abrupt("return",(0,f.default)(p));case 7:case"end":return r.stop()}}),r)})))()},list:function(e,t){return(0,u.default)(o.default.mark((function r(){var n,a,u;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},!t){r.next=5;break}if(i.default.isValid(t)){r.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:n[s.default.FILTER]="string"==typeof t?t:l.default.encode(t);case 5:return r.next=7,c.default.get(e,s.default.License.ENDPOINT_PATH,n);case 7:return a=r.sent,u=a.data,r.abrupt("return",(0,d.default)(u.items.item.filter((function(e){return"License"===e.type})).map((function(e){return(0,f.default)(e)})),u.items.pagenumber,u.items.itemsnumber,u.items.totalpages,u.items.totalitems));case 10:case"end":return r.stop()}}),r)})))()},update:function(e,t,r,n){return(0,u.default)(o.default.mark((function u(){var l,d,p,y,h;return o.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i.default.paramNotEmpty(t,s.default.NUMBER),r&&n.setProperty(s.default.Transaction.TRANSACTION_NUMBER,r),o.next=4,c.default.post(e,"".concat(s.default.License.ENDPOINT_PATH,"/").concat(t),n.asPropertiesMap());case 4:return l=o.sent,d=l.data.items.item,p=d.filter((function(e){return"License"===e.type})),y=(0,a.default)(p,1),h=y[0],o.abrupt("return",(0,f.default)(h));case 8:case"end":return o.stop()}}),u)})))()},delete:function(e,t,r){i.default.paramNotEmpty(t,s.default.NUMBER);var n={forceCascade:Boolean(r)};return c.default.delete(e,"".concat(s.default.License.ENDPOINT_PATH,"/").concat(t),n)}}},7550:e=>{function t(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(r){}return(e.exports=t=function(){return!!r},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},7736:(e,t,r)=>{var n=r(3738).default,o=r(9045);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},7752:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"netlicensing-client","version":"1.2.38","description":"JavaScript Wrapper for Labs64 NetLicensing RESTful API","keywords":["labs64","netlicensing","licensing","licensing-as-a-service","license","license-management","software-license","client","restful","restful-api","javascript","wrapper","api","client"],"license":"Apache-2.0","author":"Labs64 GmbH","homepage":"https://netlicensing.io","repository":{"type":"git","url":"https://github.com/Labs64/NetLicensingClient-javascript"},"bugs":{"url":"https://github.com/Labs64/NetLicensingClient-javascript/issues"},"contributors":[{"name":"Ready Brown","email":"ready.brown@hotmail.de","url":"https://github.com/r-brown"},{"name":"Viacheslav Rudkovskiy","email":"viachaslau.rudkovski@labs64.de","url":"https://github.com/v-rudkovskiy"},{"name":"Andrei Yushkevich","email":"yushkevich@me.com","url":"https://github.com/yushkevich"}],"main":"dist/netlicensing-client.js","files":["dist"],"scripts":{"build":"node build/build.cjs","release":"npm run build && npm run test","dev":"webpack --progress --watch --config build/webpack.dev.conf.cjs","test":"karma start test/karma.conf.js --single-run","test-mocha":"webpack --config build/webpack.test.conf.cjs","test-for-travis":"karma start test/karma.conf.js --single-run --browsers Firefox","lint":"eslint --ext .js,.vue src test"},"dependencies":{"axios":"^1.8.2","btoa":"^1.2.1","es6-promise":"^4.2.8"},"devDependencies":{"@babel/core":"^7.26.9","@babel/plugin-proposal-class-properties":"^7.16.7","@babel/plugin-proposal-decorators":"^7.25.9","@babel/plugin-proposal-export-namespace-from":"^7.16.7","@babel/plugin-proposal-function-sent":"^7.25.9","@babel/plugin-proposal-json-strings":"^7.16.7","@babel/plugin-proposal-numeric-separator":"^7.16.7","@babel/plugin-proposal-throw-expressions":"^7.25.9","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-meta":"^7.10.4","@babel/plugin-transform-modules-commonjs":"^7.26.3","@babel/plugin-transform-runtime":"^7.26.9","@babel/preset-env":"^7.26.9","@babel/runtime":"^7.26.9","axios-mock-adapter":"^2.1.0","babel-eslint":"^10.1.0","babel-loader":"^9.2.1","chalk":"^4.1.2","eslint":"^8.2.0","eslint-config-airbnb-base":"^15.0.0","eslint-friendly-formatter":"^4.0.1","eslint-import-resolver-webpack":"^0.13.10","eslint-plugin-import":"^2.31.0","eslint-plugin-jasmine":"^4.2.2","eslint-webpack-plugin":"^4.2.0","faker":"^5.5.3","is-docker":"^2.2.1","jasmine":"^4.0.2","jasmine-core":"^4.0.1","karma":"^6.3.17","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^4.0.2","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"0.0.33","karma-webpack":"^5.0.0","lodash":"^4.17.21","ora":"^5.4.1","rimraf":"^3.0.2","terser-webpack-plugin":"^5.3.1","webpack":"^5.76.0","webpack-cli":"^5.1.1","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.0.0","npm":">= 8.0.0"},"browserslist":["> 1%","last 2 versions","not ie <= 10"]}')},8452:(e,t,r)=>{var n=r(3738).default,o=r(2475);e.exports=function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},8506:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(3738)),a=n(r(3693)),u=n(r(7383)),i=n(r(4579)),s=n(r(1305));function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.default=function(){return(0,i.default)((function e(){(0,u.default)(this,e),this.validators={}}),[{key:"getValidators",value:function(){return function(e){for(var t=1;t"),r.call(t,n)&&(e+=JSON.stringify(t[n]))})),e+="]"}}])}()},8769:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e,t){switch(e.trim().toLowerCase()){case"str":case"string":return String(t);case"int":case"integer":var r=parseInt(t,10);return Number.isNaN(r)?t:r;case"float":case"double":var n=parseFloat(t);return Number.isNaN(n)?t:n;case"bool":case"boolean":switch(t){case"true":case"TRUE":return!0;case"false":case"FALSE":return!1;default:return Boolean(t)}case"date":return"now"===t?"now":new Date(String(t));default:return t}}},8833:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(5715));t.default={FILTER_DELIMITER:";",FILTER_PAIR_DELIMITER:"=",encode:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[],n=Object.prototype.hasOwnProperty;return Object.keys(t).forEach((function(o){n.call(t,o)&&r.push("".concat(o).concat(e.FILTER_PAIR_DELIMITER).concat(t[o]))})),r.join(this.FILTER_DELIMITER)},decode:function(){var e=this,t={};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(this.FILTER_DELIMITER).forEach((function(r){var n=r.split(e.FILTER_PAIR_DELIMITER),a=(0,o.default)(n,2),u=a[0],i=a[1];t[u]=i})),t}}},9045:(e,t,r)=>{var n=r(3738).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9089:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(4756)),a=n(r(3693)),u=n(r(5715)),i=n(r(9293)),s=n(r(3401)),c=n(r(6232)),l=n(r(1305)),f=n(r(8833)),d=n(r(3849)),p=n(r(5402)),y=n(r(4034));t.default={create:function(e,t){return(0,i.default)(o.default.mark((function r(){var n,a,i,l,f;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,s.default.post(e,c.default.Bundle.ENDPOINT_PATH,t.asPropertiesMap());case 2:return n=r.sent,a=n.data.items.item,i=a.filter((function(e){return"Bundle"===e.type})),l=(0,u.default)(i,1),f=l[0],r.abrupt("return",(0,d.default)(f));case 6:case"end":return r.stop()}}),r)})))()},get:function(e,t){return(0,i.default)(o.default.mark((function r(){var n,a,i,f,p;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return l.default.paramNotEmpty(t,c.default.NUMBER),r.next=3,s.default.get(e,"".concat(c.default.Bundle.ENDPOINT_PATH,"/").concat(t));case 3:return n=r.sent,a=n.data.items.item,i=a.filter((function(e){return"Bundle"===e.type})),f=(0,u.default)(i,1),p=f[0],r.abrupt("return",(0,d.default)(p));case 7:case"end":return r.stop()}}),r)})))()},list:function(e,t){return(0,i.default)(o.default.mark((function r(){var n,a,u;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},!t){r.next=5;break}if(l.default.isValid(t)){r.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:n[c.default.FILTER]="string"==typeof t?t:f.default.encode(t);case 5:return r.next=7,s.default.get(e,c.default.Bundle.ENDPOINT_PATH,n);case 7:return a=r.sent,u=a.data,r.abrupt("return",(0,y.default)(u.items.item.filter((function(e){return"Bundle"===e.type})).map((function(e){return(0,d.default)(e)})),u.items.pagenumber,u.items.itemsnumber,u.items.totalpages,u.items.totalitems));case 10:case"end":return r.stop()}}),r)})))()},update:function(e,t,r){return(0,i.default)(o.default.mark((function n(){var a,i,f,p,y;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return l.default.paramNotEmpty(t,c.default.NUMBER),n.next=3,s.default.post(e,"".concat(c.default.Bundle.ENDPOINT_PATH,"/").concat(t),r.asPropertiesMap());case 3:return a=n.sent,i=a.data.items.item,f=i.filter((function(e){return"Bundle"===e.type})),p=(0,u.default)(f,1),y=p[0],n.abrupt("return",(0,d.default)(y));case 7:case"end":return n.stop()}}),n)})))()},delete:function(e,t,r){l.default.paramNotEmpty(t,c.default.NUMBER);var n={forceCascade:Boolean(r)};return s.default.delete(e,"".concat(c.default.Bundle.ENDPOINT_PATH,"/").concat(t),n)},obtain:function(e,t,r){return(0,i.default)(o.default.mark((function n(){var u,i,f,d,y,h;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return l.default.paramNotEmpty(t,c.default.NUMBER),l.default.paramNotEmpty(r,c.default.Licensee.LICENSEE_NUMBER),u=c.default.Bundle,i=u.ENDPOINT_PATH,f=u.ENDPOINT_OBTAIN_PATH,d=(0,a.default)({},c.default.Licensee.LICENSEE_NUMBER,r),n.next=6,s.default.post(e,"".concat(i,"/").concat(t,"/").concat(f),d);case 6:return y=n.sent,h=y.data.items.item,n.abrupt("return",h.filter((function(e){return"License"===e.type})).map((function(e){return(0,p.default)(e)})));case 9:case"end":return n.stop()}}),n)})))()}}},9142:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(635));function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}t.default=function(e){function t(e){return(0,o.default)(this,t),r=this,n=t,a=[{properties:e,casts:{number:"string",active:"boolean",name:"string",licensingModel:"string",maxCheckoutValidity:"int",yellowThreshold:"int",redThreshold:"int",licenseTemplate:"string",inUse:"boolean",licenseeSecretMode:"string"}}],n=(0,i.default)(n),(0,u.default)(r,l()?Reflect.construct(n,a||[],(0,i.default)(r).constructor):n.apply(r,a));var r,n,a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setLicensingModel",value:function(e){return this.setProperty("licensingModel",e)}},{key:"getLicensingModel",value:function(e){return this.getProperty("licensingModel",e)}},{key:"setMaxCheckoutValidity",value:function(e){return this.setProperty("maxCheckoutValidity",e)}},{key:"getMaxCheckoutValidity",value:function(e){return this.getProperty("maxCheckoutValidity",e)}},{key:"setYellowThreshold",value:function(e){return this.setProperty("yellowThreshold",e)}},{key:"getYellowThreshold",value:function(e){return this.getProperty("yellowThreshold",e)}},{key:"setRedThreshold",value:function(e){return this.setProperty("redThreshold",e)}},{key:"getRedThreshold",value:function(e){return this.getProperty("redThreshold",e)}},{key:"setLicenseTemplate",value:function(e){return this.setProperty("licenseTemplate",e)}},{key:"getLicenseTemplate",value:function(e){return this.getProperty("licenseTemplate",e)}},{key:"getInUse",value:function(e){return this.getProperty("inUse",e)}},{key:"setLicenseeSecretMode",value:function(e){return this.setProperty("licenseeSecretMode",e)}},{key:"getLicenseeSecretMode",value:function(e){return this.getProperty("licenseeSecretMode",e)}}])}(c.default)},9293:e=>{function t(e,t,r,n,o,a,u){try{var i=e[a](u),s=i.value}catch(e){return void r(e)}i.done?t(s):Promise.resolve(s).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,a){var u=e.apply(r,n);function i(e){t(u,o,a,i,s,"next",e)}function s(e){t(u,o,a,i,s,"throw",e)}i(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},9511:(e,t,r)=>{var n=r(5636);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},9552:(e,t,r)=>{var n=r(3072);e.exports=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},9633:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(635));function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}t.default=function(e){function t(e){return(0,o.default)(this,t),r=this,n=t,a=[{properties:e,casts:{number:"string",active:"boolean",name:"string",price:"double",currency:"string"}}],n=(0,i.default)(n),(0,u.default)(r,l()?Reflect.construct(n,a||[],(0,i.default)(r).constructor):n.apply(r,a));var r,n,a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setDescription",value:function(e){return this.setProperty("description",e)}},{key:"getDescription",value:function(e){return this.getProperty("description",e)}},{key:"setPrice",value:function(e){return this.setProperty("price",e)}},{key:"getPrice",value:function(e){return this.getProperty("price",e)}},{key:"setCurrency",value:function(e){return this.setProperty("currency",e)}},{key:"getCurrency",value:function(e){return this.getProperty("currency",e)}},{key:"setLicenseTemplateNumbers",value:function(e){var t=Array.isArray(e)?e.join(","):e;return this.setProperty("licenseTemplateNumbers",t)}},{key:"getLicenseTemplateNumbers",value:function(e){var t=this.getProperty("licenseTemplateNumbers",e);return t?t.split(","):t}},{key:"addLicenseTemplateNumber",value:function(e){var t=this.getLicenseTemplateNumbers([]);return t.push(e),this.setLicenseTemplateNumbers(t)}},{key:"removeLicenseTemplateNumber",value:function(e){var t=this.getLicenseTemplateNumbers([]);return t.splice(t.indexOf(e),1),this.setLicenseTemplateNumbers(t)}}])}(c.default)},9646:(e,t,r)=>{var n=r(7550),o=r(5636);e.exports=function(e,t,r){if(n())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,t);var u=new(e.bind.apply(e,a));return r&&o(u,r.prototype),u},e.exports.__esModule=!0,e.exports.default=e.exports},9899:(e,t,r)=>{"use strict";var n=r(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(7383)),a=n(r(4579)),u=n(r(8452)),i=n(r(3072)),s=n(r(9511)),c=n(r(635));function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}t.default=function(e){function t(e){return(0,o.default)(this,t),r=this,n=t,a=[{properties:e,casts:{number:"string",active:"boolean",name:"string",licenseeSecret:"string",markedForTransfer:"boolean",inUse:"boolean"}}],n=(0,i.default)(n),(0,u.default)(r,l()?Reflect.construct(n,a||[],(0,i.default)(r).constructor):n.apply(r,a));var r,n,a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setProductNumber",value:function(e){return this.setProperty("productNumber",e)}},{key:"getProductNumber",value:function(e){return this.getProperty("productNumber",e)}},{key:"setLicenseeSecret",value:function(e){return this.setProperty("licenseeSecret",e)}},{key:"getLicenseeSecret",value:function(e){return this.getProperty("licenseeSecret",e)}},{key:"setMarkedForTransfer",value:function(e){return this.setProperty("markedForTransfer",e)}},{key:"getMarkedForTransfer",value:function(e){return this.getProperty("markedForTransfer",e)}},{key:"getInUse",value:function(e){return this.getProperty("inUse",e)}}])}(c.default)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var n={};return(()=>{"use strict";var e=n,t=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseEntity",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"Bundle",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(e,"BundleService",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"CastsUtils",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(e,"CheckUtils",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(e,"Constants",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"Context",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Country",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(e,"FilterUtils",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(e,"License",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(e,"LicenseService",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"LicenseTemplate",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(e,"LicenseTemplateService",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"LicenseTransactionJoin",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"Licensee",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(e,"LicenseeService",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"NlicError",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(e,"NotificationService",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"PaymentMethod",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"PaymentMethodService",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"Product",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(e,"ProductDiscount",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(e,"ProductModule",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,"ProductModuleService",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"ProductService",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Service",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"Token",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(e,"TokenService",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"Transaction",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(e,"TransactionService",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"UtilityService",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"ValidationParameters",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"ValidationResults",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"itemToBundle",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(e,"itemToCountry",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,"itemToLicense",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(e,"itemToLicenseTemplate",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(e,"itemToLicensee",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(e,"itemToObject",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(e,"itemToPaymentMethod",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(e,"itemToProduct",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(e,"itemToProductModule",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(e,"itemToToken",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(e,"itemToTransaction",{enumerable:!0,get:function(){return K.default}});var o=t(r(6232)),a=t(r(2302)),u=t(r(4034)),i=t(r(662)),s=t(r(8506)),c=t(r(3401)),l=t(r(7211)),f=t(r(7394)),d=t(r(3140)),p=t(r(6798)),y=t(r(3950)),h=t(r(5114)),m=t(r(5192)),v=t(r(2579)),g=t(r(6359)),b=t(r(9089)),P=t(r(1692)),E=t(r(635)),N=t(r(7147)),T=t(r(1938)),O=t(r(9899)),w=t(r(2476)),k=t(r(3014)),_=t(r(3262)),R=t(r(1721)),x=t(r(9142)),A=t(r(584)),L=t(r(269)),S=t(r(3716)),M=t(r(9633)),j=t(r(5454)),I=t(r(6899)),D=t(r(5402)),U=t(r(4067)),C=t(r(52)),B=t(r(670)),F=t(r(2430)),H=t(r(822)),V=t(r(4398)),q=t(r(3648)),K=t(r(1717)),Y=t(r(3849)),J=t(r(8769)),W=t(r(1305)),G=t(r(8833)),z=t(r(6469))})(),n})())); \ No newline at end of file diff --git a/dist/netlicensing-client.min.js.LICENSE.txt b/dist/netlicensing-client.min.js.LICENSE.txt deleted file mode 100644 index 701d846..0000000 --- a/dist/netlicensing-client.min.js.LICENSE.txt +++ /dev/null @@ -1,10 +0,0 @@ -/*! Axios v1.8.2 Copyright (c) 2025 Matt Zabriskie and contributors */ - -/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ - -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ diff --git a/dist/netlicensing-client.node.js b/dist/netlicensing-client.node.js deleted file mode 100644 index 8a4cbab..0000000 --- a/dist/netlicensing-client.node.js +++ /dev/null @@ -1,16981 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define("NetLicensing", [], factory); - else if(typeof exports === 'object') - exports["NetLicensing"] = factory(); - else - root["NetLicensing"] = factory(); -})(this, () => { -return /******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 28: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var iterate = __webpack_require__(8051) - , initState = __webpack_require__(9500) - , terminator = __webpack_require__(6276) - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; - -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); - - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } - - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ - -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} - - -/***/ }), - -/***/ 52: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _LicenseTemplate = _interopRequireDefault(__webpack_require__(2476)); -var _default = exports["default"] = function _default(item) { - return new _LicenseTemplate.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 76: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./functionCall')} */ -module.exports = Function.prototype.call; - - -/***/ }), - -/***/ 79: -/***/ ((module) => { - -function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 269: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -var _LicenseTransactionJoin = _interopRequireDefault(__webpack_require__(3716)); -var _License = _interopRequireDefault(__webpack_require__(1938)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * Transaction entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the transaction. This number is - * always generated by NetLicensing. - * @property string number - * - * always true for transactions - * @property boolean active - * - * Status of transaction. "CANCELLED", "CLOSED", "PENDING". - * @property string status - * - * "SHOP". AUTO transaction for internal use only. - * @property string source - * - * grand total for SHOP transaction (see source). - * @property float grandTotal - * - * discount for SHOP transaction (see source). - * @property float discount - * - * specifies currency for money fields (grandTotal and discount). Check data types to discover which - * @property string currency - * - * Date created. Optional. - * @property string dateCreated - * - * Date closed. Optional. - * @property string dateClosed - * - * @constructor - */ -var Transaction = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Transaction(properties) { - (0, _classCallCheck2.default)(this, Transaction); - return _callSuper(this, Transaction, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - name: 'string', - status: 'string', - source: 'string', - grandTotal: 'float', - discount: 'float', - currency: 'string', - dateCreated: 'date', - dateClosed: 'date', - active: 'boolean', - paymentMethod: 'string' - } - }]); - } - (0, _inherits2.default)(Transaction, _BaseEntity); - return (0, _createClass2.default)(Transaction, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setStatus", - value: function setStatus(status) { - return this.setProperty('status', status); - } - }, { - key: "getStatus", - value: function getStatus(def) { - return this.getProperty('status', def); - } - }, { - key: "setSource", - value: function setSource(source) { - return this.setProperty('source', source); - } - }, { - key: "getSource", - value: function getSource(def) { - return this.getProperty('source', def); - } - }, { - key: "setGrandTotal", - value: function setGrandTotal(grandTotal) { - return this.setProperty('grandTotal', grandTotal); - } - }, { - key: "getGrandTotal", - value: function getGrandTotal(def) { - return this.getProperty('grandTotal', def); - } - }, { - key: "setDiscount", - value: function setDiscount(discount) { - return this.setProperty('discount', discount); - } - }, { - key: "getDiscount", - value: function getDiscount(def) { - return this.getProperty('discount', def); - } - }, { - key: "setCurrency", - value: function setCurrency(currency) { - return this.setProperty('currency', currency); - } - }, { - key: "getCurrency", - value: function getCurrency(def) { - return this.getProperty('currency', def); - } - }, { - key: "setDateCreated", - value: function setDateCreated(dateCreated) { - return this.setProperty('dateCreated', dateCreated); - } - }, { - key: "getDateCreated", - value: function getDateCreated(def) { - return this.getProperty('dateCreated', def); - } - }, { - key: "setDateClosed", - value: function setDateClosed(dateClosed) { - return this.setProperty('dateClosed', dateClosed); - } - }, { - key: "getDateClosed", - value: function getDateClosed(def) { - return this.getProperty('dateClosed', def); - } - }, { - key: "setPaymentMethod", - value: function setPaymentMethod(paymentMethod) { - return this.setProperty('paymentMethod', paymentMethod); - } - }, { - key: "getPaymentMethod", - value: function getPaymentMethod(def) { - return this.getProperty('paymentMethod', def); - } - }, { - key: "setActive", - value: function setActive() { - return this.setProperty('active', true); - } - }, { - key: "getLicenseTransactionJoins", - value: function getLicenseTransactionJoins(def) { - return this.getProperty('licenseTransactionJoins', def); - } - }, { - key: "setLicenseTransactionJoins", - value: function setLicenseTransactionJoins(licenseTransactionJoins) { - return this.setProperty('licenseTransactionJoins', licenseTransactionJoins); - } - }, { - key: "setListLicenseTransactionJoin", - value: function setListLicenseTransactionJoin(properties) { - if (!properties) return; - var licenseTransactionJoins = this.getProperty('licenseTransactionJoins', []); - var licenseTransactionJoin = new _LicenseTransactionJoin.default(); - properties.forEach(function (property) { - if (property.name === 'licenseNumber') { - licenseTransactionJoin.setLicense(new _License.default({ - number: property.value - })); - } - if (property.name === 'transactionNumber') { - licenseTransactionJoin.setTransaction(new Transaction({ - number: property.value - })); - } - }); - licenseTransactionJoins.push(licenseTransactionJoin); - this.setProperty('licenseTransactionJoins', licenseTransactionJoins); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 405: -/***/ ((module) => { - -module.exports = defer; - -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); - - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} - - -/***/ }), - -/***/ 414: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./round')} */ -module.exports = Math.round; - - -/***/ }), - -/***/ 453: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var undefined; - -var $Object = __webpack_require__(9612); - -var $Error = __webpack_require__(9383); -var $EvalError = __webpack_require__(1237); -var $RangeError = __webpack_require__(9290); -var $ReferenceError = __webpack_require__(9538); -var $SyntaxError = __webpack_require__(8068); -var $TypeError = __webpack_require__(9675); -var $URIError = __webpack_require__(5345); - -var abs = __webpack_require__(1514); -var floor = __webpack_require__(8968); -var max = __webpack_require__(6188); -var min = __webpack_require__(8002); -var pow = __webpack_require__(5880); -var round = __webpack_require__(414); -var sign = __webpack_require__(3093); - -var $Function = Function; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = __webpack_require__(5795); -var $defineProperty = __webpack_require__(655); - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = __webpack_require__(4039)(); - -var getProto = __webpack_require__(3628); -var $ObjectGPO = __webpack_require__(1064); -var $ReflectGPO = __webpack_require__(8648); - -var $apply = __webpack_require__(1002); -var $call = __webpack_require__(76); - -var needsEval = {}; - -var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - __proto__: null, - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, - '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': $Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': $EvalError, - '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': $Object, - '%Object.getOwnPropertyDescriptor%': $gOPD, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': $RangeError, - '%ReferenceError%': $ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': $URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, - - '%Function.prototype.call%': $call, - '%Function.prototype.apply%': $apply, - '%Object.defineProperty%': $defineProperty, - '%Object.getPrototypeOf%': $ObjectGPO, - '%Math.abs%': abs, - '%Math.floor%': floor, - '%Math.max%': max, - '%Math.min%': min, - '%Math.pow%': pow, - '%Math.round%': round, - '%Math.sign%': sign, - '%Reflect.getPrototypeOf%': $ReflectGPO -}; - -if (getProto) { - try { - null.error; // eslint-disable-line no-unused-expressions - } catch (e) { - // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 - var errorProto = getProto(getProto(e)); - INTRINSICS['%Error.prototype%'] = errorProto; - } -} - -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen && getProto) { - value = getProto(gen.prototype); - } - } - - INTRINSICS[name] = value; - - return value; -}; - -var LEGACY_ALIASES = { - __proto__: null, - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = __webpack_require__(6743); -var hasOwn = __webpack_require__(9957); -var $concat = bind.call($call, Array.prototype.concat); -var $spliceApply = bind.call($apply, Array.prototype.splice); -var $replace = bind.call($call, String.prototype.replace); -var $strSlice = bind.call($call, String.prototype.slice); -var $exec = bind.call($call, RegExp.prototype.exec); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - if ($exec(/^%?[^%]*%?$/, name) === null) { - throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; - - -/***/ }), - -/***/ 584: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * Product module entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number - * @property string number - * - * If set to false, the token is disabled. - * @property boolean active - * - * Expiration Time - * @property string expirationTime - * - * @property string vendorNumber - * - * Token type to be generated. - * DEFAULT - default one-time token (will be expired after first request) - * SHOP - shop token is used to redirect customer to the netlicensingShop(licenseeNumber is mandatory) - * APIKEY - APIKey-token - * @property string tokenType - * - * @property string licenseeNumber - * - * @constructor - */ -var Token = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Token(properties) { - (0, _classCallCheck2.default)(this, Token); - return _callSuper(this, Token, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - expirationTime: 'date', - vendorNumber: 'string', - tokenType: 'string', - licenseeNumber: 'string', - successURL: 'string', - successURLTitle: 'string', - cancelURL: 'string', - cancelURLTitle: 'string', - shopURL: 'string' - } - }]); - } - (0, _inherits2.default)(Token, _BaseEntity); - return (0, _createClass2.default)(Token, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setExpirationTime", - value: function setExpirationTime(expirationTime) { - return this.setProperty('expirationTime', expirationTime); - } - }, { - key: "getExpirationTime", - value: function getExpirationTime(def) { - return this.getProperty('expirationTime', def); - } - }, { - key: "setVendorNumber", - value: function setVendorNumber(vendorNumber) { - return this.setProperty('vendorNumber', vendorNumber); - } - }, { - key: "getVendorNumber", - value: function getVendorNumber(def) { - return this.getProperty('vendorNumber', def); - } - }, { - key: "setTokenType", - value: function setTokenType(tokenType) { - return this.setProperty('tokenType', tokenType); - } - }, { - key: "getTokenType", - value: function getTokenType(def) { - return this.getProperty('tokenType', def); - } - }, { - key: "setLicenseeNumber", - value: function setLicenseeNumber(licenseeNumber) { - return this.setProperty('licenseeNumber', licenseeNumber); - } - }, { - key: "getLicenseeNumber", - value: function getLicenseeNumber(def) { - return this.getProperty('licenseeNumber', def); - } - }, { - key: "setSuccessURL", - value: function setSuccessURL(successURL) { - return this.setProperty('successURL', successURL); - } - }, { - key: "getSuccessURL", - value: function getSuccessURL(def) { - return this.getProperty('successURL', def); - } - }, { - key: "setSuccessURLTitle", - value: function setSuccessURLTitle(successURLTitle) { - return this.setProperty('successURLTitle', successURLTitle); - } - }, { - key: "getSuccessURLTitle", - value: function getSuccessURLTitle(def) { - return this.getProperty('successURLTitle', def); - } - }, { - key: "setCancelURL", - value: function setCancelURL(cancelURL) { - return this.setProperty('cancelURL', cancelURL); - } - }, { - key: "getCancelURL", - value: function getCancelURL(def) { - return this.getProperty('cancelURL', def); - } - }, { - key: "setCancelURLTitle", - value: function setCancelURLTitle(cancelURLTitle) { - return this.setProperty('cancelURLTitle', cancelURLTitle); - } - }, { - key: "getCancelURLTitle", - value: function getCancelURLTitle(def) { - return this.getProperty('cancelURLTitle', def); - } - }, { - key: "getShopURL", - value: function getShopURL(def) { - return this.getProperty('shopURL', def); - } - - /** - * @deprecated - * @alias setApiKeyRole - * @param role - * @returns {*} - */ - }, { - key: "setRole", - value: function setRole(role) { - return this.setApiKeyRole(role); - } - - /** - * @deprecated - * @alias getApiKeyRole - * @param def - * @returns {*} - */ - }, { - key: "getRole", - value: function getRole(def) { - return this.getApiKeyRole(def); - } - }, { - key: "setApiKeyRole", - value: function setApiKeyRole(apiKeyRole) { - return this.setProperty('apiKeyRole', apiKeyRole); - } - }, { - key: "getApiKeyRole", - value: function getApiKeyRole(def) { - return this.getProperty('apiKeyRole', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 635: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(3693)); -var _typeof2 = _interopRequireDefault(__webpack_require__(3738)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _CastsUtils = _interopRequireDefault(__webpack_require__(8769)); -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * The entity properties. - * @type {{}} - * @private - */ -var propertiesMap = new WeakMap(); - -/** - * List of properties that was defined - * @type {{}} - * @private - */ - -var definedMap = new WeakMap(); - -/** - * List of properties that need be casts - * @type {{}} - * @private - */ -var castsMap = new WeakMap(); -var BaseEntity = exports["default"] = /*#__PURE__*/function () { - function BaseEntity(_ref) { - var properties = _ref.properties, - casts = _ref.casts; - (0, _classCallCheck2.default)(this, BaseEntity); - propertiesMap.set(this, {}); - definedMap.set(this, {}); - castsMap.set(this, casts || []); - if (properties) { - this.setProperties(properties); - } - } - - /** - * Set a given property on the entity. - * @param property - * @param value - * @returns {BaseEntity} - */ - return (0, _createClass2.default)(BaseEntity, [{ - key: "setProperty", - value: function setProperty(property, value) { - // if property name has bad native type - if (!_CheckUtils.default.isValid(property) || (0, _typeof2.default)(property) === 'object') { - throw new TypeError("Bad property name:".concat(property)); - } - var castedValue = this.cast(property, value); - - // define to property - this.define(property); - - // save property to propertiesMap - var properties = propertiesMap.get(this); - properties[property] = castedValue; - return this; - } - - /** - * Alias for setProperty - * @param property - * @param value - * @returns {BaseEntity} - */ - }, { - key: "addProperty", - value: function addProperty(property, value) { - return this.setProperty(property, value); - } - - /** - * Set the entity properties. - * @param properties - * @returns {BaseEntity} - */ - }, { - key: "setProperties", - value: function setProperties(properties) { - var _this = this; - this.removeProperties(); - var has = Object.prototype.hasOwnProperty; - Object.keys(properties).forEach(function (key) { - if (has.call(properties, key)) { - _this.setProperty(key, properties[key]); - } - }); - return this; - } - - /** - * Check if we has property - * @param property - * @protected - */ - }, { - key: "hasProperty", - value: function hasProperty(property) { - return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property); - } - - /** - * Get an property from the entity. - * @param property - * @param def - * @returns {*} - */ - }, { - key: "getProperty", - value: function getProperty(property, def) { - return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property) ? propertiesMap.get(this)[property] : def; - } - - /** - * Get all of the current properties on the entity. - */ - }, { - key: "getProperties", - value: function getProperties() { - return _objectSpread({}, propertiesMap.get(this)); - } - - /** - * Remove property - * @param property - * @returns {BaseEntity} - */ - }, { - key: "removeProperty", - value: function removeProperty(property) { - var properties = propertiesMap.get(this); - delete properties[property]; - this.removeDefine(property); - return this; - } - - /** - * Remove properties - * @param properties - */ - }, { - key: "removeProperties", - value: function removeProperties(properties) { - var _this2 = this; - var propertiesForRemove = properties || Object.keys(propertiesMap.get(this)); - propertiesForRemove.forEach(function (property) { - _this2.removeProperty(property); - }); - } - }, { - key: "cast", - value: function cast(property, value) { - if (!castsMap.get(this)[property]) return value; - return (0, _CastsUtils.default)(castsMap.get(this)[property], value); - } - - /** - * Check if property has defined - * @param property - * @protected - */ - }, { - key: "hasDefine", - value: function hasDefine(property) { - return Boolean(definedMap.get(this)[property]); - } - - /** - * Define property getter and setter - * @param property - * @protected - */ - }, { - key: "define", - value: function define(property) { - if (this.hasDefine(property)) return; - if (!_CheckUtils.default.isValid(property) || (0, _typeof2.default)(property) === 'object') { - throw new TypeError("Bad property name:".concat(property)); - } - var self = this; - - // delete property - delete this[property]; - var descriptors = { - enumerable: true, - configurable: true, - get: function get() { - return self.getProperty(property); - }, - set: function set(value) { - self.setProperty(property, value); - } - }; - var defined = definedMap.get(this); - defined[property] = true; - Object.defineProperty(this, property, descriptors); - } - - /** - * Remove property getter and setter - * @param property - * @protected - */ - }, { - key: "removeDefine", - value: function removeDefine(property) { - if (!this.hasDefine(property)) return; - var defined = definedMap.get(this); - delete defined[property]; - delete this[property]; - } - - /** - * Get properties map - */ - }, { - key: "asPropertiesMap", - value: function asPropertiesMap() { - var _this3 = this; - var properties = this.getProperties(); - var customProperties = {}; - var has = Object.prototype.hasOwnProperty; - Object.keys(this).forEach(function (key) { - if (!has.call(_this3, key)) return; - customProperties[key] = _this3[key]; - }); - return _objectSpread(_objectSpread({}, customProperties), properties); - } - }]); -}(); - -/***/ }), - -/***/ 655: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('.')} */ -var $defineProperty = Object.defineProperty || false; -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = false; - } -} - -module.exports = $defineProperty; - - -/***/ }), - -/***/ 662: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(3693)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var ValidationParameters = exports["default"] = /*#__PURE__*/function () { - function ValidationParameters() { - (0, _classCallCheck2.default)(this, ValidationParameters); - this.parameters = {}; - this.licenseeProperties = {}; - } - - /** - * Sets the target product - * - * optional productNumber, must be provided in case licensee auto-create is enabled - * @param productNumber - * @returns {ValidationParameters} - */ - return (0, _createClass2.default)(ValidationParameters, [{ - key: "setProductNumber", - value: function setProductNumber(productNumber) { - this.productNumber = productNumber; - return this; - } - - /** - * Get the target product - * @returns {*} - */ - }, { - key: "getProductNumber", - value: function getProductNumber() { - return this.productNumber; - } - - /** - * Sets the name for the new licensee - * - * optional human-readable licensee name in case licensee will be auto-created. This parameter must not - * be the name, but can be used to store any other useful string information with new licensees, up to - * 1000 characters. - * @param licenseeName - * @returns {ValidationParameters} - */ - }, { - key: "setLicenseeName", - value: function setLicenseeName(licenseeName) { - this.licenseeProperties.licenseeName = licenseeName; - return this; - } - - /** - * Get the licensee name - * @returns {*} - */ - }, { - key: "getLicenseeName", - value: function getLicenseeName() { - return this.licenseeProperties.licenseeName; - } - - /** - * Sets the licensee secret - * - * licensee secret stored on the client side. Refer to Licensee Secret documentation for details. - * @param licenseeSecret - * @returns {ValidationParameters} - * @deprecated use 'NodeLocked' licensingModel instead - */ - }, { - key: "setLicenseeSecret", - value: function setLicenseeSecret(licenseeSecret) { - this.licenseeProperties.licenseeSecret = licenseeSecret; - return this; - } - - /** - * Get the licensee secret - * @returns {*} - * @deprecated use 'NodeLocked' licensingModel instead - */ - }, { - key: "getLicenseeSecret", - value: function getLicenseeSecret() { - return this.licenseeProperties.licenseeSecret; - } - - /** - * Get all licensee properties - */ - }, { - key: "getLicenseeProperties", - value: function getLicenseeProperties() { - return this.licenseeProperties; - } - - /** - * Set licensee property - * @param key - * @param value - */ - }, { - key: "setLicenseeProperty", - value: function setLicenseeProperty(key, value) { - this.licenseeProperties[key] = value; - return this; - } - - /** - * Get licensee property - * @param key - */ - }, { - key: "getLicenseeProperty", - value: function getLicenseeProperty(key, def) { - return this.licenseeProperties[key] || def; - } - - /** - * Indicates, that the validation response is intended the offline use - * - * @param forOfflineUse - * if "true", validation response will be extended with data required for the offline use - */ - }, { - key: "setForOfflineUse", - value: function setForOfflineUse(forOfflineUse) { - this.forOfflineUse = !!forOfflineUse; - return this; - } - }, { - key: "isForOfflineUse", - value: function isForOfflineUse() { - return !!this.forOfflineUse; - } - }, { - key: "setDryRun", - value: function setDryRun(dryRun) { - this.dryRun = !!dryRun; - return this; - } - }, { - key: "getDryRun", - value: function getDryRun(def) { - return this.dryRun || def; - } - - /** - * Get validation parameters - * @returns {*} - */ - }, { - key: "getParameters", - value: function getParameters() { - return _objectSpread({}, this.parameters); - } - }, { - key: "getProductModuleValidationParameters", - value: function getProductModuleValidationParameters(productModuleNumber) { - return _objectSpread({}, this.parameters[productModuleNumber]); - } - }, { - key: "setProductModuleValidationParameters", - value: function setProductModuleValidationParameters(productModuleNumber, productModuleParameters) { - if (this.parameters[productModuleNumber] === undefined || !Object.keys(this.parameters[productModuleNumber]).length) { - this.parameters[productModuleNumber] = {}; - } - this.parameters[productModuleNumber] = _objectSpread(_objectSpread({}, this.parameters[productModuleNumber]), productModuleParameters); - return this; - } - }]); -}(); - -/***/ }), - -/***/ 670: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = function itemToObject(item) { - var object = {}; - var property = item.property, - list = item.list; - if (property && Array.isArray(property)) { - property.forEach(function (p) { - var name = p.name, - value = p.value; - if (name) object[name] = value; - }); - } - if (list && Array.isArray(list)) { - list.forEach(function (l) { - var name = l.name; - if (name) { - object[name] = object[name] || []; - object[name].push(_itemToObject(l)); - } - }); - } - return object; -}; -var _default = exports["default"] = _itemToObject; - -/***/ }), - -/***/ 691: -/***/ ((module) => { - -function _isNativeFunction(t) { - try { - return -1 !== Function.toString.call(t).indexOf("[native code]"); - } catch (n) { - return "function" == typeof t; - } -} -module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 736: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = __webpack_require__(6585); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - const split = (typeof namespaces === 'string' ? namespaces : '') - .trim() - .replace(' ', ',') - .split(',') - .filter(Boolean); - - for (const ns of split) { - if (ns[0] === '-') { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - - /** - * Checks if the given string matches a namespace template, honoring - * asterisks as wildcards. - * - * @param {String} search - * @param {String} template - * @return {Boolean} - */ - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { - // Match character or proceed with wildcard - if (template[templateIndex] === '*') { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; // Skip the '*' - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition - // Backtrack to the last '*' and try to match more characters - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; // No match - } - } - - // Handle trailing '*' in template - while (templateIndex < template.length && template[templateIndex] === '*') { - templateIndex++; - } - - return templateIndex === template.length; - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name, skip)) { - return false; - } - } - - for (const ns of createDebug.names) { - if (matchesTemplate(name, ns)) { - return true; - } - } - - return false; - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; - - -/***/ }), - -/***/ 737: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var CombinedStream = __webpack_require__(801); -var util = __webpack_require__(9023); -var path = __webpack_require__(6928); -var http = __webpack_require__(8611); -var https = __webpack_require__(5692); -var parseUrl = (__webpack_require__(7016).parse); -var fs = __webpack_require__(9896); -var Stream = (__webpack_require__(2203).Stream); -var mime = __webpack_require__(6049); -var asynckit = __webpack_require__(1873); -var setToStringTag = __webpack_require__(9605); -var populate = __webpack_require__(1362); - -// Public API -module.exports = FormData; - -// make it a Stream -util.inherits(FormData, CombinedStream); - -/** - * Create readable "multipart/form-data" streams. - * Can be used to submit forms - * and file uploads to other web applications. - * - * @constructor - * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream - */ -function FormData(options) { - if (!(this instanceof FormData)) { - return new FormData(options); - } - - this._overheadLength = 0; - this._valueLength = 0; - this._valuesToMeasure = []; - - CombinedStream.call(this); - - options = options || {}; - for (var option in options) { - this[option] = options[option]; - } -} - -FormData.LINE_BREAK = '\r\n'; -FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; - -FormData.prototype.append = function(field, value, options) { - - options = options || {}; - - // allow filename as single option - if (typeof options == 'string') { - options = {filename: options}; - } - - var append = CombinedStream.prototype.append.bind(this); - - // all that streamy business can't handle numbers - if (typeof value == 'number') { - value = '' + value; - } - - // https://github.com/felixge/node-form-data/issues/38 - if (Array.isArray(value)) { - // Please convert your array into string - // the way web server expects it - this._error(new Error('Arrays are not supported.')); - return; - } - - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(); - - append(header); - append(value); - append(footer); - - // pass along options.knownLength - this._trackLength(header, value, options); -}; - -FormData.prototype._trackLength = function(header, value, options) { - var valueLength = 0; - - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } - - this._valueLength += valueLength; - - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - FormData.LINE_BREAK.length; - - // empty or either doesn't have path or not an http response or not a stream - if (!value || ( !value.path && !(value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) && !(value instanceof Stream))) { - return; - } - - // no need to bother with the length - if (!options.knownLength) { - this._valuesToMeasure.push(value); - } -}; - -FormData.prototype._lengthRetriever = function(value, callback) { - if (Object.prototype.hasOwnProperty.call(value, 'fd')) { - - // take read range into a account - // `end` = Infinity –> read file till the end - // - // TODO: Looks like there is bug in Node fs.createReadStream - // it doesn't respect `end` options without `start` options - // Fix it when node fixes it. - // https://github.com/joyent/node/issues/7819 - if (value.end != undefined && value.end != Infinity && value.start != undefined) { - - // when end specified - // no need to calculate range - // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); - - // not that fast snoopy - } else { - // still need to fetch file size from fs - fs.stat(value.path, function(err, stat) { - - var fileSize; - - if (err) { - callback(err); - return; - } - - // update final size based on the range options - fileSize = stat.size - (value.start ? value.start : 0); - callback(null, fileSize); - }); - } - - // or http response - } else if (Object.prototype.hasOwnProperty.call(value, 'httpVersion')) { - callback(null, +value.headers['content-length']); - - // or request stream http://github.com/mikeal/request - } else if (Object.prototype.hasOwnProperty.call(value, 'httpModule')) { - // wait till response come back - value.on('response', function(response) { - value.pause(); - callback(null, +response.headers['content-length']); - }); - value.resume(); - - // something else - } else { - callback('Unknown stream'); - } -}; - -FormData.prototype._multiPartHeader = function(field, value, options) { - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (typeof options.header == 'string') { - return options.header; - } - - var contentDisposition = this._getContentDisposition(value, options); - var contentType = this._getContentType(value, options); - - var contents = ''; - var headers = { - // add custom disposition as third element or keep it two elements if not - 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), - // if no content type. allow it to be empty array - 'Content-Type': [].concat(contentType || []) - }; - - // allow custom headers. - if (typeof options.header == 'object') { - populate(headers, options.header); - } - - var header; - for (var prop in headers) { - if (Object.prototype.hasOwnProperty.call(headers, prop)) { - header = headers[prop]; - - // skip nullish headers. - if (header == null) { - continue; - } - - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } - - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; - } - } - } - - return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; -}; - -FormData.prototype._getContentDisposition = function(value, options) { - - var filename - , contentDisposition - ; - - if (typeof options.filepath === 'string') { - // custom filepath for relative paths - filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || value.name || value.path) { - // custom filename take precedence - // formidable and the browser add a name property - // fs- and request- streams have path property - filename = path.basename(options.filename || value.name || value.path); - } else if (value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) { - // or try http response - filename = path.basename(value.client._httpMessage.path || ''); - } - - if (filename) { - contentDisposition = 'filename="' + filename + '"'; - } - - return contentDisposition; -}; - -FormData.prototype._getContentType = function(value, options) { - - // use custom content-type above all - var contentType = options.contentType; - - // or try `name` from formidable, browser - if (!contentType && value.name) { - contentType = mime.lookup(value.name); - } - - // or try `path` from fs-, request- streams - if (!contentType && value.path) { - contentType = mime.lookup(value.path); - } - - // or if it's http-reponse - if (!contentType && value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) { - contentType = value.headers['content-type']; - } - - // or guess it from the filepath or filename - if (!contentType && (options.filepath || options.filename)) { - contentType = mime.lookup(options.filepath || options.filename); - } - - // fallback to the default content type if `value` is not simple value - if (!contentType && typeof value == 'object') { - contentType = FormData.DEFAULT_CONTENT_TYPE; - } - - return contentType; -}; - -FormData.prototype._multiPartFooter = function() { - return function(next) { - var footer = FormData.LINE_BREAK; - - var lastPart = (this._streams.length === 0); - if (lastPart) { - footer += this._lastBoundary(); - } - - next(footer); - }.bind(this); -}; - -FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; -}; - -FormData.prototype.getHeaders = function(userHeaders) { - var header; - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; - - for (header in userHeaders) { - if (Object.prototype.hasOwnProperty.call(userHeaders, header)) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } - } - - return formHeaders; -}; - -FormData.prototype.setBoundary = function(boundary) { - this._boundary = boundary; -}; - -FormData.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); - } - - return this._boundary; -}; - -FormData.prototype.getBuffer = function() { - var dataBuffer = new Buffer.alloc(0); - var boundary = this.getBoundary(); - - // Create the form content. Add Line breaks to the end of data. - for (var i = 0, len = this._streams.length; i < len; i++) { - if (typeof this._streams[i] !== 'function') { - - // Add content to the buffer. - if(Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); - }else { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); - } - - // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); - } - } - } - - // Add the footer and return the Buffer object. - return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); -}; - -FormData.prototype._generateBoundary = function() { - // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } - - this._boundary = boundary; -}; - -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function() { - var knownLength = this._overheadLength + this._valueLength; - - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - // https://github.com/form-data/form-data/issues/40 - if (!this.hasKnownLength()) { - // Some async length retrievers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length - this._error(new Error('Cannot calculate proper length in synchronous way.')); - } - - return knownLength; -}; - -// Public API to check if length of added values is known -// https://github.com/form-data/form-data/issues/196 -// https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function() { - var hasKnownLength = true; - - if (this._valuesToMeasure.length) { - hasKnownLength = false; - } - - return hasKnownLength; -}; - -FormData.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; - - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - if (!this._valuesToMeasure.length) { - process.nextTick(cb.bind(this, null, knownLength)); - return; - } - - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { - if (err) { - cb(err); - return; - } - - values.forEach(function(length) { - knownLength += length; - }); - - cb(null, knownLength); - }); -}; - -FormData.prototype.submit = function(params, cb) { - var request - , options - , defaults = {method: 'post'} - ; - - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { - - params = parseUrl(params); - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname, - protocol: params.protocol - }, defaults); - - // use custom params - } else { - - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; - } - } - - // put that good code in getHeaders to some use - options.headers = this.getHeaders(params.headers); - - // https if specified, fallback to http in any other case - if (options.protocol == 'https:') { - request = https.request(options); - } else { - request = http.request(options); - } - - // get content length and fire away - this.getLength(function(err, length) { - if (err && err !== 'Unknown stream') { - this._error(err); - return; - } - - // add content length - if (length) { - request.setHeader('Content-Length', length); - } - - this.pipe(request); - if (cb) { - var onResponse; - - var callback = function (error, responce) { - request.removeListener('error', callback); - request.removeListener('response', onResponse); - - return cb.call(this, error, responce); - }; - - onResponse = callback.bind(this, null); - - request.on('error', callback); - request.on('response', onResponse); - } - }.bind(this)); - - return request; -}; - -FormData.prototype._error = function(err) { - if (!this.error) { - this.error = err; - this.pause(); - this.emit('error', err); - } -}; - -FormData.prototype.toString = function () { - return '[object FormData]'; -}; -setToStringTag(FormData, 'FormData'); - - -/***/ }), - -/***/ 801: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var util = __webpack_require__(9023); -var Stream = (__webpack_require__(2203).Stream); -var DelayedStream = __webpack_require__(8069); - -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; - - this._released = false; - this._streams = []; - this._currentStream = null; - this._insideLoop = false; - this._pendingNext = false; -} -util.inherits(CombinedStream, Stream); - -CombinedStream.create = function(options) { - var combinedStream = new this(); - - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } - - return combinedStream; -}; - -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; - -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - var newStream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - stream.on('data', this._checkDataSize.bind(this)); - stream = newStream; - } - - this._handleErrors(stream); - - if (this.pauseStreams) { - stream.pause(); - } - } - - this._streams.push(stream); - return this; -}; - -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); - return dest; -}; - -CombinedStream.prototype._getNext = function() { - this._currentStream = null; - - if (this._insideLoop) { - this._pendingNext = true; - return; // defer call - } - - this._insideLoop = true; - try { - do { - this._pendingNext = false; - this._realGetNext(); - } while (this._pendingNext); - } finally { - this._insideLoop = false; - } -}; - -CombinedStream.prototype._realGetNext = function() { - var stream = this._streams.shift(); - - - if (typeof stream == 'undefined') { - this.end(); - return; - } - - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } - - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } - - this._pipeNext(stream); - }.bind(this)); -}; - -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; - - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)); - stream.pipe(this, {end: false}); - return; - } - - var value = stream; - this.write(value); - this._getNext(); -}; - -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; - -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; - -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); - this.emit('pause'); -}; - -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); - } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); - this.emit('resume'); -}; - -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; - -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; - -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; - -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; - } - - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; - this._emitError(new Error(message)); -}; - -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; - - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } - - self.dataSize += stream.dataSize; - }); - - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; - -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; - - -/***/ }), - -/***/ 822: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Product = _interopRequireDefault(__webpack_require__(3262)); -var _default = exports["default"] = function _default(item) { - var object = (0, _itemToObject.default)(item); - var discounts = object.discount; - delete object.discount; - var product = new _Product.default(object); - product.setProductDiscounts(discounts); - return product; -}; - -/***/ }), - -/***/ 857: -/***/ ((module) => { - -"use strict"; -module.exports = require("os"); - -/***/ }), - -/***/ 1002: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./functionApply')} */ -module.exports = Function.prototype.apply; - - -/***/ }), - -/***/ 1064: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var $Object = __webpack_require__(9612); - -/** @type {import('./Object.getPrototypeOf')} */ -module.exports = $Object.getPrototypeOf || null; - - -/***/ }), - -/***/ 1156: -/***/ ((module) => { - -function _iterableToArrayLimit(r, l) { - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (null != t) { - var e, - n, - i, - u, - a = [], - f = !0, - o = !1; - try { - if (i = (t = t.call(r)).next, 0 === l) { - if (Object(t) !== t) return; - f = !1; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); - } catch (r) { - o = !0, n = r; - } finally { - try { - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; - } finally { - if (o) throw n; - } - } - return a; - } -} -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 1237: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./eval')} */ -module.exports = EvalError; - - -/***/ }), - -/***/ 1305: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var _default = exports["default"] = { - isValid: function isValid(value) { - var valid = value !== undefined && typeof value !== 'function'; - if (typeof value === 'number') valid = Number.isFinite(value) && !Number.isNaN(value); - return valid; - }, - paramNotNull: function paramNotNull(parameter, parameterName) { - if (!this.isValid(parameter)) throw new TypeError("Parameter ".concat(parameterName, " has bad value ").concat(parameter)); - if (parameter === null) throw new TypeError("Parameter ".concat(parameterName, " cannot be null")); - }, - paramNotEmpty: function paramNotEmpty(parameter, parameterName) { - if (!this.isValid(parameter)) throw new TypeError("Parameter ".concat(parameterName, " has bad value ").concat(parameter)); - if (!parameter) throw new TypeError("Parameter ".concat(parameterName, " cannot be null or empty string")); - } -}; - -/***/ }), - -/***/ 1333: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./shams')} */ -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - /** @type {{ [k in symbol]?: unknown }} */ - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - // eslint-disable-next-line no-extra-parens - var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - - -/***/ }), - -/***/ 1362: -/***/ ((module) => { - -// populates missing values -module.exports = function(dst, src) { - - Object.keys(src).forEach(function(prop) - { - dst[prop] = dst[prop] || src[prop]; - }); - - return dst; -}; - - -/***/ }), - -/***/ 1514: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./abs')} */ -module.exports = Math.abs; - - -/***/ }), - -/***/ 1692: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToNotification = _interopRequireDefault(__webpack_require__(5270)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Notification Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/notification-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new notification with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#create-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param notification NetLicensing.Notification - * - * return the newly created notification object in promise - * @returns {Promise} - */ - create: function create(context, notification) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.post(context, _Constants.default.Notification.ENDPOINT_PATH, notification.asPropertiesMap()); - case 2: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Notification'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToNotification.default)(item)); - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets notification by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#get-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the notification number - * @param number string - * - * return the notification object in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Notification.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Notification'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToNotification.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns notifications of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#notifications-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of notification entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Notification.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Notification'; - }).map(function (v) { - return (0, _itemToNotification.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates notification properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#update-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * notification number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param notification NetLicensing.Notification - * - * updated notification in promise. - * @returns {Promise} - */ - update: function update(context, number, notification) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.Notification.ENDPOINT_PATH, "/").concat(number), notification.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'Notification'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToNotification.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes notification.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#delete-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * notification number - * @param number string - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - return _Service.default.delete(context, "".concat(_Constants.default.Notification.ENDPOINT_PATH, "/").concat(number)); - } -}; - -/***/ }), - -/***/ 1717: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Transaction = _interopRequireDefault(__webpack_require__(269)); -var _License = _interopRequireDefault(__webpack_require__(1938)); -var _LicenseTransactionJoin = _interopRequireDefault(__webpack_require__(3716)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _default = exports["default"] = function _default(item) { - var object = (0, _itemToObject.default)(item); - var licenseTransactionJoin = object.licenseTransactionJoin; - delete object.licenseTransactionJoin; - var transaction = new _Transaction.default(object); - if (licenseTransactionJoin) { - var joins = []; - licenseTransactionJoin.forEach(function (v) { - var join = new _LicenseTransactionJoin.default(); - join.setLicense(new _License.default({ - number: v[_Constants.default.License.LICENSE_NUMBER] - })); - join.setTransaction(new _Transaction.default({ - number: v[_Constants.default.Transaction.TRANSACTION_NUMBER] - })); - joins.push(join); - }); - transaction.setLicenseTransactionJoins(joins); - } - return transaction; -}; - -/***/ }), - -/***/ 1721: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var ProductDiscount = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function ProductDiscount(properties) { - (0, _classCallCheck2.default)(this, ProductDiscount); - return _callSuper(this, ProductDiscount, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - totalPrice: 'float', - currency: 'string', - amountFix: 'float', - amountPercent: 'int' - } - }]); - } - (0, _inherits2.default)(ProductDiscount, _BaseEntity); - return (0, _createClass2.default)(ProductDiscount, [{ - key: "setTotalPrice", - value: function setTotalPrice(totalPrice) { - return this.setProperty('totalPrice', totalPrice); - } - }, { - key: "getTotalPrice", - value: function getTotalPrice(def) { - return this.getProperty('totalPrice', def); - } - }, { - key: "setCurrency", - value: function setCurrency(currency) { - return this.setProperty('currency', currency); - } - }, { - key: "getCurrency", - value: function getCurrency(def) { - return this.getProperty('currency', def); - } - }, { - key: "setAmountFix", - value: function setAmountFix(amountFix) { - return this.setProperty('amountFix', amountFix).removeProperty('amountPercent'); - } - }, { - key: "getAmountFix", - value: function getAmountFix(def) { - return this.getProperty('amountFix', def); - } - }, { - key: "setAmountPercent", - value: function setAmountPercent(amountPercent) { - return this.setProperty('amountPercent', amountPercent).removeProperty('amountFix'); - } - }, { - key: "getAmountPercent", - value: function getAmountPercent(def) { - return this.getProperty('amountPercent', def); - } - }, { - key: "toString", - value: function toString() { - var totalPrice = this.getTotalPrice(); - var currency = this.getCurrency(); - var amount = 0; - if (this.getAmountFix(null)) amount = this.getAmountFix(); - if (this.getAmountPercent(null)) amount = "".concat(this.getAmountPercent(), "%"); - return "".concat(totalPrice, ";").concat(currency, ";").concat(amount); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 1813: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hl7cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/step":{"source":"iana"},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}'); - -/***/ }), - -/***/ 1837: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var getPrototypeOf = __webpack_require__(3072); -var setPrototypeOf = __webpack_require__(5636); -var isNativeFunction = __webpack_require__(691); -var construct = __webpack_require__(9646); -function _wrapNativeSuper(t) { - var r = "function" == typeof Map ? new Map() : void 0; - return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { - if (null === t || !isNativeFunction(t)) return t; - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); - if (void 0 !== r) { - if (r.has(t)) return r.get(t); - r.set(t, Wrapper); - } - function Wrapper() { - return construct(t, arguments, getPrototypeOf(this).constructor); - } - return Wrapper.prototype = Object.create(t.prototype, { - constructor: { - value: Wrapper, - enumerable: !1, - writable: !0, - configurable: !0 - } - }), setPrototypeOf(Wrapper, t); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); -} -module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 1873: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -module.exports = -{ - parallel : __webpack_require__(8798), - serial : __webpack_require__(2081), - serialOrdered : __webpack_require__(28) -}; - - -/***/ }), - -/***/ 1938: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * License entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can - * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation - * transaction status is set to closed. - * @property string number - * - * Name for the licensed item. Set from license template on creation, if not specified explicitly. - * @property string name - * - * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled, - * the license is excluded from the validation process. - * @property boolean active - * - * price for the license. If >0, it must always be accompanied by the currency specification. Read-only, - * set from license template on creation. - * @property float price - * - * specifies currency for the license price. Check data types to discover which currencies are - * supported. Read-only, set from license template on creation. - * @property string currency - * - * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license - * template on creation, if not specified explicitly. - * @property boolean hidden - * - * @property string startDate - * - * Arbitrary additional user properties of string type may be associated with each license. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber, - * licenseTemplateNumber. - */ -var License = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function License(properties) { - (0, _classCallCheck2.default)(this, License); - return _callSuper(this, License, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - price: 'float', - hidden: 'boolean', - parentfeature: 'string', - timeVolume: 'int', - startDate: 'date', - inUse: 'boolean' - } - }]); - } - (0, _inherits2.default)(License, _BaseEntity); - return (0, _createClass2.default)(License, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setHidden", - value: function setHidden(hidden) { - return this.setProperty('hidden', hidden); - } - }, { - key: "getHidden", - value: function getHidden(def) { - return this.getProperty('hidden', def); - } - }, { - key: "setParentfeature", - value: function setParentfeature(parentfeature) { - return this.setProperty('parentfeature', parentfeature); - } - }, { - key: "getParentfeature", - value: function getParentfeature(def) { - return this.getProperty('parentfeature', def); - } - }, { - key: "setTimeVolume", - value: function setTimeVolume(timeVolume) { - return this.setProperty('timeVolume', timeVolume); - } - }, { - key: "getTimeVolume", - value: function getTimeVolume(def) { - return this.getProperty('timeVolume', def); - } - }, { - key: "setStartDate", - value: function setStartDate(startDate) { - return this.setProperty('startDate', startDate); - } - }, { - key: "getStartDate", - value: function getStartDate(def) { - return this.getProperty('startDate', def); - } - }, { - key: "getInUse", - value: function getInUse(def) { - return this.getProperty('inUse', def); - } - }, { - key: "getPrice", - value: function getPrice(def) { - return this.getProperty('price', def); - } - }, { - key: "getCurrency", - value: function getCurrency(def) { - return this.getProperty('currency', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 2018: -/***/ ((module) => { - -"use strict"; -module.exports = require("tty"); - -/***/ }), - -/***/ 2081: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var serialOrdered = __webpack_require__(28); - -// Public API -module.exports = serial; - -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); -} - - -/***/ }), - -/***/ 2203: -/***/ ((module) => { - -"use strict"; -module.exports = require("stream"); - -/***/ }), - -/***/ 2302: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _typeof2 = _interopRequireDefault(__webpack_require__(3738)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(3693)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * The context values. - * @type {{}} - * @private - */ -var valuesMap = new WeakMap(); - -/** - * List of values that was defined - * @type {{}} - * @private - */ -var definedMap = new WeakMap(); - -/** - * Context defaults - * @type {{baseUrl: string, securityMode}} - * @private - */ -var defaultsMap = new WeakMap(); -var Context = exports["default"] = /*#__PURE__*/function () { - function Context(values) { - (0, _classCallCheck2.default)(this, Context); - defaultsMap.set(this, { - baseUrl: 'https://go.netlicensing.io/core/v2/rest', - securityMode: _Constants.default.BASIC_AUTHENTICATION - }); - valuesMap.set(this, {}); - definedMap.set(this, {}); - this.setValues(_objectSpread(_objectSpread({}, defaultsMap.get(this)), values)); - } - return (0, _createClass2.default)(Context, [{ - key: "setBaseUrl", - value: function setBaseUrl(baseUrl) { - return this.setValue('baseUrl', baseUrl); - } - }, { - key: "getBaseUrl", - value: function getBaseUrl(def) { - return this.getValue('baseUrl', def); - } - }, { - key: "setUsername", - value: function setUsername(username) { - return this.setValue('username', username); - } - }, { - key: "getUsername", - value: function getUsername(def) { - return this.getValue('username', def); - } - }, { - key: "setPassword", - value: function setPassword(password) { - return this.setValue('password', password); - } - }, { - key: "getPassword", - value: function getPassword(def) { - return this.getValue('password', def); - } - }, { - key: "setApiKey", - value: function setApiKey(apiKey) { - return this.setValue('apiKey', apiKey); - } - }, { - key: "getApiKey", - value: function getApiKey(def) { - return this.getValue('apiKey', def); - } - }, { - key: "setSecurityMode", - value: function setSecurityMode(securityMode) { - return this.setValue('securityMode', securityMode); - } - }, { - key: "getSecurityMode", - value: function getSecurityMode(def) { - return this.getValue('securityMode', def); - } - }, { - key: "setVendorNumber", - value: function setVendorNumber(vendorNumber) { - return this.setValue('vendorNumber', vendorNumber); - } - }, { - key: "getVendorNumber", - value: function getVendorNumber(def) { - return this.getValue('vendorNumber', def); - } - - /** - * Set a given values on the context. - * @param key - * @param value - * @returns {Context} - */ - }, { - key: "setValue", - value: function setValue(key, value) { - // check values - if (!_CheckUtils.default.isValid(key) || (0, _typeof2.default)(key) === 'object') throw new Error("Bad value key:".concat(key)); - if (!_CheckUtils.default.isValid(value)) throw new Error("Value ".concat(key, " has wrong value").concat(value)); - - // define keys - this.define(key); - var copedValue = value; - if ((0, _typeof2.default)(value) === 'object' && value !== null) { - copedValue = Array.isArray(value) ? Object.assign([], value) : _objectSpread({}, value); - } - var values = valuesMap.get(this); - values[key] = copedValue; - return this; - } - - /** - * Set the array of context values. - * @param values - * @returns {Context} - */ - }, { - key: "setValues", - value: function setValues(values) { - var _this = this; - this.removeValues(); - var has = Object.prototype.hasOwnProperty; - Object.keys(values).forEach(function (key) { - if (has.call(values, key)) { - _this.setValue(key, values[key]); - } - }); - return this; - } - - /** - * Get an value from the context. - * @param key - * @param def - * @returns {*} - */ - }, { - key: "getValue", - value: function getValue(key, def) { - return key in valuesMap.get(this) ? valuesMap.get(this)[key] : def; - } - - /** - * Get all of the current value on the context. - */ - }, { - key: "getValues", - value: function getValues() { - return _objectSpread({}, valuesMap.get(this)); - } - - /** - * Remove value - * @param key - * @returns {Context} - */ - }, { - key: "removeValue", - value: function removeValue(key) { - var values = valuesMap.get(this); - delete values[key]; - this.removeDefine(key); - return this; - } - - /** - * Remove values - * @param keys - */ - }, { - key: "removeValues", - value: function removeValues(keys) { - var _this2 = this; - var keysAr = keys || Object.keys(valuesMap.get(this)); - keysAr.forEach(function (key) { - return _this2.removeValue(key); - }); - } - - /** - * Define value getter and setter - * @param key - * @param onlyGetter - * @private - */ - }, { - key: "define", - value: function define(key, onlyGetter) { - if (this.hasDefine(key)) return; - if (!_CheckUtils.default.isValid(key) || (typeof property === "undefined" ? "undefined" : (0, _typeof2.default)(property)) === 'object') { - throw new TypeError("Bad value name:".concat(key)); - } - var self = this; - - // delete property - delete this[key]; - var descriptors = { - enumerable: true, - configurable: true, - get: function get() { - return self.getValue(key); - } - }; - if (!onlyGetter) { - descriptors.set = function (value) { - return self.setValue(key, value); - }; - } - var defined = definedMap.get(this); - defined[key] = true; - Object.defineProperty(this, key, descriptors); - } - - /** - * Check if value has defined - * @param key - * @private - */ - }, { - key: "hasDefine", - value: function hasDefine(key) { - return Boolean(definedMap.get(this)[key]); - } - - /** - * Remove value getter and setter - * @param key - * @private - */ - }, { - key: "removeDefine", - value: function removeDefine(key) { - if (!this.hasDefine(key)) return; - var defined = definedMap.get(this); - delete defined[key]; - delete this[key]; - } - }]); -}(); - -/***/ }), - -/***/ 2313: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var defer = __webpack_require__(405); - -// API -module.exports = async; - -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - - // check if async happened - defer(function() { isAsync = true; }); - - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); - } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); - } - }; -} - - -/***/ }), - -/***/ 2395: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var superPropBase = __webpack_require__(9552); -function _get() { - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { - var p = superPropBase(e, t); - if (p) { - var n = Object.getOwnPropertyDescriptor(p, t); - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; - } - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); -} -module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 2430: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _PaymentMethod = _interopRequireDefault(__webpack_require__(3014)); -var _default = exports["default"] = function _default(item) { - return new _PaymentMethod.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 2475: -/***/ ((module) => { - -function _assertThisInitialized(e) { - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - return e; -} -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 2476: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * License template entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the license template. Vendor can - * assign this number when creating a license template or let NetLicensing generate one. - * Read-only after creation of the first license from this license template. - * @property string number - * - * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this - * license template. - * @property boolean active - * - * Name for the licensed item. - * @property string name - * - * Type of licenses created from this license template. Supported types: "FEATURE", "TIMEVOLUME", - * "FLOATING", "QUANTITY" - * @property string licenseType - * - * Price for the license. If >0, it must always be accompanied by the currency specification. - * @property double price - * - * Specifies currency for the license price. Check data types to discover which currencies are - * supported. - * @property string currency - * - * If set to true, every new licensee automatically gets one license out of this license template on - * creation. Automatic licenses must have their price set to 0. - * @property boolean automatic - * - * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase. - * @property boolean hidden - * - * If set to true, licenses from this license template are not visible to the end customer, but - * participate in validation. - * @property boolean hideLicenses - * - * If set to true, this license template defines grace period of validity granted after subscription expiration. - * @property boolean gracePeriod - * - * Mandatory for 'TIMEVOLUME' license type. - * @property integer timeVolume - * - * Time volume period for 'TIMEVOLUME' license type. Supported types: "DAY", "WEEK", "MONTH", "YEAR" - * @property integer timeVolumePeriod - * - * Mandatory for 'FLOATING' license type. - * @property integer maxSessions - * - * Mandatory for 'QUANTITY' license type. - * @property integer quantity - * - * @constructor - */ -var LicenseTemplate = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function LicenseTemplate(properties) { - (0, _classCallCheck2.default)(this, LicenseTemplate); - return _callSuper(this, LicenseTemplate, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - licenseType: 'string', - price: 'double', - currency: 'string', - automatic: 'boolean', - hidden: 'boolean', - hideLicenses: 'boolean', - gracePeriod: 'boolean', - timeVolume: 'int', - timeVolumePeriod: 'string', - maxSessions: 'int', - quantity: 'int', - inUse: 'boolean' - } - }]); - } - (0, _inherits2.default)(LicenseTemplate, _BaseEntity); - return (0, _createClass2.default)(LicenseTemplate, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setLicenseType", - value: function setLicenseType(licenseType) { - return this.setProperty('licenseType', licenseType); - } - }, { - key: "getLicenseType", - value: function getLicenseType(def) { - return this.getProperty('licenseType', def); - } - }, { - key: "setPrice", - value: function setPrice(price) { - return this.setProperty('price', price); - } - }, { - key: "getPrice", - value: function getPrice(def) { - return this.getProperty('price', def); - } - }, { - key: "setCurrency", - value: function setCurrency(currency) { - return this.setProperty('currency', currency); - } - }, { - key: "getCurrency", - value: function getCurrency(def) { - return this.getProperty('currency', def); - } - }, { - key: "setAutomatic", - value: function setAutomatic(automatic) { - return this.setProperty('automatic', automatic); - } - }, { - key: "getAutomatic", - value: function getAutomatic(def) { - return this.getProperty('automatic', def); - } - }, { - key: "setHidden", - value: function setHidden(hidden) { - return this.setProperty('hidden', hidden); - } - }, { - key: "getHidden", - value: function getHidden(def) { - return this.getProperty('hidden', def); - } - }, { - key: "setHideLicenses", - value: function setHideLicenses(hideLicenses) { - return this.setProperty('hideLicenses', hideLicenses); - } - }, { - key: "getHideLicenses", - value: function getHideLicenses(def) { - return this.getProperty('hideLicenses', def); - } - }, { - key: "setTimeVolume", - value: function setTimeVolume(timeVolume) { - return this.setProperty('timeVolume', timeVolume); - } - }, { - key: "getTimeVolume", - value: function getTimeVolume(def) { - return this.getProperty('timeVolume', def); - } - }, { - key: "setTimeVolumePeriod", - value: function setTimeVolumePeriod(timeVolumePeriod) { - return this.setProperty('timeVolumePeriod', timeVolumePeriod); - } - }, { - key: "getTimeVolumePeriod", - value: function getTimeVolumePeriod(def) { - return this.getProperty('timeVolumePeriod', def); - } - }, { - key: "setMaxSessions", - value: function setMaxSessions(maxSessions) { - return this.setProperty('maxSessions', maxSessions); - } - }, { - key: "getMaxSessions", - value: function getMaxSessions(def) { - return this.getProperty('maxSessions', def); - } - }, { - key: "setQuantity", - value: function setQuantity(quantity) { - return this.setProperty('quantity', quantity); - } - }, { - key: "getQuantity", - value: function getQuantity(def) { - return this.getProperty('quantity', def); - } - }, { - key: "getInUse", - value: function getInUse(def) { - return this.getProperty('inUse', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 2579: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToTransaction = _interopRequireDefault(__webpack_require__(1717)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Transaction Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/transaction-services - * - * Transaction is created each time change to LicenseService licenses happens. For instance licenses are - * obtained by a licensee, licenses disabled by vendor, licenses deleted, etc. Transaction is created no matter what - * source has initiated the change to licenses: it can be either a direct purchase of licenses by a licensee via - * NetLicensing Shop, or licenses can be given to a licensee by a vendor. Licenses can also be assigned implicitly by - * NetLicensing if it is defined so by a license model (e.g. evaluation license may be given automatically). All these - * events are reflected in transactions. Of all the transaction handling routines only read-only routines are exposed to - * the public API, as transactions are only allowed to be created and modified by NetLicensing internally. - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new transaction object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#create-transaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param transaction NetLicensing.Transaction - * - * return the newly created transaction object in promise - * @returns {Promise} - */ - create: function create(context, transaction) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.post(context, _Constants.default.Transaction.ENDPOINT_PATH, transaction.asPropertiesMap()); - case 2: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Transaction'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToTransaction.default)(item)); - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets transaction by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#get-transaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the transaction number - * @param number string - * - * return the transaction in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Transaction.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Transaction'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToTransaction.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns all transactions of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#transactions-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string - * - * array of transaction entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Transaction.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Transaction'; - }).map(function (v) { - return (0, _itemToTransaction.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates transaction properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#update-transaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * transaction number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param transaction NetLicensing.Transaction - * - * return updated transaction in promise. - * @returns {Promise} - */ - update: function update(context, number, transaction) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.Transaction.ENDPOINT_PATH, "/").concat(number), transaction.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'Transaction'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToTransaction.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - } -}; - -/***/ }), - -/***/ 2613: -/***/ ((module) => { - -"use strict"; -module.exports = require("assert"); - -/***/ }), - -/***/ 2987: -/***/ ((module) => { - -function _arrayWithHoles(r) { - if (Array.isArray(r)) return r; -} -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 3014: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * PaymentMethod entity used internally by NetLicensing. - * - * @property string number - * @property boolean active - * - * @constructor - */ -var PaymentMethod = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function PaymentMethod(properties) { - (0, _classCallCheck2.default)(this, PaymentMethod); - return _callSuper(this, PaymentMethod, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - 'paypal.subject': 'string' - } - }]); - } - (0, _inherits2.default)(PaymentMethod, _BaseEntity); - return (0, _createClass2.default)(PaymentMethod, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setPaypalSubject", - value: function setPaypalSubject(paypalSubject) { - return this.setProperty('paypal.subject', paypalSubject); - } - }, { - key: "getPaypalSubject", - value: function getPaypalSubject(def) { - return this.getProperty('paypal.subject', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 3072: -/***/ ((module) => { - -function _getPrototypeOf(t) { - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); -} -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 3093: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var $isNaN = __webpack_require__(4459); - -/** @type {import('./sign')} */ -module.exports = function sign(number) { - if ($isNaN(number) || number === 0) { - return number; - } - return number < 0 ? -1 : +1; -}; - - -/***/ }), - -/***/ 3106: -/***/ ((module) => { - -"use strict"; -module.exports = require("zlib"); - -/***/ }), - -/***/ 3126: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var bind = __webpack_require__(6743); -var $TypeError = __webpack_require__(9675); - -var $call = __webpack_require__(76); -var $actualApply = __webpack_require__(3144); - -/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ -module.exports = function callBindBasic(args) { - if (args.length < 1 || typeof args[0] !== 'function') { - throw new $TypeError('a function is required'); - } - return $actualApply(bind, $call, args); -}; - - -/***/ }), - -/***/ 3140: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToLicenseTemplate = _interopRequireDefault(__webpack_require__(52)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the ProductModule Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/license-template-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new license template object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#create-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent product module to which the new license template is to be added - * @param productModuleNumber - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param licenseTemplate NetLicensing.LicenseTemplate - * - * the newly created license template object in promise - * @returns {Promise} - */ - create: function create(context, productModuleNumber, licenseTemplate) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _CheckUtils.default.paramNotEmpty(productModuleNumber, _Constants.default.ProductModule.PRODUCT_MODULE_NUMBER); - licenseTemplate.setProperty(_Constants.default.ProductModule.PRODUCT_MODULE_NUMBER, productModuleNumber); - _context.next = 4; - return _Service.default.post(context, _Constants.default.LicenseTemplate.ENDPOINT_PATH, licenseTemplate.asPropertiesMap()); - case 4: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'LicenseTemplate'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToLicenseTemplate.default)(item)); - case 8: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets license template by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#get-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the license template number - * @param number string - * - * return the license template object in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.LicenseTemplate.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'LicenseTemplate'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToLicenseTemplate.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns all license templates of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#license-templates-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of license templates (of all products/modules) or null/empty list if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.LicenseTemplate.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'LicenseTemplate'; - }).map(function (v) { - return (0, _itemToLicenseTemplate.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates license template properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#update-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license template number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param licenseTemplate NetLicensing.LicenseTemplate - * - * updated license template in promise. - * @returns {Promise} - */ - update: function update(context, number, licenseTemplate) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var path, _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - path = "".concat(_Constants.default.LicenseTemplate.ENDPOINT_PATH, "/").concat(number); - _context4.next = 4; - return _Service.default.post(context, path, licenseTemplate.asPropertiesMap()); - case 4: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'LicenseTemplate'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToLicenseTemplate.default)(item)); - case 8: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes license template.See NetLicensingAPI JavaDoc for details: - * @see https://netlicensing.io/wiki/license-template-services#delete-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license template number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.LicenseTemplate.ENDPOINT_PATH, "/").concat(number), queryParams); - } -}; - -/***/ }), - -/***/ 3144: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var bind = __webpack_require__(6743); - -var $apply = __webpack_require__(1002); -var $call = __webpack_require__(76); -var $reflectApply = __webpack_require__(7119); - -/** @type {import('./actualApply')} */ -module.exports = $reflectApply || bind.call($call, $apply); - - -/***/ }), - -/***/ 3164: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var url = __webpack_require__(7016); -var URL = url.URL; -var http = __webpack_require__(8611); -var https = __webpack_require__(5692); -var Writable = (__webpack_require__(2203).Writable); -var assert = __webpack_require__(2613); -var debug = __webpack_require__(7507); - -// Preventive platform detection -// istanbul ignore next -(function detectUnsupportedEnvironment() { - var looksLikeNode = typeof process !== "undefined"; - var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; - var looksLikeV8 = isFunction(Error.captureStackTrace); - if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) { - console.warn("The follow-redirects package should be excluded from browser builds."); - } -}()); - -// Whether to use the native URL object or the legacy url module -var useNativeURL = false; -try { - assert(new URL("")); -} -catch (error) { - useNativeURL = error.code === "ERR_INVALID_URL"; -} - -// URL fields to preserve in copy operations -var preservedUrlFields = [ - "auth", - "host", - "hostname", - "href", - "path", - "pathname", - "port", - "protocol", - "query", - "search", - "hash", -]; - -// Create handlers that pass events from native requests -var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; -var eventHandlers = Object.create(null); -events.forEach(function (event) { - eventHandlers[event] = function (arg1, arg2, arg3) { - this._redirectable.emit(event, arg1, arg2, arg3); - }; -}); - -// Error types with codes -var InvalidUrlError = createErrorType( - "ERR_INVALID_URL", - "Invalid URL", - TypeError -); -var RedirectionError = createErrorType( - "ERR_FR_REDIRECTION_FAILURE", - "Redirected request failed" -); -var TooManyRedirectsError = createErrorType( - "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded", - RedirectionError -); -var MaxBodyLengthExceededError = createErrorType( - "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", - "Request body larger than maxBodyLength limit" -); -var WriteAfterEndError = createErrorType( - "ERR_STREAM_WRITE_AFTER_END", - "write after end" -); - -// istanbul ignore next -var destroy = Writable.prototype.destroy || noop; - -// An HTTP(S) request that can be redirected -function RedirectableRequest(options, responseCallback) { - // Initialize the request - Writable.call(this); - this._sanitizeOptions(options); - this._options = options; - this._ended = false; - this._ending = false; - this._redirectCount = 0; - this._redirects = []; - this._requestBodyLength = 0; - this._requestBodyBuffers = []; - - // Attach a callback if passed - if (responseCallback) { - this.on("response", responseCallback); - } - - // React to responses of native requests - var self = this; - this._onNativeResponse = function (response) { - try { - self._processResponse(response); - } - catch (cause) { - self.emit("error", cause instanceof RedirectionError ? - cause : new RedirectionError({ cause: cause })); - } - }; - - // Perform the first request - this._performRequest(); -} -RedirectableRequest.prototype = Object.create(Writable.prototype); - -RedirectableRequest.prototype.abort = function () { - destroyRequest(this._currentRequest); - this._currentRequest.abort(); - this.emit("abort"); -}; - -RedirectableRequest.prototype.destroy = function (error) { - destroyRequest(this._currentRequest, error); - destroy.call(this, error); - return this; -}; - -// Writes buffered data to the current native request -RedirectableRequest.prototype.write = function (data, encoding, callback) { - // Writing is not allowed if end has been called - if (this._ending) { - throw new WriteAfterEndError(); - } - - // Validate input and shift parameters if necessary - if (!isString(data) && !isBuffer(data)) { - throw new TypeError("data should be a string, Buffer or Uint8Array"); - } - if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } - - // Ignore empty buffers, since writing them doesn't invoke the callback - // https://github.com/nodejs/node/issues/22066 - if (data.length === 0) { - if (callback) { - callback(); - } - return; - } - // Only write when we don't exceed the maximum body length - if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { - this._requestBodyLength += data.length; - this._requestBodyBuffers.push({ data: data, encoding: encoding }); - this._currentRequest.write(data, encoding, callback); - } - // Error when we exceed the maximum body length - else { - this.emit("error", new MaxBodyLengthExceededError()); - this.abort(); - } -}; - -// Ends the current native request -RedirectableRequest.prototype.end = function (data, encoding, callback) { - // Shift parameters if necessary - if (isFunction(data)) { - callback = data; - data = encoding = null; - } - else if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } - - // Write data if needed and end - if (!data) { - this._ended = this._ending = true; - this._currentRequest.end(null, null, callback); - } - else { - var self = this; - var currentRequest = this._currentRequest; - this.write(data, encoding, function () { - self._ended = true; - currentRequest.end(null, null, callback); - }); - this._ending = true; - } -}; - -// Sets a header value on the current native request -RedirectableRequest.prototype.setHeader = function (name, value) { - this._options.headers[name] = value; - this._currentRequest.setHeader(name, value); -}; - -// Clears a header value on the current native request -RedirectableRequest.prototype.removeHeader = function (name) { - delete this._options.headers[name]; - this._currentRequest.removeHeader(name); -}; - -// Global timeout for all underlying requests -RedirectableRequest.prototype.setTimeout = function (msecs, callback) { - var self = this; - - // Destroys the socket on timeout - function destroyOnTimeout(socket) { - socket.setTimeout(msecs); - socket.removeListener("timeout", socket.destroy); - socket.addListener("timeout", socket.destroy); - } - - // Sets up a timer to trigger a timeout event - function startTimer(socket) { - if (self._timeout) { - clearTimeout(self._timeout); - } - self._timeout = setTimeout(function () { - self.emit("timeout"); - clearTimer(); - }, msecs); - destroyOnTimeout(socket); - } - - // Stops a timeout from triggering - function clearTimer() { - // Clear the timeout - if (self._timeout) { - clearTimeout(self._timeout); - self._timeout = null; - } - - // Clean up all attached listeners - self.removeListener("abort", clearTimer); - self.removeListener("error", clearTimer); - self.removeListener("response", clearTimer); - self.removeListener("close", clearTimer); - if (callback) { - self.removeListener("timeout", callback); - } - if (!self.socket) { - self._currentRequest.removeListener("socket", startTimer); - } - } - - // Attach callback if passed - if (callback) { - this.on("timeout", callback); - } - - // Start the timer if or when the socket is opened - if (this.socket) { - startTimer(this.socket); - } - else { - this._currentRequest.once("socket", startTimer); - } - - // Clean up on events - this.on("socket", destroyOnTimeout); - this.on("abort", clearTimer); - this.on("error", clearTimer); - this.on("response", clearTimer); - this.on("close", clearTimer); - - return this; -}; - -// Proxy all other public ClientRequest methods -[ - "flushHeaders", "getHeader", - "setNoDelay", "setSocketKeepAlive", -].forEach(function (method) { - RedirectableRequest.prototype[method] = function (a, b) { - return this._currentRequest[method](a, b); - }; -}); - -// Proxy all public ClientRequest properties -["aborted", "connection", "socket"].forEach(function (property) { - Object.defineProperty(RedirectableRequest.prototype, property, { - get: function () { return this._currentRequest[property]; }, - }); -}); - -RedirectableRequest.prototype._sanitizeOptions = function (options) { - // Ensure headers are always present - if (!options.headers) { - options.headers = {}; - } - - // Since http.request treats host as an alias of hostname, - // but the url module interprets host as hostname plus port, - // eliminate the host property to avoid confusion. - if (options.host) { - // Use hostname if set, because it has precedence - if (!options.hostname) { - options.hostname = options.host; - } - delete options.host; - } - - // Complete the URL object when necessary - if (!options.pathname && options.path) { - var searchPos = options.path.indexOf("?"); - if (searchPos < 0) { - options.pathname = options.path; - } - else { - options.pathname = options.path.substring(0, searchPos); - options.search = options.path.substring(searchPos); - } - } -}; - - -// Executes the next native request (initial or redirect) -RedirectableRequest.prototype._performRequest = function () { - // Load the native protocol - var protocol = this._options.protocol; - var nativeProtocol = this._options.nativeProtocols[protocol]; - if (!nativeProtocol) { - throw new TypeError("Unsupported protocol " + protocol); - } - - // If specified, use the agent corresponding to the protocol - // (HTTP and HTTPS use different types of agents) - if (this._options.agents) { - var scheme = protocol.slice(0, -1); - this._options.agent = this._options.agents[scheme]; - } - - // Create the native request and set up its event handlers - var request = this._currentRequest = - nativeProtocol.request(this._options, this._onNativeResponse); - request._redirectable = this; - for (var event of events) { - request.on(event, eventHandlers[event]); - } - - // RFC7230§5.3.1: When making a request directly to an origin server, […] - // a client MUST send only the absolute path […] as the request-target. - this._currentUrl = /^\//.test(this._options.path) ? - url.format(this._options) : - // When making a request to a proxy, […] - // a client MUST send the target URI in absolute-form […]. - this._options.path; - - // End a redirected request - // (The first request must be ended explicitly with RedirectableRequest#end) - if (this._isRedirect) { - // Write the request entity and end - var i = 0; - var self = this; - var buffers = this._requestBodyBuffers; - (function writeNext(error) { - // Only write if this request has not been redirected yet - // istanbul ignore else - if (request === self._currentRequest) { - // Report any write errors - // istanbul ignore if - if (error) { - self.emit("error", error); - } - // Write the next buffer if there are still left - else if (i < buffers.length) { - var buffer = buffers[i++]; - // istanbul ignore else - if (!request.finished) { - request.write(buffer.data, buffer.encoding, writeNext); - } - } - // End the request if `end` has been called on us - else if (self._ended) { - request.end(); - } - } - }()); - } -}; - -// Processes a response from the current native request -RedirectableRequest.prototype._processResponse = function (response) { - // Store the redirected response - var statusCode = response.statusCode; - if (this._options.trackRedirects) { - this._redirects.push({ - url: this._currentUrl, - headers: response.headers, - statusCode: statusCode, - }); - } - - // RFC7231§6.4: The 3xx (Redirection) class of status code indicates - // that further action needs to be taken by the user agent in order to - // fulfill the request. If a Location header field is provided, - // the user agent MAY automatically redirect its request to the URI - // referenced by the Location field value, - // even if the specific status code is not understood. - - // If the response is not a redirect; return it as-is - var location = response.headers.location; - if (!location || this._options.followRedirects === false || - statusCode < 300 || statusCode >= 400) { - response.responseUrl = this._currentUrl; - response.redirects = this._redirects; - this.emit("response", response); - - // Clean up - this._requestBodyBuffers = []; - return; - } - - // The response is a redirect, so abort the current request - destroyRequest(this._currentRequest); - // Discard the remainder of the response to avoid waiting for data - response.destroy(); - - // RFC7231§6.4: A client SHOULD detect and intervene - // in cyclical redirections (i.e., "infinite" redirection loops). - if (++this._redirectCount > this._options.maxRedirects) { - throw new TooManyRedirectsError(); - } - - // Store the request headers if applicable - var requestHeaders; - var beforeRedirect = this._options.beforeRedirect; - if (beforeRedirect) { - requestHeaders = Object.assign({ - // The Host header was set by nativeProtocol.request - Host: response.req.getHeader("host"), - }, this._options.headers); - } - - // RFC7231§6.4: Automatic redirection needs to done with - // care for methods not known to be safe, […] - // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change - // the request method from POST to GET for the subsequent request. - var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || - // RFC7231§6.4.4: The 303 (See Other) status code indicates that - // the server is redirecting the user agent to a different resource […] - // A user agent can perform a retrieval request targeting that URI - // (a GET or HEAD request if using HTTP) […] - (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { - this._options.method = "GET"; - // Drop a possible entity and headers related to it - this._requestBodyBuffers = []; - removeMatchingHeaders(/^content-/i, this._options.headers); - } - - // Drop the Host header, as the redirect might lead to a different host - var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); - - // If the redirect is relative, carry over the host of the last request - var currentUrlParts = parseUrl(this._currentUrl); - var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : - url.format(Object.assign(currentUrlParts, { host: currentHost })); - - // Create the redirected request - var redirectUrl = resolveUrl(location, currentUrl); - debug("redirecting to", redirectUrl.href); - this._isRedirect = true; - spreadUrlObject(redirectUrl, this._options); - - // Drop confidential headers when redirecting to a less secure protocol - // or to a different domain that is not a superdomain - if (redirectUrl.protocol !== currentUrlParts.protocol && - redirectUrl.protocol !== "https:" || - redirectUrl.host !== currentHost && - !isSubdomain(redirectUrl.host, currentHost)) { - removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers); - } - - // Evaluate the beforeRedirect callback - if (isFunction(beforeRedirect)) { - var responseDetails = { - headers: response.headers, - statusCode: statusCode, - }; - var requestDetails = { - url: currentUrl, - method: method, - headers: requestHeaders, - }; - beforeRedirect(this._options, responseDetails, requestDetails); - this._sanitizeOptions(this._options); - } - - // Perform the redirected request - this._performRequest(); -}; - -// Wraps the key/value object of protocols with redirect functionality -function wrap(protocols) { - // Default settings - var exports = { - maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024, - }; - - // Wrap each protocol - var nativeProtocols = {}; - Object.keys(protocols).forEach(function (scheme) { - var protocol = scheme + ":"; - var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); - - // Executes a request, following redirects - function request(input, options, callback) { - // Parse parameters, ensuring that input is an object - if (isURL(input)) { - input = spreadUrlObject(input); - } - else if (isString(input)) { - input = spreadUrlObject(parseUrl(input)); - } - else { - callback = options; - options = validateUrl(input); - input = { protocol: protocol }; - } - if (isFunction(options)) { - callback = options; - options = null; - } - - // Set defaults - options = Object.assign({ - maxRedirects: exports.maxRedirects, - maxBodyLength: exports.maxBodyLength, - }, input, options); - options.nativeProtocols = nativeProtocols; - if (!isString(options.host) && !isString(options.hostname)) { - options.hostname = "::1"; - } - - assert.equal(options.protocol, protocol, "protocol mismatch"); - debug("options", options); - return new RedirectableRequest(options, callback); - } - - // Executes a GET request, following redirects - function get(input, options, callback) { - var wrappedRequest = wrappedProtocol.request(input, options, callback); - wrappedRequest.end(); - return wrappedRequest; - } - - // Expose the properties on the wrapped protocol - Object.defineProperties(wrappedProtocol, { - request: { value: request, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true }, - }); - }); - return exports; -} - -function noop() { /* empty */ } - -function parseUrl(input) { - var parsed; - // istanbul ignore else - if (useNativeURL) { - parsed = new URL(input); - } - else { - // Ensure the URL is valid and absolute - parsed = validateUrl(url.parse(input)); - if (!isString(parsed.protocol)) { - throw new InvalidUrlError({ input }); - } - } - return parsed; -} - -function resolveUrl(relative, base) { - // istanbul ignore next - return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative)); -} - -function validateUrl(input) { - if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { - throw new InvalidUrlError({ input: input.href || input }); - } - if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { - throw new InvalidUrlError({ input: input.href || input }); - } - return input; -} - -function spreadUrlObject(urlObject, target) { - var spread = target || {}; - for (var key of preservedUrlFields) { - spread[key] = urlObject[key]; - } - - // Fix IPv6 hostname - if (spread.hostname.startsWith("[")) { - spread.hostname = spread.hostname.slice(1, -1); - } - // Ensure port is a number - if (spread.port !== "") { - spread.port = Number(spread.port); - } - // Concatenate path - spread.path = spread.search ? spread.pathname + spread.search : spread.pathname; - - return spread; -} - -function removeMatchingHeaders(regex, headers) { - var lastValue; - for (var header in headers) { - if (regex.test(header)) { - lastValue = headers[header]; - delete headers[header]; - } - } - return (lastValue === null || typeof lastValue === "undefined") ? - undefined : String(lastValue).trim(); -} - -function createErrorType(code, message, baseClass) { - // Create constructor - function CustomError(properties) { - // istanbul ignore else - if (isFunction(Error.captureStackTrace)) { - Error.captureStackTrace(this, this.constructor); - } - Object.assign(this, properties || {}); - this.code = code; - this.message = this.cause ? message + ": " + this.cause.message : message; - } - - // Attach constructor and set default properties - CustomError.prototype = new (baseClass || Error)(); - Object.defineProperties(CustomError.prototype, { - constructor: { - value: CustomError, - enumerable: false, - }, - name: { - value: "Error [" + code + "]", - enumerable: false, - }, - }); - return CustomError; -} - -function destroyRequest(request, error) { - for (var event of events) { - request.removeListener(event, eventHandlers[event]); - } - request.on("error", noop); - request.destroy(error); -} - -function isSubdomain(subdomain, domain) { - assert(isString(subdomain) && isString(domain)); - var dot = subdomain.length - domain.length - 1; - return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); -} - -function isString(value) { - return typeof value === "string" || value instanceof String; -} - -function isFunction(value) { - return typeof value === "function"; -} - -function isBuffer(value) { - return typeof value === "object" && ("length" in value); -} - -function isURL(value) { - return URL && value instanceof URL; -} - -// Exports -module.exports = wrap({ http: http, https: https }); -module.exports.wrap = wrap; - - -/***/ }), - -/***/ 3262: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _get2 = _interopRequireDefault(__webpack_require__(2395)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -var _ProductDiscount = _interopRequireDefault(__webpack_require__(1721)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * The discounts map - * @type {{}} - * @private - */ -var discountsMap = new WeakMap(); - -/** - * An identifier that show if discounts was touched - * @type {{}} - * @private - */ -var discountsTouched = new WeakMap(); - -/** - * NetLicensing Product entity. - * - * Properties visible via NetLicensing API: - * - * Unique number that identifies the product. Vendor can assign this number when creating a product or - * let NetLicensing generate one. Read-only after creation of the first licensee for the product. - * @property string number - * - * If set to false, the product is disabled. No new licensees can be registered for the product, - * existing licensees can not obtain new licenses. - * @property boolean active - * - * Product name. Together with the version identifies the product for the end customer. - * @property string name - * - * Product version. Convenience parameter, additional to the product name. - * @property float version - * - * If set to 'true', non-existing licensees will be created at first validation attempt. - * @property boolean licenseeAutoCreate - * - * Licensee secret mode for product.Supported types: "DISABLED", "PREDEFINED", "CLIENT" - * @property boolean licenseeSecretMode - * - * Product description. Optional. - * @property string description - * - * Licensing information. Optional. - * @property string licensingInfo - * - * @property boolean inUse - * - * Arbitrary additional user properties of string type may be associated with each product. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted. - * - * @constructor - */ -var Product = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Product(properties) { - var _this; - (0, _classCallCheck2.default)(this, Product); - _this = _callSuper(this, Product, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - version: 'string', - description: 'string', - licensingInfo: 'string', - licenseeAutoCreate: 'boolean', - licenseeSecretMode: 'string', - inUse: 'boolean' - } - }]); - discountsMap.set(_this, []); - discountsTouched.set(_this, false); - return _this; - } - (0, _inherits2.default)(Product, _BaseEntity); - return (0, _createClass2.default)(Product, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setVersion", - value: function setVersion(version) { - return this.setProperty('version', version); - } - }, { - key: "getVersion", - value: function getVersion(def) { - return this.getProperty('version', def); - } - }, { - key: "setLicenseeAutoCreate", - value: function setLicenseeAutoCreate(licenseeAutoCreate) { - return this.setProperty('licenseeAutoCreate', licenseeAutoCreate); - } - }, { - key: "getLicenseeAutoCreate", - value: function getLicenseeAutoCreate(def) { - return this.getProperty('licenseeAutoCreate', def); - } - - /** - * @deprecated use ProductModule.setLicenseeSecretMode instead - */ - }, { - key: "setLicenseeSecretMode", - value: function setLicenseeSecretMode(licenseeSecretMode) { - return this.setProperty('licenseeSecretMode', licenseeSecretMode); - } - - /** - * @deprecated use ProductModule.getLicenseeSecretMode instead - */ - }, { - key: "getLicenseeSecretMode", - value: function getLicenseeSecretMode(def) { - return this.getProperty('licenseeSecretMode', def); - } - }, { - key: "setDescription", - value: function setDescription(description) { - return this.setProperty('description', description); - } - }, { - key: "getDescription", - value: function getDescription(def) { - return this.getProperty('description', def); - } - }, { - key: "setLicensingInfo", - value: function setLicensingInfo(licensingInfo) { - return this.setProperty('licensingInfo', licensingInfo); - } - }, { - key: "getLicensingInfo", - value: function getLicensingInfo(def) { - return this.getProperty('licensingInfo', def); - } - }, { - key: "getInUse", - value: function getInUse(def) { - return this.getProperty('inUse', def); - } - - /** - * Add discount to product - * - * @param discount NetLicensing.ProductDiscount - * @returns {NetLicensing.Product} - */ - }, { - key: "addDiscount", - value: function addDiscount(discount) { - var discounts = discountsMap.get(this); - var productDiscount = discount; - if (typeof productDiscount !== 'string' && !(productDiscount instanceof _ProductDiscount.default)) { - productDiscount = new _ProductDiscount.default(productDiscount); - } - discounts.push(productDiscount); - discountsMap.set(this, discounts); - discountsTouched.set(this, true); - return this; - } - - /** - * Set discounts to product - * @param discounts - */ - }, { - key: "setProductDiscounts", - value: function setProductDiscounts(discounts) { - var _this2 = this; - discountsMap.set(this, []); - discountsTouched.set(this, true); - if (!discounts) return this; - if (Array.isArray(discounts)) { - discounts.forEach(function (discount) { - _this2.addDiscount(discount); - }); - return this; - } - this.addDiscount(discounts); - return this; - } - - /** - * Get array of objects discounts - * @returns {Array} - */ - }, { - key: "getProductDiscounts", - value: function getProductDiscounts() { - return Object.assign([], discountsMap.get(this)); - } - }, { - key: "asPropertiesMap", - value: function asPropertiesMap() { - var propertiesMap = _superPropGet(Product, "asPropertiesMap", this, 3)([]); - if (discountsMap.get(this).length) { - propertiesMap.discount = discountsMap.get(this).map(function (discount) { - return discount.toString(); - }); - } - if (!propertiesMap.discount && discountsTouched.get(this)) { - propertiesMap.discount = ''; - } - return propertiesMap; - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 3401: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _typeof2 = _interopRequireDefault(__webpack_require__(3738)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _readOnlyError2 = _interopRequireDefault(__webpack_require__(5407)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _axios = _interopRequireDefault(__webpack_require__(9329)); -var _btoa = _interopRequireDefault(__webpack_require__(7131)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _NlicError = _interopRequireDefault(__webpack_require__(6469)); -var _package = _interopRequireDefault(__webpack_require__(8330)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -var httpXHR = {}; -var axiosInstance = null; -var Service = exports["default"] = /*#__PURE__*/function () { - function Service() { - (0, _classCallCheck2.default)(this, Service); - } - return (0, _createClass2.default)(Service, null, [{ - key: "getAxiosInstance", - value: function getAxiosInstance() { - return axiosInstance || _axios.default; - } - }, { - key: "setAxiosInstance", - value: function setAxiosInstance(instance) { - axiosInstance = instance; - } - }, { - key: "getLastHttpRequestInfo", - value: function getLastHttpRequestInfo() { - return httpXHR; - } - - /** - * Helper method for performing GET request to N - etLicensing API services. Finds and returns first suitable item with - * type resultType from the response. - * - * Context for the NetLicensing API call - * @param context - * - * the REST URL template - * @param urlTemplate - * - * The REST query parameters values. May be null if there are no parameters. - * @param queryParams - * - * @returns {Promise} - */ - }, { - key: "get", - value: function get(context, urlTemplate, queryParams) { - return Service.request(context, 'get', urlTemplate, queryParams); - } - - /** - * Helper method for performing POST request to NetLicensing API services. Finds and returns first suitable item - * with type resultType from the response. - * - * context for the NetLicensing API call - * @param context - * - * the REST URL template - * @param urlTemplate - * - * The REST query parameters values. May be null if there are no parameters. - * @param queryParams - * - * @returns {Promise} - */ - }, { - key: "post", - value: function post(context, urlTemplate, queryParams) { - return Service.request(context, 'post', urlTemplate, queryParams); - } - - /** - * - * @param context - * @param urlTemplate - * @param queryParams - * @returns {Promise} - */ - }, { - key: "delete", - value: function _delete(context, urlTemplate, queryParams) { - return Service.request(context, 'delete', urlTemplate, queryParams); - } - - /** - * Send request to NetLicensing RestApi - * @param context - * @param method - * @param urlTemplate - * @param queryParams - * @returns {Promise} - */ - }, { - key: "request", - value: function request(context, method, urlTemplate, queryParams) { - var template = String(urlTemplate); - var params = queryParams || {}; - if (!template) throw new TypeError('Url template must be specified'); - - // validate http method - if (['get', 'post', 'delete'].indexOf(method.toLowerCase()) < 0) { - throw new Error("Invalid request type:".concat(method, ", allowed requests types: GET, POST, DELETE.")); - } - - // validate context - if (!context.getBaseUrl(null)) { - throw new Error('Base url must be specified'); - } - var request = { - url: encodeURI("".concat(context.getBaseUrl(), "/").concat(template)), - method: method.toLowerCase(), - responseType: 'json', - headers: { - Accept: 'application/json', - 'X-Requested-With': 'XMLHttpRequest' - }, - transformRequest: [function (data, headers) { - if (headers['Content-Type'] === 'application/x-www-form-urlencoded') { - return Service.toQueryString(data); - } - if (!headers['NetLicensing-Origin']) { - // eslint-disable-next-line no-param-reassign - headers['NetLicensing-Origin'] = "NetLicensing/Javascript ".concat(_package.default.version); - } - return data; - }] - }; - - // only node.js has a process variable that is of [[Class]] process - if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - request.headers['User-agent'] = "NetLicensing/Javascript ".concat(_package.default.version, "/node&").concat(process.version); - } - if (['put', 'post', 'patch'].indexOf(request.method) >= 0) { - if (request.method === 'post') { - request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; - } - request.data = params; - } else { - request.params = params; - } - switch (context.getSecurityMode()) { - // Basic Auth - case _Constants.default.BASIC_AUTHENTICATION: - if (!context.getUsername()) throw new Error('Missing parameter "username"'); - if (!context.getPassword()) throw new Error('Missing parameter "password"'); - request.auth = { - username: context.getUsername(), - password: context.getPassword() - }; - break; - // ApiKey Auth - case _Constants.default.APIKEY_IDENTIFICATION: - if (!context.getApiKey()) throw new Error('Missing parameter "apiKey"'); - request.headers.Authorization = "Basic ".concat((0, _btoa.default)("apiKey:".concat(context.getApiKey()))); - break; - // without authorization - case _Constants.default.ANONYMOUS_IDENTIFICATION: - break; - default: - throw new Error('Unknown security mode'); - } - return Service.getAxiosInstance()(request).then(function (response) { - response.infos = Service.getInfo(response, []); - var errors = response.infos.filter(function (_ref) { - var type = _ref.type; - return type === 'ERROR'; - }); - if (errors.length) { - var error = new Error(errors[0].value); - error.config = response.config; - error.request = response.request; - error.response = response; - throw error; - } - httpXHR = response; - return response; - }).catch(function (e) { - if (e.response) { - httpXHR = e.response; - - // The request was made and the server responded with a status code - // that falls out of the range of 2xx - - var error = new _NlicError.default(e); - error.config = e.config; - error.code = e.code; - error.request = e.request; - error.response = e.response; - - // The request was made and the server responded with a status code - // that falls out of the range of 2xx - var data = e.response.data; - if (data) { - error.infos = Service.getInfo(e.response, []); - var _error$infos$filter = error.infos.filter(function (_ref2) { - var type = _ref2.type; - return type === 'ERROR'; - }), - _error$infos$filter2 = (0, _slicedToArray2.default)(_error$infos$filter, 1), - _error$infos$filter2$ = _error$infos$filter2[0], - info = _error$infos$filter2$ === void 0 ? {} : _error$infos$filter2$; - error.message = info.value || 'Unknown'; - } - throw error; - } - throw e; - }); - } - }, { - key: "getInfo", - value: function getInfo(response, def) { - try { - return response.data.infos.info || def; - } catch (e) { - return def; - } - } - }, { - key: "toQueryString", - value: function toQueryString(data, prefix) { - var query = []; - var has = Object.prototype.hasOwnProperty; - Object.keys(data).forEach(function (key) { - if (has.call(data, key)) { - var k = prefix ? "".concat(prefix, "[").concat(key, "]") : key; - var v = data[key]; - v = v instanceof Date ? v.toISOString() : v; - query.push(v !== null && (0, _typeof2.default)(v) === 'object' ? Service.toQueryString(v, k) : "".concat(encodeURIComponent(k), "=").concat(encodeURIComponent(v))); - } - }); - return query.join('&').replace(/%5B[0-9]+%5D=/g, '='); - } - }]); -}(); - -/***/ }), - -/***/ 3628: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var reflectGetProto = __webpack_require__(8648); -var originalGetProto = __webpack_require__(1064); - -var getDunderProto = __webpack_require__(7176); - -/** @type {import('.')} */ -module.exports = reflectGetProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return reflectGetProto(O); - } - : originalGetProto - ? function getProto(O) { - if (!O || (typeof O !== 'object' && typeof O !== 'function')) { - throw new TypeError('getProto: not an object'); - } - // @ts-expect-error TS can't narrow inside a closure, for some reason - return originalGetProto(O); - } - : getDunderProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return getDunderProto(O); - } - : null; - - -/***/ }), - -/***/ 3648: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Token = _interopRequireDefault(__webpack_require__(584)); -var _default = exports["default"] = function _default(item) { - return new _Token.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 3693: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var toPropertyKey = __webpack_require__(7736); -function _defineProperty(e, r, t) { - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; -} -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 3716: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var LicenseTransactionJoin = exports["default"] = /*#__PURE__*/function () { - function LicenseTransactionJoin(transaction, license) { - (0, _classCallCheck2.default)(this, LicenseTransactionJoin); - this.transaction = transaction; - this.license = license; - } - return (0, _createClass2.default)(LicenseTransactionJoin, [{ - key: "setTransaction", - value: function setTransaction(transaction) { - this.transaction = transaction; - return this; - } - }, { - key: "getTransaction", - value: function getTransaction(def) { - return this.transaction || def; - } - }, { - key: "setLicense", - value: function setLicense(license) { - this.license = license; - return this; - } - }, { - key: "getLicense", - value: function getLicense(def) { - return this.license || def; - } - }]); -}(); - -/***/ }), - -/***/ 3738: -/***/ ((module) => { - -function _typeof(o) { - "@babel/helpers - typeof"; - - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); -} -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 3849: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Bundle = _interopRequireDefault(__webpack_require__(9633)); -var _default = exports["default"] = function _default(item) { - return new _Bundle.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 3950: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToProductModule = _interopRequireDefault(__webpack_require__(4398)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the ProductModule Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/product-module-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new product module object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#create-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent product to which the new product module is to be added - * @param productNumber string - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param productModule NetLicensing.ProductModule - * - * the newly created product module object in promise - * @returns {Promise} - */ - create: function create(context, productNumber, productModule) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _CheckUtils.default.paramNotEmpty(productNumber, _Constants.default.Product.PRODUCT_NUMBER); - productModule.setProperty(_Constants.default.Product.PRODUCT_NUMBER, productNumber); - _context.next = 4; - return _Service.default.post(context, _Constants.default.ProductModule.ENDPOINT_PATH, productModule.asPropertiesMap()); - case 4: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'ProductModule'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToProductModule.default)(item)); - case 8: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets product module by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#get-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the product module number - * @param number string - * - * return the product module object in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.ProductModule.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'ProductModule'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToProductModule.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns products of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#product-modules-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of product modules entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.ProductModule.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'ProductModule'; - }).map(function (v) { - return (0, _itemToProductModule.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates product module properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#update-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product module number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param productModule NetLicensing.ProductModule - * - * updated product module in promise. - * @returns {Promise} - */ - update: function update(context, number, productModule) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.ProductModule.ENDPOINT_PATH, "/").concat(number), productModule.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'ProductModule'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToProductModule.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes product module.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#delete-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product module number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.ProductModule.ENDPOINT_PATH, "/").concat(number), queryParams); - } -}; - -/***/ }), - -/***/ 4034: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = exports["default"] = function _default() { - var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var pageNumber = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var itemsNumber = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var totalPages = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - var totalItems = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; - var paginator = { - getContent: function getContent() { - return content; - }, - getPageNumber: function getPageNumber() { - return pageNumber; - }, - getItemsNumber: function getItemsNumber() { - return itemsNumber; - }, - getTotalPages: function getTotalPages() { - return totalPages; - }, - getTotalItems: function getTotalItems() { - return totalItems; - }, - hasNext: function hasNext() { - return totalPages > pageNumber + 1; - } - }; - var paginatorKeys = Object.keys(paginator); - return new Proxy(content, { - get: function get(target, key) { - if (paginatorKeys.indexOf(key) !== -1) { - return paginator[key]; - } - return target[key]; - } - }); -}; - -/***/ }), - -/***/ 4039: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = __webpack_require__(1333); - -/** @type {import('.')} */ -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; - - -/***/ }), - -/***/ 4067: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Licensee = _interopRequireDefault(__webpack_require__(9899)); -var _default = exports["default"] = function _default(item) { - return new _Licensee.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 4398: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _ProductModule = _interopRequireDefault(__webpack_require__(9142)); -var _default = exports["default"] = function _default(item) { - return new _ProductModule.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 4434: -/***/ ((module) => { - -"use strict"; -module.exports = require("events"); - -/***/ }), - -/***/ 4459: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./isNaN')} */ -module.exports = Number.isNaN || function isNaN(a) { - return a !== a; -}; - - -/***/ }), - -/***/ 4555: -/***/ ((module) => { - -// API -module.exports = abort; - -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - - // reset leftover jobs - state.jobs = {}; -} - -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); - } -} - - -/***/ }), - -/***/ 4579: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var toPropertyKey = __webpack_require__(7736); -function _defineProperties(e, r) { - for (var t = 0; t < r.length; t++) { - var o = r[t]; - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); - } -} -function _createClass(e, r, t) { - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { - writable: !1 - }), e; -} -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 4633: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var _typeof = (__webpack_require__(3738)["default"]); -function _regeneratorRuntime() { - "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ - module.exports = _regeneratorRuntime = function _regeneratorRuntime() { - return e; - }, module.exports.__esModule = true, module.exports["default"] = module.exports; - var t, - e = {}, - r = Object.prototype, - n = r.hasOwnProperty, - o = Object.defineProperty || function (t, e, r) { - t[e] = r.value; - }, - i = "function" == typeof Symbol ? Symbol : {}, - a = i.iterator || "@@iterator", - c = i.asyncIterator || "@@asyncIterator", - u = i.toStringTag || "@@toStringTag"; - function define(t, e, r) { - return Object.defineProperty(t, e, { - value: r, - enumerable: !0, - configurable: !0, - writable: !0 - }), t[e]; - } - try { - define({}, ""); - } catch (t) { - define = function define(t, e, r) { - return t[e] = r; - }; - } - function wrap(t, e, r, n) { - var i = e && e.prototype instanceof Generator ? e : Generator, - a = Object.create(i.prototype), - c = new Context(n || []); - return o(a, "_invoke", { - value: makeInvokeMethod(t, r, c) - }), a; - } - function tryCatch(t, e, r) { - try { - return { - type: "normal", - arg: t.call(e, r) - }; - } catch (t) { - return { - type: "throw", - arg: t - }; - } - } - e.wrap = wrap; - var h = "suspendedStart", - l = "suspendedYield", - f = "executing", - s = "completed", - y = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - var p = {}; - define(p, a, function () { - return this; - }); - var d = Object.getPrototypeOf, - v = d && d(d(values([]))); - v && v !== r && n.call(v, a) && (p = v); - var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); - function defineIteratorMethods(t) { - ["next", "throw", "return"].forEach(function (e) { - define(t, e, function (t) { - return this._invoke(e, t); - }); - }); - } - function AsyncIterator(t, e) { - function invoke(r, o, i, a) { - var c = tryCatch(t[r], t, o); - if ("throw" !== c.type) { - var u = c.arg, - h = u.value; - return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { - invoke("next", t, i, a); - }, function (t) { - invoke("throw", t, i, a); - }) : e.resolve(h).then(function (t) { - u.value = t, i(u); - }, function (t) { - return invoke("throw", t, i, a); - }); - } - a(c.arg); - } - var r; - o(this, "_invoke", { - value: function value(t, n) { - function callInvokeWithMethodAndArg() { - return new e(function (e, r) { - invoke(t, n, e, r); - }); - } - return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); - } - }); - } - function makeInvokeMethod(e, r, n) { - var o = h; - return function (i, a) { - if (o === f) throw Error("Generator is already running"); - if (o === s) { - if ("throw" === i) throw a; - return { - value: t, - done: !0 - }; - } - for (n.method = i, n.arg = a;;) { - var c = n.delegate; - if (c) { - var u = maybeInvokeDelegate(c, n); - if (u) { - if (u === y) continue; - return u; - } - } - if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { - if (o === h) throw o = s, n.arg; - n.dispatchException(n.arg); - } else "return" === n.method && n.abrupt("return", n.arg); - o = f; - var p = tryCatch(e, r, n); - if ("normal" === p.type) { - if (o = n.done ? s : l, p.arg === y) continue; - return { - value: p.arg, - done: n.done - }; - } - "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); - } - }; - } - function maybeInvokeDelegate(e, r) { - var n = r.method, - o = e.iterator[n]; - if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; - var i = tryCatch(o, e.iterator, r.arg); - if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; - var a = i.arg; - return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); - } - function pushTryEntry(t) { - var e = { - tryLoc: t[0] - }; - 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); - } - function resetTryEntry(t) { - var e = t.completion || {}; - e.type = "normal", delete e.arg, t.completion = e; - } - function Context(t) { - this.tryEntries = [{ - tryLoc: "root" - }], t.forEach(pushTryEntry, this), this.reset(!0); - } - function values(e) { - if (e || "" === e) { - var r = e[a]; - if (r) return r.call(e); - if ("function" == typeof e.next) return e; - if (!isNaN(e.length)) { - var o = -1, - i = function next() { - for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; - return next.value = t, next.done = !0, next; - }; - return i.next = i; - } - } - throw new TypeError(_typeof(e) + " is not iterable"); - } - return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { - value: GeneratorFunctionPrototype, - configurable: !0 - }), o(GeneratorFunctionPrototype, "constructor", { - value: GeneratorFunction, - configurable: !0 - }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { - var e = "function" == typeof t && t.constructor; - return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); - }, e.mark = function (t) { - return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; - }, e.awrap = function (t) { - return { - __await: t - }; - }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { - return this; - }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { - void 0 === i && (i = Promise); - var a = new AsyncIterator(wrap(t, r, n, o), i); - return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { - return t.done ? t.value : a.next(); - }); - }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { - return this; - }), define(g, "toString", function () { - return "[object Generator]"; - }), e.keys = function (t) { - var e = Object(t), - r = []; - for (var n in e) r.push(n); - return r.reverse(), function next() { - for (; r.length;) { - var t = r.pop(); - if (t in e) return next.value = t, next.done = !1, next; - } - return next.done = !0, next; - }; - }, e.values = values, Context.prototype = { - constructor: Context, - reset: function reset(e) { - if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); - }, - stop: function stop() { - this.done = !0; - var t = this.tryEntries[0].completion; - if ("throw" === t.type) throw t.arg; - return this.rval; - }, - dispatchException: function dispatchException(e) { - if (this.done) throw e; - var r = this; - function handle(n, o) { - return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; - } - for (var o = this.tryEntries.length - 1; o >= 0; --o) { - var i = this.tryEntries[o], - a = i.completion; - if ("root" === i.tryLoc) return handle("end"); - if (i.tryLoc <= this.prev) { - var c = n.call(i, "catchLoc"), - u = n.call(i, "finallyLoc"); - if (c && u) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } else if (c) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - } else { - if (!u) throw Error("try statement without catch or finally"); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } - } - } - }, - abrupt: function abrupt(t, e) { - for (var r = this.tryEntries.length - 1; r >= 0; --r) { - var o = this.tryEntries[r]; - if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { - var i = o; - break; - } - } - i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); - var a = i ? i.completion : {}; - return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); - }, - complete: function complete(t, e) { - if ("throw" === t.type) throw t.arg; - return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; - }, - finish: function finish(t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; - } - }, - "catch": function _catch(t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.tryLoc === t) { - var n = r.completion; - if ("throw" === n.type) { - var o = n.arg; - resetTryEntry(r); - } - return o; - } - } - throw Error("illegal catch attempt"); - }, - delegateYield: function delegateYield(e, r, n) { - return this.delegate = { - iterator: values(e), - resultName: r, - nextLoc: n - }, "next" === this.method && (this.arg = t), y; - } - }, e; -} -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 4756: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// TODO(Babel 8): Remove this file. - -var runtime = __webpack_require__(4633)(); -module.exports = runtime; - -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= -try { - regeneratorRuntime = runtime; -} catch (accidentalStrictMode) { - if (typeof globalThis === "object") { - globalThis.regeneratorRuntime = runtime; - } else { - Function("r", "regeneratorRuntime = r")(runtime); - } -} - - -/***/ }), - -/***/ 4994: -/***/ ((module) => { - -function _interopRequireDefault(e) { - return e && e.__esModule ? e : { - "default": e - }; -} -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 5114: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToProduct = _interopRequireDefault(__webpack_require__(822)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Product Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/product-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new product with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#create-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param product NetLicensing.Product - * - * return the newly created product object in promise - * @returns {Promise} - */ - create: function create(context, product) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.post(context, _Constants.default.Product.ENDPOINT_PATH, product.asPropertiesMap()); - case 2: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Product'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToProduct.default)(item)); - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets product by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#get-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the product number - * @param number string - * - * return the product object in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Product.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Product'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToProduct.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns products of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#products-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of product entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Product.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Product'; - }).map(function (v) { - return (0, _itemToProduct.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates product properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#update-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param product NetLicensing.Product - * - * updated product in promise. - * @returns {Promise} - */ - update: function update(context, number, product) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.Product.ENDPOINT_PATH, "/").concat(number), product.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'Product'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToProduct.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes product.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#delete-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.Product.ENDPOINT_PATH, "/").concat(number), queryParams); - } -}; - -/***/ }), - -/***/ 5192: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToToken = _interopRequireDefault(__webpack_require__(3648)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Token Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/token-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new token.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#create-token - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param token NetLicensing.Token - * - * return created token in promise - * @returns {Promise} - */ - create: function create(context, token) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.post(context, _Constants.default.Token.ENDPOINT_PATH, token.asPropertiesMap()); - case 2: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Token'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToToken.default)(item)); - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets token by its number..See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#get-token - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the token number - * @param number - * - * return the token in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Token.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Token'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToToken.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns tokens of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#tokens-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of token entities or empty array if nothing found. - * @return array - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Token.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Token'; - }).map(function (v) { - return (0, _itemToToken.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Delete token by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#delete-token - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the token number - * @param number string - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - return _Service.default.delete(context, "".concat(_Constants.default.Token.ENDPOINT_PATH, "/").concat(number)); - } -}; - -/***/ }), - -/***/ 5270: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Notification = _interopRequireDefault(__webpack_require__(5454)); -var _default = exports["default"] = function _default(item) { - return new _Notification.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 5345: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./uri')} */ -module.exports = URIError; - - -/***/ }), - -/***/ 5402: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _License = _interopRequireDefault(__webpack_require__(1938)); -var _default = exports["default"] = function _default(item) { - return new _License.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 5407: -/***/ ((module) => { - -function _readOnlyError(r) { - throw new TypeError('"' + r + '" is read-only'); -} -module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 5454: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * NetLicensing Notification entity. - * - * Properties visible via NetLicensing API: - * - * Unique number that identifies the notification. Vendor can assign this number when creating a notification or - * let NetLicensing generate one. - * @property string number - * - * If set to false, the notification is disabled. The notification will not be fired when the event triggered. - * @property boolean active - * - * Notification name. - * @property string name - * - * Notification type. Indicate the method of transmitting notification, ex: EMAIL, WEBHOOK. - * @property float type - * - * Comma separated string of events that fire the notification when emitted. - * @property string events - * - * Notification response payload. - * @property string payload - * - * Notification response url. Optional. Uses only for WEBHOOK type notification. - * @property string url - * - * Arbitrary additional user properties of string type may be associated with each notification. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted. - * - * @constructor - */ -var Notification = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Notification(properties) { - (0, _classCallCheck2.default)(this, Notification); - return _callSuper(this, Notification, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - protocol: 'string', - events: 'string', - payload: 'string', - endpoint: 'string' - } - }]); - } - (0, _inherits2.default)(Notification, _BaseEntity); - return (0, _createClass2.default)(Notification, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setProtocol", - value: function setProtocol(type) { - return this.setProperty('protocol', type); - } - }, { - key: "getProtocol", - value: function getProtocol(def) { - return this.getProperty('protocol', def); - } - }, { - key: "setEvents", - value: function setEvents(events) { - return this.setProperty('events', events); - } - }, { - key: "getEvents", - value: function getEvents(def) { - return this.getProperty('events', def); - } - }, { - key: "setPayload", - value: function setPayload(payload) { - return this.setProperty('payload', payload); - } - }, { - key: "getPayload", - value: function getPayload(def) { - return this.getProperty('payload', def); - } - }, { - key: "setEndpoint", - value: function setEndpoint(endpoint) { - return this.setProperty('endpoint', endpoint); - } - }, { - key: "getEndpoint", - value: function getEndpoint(def) { - return this.getProperty('endpoint', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 5636: -/***/ ((module) => { - -function _setPrototypeOf(t, e) { - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { - return t.__proto__ = e, t; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); -} -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 5692: -/***/ ((module) => { - -"use strict"; -module.exports = require("https"); - -/***/ }), - -/***/ 5715: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var arrayWithHoles = __webpack_require__(2987); -var iterableToArrayLimit = __webpack_require__(1156); -var unsupportedIterableToArray = __webpack_require__(7122); -var nonIterableRest = __webpack_require__(7752); -function _slicedToArray(r, e) { - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); -} -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 5753: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = __webpack_require__(7833); -} else { - module.exports = __webpack_require__(6033); -} - - -/***/ }), - -/***/ 5795: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -/** @type {import('.')} */ -var $gOPD = __webpack_require__(6549); - -if ($gOPD) { - try { - $gOPD([], 'length'); - } catch (e) { - // IE 8 has a broken gOPD - $gOPD = null; - } -} - -module.exports = $gOPD; - - -/***/ }), - -/***/ 5880: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./pow')} */ -module.exports = Math.pow; - - -/***/ }), - -/***/ 5884: -/***/ ((module) => { - -"use strict"; - - -module.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf('--'); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -}; - - -/***/ }), - -/***/ 6033: -/***/ ((module, exports, __webpack_require__) => { - -/** - * Module dependencies. - */ - -const tty = __webpack_require__(2018); -const util = __webpack_require__(9023); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = __webpack_require__(7687); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = __webpack_require__(736)(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - - -/***/ }), - -/***/ 6049: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var db = __webpack_require__(7598) -var extname = (__webpack_require__(6928).extname) - -/** - * Module variables. - * @private - */ - -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} - - -/***/ }), - -/***/ 6188: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./max')} */ -module.exports = Math.max; - - -/***/ }), - -/***/ 6232: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var _default = exports["default"] = { - BASIC_AUTHENTICATION: 'BASIC_AUTH', - APIKEY_IDENTIFICATION: 'APIKEY', - ANONYMOUS_IDENTIFICATION: 'ANONYMOUS', - ACTIVE: 'active', - NUMBER: 'number', - NAME: 'name', - VERSION: 'version', - DELETED: 'deleted', - CASCADE: 'forceCascade', - PRICE: 'price', - DISCOUNT: 'discount', - CURRENCY: 'currency', - IN_USE: 'inUse', - FILTER: 'filter', - BASE_URL: 'baseUrl', - USERNAME: 'username', - PASSWORD: 'password', - SECURITY_MODE: 'securityMode', - LicensingModel: { - VALID: 'valid', - TryAndBuy: { - NAME: 'TryAndBuy' - }, - Rental: { - NAME: 'Rental', - RED_THRESHOLD: 'redThreshold', - YELLOW_THRESHOLD: 'yellowThreshold' - }, - Subscription: { - NAME: 'Subscription' - }, - Floating: { - NAME: 'Floating' - }, - MultiFeature: { - NAME: 'MultiFeature' - }, - PayPerUse: { - NAME: 'PayPerUse' - }, - PricingTable: { - NAME: 'PricingTable' - }, - Quota: { - NAME: 'Quota' - }, - NodeLocked: { - NAME: 'NodeLocked' - } - }, - Vendor: { - VENDOR_NUMBER: 'vendorNumber', - VENDOR_TYPE: 'Vendor' - }, - Product: { - ENDPOINT_PATH: 'product', - PRODUCT_NUMBER: 'productNumber', - LICENSEE_AUTO_CREATE: 'licenseeAutoCreate', - DESCRIPTION: 'description', - LICENSING_INFO: 'licensingInfo', - DISCOUNTS: 'discounts', - /** - * @deprecated use ProductModule.PROP_LICENSEE_SECRET_MODE instead - */ - PROP_LICENSEE_SECRET_MODE: 'licenseeSecretMode', - PROP_VAT_MODE: 'vatMode', - Discount: { - TOTAL_PRICE: 'totalPrice', - AMOUNT_FIX: 'amountFix', - AMOUNT_PERCENT: 'amountPercent' - }, - LicenseeSecretMode: { - /** - * @deprecated DISABLED mode is deprecated - */ - DISABLED: 'DISABLED', - PREDEFINED: 'PREDEFINED', - CLIENT: 'CLIENT' - } - }, - ProductModule: { - ENDPOINT_PATH: 'productmodule', - PRODUCT_MODULE_NUMBER: 'productModuleNumber', - PRODUCT_MODULE_NAME: 'productModuleName', - LICENSING_MODEL: 'licensingModel', - PROP_LICENSEE_SECRET_MODE: 'licenseeSecretMode' - }, - LicenseTemplate: { - ENDPOINT_PATH: 'licensetemplate', - LICENSE_TEMPLATE_NUMBER: 'licenseTemplateNumber', - LICENSE_TYPE: 'licenseType', - AUTOMATIC: 'automatic', - HIDDEN: 'hidden', - HIDE_LICENSES: 'hideLicenses', - PROP_LICENSEE_SECRET: 'licenseeSecret', - LicenseType: { - FEATURE: 'FEATURE', - TIMEVOLUME: 'TIMEVOLUME', - FLOATING: 'FLOATING', - QUANTITY: 'QUANTITY' - } - }, - Token: { - ENDPOINT_PATH: 'token', - EXPIRATION_TIME: 'expirationTime', - TOKEN_TYPE: 'tokenType', - API_KEY: 'apiKey', - TOKEN_PROP_EMAIL: 'email', - TOKEN_PROP_VENDORNUMBER: 'vendorNumber', - TOKEN_PROP_SHOP_URL: 'shopURL', - Type: { - DEFAULT: 'DEFAULT', - SHOP: 'SHOP', - APIKEY: 'APIKEY' - } - }, - Transaction: { - ENDPOINT_PATH: 'transaction', - TRANSACTION_NUMBER: 'transactionNumber', - GRAND_TOTAL: 'grandTotal', - STATUS: 'status', - SOURCE: 'source', - DATE_CREATED: 'datecreated', - DATE_CLOSED: 'dateclosed', - VAT: 'vat', - VAT_MODE: 'vatMode', - LICENSE_TRANSACTION_JOIN: 'licenseTransactionJoin', - SOURCE_SHOP_ONLY: 'shopOnly', - /** - * @deprecated - */ - Status: { - CANCELLED: 'CANCELLED', - CLOSED: 'CLOSED', - PENDING: 'PENDING' - } - }, - Licensee: { - ENDPOINT_PATH: 'licensee', - ENDPOINT_PATH_VALIDATE: 'validate', - ENDPOINT_PATH_TRANSFER: 'transfer', - LICENSEE_NUMBER: 'licenseeNumber', - SOURCE_LICENSEE_NUMBER: 'sourceLicenseeNumber', - PROP_LICENSEE_NAME: 'licenseeName', - /** - * @deprecated use License.PROP_LICENSEE_SECRET - */ - PROP_LICENSEE_SECRET: 'licenseeSecret', - PROP_MARKED_FOR_TRANSFER: 'markedForTransfer' - }, - License: { - ENDPOINT_PATH: 'license', - LICENSE_NUMBER: 'licenseNumber', - HIDDEN: 'hidden', - PROP_LICENSEE_SECRET: 'licenseeSecret' - }, - PaymentMethod: { - ENDPOINT_PATH: 'paymentmethod' - }, - Utility: { - ENDPOINT_PATH: 'utility', - ENDPOINT_PATH_LICENSE_TYPES: 'licenseTypes', - ENDPOINT_PATH_LICENSING_MODELS: 'licensingModels', - ENDPOINT_PATH_COUNTRIES: 'countries', - LICENSING_MODEL_PROPERTIES: 'LicensingModelProperties', - LICENSE_TYPE: 'LicenseType' - }, - APIKEY: { - ROLE_APIKEY_LICENSEE: 'ROLE_APIKEY_LICENSEE', - ROLE_APIKEY_ANALYTICS: 'ROLE_APIKEY_ANALYTICS', - ROLE_APIKEY_OPERATION: 'ROLE_APIKEY_OPERATION', - ROLE_APIKEY_MAINTENANCE: 'ROLE_APIKEY_MAINTENANCE', - ROLE_APIKEY_ADMIN: 'ROLE_APIKEY_ADMIN' - }, - Validation: { - FOR_OFFLINE_USE: 'forOfflineUse' - }, - WarningLevel: { - GREEN: 'GREEN', - YELLOW: 'YELLOW', - RED: 'RED' - }, - Bundle: { - ENDPOINT_PATH: 'bundle', - ENDPOINT_OBTAIN_PATH: 'obtain' - }, - Notification: { - ENDPOINT_PATH: 'notification', - Protocol: { - WEBHOOK: 'WEBHOOK' - }, - Event: { - LICENSEE_CREATED: 'LICENSEE_CREATED', - LICENSE_CREATED: 'LICENSE_CREATED', - WARNING_LEVEL_CHANGED: 'WARNING_LEVEL_CHANGED', - PAYMENT_TRANSACTION_PROCESSED: 'PAYMENT_TRANSACTION_PROCESSED' - } - } -}; - -/***/ }), - -/***/ 6276: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var abort = __webpack_require__(4555) - , async = __webpack_require__(2313) - ; - -// API -module.exports = terminator; - -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; - } - - // fast forward iteration index - this.index = this.size; - - // abort jobs - abort(this); - - // send back results we have so far - async(callback)(null, this.results); -} - - -/***/ }), - -/***/ 6359: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -var _itemToCountry = _interopRequireDefault(__webpack_require__(6899)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Utility Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/utility-services - * @constructor - */ -var _default = exports["default"] = { - /** - * Returns all license types. See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/utility-services#license-types-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * array of available license types or empty array if nothing found in promise. - * @returns {Promise} - */ - listLicenseTypes: function listLicenseTypes(context) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$get, data; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.get(context, "".concat(_Constants.default.Utility.ENDPOINT_PATH, "/").concat(_Constants.default.Utility.ENDPOINT_PATH_LICENSE_TYPES)); - case 2: - _yield$Service$get = _context.sent; - data = _yield$Service$get.data; - return _context.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref) { - var type = _ref.type; - return type === 'LicenseType'; - }).map(function (v) { - return (0, _itemToObject.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 5: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Returns all license models. See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/utility-services#licensing-models-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * array of available license models or empty array if nothing found in promise. - * @returns {Promise} - */ - listLicensingModels: function listLicensingModels(context) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _context2.next = 2; - return _Service.default.get(context, "".concat(_Constants.default.Utility.ENDPOINT_PATH, "/").concat(_Constants.default.Utility.ENDPOINT_PATH_LICENSING_MODELS)); - case 2: - _yield$Service$get2 = _context2.sent; - data = _yield$Service$get2.data; - return _context2.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref2) { - var type = _ref2.type; - return type === 'LicensingModelProperties'; - }).map(function (v) { - return (0, _itemToObject.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 5: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns all countries. - * - * determines the vendor on whose behalf the call is performed - * @param context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter - * - * collection of available countries or null/empty list if nothing found in promise. - * @returns {Promise} - */ - listCountries: function listCountries(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get3, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, "".concat(_Constants.default.Utility.ENDPOINT_PATH, "/").concat(_Constants.default.Utility.ENDPOINT_PATH_COUNTRIES), queryParams); - case 7: - _yield$Service$get3 = _context3.sent; - data = _yield$Service$get3.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Country'; - }).map(function (v) { - return (0, _itemToCountry.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - } -}; - -/***/ }), - -/***/ 6469: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(1837)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var NlicError = exports["default"] = /*#__PURE__*/function (_Error) { - function NlicError() { - var _this; - (0, _classCallCheck2.default)(this, NlicError); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - _this = _callSuper(this, NlicError, [].concat(args)); - _this.config = {}; - _this.response = {}; - _this.request = {}; - _this.code = ''; - _this.isNlicError = true; - _this.isAxiosError = true; - return _this; - } - (0, _inherits2.default)(NlicError, _Error); - return (0, _createClass2.default)(NlicError, [{ - key: "toJSON", - value: function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code - }; - } - }]); -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); - -/***/ }), - -/***/ 6504: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var parseUrl = (__webpack_require__(7016).parse); - -var DEFAULT_PORTS = { - ftp: 21, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443, -}; - -var stringEndsWith = String.prototype.endsWith || function(s) { - return s.length <= this.length && - this.indexOf(s, this.length - s.length) !== -1; -}; - -/** - * @param {string|object} url - The URL, or the result from url.parse. - * @return {string} The URL of the proxy that should handle the request to the - * given URL. If no proxy is set, this will be an empty string. - */ -function getProxyForUrl(url) { - var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {}; - var proto = parsedUrl.protocol; - var hostname = parsedUrl.host; - var port = parsedUrl.port; - if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { - return ''; // Don't proxy URLs without a valid scheme or host. - } - - proto = proto.split(':', 1)[0]; - // Stripping ports in this way instead of using parsedUrl.hostname to make - // sure that the brackets around IPv6 addresses are kept. - hostname = hostname.replace(/:\d*$/, ''); - port = parseInt(port) || DEFAULT_PORTS[proto] || 0; - if (!shouldProxy(hostname, port)) { - return ''; // Don't proxy URLs that match NO_PROXY. - } - - var proxy = - getEnv('npm_config_' + proto + '_proxy') || - getEnv(proto + '_proxy') || - getEnv('npm_config_proxy') || - getEnv('all_proxy'); - if (proxy && proxy.indexOf('://') === -1) { - // Missing scheme in proxy, default to the requested URL's scheme. - proxy = proto + '://' + proxy; - } - return proxy; -} - -/** - * Determines whether a given URL should be proxied. - * - * @param {string} hostname - The host name of the URL. - * @param {number} port - The effective port of the URL. - * @returns {boolean} Whether the given URL should be proxied. - * @private - */ -function shouldProxy(hostname, port) { - var NO_PROXY = - (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase(); - if (!NO_PROXY) { - return true; // Always proxy if NO_PROXY is not set. - } - if (NO_PROXY === '*') { - return false; // Never proxy if wildcard is set. - } - - return NO_PROXY.split(/[,\s]/).every(function(proxy) { - if (!proxy) { - return true; // Skip zero-length hosts. - } - var parsedProxy = proxy.match(/^(.+):(\d+)$/); - var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; - var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; - if (parsedProxyPort && parsedProxyPort !== port) { - return true; // Skip if ports don't match. - } - - if (!/^[.*]/.test(parsedProxyHostname)) { - // No wildcards, so stop proxying if there is an exact match. - return hostname !== parsedProxyHostname; - } - - if (parsedProxyHostname.charAt(0) === '*') { - // Remove leading wildcard. - parsedProxyHostname = parsedProxyHostname.slice(1); - } - // Stop proxying if the hostname ends with the no_proxy host. - return !stringEndsWith.call(hostname, parsedProxyHostname); - }); -} - -/** - * Get the value for an environment variable. - * - * @param {string} key - The name of the environment variable. - * @return {string} The value of the environment variable. - * @private - */ -function getEnv(key) { - return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; -} - -exports.getProxyForUrl = getProxyForUrl; - - -/***/ }), - -/***/ 6549: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./gOPD')} */ -module.exports = Object.getOwnPropertyDescriptor; - - -/***/ }), - -/***/ 6585: -/***/ ((module) => { - -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function (val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} - - -/***/ }), - -/***/ 6743: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var implementation = __webpack_require__(9353); - -module.exports = Function.prototype.bind || implementation; - - -/***/ }), - -/***/ 6798: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToPaymentMethod = _interopRequireDefault(__webpack_require__(2430)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var _default = exports["default"] = { - /** - * Gets payment method by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/payment-method-services#get-payment-method - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the payment method number - * @param number string - * - * return the payment method in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$get, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.PaymentMethod.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context.sent; - items = _yield$Service$get.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'PaymentMethod'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToPaymentMethod.default)(item)); - case 7: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Returns payment methods of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/payment-method-services#payment-methods-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of payment method entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - queryParams = {}; - if (!filter) { - _context2.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context2.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context2.next = 7; - return _Service.default.get(context, _Constants.default.PaymentMethod.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context2.sent; - data = _yield$Service$get2.data; - return _context2.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref2) { - var type = _ref2.type; - return type === 'PaymentMethod'; - }).map(function (v) { - return (0, _itemToPaymentMethod.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Updates payment method properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/payment-method-services#update-payment-method - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the payment method number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param paymentMethod NetLicensing.PaymentMethod - * - * return updated payment method in promise. - * @returns {Promise} - */ - update: function update(context, number, paymentMethod) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var path, _yield$Service$post, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - path = "".concat(_Constants.default.PaymentMethod.ENDPOINT_PATH, "/").concat(number); - _context3.next = 4; - return _Service.default.post(context, path, paymentMethod.asPropertiesMap()); - case 4: - _yield$Service$post = _context3.sent; - items = _yield$Service$post.data.items.item; - _items$filter3 = items.filter(function (_ref3) { - var type = _ref3.type; - return type === 'PaymentMethod'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context3.abrupt("return", (0, _itemToPaymentMethod.default)(item)); - case 8: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - } -}; - -/***/ }), - -/***/ 6899: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _Country = _interopRequireDefault(__webpack_require__(7147)); -var _default = exports["default"] = function _default(item) { - return new _Country.default((0, _itemToObject.default)(item)); -}; - -/***/ }), - -/***/ 6928: -/***/ ((module) => { - -"use strict"; -module.exports = require("path"); - -/***/ }), - -/***/ 6982: -/***/ ((module) => { - -"use strict"; -module.exports = require("crypto"); - -/***/ }), - -/***/ 7016: -/***/ ((module) => { - -"use strict"; -module.exports = require("url"); - -/***/ }), - -/***/ 7119: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./reflectApply')} */ -module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; - - -/***/ }), - -/***/ 7122: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var arrayLikeToArray = __webpack_require__(79); -function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; - } -} -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7131: -/***/ ((module) => { - -(function () { - "use strict"; - - function btoa(str) { - var buffer; - - if (str instanceof Buffer) { - buffer = str; - } else { - buffer = Buffer.from(str.toString(), 'binary'); - } - - return buffer.toString('base64'); - } - - module.exports = btoa; -}()); - - -/***/ }), - -/***/ 7147: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * Country entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * @property code - Unique code of country. - * - * @property name - Unique name of country - * - * @property vatPercent - Country vat. - * - * @property isEu - is country in EU. - */ -var Country = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Country(properties) { - (0, _classCallCheck2.default)(this, Country); - return _callSuper(this, Country, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - code: 'string', - name: 'string', - vatPercent: 'int', - isEu: 'boolean' - } - }]); - } - (0, _inherits2.default)(Country, _BaseEntity); - return (0, _createClass2.default)(Country, [{ - key: "setCode", - value: function setCode(code) { - return this.setProperty('code', code); - } - }, { - key: "getCode", - value: function getCode(def) { - return this.getProperty('code', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setVatPercent", - value: function setVatPercent(vat) { - return this.setProperty('vatPercent', vat); - } - }, { - key: "getVatPercent", - value: function getVatPercent(def) { - return this.getProperty('vatPercent', def); - } - }, { - key: "setIsEu", - value: function setIsEu(isEu) { - return this.setProperty('isEu', isEu); - } - }, { - key: "getIsEu", - value: function getIsEu(def) { - return this.getProperty('isEu', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 7176: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var callBind = __webpack_require__(3126); -var gOPD = __webpack_require__(5795); - -var hasProtoAccessor; -try { - // eslint-disable-next-line no-extra-parens, no-proto - hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; -} catch (e) { - if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { - throw e; - } -} - -// eslint-disable-next-line no-extra-parens -var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); - -var $Object = Object; -var $getPrototypeOf = $Object.getPrototypeOf; - -/** @type {import('./get')} */ -module.exports = desc && typeof desc.get === 'function' - ? callBind([desc.get]) - : typeof $getPrototypeOf === 'function' - ? /** @type {import('./get')} */ function getDunder(value) { - // eslint-disable-next-line eqeqeq - return $getPrototypeOf(value == null ? value : $Object(value)); - } - : false; - - -/***/ }), - -/***/ 7211: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _ValidationResults = _interopRequireDefault(__webpack_require__(8506)); -var _itemToLicensee = _interopRequireDefault(__webpack_require__(4067)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Licensee Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/licensee-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new licensee object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#create-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent product to which the new licensee is to be added - * @param productNumber string - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param licensee NetLicensing.Licensee - * - * return the newly created licensee object in promise - * @returns {Promise} - */ - create: function create(context, productNumber, licensee) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _CheckUtils.default.paramNotEmpty(productNumber, _Constants.default.Product.PRODUCT_NUMBER); - licensee.setProperty(_Constants.default.Product.PRODUCT_NUMBER, productNumber); - _context.next = 4; - return _Service.default.post(context, _Constants.default.Licensee.ENDPOINT_PATH, licensee.asPropertiesMap()); - case 4: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Licensee'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToLicensee.default)(item)); - case 8: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets licensee by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#get-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the licensee number - * @param number string - * - * return the licensee in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Licensee.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Licensee'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToLicensee.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns all licensees of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#licensees-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of licensees (of all products) or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Licensee.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Licensee'; - }).map(function (v) { - return (0, _itemToLicensee.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates licensee properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#update-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * licensee number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param licensee NetLicensing.Licensee - * - * return updated licensee in promise. - * @returns {Promise} - */ - update: function update(context, number, licensee) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.Licensee.ENDPOINT_PATH, "/").concat(number), licensee.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'Licensee'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToLicensee.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes licensee.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#delete-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * licensee number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.Licensee.ENDPOINT_PATH, "/").concat(number), queryParams); - }, - /** - * Validates active licenses of the licensee. - * In the case of multiple product modules validation, - * required parameters indexes will be added automatically. - * See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#validate-licensee - * - * @param context NetLicensing.Context - * - * licensee number - * @param number string - * - * optional validation parameters. See ValidationParameters and licensing model documentation for - * details. - * @param validationParameters NetLicensing.ValidationParameters. - * - * @returns {ValidationResults} - */ - validate: function validate(context, number, validationParameters) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() { - var queryParams, pmIndex, parameters, has, _yield$Service$post3, _yield$Service$post3$, items, ttl, validationResults; - return _regenerator.default.wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - queryParams = {}; - if (validationParameters.getProductNumber()) { - queryParams.productNumber = validationParameters.getProductNumber(); - } - Object.keys(validationParameters.getLicenseeProperties()).forEach(function (key) { - queryParams[key] = validationParameters.getLicenseeProperty(key); - }); - if (validationParameters.isForOfflineUse()) { - queryParams.forOfflineUse = true; - } - if (validationParameters.getDryRun()) { - queryParams.dryRun = true; - } - pmIndex = 0; - parameters = validationParameters.getParameters(); - has = Object.prototype.hasOwnProperty; - Object.keys(parameters).forEach(function (productModuleName) { - queryParams["".concat(_Constants.default.ProductModule.PRODUCT_MODULE_NUMBER).concat(pmIndex)] = productModuleName; - if (!has.call(parameters, productModuleName)) return; - var parameter = parameters[productModuleName]; - Object.keys(parameter).forEach(function (key) { - if (has.call(parameter, key)) { - queryParams[key + pmIndex] = parameter[key]; - } - }); - pmIndex += 1; - }); - _context5.next = 12; - return _Service.default.post(context, "".concat(_Constants.default.Licensee.ENDPOINT_PATH, "/").concat(number, "/").concat(_Constants.default.Licensee.ENDPOINT_PATH_VALIDATE), queryParams); - case 12: - _yield$Service$post3 = _context5.sent; - _yield$Service$post3$ = _yield$Service$post3.data; - items = _yield$Service$post3$.items.item; - ttl = _yield$Service$post3$.ttl; - validationResults = new _ValidationResults.default(); - validationResults.setTtl(ttl); - items.filter(function (_ref5) { - var type = _ref5.type; - return type === 'ProductModuleValidation'; - }).forEach(function (v) { - var item = (0, _itemToObject.default)(v); - validationResults.setProductModuleValidation(item[_Constants.default.ProductModule.PRODUCT_MODULE_NUMBER], item); - }); - return _context5.abrupt("return", validationResults); - case 20: - case "end": - return _context5.stop(); - } - }, _callee5); - }))(); - }, - /** - * Transfer licenses between licensees. - * @see https://netlicensing.io/wiki/licensee-services#transfer-licenses - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the number of the licensee receiving licenses - * @param number string - * - * the number of the licensee delivering licenses - * @param sourceLicenseeNumber string - * - * @returns {Promise} - */ - transfer: function transfer(context, number, sourceLicenseeNumber) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _CheckUtils.default.paramNotEmpty(sourceLicenseeNumber, _Constants.default.Licensee.SOURCE_LICENSEE_NUMBER); - var queryParams = { - sourceLicenseeNumber: sourceLicenseeNumber - }; - return _Service.default.post(context, "".concat(_Constants.default.Licensee.ENDPOINT_PATH, "/").concat(number, "/").concat(_Constants.default.Licensee.ENDPOINT_PATH_TRANSFER), queryParams); - } -}; - -/***/ }), - -/***/ 7383: -/***/ ((module) => { - -function _classCallCheck(a, n) { - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); -} -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7394: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToLicense = _interopRequireDefault(__webpack_require__(5402)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the License Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/license-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new license object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#create-license - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent licensee to which the new license is to be added - * @param licenseeNumber string - * - * license template that the license is created from - * @param licenseTemplateNumber string - * - * For privileged logins specifies transaction for the license creation. For regular logins new - * transaction always created implicitly, and the operation will be in a separate transaction. - * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with - * auto-generated number. - * @param transactionNumber null|string - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param license NetLicensing.License - * - * return the newly created license object in promise - * @returns {Promise} - */ - create: function create(context, licenseeNumber, licenseTemplateNumber, transactionNumber, license) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _CheckUtils.default.paramNotEmpty(licenseeNumber, _Constants.default.Licensee.LICENSEE_NUMBER); - _CheckUtils.default.paramNotEmpty(licenseTemplateNumber, _Constants.default.LicenseTemplate.LICENSE_TEMPLATE_NUMBER); - license.setProperty(_Constants.default.Licensee.LICENSEE_NUMBER, licenseeNumber); - license.setProperty(_Constants.default.LicenseTemplate.LICENSE_TEMPLATE_NUMBER, licenseTemplateNumber); - if (transactionNumber) license.setProperty(_Constants.default.Transaction.TRANSACTION_NUMBER, transactionNumber); - _context.next = 7; - return _Service.default.post(context, _Constants.default.License.ENDPOINT_PATH, license.asPropertiesMap()); - case 7: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'License'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToLicense.default)(item)); - case 11: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets license by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#get-license - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the license number - * @param number string - * - * return the license in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.License.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'License'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToLicense.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns licenses of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#licenses-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * return array of licenses (of all products) or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.License.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'License'; - }).map(function (v) { - return (0, _itemToLicense.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates license properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#update-license - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license number - * @param number string - * - * transaction for the license update. Created implicitly if transactionNumber is null. In this case the - * operation will be in a separate transaction. - * @param transactionNumber string|null - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param license NetLicensing.License - * - * return updated license in promise. - * @returns {Promise} - */ - update: function update(context, number, transactionNumber, license) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - if (transactionNumber) license.setProperty(_Constants.default.Transaction.TRANSACTION_NUMBER, transactionNumber); - _context4.next = 4; - return _Service.default.post(context, "".concat(_Constants.default.License.ENDPOINT_PATH, "/").concat(number), license.asPropertiesMap()); - case 4: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'License'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToLicense.default)(item)); - case 8: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes license.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#delete-license - * - * When any license is deleted, corresponding transaction is created automatically. - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.License.ENDPOINT_PATH, "/").concat(number), queryParams); - } -}; - -/***/ }), - -/***/ 7507: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var debug; - -module.exports = function () { - if (!debug) { - try { - /* eslint global-require: off */ - debug = __webpack_require__(5753)("follow-redirects"); - } - catch (error) { /* */ } - if (typeof debug !== "function") { - debug = function () { /* */ }; - } - } - debug.apply(null, arguments); -}; - - -/***/ }), - -/***/ 7550: -/***/ ((module) => { - -function _isNativeReflectConstruct() { - try { - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (t) {} - return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { - return !!t; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); -} -module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7598: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = __webpack_require__(1813) - - -/***/ }), - -/***/ 7687: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - -const os = __webpack_require__(857); -const tty = __webpack_require__(2018); -const hasFlag = __webpack_require__(5884); - -const {env} = process; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false') || - hasFlag('color=never')) { - forceColor = 0; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = 1; -} - -if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (haveStream && !streamIsTTY && forceColor === undefined) { - return 0; - } - - const min = forceColor || 0; - - if (env.TERM === 'dumb') { - return min; - } - - if (process.platform === 'win32') { - // Windows 10 build 10586 is the first Windows release that supports 256 colors. - // Windows 10 build 14931 is the first release that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) -}; - - -/***/ }), - -/***/ 7736: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var _typeof = (__webpack_require__(3738)["default"]); -var toPrimitive = __webpack_require__(9045); -function toPropertyKey(t) { - var i = toPrimitive(t, "string"); - return "symbol" == _typeof(i) ? i : i + ""; -} -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7752: -/***/ ((module) => { - -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7833: -/***/ ((module, exports, __webpack_require__) => { - -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - let m; - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - // eslint-disable-next-line no-return-assign - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = __webpack_require__(736)(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; - - -/***/ }), - -/***/ 8002: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./min')} */ -module.exports = Math.min; - - -/***/ }), - -/***/ 8051: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var async = __webpack_require__(2313) - , abort = __webpack_require__(4555) - ; - -// API -module.exports = iterate; - -/** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed - */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; - - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; - } - - // clean up jobs - delete state.jobs[key]; - - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); - } - else - { - state.results[key] = output; - } - - // return salvaged results - callback(error, state.results); - }); -} - -/** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else - */ -function runJob(iterator, key, item, callback) -{ - var aborter; - - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); - } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); - } - - return aborter; -} - - -/***/ }), - -/***/ 8068: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./syntax')} */ -module.exports = SyntaxError; - - -/***/ }), - -/***/ 8069: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var Stream = (__webpack_require__(2203).Stream); -var util = __webpack_require__(9023); - -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; - - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); - -DelayedStream.create = function(source, options) { - var delayedStream = new this(); - - options = options || {}; - for (var option in options) { - delayedStream[option] = options[option]; - } - - delayedStream.source = source; - - var realEmit = source.emit; - source.emit = function() { - delayedStream._handleEmit(arguments); - return realEmit.apply(source, arguments); - }; - - source.on('error', function() {}); - if (delayedStream.pauseStream) { - source.pause(); - } - - return delayedStream; -}; - -Object.defineProperty(DelayedStream.prototype, 'readable', { - configurable: true, - enumerable: true, - get: function() { - return this.source.readable; - } -}); - -DelayedStream.prototype.setEncoding = function() { - return this.source.setEncoding.apply(this.source, arguments); -}; - -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); - } - - this.source.resume(); -}; - -DelayedStream.prototype.pause = function() { - this.source.pause(); -}; - -DelayedStream.prototype.release = function() { - this._released = true; - - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; -}; - -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; - -DelayedStream.prototype._handleEmit = function(args) { - if (this._released) { - this.emit.apply(this, args); - return; - } - - if (args[0] === 'data') { - this.dataSize += args[1].length; - this._checkIfMaxDataSizeExceeded(); - } - - this._bufferedEvents.push(args); -}; - -DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { - if (this._maxDataSizeExceeded) { - return; - } - - if (this.dataSize <= this.maxDataSize) { - return; - } - - this._maxDataSizeExceeded = true; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this.emit('error', new Error(message)); -}; - - -/***/ }), - -/***/ 8330: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"netlicensing-client","version":"1.2.38","description":"JavaScript Wrapper for Labs64 NetLicensing RESTful API","keywords":["labs64","netlicensing","licensing","licensing-as-a-service","license","license-management","software-license","client","restful","restful-api","javascript","wrapper","api","client"],"license":"Apache-2.0","author":"Labs64 GmbH","homepage":"https://netlicensing.io","repository":{"type":"git","url":"https://github.com/Labs64/NetLicensingClient-javascript"},"bugs":{"url":"https://github.com/Labs64/NetLicensingClient-javascript/issues"},"contributors":[{"name":"Ready Brown","email":"ready.brown@hotmail.de","url":"https://github.com/r-brown"},{"name":"Viacheslav Rudkovskiy","email":"viachaslau.rudkovski@labs64.de","url":"https://github.com/v-rudkovskiy"},{"name":"Andrei Yushkevich","email":"yushkevich@me.com","url":"https://github.com/yushkevich"}],"main":"dist/netlicensing-client.js","files":["dist"],"scripts":{"build":"node build/build.cjs","release":"npm run build && npm run test","dev":"webpack --progress --watch --config build/webpack.dev.conf.cjs","test":"karma start test/karma.conf.js --single-run","test-mocha":"webpack --config build/webpack.test.conf.cjs","test-for-travis":"karma start test/karma.conf.js --single-run --browsers Firefox","lint":"eslint --ext .js,.vue src test"},"dependencies":{"axios":"^1.8.2","btoa":"^1.2.1","es6-promise":"^4.2.8"},"devDependencies":{"@babel/core":"^7.26.9","@babel/plugin-proposal-class-properties":"^7.16.7","@babel/plugin-proposal-decorators":"^7.25.9","@babel/plugin-proposal-export-namespace-from":"^7.16.7","@babel/plugin-proposal-function-sent":"^7.25.9","@babel/plugin-proposal-json-strings":"^7.16.7","@babel/plugin-proposal-numeric-separator":"^7.16.7","@babel/plugin-proposal-throw-expressions":"^7.25.9","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-meta":"^7.10.4","@babel/plugin-transform-modules-commonjs":"^7.26.3","@babel/plugin-transform-runtime":"^7.26.9","@babel/preset-env":"^7.26.9","@babel/runtime":"^7.26.9","axios-mock-adapter":"^2.1.0","babel-eslint":"^10.1.0","babel-loader":"^9.2.1","chalk":"^4.1.2","eslint":"^8.2.0","eslint-config-airbnb-base":"^15.0.0","eslint-friendly-formatter":"^4.0.1","eslint-import-resolver-webpack":"^0.13.10","eslint-plugin-import":"^2.31.0","eslint-plugin-jasmine":"^4.2.2","eslint-webpack-plugin":"^4.2.0","faker":"^5.5.3","is-docker":"^2.2.1","jasmine":"^4.0.2","jasmine-core":"^4.0.1","karma":"^6.3.17","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^4.0.2","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"0.0.33","karma-webpack":"^5.0.0","lodash":"^4.17.21","ora":"^5.4.1","rimraf":"^3.0.2","terser-webpack-plugin":"^5.3.1","webpack":"^5.76.0","webpack-cli":"^5.1.1","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.0.0","npm":">= 8.0.0"},"browserslist":["> 1%","last 2 versions","not ie <= 10"]}'); - -/***/ }), - -/***/ 8452: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var _typeof = (__webpack_require__(3738)["default"]); -var assertThisInitialized = __webpack_require__(2475); -function _possibleConstructorReturn(t, e) { - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); - return assertThisInitialized(t); -} -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 8506: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _typeof2 = _interopRequireDefault(__webpack_require__(3738)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(3693)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -var ValidationResults = exports["default"] = /*#__PURE__*/function () { - function ValidationResults() { - (0, _classCallCheck2.default)(this, ValidationResults); - this.validators = {}; - } - return (0, _createClass2.default)(ValidationResults, [{ - key: "getValidators", - value: function getValidators() { - return _objectSpread({}, this.validators); - } - }, { - key: "setProductModuleValidation", - value: function setProductModuleValidation(productModuleNumber, productModuleValidation) { - if (!_CheckUtils.default.isValid(productModuleNumber) || (0, _typeof2.default)(productModuleNumber) === 'object') { - throw new TypeError("Bad productModuleNumber:".concat(productModuleNumber)); - } - this.validators[productModuleNumber] = productModuleValidation; - return this; - } - }, { - key: "getProductModuleValidation", - value: function getProductModuleValidation(productModuleNumber) { - if (!_CheckUtils.default.isValid(productModuleNumber) || (0, _typeof2.default)(productModuleNumber) === 'object') { - throw new TypeError("Bad productModuleNumber:".concat(productModuleNumber)); - } - return this.validators[productModuleNumber]; - } - }, { - key: "setTtl", - value: function setTtl(ttl) { - if (!_CheckUtils.default.isValid(ttl) || (0, _typeof2.default)(ttl) === 'object') { - throw new TypeError("Bad ttl:".concat(ttl)); - } - this.ttl = new Date(String(ttl)); - return this; - } - }, { - key: "getTtl", - value: function getTtl() { - return this.ttl ? new Date(this.ttl) : undefined; - } - }, { - key: "toString", - value: function toString() { - var data = 'ValidationResult ['; - var validators = this.getValidators(); - var has = Object.prototype.hasOwnProperty; - Object.keys(validators).forEach(function (productModuleNumber) { - data += "ProductModule<".concat(productModuleNumber, ">"); - if (has.call(validators, productModuleNumber)) { - data += JSON.stringify(validators[productModuleNumber]); - } - }); - data += ']'; - return data; - } - }]); -}(); - -/***/ }), - -/***/ 8611: -/***/ ((module) => { - -"use strict"; -module.exports = require("http"); - -/***/ }), - -/***/ 8648: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./Reflect.getPrototypeOf')} */ -module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; - - -/***/ }), - -/***/ 8769: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -// Cast an attribute to a native JS type. -var _default = exports["default"] = function _default(key, value) { - switch (key.trim().toLowerCase()) { - case 'str': - case 'string': - return String(value); - case 'int': - case 'integer': - { - var n = parseInt(value, 10); - return Number.isNaN(n) ? value : n; - } - case 'float': - case 'double': - { - var _n = parseFloat(value); - return Number.isNaN(_n) ? value : _n; - } - case 'bool': - case 'boolean': - switch (value) { - case 'true': - case 'TRUE': - return true; - case 'false': - case 'FALSE': - return false; - default: - return Boolean(value); - } - case 'date': - return value === 'now' ? 'now' : new Date(String(value)); - default: - return value; - } -}; - -/***/ }), - -/***/ 8798: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var iterate = __webpack_require__(8051) - , initState = __webpack_require__(9500) - , terminator = __webpack_require__(6276) - ; - -// Public API -module.exports = parallel; - -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); - - state.index++; - } - - return terminator.bind(state, callback); -} - - -/***/ }), - -/***/ 8833: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _default = exports["default"] = { - FILTER_DELIMITER: ';', - FILTER_PAIR_DELIMITER: '=', - encode: function encode() { - var _this = this; - var filter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var query = []; - var has = Object.prototype.hasOwnProperty; - Object.keys(filter).forEach(function (key) { - if (has.call(filter, key)) { - query.push("".concat(key).concat(_this.FILTER_PAIR_DELIMITER).concat(filter[key])); - } - }); - return query.join(this.FILTER_DELIMITER); - }, - decode: function decode() { - var _this2 = this; - var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; - var filter = {}; - query.split(this.FILTER_DELIMITER).forEach(function (v) { - var _v$split = v.split(_this2.FILTER_PAIR_DELIMITER), - _v$split2 = (0, _slicedToArray2.default)(_v$split, 2), - name = _v$split2[0], - value = _v$split2[1]; - filter[name] = value; - }); - return filter; - } -}; - -/***/ }), - -/***/ 8968: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./floor')} */ -module.exports = Math.floor; - - -/***/ }), - -/***/ 9023: -/***/ ((module) => { - -"use strict"; -module.exports = require("util"); - -/***/ }), - -/***/ 9045: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var _typeof = (__webpack_require__(3738)["default"]); -function toPrimitive(t, r) { - if ("object" != _typeof(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 9089: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(4756)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(3693)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(5715)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(9293)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _itemToBundle = _interopRequireDefault(__webpack_require__(3849)); -var _itemToLicense = _interopRequireDefault(__webpack_require__(5402)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * JS representation of the Bundle Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/bundle-services - * - * @constructor - */ -var _default = exports["default"] = { - /** - * Creates new bundle with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#create-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param bundle NetLicensing.Bundle - * - * return the newly created bundle object in promise - * @returns {Promise} - */ - create: function create(context, bundle) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { - var _yield$Service$post, items, _items$filter, _items$filter2, item; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _Service.default.post(context, _Constants.default.Bundle.ENDPOINT_PATH, bundle.asPropertiesMap()); - case 2: - _yield$Service$post = _context.sent; - items = _yield$Service$post.data.items.item; - _items$filter = items.filter(function (_ref) { - var type = _ref.type; - return type === 'Bundle'; - }), _items$filter2 = (0, _slicedToArray2.default)(_items$filter, 1), item = _items$filter2[0]; - return _context.abrupt("return", (0, _itemToBundle.default)(item)); - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - /** - * Gets bundle by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#get-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the bundle number - * @param number string - * - * return the bundle object in promise - * @returns {Promise} - */ - get: function get(context, number) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { - var _yield$Service$get, items, _items$filter3, _items$filter4, item; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context2.next = 3; - return _Service.default.get(context, "".concat(_Constants.default.Bundle.ENDPOINT_PATH, "/").concat(number)); - case 3: - _yield$Service$get = _context2.sent; - items = _yield$Service$get.data.items.item; - _items$filter3 = items.filter(function (_ref2) { - var type = _ref2.type; - return type === 'Bundle'; - }), _items$filter4 = (0, _slicedToArray2.default)(_items$filter3, 1), item = _items$filter4[0]; - return _context2.abrupt("return", (0, _itemToBundle.default)(item)); - case 7: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - }, - /** - * Returns bundle of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#bundles-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of bundle entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { - var queryParams, _yield$Service$get2, data; - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - queryParams = {}; - if (!filter) { - _context3.next = 5; - break; - } - if (_CheckUtils.default.isValid(filter)) { - _context3.next = 4; - break; - } - throw new TypeError("filter has bad value ".concat(filter)); - case 4: - queryParams[_Constants.default.FILTER] = typeof filter === 'string' ? filter : _FilterUtils.default.encode(filter); - case 5: - _context3.next = 7; - return _Service.default.get(context, _Constants.default.Bundle.ENDPOINT_PATH, queryParams); - case 7: - _yield$Service$get2 = _context3.sent; - data = _yield$Service$get2.data; - return _context3.abrupt("return", (0, _Page.default)(data.items.item.filter(function (_ref3) { - var type = _ref3.type; - return type === 'Bundle'; - }).map(function (v) { - return (0, _itemToBundle.default)(v); - }), data.items.pagenumber, data.items.itemsnumber, data.items.totalpages, data.items.totalitems)); - case 10: - case "end": - return _context3.stop(); - } - }, _callee3); - }))(); - }, - /** - * Updates bundle properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#update-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * bundle number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param bundle NetLicensing.Bundle - * - * updated bundle in promise. - * @returns {Promise} - */ - update: function update(context, number, bundle) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() { - var _yield$Service$post2, items, _items$filter5, _items$filter6, item; - return _regenerator.default.wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _context4.next = 3; - return _Service.default.post(context, "".concat(_Constants.default.Bundle.ENDPOINT_PATH, "/").concat(number), bundle.asPropertiesMap()); - case 3: - _yield$Service$post2 = _context4.sent; - items = _yield$Service$post2.data.items.item; - _items$filter5 = items.filter(function (_ref4) { - var type = _ref4.type; - return type === 'Bundle'; - }), _items$filter6 = (0, _slicedToArray2.default)(_items$filter5, 1), item = _items$filter6[0]; - return _context4.abrupt("return", (0, _itemToBundle.default)(item)); - case 7: - case "end": - return _context4.stop(); - } - }, _callee4); - }))(); - }, - /** - * Deletes bundle.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#delete-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * bundle number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - var queryParams = { - forceCascade: Boolean(forceCascade) - }; - return _Service.default.delete(context, "".concat(_Constants.default.Bundle.ENDPOINT_PATH, "/").concat(number), queryParams); - }, - /** - * Obtain bundle.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#obtain-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * bundle number - * @param number string - * - * licensee number - * @param licenseeNumber String - * - * return array of licenses - * @returns {Promise} - */ - obtain: function obtain(context, number, licenseeNumber) { - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() { - var _Constants$Bundle, ENDPOINT_PATH, ENDPOINT_OBTAIN_PATH, queryParams, _yield$Service$post3, items; - return _regenerator.default.wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { - case 0: - _CheckUtils.default.paramNotEmpty(number, _Constants.default.NUMBER); - _CheckUtils.default.paramNotEmpty(licenseeNumber, _Constants.default.Licensee.LICENSEE_NUMBER); - _Constants$Bundle = _Constants.default.Bundle, ENDPOINT_PATH = _Constants$Bundle.ENDPOINT_PATH, ENDPOINT_OBTAIN_PATH = _Constants$Bundle.ENDPOINT_OBTAIN_PATH; - queryParams = (0, _defineProperty2.default)({}, _Constants.default.Licensee.LICENSEE_NUMBER, licenseeNumber); - _context5.next = 6; - return _Service.default.post(context, "".concat(ENDPOINT_PATH, "/").concat(number, "/").concat(ENDPOINT_OBTAIN_PATH), queryParams); - case 6: - _yield$Service$post3 = _context5.sent; - items = _yield$Service$post3.data.items.item; - return _context5.abrupt("return", items.filter(function (_ref5) { - var type = _ref5.type; - return type === 'License'; - }).map(function (i) { - return (0, _itemToLicense.default)(i); - })); - case 9: - case "end": - return _context5.stop(); - } - }, _callee5); - }))(); - } -}; - -/***/ }), - -/***/ 9092: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var hasSymbols = __webpack_require__(1333); - -/** @type {import('.')} */ -module.exports = function hasToStringTagShams() { - return hasSymbols() && !!Symbol.toStringTag; -}; - - -/***/ }), - -/***/ 9142: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * Product module entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign - * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first - * licensee for the product. - * @property string number - * - * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this - * product module. - * @property boolean active - * - * Product module name that is visible to the end customers in NetLicensing Shop. - * @property string name - * - * Licensing model applied to this product module. Defines what license templates can be - * configured for the product module and how licenses for this product module are processed during validation. - * @property string licensingModel - * - * Maximum checkout validity (days). Mandatory for 'Floating' licensing model. - * @property integer maxCheckoutValidity - * - * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model. - * @property integer yellowThreshold - * - * Remaining time volume for red level. Mandatory for 'Rental' licensing model. - * @property integer redThreshold - * - * License template. Mandatory for 'Try & Buy' licensing model. Supported types: "TIMEVOLUME", "FEATURE". - * @property string licenseTemplate - * - * Licensee secret mode for product.Supported types: "PREDEFINED", "CLIENT" - * @property boolean licenseeSecretMode - * - * @constructor - */ -var ProductModule = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function ProductModule(properties) { - (0, _classCallCheck2.default)(this, ProductModule); - return _callSuper(this, ProductModule, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - licensingModel: 'string', - maxCheckoutValidity: 'int', - yellowThreshold: 'int', - redThreshold: 'int', - licenseTemplate: 'string', - inUse: 'boolean', - licenseeSecretMode: 'string' - } - }]); - } - (0, _inherits2.default)(ProductModule, _BaseEntity); - return (0, _createClass2.default)(ProductModule, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setLicensingModel", - value: function setLicensingModel(licensingModel) { - return this.setProperty('licensingModel', licensingModel); - } - }, { - key: "getLicensingModel", - value: function getLicensingModel(def) { - return this.getProperty('licensingModel', def); - } - }, { - key: "setMaxCheckoutValidity", - value: function setMaxCheckoutValidity(maxCheckoutValidity) { - return this.setProperty('maxCheckoutValidity', maxCheckoutValidity); - } - }, { - key: "getMaxCheckoutValidity", - value: function getMaxCheckoutValidity(def) { - return this.getProperty('maxCheckoutValidity', def); - } - }, { - key: "setYellowThreshold", - value: function setYellowThreshold(yellowThreshold) { - return this.setProperty('yellowThreshold', yellowThreshold); - } - }, { - key: "getYellowThreshold", - value: function getYellowThreshold(def) { - return this.getProperty('yellowThreshold', def); - } - }, { - key: "setRedThreshold", - value: function setRedThreshold(redThreshold) { - return this.setProperty('redThreshold', redThreshold); - } - }, { - key: "getRedThreshold", - value: function getRedThreshold(def) { - return this.getProperty('redThreshold', def); - } - }, { - key: "setLicenseTemplate", - value: function setLicenseTemplate(licenseTemplate) { - return this.setProperty('licenseTemplate', licenseTemplate); - } - }, { - key: "getLicenseTemplate", - value: function getLicenseTemplate(def) { - return this.getProperty('licenseTemplate', def); - } - }, { - key: "getInUse", - value: function getInUse(def) { - return this.getProperty('inUse', def); - } - }, { - key: "setLicenseeSecretMode", - value: function setLicenseeSecretMode(licenseeSecretMode) { - return this.setProperty('licenseeSecretMode', licenseeSecretMode); - } - }, { - key: "getLicenseeSecretMode", - value: function getLicenseeSecretMode(def) { - return this.getProperty('licenseeSecretMode', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 9290: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./range')} */ -module.exports = RangeError; - - -/***/ }), - -/***/ 9293: -/***/ ((module) => { - -function asyncGeneratorStep(n, t, e, r, o, a, c) { - try { - var i = n[a](c), - u = i.value; - } catch (n) { - return void e(n); - } - i.done ? t(u) : Promise.resolve(u).then(r, o); -} -function _asyncToGenerator(n) { - return function () { - var t = this, - e = arguments; - return new Promise(function (r, o) { - var a = n.apply(t, e); - function _next(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); - } - function _throw(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); - } - _next(void 0); - }); - }; -} -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 9329: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -/*! Axios v1.8.2 Copyright (c) 2025 Matt Zabriskie and contributors */ - - -const FormData$1 = __webpack_require__(737); -const crypto = __webpack_require__(6982); -const url = __webpack_require__(7016); -const proxyFromEnv = __webpack_require__(6504); -const http = __webpack_require__(8611); -const https = __webpack_require__(5692); -const util = __webpack_require__(9023); -const followRedirects = __webpack_require__(3164); -const zlib = __webpack_require__(3106); -const stream = __webpack_require__(2203); -const events = __webpack_require__(4434); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1); -const crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto); -const url__default = /*#__PURE__*/_interopDefaultLegacy(url); -const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv); -const http__default = /*#__PURE__*/_interopDefaultLegacy(http); -const https__default = /*#__PURE__*/_interopDefaultLegacy(https); -const util__default = /*#__PURE__*/_interopDefaultLegacy(util); -const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects); -const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib); -const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream); - -function bind(fn, thisArg) { - return function wrap() { - return fn.apply(thisArg, arguments); - }; -} - -// utils is a library of generic helper functions non-specific to axios - -const {toString} = Object.prototype; -const {getPrototypeOf} = Object; - -const kindOf = (cache => thing => { - const str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); -})(Object.create(null)); - -const kindOfTest = (type) => { - type = type.toLowerCase(); - return (thing) => kindOf(thing) === type -}; - -const typeOfTest = type => thing => typeof thing === type; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * - * @returns {boolean} True if value is an Array, otherwise false - */ -const {isArray} = Array; - -/** - * Determine if a value is undefined - * - * @param {*} val The value to test - * - * @returns {boolean} True if the value is undefined, otherwise false - */ -const isUndefined = typeOfTest('undefined'); - -/** - * Determine if a value is a Buffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -const isArrayBuffer = kindOfTest('ArrayBuffer'); - - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - let result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a String, otherwise false - */ -const isString = typeOfTest('string'); - -/** - * Determine if a value is a Function - * - * @param {*} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -const isFunction = typeOfTest('function'); - -/** - * Determine if a value is a Number - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Number, otherwise false - */ -const isNumber = typeOfTest('number'); - -/** - * Determine if a value is an Object - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an Object, otherwise false - */ -const isObject = (thing) => thing !== null && typeof thing === 'object'; - -/** - * Determine if a value is a Boolean - * - * @param {*} thing The value to test - * @returns {boolean} True if value is a Boolean, otherwise false - */ -const isBoolean = thing => thing === true || thing === false; - -/** - * Determine if a value is a plain Object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a plain Object, otherwise false - */ -const isPlainObject = (val) => { - if (kindOf(val) !== 'object') { - return false; - } - - const prototype = getPrototypeOf(val); - return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); -}; - -/** - * Determine if a value is a Date - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Date, otherwise false - */ -const isDate = kindOfTest('Date'); - -/** - * Determine if a value is a File - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFile = kindOfTest('File'); - -/** - * Determine if a value is a Blob - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Blob, otherwise false - */ -const isBlob = kindOfTest('Blob'); - -/** - * Determine if a value is a FileList - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFileList = kindOfTest('FileList'); - -/** - * Determine if a value is a Stream - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Stream, otherwise false - */ -const isStream = (val) => isObject(val) && isFunction(val.pipe); - -/** - * Determine if a value is a FormData - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an FormData, otherwise false - */ -const isFormData = (thing) => { - let kind; - return thing && ( - (typeof FormData === 'function' && thing instanceof FormData) || ( - isFunction(thing.append) && ( - (kind = kindOf(thing)) === 'formdata' || - // detect form-data instance - (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') - ) - ) - ) -}; - -/** - * Determine if a value is a URLSearchParams object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -const isURLSearchParams = kindOfTest('URLSearchParams'); - -const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * - * @returns {String} The String freed of excess whitespace - */ -const trim = (str) => str.trim ? - str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - * - * @param {Boolean} [allOwnKeys = false] - * @returns {any} - */ -function forEach(obj, fn, {allOwnKeys = false} = {}) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - let i; - let l; - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); - const len = keys.length; - let key; - - for (i = 0; i < len; i++) { - key = keys[i]; - fn.call(null, obj[key], key, obj); - } - } -} - -function findKey(obj, key) { - key = key.toLowerCase(); - const keys = Object.keys(obj); - let i = keys.length; - let _key; - while (i-- > 0) { - _key = keys[i]; - if (key === _key.toLowerCase()) { - return _key; - } - } - return null; -} - -const _global = (() => { - /*eslint no-undef:0*/ - if (typeof globalThis !== "undefined") return globalThis; - return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) -})(); - -const isContextDefined = (context) => !isUndefined(context) && context !== _global; - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - const {caseless} = isContextDefined(this) && this || {}; - const result = {}; - const assignValue = (val, key) => { - const targetKey = caseless && findKey(result, key) || key; - if (isPlainObject(result[targetKey]) && isPlainObject(val)) { - result[targetKey] = merge(result[targetKey], val); - } else if (isPlainObject(val)) { - result[targetKey] = merge({}, val); - } else if (isArray(val)) { - result[targetKey] = val.slice(); - } else { - result[targetKey] = val; - } - }; - - for (let i = 0, l = arguments.length; i < l; i++) { - arguments[i] && forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * - * @param {Boolean} [allOwnKeys] - * @returns {Object} The resulting value of object a - */ -const extend = (a, b, thisArg, {allOwnKeys}= {}) => { - forEach(b, (val, key) => { - if (thisArg && isFunction(val)) { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }, {allOwnKeys}); - return a; -}; - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * - * @returns {string} content value without BOM - */ -const stripBOM = (content) => { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -}; - -/** - * Inherit the prototype methods from one constructor into another - * @param {function} constructor - * @param {function} superConstructor - * @param {object} [props] - * @param {object} [descriptors] - * - * @returns {void} - */ -const inherits = (constructor, superConstructor, props, descriptors) => { - constructor.prototype = Object.create(superConstructor.prototype, descriptors); - constructor.prototype.constructor = constructor; - Object.defineProperty(constructor, 'super', { - value: superConstructor.prototype - }); - props && Object.assign(constructor.prototype, props); -}; - -/** - * Resolve object with deep prototype chain to a flat object - * @param {Object} sourceObj source object - * @param {Object} [destObj] - * @param {Function|Boolean} [filter] - * @param {Function} [propFilter] - * - * @returns {Object} - */ -const toFlatObject = (sourceObj, destObj, filter, propFilter) => { - let props; - let i; - let prop; - const merged = {}; - - destObj = destObj || {}; - // eslint-disable-next-line no-eq-null,eqeqeq - if (sourceObj == null) return destObj; - - do { - props = Object.getOwnPropertyNames(sourceObj); - i = props.length; - while (i-- > 0) { - prop = props[i]; - if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { - destObj[prop] = sourceObj[prop]; - merged[prop] = true; - } - } - sourceObj = filter !== false && getPrototypeOf(sourceObj); - } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); - - return destObj; -}; - -/** - * Determines whether a string ends with the characters of a specified string - * - * @param {String} str - * @param {String} searchString - * @param {Number} [position= 0] - * - * @returns {boolean} - */ -const endsWith = (str, searchString, position) => { - str = String(str); - if (position === undefined || position > str.length) { - position = str.length; - } - position -= searchString.length; - const lastIndex = str.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; -}; - - -/** - * Returns new array from array like object or null if failed - * - * @param {*} [thing] - * - * @returns {?Array} - */ -const toArray = (thing) => { - if (!thing) return null; - if (isArray(thing)) return thing; - let i = thing.length; - if (!isNumber(i)) return null; - const arr = new Array(i); - while (i-- > 0) { - arr[i] = thing[i]; - } - return arr; -}; - -/** - * Checking if the Uint8Array exists and if it does, it returns a function that checks if the - * thing passed in is an instance of Uint8Array - * - * @param {TypedArray} - * - * @returns {Array} - */ -// eslint-disable-next-line func-names -const isTypedArray = (TypedArray => { - // eslint-disable-next-line func-names - return thing => { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); - -/** - * For each entry in the object, call the function with the key and value. - * - * @param {Object} obj - The object to iterate over. - * @param {Function} fn - The function to call for each entry. - * - * @returns {void} - */ -const forEachEntry = (obj, fn) => { - const generator = obj && obj[Symbol.iterator]; - - const iterator = generator.call(obj); - - let result; - - while ((result = iterator.next()) && !result.done) { - const pair = result.value; - fn.call(obj, pair[0], pair[1]); - } -}; - -/** - * It takes a regular expression and a string, and returns an array of all the matches - * - * @param {string} regExp - The regular expression to match against. - * @param {string} str - The string to search. - * - * @returns {Array} - */ -const matchAll = (regExp, str) => { - let matches; - const arr = []; - - while ((matches = regExp.exec(str)) !== null) { - arr.push(matches); - } - - return arr; -}; - -/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ -const isHTMLForm = kindOfTest('HTMLFormElement'); - -const toCamelCase = str => { - return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, - function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; - } - ); -}; - -/* Creating a function that will check if an object has a property. */ -const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); - -/** - * Determine if a value is a RegExp object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a RegExp object, otherwise false - */ -const isRegExp = kindOfTest('RegExp'); - -const reduceDescriptors = (obj, reducer) => { - const descriptors = Object.getOwnPropertyDescriptors(obj); - const reducedDescriptors = {}; - - forEach(descriptors, (descriptor, name) => { - let ret; - if ((ret = reducer(descriptor, name, obj)) !== false) { - reducedDescriptors[name] = ret || descriptor; - } - }); - - Object.defineProperties(obj, reducedDescriptors); -}; - -/** - * Makes all methods read-only - * @param {Object} obj - */ - -const freezeMethods = (obj) => { - reduceDescriptors(obj, (descriptor, name) => { - // skip restricted props in strict mode - if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { - return false; - } - - const value = obj[name]; - - if (!isFunction(value)) return; - - descriptor.enumerable = false; - - if ('writable' in descriptor) { - descriptor.writable = false; - return; - } - - if (!descriptor.set) { - descriptor.set = () => { - throw Error('Can not rewrite read-only method \'' + name + '\''); - }; - } - }); -}; - -const toObjectSet = (arrayOrString, delimiter) => { - const obj = {}; - - const define = (arr) => { - arr.forEach(value => { - obj[value] = true; - }); - }; - - isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); - - return obj; -}; - -const noop = () => {}; - -const toFiniteNumber = (value, defaultValue) => { - return value != null && Number.isFinite(value = +value) ? value : defaultValue; -}; - -/** - * If the thing is a FormData object, return true, otherwise return false. - * - * @param {unknown} thing - The thing to check. - * - * @returns {boolean} - */ -function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); -} - -const toJSONObject = (obj) => { - const stack = new Array(10); - - const visit = (source, i) => { - - if (isObject(source)) { - if (stack.indexOf(source) >= 0) { - return; - } - - if(!('toJSON' in source)) { - stack[i] = source; - const target = isArray(source) ? [] : {}; - - forEach(source, (value, key) => { - const reducedValue = visit(value, i + 1); - !isUndefined(reducedValue) && (target[key] = reducedValue); - }); - - stack[i] = undefined; - - return target; - } - } - - return source; - }; - - return visit(obj, 0); -}; - -const isAsyncFn = kindOfTest('AsyncFunction'); - -const isThenable = (thing) => - thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); - -// original code -// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 - -const _setImmediate = ((setImmediateSupported, postMessageSupported) => { - if (setImmediateSupported) { - return setImmediate; - } - - return postMessageSupported ? ((token, callbacks) => { - _global.addEventListener("message", ({source, data}) => { - if (source === _global && data === token) { - callbacks.length && callbacks.shift()(); - } - }, false); - - return (cb) => { - callbacks.push(cb); - _global.postMessage(token, "*"); - } - })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); -})( - typeof setImmediate === 'function', - isFunction(_global.postMessage) -); - -const asap = typeof queueMicrotask !== 'undefined' ? - queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate); - -// ********************* - -const utils$1 = { - isArray, - isArrayBuffer, - isBuffer, - isFormData, - isArrayBufferView, - isString, - isNumber, - isBoolean, - isObject, - isPlainObject, - isReadableStream, - isRequest, - isResponse, - isHeaders, - isUndefined, - isDate, - isFile, - isBlob, - isRegExp, - isFunction, - isStream, - isURLSearchParams, - isTypedArray, - isFileList, - forEach, - merge, - extend, - trim, - stripBOM, - inherits, - toFlatObject, - kindOf, - kindOfTest, - endsWith, - toArray, - forEachEntry, - matchAll, - isHTMLForm, - hasOwnProperty, - hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection - reduceDescriptors, - freezeMethods, - toObjectSet, - toCamelCase, - noop, - toFiniteNumber, - findKey, - global: _global, - isContextDefined, - isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable, - setImmediate: _setImmediate, - asap -}; - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [config] The config. - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * - * @returns {Error} The created error. - */ -function AxiosError(message, code, config, request, response) { - Error.call(this); - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = (new Error()).stack; - } - - this.message = message; - this.name = 'AxiosError'; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - if (response) { - this.response = response; - this.status = response.status ? response.status : null; - } -} - -utils$1.inherits(AxiosError, Error, { - toJSON: function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: utils$1.toJSONObject(this.config), - code: this.code, - status: this.status - }; - } -}); - -const prototype$1 = AxiosError.prototype; -const descriptors = {}; - -[ - 'ERR_BAD_OPTION_VALUE', - 'ERR_BAD_OPTION', - 'ECONNABORTED', - 'ETIMEDOUT', - 'ERR_NETWORK', - 'ERR_FR_TOO_MANY_REDIRECTS', - 'ERR_DEPRECATED', - 'ERR_BAD_RESPONSE', - 'ERR_BAD_REQUEST', - 'ERR_CANCELED', - 'ERR_NOT_SUPPORT', - 'ERR_INVALID_URL' -// eslint-disable-next-line func-names -].forEach(code => { - descriptors[code] = {value: code}; -}); - -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype$1, 'isAxiosError', {value: true}); - -// eslint-disable-next-line func-names -AxiosError.from = (error, code, config, request, response, customProps) => { - const axiosError = Object.create(prototype$1); - - utils$1.toFlatObject(error, axiosError, function filter(obj) { - return obj !== Error.prototype; - }, prop => { - return prop !== 'isAxiosError'; - }); - - AxiosError.call(axiosError, error.message, code, config, request, response); - - axiosError.cause = error; - - axiosError.name = error.name; - - customProps && Object.assign(axiosError, customProps); - - return axiosError; -}; - -/** - * Determines if the given thing is a array or js object. - * - * @param {string} thing - The object or array to be visited. - * - * @returns {boolean} - */ -function isVisitable(thing) { - return utils$1.isPlainObject(thing) || utils$1.isArray(thing); -} - -/** - * It removes the brackets from the end of a string - * - * @param {string} key - The key of the parameter. - * - * @returns {string} the key without the brackets. - */ -function removeBrackets(key) { - return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key; -} - -/** - * It takes a path, a key, and a boolean, and returns a string - * - * @param {string} path - The path to the current key. - * @param {string} key - The key of the current object being iterated over. - * @param {string} dots - If true, the key will be rendered with dots instead of brackets. - * - * @returns {string} The path to the current key. - */ -function renderKey(path, key, dots) { - if (!path) return key; - return path.concat(key).map(function each(token, i) { - // eslint-disable-next-line no-param-reassign - token = removeBrackets(token); - return !dots && i ? '[' + token + ']' : token; - }).join(dots ? '.' : ''); -} - -/** - * If the array is an array and none of its elements are visitable, then it's a flat array. - * - * @param {Array} arr - The array to check - * - * @returns {boolean} - */ -function isFlatArray(arr) { - return utils$1.isArray(arr) && !arr.some(isVisitable); -} - -const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) { - return /^is[A-Z]/.test(prop); -}); - -/** - * Convert a data object to FormData - * - * @param {Object} obj - * @param {?Object} [formData] - * @param {?Object} [options] - * @param {Function} [options.visitor] - * @param {Boolean} [options.metaTokens = true] - * @param {Boolean} [options.dots = false] - * @param {?Boolean} [options.indexes = false] - * - * @returns {Object} - **/ - -/** - * It converts an object into a FormData object - * - * @param {Object} obj - The object to convert to form data. - * @param {string} formData - The FormData object to append to. - * @param {Object} options - * - * @returns - */ -function toFormData(obj, formData, options) { - if (!utils$1.isObject(obj)) { - throw new TypeError('target must be an object'); - } - - // eslint-disable-next-line no-param-reassign - formData = formData || new (FormData__default["default"] || FormData)(); - - // eslint-disable-next-line no-param-reassign - options = utils$1.toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - // eslint-disable-next-line no-eq-null,eqeqeq - return !utils$1.isUndefined(source[option]); - }); - - const metaTokens = options.metaTokens; - // eslint-disable-next-line no-use-before-define - const visitor = options.visitor || defaultVisitor; - const dots = options.dots; - const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; - const useBlob = _Blob && utils$1.isSpecCompliantForm(formData); - - if (!utils$1.isFunction(visitor)) { - throw new TypeError('visitor must be a function'); - } - - function convertValue(value) { - if (value === null) return ''; - - if (utils$1.isDate(value)) { - return value.toISOString(); - } - - if (!useBlob && utils$1.isBlob(value)) { - throw new AxiosError('Blob is not supported. Use a Buffer instead.'); - } - - if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { - return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); - } - - return value; - } - - /** - * Default visitor. - * - * @param {*} value - * @param {String|Number} key - * @param {Array} path - * @this {FormData} - * - * @returns {boolean} return true to visit the each prop of the value recursively - */ - function defaultVisitor(value, key, path) { - let arr = value; - - if (value && !path && typeof value === 'object') { - if (utils$1.endsWith(key, '{}')) { - // eslint-disable-next-line no-param-reassign - key = metaTokens ? key : key.slice(0, -2); - // eslint-disable-next-line no-param-reassign - value = JSON.stringify(value); - } else if ( - (utils$1.isArray(value) && isFlatArray(value)) || - ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)) - )) { - // eslint-disable-next-line no-param-reassign - key = removeBrackets(key); - - arr.forEach(function each(el, index) { - !(utils$1.isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), - convertValue(el) - ); - }); - return false; - } - } - - if (isVisitable(value)) { - return true; - } - - formData.append(renderKey(path, key, dots), convertValue(value)); - - return false; - } - - const stack = []; - - const exposedHelpers = Object.assign(predicates, { - defaultVisitor, - convertValue, - isVisitable - }); - - function build(value, path) { - if (utils$1.isUndefined(value)) return; - - if (stack.indexOf(value) !== -1) { - throw Error('Circular reference detected in ' + path.join('.')); - } - - stack.push(value); - - utils$1.forEach(value, function each(el, key) { - const result = !(utils$1.isUndefined(el) || el === null) && visitor.call( - formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers - ); - - if (result === true) { - build(el, path ? path.concat(key) : [key]); - } - }); - - stack.pop(); - } - - if (!utils$1.isObject(obj)) { - throw new TypeError('data must be an object'); - } - - build(obj); - - return formData; -} - -/** - * It encodes a string by replacing all characters that are not in the unreserved set with - * their percent-encoded equivalents - * - * @param {string} str - The string to encode. - * - * @returns {string} The encoded string. - */ -function encode$1(str) { - const charMap = { - '!': '%21', - "'": '%27', - '(': '%28', - ')': '%29', - '~': '%7E', - '%20': '+', - '%00': '\x00' - }; - return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { - return charMap[match]; - }); -} - -/** - * It takes a params object and converts it to a FormData object - * - * @param {Object} params - The parameters to be converted to a FormData object. - * @param {Object} options - The options object passed to the Axios constructor. - * - * @returns {void} - */ -function AxiosURLSearchParams(params, options) { - this._pairs = []; - - params && toFormData(params, this, options); -} - -const prototype = AxiosURLSearchParams.prototype; - -prototype.append = function append(name, value) { - this._pairs.push([name, value]); -}; - -prototype.toString = function toString(encoder) { - const _encode = encoder ? function(value) { - return encoder.call(this, value, encode$1); - } : encode$1; - - return this._pairs.map(function each(pair) { - return _encode(pair[0]) + '=' + _encode(pair[1]); - }, '').join('&'); -}; - -/** - * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their - * URI encoded counterparts - * - * @param {string} val The value to be encoded. - * - * @returns {string} The encoded value. - */ -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @param {?(object|Function)} options - * - * @returns {string} The formatted url - */ -function buildURL(url, params, options) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - const _encode = options && options.encode || encode; - - if (utils$1.isFunction(options)) { - options = { - serialize: options - }; - } - - const serializeFn = options && options.serialize; - - let serializedParams; - - if (serializeFn) { - serializedParams = serializeFn(params, options); - } else { - serializedParams = utils$1.isURLSearchParams(params) ? - params.toString() : - new AxiosURLSearchParams(params, options).toString(_encode); - } - - if (serializedParams) { - const hashmarkIndex = url.indexOf("#"); - - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -} - -class InterceptorManager { - constructor() { - this.handlers = []; - } - - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ - use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled, - rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; - } - - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - * - * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise - */ - eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - } - - /** - * Clear all interceptors from the stack - * - * @returns {void} - */ - clear() { - if (this.handlers) { - this.handlers = []; - } - } - - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - * - * @returns {void} - */ - forEach(fn) { - utils$1.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - } -} - -const InterceptorManager$1 = InterceptorManager; - -const transitionalDefaults = { - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false -}; - -const URLSearchParams = url__default["default"].URLSearchParams; - -const ALPHA = 'abcdefghijklmnopqrstuvwxyz'; - -const DIGIT = '0123456789'; - -const ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -}; - -const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ''; - const {length} = alphabet; - const randomValues = new Uint32Array(size); - crypto__default["default"].randomFillSync(randomValues); - for (let i = 0; i < size; i++) { - str += alphabet[randomValues[i] % length]; - } - - return str; -}; - - -const platform$1 = { - isNode: true, - classes: { - URLSearchParams, - FormData: FormData__default["default"], - Blob: typeof Blob !== 'undefined' && Blob || null - }, - ALPHABET, - generateString, - protocols: [ 'http', 'https', 'file', 'data' ] -}; - -const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; - -const _navigator = typeof navigator === 'object' && navigator || undefined; - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - * - * @returns {boolean} - */ -const hasStandardBrowserEnv = hasBrowserEnv && - (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); - -/** - * Determine if we're running in a standard browser webWorker environment - * - * Although the `isStandardBrowserEnv` method indicates that - * `allows axios to run in a web worker`, the WebWorker will still be - * filtered out due to its judgment standard - * `typeof window !== 'undefined' && typeof document !== 'undefined'`. - * This leads to a problem when axios post `FormData` in webWorker - */ -const hasStandardBrowserWebWorkerEnv = (() => { - return ( - typeof WorkerGlobalScope !== 'undefined' && - // eslint-disable-next-line no-undef - self instanceof WorkerGlobalScope && - typeof self.importScripts === 'function' - ); -})(); - -const origin = hasBrowserEnv && window.location.href || 'http://localhost'; - -const utils = /*#__PURE__*/Object.freeze({ - __proto__: null, - hasBrowserEnv: hasBrowserEnv, - hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, - hasStandardBrowserEnv: hasStandardBrowserEnv, - navigator: _navigator, - origin: origin -}); - -const platform = { - ...utils, - ...platform$1 -}; - -function toURLEncodedForm(data, options) { - return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { - if (platform.isNode && utils$1.isBuffer(value)) { - this.append(key, value.toString('base64')); - return false; - } - - return helpers.defaultVisitor.apply(this, arguments); - } - }, options)); -} - -/** - * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] - * - * @param {string} name - The name of the property to get. - * - * @returns An array of strings. - */ -function parsePropPath(name) { - // foo[x][y][z] - // foo.x.y.z - // foo-x-y-z - // foo x y z - return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => { - return match[0] === '[]' ? '' : match[1] || match[0]; - }); -} - -/** - * Convert an array to an object. - * - * @param {Array} arr - The array to convert to an object. - * - * @returns An object with the same keys and values as the array. - */ -function arrayToObject(arr) { - const obj = {}; - const keys = Object.keys(arr); - let i; - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - obj[key] = arr[key]; - } - return obj; -} - -/** - * It takes a FormData object and returns a JavaScript object - * - * @param {string} formData The FormData object to convert to JSON. - * - * @returns {Object | null} The converted object. - */ -function formDataToJSON(formData) { - function buildPath(path, value, target, index) { - let name = path[index++]; - - if (name === '__proto__') return true; - - const isNumericKey = Number.isFinite(+name); - const isLast = index >= path.length; - name = !name && utils$1.isArray(target) ? target.length : name; - - if (isLast) { - if (utils$1.hasOwnProp(target, name)) { - target[name] = [target[name], value]; - } else { - target[name] = value; - } - - return !isNumericKey; - } - - if (!target[name] || !utils$1.isObject(target[name])) { - target[name] = []; - } - - const result = buildPath(path, value, target[name], index); - - if (result && utils$1.isArray(target[name])) { - target[name] = arrayToObject(target[name]); - } - - return !isNumericKey; - } - - if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) { - const obj = {}; - - utils$1.forEachEntry(formData, (name, value) => { - buildPath(parsePropPath(name), value, obj, 0); - }); - - return obj; - } - - return null; -} - -/** - * It takes a string, tries to parse it, and if it fails, it returns the stringified version - * of the input - * - * @param {any} rawValue - The value to be stringified. - * @param {Function} parser - A function that parses a string into a JavaScript object. - * @param {Function} encoder - A function that takes a value and returns a string. - * - * @returns {string} A stringified version of the rawValue. - */ -function stringifySafely(rawValue, parser, encoder) { - if (utils$1.isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return utils$1.trim(rawValue); - } catch (e) { - if (e.name !== 'SyntaxError') { - throw e; - } - } - } - - return (encoder || JSON.stringify)(rawValue); -} - -const defaults = { - - transitional: transitionalDefaults, - - adapter: ['xhr', 'http', 'fetch'], - - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ''; - const hasJSONContentType = contentType.indexOf('application/json') > -1; - const isObjectPayload = utils$1.isObject(data); - - if (isObjectPayload && utils$1.isHTMLForm(data)) { - data = new FormData(data); - } - - const isFormData = utils$1.isFormData(data); - - if (isFormData) { - return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; - } - - if (utils$1.isArrayBuffer(data) || - utils$1.isBuffer(data) || - utils$1.isStream(data) || - utils$1.isFile(data) || - utils$1.isBlob(data) || - utils$1.isReadableStream(data) - ) { - return data; - } - if (utils$1.isArrayBufferView(data)) { - return data.buffer; - } - if (utils$1.isURLSearchParams(data)) { - headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); - return data.toString(); - } - - let isFileList; - - if (isObjectPayload) { - if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { - return toURLEncodedForm(data, this.formSerializer).toString(); - } - - if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { - const _FormData = this.env && this.env.FormData; - - return toFormData( - isFileList ? {'files[]': data} : data, - _FormData && new _FormData(), - this.formSerializer - ); - } - } - - if (isObjectPayload || hasJSONContentType ) { - headers.setContentType('application/json', false); - return stringifySafely(data); - } - - return data; - }], - - transformResponse: [function transformResponse(data) { - const transitional = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional && transitional.forcedJSONParsing; - const JSONRequested = this.responseType === 'json'; - - if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { - return data; - } - - if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { - const silentJSONParsing = transitional && transitional.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; - - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response); - } - throw e; - } - } - } - - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - env: { - FormData: platform.classes.FormData, - Blob: platform.classes.Blob - }, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - - headers: { - common: { - 'Accept': 'application/json, text/plain, */*', - 'Content-Type': undefined - } - } -}; - -utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { - defaults.headers[method] = {}; -}); - -const defaults$1 = defaults; - -// RawAxiosHeaders whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -const ignoreDuplicateOf = utils$1.toObjectSet([ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]); - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} rawHeaders Headers needing to be parsed - * - * @returns {Object} Headers parsed into an object - */ -const parseHeaders = rawHeaders => { - const parsed = {}; - let key; - let val; - let i; - - rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { - i = line.indexOf(':'); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); - - if (!key || (parsed[key] && ignoreDuplicateOf[key])) { - return; - } - - if (key === 'set-cookie') { - if (parsed[key]) { - parsed[key].push(val); - } else { - parsed[key] = [val]; - } - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - }); - - return parsed; -}; - -const $internals = Symbol('internals'); - -function normalizeHeader(header) { - return header && String(header).trim().toLowerCase(); -} - -function normalizeValue(value) { - if (value === false || value == null) { - return value; - } - - return utils$1.isArray(value) ? value.map(normalizeValue) : String(value); -} - -function parseTokens(str) { - const tokens = Object.create(null); - const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let match; - - while ((match = tokensRE.exec(str))) { - tokens[match[1]] = match[2]; - } - - return tokens; -} - -const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); - -function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { - if (utils$1.isFunction(filter)) { - return filter.call(this, value, header); - } - - if (isHeaderNameFilter) { - value = header; - } - - if (!utils$1.isString(value)) return; - - if (utils$1.isString(filter)) { - return value.indexOf(filter) !== -1; - } - - if (utils$1.isRegExp(filter)) { - return filter.test(value); - } -} - -function formatHeader(header) { - return header.trim() - .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { - return char.toUpperCase() + str; - }); -} - -function buildAccessors(obj, header) { - const accessorName = utils$1.toCamelCase(' ' + header); - - ['get', 'set', 'has'].forEach(methodName => { - Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { - return this[methodName].call(this, header, arg1, arg2, arg3); - }, - configurable: true - }); - }); -} - -class AxiosHeaders { - constructor(headers) { - headers && this.set(headers); - } - - set(header, valueOrRewrite, rewrite) { - const self = this; - - function setHeader(_value, _header, _rewrite) { - const lHeader = normalizeHeader(_header); - - if (!lHeader) { - throw new Error('header name must be a non-empty string'); - } - - const key = utils$1.findKey(self, lHeader); - - if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { - self[key || _header] = normalizeValue(_value); - } - } - - const setHeaders = (headers, _rewrite) => - utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - - if (utils$1.isPlainObject(header) || header instanceof this.constructor) { - setHeaders(header, valueOrRewrite); - } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { - setHeaders(parseHeaders(header), valueOrRewrite); - } else if (utils$1.isHeaders(header)) { - for (const [key, value] of header.entries()) { - setHeader(value, key, rewrite); - } - } else { - header != null && setHeader(valueOrRewrite, header, rewrite); - } - - return this; - } - - get(header, parser) { - header = normalizeHeader(header); - - if (header) { - const key = utils$1.findKey(this, header); - - if (key) { - const value = this[key]; - - if (!parser) { - return value; - } - - if (parser === true) { - return parseTokens(value); - } - - if (utils$1.isFunction(parser)) { - return parser.call(this, value, key); - } - - if (utils$1.isRegExp(parser)) { - return parser.exec(value); - } - - throw new TypeError('parser must be boolean|regexp|function'); - } - } - } - - has(header, matcher) { - header = normalizeHeader(header); - - if (header) { - const key = utils$1.findKey(this, header); - - return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); - } - - return false; - } - - delete(header, matcher) { - const self = this; - let deleted = false; - - function deleteHeader(_header) { - _header = normalizeHeader(_header); - - if (_header) { - const key = utils$1.findKey(self, _header); - - if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { - delete self[key]; - - deleted = true; - } - } - } - - if (utils$1.isArray(header)) { - header.forEach(deleteHeader); - } else { - deleteHeader(header); - } - - return deleted; - } - - clear(matcher) { - const keys = Object.keys(this); - let i = keys.length; - let deleted = false; - - while (i--) { - const key = keys[i]; - if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { - delete this[key]; - deleted = true; - } - } - - return deleted; - } - - normalize(format) { - const self = this; - const headers = {}; - - utils$1.forEach(this, (value, header) => { - const key = utils$1.findKey(headers, header); - - if (key) { - self[key] = normalizeValue(value); - delete self[header]; - return; - } - - const normalized = format ? formatHeader(header) : String(header).trim(); - - if (normalized !== header) { - delete self[header]; - } - - self[normalized] = normalizeValue(value); - - headers[normalized] = true; - }); - - return this; - } - - concat(...targets) { - return this.constructor.concat(this, ...targets); - } - - toJSON(asStrings) { - const obj = Object.create(null); - - utils$1.forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); - }); - - return obj; - } - - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - - toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); - } - - get [Symbol.toStringTag]() { - return 'AxiosHeaders'; - } - - static from(thing) { - return thing instanceof this ? thing : new this(thing); - } - - static concat(first, ...targets) { - const computed = new this(first); - - targets.forEach((target) => computed.set(target)); - - return computed; - } - - static accessor(header) { - const internals = this[$internals] = (this[$internals] = { - accessors: {} - }); - - const accessors = internals.accessors; - const prototype = this.prototype; - - function defineAccessor(_header) { - const lHeader = normalizeHeader(_header); - - if (!accessors[lHeader]) { - buildAccessors(prototype, _header); - accessors[lHeader] = true; - } - } - - utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); - - return this; - } -} - -AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); - -// reserved names hotfix -utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { - let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` - return { - get: () => value, - set(headerValue) { - this[mapped] = headerValue; - } - } -}); - -utils$1.freezeMethods(AxiosHeaders); - -const AxiosHeaders$1 = AxiosHeaders; - -/** - * Transform the data for a request or a response - * - * @param {Array|Function} fns A single function or Array of functions - * @param {?Object} response The response object - * - * @returns {*} The resulting transformed data - */ -function transformData(fns, response) { - const config = this || defaults$1; - const context = response || config; - const headers = AxiosHeaders$1.from(context.headers); - let data = context.data; - - utils$1.forEach(fns, function transform(fn) { - data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); - }); - - headers.normalize(); - - return data; -} - -function isCancel(value) { - return !!(value && value.__CANCEL__); -} - -/** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @param {string=} message The message. - * @param {Object=} config The config. - * @param {Object=} request The request. - * - * @returns {CanceledError} The created error. - */ -function CanceledError(message, config, request) { - // eslint-disable-next-line no-eq-null,eqeqeq - AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request); - this.name = 'CanceledError'; -} - -utils$1.inherits(CanceledError, AxiosError, { - __CANCEL__: true -}); - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - * - * @returns {object} The response. - */ -function settle(resolve, reject, response) { - const validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(new AxiosError( - 'Request failed with status code ' + response.status, - [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - )); - } -} - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); -} - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * - * @returns {string} The combined URL - */ -function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -} - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * - * @returns {string} The combined full path - */ -function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { - let isRelativeUrl = !isAbsoluteURL(requestedURL); - if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; -} - -const VERSION = "1.8.2"; - -function parseProtocol(url) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; -} - -const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; - -/** - * Parse data uri to a Buffer or Blob - * - * @param {String} uri - * @param {?Boolean} asBlob - * @param {?Object} options - * @param {?Function} options.Blob - * - * @returns {Buffer|Blob} - */ -function fromDataURI(uri, asBlob, options) { - const _Blob = options && options.Blob || platform.classes.Blob; - const protocol = parseProtocol(uri); - - if (asBlob === undefined && _Blob) { - asBlob = true; - } - - if (protocol === 'data') { - uri = protocol.length ? uri.slice(protocol.length + 1) : uri; - - const match = DATA_URL_PATTERN.exec(uri); - - if (!match) { - throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL); - } - - const mime = match[1]; - const isBase64 = match[2]; - const body = match[3]; - const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8'); - - if (asBlob) { - if (!_Blob) { - throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); - } - - return new _Blob([buffer], {type: mime}); - } - - return buffer; - } - - throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT); -} - -const kInternals = Symbol('internals'); - -class AxiosTransformStream extends stream__default["default"].Transform{ - constructor(options) { - options = utils$1.toFlatObject(options, { - maxRate: 0, - chunkSize: 64 * 1024, - minChunkSize: 100, - timeWindow: 500, - ticksRate: 2, - samplesCount: 15 - }, null, (prop, source) => { - return !utils$1.isUndefined(source[prop]); - }); - - super({ - readableHighWaterMark: options.chunkSize - }); - - const internals = this[kInternals] = { - timeWindow: options.timeWindow, - chunkSize: options.chunkSize, - maxRate: options.maxRate, - minChunkSize: options.minChunkSize, - bytesSeen: 0, - isCaptured: false, - notifiedBytesLoaded: 0, - ts: Date.now(), - bytes: 0, - onReadCallback: null - }; - - this.on('newListener', event => { - if (event === 'progress') { - if (!internals.isCaptured) { - internals.isCaptured = true; - } - } - }); - } - - _read(size) { - const internals = this[kInternals]; - - if (internals.onReadCallback) { - internals.onReadCallback(); - } - - return super._read(size); - } - - _transform(chunk, encoding, callback) { - const internals = this[kInternals]; - const maxRate = internals.maxRate; - - const readableHighWaterMark = this.readableHighWaterMark; - - const timeWindow = internals.timeWindow; - - const divider = 1000 / timeWindow; - const bytesThreshold = (maxRate / divider); - const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0; - - const pushChunk = (_chunk, _callback) => { - const bytes = Buffer.byteLength(_chunk); - internals.bytesSeen += bytes; - internals.bytes += bytes; - - internals.isCaptured && this.emit('progress', internals.bytesSeen); - - if (this.push(_chunk)) { - process.nextTick(_callback); - } else { - internals.onReadCallback = () => { - internals.onReadCallback = null; - process.nextTick(_callback); - }; - } - }; - - const transformChunk = (_chunk, _callback) => { - const chunkSize = Buffer.byteLength(_chunk); - let chunkRemainder = null; - let maxChunkSize = readableHighWaterMark; - let bytesLeft; - let passed = 0; - - if (maxRate) { - const now = Date.now(); - - if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) { - internals.ts = now; - bytesLeft = bytesThreshold - internals.bytes; - internals.bytes = bytesLeft < 0 ? -bytesLeft : 0; - passed = 0; - } - - bytesLeft = bytesThreshold - internals.bytes; - } - - if (maxRate) { - if (bytesLeft <= 0) { - // next time window - return setTimeout(() => { - _callback(null, _chunk); - }, timeWindow - passed); - } - - if (bytesLeft < maxChunkSize) { - maxChunkSize = bytesLeft; - } - } - - if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) { - chunkRemainder = _chunk.subarray(maxChunkSize); - _chunk = _chunk.subarray(0, maxChunkSize); - } - - pushChunk(_chunk, chunkRemainder ? () => { - process.nextTick(_callback, null, chunkRemainder); - } : _callback); - }; - - transformChunk(chunk, function transformNextChunk(err, _chunk) { - if (err) { - return callback(err); - } - - if (_chunk) { - transformChunk(_chunk, transformNextChunk); - } else { - callback(null); - } - }); - } -} - -const AxiosTransformStream$1 = AxiosTransformStream; - -const {asyncIterator} = Symbol; - -const readBlob = async function* (blob) { - if (blob.stream) { - yield* blob.stream(); - } else if (blob.arrayBuffer) { - yield await blob.arrayBuffer(); - } else if (blob[asyncIterator]) { - yield* blob[asyncIterator](); - } else { - yield blob; - } -}; - -const readBlob$1 = readBlob; - -const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_'; - -const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__default["default"].TextEncoder(); - -const CRLF = '\r\n'; -const CRLF_BYTES = textEncoder.encode(CRLF); -const CRLF_BYTES_COUNT = 2; - -class FormDataPart { - constructor(name, value) { - const {escapeName} = this.constructor; - const isStringValue = utils$1.isString(value); - - let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${ - !isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : '' - }${CRLF}`; - - if (isStringValue) { - value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF)); - } else { - headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`; - } - - this.headers = textEncoder.encode(headers + CRLF); - - this.contentLength = isStringValue ? value.byteLength : value.size; - - this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT; - - this.name = name; - this.value = value; - } - - async *encode(){ - yield this.headers; - - const {value} = this; - - if(utils$1.isTypedArray(value)) { - yield value; - } else { - yield* readBlob$1(value); - } - - yield CRLF_BYTES; - } - - static escapeName(name) { - return String(name).replace(/[\r\n"]/g, (match) => ({ - '\r' : '%0D', - '\n' : '%0A', - '"' : '%22', - }[match])); - } -} - -const formDataToStream = (form, headersHandler, options) => { - const { - tag = 'form-data-boundary', - size = 25, - boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET) - } = options || {}; - - if(!utils$1.isFormData(form)) { - throw TypeError('FormData instance required'); - } - - if (boundary.length < 1 || boundary.length > 70) { - throw Error('boundary must be 10-70 characters long') - } - - const boundaryBytes = textEncoder.encode('--' + boundary + CRLF); - const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF); - let contentLength = footerBytes.byteLength; - - const parts = Array.from(form.entries()).map(([name, value]) => { - const part = new FormDataPart(name, value); - contentLength += part.size; - return part; - }); - - contentLength += boundaryBytes.byteLength * parts.length; - - contentLength = utils$1.toFiniteNumber(contentLength); - - const computedHeaders = { - 'Content-Type': `multipart/form-data; boundary=${boundary}` - }; - - if (Number.isFinite(contentLength)) { - computedHeaders['Content-Length'] = contentLength; - } - - headersHandler && headersHandler(computedHeaders); - - return stream.Readable.from((async function *() { - for(const part of parts) { - yield boundaryBytes; - yield* part.encode(); - } - - yield footerBytes; - })()); -}; - -const formDataToStream$1 = formDataToStream; - -class ZlibHeaderTransformStream extends stream__default["default"].Transform { - __transform(chunk, encoding, callback) { - this.push(chunk); - callback(); - } - - _transform(chunk, encoding, callback) { - if (chunk.length !== 0) { - this._transform = this.__transform; - - // Add Default Compression headers if no zlib headers are present - if (chunk[0] !== 120) { // Hex: 78 - const header = Buffer.alloc(2); - header[0] = 120; // Hex: 78 - header[1] = 156; // Hex: 9C - this.push(header, encoding); - } - } - - this.__transform(chunk, encoding, callback); - } -} - -const ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream; - -const callbackify = (fn, reducer) => { - return utils$1.isAsyncFn(fn) ? function (...args) { - const cb = args.pop(); - fn.apply(this, args).then((value) => { - try { - reducer ? cb(null, ...reducer(value)) : cb(null, value); - } catch (err) { - cb(err); - } - }, cb); - } : fn; -}; - -const callbackify$1 = callbackify; - -/** - * Calculate data maxRate - * @param {Number} [samplesCount= 10] - * @param {Number} [min= 1000] - * @returns {Function} - */ -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - - min = min !== undefined ? min : 1000; - - return function push(chunkLength) { - const now = Date.now(); - - const startedAt = timestamps[tail]; - - if (!firstSampleTS) { - firstSampleTS = now; - } - - bytes[head] = chunkLength; - timestamps[head] = now; - - let i = tail; - let bytesCount = 0; - - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - - head = (head + 1) % samplesCount; - - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - - if (now - firstSampleTS < min) { - return; - } - - const passed = startedAt && now - startedAt; - - return passed ? Math.round(bytesCount * 1000 / passed) : undefined; - }; -} - -/** - * Throttle decorator - * @param {Function} fn - * @param {Number} freq - * @return {Function} - */ -function throttle(fn, freq) { - let timestamp = 0; - let threshold = 1000 / freq; - let lastArgs; - let timer; - - const invoke = (args, now = Date.now()) => { - timestamp = now; - lastArgs = null; - if (timer) { - clearTimeout(timer); - timer = null; - } - fn.apply(null, args); - }; - - const throttled = (...args) => { - const now = Date.now(); - const passed = now - timestamp; - if ( passed >= threshold) { - invoke(args, now); - } else { - lastArgs = args; - if (!timer) { - timer = setTimeout(() => { - timer = null; - invoke(lastArgs); - }, threshold - passed); - } - } - }; - - const flush = () => lastArgs && invoke(lastArgs); - - return [throttled, flush]; -} - -const progressEventReducer = (listener, isDownloadStream, freq = 3) => { - let bytesNotified = 0; - const _speedometer = speedometer(50, 250); - - return throttle(e => { - const loaded = e.loaded; - const total = e.lengthComputable ? e.total : undefined; - const progressBytes = loaded - bytesNotified; - const rate = _speedometer(progressBytes); - const inRange = loaded <= total; - - bytesNotified = loaded; - - const data = { - loaded, - total, - progress: total ? (loaded / total) : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && total && inRange ? (total - loaded) / rate : undefined, - event: e, - lengthComputable: total != null, - [isDownloadStream ? 'download' : 'upload']: true - }; - - listener(data); - }, freq); -}; - -const progressEventDecorator = (total, throttled) => { - const lengthComputable = total != null; - - return [(loaded) => throttled[0]({ - lengthComputable, - total, - loaded - }), throttled[1]]; -}; - -const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args)); - -const zlibOptions = { - flush: zlib__default["default"].constants.Z_SYNC_FLUSH, - finishFlush: zlib__default["default"].constants.Z_SYNC_FLUSH -}; - -const brotliOptions = { - flush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH -}; - -const isBrotliSupported = utils$1.isFunction(zlib__default["default"].createBrotliDecompress); - -const {http: httpFollow, https: httpsFollow} = followRedirects__default["default"]; - -const isHttps = /https:?/; - -const supportedProtocols = platform.protocols.map(protocol => { - return protocol + ':'; -}); - -const flushOnFinish = (stream, [throttled, flush]) => { - stream - .on('end', flush) - .on('error', flush); - - return throttled; -}; - -/** - * If the proxy or config beforeRedirects functions are defined, call them with the options - * object. - * - * @param {Object} options - The options object that was passed to the request. - * - * @returns {Object} - */ -function dispatchBeforeRedirect(options, responseDetails) { - if (options.beforeRedirects.proxy) { - options.beforeRedirects.proxy(options); - } - if (options.beforeRedirects.config) { - options.beforeRedirects.config(options, responseDetails); - } -} - -/** - * If the proxy or config afterRedirects functions are defined, call them with the options - * - * @param {http.ClientRequestArgs} options - * @param {AxiosProxyConfig} configProxy configuration from Axios options object - * @param {string} location - * - * @returns {http.ClientRequestArgs} - */ -function setProxy(options, configProxy, location) { - let proxy = configProxy; - if (!proxy && proxy !== false) { - const proxyUrl = proxyFromEnv__default["default"].getProxyForUrl(location); - if (proxyUrl) { - proxy = new URL(proxyUrl); - } - } - if (proxy) { - // Basic proxy authorization - if (proxy.username) { - proxy.auth = (proxy.username || '') + ':' + (proxy.password || ''); - } - - if (proxy.auth) { - // Support proxy auth object form - if (proxy.auth.username || proxy.auth.password) { - proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || ''); - } - const base64 = Buffer - .from(proxy.auth, 'utf8') - .toString('base64'); - options.headers['Proxy-Authorization'] = 'Basic ' + base64; - } - - options.headers.host = options.hostname + (options.port ? ':' + options.port : ''); - const proxyHost = proxy.hostname || proxy.host; - options.hostname = proxyHost; - // Replace 'host' since options is not a URL object - options.host = proxyHost; - options.port = proxy.port; - options.path = location; - if (proxy.protocol) { - options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`; - } - } - - options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) { - // Configure proxy for redirected request, passing the original config proxy to apply - // the exact same logic as if the redirected request was performed by axios directly. - setProxy(redirectOptions, configProxy, redirectOptions.href); - }; -} - -const isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process'; - -// temporary hotfix - -const wrapAsync = (asyncExecutor) => { - return new Promise((resolve, reject) => { - let onDone; - let isDone; - - const done = (value, isRejected) => { - if (isDone) return; - isDone = true; - onDone && onDone(value, isRejected); - }; - - const _resolve = (value) => { - done(value); - resolve(value); - }; - - const _reject = (reason) => { - done(reason, true); - reject(reason); - }; - - asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject); - }) -}; - -const resolveFamily = ({address, family}) => { - if (!utils$1.isString(address)) { - throw TypeError('address must be a string'); - } - return ({ - address, - family: family || (address.indexOf('.') < 0 ? 6 : 4) - }); -}; - -const buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {address, family}); - -/*eslint consistent-return:0*/ -const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) { - return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { - let {data, lookup, family} = config; - const {responseType, responseEncoding} = config; - const method = config.method.toUpperCase(); - let isDone; - let rejected = false; - let req; - - if (lookup) { - const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]); - // hotfix to support opt.all option which is required for node 20.x - lookup = (hostname, opt, cb) => { - _lookup(hostname, opt, (err, arg0, arg1) => { - if (err) { - return cb(err); - } - - const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; - - opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); - }); - }; - } - - // temporary internal emitter until the AxiosRequest class will be implemented - const emitter = new events.EventEmitter(); - - const onFinished = () => { - if (config.cancelToken) { - config.cancelToken.unsubscribe(abort); - } - - if (config.signal) { - config.signal.removeEventListener('abort', abort); - } - - emitter.removeAllListeners(); - }; - - onDone((value, isRejected) => { - isDone = true; - if (isRejected) { - rejected = true; - onFinished(); - } - }); - - function abort(reason) { - emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason); - } - - emitter.once('abort', reject); - - if (config.cancelToken || config.signal) { - config.cancelToken && config.cancelToken.subscribe(abort); - if (config.signal) { - config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort); - } - } - - // Parse url - const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); - const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined); - const protocol = parsed.protocol || supportedProtocols[0]; - - if (protocol === 'data:') { - let convertedData; - - if (method !== 'GET') { - return settle(resolve, reject, { - status: 405, - statusText: 'method not allowed', - headers: {}, - config - }); - } - - try { - convertedData = fromDataURI(config.url, responseType === 'blob', { - Blob: config.env && config.env.Blob - }); - } catch (err) { - throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config); - } - - if (responseType === 'text') { - convertedData = convertedData.toString(responseEncoding); - - if (!responseEncoding || responseEncoding === 'utf8') { - convertedData = utils$1.stripBOM(convertedData); - } - } else if (responseType === 'stream') { - convertedData = stream__default["default"].Readable.from(convertedData); - } - - return settle(resolve, reject, { - data: convertedData, - status: 200, - statusText: 'OK', - headers: new AxiosHeaders$1(), - config - }); - } - - if (supportedProtocols.indexOf(protocol) === -1) { - return reject(new AxiosError( - 'Unsupported protocol ' + protocol, - AxiosError.ERR_BAD_REQUEST, - config - )); - } - - const headers = AxiosHeaders$1.from(config.headers).normalize(); - - // Set User-Agent (required by some servers) - // See https://github.com/axios/axios/issues/69 - // User-Agent is specified; handle case where no UA header is desired - // Only set header if it hasn't been set in config - headers.set('User-Agent', 'axios/' + VERSION, false); - - const {onUploadProgress, onDownloadProgress} = config; - const maxRate = config.maxRate; - let maxUploadRate = undefined; - let maxDownloadRate = undefined; - - // support for spec compliant FormData objects - if (utils$1.isSpecCompliantForm(data)) { - const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); - - data = formDataToStream$1(data, (formHeaders) => { - headers.set(formHeaders); - }, { - tag: `axios-${VERSION}-boundary`, - boundary: userBoundary && userBoundary[1] || undefined - }); - // support for https://www.npmjs.com/package/form-data api - } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) { - headers.set(data.getHeaders()); - - if (!headers.hasContentLength()) { - try { - const knownLength = await util__default["default"].promisify(data.getLength).call(data); - Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); - /*eslint no-empty:0*/ - } catch (e) { - } - } - } else if (utils$1.isBlob(data) || utils$1.isFile(data)) { - data.size && headers.setContentType(data.type || 'application/octet-stream'); - headers.setContentLength(data.size || 0); - data = stream__default["default"].Readable.from(readBlob$1(data)); - } else if (data && !utils$1.isStream(data)) { - if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) { - data = Buffer.from(new Uint8Array(data)); - } else if (utils$1.isString(data)) { - data = Buffer.from(data, 'utf-8'); - } else { - return reject(new AxiosError( - 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', - AxiosError.ERR_BAD_REQUEST, - config - )); - } - - // Add Content-Length header if data exists - headers.setContentLength(data.length, false); - - if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { - return reject(new AxiosError( - 'Request body larger than maxBodyLength limit', - AxiosError.ERR_BAD_REQUEST, - config - )); - } - } - - const contentLength = utils$1.toFiniteNumber(headers.getContentLength()); - - if (utils$1.isArray(maxRate)) { - maxUploadRate = maxRate[0]; - maxDownloadRate = maxRate[1]; - } else { - maxUploadRate = maxDownloadRate = maxRate; - } - - if (data && (onUploadProgress || maxUploadRate)) { - if (!utils$1.isStream(data)) { - data = stream__default["default"].Readable.from(data, {objectMode: false}); - } - - data = stream__default["default"].pipeline([data, new AxiosTransformStream$1({ - maxRate: utils$1.toFiniteNumber(maxUploadRate) - })], utils$1.noop); - - onUploadProgress && data.on('progress', flushOnFinish( - data, - progressEventDecorator( - contentLength, - progressEventReducer(asyncDecorator(onUploadProgress), false, 3) - ) - )); - } - - // HTTP basic authentication - let auth = undefined; - if (config.auth) { - const username = config.auth.username || ''; - const password = config.auth.password || ''; - auth = username + ':' + password; - } - - if (!auth && parsed.username) { - const urlUsername = parsed.username; - const urlPassword = parsed.password; - auth = urlUsername + ':' + urlPassword; - } - - auth && headers.delete('authorization'); - - let path; - - try { - path = buildURL( - parsed.pathname + parsed.search, - config.params, - config.paramsSerializer - ).replace(/^\?/, ''); - } catch (err) { - const customErr = new Error(err.message); - customErr.config = config; - customErr.url = config.url; - customErr.exists = true; - return reject(customErr); - } - - headers.set( - 'Accept-Encoding', - 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false - ); - - const options = { - path, - method: method, - headers: headers.toJSON(), - agents: { http: config.httpAgent, https: config.httpsAgent }, - auth, - protocol, - family, - beforeRedirect: dispatchBeforeRedirect, - beforeRedirects: {} - }; - - // cacheable-lookup integration hotfix - !utils$1.isUndefined(lookup) && (options.lookup = lookup); - - if (config.socketPath) { - options.socketPath = config.socketPath; - } else { - options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname; - options.port = parsed.port; - setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path); - } - - let transport; - const isHttpsRequest = isHttps.test(options.protocol); - options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; - if (config.transport) { - transport = config.transport; - } else if (config.maxRedirects === 0) { - transport = isHttpsRequest ? https__default["default"] : http__default["default"]; - } else { - if (config.maxRedirects) { - options.maxRedirects = config.maxRedirects; - } - if (config.beforeRedirect) { - options.beforeRedirects.config = config.beforeRedirect; - } - transport = isHttpsRequest ? httpsFollow : httpFollow; - } - - if (config.maxBodyLength > -1) { - options.maxBodyLength = config.maxBodyLength; - } else { - // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited - options.maxBodyLength = Infinity; - } - - if (config.insecureHTTPParser) { - options.insecureHTTPParser = config.insecureHTTPParser; - } - - // Create the request - req = transport.request(options, function handleResponse(res) { - if (req.destroyed) return; - - const streams = [res]; - - const responseLength = +res.headers['content-length']; - - if (onDownloadProgress || maxDownloadRate) { - const transformStream = new AxiosTransformStream$1({ - maxRate: utils$1.toFiniteNumber(maxDownloadRate) - }); - - onDownloadProgress && transformStream.on('progress', flushOnFinish( - transformStream, - progressEventDecorator( - responseLength, - progressEventReducer(asyncDecorator(onDownloadProgress), true, 3) - ) - )); - - streams.push(transformStream); - } - - // decompress the response body transparently if required - let responseStream = res; - - // return the last request in case of redirects - const lastRequest = res.req || req; - - // if decompress disabled we should not decompress - if (config.decompress !== false && res.headers['content-encoding']) { - // if no content, but headers still say that it is encoded, - // remove the header not confuse downstream operations - if (method === 'HEAD' || res.statusCode === 204) { - delete res.headers['content-encoding']; - } - - switch ((res.headers['content-encoding'] || '').toLowerCase()) { - /*eslint default-case:0*/ - case 'gzip': - case 'x-gzip': - case 'compress': - case 'x-compress': - // add the unzipper to the body stream processing pipeline - streams.push(zlib__default["default"].createUnzip(zlibOptions)); - - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - case 'deflate': - streams.push(new ZlibHeaderTransformStream$1()); - - // add the unzipper to the body stream processing pipeline - streams.push(zlib__default["default"].createUnzip(zlibOptions)); - - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - case 'br': - if (isBrotliSupported) { - streams.push(zlib__default["default"].createBrotliDecompress(brotliOptions)); - delete res.headers['content-encoding']; - } - } - } - - responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0]; - - const offListeners = stream__default["default"].finished(responseStream, () => { - offListeners(); - onFinished(); - }); - - const response = { - status: res.statusCode, - statusText: res.statusMessage, - headers: new AxiosHeaders$1(res.headers), - config, - request: lastRequest - }; - - if (responseType === 'stream') { - response.data = responseStream; - settle(resolve, reject, response); - } else { - const responseBuffer = []; - let totalResponseBytes = 0; - - responseStream.on('data', function handleStreamData(chunk) { - responseBuffer.push(chunk); - totalResponseBytes += chunk.length; - - // make sure the content length is not over the maxContentLength if specified - if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) { - // stream.destroy() emit aborted event before calling reject() on Node.js v16 - rejected = true; - responseStream.destroy(); - reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', - AxiosError.ERR_BAD_RESPONSE, config, lastRequest)); - } - }); - - responseStream.on('aborted', function handlerStreamAborted() { - if (rejected) { - return; - } - - const err = new AxiosError( - 'stream has been aborted', - AxiosError.ERR_BAD_RESPONSE, - config, - lastRequest - ); - responseStream.destroy(err); - reject(err); - }); - - responseStream.on('error', function handleStreamError(err) { - if (req.destroyed) return; - reject(AxiosError.from(err, null, config, lastRequest)); - }); - - responseStream.on('end', function handleStreamEnd() { - try { - let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); - if (responseType !== 'arraybuffer') { - responseData = responseData.toString(responseEncoding); - if (!responseEncoding || responseEncoding === 'utf8') { - responseData = utils$1.stripBOM(responseData); - } - } - response.data = responseData; - } catch (err) { - return reject(AxiosError.from(err, null, config, response.request, response)); - } - settle(resolve, reject, response); - }); - } - - emitter.once('abort', err => { - if (!responseStream.destroyed) { - responseStream.emit('error', err); - responseStream.destroy(); - } - }); - }); - - emitter.once('abort', err => { - reject(err); - req.destroy(err); - }); - - // Handle errors - req.on('error', function handleRequestError(err) { - // @todo remove - // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return; - reject(AxiosError.from(err, null, config, req)); - }); - - // set tcp keep alive to prevent drop connection by peer - req.on('socket', function handleRequestSocket(socket) { - // default interval of sending ack packet is 1 minute - socket.setKeepAlive(true, 1000 * 60); - }); - - // Handle request timeout - if (config.timeout) { - // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. - const timeout = parseInt(config.timeout, 10); - - if (Number.isNaN(timeout)) { - reject(new AxiosError( - 'error trying to parse `config.timeout` to int', - AxiosError.ERR_BAD_OPTION_VALUE, - config, - req - )); - - return; - } - - // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. - // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. - // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. - // And then these socket which be hang up will devouring CPU little by little. - // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. - req.setTimeout(timeout, function handleRequestTimeout() { - if (isDone) return; - let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = config.transitional || transitionalDefaults; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(new AxiosError( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, - config, - req - )); - abort(); - }); - } - - - // Send the request - if (utils$1.isStream(data)) { - let ended = false; - let errored = false; - - data.on('end', () => { - ended = true; - }); - - data.once('error', err => { - errored = true; - req.destroy(err); - }); - - data.on('close', () => { - if (!ended && !errored) { - abort(new CanceledError('Request stream has been aborted', config, req)); - } - }); - - data.pipe(req); - } else { - req.end(data); - } - }); -}; - -const isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => { - url = new URL(url, platform.origin); - - return ( - origin.protocol === url.protocol && - origin.host === url.host && - (isMSIE || origin.port === url.port) - ); -})( - new URL(platform.origin), - platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent) -) : () => true; - -const cookies = platform.hasStandardBrowserEnv ? - - // Standard browser envs support document.cookie - { - write(name, value, expires, path, domain, secure) { - const cookie = [name + '=' + encodeURIComponent(value)]; - - utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); - - utils$1.isString(path) && cookie.push('path=' + path); - - utils$1.isString(domain) && cookie.push('domain=' + domain); - - secure === true && cookie.push('secure'); - - document.cookie = cookie.join('; '); - }, - - read(name) { - const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove(name) { - this.write(name, '', Date.now() - 86400000); - } - } - - : - - // Non-standard browser env (web workers, react-native) lack needed support. - { - write() {}, - read() { - return null; - }, - remove() {} - }; - -const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing; - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * - * @returns {Object} New object resulting from merging config2 to config1 - */ -function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - const config = {}; - - function getMergedValue(target, source, prop, caseless) { - if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { - return utils$1.merge.call({caseless}, target, source); - } else if (utils$1.isPlainObject(source)) { - return utils$1.merge({}, source); - } else if (utils$1.isArray(source)) { - return source.slice(); - } - return source; - } - - // eslint-disable-next-line consistent-return - function mergeDeepProperties(a, b, prop , caseless) { - if (!utils$1.isUndefined(b)) { - return getMergedValue(a, b, prop , caseless); - } else if (!utils$1.isUndefined(a)) { - return getMergedValue(undefined, a, prop , caseless); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(a, b) { - if (!utils$1.isUndefined(b)) { - return getMergedValue(undefined, b); - } - } - - // eslint-disable-next-line consistent-return - function defaultToConfig2(a, b) { - if (!utils$1.isUndefined(b)) { - return getMergedValue(undefined, b); - } else if (!utils$1.isUndefined(a)) { - return getMergedValue(undefined, a); - } - } - - // eslint-disable-next-line consistent-return - function mergeDirectKeys(a, b, prop) { - if (prop in config2) { - return getMergedValue(a, b); - } else if (prop in config1) { - return getMergedValue(undefined, a); - } - } - - const mergeMap = { - url: valueFromConfig2, - method: valueFromConfig2, - data: valueFromConfig2, - baseURL: defaultToConfig2, - transformRequest: defaultToConfig2, - transformResponse: defaultToConfig2, - paramsSerializer: defaultToConfig2, - timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, - withCredentials: defaultToConfig2, - withXSRFToken: defaultToConfig2, - adapter: defaultToConfig2, - responseType: defaultToConfig2, - xsrfCookieName: defaultToConfig2, - xsrfHeaderName: defaultToConfig2, - onUploadProgress: defaultToConfig2, - onDownloadProgress: defaultToConfig2, - decompress: defaultToConfig2, - maxContentLength: defaultToConfig2, - maxBodyLength: defaultToConfig2, - beforeRedirect: defaultToConfig2, - transport: defaultToConfig2, - httpAgent: defaultToConfig2, - httpsAgent: defaultToConfig2, - cancelToken: defaultToConfig2, - socketPath: defaultToConfig2, - responseEncoding: defaultToConfig2, - validateStatus: mergeDirectKeys, - headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true) - }; - - utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { - const merge = mergeMap[prop] || mergeDeepProperties; - const configValue = merge(config1[prop], config2[prop], prop); - (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); - }); - - return config; -} - -const resolveConfig = (config) => { - const newConfig = mergeConfig({}, config); - - let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; - - newConfig.headers = headers = AxiosHeaders$1.from(headers); - - newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); - - // HTTP basic authentication - if (auth) { - headers.set('Authorization', 'Basic ' + - btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) - ); - } - - let contentType; - - if (utils$1.isFormData(data)) { - if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) { - headers.setContentType(undefined); // Let the browser set it - } else if ((contentType = headers.getContentType()) !== false) { - // fix semicolon duplication issue for ReactNative FormData implementation - const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; - headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); - } - } - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - - if (platform.hasStandardBrowserEnv) { - withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); - - if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) { - // Add xsrf header - const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName); - - if (xsrfValue) { - headers.set(xsrfHeaderName, xsrfValue); - } - } - } - - return newConfig; -}; - -const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; - -const xhrAdapter = isXHRAdapterSupported && function (config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - const _config = resolveConfig(config); - let requestData = _config.data; - const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize(); - let {responseType, onUploadProgress, onDownloadProgress} = _config; - let onCanceled; - let uploadThrottled, downloadThrottled; - let flushUpload, flushDownload; - - function done() { - flushUpload && flushUpload(); // flush events - flushDownload && flushDownload(); // flush events - - _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); - - _config.signal && _config.signal.removeEventListener('abort', onCanceled); - } - - let request = new XMLHttpRequest(); - - request.open(_config.method.toUpperCase(), _config.url, true); - - // Set the request timeout in MS - request.timeout = _config.timeout; - - function onloadend() { - if (!request) { - return; - } - // Prepare the response - const responseHeaders = AxiosHeaders$1.from( - 'getAllResponseHeaders' in request && request.getAllResponseHeaders() - ); - const responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - const response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config, - request - }; - - settle(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); - - // Clean up request - request = null; - } - - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = _config.transitional || transitionalDefaults; - if (_config.timeoutErrorMessage) { - timeoutErrorMessage = _config.timeoutErrorMessage; - } - reject(new AxiosError( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, - config, - request)); - - // Clean up request - request = null; - }; - - // Remove Content-Type if data is undefined - requestData === undefined && requestHeaders.setContentType(null); - - // Add headers to the request - if ('setRequestHeader' in request) { - utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { - request.setRequestHeader(key, val); - }); - } - - // Add withCredentials to request if needed - if (!utils$1.isUndefined(_config.withCredentials)) { - request.withCredentials = !!_config.withCredentials; - } - - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = _config.responseType; - } - - // Handle progress if needed - if (onDownloadProgress) { - ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true)); - request.addEventListener('progress', downloadThrottled); - } - - // Not all browsers support upload events - if (onUploadProgress && request.upload) { - ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress)); - - request.upload.addEventListener('progress', uploadThrottled); - - request.upload.addEventListener('loadend', flushUpload); - } - - if (_config.cancelToken || _config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = cancel => { - if (!request) { - return; - } - reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); - request.abort(); - request = null; - }; - - _config.cancelToken && _config.cancelToken.subscribe(onCanceled); - if (_config.signal) { - _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); - } - } - - const protocol = parseProtocol(_config.url); - - if (protocol && platform.protocols.indexOf(protocol) === -1) { - reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); - return; - } - - - // Send the request - request.send(requestData || null); - }); -}; - -const composeSignals = (signals, timeout) => { - const {length} = (signals = signals ? signals.filter(Boolean) : []); - - if (timeout || length) { - let controller = new AbortController(); - - let aborted; - - const onabort = function (reason) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = reason instanceof Error ? reason : this.reason; - controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err)); - } - }; - - let timer = timeout && setTimeout(() => { - timer = null; - onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT)); - }, timeout); - - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); - timer = null; - signals.forEach(signal => { - signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); - }); - signals = null; - } - }; - - signals.forEach((signal) => signal.addEventListener('abort', onabort)); - - const {signal} = controller; - - signal.unsubscribe = () => utils$1.asap(unsubscribe); - - return signal; - } -}; - -const composeSignals$1 = composeSignals; - -const streamChunk = function* (chunk, chunkSize) { - let len = chunk.byteLength; - - if (!chunkSize || len < chunkSize) { - yield chunk; - return; - } - - let pos = 0; - let end; - - while (pos < len) { - end = pos + chunkSize; - yield chunk.slice(pos, end); - pos = end; - } -}; - -const readBytes = async function* (iterable, chunkSize) { - for await (const chunk of readStream(iterable)) { - yield* streamChunk(chunk, chunkSize); - } -}; - -const readStream = async function* (stream) { - if (stream[Symbol.asyncIterator]) { - yield* stream; - return; - } - - const reader = stream.getReader(); - try { - for (;;) { - const {done, value} = await reader.read(); - if (done) { - break; - } - yield value; - } - } finally { - await reader.cancel(); - } -}; - -const trackStream = (stream, chunkSize, onProgress, onFinish) => { - const iterator = readBytes(stream, chunkSize); - - let bytes = 0; - let done; - let _onFinish = (e) => { - if (!done) { - done = true; - onFinish && onFinish(e); - } - }; - - return new ReadableStream({ - async pull(controller) { - try { - const {done, value} = await iterator.next(); - - if (done) { - _onFinish(); - controller.close(); - return; - } - - let len = value.byteLength; - if (onProgress) { - let loadedBytes = bytes += len; - onProgress(loadedBytes); - } - controller.enqueue(new Uint8Array(value)); - } catch (err) { - _onFinish(err); - throw err; - } - }, - cancel(reason) { - _onFinish(reason); - return iterator.return(); - } - }, { - highWaterMark: 2 - }) -}; - -const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; -const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; - -// used only inside the fetch adapter -const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? - ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : - async (str) => new Uint8Array(await new Response(str).arrayBuffer()) -); - -const test = (fn, ...args) => { - try { - return !!fn(...args); - } catch (e) { - return false - } -}; - -const supportsRequestStream = isReadableStreamSupported && test(() => { - let duplexAccessed = false; - - const hasContentType = new Request(platform.origin, { - body: new ReadableStream(), - method: 'POST', - get duplex() { - duplexAccessed = true; - return 'half'; - }, - }).headers.has('Content-Type'); - - return duplexAccessed && !hasContentType; -}); - -const DEFAULT_CHUNK_SIZE = 64 * 1024; - -const supportsResponseStream = isReadableStreamSupported && - test(() => utils$1.isReadableStream(new Response('').body)); - - -const resolvers = { - stream: supportsResponseStream && ((res) => res.body) -}; - -isFetchSupported && (((res) => { - ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { - !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() : - (_, config) => { - throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config); - }); - }); -})(new Response)); - -const getBodyLength = async (body) => { - if (body == null) { - return 0; - } - - if(utils$1.isBlob(body)) { - return body.size; - } - - if(utils$1.isSpecCompliantForm(body)) { - const _request = new Request(platform.origin, { - method: 'POST', - body, - }); - return (await _request.arrayBuffer()).byteLength; - } - - if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) { - return body.byteLength; - } - - if(utils$1.isURLSearchParams(body)) { - body = body + ''; - } - - if(utils$1.isString(body)) { - return (await encodeText(body)).byteLength; - } -}; - -const resolveBodyLength = async (headers, body) => { - const length = utils$1.toFiniteNumber(headers.getContentLength()); - - return length == null ? getBodyLength(body) : length; -}; - -const fetchAdapter = isFetchSupported && (async (config) => { - let { - url, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = 'same-origin', - fetchOptions - } = resolveConfig(config); - - responseType = responseType ? (responseType + '').toLowerCase() : 'text'; - - let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout); - - let request; - - const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { - composedSignal.unsubscribe(); - }); - - let requestContentLength; - - try { - if ( - onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && - (requestContentLength = await resolveBodyLength(headers, data)) !== 0 - ) { - let _request = new Request(url, { - method: 'POST', - body: data, - duplex: "half" - }); - - let contentTypeHeader; - - if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { - headers.setContentType(contentTypeHeader); - } - - if (_request.body) { - const [onProgress, flush] = progressEventDecorator( - requestContentLength, - progressEventReducer(asyncDecorator(onUploadProgress)) - ); - - data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); - } - } - - if (!utils$1.isString(withCredentials)) { - withCredentials = withCredentials ? 'include' : 'omit'; - } - - // Cloudflare Workers throws when credentials are defined - // see https://github.com/cloudflare/workerd/issues/902 - const isCredentialsSupported = "credentials" in Request.prototype; - request = new Request(url, { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: headers.normalize().toJSON(), - body: data, - duplex: "half", - credentials: isCredentialsSupported ? withCredentials : undefined - }); - - let response = await fetch(request); - - const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); - - if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { - const options = {}; - - ['status', 'statusText', 'headers'].forEach(prop => { - options[prop] = response[prop]; - }); - - const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length')); - - const [onProgress, flush] = onDownloadProgress && progressEventDecorator( - responseContentLength, - progressEventReducer(asyncDecorator(onDownloadProgress), true) - ) || []; - - response = new Response( - trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { - flush && flush(); - unsubscribe && unsubscribe(); - }), - options - ); - } - - responseType = responseType || 'text'; - - let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config); - - !isStreamResponse && unsubscribe && unsubscribe(); - - return await new Promise((resolve, reject) => { - settle(resolve, reject, { - data: responseData, - headers: AxiosHeaders$1.from(response.headers), - status: response.status, - statusText: response.statusText, - config, - request - }); - }) - } catch (err) { - unsubscribe && unsubscribe(); - - if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) { - throw Object.assign( - new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), - { - cause: err.cause || err - } - ) - } - - throw AxiosError.from(err, err && err.code, config, request); - } -}); - -const knownAdapters = { - http: httpAdapter, - xhr: xhrAdapter, - fetch: fetchAdapter -}; - -utils$1.forEach(knownAdapters, (fn, value) => { - if (fn) { - try { - Object.defineProperty(fn, 'name', {value}); - } catch (e) { - // eslint-disable-next-line no-empty - } - Object.defineProperty(fn, 'adapterName', {value}); - } -}); - -const renderReason = (reason) => `- ${reason}`; - -const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false; - -const adapters = { - getAdapter: (adapters) => { - adapters = utils$1.isArray(adapters) ? adapters : [adapters]; - - const {length} = adapters; - let nameOrAdapter; - let adapter; - - const rejectedReasons = {}; - - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; - - adapter = nameOrAdapter; - - if (!isResolvedHandle(nameOrAdapter)) { - adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - - if (adapter === undefined) { - throw new AxiosError(`Unknown adapter '${id}'`); - } - } - - if (adapter) { - break; - } - - rejectedReasons[id || '#' + i] = adapter; - } - - if (!adapter) { - - const reasons = Object.entries(rejectedReasons) - .map(([id, state]) => `adapter ${id} ` + - (state === false ? 'is not supported by the environment' : 'is not available in the build') - ); - - let s = length ? - (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : - 'as no adapter specified'; - - throw new AxiosError( - `There is no suitable adapter to dispatch the request ` + s, - 'ERR_NOT_SUPPORT' - ); - } - - return adapter; - }, - adapters: knownAdapters -}; - -/** - * Throws a `CanceledError` if cancellation has been requested. - * - * @param {Object} config The config that is to be used for the request - * - * @returns {void} - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - - if (config.signal && config.signal.aborted) { - throw new CanceledError(null, config); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * - * @returns {Promise} The Promise to be fulfilled - */ -function dispatchRequest(config) { - throwIfCancellationRequested(config); - - config.headers = AxiosHeaders$1.from(config.headers); - - // Transform request data - config.data = transformData.call( - config, - config.transformRequest - ); - - if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { - config.headers.setContentType('application/x-www-form-urlencoded', false); - } - - const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter); - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = transformData.call( - config, - config.transformResponse, - response - ); - - response.headers = AxiosHeaders$1.from(response.headers); - - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData.call( - config, - config.transformResponse, - reason.response - ); - reason.response.headers = AxiosHeaders$1.from(reason.response.headers); - } - } - - return Promise.reject(reason); - }); -} - -const validators$1 = {}; - -// eslint-disable-next-line func-names -['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { - validators$1[type] = function validator(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; - }; -}); - -const deprecatedWarnings = {}; - -/** - * Transitional option validator - * - * @param {function|boolean?} validator - set to false if the transitional option has been removed - * @param {string?} version - deprecated version / removed since version - * @param {string?} message - some message with additional info - * - * @returns {function} - */ -validators$1.transitional = function transitional(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); - } - - // eslint-disable-next-line func-names - return (value, opt, opts) => { - if (validator === false) { - throw new AxiosError( - formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), - AxiosError.ERR_DEPRECATED - ); - } - - if (version && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - // eslint-disable-next-line no-console - console.warn( - formatMessage( - opt, - ' has been deprecated since v' + version + ' and will be removed in the near future' - ) - ); - } - - return validator ? validator(value, opt, opts) : true; - }; -}; - -validators$1.spelling = function spelling(correctSpelling) { - return (value, opt) => { - // eslint-disable-next-line no-console - console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); - return true; - } -}; - -/** - * Assert object's properties type - * - * @param {object} options - * @param {object} schema - * @param {boolean?} allowUnknown - * - * @returns {object} - */ - -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== 'object') { - throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); - } - const keys = Object.keys(options); - let i = keys.length; - while (i-- > 0) { - const opt = keys[i]; - const validator = schema[opt]; - if (validator) { - const value = options[opt]; - const result = value === undefined || validator(value, opt, options); - if (result !== true) { - throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); - } - continue; - } - if (allowUnknown !== true) { - throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); - } - } -} - -const validator = { - assertOptions, - validators: validators$1 -}; - -const validators = validator.validators; - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - * - * @return {Axios} A new instance of Axios - */ -class Axios { - constructor(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager$1(), - response: new InterceptorManager$1() - }; - } - - /** - * Dispatch a request - * - * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) - * @param {?Object} config - * - * @returns {Promise} The Promise to be fulfilled - */ - async request(configOrUrl, config) { - try { - return await this._request(configOrUrl, config); - } catch (err) { - if (err instanceof Error) { - let dummy = {}; - - Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error()); - - // slice off the Error: ... line - const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; - try { - if (!err.stack) { - err.stack = stack; - // match without the 2 top stack lines - } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { - err.stack += '\n' + stack; - } - } catch (e) { - // ignore the case where "stack" is an un-writable property - } - } - - throw err; - } - } - - _request(configOrUrl, config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof configOrUrl === 'string') { - config = config || {}; - config.url = configOrUrl; - } else { - config = configOrUrl || {}; - } - - config = mergeConfig(this.defaults, config); - - const {transitional, paramsSerializer, headers} = config; - - if (transitional !== undefined) { - validator.assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); - } - - if (paramsSerializer != null) { - if (utils$1.isFunction(paramsSerializer)) { - config.paramsSerializer = { - serialize: paramsSerializer - }; - } else { - validator.assertOptions(paramsSerializer, { - encode: validators.function, - serialize: validators.function - }, true); - } - } - - // Set config.allowAbsoluteUrls - if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) { - config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; - } else { - config.allowAbsoluteUrls = true; - } - - validator.assertOptions(config, { - baseUrl: validators.spelling('baseURL'), - withXsrfToken: validators.spelling('withXSRFToken') - }, true); - - // Set config.method - config.method = (config.method || this.defaults.method || 'get').toLowerCase(); - - // Flatten headers - let contextHeaders = headers && utils$1.merge( - headers.common, - headers[config.method] - ); - - headers && utils$1.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - (method) => { - delete headers[method]; - } - ); - - config.headers = AxiosHeaders$1.concat(contextHeaders, headers); - - // filter out skipped interceptors - const requestInterceptorChain = []; - let synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { - return; - } - - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - const responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - - let promise; - let i = 0; - let len; - - if (!synchronousRequestInterceptors) { - const chain = [dispatchRequest.bind(this), undefined]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); - len = chain.length; - - promise = Promise.resolve(config); - - while (i < len) { - promise = promise.then(chain[i++], chain[i++]); - } - - return promise; - } - - len = requestInterceptorChain.length; - - let newConfig = config; - - i = 0; - - while (i < len) { - const onFulfilled = requestInterceptorChain[i++]; - const onRejected = requestInterceptorChain[i++]; - try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected.call(this, error); - break; - } - } - - try { - promise = dispatchRequest.call(this, newConfig); - } catch (error) { - return Promise.reject(error); - } - - i = 0; - len = responseInterceptorChain.length; - - while (i < len) { - promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); - } - - return promise; - } - - getUri(config) { - config = mergeConfig(this.defaults, config); - const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); - return buildURL(fullPath, config.params, config.paramsSerializer); - } -} - -// Provide aliases for supported request methods -utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method, - url, - data: (config || {}).data - })); - }; -}); - -utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - - function generateHTTPMethod(isForm) { - return function httpMethod(url, data, config) { - return this.request(mergeConfig(config || {}, { - method, - headers: isForm ? { - 'Content-Type': 'multipart/form-data' - } : {}, - url, - data - })); - }; - } - - Axios.prototype[method] = generateHTTPMethod(); - - Axios.prototype[method + 'Form'] = generateHTTPMethod(true); -}); - -const Axios$1 = Axios; - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @param {Function} executor The executor function. - * - * @returns {CancelToken} - */ -class CancelToken { - constructor(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - let resolvePromise; - - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - const token = this; - - // eslint-disable-next-line func-names - this.promise.then(cancel => { - if (!token._listeners) return; - - let i = token._listeners.length; - - while (i-- > 0) { - token._listeners[i](cancel); - } - token._listeners = null; - }); - - // eslint-disable-next-line func-names - this.promise.then = onfulfilled => { - let _resolve; - // eslint-disable-next-line func-names - const promise = new Promise(resolve => { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - - return promise; - }; - - executor(function cancel(message, config, request) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new CanceledError(message, config, request); - resolvePromise(token.reason); - }); - } - - /** - * Throws a `CanceledError` if cancellation has been requested. - */ - throwIfRequested() { - if (this.reason) { - throw this.reason; - } - } - - /** - * Subscribe to the cancel signal - */ - - subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } - } - - /** - * Unsubscribe from the cancel signal - */ - - unsubscribe(listener) { - if (!this._listeners) { - return; - } - const index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } - } - - toAbortSignal() { - const controller = new AbortController(); - - const abort = (err) => { - controller.abort(err); - }; - - this.subscribe(abort); - - controller.signal.unsubscribe = () => this.unsubscribe(abort); - - return controller.signal; - } - - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - static source() { - let cancel; - const token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token, - cancel - }; - } -} - -const CancelToken$1 = CancelToken; - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * - * @returns {Function} - */ -function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -} - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -function isAxiosError(payload) { - return utils$1.isObject(payload) && (payload.isAxiosError === true); -} - -const HttpStatusCode = { - Continue: 100, - SwitchingProtocols: 101, - Processing: 102, - EarlyHints: 103, - Ok: 200, - Created: 201, - Accepted: 202, - NonAuthoritativeInformation: 203, - NoContent: 204, - ResetContent: 205, - PartialContent: 206, - MultiStatus: 207, - AlreadyReported: 208, - ImUsed: 226, - MultipleChoices: 300, - MovedPermanently: 301, - Found: 302, - SeeOther: 303, - NotModified: 304, - UseProxy: 305, - Unused: 306, - TemporaryRedirect: 307, - PermanentRedirect: 308, - BadRequest: 400, - Unauthorized: 401, - PaymentRequired: 402, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - NotAcceptable: 406, - ProxyAuthenticationRequired: 407, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - LengthRequired: 411, - PreconditionFailed: 412, - PayloadTooLarge: 413, - UriTooLong: 414, - UnsupportedMediaType: 415, - RangeNotSatisfiable: 416, - ExpectationFailed: 417, - ImATeapot: 418, - MisdirectedRequest: 421, - UnprocessableEntity: 422, - Locked: 423, - FailedDependency: 424, - TooEarly: 425, - UpgradeRequired: 426, - PreconditionRequired: 428, - TooManyRequests: 429, - RequestHeaderFieldsTooLarge: 431, - UnavailableForLegalReasons: 451, - InternalServerError: 500, - NotImplemented: 501, - BadGateway: 502, - ServiceUnavailable: 503, - GatewayTimeout: 504, - HttpVersionNotSupported: 505, - VariantAlsoNegotiates: 506, - InsufficientStorage: 507, - LoopDetected: 508, - NotExtended: 510, - NetworkAuthenticationRequired: 511, -}; - -Object.entries(HttpStatusCode).forEach(([key, value]) => { - HttpStatusCode[value] = key; -}); - -const HttpStatusCode$1 = HttpStatusCode; - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * - * @returns {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - const context = new Axios$1(defaultConfig); - const instance = bind(Axios$1.prototype.request, context); - - // Copy axios.prototype to instance - utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true}); - - // Copy context to instance - utils$1.extend(instance, context, null, {allOwnKeys: true}); - - // Factory for creating new instances - instance.create = function create(instanceConfig) { - return createInstance(mergeConfig(defaultConfig, instanceConfig)); - }; - - return instance; -} - -// Create the default instance to be exported -const axios = createInstance(defaults$1); - -// Expose Axios class to allow class inheritance -axios.Axios = Axios$1; - -// Expose Cancel & CancelToken -axios.CanceledError = CanceledError; -axios.CancelToken = CancelToken$1; -axios.isCancel = isCancel; -axios.VERSION = VERSION; -axios.toFormData = toFormData; - -// Expose AxiosError class -axios.AxiosError = AxiosError; - -// alias for CanceledError for backward compatibility -axios.Cancel = axios.CanceledError; - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; - -axios.spread = spread; - -// Expose isAxiosError -axios.isAxiosError = isAxiosError; - -// Expose mergeConfig -axios.mergeConfig = mergeConfig; - -axios.AxiosHeaders = AxiosHeaders$1; - -axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); - -axios.getAdapter = adapters.getAdapter; - -axios.HttpStatusCode = HttpStatusCode$1; - -axios.default = axios; - -module.exports = axios; -//# sourceMappingURL=axios.cjs.map - - -/***/ }), - -/***/ 9353: -/***/ ((module) => { - -"use strict"; - - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var toStr = Object.prototype.toString; -var max = Math.max; -var funcType = '[object Function]'; - -var concatty = function concatty(a, b) { - var arr = []; - - for (var i = 0; i < a.length; i += 1) { - arr[i] = a[i]; - } - for (var j = 0; j < b.length; j += 1) { - arr[j + a.length] = b[j]; - } - - return arr; -}; - -var slicy = function slicy(arrLike, offset) { - var arr = []; - for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { - arr[j] = arrLike[i]; - } - return arr; -}; - -var joiny = function (arr, joiner) { - var str = ''; - for (var i = 0; i < arr.length; i += 1) { - str += arr[i]; - if (i + 1 < arr.length) { - str += joiner; - } - } - return str; -}; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.apply(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slicy(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - concatty(args, arguments) - ); - if (Object(result) === result) { - return result; - } - return this; - } - return target.apply( - that, - concatty(args, arguments) - ); - - }; - - var boundLength = max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs[i] = '$' + i; - } - - bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; - - -/***/ }), - -/***/ 9383: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('.')} */ -module.exports = Error; - - -/***/ }), - -/***/ 9500: -/***/ ((module) => { - -// API -module.exports = state; - -/** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object - */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length - } - ; - - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); - } - - return initState; -} - - -/***/ }), - -/***/ 9511: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var setPrototypeOf = __webpack_require__(5636); -function _inherits(t, e) { - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); - t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - writable: !0, - configurable: !0 - } - }), Object.defineProperty(t, "prototype", { - writable: !1 - }), e && setPrototypeOf(t, e); -} -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 9538: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./ref')} */ -module.exports = ReferenceError; - - -/***/ }), - -/***/ 9552: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var getPrototypeOf = __webpack_require__(3072); -function _superPropBase(t, o) { - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); - return t; -} -module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 9605: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(453); - -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); - -var hasToStringTag = __webpack_require__(9092)(); -var hasOwn = __webpack_require__(9957); -var $TypeError = __webpack_require__(9675); - -var toStringTag = hasToStringTag ? Symbol.toStringTag : null; - -/** @type {import('.')} */ -module.exports = function setToStringTag(object, value) { - var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force; - var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable; - if ( - (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean') - || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean') - ) { - throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans'); - } - if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) { - if ($defineProperty) { - $defineProperty(object, toStringTag, { - configurable: !nonConfigurable, - enumerable: false, - value: value, - writable: false - }); - } else { - object[toStringTag] = value; // eslint-disable-line no-param-reassign - } - } -}; - - -/***/ }), - -/***/ 9612: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('.')} */ -module.exports = Object; - - -/***/ }), - -/***/ 9633: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * NetLicensing Bundle entity. - * - * Properties visible via NetLicensing API: - * - * Unique number that identifies the bundle. Vendor can assign this number when creating a bundle or - * let NetLicensing generate one. - * @property string number - * - * If set to false, the bundle is disabled. - * @property boolean active - * - * Bundle name. - * @property string name - * - * Price for the bundle. If >0, it must always be accompanied by the currency specification. - * @property double price - * - * Specifies currency for the bundle price. Check data types to discover which currencies are - * supported. - * @property string currency - * - * Arbitrary additional user properties of string type may be associated with each bundle. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted. - * - * @constructor - */ -var Bundle = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Bundle(properties) { - (0, _classCallCheck2.default)(this, Bundle); - return _callSuper(this, Bundle, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - price: 'double', - currency: 'string' - } - }]); - } - (0, _inherits2.default)(Bundle, _BaseEntity); - return (0, _createClass2.default)(Bundle, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setDescription", - value: function setDescription(description) { - return this.setProperty('description', description); - } - }, { - key: "getDescription", - value: function getDescription(def) { - return this.getProperty('description', def); - } - }, { - key: "setPrice", - value: function setPrice(price) { - return this.setProperty('price', price); - } - }, { - key: "getPrice", - value: function getPrice(def) { - return this.getProperty('price', def); - } - }, { - key: "setCurrency", - value: function setCurrency(currency) { - return this.setProperty('currency', currency); - } - }, { - key: "getCurrency", - value: function getCurrency(def) { - return this.getProperty('currency', def); - } - }, { - key: "setLicenseTemplateNumbers", - value: function setLicenseTemplateNumbers(licenseTemplateNumbers) { - var numbers = Array.isArray(licenseTemplateNumbers) ? licenseTemplateNumbers.join(',') : licenseTemplateNumbers; - return this.setProperty('licenseTemplateNumbers', numbers); - } - }, { - key: "getLicenseTemplateNumbers", - value: function getLicenseTemplateNumbers(def) { - var numbers = this.getProperty('licenseTemplateNumbers', def); - return numbers ? numbers.split(',') : numbers; - } - }, { - key: "addLicenseTemplateNumber", - value: function addLicenseTemplateNumber(licenseTemplateNumber) { - var numbers = this.getLicenseTemplateNumbers([]); - numbers.push(licenseTemplateNumber); - return this.setLicenseTemplateNumbers(numbers); - } - }, { - key: "removeLicenseTemplateNumber", - value: function removeLicenseTemplateNumber(licenseTemplateNumber) { - var numbers = this.getLicenseTemplateNumbers([]); - numbers.splice(numbers.indexOf(licenseTemplateNumber), 1); - return this.setLicenseTemplateNumbers(numbers); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 9646: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var isNativeReflectConstruct = __webpack_require__(7550); -var setPrototypeOf = __webpack_require__(5636); -function _construct(t, e, r) { - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); - var o = [null]; - o.push.apply(o, e); - var p = new (t.bind.apply(t, o))(); - return r && setPrototypeOf(p, r.prototype), p; -} -module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 9675: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./type')} */ -module.exports = TypeError; - - -/***/ }), - -/***/ 9896: -/***/ ((module) => { - -"use strict"; -module.exports = require("fs"); - -/***/ }), - -/***/ 9899: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(7383)); -var _createClass2 = _interopRequireDefault(__webpack_require__(4579)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(8452)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(3072)); -var _inherits2 = _interopRequireDefault(__webpack_require__(9511)); -var _BaseEntity2 = _interopRequireDefault(__webpack_require__(635)); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -/** - * Licensee entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this - * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for - * the licensee. - * @property string number - * - * Licensee name. - * @property string name - * - * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is - * disabled (tbd). - * @property boolean active - * - * Licensee Secret for licensee - * @property string licenseeSecret - * - * Mark licensee for transfer. - * @property boolean markedForTransfer - * - * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber - * - * @constructor - */ -var Licensee = exports["default"] = /*#__PURE__*/function (_BaseEntity) { - function Licensee(properties) { - (0, _classCallCheck2.default)(this, Licensee); - return _callSuper(this, Licensee, [{ - properties: properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - licenseeSecret: 'string', - markedForTransfer: 'boolean', - inUse: 'boolean' - } - }]); - } - (0, _inherits2.default)(Licensee, _BaseEntity); - return (0, _createClass2.default)(Licensee, [{ - key: "setNumber", - value: function setNumber(number) { - return this.setProperty('number', number); - } - }, { - key: "getNumber", - value: function getNumber(def) { - return this.getProperty('number', def); - } - }, { - key: "setActive", - value: function setActive(active) { - return this.setProperty('active', active); - } - }, { - key: "getActive", - value: function getActive(def) { - return this.getProperty('active', def); - } - }, { - key: "setName", - value: function setName(name) { - return this.setProperty('name', name); - } - }, { - key: "getName", - value: function getName(def) { - return this.getProperty('name', def); - } - }, { - key: "setProductNumber", - value: function setProductNumber(productNumber) { - return this.setProperty('productNumber', productNumber); - } - }, { - key: "getProductNumber", - value: function getProductNumber(def) { - return this.getProperty('productNumber', def); - } - - /** - * @deprecated - */ - }, { - key: "setLicenseeSecret", - value: function setLicenseeSecret(licenseeSecret) { - return this.setProperty('licenseeSecret', licenseeSecret); - } - - /** - * @deprecated - */ - }, { - key: "getLicenseeSecret", - value: function getLicenseeSecret(def) { - return this.getProperty('licenseeSecret', def); - } - }, { - key: "setMarkedForTransfer", - value: function setMarkedForTransfer(markedForTransfer) { - return this.setProperty('markedForTransfer', markedForTransfer); - } - }, { - key: "getMarkedForTransfer", - value: function getMarkedForTransfer(def) { - return this.getProperty('markedForTransfer', def); - } - }, { - key: "getInUse", - value: function getInUse(def) { - return this.getProperty('inUse', def); - } - }]); -}(_BaseEntity2.default); - -/***/ }), - -/***/ 9957: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var call = Function.prototype.call; -var $hasOwn = Object.prototype.hasOwnProperty; -var bind = __webpack_require__(6743); - -/** @type {import('.')} */ -module.exports = bind.call(call, $hasOwn); - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. -(() => { -"use strict"; -var exports = __webpack_exports__; - - -var _interopRequireDefault = __webpack_require__(4994); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "BaseEntity", ({ - enumerable: true, - get: function get() { - return _BaseEntity.default; - } -})); -Object.defineProperty(exports, "Bundle", ({ - enumerable: true, - get: function get() { - return _Bundle.default; - } -})); -Object.defineProperty(exports, "BundleService", ({ - enumerable: true, - get: function get() { - return _BundleService.default; - } -})); -Object.defineProperty(exports, "CastsUtils", ({ - enumerable: true, - get: function get() { - return _CastsUtils.default; - } -})); -Object.defineProperty(exports, "CheckUtils", ({ - enumerable: true, - get: function get() { - return _CheckUtils.default; - } -})); -Object.defineProperty(exports, "Constants", ({ - enumerable: true, - get: function get() { - return _Constants.default; - } -})); -Object.defineProperty(exports, "Context", ({ - enumerable: true, - get: function get() { - return _Context.default; - } -})); -Object.defineProperty(exports, "Country", ({ - enumerable: true, - get: function get() { - return _Country.default; - } -})); -Object.defineProperty(exports, "FilterUtils", ({ - enumerable: true, - get: function get() { - return _FilterUtils.default; - } -})); -Object.defineProperty(exports, "License", ({ - enumerable: true, - get: function get() { - return _License.default; - } -})); -Object.defineProperty(exports, "LicenseService", ({ - enumerable: true, - get: function get() { - return _LicenseService.default; - } -})); -Object.defineProperty(exports, "LicenseTemplate", ({ - enumerable: true, - get: function get() { - return _LicenseTemplate.default; - } -})); -Object.defineProperty(exports, "LicenseTemplateService", ({ - enumerable: true, - get: function get() { - return _LicenseTemplateService.default; - } -})); -Object.defineProperty(exports, "LicenseTransactionJoin", ({ - enumerable: true, - get: function get() { - return _LicenseTransactionJoin.default; - } -})); -Object.defineProperty(exports, "Licensee", ({ - enumerable: true, - get: function get() { - return _Licensee.default; - } -})); -Object.defineProperty(exports, "LicenseeService", ({ - enumerable: true, - get: function get() { - return _LicenseeService.default; - } -})); -Object.defineProperty(exports, "NlicError", ({ - enumerable: true, - get: function get() { - return _NlicError.default; - } -})); -Object.defineProperty(exports, "Notification", ({ - enumerable: true, - get: function get() { - return _Notification.default; - } -})); -Object.defineProperty(exports, "NotificationService", ({ - enumerable: true, - get: function get() { - return _NotificationService.default; - } -})); -Object.defineProperty(exports, "Page", ({ - enumerable: true, - get: function get() { - return _Page.default; - } -})); -Object.defineProperty(exports, "PaymentMethod", ({ - enumerable: true, - get: function get() { - return _PaymentMethod.default; - } -})); -Object.defineProperty(exports, "PaymentMethodService", ({ - enumerable: true, - get: function get() { - return _PaymentMethodService.default; - } -})); -Object.defineProperty(exports, "Product", ({ - enumerable: true, - get: function get() { - return _Product.default; - } -})); -Object.defineProperty(exports, "ProductDiscount", ({ - enumerable: true, - get: function get() { - return _ProductDiscount.default; - } -})); -Object.defineProperty(exports, "ProductModule", ({ - enumerable: true, - get: function get() { - return _ProductModule.default; - } -})); -Object.defineProperty(exports, "ProductModuleService", ({ - enumerable: true, - get: function get() { - return _ProductModuleService.default; - } -})); -Object.defineProperty(exports, "ProductService", ({ - enumerable: true, - get: function get() { - return _ProductService.default; - } -})); -Object.defineProperty(exports, "Service", ({ - enumerable: true, - get: function get() { - return _Service.default; - } -})); -Object.defineProperty(exports, "Token", ({ - enumerable: true, - get: function get() { - return _Token.default; - } -})); -Object.defineProperty(exports, "TokenService", ({ - enumerable: true, - get: function get() { - return _TokenService.default; - } -})); -Object.defineProperty(exports, "Transaction", ({ - enumerable: true, - get: function get() { - return _Transaction.default; - } -})); -Object.defineProperty(exports, "TransactionService", ({ - enumerable: true, - get: function get() { - return _TransactionService.default; - } -})); -Object.defineProperty(exports, "UtilityService", ({ - enumerable: true, - get: function get() { - return _UtilityService.default; - } -})); -Object.defineProperty(exports, "ValidationParameters", ({ - enumerable: true, - get: function get() { - return _ValidationParameters.default; - } -})); -Object.defineProperty(exports, "ValidationResults", ({ - enumerable: true, - get: function get() { - return _ValidationResults.default; - } -})); -Object.defineProperty(exports, "itemToBundle", ({ - enumerable: true, - get: function get() { - return _itemToBundle.default; - } -})); -Object.defineProperty(exports, "itemToCountry", ({ - enumerable: true, - get: function get() { - return _itemToCountry.default; - } -})); -Object.defineProperty(exports, "itemToLicense", ({ - enumerable: true, - get: function get() { - return _itemToLicense.default; - } -})); -Object.defineProperty(exports, "itemToLicenseTemplate", ({ - enumerable: true, - get: function get() { - return _itemToLicenseTemplate.default; - } -})); -Object.defineProperty(exports, "itemToLicensee", ({ - enumerable: true, - get: function get() { - return _itemToLicensee.default; - } -})); -Object.defineProperty(exports, "itemToObject", ({ - enumerable: true, - get: function get() { - return _itemToObject.default; - } -})); -Object.defineProperty(exports, "itemToPaymentMethod", ({ - enumerable: true, - get: function get() { - return _itemToPaymentMethod.default; - } -})); -Object.defineProperty(exports, "itemToProduct", ({ - enumerable: true, - get: function get() { - return _itemToProduct.default; - } -})); -Object.defineProperty(exports, "itemToProductModule", ({ - enumerable: true, - get: function get() { - return _itemToProductModule.default; - } -})); -Object.defineProperty(exports, "itemToToken", ({ - enumerable: true, - get: function get() { - return _itemToToken.default; - } -})); -Object.defineProperty(exports, "itemToTransaction", ({ - enumerable: true, - get: function get() { - return _itemToTransaction.default; - } -})); -var _Constants = _interopRequireDefault(__webpack_require__(6232)); -var _Context = _interopRequireDefault(__webpack_require__(2302)); -var _Page = _interopRequireDefault(__webpack_require__(4034)); -var _ValidationParameters = _interopRequireDefault(__webpack_require__(662)); -var _ValidationResults = _interopRequireDefault(__webpack_require__(8506)); -var _Service = _interopRequireDefault(__webpack_require__(3401)); -var _LicenseeService = _interopRequireDefault(__webpack_require__(7211)); -var _LicenseService = _interopRequireDefault(__webpack_require__(7394)); -var _LicenseTemplateService = _interopRequireDefault(__webpack_require__(3140)); -var _PaymentMethodService = _interopRequireDefault(__webpack_require__(6798)); -var _ProductModuleService = _interopRequireDefault(__webpack_require__(3950)); -var _ProductService = _interopRequireDefault(__webpack_require__(5114)); -var _TokenService = _interopRequireDefault(__webpack_require__(5192)); -var _TransactionService = _interopRequireDefault(__webpack_require__(2579)); -var _UtilityService = _interopRequireDefault(__webpack_require__(6359)); -var _BundleService = _interopRequireDefault(__webpack_require__(9089)); -var _NotificationService = _interopRequireDefault(__webpack_require__(1692)); -var _BaseEntity = _interopRequireDefault(__webpack_require__(635)); -var _Country = _interopRequireDefault(__webpack_require__(7147)); -var _License = _interopRequireDefault(__webpack_require__(1938)); -var _Licensee = _interopRequireDefault(__webpack_require__(9899)); -var _LicenseTemplate = _interopRequireDefault(__webpack_require__(2476)); -var _PaymentMethod = _interopRequireDefault(__webpack_require__(3014)); -var _Product = _interopRequireDefault(__webpack_require__(3262)); -var _ProductDiscount = _interopRequireDefault(__webpack_require__(1721)); -var _ProductModule = _interopRequireDefault(__webpack_require__(9142)); -var _Token = _interopRequireDefault(__webpack_require__(584)); -var _Transaction = _interopRequireDefault(__webpack_require__(269)); -var _LicenseTransactionJoin = _interopRequireDefault(__webpack_require__(3716)); -var _Bundle = _interopRequireDefault(__webpack_require__(9633)); -var _Notification = _interopRequireDefault(__webpack_require__(5454)); -var _itemToCountry = _interopRequireDefault(__webpack_require__(6899)); -var _itemToLicense = _interopRequireDefault(__webpack_require__(5402)); -var _itemToLicensee = _interopRequireDefault(__webpack_require__(4067)); -var _itemToLicenseTemplate = _interopRequireDefault(__webpack_require__(52)); -var _itemToObject = _interopRequireDefault(__webpack_require__(670)); -var _itemToPaymentMethod = _interopRequireDefault(__webpack_require__(2430)); -var _itemToProduct = _interopRequireDefault(__webpack_require__(822)); -var _itemToProductModule = _interopRequireDefault(__webpack_require__(4398)); -var _itemToToken = _interopRequireDefault(__webpack_require__(3648)); -var _itemToTransaction = _interopRequireDefault(__webpack_require__(1717)); -var _itemToBundle = _interopRequireDefault(__webpack_require__(3849)); -var _CastsUtils = _interopRequireDefault(__webpack_require__(8769)); -var _CheckUtils = _interopRequireDefault(__webpack_require__(1305)); -var _FilterUtils = _interopRequireDefault(__webpack_require__(8833)); -var _NlicError = _interopRequireDefault(__webpack_require__(6469)); -})(); - -/******/ return __webpack_exports__; -/******/ })() -; -}); \ No newline at end of file diff --git a/dist/netlicensing-client.node.min.js b/dist/netlicensing-client.node.min.js deleted file mode 100644 index db9aacd..0000000 --- a/dist/netlicensing-client.node.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see netlicensing-client.node.min.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("NetLicensing",[],t):"object"==typeof exports?exports.NetLicensing=t():e.NetLicensing=t()}(this,(()=>(()=>{var e={28:(e,t,n)=>{var a=n(8051),i=n(9500),o=n(6276);function r(e,t){return et?1:0}e.exports=function(e,t,n,r){var s=i(e,n);return a(e,t,s,(function n(i,o){i?r(i,o):(s.index++,s.index<(s.keyedList||e).length?a(e,t,s,n):r(null,s.results))})),o.bind(s,r)},e.exports.ascending=r,e.exports.descending=function(e,t){return-1*r(e,t)}},52:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(670)),o=a(n(2476));t.default=function(e){return new o.default((0,i.default)(e))}},76:e=>{"use strict";e.exports=Function.prototype.call},79:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(635)),p=a(n(3716)),l=a(n(1938));function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}t.default=function(e){function t(e){return(0,i.default)(this,t),n=this,a=t,o=[{properties:e,casts:{number:"string",name:"string",status:"string",source:"string",grandTotal:"float",discount:"float",currency:"string",dateCreated:"date",dateClosed:"date",active:"boolean",paymentMethod:"string"}}],a=(0,s.default)(a),(0,r.default)(n,d()?Reflect.construct(a,o||[],(0,s.default)(n).constructor):a.apply(n,o));var n,a,o}return(0,c.default)(t,e),(0,o.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setStatus",value:function(e){return this.setProperty("status",e)}},{key:"getStatus",value:function(e){return this.getProperty("status",e)}},{key:"setSource",value:function(e){return this.setProperty("source",e)}},{key:"getSource",value:function(e){return this.getProperty("source",e)}},{key:"setGrandTotal",value:function(e){return this.setProperty("grandTotal",e)}},{key:"getGrandTotal",value:function(e){return this.getProperty("grandTotal",e)}},{key:"setDiscount",value:function(e){return this.setProperty("discount",e)}},{key:"getDiscount",value:function(e){return this.getProperty("discount",e)}},{key:"setCurrency",value:function(e){return this.setProperty("currency",e)}},{key:"getCurrency",value:function(e){return this.getProperty("currency",e)}},{key:"setDateCreated",value:function(e){return this.setProperty("dateCreated",e)}},{key:"getDateCreated",value:function(e){return this.getProperty("dateCreated",e)}},{key:"setDateClosed",value:function(e){return this.setProperty("dateClosed",e)}},{key:"getDateClosed",value:function(e){return this.getProperty("dateClosed",e)}},{key:"setPaymentMethod",value:function(e){return this.setProperty("paymentMethod",e)}},{key:"getPaymentMethod",value:function(e){return this.getProperty("paymentMethod",e)}},{key:"setActive",value:function(){return this.setProperty("active",!0)}},{key:"getLicenseTransactionJoins",value:function(e){return this.getProperty("licenseTransactionJoins",e)}},{key:"setLicenseTransactionJoins",value:function(e){return this.setProperty("licenseTransactionJoins",e)}},{key:"setListLicenseTransactionJoin",value:function(e){if(e){var n=this.getProperty("licenseTransactionJoins",[]),a=new p.default;e.forEach((function(e){"licenseNumber"===e.name&&a.setLicense(new l.default({number:e.value})),"transactionNumber"===e.name&&a.setTransaction(new t({number:e.value}))})),n.push(a),this.setProperty("licenseTransactionJoins",n)}}}])}(u.default)},405:e=>{e.exports=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)}},414:e=>{"use strict";e.exports=Math.round},453:(e,t,n)=>{"use strict";var a,i=n(9612),o=n(9383),r=n(1237),s=n(9290),c=n(9538),u=n(8068),p=n(9675),l=n(5345),d=n(1514),m=n(8968),f=n(6188),v=n(8002),x=n(5880),h=n(414),b=n(3093),y=Function,g=function(e){try{return y('"use strict"; return ('+e+").constructor;")()}catch(e){}},w=n(5795),E=n(655),P=function(){throw new p},k=w?function(){try{return P}catch(e){try{return w(arguments,"callee").get}catch(e){return P}}}():P,_=n(4039)(),O=n(3628),T=n(1064),N=n(8648),j=n(1002),R=n(76),A={},S="undefined"!=typeof Uint8Array&&O?O(Uint8Array):a,L={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?a:ArrayBuffer,"%ArrayIteratorPrototype%":_&&O?O([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":"undefined"==typeof Atomics?a:Atomics,"%BigInt%":"undefined"==typeof BigInt?a:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?a:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":r,"%Float16Array%":"undefined"==typeof Float16Array?a:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?a:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?a:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?a:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":A,"%Int8Array%":"undefined"==typeof Int8Array?a:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?a:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&O?O(O([][Symbol.iterator]())):a,"%JSON%":"object"==typeof JSON?JSON:a,"%Map%":"undefined"==typeof Map?a:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&_&&O?O((new Map)[Symbol.iterator]()):a,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?a:Promise,"%Proxy%":"undefined"==typeof Proxy?a:Proxy,"%RangeError%":s,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?a:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?a:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&_&&O?O((new Set)[Symbol.iterator]()):a,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&O?O(""[Symbol.iterator]()):a,"%Symbol%":_?Symbol:a,"%SyntaxError%":u,"%ThrowTypeError%":k,"%TypedArray%":S,"%TypeError%":p,"%Uint8Array%":"undefined"==typeof Uint8Array?a:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?a:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?a:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?a:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?a:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?a:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?a:WeakSet,"%Function.prototype.call%":R,"%Function.prototype.apply%":j,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":T,"%Math.abs%":d,"%Math.floor%":m,"%Math.max%":f,"%Math.min%":v,"%Math.pow%":x,"%Math.round%":h,"%Math.sign%":b,"%Reflect.getPrototypeOf%":N};if(O)try{null.error}catch(e){var C=O(O(e));L["%Error.prototype%"]=C}var I=function e(t){var n;if("%AsyncFunction%"===t)n=g("async function () {}");else if("%GeneratorFunction%"===t)n=g("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=g("async function* () {}");else if("%AsyncGenerator%"===t){var a=e("%AsyncGeneratorFunction%");a&&(n=a.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&O&&(n=O(i.prototype))}return L[t]=n,n},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},U=n(6743),D=n(9957),B=U.call(R,Array.prototype.concat),F=U.call(j,Array.prototype.splice),z=U.call(R,String.prototype.replace),q=U.call(R,String.prototype.slice),H=U.call(R,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,G=function(e,t){var n,a=e;if(D(M,a)&&(a="%"+(n=M[a])[0]+"%"),D(L,a)){var i=L[a];if(i===A&&(i=I(a)),void 0===i&&!t)throw new p("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:a,value:i}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new p("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new p('"allowMissing" argument must be a boolean');if(null===H(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=q(e,0,1),n=q(e,-1);if("%"===t&&"%"!==n)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var a=[];return z(e,V,(function(e,t,n,i){a[a.length]=n?z(i,K,"$1"):t||e})),a}(e),a=n.length>0?n[0]:"",i=G("%"+a+"%",t),o=i.name,r=i.value,s=!1,c=i.alias;c&&(a=c[0],F(n,B([0,1],c)));for(var l=1,d=!0;l=n.length){var x=w(r,m);r=(d=!!x)&&"get"in x&&!("originalValue"in x.get)?x.get:r[m]}else d=D(r,m),r=r[m];d&&!s&&(L[o]=r)}}return r}},584:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(635));function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}t.default=function(e){function t(e){return(0,i.default)(this,t),n=this,a=t,o=[{properties:e,casts:{number:"string",active:"boolean",expirationTime:"date",vendorNumber:"string",tokenType:"string",licenseeNumber:"string",successURL:"string",successURLTitle:"string",cancelURL:"string",cancelURLTitle:"string",shopURL:"string"}}],a=(0,s.default)(a),(0,r.default)(n,p()?Reflect.construct(a,o||[],(0,s.default)(n).constructor):a.apply(n,o));var n,a,o}return(0,c.default)(t,e),(0,o.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setExpirationTime",value:function(e){return this.setProperty("expirationTime",e)}},{key:"getExpirationTime",value:function(e){return this.getProperty("expirationTime",e)}},{key:"setVendorNumber",value:function(e){return this.setProperty("vendorNumber",e)}},{key:"getVendorNumber",value:function(e){return this.getProperty("vendorNumber",e)}},{key:"setTokenType",value:function(e){return this.setProperty("tokenType",e)}},{key:"getTokenType",value:function(e){return this.getProperty("tokenType",e)}},{key:"setLicenseeNumber",value:function(e){return this.setProperty("licenseeNumber",e)}},{key:"getLicenseeNumber",value:function(e){return this.getProperty("licenseeNumber",e)}},{key:"setSuccessURL",value:function(e){return this.setProperty("successURL",e)}},{key:"getSuccessURL",value:function(e){return this.getProperty("successURL",e)}},{key:"setSuccessURLTitle",value:function(e){return this.setProperty("successURLTitle",e)}},{key:"getSuccessURLTitle",value:function(e){return this.getProperty("successURLTitle",e)}},{key:"setCancelURL",value:function(e){return this.setProperty("cancelURL",e)}},{key:"getCancelURL",value:function(e){return this.getProperty("cancelURL",e)}},{key:"setCancelURLTitle",value:function(e){return this.setProperty("cancelURLTitle",e)}},{key:"getCancelURLTitle",value:function(e){return this.getProperty("cancelURLTitle",e)}},{key:"getShopURL",value:function(e){return this.getProperty("shopURL",e)}},{key:"setRole",value:function(e){return this.setApiKeyRole(e)}},{key:"getRole",value:function(e){return this.getApiKeyRole(e)}},{key:"setApiKeyRole",value:function(e){return this.setProperty("apiKeyRole",e)}},{key:"getApiKeyRole",value:function(e){return this.getProperty("apiKeyRole",e)}}])}(u.default)},635:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(3693)),o=a(n(3738)),r=a(n(7383)),s=a(n(4579)),c=a(n(1305)),u=a(n(8769));function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t{"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},662:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(3693)),o=a(n(7383)),r=a(n(4579));function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){var t={},a=e.property,i=e.list;return a&&Array.isArray(a)&&a.forEach((function(e){var n=e.name,a=e.value;n&&(t[n]=a)})),i&&Array.isArray(i)&&i.forEach((function(e){var a=e.name;a&&(t[a]=t[a]||[],t[a].push(n(e)))})),t};t.default=n},691:e=>{e.exports=function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}},e.exports.__esModule=!0,e.exports.default=e.exports},736:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,o,r=null;function s(...e){if(!s.enabled)return;const a=s,i=Number(new Date),o=i-(n||i);a.diff=o,a.prev=n,a.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let r=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";r++;const o=t.formatters[i];if("function"==typeof o){const t=e[r];n=o.call(a,t),e.splice(r,1),r--}return n})),t.formatArgs.call(a,e);(a.log||t.log).apply(a,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=a,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==r?r:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function a(e,n){const a=t(this.namespace+(void 0===n?":":n)+e);return a.log=this.log,a}function i(e,t){let n=0,a=0,i=-1,o=0;for(;n"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(i(e,n))return!1;for(const n of t.names)if(i(e,n))return!0;return!1},t.humanize=n(6585),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{var a=n(801),i=n(9023),o=n(6928),r=n(8611),s=n(5692),c=n(7016).parse,u=n(9896),p=n(2203).Stream,l=n(6049),d=n(1873),m=n(9605),f=n(1362);function v(e){if(!(this instanceof v))return new v(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],a.call(this),e=e||{})this[t]=e[t]}e.exports=v,i.inherits(v,a),v.LINE_BREAK="\r\n",v.DEFAULT_CONTENT_TYPE="application/octet-stream",v.prototype.append=function(e,t,n){"string"==typeof(n=n||{})&&(n={filename:n});var i=a.prototype.append.bind(this);if("number"==typeof t&&(t=""+t),Array.isArray(t))this._error(new Error("Arrays are not supported."));else{var o=this._multiPartHeader(e,t,n),r=this._multiPartFooter();i(o),i(t),i(r),this._trackLength(o,t,n)}},v.prototype._trackLength=function(e,t,n){var a=0;null!=n.knownLength?a+=+n.knownLength:Buffer.isBuffer(t)?a=t.length:"string"==typeof t&&(a=Buffer.byteLength(t)),this._valueLength+=a,this._overheadLength+=Buffer.byteLength(e)+v.LINE_BREAK.length,t&&(t.path||t.readable&&Object.prototype.hasOwnProperty.call(t,"httpVersion")||t instanceof p)&&(n.knownLength||this._valuesToMeasure.push(t))},v.prototype._lengthRetriever=function(e,t){Object.prototype.hasOwnProperty.call(e,"fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):u.stat(e.path,(function(n,a){var i;n?t(n):(i=a.size-(e.start?e.start:0),t(null,i))})):Object.prototype.hasOwnProperty.call(e,"httpVersion")?t(null,+e.headers["content-length"]):Object.prototype.hasOwnProperty.call(e,"httpModule")?(e.on("response",(function(n){e.pause(),t(null,+n.headers["content-length"])})),e.resume()):t("Unknown stream")},v.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var a,i=this._getContentDisposition(t,n),o=this._getContentType(t,n),r="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(o||[])};for(var c in"object"==typeof n.header&&f(s,n.header),s)if(Object.prototype.hasOwnProperty.call(s,c)){if(null==(a=s[c]))continue;Array.isArray(a)||(a=[a]),a.length&&(r+=c+": "+a.join("; ")+v.LINE_BREAK)}return"--"+this.getBoundary()+v.LINE_BREAK+r+v.LINE_BREAK},v.prototype._getContentDisposition=function(e,t){var n,a;return"string"==typeof t.filepath?n=o.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=o.basename(t.filename||e.name||e.path):e.readable&&Object.prototype.hasOwnProperty.call(e,"httpVersion")&&(n=o.basename(e.client._httpMessage.path||"")),n&&(a='filename="'+n+'"'),a},v.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=l.lookup(e.name)),!n&&e.path&&(n=l.lookup(e.path)),!n&&e.readable&&Object.prototype.hasOwnProperty.call(e,"httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=l.lookup(t.filepath||t.filename)),n||"object"!=typeof e||(n=v.DEFAULT_CONTENT_TYPE),n},v.prototype._multiPartFooter=function(){return function(e){var t=v.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},v.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+v.LINE_BREAK},v.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t.toLowerCase()]=e[t]);return n},v.prototype.setBoundary=function(e){this._boundary=e},v.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},v.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,a=this._streams.length;n{var a=n(9023),i=n(2203).Stream,o=n(8069);function r(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}e.exports=r,a.inherits(r,i),r.create=function(e){var t=new this;for(var n in e=e||{})t[n]=e[n];return t},r.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},r.prototype.append=function(e){if(r.isStreamLike(e)){if(!(e instanceof o)){var t=o.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},r.prototype.pipe=function(e,t){return i.prototype.pipe.call(this,e,t),this.resume(),e},r.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},r.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){r.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},r.prototype._pipeNext=function(e){if(this._currentStream=e,r.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},r.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))},r.prototype.write=function(e){this.emit("data",e)},r.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},r.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},r.prototype.end=function(){this._reset(),this.emit("end")},r.prototype.destroy=function(){this._reset(),this.emit("close")},r.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},r.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},r.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){t.dataSize&&(e.dataSize+=t.dataSize)})),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},r.prototype._emitError=function(e){this._reset(),this.emit("error",e)}},822:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(670)),o=a(n(3262));t.default=function(e){var t=(0,i.default)(e),n=t.discount;delete t.discount;var a=new o.default(t);return a.setProductDiscounts(n),a}},857:e=>{"use strict";e.exports=require("os")},1002:e=>{"use strict";e.exports=Function.prototype.apply},1064:(e,t,n)=>{"use strict";var a=n(9612);e.exports=a.getPrototypeOf||null},1156:e=>{e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,o,r,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(u)throw i}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},1237:e=>{"use strict";e.exports=EvalError},1305:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={isValid:function(e){var t=void 0!==e&&"function"!=typeof e;return"number"==typeof e&&(t=Number.isFinite(e)&&!Number.isNaN(e)),t},paramNotNull:function(e,t){if(!this.isValid(e))throw new TypeError("Parameter ".concat(t," has bad value ").concat(e));if(null===e)throw new TypeError("Parameter ".concat(t," cannot be null"))},paramNotEmpty:function(e,t){if(!this.isValid(e))throw new TypeError("Parameter ".concat(t," has bad value ").concat(e));if(!e)throw new TypeError("Parameter ".concat(t," cannot be null or empty string"))}}},1333:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var a in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},1362:e=>{e.exports=function(e,t){return Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]})),e}},1514:e=>{"use strict";e.exports=Math.abs},1692:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(4756)),o=a(n(5715)),r=a(n(9293)),s=a(n(3401)),c=a(n(6232)),u=a(n(1305)),p=a(n(8833)),l=a(n(5270)),d=a(n(4034));t.default={create:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,u,p,d;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,s.default.post(e,c.default.Notification.ENDPOINT_PATH,t.asPropertiesMap());case 2:return a=n.sent,r=a.data.items.item,u=r.filter((function(e){return"Notification"===e.type})),p=(0,o.default)(u,1),d=p[0],n.abrupt("return",(0,l.default)(d));case 6:case"end":return n.stop()}}),n)})))()},get:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,p,d,m;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u.default.paramNotEmpty(t,c.default.NUMBER),n.next=3,s.default.get(e,"".concat(c.default.Notification.ENDPOINT_PATH,"/").concat(t));case 3:return a=n.sent,r=a.data.items.item,p=r.filter((function(e){return"Notification"===e.type})),d=(0,o.default)(p,1),m=d[0],n.abrupt("return",(0,l.default)(m));case 7:case"end":return n.stop()}}),n)})))()},list:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,o,r;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a={},!t){n.next=5;break}if(u.default.isValid(t)){n.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:a[c.default.FILTER]="string"==typeof t?t:p.default.encode(t);case 5:return n.next=7,s.default.get(e,c.default.Notification.ENDPOINT_PATH,a);case 7:return o=n.sent,r=o.data,n.abrupt("return",(0,d.default)(r.items.item.filter((function(e){return"Notification"===e.type})).map((function(e){return(0,l.default)(e)})),r.items.pagenumber,r.items.itemsnumber,r.items.totalpages,r.items.totalitems));case 10:case"end":return n.stop()}}),n)})))()},update:function(e,t,n){return(0,r.default)(i.default.mark((function a(){var r,p,d,m,f;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return u.default.paramNotEmpty(t,c.default.NUMBER),a.next=3,s.default.post(e,"".concat(c.default.Notification.ENDPOINT_PATH,"/").concat(t),n.asPropertiesMap());case 3:return r=a.sent,p=r.data.items.item,d=p.filter((function(e){return"Notification"===e.type})),m=(0,o.default)(d,1),f=m[0],a.abrupt("return",(0,l.default)(f));case 7:case"end":return a.stop()}}),a)})))()},delete:function(e,t){return u.default.paramNotEmpty(t,c.default.NUMBER),s.default.delete(e,"".concat(c.default.Notification.ENDPOINT_PATH,"/").concat(t))}}},1717:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(670)),o=a(n(269)),r=a(n(1938)),s=a(n(3716)),c=a(n(6232));t.default=function(e){var t=(0,i.default)(e),n=t.licenseTransactionJoin;delete t.licenseTransactionJoin;var a=new o.default(t);if(n){var u=[];n.forEach((function(e){var t=new s.default;t.setLicense(new r.default({number:e[c.default.License.LICENSE_NUMBER]})),t.setTransaction(new o.default({number:e[c.default.Transaction.TRANSACTION_NUMBER]})),u.push(t)})),a.setLicenseTransactionJoins(u)}return a}},1721:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(635));function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}t.default=function(e){function t(e){return(0,i.default)(this,t),n=this,a=t,o=[{properties:e,casts:{totalPrice:"float",currency:"string",amountFix:"float",amountPercent:"int"}}],a=(0,s.default)(a),(0,r.default)(n,p()?Reflect.construct(a,o||[],(0,s.default)(n).constructor):a.apply(n,o));var n,a,o}return(0,c.default)(t,e),(0,o.default)(t,[{key:"setTotalPrice",value:function(e){return this.setProperty("totalPrice",e)}},{key:"getTotalPrice",value:function(e){return this.getProperty("totalPrice",e)}},{key:"setCurrency",value:function(e){return this.setProperty("currency",e)}},{key:"getCurrency",value:function(e){return this.getProperty("currency",e)}},{key:"setAmountFix",value:function(e){return this.setProperty("amountFix",e).removeProperty("amountPercent")}},{key:"getAmountFix",value:function(e){return this.getProperty("amountFix",e)}},{key:"setAmountPercent",value:function(e){return this.setProperty("amountPercent",e).removeProperty("amountFix")}},{key:"getAmountPercent",value:function(e){return this.getProperty("amountPercent",e)}},{key:"toString",value:function(){var e=this.getTotalPrice(),t=this.getCurrency(),n=0;return this.getAmountFix(null)&&(n=this.getAmountFix()),this.getAmountPercent(null)&&(n="".concat(this.getAmountPercent(),"%")),"".concat(e,";").concat(t,";").concat(n)}}])}(u.default)},1813:e=>{"use strict";e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hl7cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/step":{"source":"iana"},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')},1837:(e,t,n)=>{var a=n(3072),i=n(5636),o=n(691),r=n(9646);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return r(e,arguments,a(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},1873:(e,t,n)=>{e.exports={parallel:n(8798),serial:n(2081),serialOrdered:n(28)}},1938:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(635));function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}t.default=function(e){function t(e){return(0,i.default)(this,t),n=this,a=t,o=[{properties:e,casts:{number:"string",active:"boolean",name:"string",price:"float",hidden:"boolean",parentfeature:"string",timeVolume:"int",startDate:"date",inUse:"boolean"}}],a=(0,s.default)(a),(0,r.default)(n,p()?Reflect.construct(a,o||[],(0,s.default)(n).constructor):a.apply(n,o));var n,a,o}return(0,c.default)(t,e),(0,o.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setHidden",value:function(e){return this.setProperty("hidden",e)}},{key:"getHidden",value:function(e){return this.getProperty("hidden",e)}},{key:"setParentfeature",value:function(e){return this.setProperty("parentfeature",e)}},{key:"getParentfeature",value:function(e){return this.getProperty("parentfeature",e)}},{key:"setTimeVolume",value:function(e){return this.setProperty("timeVolume",e)}},{key:"getTimeVolume",value:function(e){return this.getProperty("timeVolume",e)}},{key:"setStartDate",value:function(e){return this.setProperty("startDate",e)}},{key:"getStartDate",value:function(e){return this.getProperty("startDate",e)}},{key:"getInUse",value:function(e){return this.getProperty("inUse",e)}},{key:"getPrice",value:function(e){return this.getProperty("price",e)}},{key:"getCurrency",value:function(e){return this.getProperty("currency",e)}}])}(u.default)},2018:e=>{"use strict";e.exports=require("tty")},2081:(e,t,n)=>{var a=n(28);e.exports=function(e,t,n){return a(e,t,null,n)}},2203:e=>{"use strict";e.exports=require("stream")},2302:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(3738)),o=a(n(3693)),r=a(n(7383)),s=a(n(4579)),c=a(n(6232)),u=a(n(1305));function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t{var a=n(405);e.exports=function(e){var t=!1;return a((function(){t=!0})),function(n,i){t?e(n,i):a((function(){e(n,i)}))}}},2395:(e,t,n)=>{var a=n(9552);function i(){return e.exports=i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=a(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},e.exports.__esModule=!0,e.exports.default=e.exports,i.apply(null,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},2430:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(670)),o=a(n(3014));t.default=function(e){return new o.default((0,i.default)(e))}},2475:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},2476:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(635));function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}t.default=function(e){function t(e){return(0,i.default)(this,t),n=this,a=t,o=[{properties:e,casts:{number:"string",active:"boolean",name:"string",licenseType:"string",price:"double",currency:"string",automatic:"boolean",hidden:"boolean",hideLicenses:"boolean",gracePeriod:"boolean",timeVolume:"int",timeVolumePeriod:"string",maxSessions:"int",quantity:"int",inUse:"boolean"}}],a=(0,s.default)(a),(0,r.default)(n,p()?Reflect.construct(a,o||[],(0,s.default)(n).constructor):a.apply(n,o));var n,a,o}return(0,c.default)(t,e),(0,o.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setLicenseType",value:function(e){return this.setProperty("licenseType",e)}},{key:"getLicenseType",value:function(e){return this.getProperty("licenseType",e)}},{key:"setPrice",value:function(e){return this.setProperty("price",e)}},{key:"getPrice",value:function(e){return this.getProperty("price",e)}},{key:"setCurrency",value:function(e){return this.setProperty("currency",e)}},{key:"getCurrency",value:function(e){return this.getProperty("currency",e)}},{key:"setAutomatic",value:function(e){return this.setProperty("automatic",e)}},{key:"getAutomatic",value:function(e){return this.getProperty("automatic",e)}},{key:"setHidden",value:function(e){return this.setProperty("hidden",e)}},{key:"getHidden",value:function(e){return this.getProperty("hidden",e)}},{key:"setHideLicenses",value:function(e){return this.setProperty("hideLicenses",e)}},{key:"getHideLicenses",value:function(e){return this.getProperty("hideLicenses",e)}},{key:"setTimeVolume",value:function(e){return this.setProperty("timeVolume",e)}},{key:"getTimeVolume",value:function(e){return this.getProperty("timeVolume",e)}},{key:"setTimeVolumePeriod",value:function(e){return this.setProperty("timeVolumePeriod",e)}},{key:"getTimeVolumePeriod",value:function(e){return this.getProperty("timeVolumePeriod",e)}},{key:"setMaxSessions",value:function(e){return this.setProperty("maxSessions",e)}},{key:"getMaxSessions",value:function(e){return this.getProperty("maxSessions",e)}},{key:"setQuantity",value:function(e){return this.setProperty("quantity",e)}},{key:"getQuantity",value:function(e){return this.getProperty("quantity",e)}},{key:"getInUse",value:function(e){return this.getProperty("inUse",e)}}])}(u.default)},2579:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(4756)),o=a(n(5715)),r=a(n(9293)),s=a(n(6232)),c=a(n(3401)),u=a(n(1305)),p=a(n(8833)),l=a(n(1717)),d=a(n(4034));t.default={create:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,u,p,d;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,c.default.post(e,s.default.Transaction.ENDPOINT_PATH,t.asPropertiesMap());case 2:return a=n.sent,r=a.data.items.item,u=r.filter((function(e){return"Transaction"===e.type})),p=(0,o.default)(u,1),d=p[0],n.abrupt("return",(0,l.default)(d));case 6:case"end":return n.stop()}}),n)})))()},get:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,p,d,m;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u.default.paramNotEmpty(t,s.default.NUMBER),n.next=3,c.default.get(e,"".concat(s.default.Transaction.ENDPOINT_PATH,"/").concat(t));case 3:return a=n.sent,r=a.data.items.item,p=r.filter((function(e){return"Transaction"===e.type})),d=(0,o.default)(p,1),m=d[0],n.abrupt("return",(0,l.default)(m));case 7:case"end":return n.stop()}}),n)})))()},list:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,o,r;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a={},!t){n.next=5;break}if(u.default.isValid(t)){n.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:a[s.default.FILTER]="string"==typeof t?t:p.default.encode(t);case 5:return n.next=7,c.default.get(e,s.default.Transaction.ENDPOINT_PATH,a);case 7:return o=n.sent,r=o.data,n.abrupt("return",(0,d.default)(r.items.item.filter((function(e){return"Transaction"===e.type})).map((function(e){return(0,l.default)(e)})),r.items.pagenumber,r.items.itemsnumber,r.items.totalpages,r.items.totalitems));case 10:case"end":return n.stop()}}),n)})))()},update:function(e,t,n){return(0,r.default)(i.default.mark((function a(){var r,p,d,m,f;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return u.default.paramNotEmpty(t,s.default.NUMBER),a.next=3,c.default.post(e,"".concat(s.default.Transaction.ENDPOINT_PATH,"/").concat(t),n.asPropertiesMap());case 3:return r=a.sent,p=r.data.items.item,d=p.filter((function(e){return"Transaction"===e.type})),m=(0,o.default)(d,1),f=m[0],a.abrupt("return",(0,l.default)(f));case 7:case"end":return a.stop()}}),a)})))()}}},2613:e=>{"use strict";e.exports=require("assert")},2987:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},3014:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(635));function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}t.default=function(e){function t(e){return(0,i.default)(this,t),n=this,a=t,o=[{properties:e,casts:{number:"string",active:"boolean","paypal.subject":"string"}}],a=(0,s.default)(a),(0,r.default)(n,p()?Reflect.construct(a,o||[],(0,s.default)(n).constructor):a.apply(n,o));var n,a,o}return(0,c.default)(t,e),(0,o.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setPaypalSubject",value:function(e){return this.setProperty("paypal.subject",e)}},{key:"getPaypalSubject",value:function(e){return this.getProperty("paypal.subject",e)}}])}(u.default)},3072:e=>{function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3093:(e,t,n)=>{"use strict";var a=n(4459);e.exports=function(e){return a(e)||0===e?e:e<0?-1:1}},3106:e=>{"use strict";e.exports=require("zlib")},3126:(e,t,n)=>{"use strict";var a=n(6743),i=n(9675),o=n(76),r=n(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return r(a,o,e)}},3140:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(4756)),o=a(n(5715)),r=a(n(9293)),s=a(n(1305)),c=a(n(6232)),u=a(n(3401)),p=a(n(8833)),l=a(n(52)),d=a(n(4034));t.default={create:function(e,t,n){return(0,r.default)(i.default.mark((function a(){var r,p,d,m,f;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s.default.paramNotEmpty(t,c.default.ProductModule.PRODUCT_MODULE_NUMBER),n.setProperty(c.default.ProductModule.PRODUCT_MODULE_NUMBER,t),a.next=4,u.default.post(e,c.default.LicenseTemplate.ENDPOINT_PATH,n.asPropertiesMap());case 4:return r=a.sent,p=r.data.items.item,d=p.filter((function(e){return"LicenseTemplate"===e.type})),m=(0,o.default)(d,1),f=m[0],a.abrupt("return",(0,l.default)(f));case 8:case"end":return a.stop()}}),a)})))()},get:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,p,d,m;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s.default.paramNotEmpty(t,c.default.NUMBER),n.next=3,u.default.get(e,"".concat(c.default.LicenseTemplate.ENDPOINT_PATH,"/").concat(t));case 3:return a=n.sent,r=a.data.items.item,p=r.filter((function(e){return"LicenseTemplate"===e.type})),d=(0,o.default)(p,1),m=d[0],n.abrupt("return",(0,l.default)(m));case 7:case"end":return n.stop()}}),n)})))()},list:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,o,r;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a={},!t){n.next=5;break}if(s.default.isValid(t)){n.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:a[c.default.FILTER]="string"==typeof t?t:p.default.encode(t);case 5:return n.next=7,u.default.get(e,c.default.LicenseTemplate.ENDPOINT_PATH,a);case 7:return o=n.sent,r=o.data,n.abrupt("return",(0,d.default)(r.items.item.filter((function(e){return"LicenseTemplate"===e.type})).map((function(e){return(0,l.default)(e)})),r.items.pagenumber,r.items.itemsnumber,r.items.totalpages,r.items.totalitems));case 10:case"end":return n.stop()}}),n)})))()},update:function(e,t,n){return(0,r.default)(i.default.mark((function a(){var r,p,d,m,f,v;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s.default.paramNotEmpty(t,c.default.NUMBER),r="".concat(c.default.LicenseTemplate.ENDPOINT_PATH,"/").concat(t),a.next=4,u.default.post(e,r,n.asPropertiesMap());case 4:return p=a.sent,d=p.data.items.item,m=d.filter((function(e){return"LicenseTemplate"===e.type})),f=(0,o.default)(m,1),v=f[0],a.abrupt("return",(0,l.default)(v));case 8:case"end":return a.stop()}}),a)})))()},delete:function(e,t,n){s.default.paramNotEmpty(t,c.default.NUMBER);var a={forceCascade:Boolean(n)};return u.default.delete(e,"".concat(c.default.LicenseTemplate.ENDPOINT_PATH,"/").concat(t),a)}}},3144:(e,t,n)=>{"use strict";var a=n(6743),i=n(1002),o=n(76),r=n(7119);e.exports=r||a.call(o,i)},3164:(e,t,n)=>{var a,i,o,r=n(7016),s=r.URL,c=n(8611),u=n(5692),p=n(2203).Writable,l=n(2613),d=n(7507);a="undefined"!=typeof process,i="undefined"!=typeof window&&"undefined"!=typeof document,o=L(Error.captureStackTrace),a||!i&&o||console.warn("The follow-redirects package should be excluded from browser builds.");var m=!1;try{l(new s(""))}catch(e){m="ERR_INVALID_URL"===e.code}var f=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],v=["abort","aborted","connect","error","socket","timeout"],x=Object.create(null);v.forEach((function(e){x[e]=function(t,n,a){this._redirectable.emit(e,t,n,a)}}));var h=R("ERR_INVALID_URL","Invalid URL",TypeError),b=R("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),y=R("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",b),g=R("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),w=R("ERR_STREAM_WRITE_AFTER_END","write after end"),E=p.prototype.destroy||_;function P(e,t){p.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof b?e:new b({cause:e}))}},this._performRequest()}function k(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(a){var i=a+":",o=n[i]=e[a],r=t[a]=Object.create(o);Object.defineProperties(r,{request:{value:function(e,a,o){var r;return r=e,s&&r instanceof s?e=N(e):S(e)?e=N(O(e)):(o=a,a=T(e),e={protocol:i}),L(a)&&(o=a,a=null),(a=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,a)).nativeProtocols=n,S(a.host)||S(a.hostname)||(a.hostname="::1"),l.equal(a.protocol,i,"protocol mismatch"),d("options",a),new P(a,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var a=r.request(e,t,n);return a.end(),a},configurable:!0,enumerable:!0,writable:!0}})})),t}function _(){}function O(e){var t;if(m)t=new s(e);else if(!S((t=T(r.parse(e))).protocol))throw new h({input:e});return t}function T(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new h({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new h({input:e.href||e});return e}function N(e,t){var n=t||{};for(var a of f)n[a]=e[a];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function j(e,t){var n;for(var a in t)e.test(a)&&(n=t[a],delete t[a]);return null==n?void 0:String(n).trim()}function R(e,t,n){function a(n){L(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return a.prototype=new(n||Error),Object.defineProperties(a.prototype,{constructor:{value:a,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),a}function A(e,t){for(var n of v)e.removeListener(n,x[n]);e.on("error",_),e.destroy(t)}function S(e){return"string"==typeof e||e instanceof String}function L(e){return"function"==typeof e}P.prototype=Object.create(p.prototype),P.prototype.abort=function(){A(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},P.prototype.destroy=function(e){return A(this._currentRequest,e),E.call(this,e),this},P.prototype.write=function(e,t,n){if(this._ending)throw new w;if(!S(e)&&("object"!=typeof(a=e)||!("length"in a)))throw new TypeError("data should be a string, Buffer or Uint8Array");var a;L(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new g),this.abort()):n&&n()},P.prototype.end=function(e,t,n){if(L(e)?(n=e,e=t=null):L(t)&&(n=t,t=null),e){var a=this,i=this._currentRequest;this.write(e,t,(function(){a._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},P.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},P.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},P.prototype.setTimeout=function(e,t){var n=this;function a(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),e),a(t)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",a),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){P.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(P.prototype,e,{get:function(){return this._currentRequest[e]}})})),P.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},P.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var a=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(a._redirectable=this,v))a.on(i,x[i]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,c=this._requestBodyBuffers;!function e(t){if(a===s._currentRequest)if(t)s.emit("error",t);else if(o=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(A(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new y;var i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],j(/^content-/i,this._options.headers));var c,u,p=j(/^host$/i,this._options.headers),f=O(this._currentUrl),v=p||f.host,x=/^\w+:/.test(a)?this._currentUrl:r.format(Object.assign(f,{host:v})),h=(c=a,u=x,m?new s(c,u):O(r.resolve(u,c)));if(d("redirecting to",h.href),this._isRedirect=!0,N(h,this._options),(h.protocol!==f.protocol&&"https:"!==h.protocol||h.host!==v&&!function(e,t){l(S(e)&&S(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(h.host,v))&&j(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),L(i)){var b={headers:e.headers,statusCode:t},g={url:x,method:o,headers:n};i(this._options,b,g),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=k({http:c,https:u}),e.exports.wrap=k},3262:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(2395)),u=a(n(9511)),p=a(n(635)),l=a(n(1721));function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}var m=new WeakMap,f=new WeakMap;t.default=function(e){function t(e){var n,a,o,c;return(0,i.default)(this,t),a=this,o=t,c=[{properties:e,casts:{number:"string",active:"boolean",name:"string",version:"string",description:"string",licensingInfo:"string",licenseeAutoCreate:"boolean",licenseeSecretMode:"string",inUse:"boolean"}}],o=(0,s.default)(o),n=(0,r.default)(a,d()?Reflect.construct(o,c||[],(0,s.default)(a).constructor):o.apply(a,c)),m.set(n,[]),f.set(n,!1),n}return(0,u.default)(t,e),(0,o.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setVersion",value:function(e){return this.setProperty("version",e)}},{key:"getVersion",value:function(e){return this.getProperty("version",e)}},{key:"setLicenseeAutoCreate",value:function(e){return this.setProperty("licenseeAutoCreate",e)}},{key:"getLicenseeAutoCreate",value:function(e){return this.getProperty("licenseeAutoCreate",e)}},{key:"setLicenseeSecretMode",value:function(e){return this.setProperty("licenseeSecretMode",e)}},{key:"getLicenseeSecretMode",value:function(e){return this.getProperty("licenseeSecretMode",e)}},{key:"setDescription",value:function(e){return this.setProperty("description",e)}},{key:"getDescription",value:function(e){return this.getProperty("description",e)}},{key:"setLicensingInfo",value:function(e){return this.setProperty("licensingInfo",e)}},{key:"getLicensingInfo",value:function(e){return this.getProperty("licensingInfo",e)}},{key:"getInUse",value:function(e){return this.getProperty("inUse",e)}},{key:"addDiscount",value:function(e){var t=m.get(this),n=e;return"string"==typeof n||n instanceof l.default||(n=new l.default(n)),t.push(n),m.set(this,t),f.set(this,!0),this}},{key:"setProductDiscounts",value:function(e){var t=this;return m.set(this,[]),f.set(this,!0),e?Array.isArray(e)?(e.forEach((function(e){t.addDiscount(e)})),this):(this.addDiscount(e),this):this}},{key:"getProductDiscounts",value:function(){return Object.assign([],m.get(this))}},{key:"asPropertiesMap",value:function(){var e,n,a,i,o,r=(e=t,n="asPropertiesMap",a=this,i=3,o=(0,c.default)((0,s.default)(1&i?e.prototype:e),n,a),2&i&&"function"==typeof o?function(e){return o.apply(a,e)}:o)([]);return m.get(this).length&&(r.discount=m.get(this).map((function(e){return e.toString()}))),!r.discount&&f.get(this)&&(r.discount=""),r}}])}(p.default)},3401:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(3738)),o=a(n(5715)),r=(a(n(5407)),a(n(7383))),s=a(n(4579)),c=a(n(9329)),u=a(n(7131)),p=a(n(6232)),l=a(n(6469)),d=a(n(8330)),m={},f=null;t.default=function(){function e(){(0,r.default)(this,e)}return(0,s.default)(e,null,[{key:"getAxiosInstance",value:function(){return f||c.default}},{key:"setAxiosInstance",value:function(e){f=e}},{key:"getLastHttpRequestInfo",value:function(){return m}},{key:"get",value:function(t,n,a){return e.request(t,"get",n,a)}},{key:"post",value:function(t,n,a){return e.request(t,"post",n,a)}},{key:"delete",value:function(t,n,a){return e.request(t,"delete",n,a)}},{key:"request",value:function(t,n,a,i){var r=String(a),s=i||{};if(!r)throw new TypeError("Url template must be specified");if(["get","post","delete"].indexOf(n.toLowerCase())<0)throw new Error("Invalid request type:".concat(n,", allowed requests types: GET, POST, DELETE."));if(!t.getBaseUrl(null))throw new Error("Base url must be specified");var c={url:encodeURI("".concat(t.getBaseUrl(),"/").concat(r)),method:n.toLowerCase(),responseType:"json",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"},transformRequest:[function(t,n){return"application/x-www-form-urlencoded"===n["Content-Type"]?e.toQueryString(t):(n["NetLicensing-Origin"]||(n["NetLicensing-Origin"]="NetLicensing/Javascript ".concat(d.default.version)),t)}]};switch("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(c.headers["User-agent"]="NetLicensing/Javascript ".concat(d.default.version,"/node&").concat(process.version)),["put","post","patch"].indexOf(c.method)>=0?("post"===c.method&&(c.headers["Content-Type"]="application/x-www-form-urlencoded"),c.data=s):c.params=s,t.getSecurityMode()){case p.default.BASIC_AUTHENTICATION:if(!t.getUsername())throw new Error('Missing parameter "username"');if(!t.getPassword())throw new Error('Missing parameter "password"');c.auth={username:t.getUsername(),password:t.getPassword()};break;case p.default.APIKEY_IDENTIFICATION:if(!t.getApiKey())throw new Error('Missing parameter "apiKey"');c.headers.Authorization="Basic ".concat((0,u.default)("apiKey:".concat(t.getApiKey())));break;case p.default.ANONYMOUS_IDENTIFICATION:break;default:throw new Error("Unknown security mode")}return e.getAxiosInstance()(c).then((function(t){t.infos=e.getInfo(t,[]);var n=t.infos.filter((function(e){return"ERROR"===e.type}));if(n.length){var a=new Error(n[0].value);throw a.config=t.config,a.request=t.request,a.response=t,a}return m=t,t})).catch((function(t){if(t.response){m=t.response;var n=new l.default(t);if(n.config=t.config,n.code=t.code,n.request=t.request,n.response=t.response,t.response.data){n.infos=e.getInfo(t.response,[]);var a=n.infos.filter((function(e){return"ERROR"===e.type})),i=(0,o.default)(a,1)[0],r=void 0===i?{}:i;n.message=r.value||"Unknown"}throw n}throw t}))}},{key:"getInfo",value:function(e,t){try{return e.data.infos.info||t}catch(e){return t}}},{key:"toQueryString",value:function(t,n){var a=[],o=Object.prototype.hasOwnProperty;return Object.keys(t).forEach((function(r){if(o.call(t,r)){var s=n?"".concat(n,"[").concat(r,"]"):r,c=t[r];c=c instanceof Date?c.toISOString():c,a.push(null!==c&&"object"===(0,i.default)(c)?e.toQueryString(c,s):"".concat(encodeURIComponent(s),"=").concat(encodeURIComponent(c)))}})),a.join("&").replace(/%5B[0-9]+%5D=/g,"=")}}])}()},3628:(e,t,n)=>{"use strict";var a=n(8648),i=n(1064),o=n(7176);e.exports=a?function(e){return a(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return i(e)}:o?function(e){return o(e)}:null},3648:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(670)),o=a(n(584));t.default=function(e){return new o.default((0,i.default)(e))}},3693:(e,t,n)=>{var a=n(7736);e.exports=function(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},3716:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579));t.default=function(){return(0,o.default)((function e(t,n){(0,i.default)(this,e),this.transaction=t,this.license=n}),[{key:"setTransaction",value:function(e){return this.transaction=e,this}},{key:"getTransaction",value:function(e){return this.transaction||e}},{key:"setLicense",value:function(e){return this.license=e,this}},{key:"getLicense",value:function(e){return this.license||e}}])}()},3738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3849:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(670)),o=a(n(9633));t.default=function(e){return new o.default((0,i.default)(e))}},3950:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(4756)),o=a(n(5715)),r=a(n(9293)),s=a(n(1305)),c=a(n(6232)),u=a(n(3401)),p=a(n(8833)),l=a(n(4398)),d=a(n(4034));t.default={create:function(e,t,n){return(0,r.default)(i.default.mark((function a(){var r,p,d,m,f;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s.default.paramNotEmpty(t,c.default.Product.PRODUCT_NUMBER),n.setProperty(c.default.Product.PRODUCT_NUMBER,t),a.next=4,u.default.post(e,c.default.ProductModule.ENDPOINT_PATH,n.asPropertiesMap());case 4:return r=a.sent,p=r.data.items.item,d=p.filter((function(e){return"ProductModule"===e.type})),m=(0,o.default)(d,1),f=m[0],a.abrupt("return",(0,l.default)(f));case 8:case"end":return a.stop()}}),a)})))()},get:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,p,d,m;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s.default.paramNotEmpty(t,c.default.NUMBER),n.next=3,u.default.get(e,"".concat(c.default.ProductModule.ENDPOINT_PATH,"/").concat(t));case 3:return a=n.sent,r=a.data.items.item,p=r.filter((function(e){return"ProductModule"===e.type})),d=(0,o.default)(p,1),m=d[0],n.abrupt("return",(0,l.default)(m));case 7:case"end":return n.stop()}}),n)})))()},list:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,o,r;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a={},!t){n.next=5;break}if(s.default.isValid(t)){n.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:a[c.default.FILTER]="string"==typeof t?t:p.default.encode(t);case 5:return n.next=7,u.default.get(e,c.default.ProductModule.ENDPOINT_PATH,a);case 7:return o=n.sent,r=o.data,n.abrupt("return",(0,d.default)(r.items.item.filter((function(e){return"ProductModule"===e.type})).map((function(e){return(0,l.default)(e)})),r.items.pagenumber,r.items.itemsnumber,r.items.totalpages,r.items.totalitems));case 10:case"end":return n.stop()}}),n)})))()},update:function(e,t,n){return(0,r.default)(i.default.mark((function a(){var r,p,d,m,f;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s.default.paramNotEmpty(t,c.default.NUMBER),a.next=3,u.default.post(e,"".concat(c.default.ProductModule.ENDPOINT_PATH,"/").concat(t),n.asPropertiesMap());case 3:return r=a.sent,p=r.data.items.item,d=p.filter((function(e){return"ProductModule"===e.type})),m=(0,o.default)(d,1),f=m[0],a.abrupt("return",(0,l.default)(f));case 7:case"end":return a.stop()}}),a)})))()},delete:function(e,t,n){s.default.paramNotEmpty(t,c.default.NUMBER);var a={forceCascade:Boolean(n)};return u.default.delete(e,"".concat(c.default.ProductModule.ENDPOINT_PATH,"/").concat(t),a)}}},4034:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o={getContent:function(){return e},getPageNumber:function(){return t},getItemsNumber:function(){return n},getTotalPages:function(){return a},getTotalItems:function(){return i},hasNext:function(){return a>t+1}},r=Object.keys(o);return new Proxy(e,{get:function(e,t){return-1!==r.indexOf(t)?o[t]:e[t]}})}},4039:(e,t,n)=>{"use strict";var a="undefined"!=typeof Symbol&&Symbol,i=n(1333);e.exports=function(){return"function"==typeof a&&("function"==typeof Symbol&&("symbol"==typeof a("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},4067:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(670)),o=a(n(9899));t.default=function(e){return new o.default((0,i.default)(e))}},4398:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(670)),o=a(n(9142));t.default=function(e){return new o.default((0,i.default)(e))}},4434:e=>{"use strict";e.exports=require("events")},4459:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},4555:e=>{function t(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}e.exports=function(e){Object.keys(e.jobs).forEach(t.bind(e)),e.jobs={}}},4579:(e,t,n)=>{var a=n(7736);function i(e,t){for(var n=0;n{var a=n(3738).default;function i(){"use strict";e.exports=i=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},o=Object.prototype,r=o.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",p=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(t){d=function(e,t,n){return e[t]=n}}function m(e,t,n,a){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),r=new L(a||[]);return s(o,"_invoke",{value:j(e,n,r)}),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=m;var v="suspendedStart",x="suspendedYield",h="executing",b="completed",y={};function g(){}function w(){}function E(){}var P={};d(P,u,(function(){return this}));var k=Object.getPrototypeOf,_=k&&k(k(C([])));_&&_!==o&&r.call(_,u)&&(P=_);var O=E.prototype=g.prototype=Object.create(P);function T(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function n(i,o,s,c){var u=f(e[i],e,o);if("throw"!==u.type){var p=u.arg,l=p.value;return l&&"object"==a(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):t.resolve(l).then((function(e){p.value=e,s(p)}),(function(e){return n("throw",e,s,c)}))}c(u.arg)}var i;s(this,"_invoke",{value:function(e,a){function o(){return new t((function(t,i){n(e,a,t,i)}))}return i=i?i.then(o,o):o()}})}function j(e,n,a){var i=v;return function(o,r){if(i===h)throw Error("Generator is already running");if(i===b){if("throw"===o)throw r;return{value:t,done:!0}}for(a.method=o,a.arg=r;;){var s=a.delegate;if(s){var c=R(s,a);if(c){if(c===y)continue;return c}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(i===v)throw i=b,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i=h;var u=f(e,n,a);if("normal"===u.type){if(i=a.done?b:x,u.arg===y)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(i=b,a.method="throw",a.arg=u.arg)}}}function R(e,n){var a=n.method,i=e.iterator[a];if(i===t)return n.delegate=null,"throw"===a&&e.iterator.return&&(n.method="return",n.arg=t,R(e,n),"throw"===n.method)||"return"!==a&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+a+"' method")),y;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var r=o.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function C(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(c&&u){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if("throw"===a.type){var i=a.arg;S(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,a){return this.delegate={iterator:C(e),resultName:n,nextLoc:a},"next"===this.method&&(this.arg=t),y}},n}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},4756:(e,t,n)=>{var a=n(4633)();e.exports=a;try{regeneratorRuntime=a}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=a:Function("r","regeneratorRuntime = r")(a)}},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},5114:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(4756)),o=a(n(5715)),r=a(n(9293)),s=a(n(3401)),c=a(n(6232)),u=a(n(1305)),p=a(n(8833)),l=a(n(822)),d=a(n(4034));t.default={create:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,u,p,d;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,s.default.post(e,c.default.Product.ENDPOINT_PATH,t.asPropertiesMap());case 2:return a=n.sent,r=a.data.items.item,u=r.filter((function(e){return"Product"===e.type})),p=(0,o.default)(u,1),d=p[0],n.abrupt("return",(0,l.default)(d));case 6:case"end":return n.stop()}}),n)})))()},get:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,p,d,m;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u.default.paramNotEmpty(t,c.default.NUMBER),n.next=3,s.default.get(e,"".concat(c.default.Product.ENDPOINT_PATH,"/").concat(t));case 3:return a=n.sent,r=a.data.items.item,p=r.filter((function(e){return"Product"===e.type})),d=(0,o.default)(p,1),m=d[0],n.abrupt("return",(0,l.default)(m));case 7:case"end":return n.stop()}}),n)})))()},list:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,o,r;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a={},!t){n.next=5;break}if(u.default.isValid(t)){n.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:a[c.default.FILTER]="string"==typeof t?t:p.default.encode(t);case 5:return n.next=7,s.default.get(e,c.default.Product.ENDPOINT_PATH,a);case 7:return o=n.sent,r=o.data,n.abrupt("return",(0,d.default)(r.items.item.filter((function(e){return"Product"===e.type})).map((function(e){return(0,l.default)(e)})),r.items.pagenumber,r.items.itemsnumber,r.items.totalpages,r.items.totalitems));case 10:case"end":return n.stop()}}),n)})))()},update:function(e,t,n){return(0,r.default)(i.default.mark((function a(){var r,p,d,m,f;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return u.default.paramNotEmpty(t,c.default.NUMBER),a.next=3,s.default.post(e,"".concat(c.default.Product.ENDPOINT_PATH,"/").concat(t),n.asPropertiesMap());case 3:return r=a.sent,p=r.data.items.item,d=p.filter((function(e){return"Product"===e.type})),m=(0,o.default)(d,1),f=m[0],a.abrupt("return",(0,l.default)(f));case 7:case"end":return a.stop()}}),a)})))()},delete:function(e,t,n){u.default.paramNotEmpty(t,c.default.NUMBER);var a={forceCascade:Boolean(n)};return s.default.delete(e,"".concat(c.default.Product.ENDPOINT_PATH,"/").concat(t),a)}}},5192:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(4756)),o=a(n(5715)),r=a(n(9293)),s=a(n(6232)),c=a(n(3401)),u=a(n(1305)),p=a(n(8833)),l=a(n(3648)),d=a(n(4034));t.default={create:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,u,p,d;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,c.default.post(e,s.default.Token.ENDPOINT_PATH,t.asPropertiesMap());case 2:return a=n.sent,r=a.data.items.item,u=r.filter((function(e){return"Token"===e.type})),p=(0,o.default)(u,1),d=p[0],n.abrupt("return",(0,l.default)(d));case 6:case"end":return n.stop()}}),n)})))()},get:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,p,d,m;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u.default.paramNotEmpty(t,s.default.NUMBER),n.next=3,c.default.get(e,"".concat(s.default.Token.ENDPOINT_PATH,"/").concat(t));case 3:return a=n.sent,r=a.data.items.item,p=r.filter((function(e){return"Token"===e.type})),d=(0,o.default)(p,1),m=d[0],n.abrupt("return",(0,l.default)(m));case 7:case"end":return n.stop()}}),n)})))()},list:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,o,r;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a={},!t){n.next=5;break}if(u.default.isValid(t)){n.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:a[s.default.FILTER]="string"==typeof t?t:p.default.encode(t);case 5:return n.next=7,c.default.get(e,s.default.Token.ENDPOINT_PATH,a);case 7:return o=n.sent,r=o.data,n.abrupt("return",(0,d.default)(r.items.item.filter((function(e){return"Token"===e.type})).map((function(e){return(0,l.default)(e)})),r.items.pagenumber,r.items.itemsnumber,r.items.totalpages,r.items.totalitems));case 10:case"end":return n.stop()}}),n)})))()},delete:function(e,t){return u.default.paramNotEmpty(t,s.default.NUMBER),c.default.delete(e,"".concat(s.default.Token.ENDPOINT_PATH,"/").concat(t))}}},5270:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(670)),o=a(n(5454));t.default=function(e){return new o.default((0,i.default)(e))}},5345:e=>{"use strict";e.exports=URIError},5402:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(670)),o=a(n(1938));t.default=function(e){return new o.default((0,i.default)(e))}},5407:e=>{e.exports=function(e){throw new TypeError('"'+e+'" is read-only')},e.exports.__esModule=!0,e.exports.default=e.exports},5454:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(635));function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}t.default=function(e){function t(e){return(0,i.default)(this,t),n=this,a=t,o=[{properties:e,casts:{number:"string",active:"boolean",name:"string",protocol:"string",events:"string",payload:"string",endpoint:"string"}}],a=(0,s.default)(a),(0,r.default)(n,p()?Reflect.construct(a,o||[],(0,s.default)(n).constructor):a.apply(n,o));var n,a,o}return(0,c.default)(t,e),(0,o.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setProtocol",value:function(e){return this.setProperty("protocol",e)}},{key:"getProtocol",value:function(e){return this.getProperty("protocol",e)}},{key:"setEvents",value:function(e){return this.setProperty("events",e)}},{key:"getEvents",value:function(e){return this.getProperty("events",e)}},{key:"setPayload",value:function(e){return this.setProperty("payload",e)}},{key:"getPayload",value:function(e){return this.getProperty("payload",e)}},{key:"setEndpoint",value:function(e){return this.setProperty("endpoint",e)}},{key:"getEndpoint",value:function(e){return this.getProperty("endpoint",e)}}])}(u.default)},5636:e=>{function t(n,a){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5692:e=>{"use strict";e.exports=require("https")},5715:(e,t,n)=>{var a=n(2987),i=n(1156),o=n(7122),r=n(7752);e.exports=function(e,t){return a(e)||i(e,t)||o(e,t)||r()},e.exports.__esModule=!0,e.exports.default=e.exports},5753:(e,t,n)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=n(7833):e.exports=n(6033)},5795:(e,t,n)=>{"use strict";var a=n(6549);if(a)try{a([],"length")}catch(e){a=null}e.exports=a},5880:e=>{"use strict";e.exports=Math.pow},5884:e=>{"use strict";e.exports=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",a=t.indexOf(n+e),i=t.indexOf("--");return-1!==a&&(-1===i||a{const a=n(2018),i=n(9023);t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let a=0;a{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(7687);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let a=process.env[t];return a=!!/^(yes|on|true|enabled)$/i.test(a)||!/^(no|off|false|disabled)$/i.test(a)&&("null"===a?null:Number(a)),e[n]=a,e}),{}),e.exports=n(736)(t);const{formatters:o}=e.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},6049:(e,t,n)=>{"use strict";var a,i,o,r=n(7598),s=n(6928).extname,c=/^\s*([^;\s]*)(?:;|\s|$)/,u=/^text\//i;function p(e){if(!e||"string"!=typeof e)return!1;var t=c.exec(e),n=t&&r[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!u.test(t[1]))&&"UTF-8"}t.charset=p,t.charsets={lookup:p},t.contentType=function(e){if(!e||"string"!=typeof e)return!1;var n=-1===e.indexOf("/")?t.lookup(e):e;if(!n)return!1;if(-1===n.indexOf("charset")){var a=t.charset(n);a&&(n+="; charset="+a.toLowerCase())}return n},t.extension=function(e){if(!e||"string"!=typeof e)return!1;var n=c.exec(e),a=n&&t.extensions[n[1].toLowerCase()];if(!a||!a.length)return!1;return a[0]},t.extensions=Object.create(null),t.lookup=function(e){if(!e||"string"!=typeof e)return!1;var n=s("x."+e).toLowerCase().substr(1);if(!n)return!1;return t.types[n]||!1},t.types=Object.create(null),a=t.extensions,i=t.types,o=["nginx","apache",void 0,"iana"],Object.keys(r).forEach((function(e){var t=r[e],n=t.extensions;if(n&&n.length){a[e]=n;for(var s=0;sp||u===p&&"application/"===i[c].substr(0,12)))continue}i[c]=e}}}))},6188:e=>{"use strict";e.exports=Math.max},6232:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",ANONYMOUS_IDENTIFICATION:"ANONYMOUS",ACTIVE:"active",NUMBER:"number",NAME:"name",VERSION:"version",DELETED:"deleted",CASCADE:"forceCascade",PRICE:"price",DISCOUNT:"discount",CURRENCY:"currency",IN_USE:"inUse",FILTER:"filter",BASE_URL:"baseUrl",USERNAME:"username",PASSWORD:"password",SECURITY_MODE:"securityMode",LicensingModel:{VALID:"valid",TryAndBuy:{NAME:"TryAndBuy"},Rental:{NAME:"Rental",RED_THRESHOLD:"redThreshold",YELLOW_THRESHOLD:"yellowThreshold"},Subscription:{NAME:"Subscription"},Floating:{NAME:"Floating"},MultiFeature:{NAME:"MultiFeature"},PayPerUse:{NAME:"PayPerUse"},PricingTable:{NAME:"PricingTable"},Quota:{NAME:"Quota"},NodeLocked:{NAME:"NodeLocked"}},Vendor:{VENDOR_NUMBER:"vendorNumber",VENDOR_TYPE:"Vendor"},Product:{ENDPOINT_PATH:"product",PRODUCT_NUMBER:"productNumber",LICENSEE_AUTO_CREATE:"licenseeAutoCreate",DESCRIPTION:"description",LICENSING_INFO:"licensingInfo",DISCOUNTS:"discounts",PROP_LICENSEE_SECRET_MODE:"licenseeSecretMode",PROP_VAT_MODE:"vatMode",Discount:{TOTAL_PRICE:"totalPrice",AMOUNT_FIX:"amountFix",AMOUNT_PERCENT:"amountPercent"},LicenseeSecretMode:{DISABLED:"DISABLED",PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}},ProductModule:{ENDPOINT_PATH:"productmodule",PRODUCT_MODULE_NUMBER:"productModuleNumber",PRODUCT_MODULE_NAME:"productModuleName",LICENSING_MODEL:"licensingModel",PROP_LICENSEE_SECRET_MODE:"licenseeSecretMode"},LicenseTemplate:{ENDPOINT_PATH:"licensetemplate",LICENSE_TEMPLATE_NUMBER:"licenseTemplateNumber",LICENSE_TYPE:"licenseType",AUTOMATIC:"automatic",HIDDEN:"hidden",HIDE_LICENSES:"hideLicenses",PROP_LICENSEE_SECRET:"licenseeSecret",LicenseType:{FEATURE:"FEATURE",TIMEVOLUME:"TIMEVOLUME",FLOATING:"FLOATING",QUANTITY:"QUANTITY"}},Token:{ENDPOINT_PATH:"token",EXPIRATION_TIME:"expirationTime",TOKEN_TYPE:"tokenType",API_KEY:"apiKey",TOKEN_PROP_EMAIL:"email",TOKEN_PROP_VENDORNUMBER:"vendorNumber",TOKEN_PROP_SHOP_URL:"shopURL",Type:{DEFAULT:"DEFAULT",SHOP:"SHOP",APIKEY:"APIKEY"}},Transaction:{ENDPOINT_PATH:"transaction",TRANSACTION_NUMBER:"transactionNumber",GRAND_TOTAL:"grandTotal",STATUS:"status",SOURCE:"source",DATE_CREATED:"datecreated",DATE_CLOSED:"dateclosed",VAT:"vat",VAT_MODE:"vatMode",LICENSE_TRANSACTION_JOIN:"licenseTransactionJoin",SOURCE_SHOP_ONLY:"shopOnly",Status:{CANCELLED:"CANCELLED",CLOSED:"CLOSED",PENDING:"PENDING"}},Licensee:{ENDPOINT_PATH:"licensee",ENDPOINT_PATH_VALIDATE:"validate",ENDPOINT_PATH_TRANSFER:"transfer",LICENSEE_NUMBER:"licenseeNumber",SOURCE_LICENSEE_NUMBER:"sourceLicenseeNumber",PROP_LICENSEE_NAME:"licenseeName",PROP_LICENSEE_SECRET:"licenseeSecret",PROP_MARKED_FOR_TRANSFER:"markedForTransfer"},License:{ENDPOINT_PATH:"license",LICENSE_NUMBER:"licenseNumber",HIDDEN:"hidden",PROP_LICENSEE_SECRET:"licenseeSecret"},PaymentMethod:{ENDPOINT_PATH:"paymentmethod"},Utility:{ENDPOINT_PATH:"utility",ENDPOINT_PATH_LICENSE_TYPES:"licenseTypes",ENDPOINT_PATH_LICENSING_MODELS:"licensingModels",ENDPOINT_PATH_COUNTRIES:"countries",LICENSING_MODEL_PROPERTIES:"LicensingModelProperties",LICENSE_TYPE:"LicenseType"},APIKEY:{ROLE_APIKEY_LICENSEE:"ROLE_APIKEY_LICENSEE",ROLE_APIKEY_ANALYTICS:"ROLE_APIKEY_ANALYTICS",ROLE_APIKEY_OPERATION:"ROLE_APIKEY_OPERATION",ROLE_APIKEY_MAINTENANCE:"ROLE_APIKEY_MAINTENANCE",ROLE_APIKEY_ADMIN:"ROLE_APIKEY_ADMIN"},Validation:{FOR_OFFLINE_USE:"forOfflineUse"},WarningLevel:{GREEN:"GREEN",YELLOW:"YELLOW",RED:"RED"},Bundle:{ENDPOINT_PATH:"bundle",ENDPOINT_OBTAIN_PATH:"obtain"},Notification:{ENDPOINT_PATH:"notification",Protocol:{WEBHOOK:"WEBHOOK"},Event:{LICENSEE_CREATED:"LICENSEE_CREATED",LICENSE_CREATED:"LICENSE_CREATED",WARNING_LEVEL_CHANGED:"WARNING_LEVEL_CHANGED",PAYMENT_TRANSACTION_PROCESSED:"PAYMENT_TRANSACTION_PROCESSED"}}}},6276:(e,t,n)=>{var a=n(4555),i=n(2313);e.exports=function(e){if(!Object.keys(this.jobs).length)return;this.index=this.size,a(this),i(e)(null,this.results)}},6359:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(4756)),o=a(n(9293)),r=a(n(6232)),s=a(n(3401)),c=a(n(1305)),u=a(n(8833)),p=a(n(670)),l=a(n(4034)),d=a(n(6899));t.default={listLicenseTypes:function(e){return(0,o.default)(i.default.mark((function t(){var n,a;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.default.get(e,"".concat(r.default.Utility.ENDPOINT_PATH,"/").concat(r.default.Utility.ENDPOINT_PATH_LICENSE_TYPES));case 2:return n=t.sent,a=n.data,t.abrupt("return",(0,l.default)(a.items.item.filter((function(e){return"LicenseType"===e.type})).map((function(e){return(0,p.default)(e)})),a.items.pagenumber,a.items.itemsnumber,a.items.totalpages,a.items.totalitems));case 5:case"end":return t.stop()}}),t)})))()},listLicensingModels:function(e){return(0,o.default)(i.default.mark((function t(){var n,a;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.default.get(e,"".concat(r.default.Utility.ENDPOINT_PATH,"/").concat(r.default.Utility.ENDPOINT_PATH_LICENSING_MODELS));case 2:return n=t.sent,a=n.data,t.abrupt("return",(0,l.default)(a.items.item.filter((function(e){return"LicensingModelProperties"===e.type})).map((function(e){return(0,p.default)(e)})),a.items.pagenumber,a.items.itemsnumber,a.items.totalpages,a.items.totalitems));case 5:case"end":return t.stop()}}),t)})))()},listCountries:function(e,t){return(0,o.default)(i.default.mark((function n(){var a,o,p;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a={},!t){n.next=5;break}if(c.default.isValid(t)){n.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:a[r.default.FILTER]="string"==typeof t?t:u.default.encode(t);case 5:return n.next=7,s.default.get(e,"".concat(r.default.Utility.ENDPOINT_PATH,"/").concat(r.default.Utility.ENDPOINT_PATH_COUNTRIES),a);case 7:return o=n.sent,p=o.data,n.abrupt("return",(0,l.default)(p.items.item.filter((function(e){return"Country"===e.type})).map((function(e){return(0,d.default)(e)})),p.items.pagenumber,p.items.itemsnumber,p.items.totalpages,p.items.totalitems));case 10:case"end":return n.stop()}}),n)})))()}}},6469:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(1837));function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}t.default=function(e){function t(){var e,n,a,o;(0,i.default)(this,t);for(var c=arguments.length,u=new Array(c),l=0;l{"use strict";var a=n(7016).parse,i={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},o=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function r(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}t.getProxyForUrl=function(e){var t="string"==typeof e?a(e):e||{},n=t.protocol,s=t.host,c=t.port;if("string"!=typeof s||!s||"string"!=typeof n)return"";if(n=n.split(":",1)[0],!function(e,t){var n=(r("npm_config_no_proxy")||r("no_proxy")).toLowerCase();if(!n)return!0;if("*"===n)return!1;return n.split(/[,\s]/).every((function(n){if(!n)return!0;var a=n.match(/^(.+):(\d+)$/),i=a?a[1]:n,r=a?parseInt(a[2]):0;return!(!r||r===t)||(/^[.*]/.test(i)?("*"===i.charAt(0)&&(i=i.slice(1)),!o.call(e,i)):e!==i)}))}(s=s.replace(/:\d*$/,""),c=parseInt(c)||i[n]||0))return"";var u=r("npm_config_"+n+"_proxy")||r(n+"_proxy")||r("npm_config_proxy")||r("all_proxy");return u&&-1===u.indexOf("://")&&(u=n+"://"+u),u}},6549:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},6585:e=>{var t=1e3,n=60*t,a=60*n,i=24*a,o=7*i,r=365.25*i;function s(e,t,n,a){var i=t>=1.5*n;return Math.round(e/n)+" "+a+(i?"s":"")}e.exports=function(e,c){c=c||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*r;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*a;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&isFinite(e))return c.long?function(e){var o=Math.abs(e);if(o>=i)return s(e,o,i,"day");if(o>=a)return s(e,o,a,"hour");if(o>=n)return s(e,o,n,"minute");if(o>=t)return s(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=i)return Math.round(e/i)+"d";if(o>=a)return Math.round(e/a)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},6743:(e,t,n)=>{"use strict";var a=n(9353);e.exports=Function.prototype.bind||a},6798:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(4756)),o=a(n(5715)),r=a(n(9293)),s=a(n(6232)),c=a(n(1305)),u=a(n(3401)),p=a(n(8833)),l=a(n(2430)),d=a(n(4034));t.default={get:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,p,d,m;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c.default.paramNotEmpty(t,s.default.NUMBER),n.next=3,u.default.get(e,"".concat(s.default.PaymentMethod.ENDPOINT_PATH,"/").concat(t));case 3:return a=n.sent,r=a.data.items.item,p=r.filter((function(e){return"PaymentMethod"===e.type})),d=(0,o.default)(p,1),m=d[0],n.abrupt("return",(0,l.default)(m));case 7:case"end":return n.stop()}}),n)})))()},list:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,o,r;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a={},!t){n.next=5;break}if(c.default.isValid(t)){n.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:a[s.default.FILTER]="string"==typeof t?t:p.default.encode(t);case 5:return n.next=7,u.default.get(e,s.default.PaymentMethod.ENDPOINT_PATH,a);case 7:return o=n.sent,r=o.data,n.abrupt("return",(0,d.default)(r.items.item.filter((function(e){return"PaymentMethod"===e.type})).map((function(e){return(0,l.default)(e)})),r.items.pagenumber,r.items.itemsnumber,r.items.totalpages,r.items.totalitems));case 10:case"end":return n.stop()}}),n)})))()},update:function(e,t,n){return(0,r.default)(i.default.mark((function a(){var r,p,d,m,f,v;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return c.default.paramNotEmpty(t,s.default.NUMBER),r="".concat(s.default.PaymentMethod.ENDPOINT_PATH,"/").concat(t),a.next=4,u.default.post(e,r,n.asPropertiesMap());case 4:return p=a.sent,d=p.data.items.item,m=d.filter((function(e){return"PaymentMethod"===e.type})),f=(0,o.default)(m,1),v=f[0],a.abrupt("return",(0,l.default)(v));case 8:case"end":return a.stop()}}),a)})))()}}},6899:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(670)),o=a(n(7147));t.default=function(e){return new o.default((0,i.default)(e))}},6928:e=>{"use strict";e.exports=require("path")},6982:e=>{"use strict";e.exports=require("crypto")},7016:e=>{"use strict";e.exports=require("url")},7119:e=>{"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},7122:(e,t,n)=>{var a=n(79);e.exports=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},7131:e=>{!function(){"use strict";e.exports=function(e){return(e instanceof Buffer?e:Buffer.from(e.toString(),"binary")).toString("base64")}}()},7147:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(635));function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}t.default=function(e){function t(e){return(0,i.default)(this,t),n=this,a=t,o=[{properties:e,casts:{code:"string",name:"string",vatPercent:"int",isEu:"boolean"}}],a=(0,s.default)(a),(0,r.default)(n,p()?Reflect.construct(a,o||[],(0,s.default)(n).constructor):a.apply(n,o));var n,a,o}return(0,c.default)(t,e),(0,o.default)(t,[{key:"setCode",value:function(e){return this.setProperty("code",e)}},{key:"getCode",value:function(e){return this.getProperty("code",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setVatPercent",value:function(e){return this.setProperty("vatPercent",e)}},{key:"getVatPercent",value:function(e){return this.getProperty("vatPercent",e)}},{key:"setIsEu",value:function(e){return this.setProperty("isEu",e)}},{key:"getIsEu",value:function(e){return this.getProperty("isEu",e)}}])}(u.default)},7176:(e,t,n)=>{"use strict";var a,i=n(3126),o=n(5795);try{a=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var r=!!a&&o&&o(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;e.exports=r&&"function"==typeof r.get?i([r.get]):"function"==typeof c&&function(e){return c(null==e?e:s(e))}},7211:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(4756)),o=a(n(5715)),r=a(n(9293)),s=a(n(1305)),c=a(n(8833)),u=a(n(6232)),p=a(n(3401)),l=a(n(8506)),d=a(n(4067)),m=a(n(4034)),f=a(n(670));t.default={create:function(e,t,n){return(0,r.default)(i.default.mark((function a(){var r,c,l,m,f;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s.default.paramNotEmpty(t,u.default.Product.PRODUCT_NUMBER),n.setProperty(u.default.Product.PRODUCT_NUMBER,t),a.next=4,p.default.post(e,u.default.Licensee.ENDPOINT_PATH,n.asPropertiesMap());case 4:return r=a.sent,c=r.data.items.item,l=c.filter((function(e){return"Licensee"===e.type})),m=(0,o.default)(l,1),f=m[0],a.abrupt("return",(0,d.default)(f));case 8:case"end":return a.stop()}}),a)})))()},get:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,c,l,m;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s.default.paramNotEmpty(t,u.default.NUMBER),n.next=3,p.default.get(e,"".concat(u.default.Licensee.ENDPOINT_PATH,"/").concat(t));case 3:return a=n.sent,r=a.data.items.item,c=r.filter((function(e){return"Licensee"===e.type})),l=(0,o.default)(c,1),m=l[0],n.abrupt("return",(0,d.default)(m));case 7:case"end":return n.stop()}}),n)})))()},list:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,o,r;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a={},!t){n.next=5;break}if(s.default.isValid(t)){n.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:a[u.default.FILTER]="string"==typeof t?t:c.default.encode(t);case 5:return n.next=7,p.default.get(e,u.default.Licensee.ENDPOINT_PATH,a);case 7:return o=n.sent,r=o.data,n.abrupt("return",(0,m.default)(r.items.item.filter((function(e){return"Licensee"===e.type})).map((function(e){return(0,d.default)(e)})),r.items.pagenumber,r.items.itemsnumber,r.items.totalpages,r.items.totalitems));case 10:case"end":return n.stop()}}),n)})))()},update:function(e,t,n){return(0,r.default)(i.default.mark((function a(){var r,c,l,m,f;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s.default.paramNotEmpty(t,u.default.NUMBER),a.next=3,p.default.post(e,"".concat(u.default.Licensee.ENDPOINT_PATH,"/").concat(t),n.asPropertiesMap());case 3:return r=a.sent,c=r.data.items.item,l=c.filter((function(e){return"Licensee"===e.type})),m=(0,o.default)(l,1),f=m[0],a.abrupt("return",(0,d.default)(f));case 7:case"end":return a.stop()}}),a)})))()},delete:function(e,t,n){s.default.paramNotEmpty(t,u.default.NUMBER);var a={forceCascade:Boolean(n)};return p.default.delete(e,"".concat(u.default.Licensee.ENDPOINT_PATH,"/").concat(t),a)},validate:function(e,t,n){return(0,r.default)(i.default.mark((function a(){var o,r,c,d,m,v,x,h,b;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s.default.paramNotEmpty(t,u.default.NUMBER),o={},n.getProductNumber()&&(o.productNumber=n.getProductNumber()),Object.keys(n.getLicenseeProperties()).forEach((function(e){o[e]=n.getLicenseeProperty(e)})),n.isForOfflineUse()&&(o.forOfflineUse=!0),n.getDryRun()&&(o.dryRun=!0),r=0,c=n.getParameters(),d=Object.prototype.hasOwnProperty,Object.keys(c).forEach((function(e){if(o["".concat(u.default.ProductModule.PRODUCT_MODULE_NUMBER).concat(r)]=e,d.call(c,e)){var t=c[e];Object.keys(t).forEach((function(e){d.call(t,e)&&(o[e+r]=t[e])})),r+=1}})),a.next=12,p.default.post(e,"".concat(u.default.Licensee.ENDPOINT_PATH,"/").concat(t,"/").concat(u.default.Licensee.ENDPOINT_PATH_VALIDATE),o);case 12:return m=a.sent,v=m.data,x=v.items.item,h=v.ttl,(b=new l.default).setTtl(h),x.filter((function(e){return"ProductModuleValidation"===e.type})).forEach((function(e){var t=(0,f.default)(e);b.setProductModuleValidation(t[u.default.ProductModule.PRODUCT_MODULE_NUMBER],t)})),a.abrupt("return",b);case 20:case"end":return a.stop()}}),a)})))()},transfer:function(e,t,n){s.default.paramNotEmpty(t,u.default.NUMBER),s.default.paramNotEmpty(n,u.default.Licensee.SOURCE_LICENSEE_NUMBER);var a={sourceLicenseeNumber:n};return p.default.post(e,"".concat(u.default.Licensee.ENDPOINT_PATH,"/").concat(t,"/").concat(u.default.Licensee.ENDPOINT_PATH_TRANSFER),a)}}},7383:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},7394:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(4756)),o=a(n(5715)),r=a(n(9293)),s=a(n(1305)),c=a(n(6232)),u=a(n(3401)),p=a(n(8833)),l=a(n(5402)),d=a(n(4034));t.default={create:function(e,t,n,a,p){return(0,r.default)(i.default.mark((function r(){var d,m,f,v,x;return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s.default.paramNotEmpty(t,c.default.Licensee.LICENSEE_NUMBER),s.default.paramNotEmpty(n,c.default.LicenseTemplate.LICENSE_TEMPLATE_NUMBER),p.setProperty(c.default.Licensee.LICENSEE_NUMBER,t),p.setProperty(c.default.LicenseTemplate.LICENSE_TEMPLATE_NUMBER,n),a&&p.setProperty(c.default.Transaction.TRANSACTION_NUMBER,a),i.next=7,u.default.post(e,c.default.License.ENDPOINT_PATH,p.asPropertiesMap());case 7:return d=i.sent,m=d.data.items.item,f=m.filter((function(e){return"License"===e.type})),v=(0,o.default)(f,1),x=v[0],i.abrupt("return",(0,l.default)(x));case 11:case"end":return i.stop()}}),r)})))()},get:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,r,p,d,m;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s.default.paramNotEmpty(t,c.default.NUMBER),n.next=3,u.default.get(e,"".concat(c.default.License.ENDPOINT_PATH,"/").concat(t));case 3:return a=n.sent,r=a.data.items.item,p=r.filter((function(e){return"License"===e.type})),d=(0,o.default)(p,1),m=d[0],n.abrupt("return",(0,l.default)(m));case 7:case"end":return n.stop()}}),n)})))()},list:function(e,t){return(0,r.default)(i.default.mark((function n(){var a,o,r;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a={},!t){n.next=5;break}if(s.default.isValid(t)){n.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:a[c.default.FILTER]="string"==typeof t?t:p.default.encode(t);case 5:return n.next=7,u.default.get(e,c.default.License.ENDPOINT_PATH,a);case 7:return o=n.sent,r=o.data,n.abrupt("return",(0,d.default)(r.items.item.filter((function(e){return"License"===e.type})).map((function(e){return(0,l.default)(e)})),r.items.pagenumber,r.items.itemsnumber,r.items.totalpages,r.items.totalitems));case 10:case"end":return n.stop()}}),n)})))()},update:function(e,t,n,a){return(0,r.default)(i.default.mark((function r(){var p,d,m,f,v;return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s.default.paramNotEmpty(t,c.default.NUMBER),n&&a.setProperty(c.default.Transaction.TRANSACTION_NUMBER,n),i.next=4,u.default.post(e,"".concat(c.default.License.ENDPOINT_PATH,"/").concat(t),a.asPropertiesMap());case 4:return p=i.sent,d=p.data.items.item,m=d.filter((function(e){return"License"===e.type})),f=(0,o.default)(m,1),v=f[0],i.abrupt("return",(0,l.default)(v));case 8:case"end":return i.stop()}}),r)})))()},delete:function(e,t,n){s.default.paramNotEmpty(t,c.default.NUMBER);var a={forceCascade:Boolean(n)};return u.default.delete(e,"".concat(c.default.License.ENDPOINT_PATH,"/").concat(t),a)}}},7507:(e,t,n)=>{var a;e.exports=function(){if(!a){try{a=n(5753)("follow-redirects")}catch(e){}"function"!=typeof a&&(a=function(){})}a.apply(null,arguments)}},7550:e=>{function t(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(n){}return(e.exports=t=function(){return!!n},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},7598:(e,t,n)=>{e.exports=n(1813)},7687:(e,t,n)=>{"use strict";const a=n(857),i=n(2018),o=n(5884),{env:r}=process;let s;function c(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u(e,t){if(0===s)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!t&&void 0===s)return 0;const n=s||0;if("dumb"===r.TERM)return n;if("win32"===process.platform){const e=a.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:n;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:n}o("no-color")||o("no-colors")||o("color=false")||o("color=never")?s=0:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(s=1),"FORCE_COLOR"in r&&(s="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return c(u(e,e&&e.isTTY))},stdout:c(u(!0,i.isatty(1))),stderr:c(u(!0,i.isatty(2)))}},7736:(e,t,n)=>{var a=n(3738).default,i=n(9045);e.exports=function(e){var t=i(e,"string");return"symbol"==a(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},7752:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},7833:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let a=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(a++,"%c"===e&&(i=a))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(736)(t);const{formatters:a}=e.exports;a.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},8002:e=>{"use strict";e.exports=Math.min},8051:(e,t,n)=>{var a=n(2313),i=n(4555);e.exports=function(e,t,n,o){var r=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[r]=function(e,t,n,i){var o;o=2==e.length?e(n,a(i)):e(n,t,a(i));return o}(t,r,e[r],(function(e,t){r in n.jobs&&(delete n.jobs[r],e?i(n):n.results[r]=t,o(e,n.results))}))}},8068:e=>{"use strict";e.exports=SyntaxError},8069:(e,t,n)=>{var a=n(2203).Stream,i=n(9023);function o(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}e.exports=o,i.inherits(o,a),o.create=function(e,t){var n=new this;for(var a in t=t||{})n[a]=t[a];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",(function(){})),n.pauseStream&&e.pause(),n},Object.defineProperty(o.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),o.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},o.prototype.resume=function(){this._released||this.release(),this.source.resume()},o.prototype.pause=function(){this.source.pause()},o.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},o.prototype.pipe=function(){var e=a.prototype.pipe.apply(this,arguments);return this.resume(),e},o.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},o.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"netlicensing-client","version":"1.2.38","description":"JavaScript Wrapper for Labs64 NetLicensing RESTful API","keywords":["labs64","netlicensing","licensing","licensing-as-a-service","license","license-management","software-license","client","restful","restful-api","javascript","wrapper","api","client"],"license":"Apache-2.0","author":"Labs64 GmbH","homepage":"https://netlicensing.io","repository":{"type":"git","url":"https://github.com/Labs64/NetLicensingClient-javascript"},"bugs":{"url":"https://github.com/Labs64/NetLicensingClient-javascript/issues"},"contributors":[{"name":"Ready Brown","email":"ready.brown@hotmail.de","url":"https://github.com/r-brown"},{"name":"Viacheslav Rudkovskiy","email":"viachaslau.rudkovski@labs64.de","url":"https://github.com/v-rudkovskiy"},{"name":"Andrei Yushkevich","email":"yushkevich@me.com","url":"https://github.com/yushkevich"}],"main":"dist/netlicensing-client.js","files":["dist"],"scripts":{"build":"node build/build.cjs","release":"npm run build && npm run test","dev":"webpack --progress --watch --config build/webpack.dev.conf.cjs","test":"karma start test/karma.conf.js --single-run","test-mocha":"webpack --config build/webpack.test.conf.cjs","test-for-travis":"karma start test/karma.conf.js --single-run --browsers Firefox","lint":"eslint --ext .js,.vue src test"},"dependencies":{"axios":"^1.8.2","btoa":"^1.2.1","es6-promise":"^4.2.8"},"devDependencies":{"@babel/core":"^7.26.9","@babel/plugin-proposal-class-properties":"^7.16.7","@babel/plugin-proposal-decorators":"^7.25.9","@babel/plugin-proposal-export-namespace-from":"^7.16.7","@babel/plugin-proposal-function-sent":"^7.25.9","@babel/plugin-proposal-json-strings":"^7.16.7","@babel/plugin-proposal-numeric-separator":"^7.16.7","@babel/plugin-proposal-throw-expressions":"^7.25.9","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-meta":"^7.10.4","@babel/plugin-transform-modules-commonjs":"^7.26.3","@babel/plugin-transform-runtime":"^7.26.9","@babel/preset-env":"^7.26.9","@babel/runtime":"^7.26.9","axios-mock-adapter":"^2.1.0","babel-eslint":"^10.1.0","babel-loader":"^9.2.1","chalk":"^4.1.2","eslint":"^8.2.0","eslint-config-airbnb-base":"^15.0.0","eslint-friendly-formatter":"^4.0.1","eslint-import-resolver-webpack":"^0.13.10","eslint-plugin-import":"^2.31.0","eslint-plugin-jasmine":"^4.2.2","eslint-webpack-plugin":"^4.2.0","faker":"^5.5.3","is-docker":"^2.2.1","jasmine":"^4.0.2","jasmine-core":"^4.0.1","karma":"^6.3.17","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^4.0.2","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"0.0.33","karma-webpack":"^5.0.0","lodash":"^4.17.21","ora":"^5.4.1","rimraf":"^3.0.2","terser-webpack-plugin":"^5.3.1","webpack":"^5.76.0","webpack-cli":"^5.1.1","webpack-merge":"^5.8.0"},"engines":{"node":">= 14.0.0","npm":">= 8.0.0"},"browserslist":["> 1%","last 2 versions","not ie <= 10"]}')},8452:(e,t,n)=>{var a=n(3738).default,i=n(2475);e.exports=function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},8506:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(3738)),o=a(n(3693)),r=a(n(7383)),s=a(n(4579)),c=a(n(1305));function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}t.default=function(){return(0,s.default)((function e(){(0,r.default)(this,e),this.validators={}}),[{key:"getValidators",value:function(){return function(e){for(var t=1;t"),n.call(t,a)&&(e+=JSON.stringify(t[a]))})),e+="]"}}])}()},8611:e=>{"use strict";e.exports=require("http")},8648:e=>{"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},8769:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e,t){switch(e.trim().toLowerCase()){case"str":case"string":return String(t);case"int":case"integer":var n=parseInt(t,10);return Number.isNaN(n)?t:n;case"float":case"double":var a=parseFloat(t);return Number.isNaN(a)?t:a;case"bool":case"boolean":switch(t){case"true":case"TRUE":return!0;case"false":case"FALSE":return!1;default:return Boolean(t)}case"date":return"now"===t?"now":new Date(String(t));default:return t}}},8798:(e,t,n)=>{var a=n(8051),i=n(9500),o=n(6276);e.exports=function(e,t,n){var r=i(e);for(;r.index<(r.keyedList||e).length;)a(e,t,r,(function(e,t){e?n(e,t):0!==Object.keys(r.jobs).length||n(null,r.results)})),r.index++;return o.bind(r,n)}},8833:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(5715));t.default={FILTER_DELIMITER:";",FILTER_PAIR_DELIMITER:"=",encode:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[],a=Object.prototype.hasOwnProperty;return Object.keys(t).forEach((function(i){a.call(t,i)&&n.push("".concat(i).concat(e.FILTER_PAIR_DELIMITER).concat(t[i]))})),n.join(this.FILTER_DELIMITER)},decode:function(){var e=this,t={};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(this.FILTER_DELIMITER).forEach((function(n){var a=n.split(e.FILTER_PAIR_DELIMITER),o=(0,i.default)(a,2),r=o[0],s=o[1];t[r]=s})),t}}},8968:e=>{"use strict";e.exports=Math.floor},9023:e=>{"use strict";e.exports=require("util")},9045:(e,t,n)=>{var a=n(3738).default;e.exports=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=a(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9089:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(4756)),o=a(n(3693)),r=a(n(5715)),s=a(n(9293)),c=a(n(3401)),u=a(n(6232)),p=a(n(1305)),l=a(n(8833)),d=a(n(3849)),m=a(n(5402)),f=a(n(4034));t.default={create:function(e,t){return(0,s.default)(i.default.mark((function n(){var a,o,s,p,l;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,c.default.post(e,u.default.Bundle.ENDPOINT_PATH,t.asPropertiesMap());case 2:return a=n.sent,o=a.data.items.item,s=o.filter((function(e){return"Bundle"===e.type})),p=(0,r.default)(s,1),l=p[0],n.abrupt("return",(0,d.default)(l));case 6:case"end":return n.stop()}}),n)})))()},get:function(e,t){return(0,s.default)(i.default.mark((function n(){var a,o,s,l,m;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return p.default.paramNotEmpty(t,u.default.NUMBER),n.next=3,c.default.get(e,"".concat(u.default.Bundle.ENDPOINT_PATH,"/").concat(t));case 3:return a=n.sent,o=a.data.items.item,s=o.filter((function(e){return"Bundle"===e.type})),l=(0,r.default)(s,1),m=l[0],n.abrupt("return",(0,d.default)(m));case 7:case"end":return n.stop()}}),n)})))()},list:function(e,t){return(0,s.default)(i.default.mark((function n(){var a,o,r;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a={},!t){n.next=5;break}if(p.default.isValid(t)){n.next=4;break}throw new TypeError("filter has bad value ".concat(t));case 4:a[u.default.FILTER]="string"==typeof t?t:l.default.encode(t);case 5:return n.next=7,c.default.get(e,u.default.Bundle.ENDPOINT_PATH,a);case 7:return o=n.sent,r=o.data,n.abrupt("return",(0,f.default)(r.items.item.filter((function(e){return"Bundle"===e.type})).map((function(e){return(0,d.default)(e)})),r.items.pagenumber,r.items.itemsnumber,r.items.totalpages,r.items.totalitems));case 10:case"end":return n.stop()}}),n)})))()},update:function(e,t,n){return(0,s.default)(i.default.mark((function a(){var o,s,l,m,f;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return p.default.paramNotEmpty(t,u.default.NUMBER),a.next=3,c.default.post(e,"".concat(u.default.Bundle.ENDPOINT_PATH,"/").concat(t),n.asPropertiesMap());case 3:return o=a.sent,s=o.data.items.item,l=s.filter((function(e){return"Bundle"===e.type})),m=(0,r.default)(l,1),f=m[0],a.abrupt("return",(0,d.default)(f));case 7:case"end":return a.stop()}}),a)})))()},delete:function(e,t,n){p.default.paramNotEmpty(t,u.default.NUMBER);var a={forceCascade:Boolean(n)};return c.default.delete(e,"".concat(u.default.Bundle.ENDPOINT_PATH,"/").concat(t),a)},obtain:function(e,t,n){return(0,s.default)(i.default.mark((function a(){var r,s,l,d,f,v;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return p.default.paramNotEmpty(t,u.default.NUMBER),p.default.paramNotEmpty(n,u.default.Licensee.LICENSEE_NUMBER),r=u.default.Bundle,s=r.ENDPOINT_PATH,l=r.ENDPOINT_OBTAIN_PATH,d=(0,o.default)({},u.default.Licensee.LICENSEE_NUMBER,n),a.next=6,c.default.post(e,"".concat(s,"/").concat(t,"/").concat(l),d);case 6:return f=a.sent,v=f.data.items.item,a.abrupt("return",v.filter((function(e){return"License"===e.type})).map((function(e){return(0,m.default)(e)})));case 9:case"end":return a.stop()}}),a)})))()}}},9092:(e,t,n)=>{"use strict";var a=n(1333);e.exports=function(){return a()&&!!Symbol.toStringTag}},9142:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(635));function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}t.default=function(e){function t(e){return(0,i.default)(this,t),n=this,a=t,o=[{properties:e,casts:{number:"string",active:"boolean",name:"string",licensingModel:"string",maxCheckoutValidity:"int",yellowThreshold:"int",redThreshold:"int",licenseTemplate:"string",inUse:"boolean",licenseeSecretMode:"string"}}],a=(0,s.default)(a),(0,r.default)(n,p()?Reflect.construct(a,o||[],(0,s.default)(n).constructor):a.apply(n,o));var n,a,o}return(0,c.default)(t,e),(0,o.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setLicensingModel",value:function(e){return this.setProperty("licensingModel",e)}},{key:"getLicensingModel",value:function(e){return this.getProperty("licensingModel",e)}},{key:"setMaxCheckoutValidity",value:function(e){return this.setProperty("maxCheckoutValidity",e)}},{key:"getMaxCheckoutValidity",value:function(e){return this.getProperty("maxCheckoutValidity",e)}},{key:"setYellowThreshold",value:function(e){return this.setProperty("yellowThreshold",e)}},{key:"getYellowThreshold",value:function(e){return this.getProperty("yellowThreshold",e)}},{key:"setRedThreshold",value:function(e){return this.setProperty("redThreshold",e)}},{key:"getRedThreshold",value:function(e){return this.getProperty("redThreshold",e)}},{key:"setLicenseTemplate",value:function(e){return this.setProperty("licenseTemplate",e)}},{key:"getLicenseTemplate",value:function(e){return this.getProperty("licenseTemplate",e)}},{key:"getInUse",value:function(e){return this.getProperty("inUse",e)}},{key:"setLicenseeSecretMode",value:function(e){return this.setProperty("licenseeSecretMode",e)}},{key:"getLicenseeSecretMode",value:function(e){return this.getProperty("licenseeSecretMode",e)}}])}(u.default)},9290:e=>{"use strict";e.exports=RangeError},9293:e=>{function t(e,t,n,a,i,o,r){try{var s=e[o](r),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(a,i)}e.exports=function(e){return function(){var n=this,a=arguments;return new Promise((function(i,o){var r=e.apply(n,a);function s(e){t(r,i,o,s,c,"next",e)}function c(e){t(r,i,o,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},9329:(e,t,n)=>{"use strict";const a=n(737),i=n(6982),o=n(7016),r=n(6504),s=n(8611),c=n(5692),u=n(9023),p=n(3164),l=n(3106),d=n(2203),m=n(4434);function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const v=f(a),x=f(i),h=f(o),b=f(r),y=f(s),g=f(c),w=f(u),E=f(p),P=f(l),k=f(d);function _(e,t){return function(){return e.apply(t,arguments)}}const{toString:O}=Object.prototype,{getPrototypeOf:T}=Object,N=(j=Object.create(null),e=>{const t=O.call(e);return j[t]||(j[t]=t.slice(8,-1).toLowerCase())});var j;const R=e=>(e=e.toLowerCase(),t=>N(t)===e),A=e=>t=>typeof t===e,{isArray:S}=Array,L=A("undefined");const C=R("ArrayBuffer");const I=A("string"),M=A("function"),U=A("number"),D=e=>null!==e&&"object"==typeof e,B=e=>{if("object"!==N(e))return!1;const t=T(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},F=R("Date"),z=R("File"),q=R("Blob"),H=R("FileList"),V=R("URLSearchParams"),[K,G,W,Y]=["ReadableStream","Request","Response","Headers"].map(R);function J(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let a,i;if("object"!=typeof e&&(e=[e]),S(e))for(a=0,i=e.length;a0;)if(a=n[i],t===a.toLowerCase())return a;return null}const Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,X=e=>!L(e)&&e!==Q;const Z=(ee="undefined"!=typeof Uint8Array&&T(Uint8Array),e=>ee&&e instanceof ee);var ee;const te=R("HTMLFormElement"),ne=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ae=R("RegExp"),ie=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),a={};J(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(a[i]=o||n)})),Object.defineProperties(e,a)};const oe=R("AsyncFunction"),re=(se="function"==typeof setImmediate,ce=M(Q.postMessage),se?setImmediate:ce?(ue=`axios@${Math.random()}`,pe=[],Q.addEventListener("message",(({source:e,data:t})=>{e===Q&&t===ue&&pe.length&&pe.shift()()}),!1),e=>{pe.push(e),Q.postMessage(ue,"*")}):e=>setTimeout(e));var se,ce,ue,pe;const le="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Q):"undefined"!=typeof process&&process.nextTick||re,de={isArray:S,isArrayBuffer:C,isBuffer:function(e){return null!==e&&!L(e)&&null!==e.constructor&&!L(e.constructor)&&M(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||M(e.append)&&("formdata"===(t=N(e))||"object"===t&&M(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&C(e.buffer),t},isString:I,isNumber:U,isBoolean:e=>!0===e||!1===e,isObject:D,isPlainObject:B,isReadableStream:K,isRequest:G,isResponse:W,isHeaders:Y,isUndefined:L,isDate:F,isFile:z,isBlob:q,isRegExp:ae,isFunction:M,isStream:e=>D(e)&&M(e.pipe),isURLSearchParams:V,isTypedArray:Z,isFileList:H,forEach:J,merge:function e(){const{caseless:t}=X(this)&&this||{},n={},a=(a,i)=>{const o=t&&$(n,i)||i;B(n[o])&&B(a)?n[o]=e(n[o],a):B(a)?n[o]=e({},a):S(a)?n[o]=a.slice():n[o]=a};for(let e=0,t=arguments.length;e(J(t,((t,a)=>{n&&M(t)?e[a]=_(t,n):e[a]=t}),{allOwnKeys:a}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,a)=>{e.prototype=Object.create(t.prototype,a),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,a)=>{let i,o,r;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)r=i[o],a&&!a(r,e,t)||s[r]||(t[r]=e[r],s[r]=!0);e=!1!==n&&T(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:N,kindOfTest:R,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const a=e.indexOf(t,n);return-1!==a&&a===n},toArray:e=>{if(!e)return null;if(S(e))return e;let t=e.length;if(!U(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const n=a.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const a=[];for(;null!==(n=e.exec(t));)a.push(n);return a},isHTMLForm:te,hasOwnProperty:ne,hasOwnProp:ne,reduceDescriptors:ie,freezeMethods:e=>{ie(e,((t,n)=>{if(M(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const a=e[n];M(a)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},a=e=>{e.forEach((e=>{n[e]=!0}))};return S(e)?a(e):a(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:$,global:Q,isContextDefined:X,isSpecCompliantForm:function(e){return!!(e&&M(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,a)=>{if(D(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[a]=e;const i=S(e)?[]:{};return J(e,((e,t)=>{const o=n(e,a+1);!L(o)&&(i[t]=o)})),t[a]=void 0,i}}return e};return n(e,0)},isAsyncFn:oe,isThenable:e=>e&&(D(e)||M(e))&&M(e.then)&&M(e.catch),setImmediate:re,asap:le};function me(e,t,n,a,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),a&&(this.request=a),i&&(this.response=i,this.status=i.status?i.status:null)}de.inherits(me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.status}}});const fe=me.prototype,ve={};function xe(e){return de.isPlainObject(e)||de.isArray(e)}function he(e){return de.endsWith(e,"[]")?e.slice(0,-2):e}function be(e,t,n){return e?e.concat(t).map((function(e,t){return e=he(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ve[e]={value:e}})),Object.defineProperties(me,ve),Object.defineProperty(fe,"isAxiosError",{value:!0}),me.from=(e,t,n,a,i,o)=>{const r=Object.create(fe);return de.toFlatObject(e,r,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),me.call(r,e.message,t,n,a,i),r.cause=e,r.name=e.name,o&&Object.assign(r,o),r};const ye=de.toFlatObject(de,{},null,(function(e){return/^is[A-Z]/.test(e)}));function ge(e,t,n){if(!de.isObject(e))throw new TypeError("target must be an object");t=t||new(v.default||FormData);const a=(n=de.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!de.isUndefined(t[e])}))).metaTokens,i=n.visitor||u,o=n.dots,r=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&de.isSpecCompliantForm(t);if(!de.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(de.isDate(e))return e.toISOString();if(!s&&de.isBlob(e))throw new me("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(e)||de.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(de.endsWith(n,"{}"))n=a?n:n.slice(0,-2),e=JSON.stringify(e);else if(de.isArray(e)&&function(e){return de.isArray(e)&&!e.some(xe)}(e)||(de.isFileList(e)||de.endsWith(n,"[]"))&&(s=de.toArray(e)))return n=he(n),s.forEach((function(e,a){!de.isUndefined(e)&&null!==e&&t.append(!0===r?be([n],a,o):null===r?n:n+"[]",c(e))})),!1;return!!xe(e)||(t.append(be(i,n,o),c(e)),!1)}const p=[],l=Object.assign(ye,{defaultVisitor:u,convertValue:c,isVisitable:xe});if(!de.isObject(e))throw new TypeError("data must be an object");return function e(n,a){if(!de.isUndefined(n)){if(-1!==p.indexOf(n))throw Error("Circular reference detected in "+a.join("."));p.push(n),de.forEach(n,(function(n,o){!0===(!(de.isUndefined(n)||null===n)&&i.call(t,n,de.isString(o)?o.trim():o,a,l))&&e(n,a?a.concat(o):[o])})),p.pop()}}(e),t}function we(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Ee(e,t){this._pairs=[],e&&ge(e,this,t)}const Pe=Ee.prototype;function ke(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _e(e,t,n){if(!t)return e;const a=n&&n.encode||ke;de.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(o=i?i(t,n):de.isURLSearchParams(t)?t.toString():new Ee(t,n).toString(a),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Pe.append=function(e,t){this._pairs.push([e,t])},Pe.toString=function(e){const t=e?function(t){return e.call(this,t,we)}:we;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Oe=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){de.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Te={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ne=h.default.URLSearchParams,je="abcdefghijklmnopqrstuvwxyz",Re="0123456789",Ae={DIGIT:Re,ALPHA:je,ALPHA_DIGIT:je+je.toUpperCase()+Re},Se={isNode:!0,classes:{URLSearchParams:Ne,FormData:v.default,Blob:"undefined"!=typeof Blob&&Blob||null},ALPHABET:Ae,generateString:(e=16,t=Ae.ALPHA_DIGIT)=>{let n="";const{length:a}=t,i=new Uint32Array(e);x.default.randomFillSync(i);for(let o=0;o=e.length;if(o=!o&&de.isArray(a)?a.length:o,s)return de.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!r;a[o]&&de.isObject(a[o])||(a[o]=[]);return t(e,n,a[o],i)&&de.isArray(a[o])&&(a[o]=function(e){const t={},n=Object.keys(e);let a;const i=n.length;let o;for(a=0;a{t(function(e){return de.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),a,n,0)})),n}return null}const Fe={transitional:Te,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",a=n.indexOf("application/json")>-1,i=de.isObject(e);i&&de.isHTMLForm(e)&&(e=new FormData(e));if(de.isFormData(e))return a?JSON.stringify(Be(e)):e;if(de.isArrayBuffer(e)||de.isBuffer(e)||de.isStream(e)||de.isFile(e)||de.isBlob(e)||de.isReadableStream(e))return e;if(de.isArrayBufferView(e))return e.buffer;if(de.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ge(e,new De.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,a){return De.isNode&&de.isBuffer(e)?(this.append(t,e.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=de.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ge(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||a?(t.setContentType("application/json",!1),function(e,t,n){if(de.isString(e))try{return(t||JSON.parse)(e),de.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Fe.transitional,n=t&&t.forcedJSONParsing,a="json"===this.responseType;if(de.isResponse(e)||de.isReadableStream(e))return e;if(e&&de.isString(e)&&(n&&!this.responseType||a)){const n=!(t&&t.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw me.from(e,me.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:De.classes.FormData,Blob:De.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],(e=>{Fe.headers[e]={}}));const ze=Fe,qe=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),He=Symbol("internals");function Ve(e){return e&&String(e).trim().toLowerCase()}function Ke(e){return!1===e||null==e?e:de.isArray(e)?e.map(Ke):String(e)}function Ge(e,t,n,a,i){return de.isFunction(a)?a.call(this,t,n):(i&&(t=n),de.isString(t)?de.isString(a)?-1!==t.indexOf(a):de.isRegExp(a)?a.test(t):void 0:void 0)}class We{constructor(e){e&&this.set(e)}set(e,t,n){const a=this;function i(e,t,n){const i=Ve(t);if(!i)throw new Error("header name must be a non-empty string");const o=de.findKey(a,i);(!o||void 0===a[o]||!0===n||void 0===n&&!1!==a[o])&&(a[o||t]=Ke(e))}const o=(e,t)=>de.forEach(e,((e,n)=>i(e,n,t)));if(de.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(de.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,a,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),a=e.substring(i+1).trim(),!n||t[n]&&qe[n]||("set-cookie"===n?t[n]?t[n].push(a):t[n]=[a]:t[n]=t[n]?t[n]+", "+a:a)})),t})(e),t);else if(de.isHeaders(e))for(const[t,a]of e.entries())i(a,t,n);else null!=e&&i(t,e,n);return this}get(e,t){if(e=Ve(e)){const n=de.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=n.exec(e);)t[a[1]]=a[2];return t}(e);if(de.isFunction(t))return t.call(this,e,n);if(de.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ve(e)){const n=de.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ge(0,this[n],n,t))}return!1}delete(e,t){const n=this;let a=!1;function i(e){if(e=Ve(e)){const i=de.findKey(n,e);!i||t&&!Ge(0,n[i],i,t)||(delete n[i],a=!0)}}return de.isArray(e)?e.forEach(i):i(e),a}clear(e){const t=Object.keys(this);let n=t.length,a=!1;for(;n--;){const i=t[n];e&&!Ge(0,this[i],i,e,!0)||(delete this[i],a=!0)}return a}normalize(e){const t=this,n={};return de.forEach(this,((a,i)=>{const o=de.findKey(n,i);if(o)return t[o]=Ke(a),void delete t[i];const r=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();r!==i&&delete t[i],t[r]=Ke(a),n[r]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return de.forEach(this,((n,a)=>{null!=n&&!1!==n&&(t[a]=e&&de.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[He]=this[He]={accessors:{}}).accessors,n=this.prototype;function a(e){const a=Ve(e);t[a]||(!function(e,t){const n=de.toCamelCase(" "+t);["get","set","has"].forEach((a=>{Object.defineProperty(e,a+n,{value:function(e,n,i){return this[a].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[a]=!0)}return de.isArray(e)?e.forEach(a):a(e),this}}We.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),de.reduceDescriptors(We.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),de.freezeMethods(We);const Ye=We;function Je(e,t){const n=this||ze,a=t||n,i=Ye.from(a.headers);let o=a.data;return de.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function $e(e){return!(!e||!e.__CANCEL__)}function Qe(e,t,n){me.call(this,null==e?"canceled":e,me.ERR_CANCELED,t,n),this.name="CanceledError"}function Xe(e,t,n){const a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(new me("Request failed with status code "+n.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function Ze(e,t,n){let a=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&a||0==n?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}de.inherits(Qe,me,{__CANCEL__:!0});const et="1.8.2";function tt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const nt=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;const at=Symbol("internals");class it extends k.default.Transform{constructor(e){super({readableHighWaterMark:(e=de.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,t)=>!de.isUndefined(t[e])))).chunkSize});const t=this[at]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(e=>{"progress"===e&&(t.isCaptured||(t.isCaptured=!0))}))}_read(e){const t=this[at];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){const a=this[at],i=a.maxRate,o=this.readableHighWaterMark,r=a.timeWindow,s=i/(1e3/r),c=!1!==a.minChunkSize?Math.max(a.minChunkSize,.01*s):0,u=(e,t)=>{const n=Buffer.byteLength(e);a.bytesSeen+=n,a.bytes+=n,a.isCaptured&&this.emit("progress",a.bytesSeen),this.push(e)?process.nextTick(t):a.onReadCallback=()=>{a.onReadCallback=null,process.nextTick(t)}},p=(e,t)=>{const n=Buffer.byteLength(e);let p,l=null,d=o,m=0;if(i){const e=Date.now();(!a.ts||(m=e-a.ts)>=r)&&(a.ts=e,p=s-a.bytes,a.bytes=p<0?-p:0,m=0),p=s-a.bytes}if(i){if(p<=0)return setTimeout((()=>{t(null,e)}),r-m);pd&&n-d>c&&(l=e.subarray(d),e=e.subarray(0,d)),u(e,l?()=>{process.nextTick(t,null,l)}:t)};p(e,(function e(t,a){if(t)return n(t);a?p(a,e):n(null)}))}}const ot=it,{asyncIterator:rt}=Symbol,st=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[rt]?yield*e[rt]():yield e},ct=De.ALPHABET.ALPHA_DIGIT+"-_",ut="function"==typeof TextEncoder?new TextEncoder:new w.default.TextEncoder,pt="\r\n",lt=ut.encode(pt);class dt{constructor(e,t){const{escapeName:n}=this.constructor,a=de.isString(t);let i=`Content-Disposition: form-data; name="${n(e)}"${!a&&t.name?`; filename="${n(t.name)}"`:""}${pt}`;a?t=ut.encode(String(t).replace(/\r?\n|\r\n?/g,pt)):i+=`Content-Type: ${t.type||"application/octet-stream"}${pt}`,this.headers=ut.encode(i+pt),this.contentLength=a?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;de.isTypedArray(e)?yield e:yield*st(e),yield lt}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}const mt=(e,t,n)=>{const{tag:a="form-data-boundary",size:i=25,boundary:o=a+"-"+De.generateString(i,ct)}=n||{};if(!de.isFormData(e))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");const r=ut.encode("--"+o+pt),s=ut.encode("--"+o+"--"+pt+pt);let c=s.byteLength;const u=Array.from(e.entries()).map((([e,t])=>{const n=new dt(e,t);return c+=n.size,n}));c+=r.byteLength*u.length,c=de.toFiniteNumber(c);const p={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(c)&&(p["Content-Length"]=c),t&&t(p),d.Readable.from(async function*(){for(const e of u)yield r,yield*e.encode();yield s}())};class ft extends k.default.Transform{__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,n)}}const vt=ft,xt=(e,t)=>de.isAsyncFn(e)?function(...n){const a=n.pop();e.apply(this,n).then((e=>{try{t?a(null,...t(e)):a(null,e)}catch(e){a(e)}}),a)}:e;const ht=(e,t,n=3)=>{let a=0;const i=function(e,t){e=e||10;const n=new Array(e),a=new Array(e);let i,o=0,r=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=a[r];i||(i=c),n[o]=s,a[o]=c;let p=r,l=0;for(;p!==o;)l+=n[p++],p%=e;if(o=(o+1)%e,o===r&&(r=(r+1)%e),c-i{i=o,n=null,a&&(clearTimeout(a),a=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-i;s>=o?r(e,t):(n=e,a||(a=setTimeout((()=>{a=null,r(n)}),o-s)))},()=>n&&r(n)]}((n=>{const o=n.loaded,r=n.lengthComputable?n.total:void 0,s=o-a,c=i(s);a=o;e({loaded:o,total:r,progress:r?o/r:void 0,bytes:s,rate:c||void 0,estimated:c&&r&&o<=r?(r-o)/c:void 0,event:n,lengthComputable:null!=r,[t?"download":"upload"]:!0})}),n)},bt=(e,t)=>{const n=null!=e;return[a=>t[0]({lengthComputable:n,total:e,loaded:a}),t[1]]},yt=e=>(...t)=>de.asap((()=>e(...t))),gt={flush:P.default.constants.Z_SYNC_FLUSH,finishFlush:P.default.constants.Z_SYNC_FLUSH},wt={flush:P.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:P.default.constants.BROTLI_OPERATION_FLUSH},Et=de.isFunction(P.default.createBrotliDecompress),{http:Pt,https:kt}=E.default,_t=/https:?/,Ot=De.protocols.map((e=>e+":")),Tt=(e,[t,n])=>(e.on("end",n).on("error",n),t);function Nt(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function jt(e,t,n){let a=t;if(!a&&!1!==a){const e=b.default.getProxyForUrl(n);e&&(a=new URL(e))}if(a){if(a.username&&(a.auth=(a.username||"")+":"+(a.password||"")),a.auth){(a.auth.username||a.auth.password)&&(a.auth=(a.auth.username||"")+":"+(a.auth.password||""));const t=Buffer.from(a.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=a.hostname||a.host;e.hostname=t,e.host=t,e.port=a.port,e.path=n,a.protocol&&(e.protocol=a.protocol.includes(":")?a.protocol:`${a.protocol}:`)}e.beforeRedirects.proxy=function(e){jt(e,t,e.href)}}const Rt="undefined"!=typeof process&&"process"===de.kindOf(process),At=(e,t)=>(({address:e,family:t})=>{if(!de.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})(de.isObject(e)?e:{address:e,family:t}),St=Rt&&function(e){return t=async function(t,n,a){let{data:i,lookup:o,family:r}=e;const{responseType:s,responseEncoding:c}=e,u=e.method.toUpperCase();let p,l,d=!1;if(o){const e=xt(o,(e=>de.isArray(e)?e:[e]));o=(t,n,a)=>{e(t,n,((e,t,i)=>{if(e)return a(e);const o=de.isArray(t)?t.map((e=>At(e))):[At(t,i)];n.all?a(e,o):a(e,o[0].address,o[0].family)}))}}const f=new m.EventEmitter,v=()=>{e.cancelToken&&e.cancelToken.unsubscribe(x),e.signal&&e.signal.removeEventListener("abort",x),f.removeAllListeners()};function x(t){f.emit("abort",!t||t.type?new Qe(null,e,l):t)}a(((e,t)=>{p=!0,t&&(d=!0,v())})),f.once("abort",n),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(x),e.signal&&(e.signal.aborted?x():e.signal.addEventListener("abort",x)));const h=Ze(e.baseURL,e.url,e.allowAbsoluteUrls),b=new URL(h,De.hasBrowserEnv?De.origin:void 0),E=b.protocol||Ot[0];if("data:"===E){let a;if("GET"!==u)return Xe(t,n,{status:405,statusText:"method not allowed",headers:{},config:e});try{a=function(e,t,n){const a=n&&n.Blob||De.classes.Blob,i=tt(e);if(void 0===t&&a&&(t=!0),"data"===i){e=i.length?e.slice(i.length+1):e;const n=nt.exec(e);if(!n)throw new me("Invalid URL",me.ERR_INVALID_URL);const o=n[1],r=n[2],s=n[3],c=Buffer.from(decodeURIComponent(s),r?"base64":"utf8");if(t){if(!a)throw new me("Blob is not supported",me.ERR_NOT_SUPPORT);return new a([c],{type:o})}return c}throw new me("Unsupported protocol "+i,me.ERR_NOT_SUPPORT)}(e.url,"blob"===s,{Blob:e.env&&e.env.Blob})}catch(t){throw me.from(t,me.ERR_BAD_REQUEST,e)}return"text"===s?(a=a.toString(c),c&&"utf8"!==c||(a=de.stripBOM(a))):"stream"===s&&(a=k.default.Readable.from(a)),Xe(t,n,{data:a,status:200,statusText:"OK",headers:new Ye,config:e})}if(-1===Ot.indexOf(E))return n(new me("Unsupported protocol "+E,me.ERR_BAD_REQUEST,e));const _=Ye.from(e.headers).normalize();_.set("User-Agent","axios/"+et,!1);const{onUploadProgress:O,onDownloadProgress:T}=e,N=e.maxRate;let j,R;if(de.isSpecCompliantForm(i)){const e=_.getContentType(/boundary=([-_\w\d]{10,70})/i);i=mt(i,(e=>{_.set(e)}),{tag:`axios-${et}-boundary`,boundary:e&&e[1]||void 0})}else if(de.isFormData(i)&&de.isFunction(i.getHeaders)){if(_.set(i.getHeaders()),!_.hasContentLength())try{const e=await w.default.promisify(i.getLength).call(i);Number.isFinite(e)&&e>=0&&_.setContentLength(e)}catch(e){}}else if(de.isBlob(i)||de.isFile(i))i.size&&_.setContentType(i.type||"application/octet-stream"),_.setContentLength(i.size||0),i=k.default.Readable.from(st(i));else if(i&&!de.isStream(i)){if(Buffer.isBuffer(i));else if(de.isArrayBuffer(i))i=Buffer.from(new Uint8Array(i));else{if(!de.isString(i))return n(new me("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",me.ERR_BAD_REQUEST,e));i=Buffer.from(i,"utf-8")}if(_.setContentLength(i.length,!1),e.maxBodyLength>-1&&i.length>e.maxBodyLength)return n(new me("Request body larger than maxBodyLength limit",me.ERR_BAD_REQUEST,e))}const A=de.toFiniteNumber(_.getContentLength());let S,L;de.isArray(N)?(j=N[0],R=N[1]):j=R=N,i&&(O||j)&&(de.isStream(i)||(i=k.default.Readable.from(i,{objectMode:!1})),i=k.default.pipeline([i,new ot({maxRate:de.toFiniteNumber(j)})],de.noop),O&&i.on("progress",Tt(i,bt(A,ht(yt(O),!1,3))))),e.auth&&(S=(e.auth.username||"")+":"+(e.auth.password||"")),!S&&b.username&&(S=b.username+":"+b.password),S&&_.delete("authorization");try{L=_e(b.pathname+b.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const a=new Error(t.message);return a.config=e,a.url=e.url,a.exists=!0,n(a)}_.set("Accept-Encoding","gzip, compress, deflate"+(Et?", br":""),!1);const C={path:L,method:u,headers:_.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:S,protocol:E,family:r,beforeRedirect:Nt,beforeRedirects:{}};let I;!de.isUndefined(o)&&(C.lookup=o),e.socketPath?C.socketPath=e.socketPath:(C.hostname=b.hostname.startsWith("[")?b.hostname.slice(1,-1):b.hostname,C.port=b.port,jt(C,e.proxy,E+"//"+b.hostname+(b.port?":"+b.port:"")+C.path));const M=_t.test(C.protocol);if(C.agent=M?e.httpsAgent:e.httpAgent,e.transport?I=e.transport:0===e.maxRedirects?I=M?g.default:y.default:(e.maxRedirects&&(C.maxRedirects=e.maxRedirects),e.beforeRedirect&&(C.beforeRedirects.config=e.beforeRedirect),I=M?kt:Pt),e.maxBodyLength>-1?C.maxBodyLength=e.maxBodyLength:C.maxBodyLength=1/0,e.insecureHTTPParser&&(C.insecureHTTPParser=e.insecureHTTPParser),l=I.request(C,(function(a){if(l.destroyed)return;const i=[a],o=+a.headers["content-length"];if(T||R){const e=new ot({maxRate:de.toFiniteNumber(R)});T&&e.on("progress",Tt(e,bt(o,ht(yt(T),!0,3)))),i.push(e)}let r=a;const p=a.req||l;if(!1!==e.decompress&&a.headers["content-encoding"])switch("HEAD"!==u&&204!==a.statusCode||delete a.headers["content-encoding"],(a.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":i.push(P.default.createUnzip(gt)),delete a.headers["content-encoding"];break;case"deflate":i.push(new vt),i.push(P.default.createUnzip(gt)),delete a.headers["content-encoding"];break;case"br":Et&&(i.push(P.default.createBrotliDecompress(wt)),delete a.headers["content-encoding"])}r=i.length>1?k.default.pipeline(i,de.noop):i[0];const m=k.default.finished(r,(()=>{m(),v()})),x={status:a.statusCode,statusText:a.statusMessage,headers:new Ye(a.headers),config:e,request:p};if("stream"===s)x.data=r,Xe(t,n,x);else{const a=[];let i=0;r.on("data",(function(t){a.push(t),i+=t.length,e.maxContentLength>-1&&i>e.maxContentLength&&(d=!0,r.destroy(),n(new me("maxContentLength size of "+e.maxContentLength+" exceeded",me.ERR_BAD_RESPONSE,e,p)))})),r.on("aborted",(function(){if(d)return;const t=new me("stream has been aborted",me.ERR_BAD_RESPONSE,e,p);r.destroy(t),n(t)})),r.on("error",(function(t){l.destroyed||n(me.from(t,null,e,p))})),r.on("end",(function(){try{let e=1===a.length?a[0]:Buffer.concat(a);"arraybuffer"!==s&&(e=e.toString(c),c&&"utf8"!==c||(e=de.stripBOM(e))),x.data=e}catch(t){return n(me.from(t,null,e,x.request,x))}Xe(t,n,x)}))}f.once("abort",(e=>{r.destroyed||(r.emit("error",e),r.destroy())}))})),f.once("abort",(e=>{n(e),l.destroy(e)})),l.on("error",(function(t){n(me.from(t,null,e,l))})),l.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void n(new me("error trying to parse `config.timeout` to int",me.ERR_BAD_OPTION_VALUE,e,l));l.setTimeout(t,(function(){if(p)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const a=e.transitional||Te;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new me(t,a.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,l)),x()}))}if(de.isStream(i)){let t=!1,n=!1;i.on("end",(()=>{t=!0})),i.once("error",(e=>{n=!0,l.destroy(e)})),i.on("close",(()=>{t||n||x(new Qe("Request stream has been aborted",e,l))})),i.pipe(l)}else l.end(i)},new Promise(((e,n)=>{let a,i;const o=(e,t)=>{i||(i=!0,a&&a(e,t))},r=e=>{o(e,!0),n(e)};t((t=>{o(t),e(t)}),r,(e=>a=e)).catch(r)}));var t},Lt=De.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,De.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(De.origin),De.navigator&&/(msie|trident)/i.test(De.navigator.userAgent)):()=>!0,Ct=De.hasStandardBrowserEnv?{write(e,t,n,a,i,o){const r=[e+"="+encodeURIComponent(t)];de.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),de.isString(a)&&r.push("path="+a),de.isString(i)&&r.push("domain="+i),!0===o&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}},It=e=>e instanceof Ye?{...e}:e;function Mt(e,t){t=t||{};const n={};function a(e,t,n,a){return de.isPlainObject(e)&&de.isPlainObject(t)?de.merge.call({caseless:a},e,t):de.isPlainObject(t)?de.merge({},t):de.isArray(t)?t.slice():t}function i(e,t,n,i){return de.isUndefined(t)?de.isUndefined(e)?void 0:a(void 0,e,0,i):a(e,t,0,i)}function o(e,t){if(!de.isUndefined(t))return a(void 0,t)}function r(e,t){return de.isUndefined(t)?de.isUndefined(e)?void 0:a(void 0,e):a(void 0,t)}function s(n,i,o){return o in t?a(n,i):o in e?a(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:s,headers:(e,t,n)=>i(It(e),It(t),0,!0)};return de.forEach(Object.keys(Object.assign({},e,t)),(function(a){const o=c[a]||i,r=o(e[a],t[a],a);de.isUndefined(r)&&o!==s||(n[a]=r)})),n}const Ut=e=>{const t=Mt({},e);let n,{data:a,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:r,headers:s,auth:c}=t;if(t.headers=s=Ye.from(s),t.url=_e(Ze(t.baseURL,t.url),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),de.isFormData(a))if(De.hasStandardBrowserEnv||De.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(De.hasStandardBrowserEnv&&(i&&de.isFunction(i)&&(i=i(t)),i||!1!==i&&Lt(t.url))){const e=o&&r&&Ct.read(r);e&&s.set(o,e)}return t},Dt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const a=Ut(e);let i=a.data;const o=Ye.from(a.headers).normalize();let r,s,c,u,p,{responseType:l,onUploadProgress:d,onDownloadProgress:m}=a;function f(){u&&u(),p&&p(),a.cancelToken&&a.cancelToken.unsubscribe(r),a.signal&&a.signal.removeEventListener("abort",r)}let v=new XMLHttpRequest;function x(){if(!v)return;const a=Ye.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());Xe((function(e){t(e),f()}),(function(e){n(e),f()}),{data:l&&"text"!==l&&"json"!==l?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:a,config:e,request:v}),v=null}v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout,"onloadend"in v?v.onloadend=x:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(x)},v.onabort=function(){v&&(n(new me("Request aborted",me.ECONNABORTED,e,v)),v=null)},v.onerror=function(){n(new me("Network Error",me.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let t=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const i=a.transitional||Te;a.timeoutErrorMessage&&(t=a.timeoutErrorMessage),n(new me(t,i.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,v)),v=null},void 0===i&&o.setContentType(null),"setRequestHeader"in v&&de.forEach(o.toJSON(),(function(e,t){v.setRequestHeader(t,e)})),de.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),l&&"json"!==l&&(v.responseType=a.responseType),m&&([c,p]=ht(m,!0),v.addEventListener("progress",c)),d&&v.upload&&([s,u]=ht(d),v.upload.addEventListener("progress",s),v.upload.addEventListener("loadend",u)),(a.cancelToken||a.signal)&&(r=t=>{v&&(n(!t||t.type?new Qe(null,e,v):t),v.abort(),v=null)},a.cancelToken&&a.cancelToken.subscribe(r),a.signal&&(a.signal.aborted?r():a.signal.addEventListener("abort",r)));const h=tt(a.url);h&&-1===De.protocols.indexOf(h)?n(new me("Unsupported protocol "+h+":",me.ERR_BAD_REQUEST,e)):v.send(i||null)}))},Bt=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,a=new AbortController;const i=function(e){if(!n){n=!0,r();const t=e instanceof Error?e:this.reason;a.abort(t instanceof me?t:new Qe(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,i(new me(`timeout ${t} of ms exceeded`,me.ETIMEDOUT))}),t);const r=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:s}=a;return s.unsubscribe=()=>de.asap(r),s}},Ft=function*(e,t){let n=e.byteLength;if(!t||n{const i=async function*(e,t){for await(const n of zt(e))yield*Ft(n,t)}(e,t);let o,r=0,s=e=>{o||(o=!0,a&&a(e))};return new ReadableStream({async pull(e){try{const{done:t,value:a}=await i.next();if(t)return s(),void e.close();let o=a.byteLength;if(n){let e=r+=o;n(e)}e.enqueue(new Uint8Array(a))}catch(e){throw s(e),e}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},Ht="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Vt=Ht&&"function"==typeof ReadableStream,Kt=Ht&&("function"==typeof TextEncoder?(Gt=new TextEncoder,e=>Gt.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Gt;const Wt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Yt=Vt&&Wt((()=>{let e=!1;const t=new Request(De.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Jt=Vt&&Wt((()=>de.isReadableStream(new Response("").body))),$t={stream:Jt&&(e=>e.body)};var Qt;Ht&&(Qt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!$t[e]&&($t[e]=de.isFunction(Qt[e])?t=>t[e]():(t,n)=>{throw new me(`Response type '${e}' is not supported`,me.ERR_NOT_SUPPORT,n)})})));const Xt=async(e,t)=>{const n=de.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(de.isBlob(e))return e.size;if(de.isSpecCompliantForm(e)){const t=new Request(De.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return de.isArrayBufferView(e)||de.isArrayBuffer(e)?e.byteLength:(de.isURLSearchParams(e)&&(e+=""),de.isString(e)?(await Kt(e)).byteLength:void 0)})(t):n},Zt=Ht&&(async e=>{let{url:t,method:n,data:a,signal:i,cancelToken:o,timeout:r,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:p,withCredentials:l="same-origin",fetchOptions:d}=Ut(e);u=u?(u+"").toLowerCase():"text";let m,f=Bt([i,o&&o.toAbortSignal()],r);const v=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let x;try{if(c&&Yt&&"get"!==n&&"head"!==n&&0!==(x=await Xt(p,a))){let e,n=new Request(t,{method:"POST",body:a,duplex:"half"});if(de.isFormData(a)&&(e=n.headers.get("content-type"))&&p.setContentType(e),n.body){const[e,t]=bt(x,ht(yt(c)));a=qt(n.body,65536,e,t)}}de.isString(l)||(l=l?"include":"omit");const i="credentials"in Request.prototype;m=new Request(t,{...d,signal:f,method:n.toUpperCase(),headers:p.normalize().toJSON(),body:a,duplex:"half",credentials:i?l:void 0});let o=await fetch(m);const r=Jt&&("stream"===u||"response"===u);if(Jt&&(s||r&&v)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=de.toFiniteNumber(o.headers.get("content-length")),[n,a]=s&&bt(t,ht(yt(s),!0))||[];o=new Response(qt(o.body,65536,n,(()=>{a&&a(),v&&v()})),e)}u=u||"text";let h=await $t[de.findKey($t,u)||"text"](o,e);return!r&&v&&v(),await new Promise(((t,n)=>{Xe(t,n,{data:h,headers:Ye.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:m})}))}catch(t){if(v&&v(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new me("Network Error",me.ERR_NETWORK,e,m),{cause:t.cause||t});throw me.from(t,t&&t.code,e,m)}}),en={http:St,xhr:Dt,fetch:Zt};de.forEach(en,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const tn=e=>`- ${e}`,nn=e=>de.isFunction(e)||null===e||!1===e,an=e=>{e=de.isArray(e)?e:[e];const{length:t}=e;let n,a;const i={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new me("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(tn).join("\n"):" "+tn(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return a};function on(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Qe(null,e)}function rn(e){on(e),e.headers=Ye.from(e.headers),e.data=Je.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return an(e.adapter||ze.adapter)(e).then((function(t){return on(e),t.data=Je.call(e,e.transformResponse,t),t.headers=Ye.from(t.headers),t}),(function(t){return $e(t)||(on(e),t&&t.response&&(t.response.data=Je.call(e,e.transformResponse,t.response),t.response.headers=Ye.from(t.response.headers))),Promise.reject(t)}))}const sn={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{sn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const cn={};sn.transitional=function(e,t,n){function a(e,t){return"[Axios v1.8.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new me(a(i," has been removed"+(t?" in "+t:"")),me.ERR_DEPRECATED);return t&&!cn[i]&&(cn[i]=!0,console.warn(a(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}},sn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const un={assertOptions:function(e,t,n){if("object"!=typeof e)throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let i=a.length;for(;i-- >0;){const o=a[i],r=t[o];if(r){const t=e[o],n=void 0===t||r(t,o,e);if(!0!==n)throw new me("option "+o+" must be "+n,me.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new me("Unknown option "+o,me.ERR_BAD_OPTION)}},validators:sn},pn=un.validators;class ln{constructor(e){this.defaults=e,this.interceptors={request:new Oe,response:new Oe}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Mt(this.defaults,t);const{transitional:n,paramsSerializer:a,headers:i}=t;void 0!==n&&un.assertOptions(n,{silentJSONParsing:pn.transitional(pn.boolean),forcedJSONParsing:pn.transitional(pn.boolean),clarifyTimeoutError:pn.transitional(pn.boolean)},!1),null!=a&&(de.isFunction(a)?t.paramsSerializer={serialize:a}:un.assertOptions(a,{encode:pn.function,serialize:pn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),un.assertOptions(t,{baseUrl:pn.spelling("baseURL"),withXsrfToken:pn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&de.merge(i.common,i[t.method]);i&&de.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Ye.concat(o,i);const r=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let p,l=0;if(!s){const e=[rn.bind(this),void 0];for(e.unshift.apply(e,r),e.push.apply(e,c),p=e.length,u=Promise.resolve(t);l{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const a=new Promise((e=>{n.subscribe(e),t=e})).then(e);return a.cancel=function(){n.unsubscribe(t)},a},e((function(e,a,i){n.reason||(n.reason=new Qe(e,a,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new mn((function(t){e=t})),cancel:e}}}const fn=mn;const vn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vn).forEach((([e,t])=>{vn[t]=e}));const xn=vn;const hn=function e(t){const n=new dn(t),a=_(dn.prototype.request,n);return de.extend(a,dn.prototype,n,{allOwnKeys:!0}),de.extend(a,n,null,{allOwnKeys:!0}),a.create=function(n){return e(Mt(t,n))},a}(ze);hn.Axios=dn,hn.CanceledError=Qe,hn.CancelToken=fn,hn.isCancel=$e,hn.VERSION=et,hn.toFormData=ge,hn.AxiosError=me,hn.Cancel=hn.CanceledError,hn.all=function(e){return Promise.all(e)},hn.spread=function(e){return function(t){return e.apply(null,t)}},hn.isAxiosError=function(e){return de.isObject(e)&&!0===e.isAxiosError},hn.mergeConfig=Mt,hn.AxiosHeaders=Ye,hn.formToJSON=e=>Be(de.isHTMLForm(e)?new FormData(e):e),hn.getAdapter=an,hn.HttpStatusCode=xn,hn.default=hn,e.exports=hn},9353:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,a=function(e,t){for(var n=[],a=0;a{"use strict";e.exports=Error},9500:e=>{e.exports=function(e,t){var n=!Array.isArray(e),a={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};t&&a.keyedList.sort(n?t:function(n,a){return t(e[n],e[a])});return a}},9511:(e,t,n)=>{var a=n(5636);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},9538:e=>{"use strict";e.exports=ReferenceError},9552:(e,t,n)=>{var a=n(3072);e.exports=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=a(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},9605:(e,t,n)=>{"use strict";var a=n(453)("%Object.defineProperty%",!0),i=n(9092)(),o=n(9957),r=n(9675),s=i?Symbol.toStringTag:null;e.exports=function(e,t){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(void 0!==n&&"boolean"!=typeof n||void 0!==i&&"boolean"!=typeof i)throw new r("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");!s||!n&&o(e,s)||(a?a(e,s,{configurable:!i,enumerable:!1,value:t,writable:!1}):e[s]=t)}},9612:e=>{"use strict";e.exports=Object},9633:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(635));function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}t.default=function(e){function t(e){return(0,i.default)(this,t),n=this,a=t,o=[{properties:e,casts:{number:"string",active:"boolean",name:"string",price:"double",currency:"string"}}],a=(0,s.default)(a),(0,r.default)(n,p()?Reflect.construct(a,o||[],(0,s.default)(n).constructor):a.apply(n,o));var n,a,o}return(0,c.default)(t,e),(0,o.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setDescription",value:function(e){return this.setProperty("description",e)}},{key:"getDescription",value:function(e){return this.getProperty("description",e)}},{key:"setPrice",value:function(e){return this.setProperty("price",e)}},{key:"getPrice",value:function(e){return this.getProperty("price",e)}},{key:"setCurrency",value:function(e){return this.setProperty("currency",e)}},{key:"getCurrency",value:function(e){return this.getProperty("currency",e)}},{key:"setLicenseTemplateNumbers",value:function(e){var t=Array.isArray(e)?e.join(","):e;return this.setProperty("licenseTemplateNumbers",t)}},{key:"getLicenseTemplateNumbers",value:function(e){var t=this.getProperty("licenseTemplateNumbers",e);return t?t.split(","):t}},{key:"addLicenseTemplateNumber",value:function(e){var t=this.getLicenseTemplateNumbers([]);return t.push(e),this.setLicenseTemplateNumbers(t)}},{key:"removeLicenseTemplateNumber",value:function(e){var t=this.getLicenseTemplateNumbers([]);return t.splice(t.indexOf(e),1),this.setLicenseTemplateNumbers(t)}}])}(u.default)},9646:(e,t,n)=>{var a=n(7550),i=n(5636);e.exports=function(e,t,n){if(a())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var r=new(e.bind.apply(e,o));return n&&i(r,n.prototype),r},e.exports.__esModule=!0,e.exports.default=e.exports},9675:e=>{"use strict";e.exports=TypeError},9896:e=>{"use strict";e.exports=require("fs")},9899:(e,t,n)=>{"use strict";var a=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(7383)),o=a(n(4579)),r=a(n(8452)),s=a(n(3072)),c=a(n(9511)),u=a(n(635));function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}t.default=function(e){function t(e){return(0,i.default)(this,t),n=this,a=t,o=[{properties:e,casts:{number:"string",active:"boolean",name:"string",licenseeSecret:"string",markedForTransfer:"boolean",inUse:"boolean"}}],a=(0,s.default)(a),(0,r.default)(n,p()?Reflect.construct(a,o||[],(0,s.default)(n).constructor):a.apply(n,o));var n,a,o}return(0,c.default)(t,e),(0,o.default)(t,[{key:"setNumber",value:function(e){return this.setProperty("number",e)}},{key:"getNumber",value:function(e){return this.getProperty("number",e)}},{key:"setActive",value:function(e){return this.setProperty("active",e)}},{key:"getActive",value:function(e){return this.getProperty("active",e)}},{key:"setName",value:function(e){return this.setProperty("name",e)}},{key:"getName",value:function(e){return this.getProperty("name",e)}},{key:"setProductNumber",value:function(e){return this.setProperty("productNumber",e)}},{key:"getProductNumber",value:function(e){return this.getProperty("productNumber",e)}},{key:"setLicenseeSecret",value:function(e){return this.setProperty("licenseeSecret",e)}},{key:"getLicenseeSecret",value:function(e){return this.getProperty("licenseeSecret",e)}},{key:"setMarkedForTransfer",value:function(e){return this.setProperty("markedForTransfer",e)}},{key:"getMarkedForTransfer",value:function(e){return this.getProperty("markedForTransfer",e)}},{key:"getInUse",value:function(e){return this.getProperty("inUse",e)}}])}(u.default)},9957:(e,t,n)=>{"use strict";var a=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=n(6743);e.exports=o.call(a,i)}},t={};function n(a){var i=t[a];if(void 0!==i)return i.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var a={};return(()=>{"use strict";var e=a,t=n(4994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseEntity",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(e,"Bundle",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(e,"BundleService",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"CastsUtils",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(e,"CheckUtils",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(e,"Constants",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"Context",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"Country",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"FilterUtils",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(e,"License",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"LicenseService",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"LicenseTemplate",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(e,"LicenseTemplateService",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"LicenseTransactionJoin",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"Licensee",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"LicenseeService",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"NlicError",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(e,"NotificationService",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"PaymentMethod",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(e,"PaymentMethodService",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"Product",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(e,"ProductDiscount",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(e,"ProductModule",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(e,"ProductModuleService",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"ProductService",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"Service",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"Token",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(e,"TokenService",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,"Transaction",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(e,"TransactionService",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"UtilityService",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"ValidationParameters",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ValidationResults",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"itemToBundle",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(e,"itemToCountry",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,"itemToLicense",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(e,"itemToLicenseTemplate",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(e,"itemToLicensee",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(e,"itemToObject",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(e,"itemToPaymentMethod",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(e,"itemToProduct",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(e,"itemToProductModule",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(e,"itemToToken",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(e,"itemToTransaction",{enumerable:!0,get:function(){return V.default}});var i=t(n(6232)),o=t(n(2302)),r=t(n(4034)),s=t(n(662)),c=t(n(8506)),u=t(n(3401)),p=t(n(7211)),l=t(n(7394)),d=t(n(3140)),m=t(n(6798)),f=t(n(3950)),v=t(n(5114)),x=t(n(5192)),h=t(n(2579)),b=t(n(6359)),y=t(n(9089)),g=t(n(1692)),w=t(n(635)),E=t(n(7147)),P=t(n(1938)),k=t(n(9899)),_=t(n(2476)),O=t(n(3014)),T=t(n(3262)),N=t(n(1721)),j=t(n(9142)),R=t(n(584)),A=t(n(269)),S=t(n(3716)),L=t(n(9633)),C=t(n(5454)),I=t(n(6899)),M=t(n(5402)),U=t(n(4067)),D=t(n(52)),B=t(n(670)),F=t(n(2430)),z=t(n(822)),q=t(n(4398)),H=t(n(3648)),V=t(n(1717)),K=t(n(3849)),G=t(n(8769)),W=t(n(1305)),Y=t(n(8833)),J=t(n(6469))})(),a})())); \ No newline at end of file diff --git a/dist/netlicensing-client.node.min.js.LICENSE.txt b/dist/netlicensing-client.node.min.js.LICENSE.txt deleted file mode 100644 index 856ae0b..0000000 --- a/dist/netlicensing-client.node.min.js.LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -/*! Axios v1.8.2 Copyright (c) 2025 Matt Zabriskie and contributors */ - -/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ - -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ diff --git a/docs/client-demo.html b/docs/client-demo.html deleted file mode 100644 index b1d99b3..0000000 --- a/docs/client-demo.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Labs64 NetLicensing JavaScript Client Demo - - - - - - -

Labs64 NetLicensing
JavaScript Client - Demo

-

This demo showcases RESTful API access - to NetLicensing’s core features.

-

- - -

- - - - diff --git a/docs/client-demo.js b/docs/client-demo.js deleted file mode 100644 index f5103cf..0000000 --- a/docs/client-demo.js +++ /dev/null @@ -1,414 +0,0 @@ -var NetLicensingDemo = function () { - var context = new NetLicensing.Context().setUsername('demo').setPassword('demo'); - - var randomNumber = Math.random().toString(36).slice(2); - var productNumber = numberWithPrefix("P", randomNumber); - var productModuleNumber = numberWithPrefix("M", randomNumber); - var licenseTemplateNumber = numberWithPrefix("E", randomNumber); - var licenseeNumber = numberWithPrefix("I", randomNumber); - var licenseNumber = numberWithPrefix("L", randomNumber); - - // region ********* Utilities - - console.log("==> UtilityService"); - - var UtilityServicePromise = Promise.resolve() - .then(function () { - return NetLicensing.UtilityService.listLicenseTypes(context); - }) - .then(function (listLicenseTypes) { - console.log("UtilityService.listLicenseTypes() :", listLicenseTypes); - return NetLicensing.UtilityService.listLicensingModels(context); - }) - .then(function (listLicensingModels) { - console.log("UtilityService.listLicensingModels() :", listLicensingModels); - return NetLicensing.UtilityService.listCountries(context); - }) - .then(function (listCountries) { - console.log("UtilityService.listCountries() :", listCountries); - }); - - // endregion - - // region ********* Product - - var product = new NetLicensing.Product() - .setNumber(productNumber) - .setName(numberWithPrefix("Product-", Math.random().toString(36).slice(2))); - - var ProductServicePromise = UtilityServicePromise.then(function () { - console.log("==> ProductService"); - - return NetLicensing.ProductService.create(context, product) - .then(function (createdProduct) { - console.log("ProductService.create() :", createdProduct); - return NetLicensing.ProductService.get(context, createdProduct.getNumber()); - }) - .then(function (getProduct) { - console.log("ProductService.get() :", getProduct); - var listProducts = NetLicensing.ProductService.list(context); - return getProduct; - }) - .then(function (listProducts) { - console.log("ProductService.list() :", listProducts); - product.setProperty("Updated Property", "Property Value"); - return NetLicensing.ProductService.update(context, product.getNumber(), product) - }) - .then(function (updatedProduct) { - console.log("ProductService.update() :", updatedProduct); - return NetLicensing.ProductService.delete(context, productNumber, true); - }) - .then(function () { - console.log("ProductService.delete()"); - var listProducts = NetLicensing.ProductService.list(context); - }) - .then(function (listProducts) { - console.log("ProductService.list() :", listProducts); - // Recreate Product for later use - return NetLicensing.ProductService.create(context, product); - }) - .then(function (createdProduct) { - console.log("ProductService.create() :", createdProduct); - return createdProduct; - }); - }); - - // endregion - - // region ********* ProductModule - - - - var productModule = new NetLicensing.ProductModule() - .setNumber(productModuleNumber) - .setName(numberWithPrefix("ProductModule-", Math.random().toString(36).slice(2))) - .setLicensingModel(NetLicensing.Constants.LicensingModel.TryAndBuy.NAME); - - var ProductModuleServicePromise = ProductServicePromise.then(function (createdProduct) { - console.log("==> ProductModuleService"); - return NetLicensing.ProductModuleService.create(context, createdProduct.getNumber(), productModule) - .then(function (createdProductModule) { - console.log("ProductModuleService.create() :", createdProductModule); - return NetLicensing.ProductModuleService.get(context, createdProductModule.getNumber()); - }) - .then(function (getProductModule) { - console.log("ProductModuleService.get() :", getProductModule); - return NetLicensing.ProductModuleService.list(context); - }) - .then(function (listProductModules) { - console.log("ProductModuleService.list() :", listProductModules); - productModule.setProperty("Updated Property", "Property Value"); - return NetLicensing.ProductModuleService.update(context, productModule.getNumber(), productModule); - }) - .then(function (updatedProductModule) { - console.log("ProductModuleService.update() :", updatedProductModule); - return NetLicensing.ProductModuleService.delete(context, productModuleNumber, true); - }) - .then(function () { - console.log("ProductModuleService.delete() :"); - return NetLicensing.ProductModuleService.list(context); - }) - .then(function (listProductModules) { - console.log("ProductModuleService.list() :", listProductModules); - // Recreate ProductModule for later use - return NetLicensing.ProductModuleService.create(context, productNumber, productModule); - }) - .then(function (createdProductModule) { - console.log("ProductModuleService.create() :", productModule); - return createdProductModule; - }); - }); - - // endregion - - // region ********* LicenseTemplate - - var licenseTemplate = new NetLicensing.LicenseTemplate() - .setNumber(licenseTemplateNumber) - .setName(numberWithPrefix("LicenseTemplate-", Math.random().toString(36).slice(2))) - .setLicenseType(NetLicensing.Constants.LicenseTemplate.LicenseType.FEATURE) - .setPrice("12.5") - .setCurrency("EUR") - .setAutomatic(false) - .setHidden(false); - - var LicenseTemplateServicePromise = ProductModuleServicePromise.then(function (createdProductModule) { - console.log("==> LicenseTemplateService"); - return NetLicensing.LicenseTemplateService.create(context, createdProductModule.getNumber(), licenseTemplate) - .then(function (createdLicenseTemplate) { - console.log("LicenseTemplateService.create() :", createdLicenseTemplate); - return NetLicensing.LicenseTemplateService.get(context, createdLicenseTemplate.getNumber()); - }) - .then(function (getLicenseTemplate) { - console.log("LicenseTemplateService.get() :", getLicenseTemplate); - return NetLicensing.LicenseTemplateService.list(context); - }) - .then(function (listLicenseTemplate) { - console.log("LicenseTemplateService.list() :", listLicenseTemplate); - licenseTemplate.setProperty("Updated Property", "Updated Value"); - return NetLicensing.LicenseTemplateService.update(context, licenseTemplateNumber, licenseTemplate); - }) - .then(function (updatedLicenseTemplate) { - console.log("LicenseTemplateService.update() :", updatedLicenseTemplate); - return NetLicensing.LicenseTemplateService.delete(context, updatedLicenseTemplate.getNumber(), true); - }) - .then(function () { - console.log("LicenseTemplateService.delete() :"); - return NetLicensing.LicenseTemplateService.list(context); - }) - .then(function (listLicenseTemplate) { - console.log("LicenseTemplateService.list() :", listLicenseTemplate); - // Create LicenseTemplate for later use - return NetLicensing.LicenseTemplateService.create(context, createdProductModule.getNumber(), licenseTemplate); - }).then(function (createdLicenseTemplate) { - console.log("LicenseTemplateService.create() :", createdLicenseTemplate); - return createdLicenseTemplate; - }) - }) - - // endregion - - // region ********* Licensee - - var licensee = new NetLicensing.Licensee() - .setNumber(licenseeNumber) - .setName(licenseeNumber+"na"); - - var LicenseeServicePromise = LicenseTemplateServicePromise.then(function (createdLicenseTemplate) { - console.log("==> LicenseeService"); - return NetLicensing.LicenseeService.create(context, productNumber, licensee) - .then(function (createdLicensee) { - console.log("LicenseeService.create() :", createdLicensee); - return NetLicensing.LicenseeService.get(context, createdLicensee.getNumber()); - }) - .then(function (getLicensee) { - console.log("LicenseeService.get() :", getLicensee); - return NetLicensing.LicenseeService.list(context); - }) - .then(function (listLicensee) { - console.log("LicenseeService.list() :", listLicensee); - - licensee.setProperty("Updated Property", "Updated Value"); - return NetLicensing.LicenseeService.update(context, licenseeNumber, licensee); - }) - .then(function (updatedLicensee) { - console.log("LicenseeService.update() :", updatedLicensee); - return NetLicensing.LicenseeService.delete(context, updatedLicensee.getNumber(), true); - }) - .then(function () { - console.log("LicenseeService.delete() :"); - return NetLicensing.LicenseeService.list(context); - }) - .then(function (listLicensees) { - console.log("LicenseeService.list() :", listLicensees); - // Create Licensee for later use - return NetLicensing.LicenseeService.create(context, productNumber, licensee); - }).then(function (createdLicensee) { - console.log("LicenseeService.create() :", createdLicensee); - return createdLicensee; - }) - }) - - // endregion - - // region ********* License - - var license = new NetLicensing.License() - .setNumber(licenseNumber); - - var LicenseServicePromise = LicenseeServicePromise.then(function (createdLicensee) { - console.log("==> LicenseService"); - return NetLicensing.LicenseService.create(context, licenseeNumber, licenseTemplateNumber, null, license) - .then(function (createdLicense) { - console.log("LicenseService.create() :", createdLicense); - return NetLicensing.LicenseService.get(context, createdLicense.getNumber()); - }) - .then(function (getLicense) { - console.log("LicenseService.get() :", getLicense); - return NetLicensing.LicenseService.list(context); - }) - .then(function (listLicenses) { - console.log("LicenseService.list() :", listLicenses); - license.setProperty("Updated Property", "Updated Value"); - return NetLicensing.LicenseService.update(context, licenseNumber, null, license); - }) - .then(function (updatedLicense) { - console.log("LicenseService.update() :", updatedLicense); - return NetLicensing.LicenseService.delete(context, updatedLicense.getNumber(), true); - }) - .then(function () { - console.log("LicenseService.delete() :"); - return NetLicensing.LicenseService.list(context); - }) - .then(function (listLicenses) { - console.log("LicenseService.list() :", listLicenses); - // Create License for later use - return NetLicensing.LicenseService.create(context, licenseeNumber, licenseTemplateNumber, null, license); - }).then(function (createdLicense) { - console.log("LicenseService.create() :", createdLicense); - return createdLicense; - }) - }) - - // endregion - - // region ********* PaymentMethod - - var PaymentMethodsServicePromise = LicenseServicePromise.then(function () { - console.log("==> PaymentMethodService"); - return NetLicensing.PaymentMethodService.list(context) - .then(function (paymentMethods) { - console.log("PaymentMethodService.list() :", paymentMethods); - return paymentMethods; - }) - }) - - // endregion - - // region ********* Token - var token = new NetLicensing.Token() - .setTokenType("APIKEY"); - - var TokenServicePromise = PaymentMethodsServicePromise.then(function () { - console.log("==> TokenService"); - - return NetLicensing.TokenService.create(context, token) - .then(function (createdToken) { - console.log("TokenService.create(APIKEY) :", createdToken); - context.setApiKey(createdToken.getNumber()); - context.setSecurityMode(NetLicensing.Constants.APIKEY_IDENTIFICATION); - - token.setTokenType("SHOP"); - token.setLicenseeNumber(licenseeNumber); - - return NetLicensing.TokenService.create(context, token); - }) - .then(function (shopToken) { - console.log("TokenService.create(SHOP) :", shopToken); - context.setSecurityMode(NetLicensing.Constants.BASIC_AUTHENTICATION); - return [shopToken, NetLicensing.TokenService.list(context, "tokenType=SHOP")]; - }) - .then(function (shopTokenArray) { - console.log("TokenService.list(SHOP) :", shopTokenArray[1]); - console.log("TokenService.delete() :"); - return NetLicensing.TokenService.delete(context, shopTokenArray[0].getNumber()); - }) - .then(function (shopTokenDelete) { - return NetLicensing.TokenService.list(context, "tokenType=SHOP"); - }) - .then(function (shopTokenList) { - console.log("TokenService.list(SHOP) :", shopTokenList); - return shopTokenList; - }) - }) - - // endregion - - // region ********* Validate - - var validationParameters = new NetLicensing.ValidationParameters() - .setProductNumber(productNumber) - .setLicenseeName(numberWithPrefix("Licensee-", Math.random().toString(36).slice(2))) - .setProductModuleValidationParameters(productModuleNumber, { - key: "paramKey", - value: "paramValue" - }); - - - var ValidationPromise = TokenServicePromise.then(function () { - console.log("==> Validation"); - - return NetLicensing.LicenseeService.validate(context, licenseeNumber, validationParameters) - .then(function (validationResult) { - console.log("LicenseeService.validate(APIKEY_IDENTIFICATION) :", validationResult.getValidators()); - context.setSecurityMode(NetLicensing.Constants.APIKEY_IDENTIFICATION); - return NetLicensing.LicenseeService.validate(context, licenseeNumber, validationParameters) - }) - .then(function (validationResult) { - context.setSecurityMode(NetLicensing.Constants.BASIC_AUTHENTICATION); - console.log("LicenseeService.validate(BASIC_AUTHENTICATION) :", validationResult.getValidators()); - return validationResult; - }) - }) - - // endregion - - // region ********* Transfer - - var TransferPromise = ValidationPromise.then(function () { - console.log("==> Transfer"); - var transferLicensee = new NetLicensing.Licensee() - .setNumber("TR" + licenseeNumber) - .setMarkedForTransfer(true); - - return NetLicensing.LicenseeService.create(context, productNumber, transferLicensee) - .then(function (transferLicensee) { - console.log("LicenseeService.create(transfer-from) :", transferLicensee); - var transferLicense = new NetLicensing.License() - .setNumber("TR" + licenseNumber); - - return NetLicensing.LicenseService.create(context, transferLicensee.getNumber(), - licenseTemplateNumber, null, transferLicense) - }) - .then(function (newTransferLicense) { - console.log("LicenseeService.create(transfer-to) :", newTransferLicense); - return NetLicensing.LicenseeService.transfer(context, licensee.getNumber(), transferLicensee.getNumber()); - }) - .then(function () { - return NetLicensing.LicenseService.list(context, "licenseeNumber=" + licensee.getNumber()); - }) - .then(function (licenseList) { - console.log("LicenseeService.list(transfer) :", licenseList); - return licenseList; - }) - }) - - var TransferWithApiKeyPromise = TransferPromise.then(function () { - var transferLicenseeWithApiKey = new NetLicensing.Licensee() - .setNumber("AP" + licenseeNumber) - .setMarkedForTransfer(true); - - return NetLicensing.LicenseeService.create(context, productNumber, transferLicenseeWithApiKey) - .then(function (transferLicenseeWithApiKey) { - console.log("LicenseeService.create(transfer-from) :", transferLicenseeWithApiKey); - var transferLicenseWithApiKey = new NetLicensing.License() - .setNumber("AP" + licenseNumber); - - return NetLicensing.LicenseService.create(context, transferLicenseeWithApiKey.getNumber(), - licenseTemplateNumber, null, transferLicenseWithApiKey) - }) - .then(function (newTransferLicense) { - console.log("LicenseeService.create(transfer-to) :", newTransferLicense); - context.setSecurityMode(NetLicensing.Constants.APIKEY_IDENTIFICATION); - return NetLicensing.LicenseeService.transfer(context, licensee.getNumber(), transferLicenseeWithApiKey.getNumber()); - }) - .then(function (newTransferLicense) { - context.setSecurityMode(NetLicensing.Constants.BASIC_AUTHENTICATION); - return NetLicensing.LicenseService.list(context, "licenseeNumber=" + licensee.getNumber()); - }) - .then(function (licenseList) { - console.log("LicenseeService.list(transfer) :", licenseList); - return licenseList; - }) - }); - - // endregion - - // region ********* CleanUp - - var cleanUp = TransferWithApiKeyPromise.then(function () { - console.log("All done."); - return NetLicensing.ProductService.delete(context, productNumber, true); - - }); - // endregion -}; - - -function numberWithPrefix(prefix, number) { - return prefix.concat(number).concat("-DEMO"); -} - -function clearBox(elementID) { - document.getElementById(elementID).innerHTML = ""; -} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..d8217eb --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,84 @@ +import { defineConfig } from 'eslint/config'; +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import importPlugin from 'eslint-plugin-import'; +import pluginVitest from '@vitest/eslint-plugin'; + +export default defineConfig([ + eslint.configs.recommended, + + ...tseslint.configs.recommended, + ...tseslint.configs.recommendedTypeChecked, + ...tseslint.configs.stylistic, + + { + ...pluginVitest.configs.recommended, + files: ['**/*.spec.ts', '**/*.test.ts'], + }, + + { + files: ['**/*.ts'], + + languageOptions: { + parser: tseslint.parser, + parserOptions: { + project: ['./tsconfig.json'], + }, + }, + + plugins: { + import: importPlugin, + }, + + ignores: ['/node_modules', '/dist'], + + rules: { + // General + 'no-console': 'warn', + 'no-param-reassign': ['error', { props: false }], + 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], + 'func-names': ['error', 'never'], + 'no-shadow': 'error', + + // Formatting / Style + 'comma-dangle': ['error', 'always-multiline'], + 'indent': 'off', // required for indent-legacy + 'indent-legacy': ['error', 2, { SwitchCase: 1 }], + 'linebreak-style': 'off', + 'max-len': ['error', 120, { ignoreTrailingComments: true }], + 'object-curly-newline': ['error', { consistent: true }], + + // Import plugin + 'import/order': ['warn', { + alphabetize: { + order: 'asc', + caseInsensitive: true, + }, + groups: [ + 'builtin', + 'external', + 'internal', + 'parent', + 'sibling', + 'index', + ], + pathGroups: [ + { + pattern: '@/**', + group: 'internal', + position: 'before', + }, + { + pattern: '@test-utils/**', + group: 'internal', + position: 'before', + }, + ], + pathGroupsExcludedImportTypes: ['builtin'], + }], + + // TypeScript-specific + '@typescript-eslint/no-unused-vars': ['error', { caughtErrors: 'none' }], + }, + }, +]); diff --git a/package-lock.json b/package-lock.json index d185ddd..0ec3721 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9040 +1,5803 @@ { - "name": "netlicensing-client", - "version": "1.2.39", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "netlicensing-client", - "version": "1.2.39", - "license": "Apache-2.0", - "dependencies": { - "axios": "^1.8.2", - "btoa": "^1.2.1", - "es6-promise": "^4.2.8" - }, - "devDependencies": { - "@babel/core": "^7.26.9", - "@babel/plugin-proposal-class-properties": "^7.16.7", - "@babel/plugin-proposal-decorators": "^7.25.9", - "@babel/plugin-proposal-export-namespace-from": "^7.16.7", - "@babel/plugin-proposal-function-sent": "^7.25.9", - "@babel/plugin-proposal-json-strings": "^7.16.7", - "@babel/plugin-proposal-numeric-separator": "^7.16.7", - "@babel/plugin-proposal-throw-expressions": "^7.25.9", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-transform-modules-commonjs": "^7.26.3", - "@babel/plugin-transform-runtime": "^7.26.9", - "@babel/preset-env": "^7.26.9", - "@babel/runtime": "^7.26.9", - "axios-mock-adapter": "^2.1.0", - "babel-eslint": "^10.1.0", - "babel-loader": "^9.2.1", - "chalk": "^4.1.2", - "eslint": "^8.2.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-friendly-formatter": "^4.0.1", - "eslint-import-resolver-webpack": "^0.13.10", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jasmine": "^4.2.2", - "eslint-webpack-plugin": "^4.2.0", - "faker": "^5.5.3", - "is-docker": "^2.2.1", - "jasmine": "^4.0.2", - "jasmine-core": "^4.0.1", - "karma": "^6.3.17", - "karma-chrome-launcher": "^3.1.0", - "karma-firefox-launcher": "^2.1.2", - "karma-jasmine": "^4.0.2", - "karma-sourcemap-loader": "^0.3.7", - "karma-spec-reporter": "0.0.33", - "karma-webpack": "^5.0.0", - "lodash": "^4.17.21", - "ora": "^5.4.1", - "rimraf": "^3.0.2", - "terser-webpack-plugin": "^5.3.1", - "webpack": "^5.76.0", - "webpack-cli": "^5.1.1", - "webpack-merge": "^5.8.0" - }, - "engines": { - "node": ">= 14.0.0", - "npm": ">= 8.0.0" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", - "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz", - "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.9", - "@babel/parser": "^7.26.9", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.9", - "@babel/types": "^7.26.9", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz", - "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.26.9", - "@babel/types": "^7.26.9", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", - "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", - "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.26.5", - "@babel/helper-validator-option": "^7.25.9", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.26.9.tgz", - "integrity": "sha512-ubbUqCofvxPRurw5L8WTsCLSkQiVpov4Qx0WMA+jUN+nXBK8ADPlJO1grkFw5CWKC5+sZSOfuGMdX1aI1iT9Sg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.9", - "@babel/helper-member-expression-to-functions": "^7.25.9", - "@babel/helper-optimise-call-expression": "^7.25.9", - "@babel/helper-replace-supers": "^7.26.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", - "@babel/traverse": "^7.26.9", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.26.3.tgz", - "integrity": "sha512-G7ZRb40uUgdKOQqPLjfD12ZmGA54PzqDFUv2BKImnC9QIfGhIHKvVML0oN8IUiDq4iRqpq74ABpvOaerfWdong==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.9", - "regexpu-core": "^6.2.0", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.3.tgz", - "integrity": "sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-compilation-targets": "^7.22.6", - "@babel/helper-plugin-utils": "^7.22.5", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.9.tgz", - "integrity": "sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.9.tgz", - "integrity": "sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", - "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.9.tgz", - "integrity": "sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.9", - "@babel/helper-wrap-function": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.26.5.tgz", - "integrity": "sha512-bJ6iIVdYX1YooY2X7w1q6VITt+LnUILtNk7zT78ykuwStx8BauCzxvFqFaHjOpW1bVnSUM1PN1f0p5P21wHxvg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.25.9", - "@babel/helper-optimise-call-expression": "^7.25.9", - "@babel/traverse": "^7.26.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz", - "integrity": "sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.9.tgz", - "integrity": "sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.25.9", - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.9.tgz", - "integrity": "sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz", - "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.26.9" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.9.tgz", - "integrity": "sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.9.tgz", - "integrity": "sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.9.tgz", - "integrity": "sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.9.tgz", - "integrity": "sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", - "@babel/plugin-transform-optional-chaining": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.9.tgz", - "integrity": "sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-decorators": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.25.9.tgz", - "integrity": "sha512-smkNLL/O1ezy9Nhy4CNosc4Va+1wo5w4gzSZeLe6y6dM4mmHfYOCPolXQPHQxonZCF+ZyebxN9vqOolkYrSn5g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/plugin-syntax-decorators": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", - "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead.", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-function-sent": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-function-sent/-/plugin-proposal-function-sent-7.25.9.tgz", - "integrity": "sha512-Qi9KEBTY6WAjHBeHJ1jm4HyGlwvZLfjUaxO9g1jKHqyQPe6c+q7DlKgyrBUH7v+VWLJ0bNy5cQlXHtOV5/uibw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/helper-wrap-function": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0-placeholder-for-preset-env.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", - "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-throw-expressions": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-throw-expressions/-/plugin-proposal-throw-expressions-7.25.9.tgz", - "integrity": "sha512-Zw62DP6cdbXXEtTNMWYY10rIOPGAWPk8qdqM+AT3JbHtFq8ook0JXJCWdQJTlSVACHo0R6lvoNKO9B1ZVkjClg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-decorators": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.25.9.tgz", - "integrity": "sha512-ryzI0McXUPJnRCvMo4lumIKZUzhYUO/ScI+Mz4YVaTLt04DHNSjEUjKVvbzQjZFLuod/cYEc07mJWhzl6v4DPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz", - "integrity": "sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", - "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-unicode-sets-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", - "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.9.tgz", - "integrity": "sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.26.8.tgz", - "integrity": "sha512-He9Ej2X7tNf2zdKMAGOsmg2MrFc+hfoAhd3po4cWfo/NWjzEAKa0oQruj1ROVUdl0e6fb6/kE/G3SSxE0lRJOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.26.5", - "@babel/helper-remap-async-to-generator": "^7.25.9", - "@babel/traverse": "^7.26.8" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.9.tgz", - "integrity": "sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/helper-remap-async-to-generator": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.26.5.tgz", - "integrity": "sha512-chuTSY+hq09+/f5lMj8ZSYgCFpppV2CbYrhNFJ1BFoXpiWPnnAb7R0MqrafCpN8E1+YRrtM1MXZHJdIx8B6rMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.26.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.9.tgz", - "integrity": "sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.9.tgz", - "integrity": "sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.26.0.tgz", - "integrity": "sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.9.tgz", - "integrity": "sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.9", - "@babel/helper-compilation-targets": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/helper-replace-supers": "^7.25.9", - "@babel/traverse": "^7.25.9", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.9.tgz", - "integrity": "sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/template": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.9.tgz", - "integrity": "sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.9.tgz", - "integrity": "sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.9.tgz", - "integrity": "sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.9.tgz", - "integrity": "sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.9.tgz", - "integrity": "sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.26.3.tgz", - "integrity": "sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.9.tgz", - "integrity": "sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.26.9.tgz", - "integrity": "sha512-Hry8AusVm8LW5BVFgiyUReuoGzPUpdHQQqJY5bZnbbf+ngOHWuCuYFKw/BqaaWlvEUrF91HMhDtEaI1hZzNbLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.26.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.9.tgz", - "integrity": "sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-compilation-targets": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.9.tgz", - "integrity": "sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.9.tgz", - "integrity": "sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.9.tgz", - "integrity": "sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.9.tgz", - "integrity": "sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.9.tgz", - "integrity": "sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz", - "integrity": "sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.9.tgz", - "integrity": "sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.9.tgz", - "integrity": "sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.9.tgz", - "integrity": "sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.9.tgz", - "integrity": "sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.26.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.26.6.tgz", - "integrity": "sha512-CKW8Vu+uUZneQCPtXmSBUC6NCAUdya26hWCElAWh5mVSlSRsmiCPUUDKb3Z0szng1hiAJa098Hkhg9o4SE35Qw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.26.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.9.tgz", - "integrity": "sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.9.tgz", - "integrity": "sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-compilation-targets": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/plugin-transform-parameters": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.9.tgz", - "integrity": "sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/helper-replace-supers": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.9.tgz", - "integrity": "sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.9.tgz", - "integrity": "sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.9.tgz", - "integrity": "sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.9.tgz", - "integrity": "sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.9.tgz", - "integrity": "sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.9", - "@babel/helper-create-class-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.9.tgz", - "integrity": "sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.9.tgz", - "integrity": "sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9", - "regenerator-transform": "^0.15.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regexp-modifiers": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.26.0.tgz", - "integrity": "sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.9.tgz", - "integrity": "sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-runtime": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.26.9.tgz", - "integrity": "sha512-Jf+8y9wXQbbxvVYTM8gO5oEF2POdNji0NMltEkG7FtmzD9PVz7/lxpqSdTvwsjTMU5HIHuDVNf2SOxLkWi+wPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-plugin-utils": "^7.26.5", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.6", - "babel-plugin-polyfill-regenerator": "^0.6.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz", - "integrity": "sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.9.tgz", - "integrity": "sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.9.tgz", - "integrity": "sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.26.8.tgz", - "integrity": "sha512-OmGDL5/J0CJPJZTHZbi2XpO0tyT2Ia7fzpW5GURwdtp2X3fMmN8au/ej6peC/T33/+CRiIpA8Krse8hFGVmT5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.26.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.26.7.tgz", - "integrity": "sha512-jfoTXXZTgGg36BmhqT3cAYK5qkmqvJpvNrPhaK/52Vgjhw4Rq29s9UqpWWV0D6yuRmgiFH/BUVlkl96zJWqnaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.26.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.9.tgz", - "integrity": "sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.9.tgz", - "integrity": "sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.9.tgz", - "integrity": "sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.9.tgz", - "integrity": "sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.26.9.tgz", - "integrity": "sha512-vX3qPGE8sEKEAZCWk05k3cpTAE3/nOYca++JA+Rd0z2NCNzabmYvEiSShKzm10zdquOIAVXsy2Ei/DTW34KlKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.26.8", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-plugin-utils": "^7.26.5", - "@babel/helper-validator-option": "^7.25.9", - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.9", - "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.9", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.9", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.9", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.9", - "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-import-assertions": "^7.26.0", - "@babel/plugin-syntax-import-attributes": "^7.26.0", - "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.25.9", - "@babel/plugin-transform-async-generator-functions": "^7.26.8", - "@babel/plugin-transform-async-to-generator": "^7.25.9", - "@babel/plugin-transform-block-scoped-functions": "^7.26.5", - "@babel/plugin-transform-block-scoping": "^7.25.9", - "@babel/plugin-transform-class-properties": "^7.25.9", - "@babel/plugin-transform-class-static-block": "^7.26.0", - "@babel/plugin-transform-classes": "^7.25.9", - "@babel/plugin-transform-computed-properties": "^7.25.9", - "@babel/plugin-transform-destructuring": "^7.25.9", - "@babel/plugin-transform-dotall-regex": "^7.25.9", - "@babel/plugin-transform-duplicate-keys": "^7.25.9", - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.9", - "@babel/plugin-transform-dynamic-import": "^7.25.9", - "@babel/plugin-transform-exponentiation-operator": "^7.26.3", - "@babel/plugin-transform-export-namespace-from": "^7.25.9", - "@babel/plugin-transform-for-of": "^7.26.9", - "@babel/plugin-transform-function-name": "^7.25.9", - "@babel/plugin-transform-json-strings": "^7.25.9", - "@babel/plugin-transform-literals": "^7.25.9", - "@babel/plugin-transform-logical-assignment-operators": "^7.25.9", - "@babel/plugin-transform-member-expression-literals": "^7.25.9", - "@babel/plugin-transform-modules-amd": "^7.25.9", - "@babel/plugin-transform-modules-commonjs": "^7.26.3", - "@babel/plugin-transform-modules-systemjs": "^7.25.9", - "@babel/plugin-transform-modules-umd": "^7.25.9", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.9", - "@babel/plugin-transform-new-target": "^7.25.9", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.26.6", - "@babel/plugin-transform-numeric-separator": "^7.25.9", - "@babel/plugin-transform-object-rest-spread": "^7.25.9", - "@babel/plugin-transform-object-super": "^7.25.9", - "@babel/plugin-transform-optional-catch-binding": "^7.25.9", - "@babel/plugin-transform-optional-chaining": "^7.25.9", - "@babel/plugin-transform-parameters": "^7.25.9", - "@babel/plugin-transform-private-methods": "^7.25.9", - "@babel/plugin-transform-private-property-in-object": "^7.25.9", - "@babel/plugin-transform-property-literals": "^7.25.9", - "@babel/plugin-transform-regenerator": "^7.25.9", - "@babel/plugin-transform-regexp-modifiers": "^7.26.0", - "@babel/plugin-transform-reserved-words": "^7.25.9", - "@babel/plugin-transform-shorthand-properties": "^7.25.9", - "@babel/plugin-transform-spread": "^7.25.9", - "@babel/plugin-transform-sticky-regex": "^7.25.9", - "@babel/plugin-transform-template-literals": "^7.26.8", - "@babel/plugin-transform-typeof-symbol": "^7.26.7", - "@babel/plugin-transform-unicode-escapes": "^7.25.9", - "@babel/plugin-transform-unicode-property-regex": "^7.25.9", - "@babel/plugin-transform-unicode-regex": "^7.25.9", - "@babel/plugin-transform-unicode-sets-regex": "^7.25.9", - "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.11.0", - "babel-plugin-polyfill-regenerator": "^0.6.1", - "core-js-compat": "^3.40.0", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-env/node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.11.1.tgz", - "integrity": "sha512-yGCqvBT4rwMczo28xkH/noxJ6MZ4nJfkVYdoDaC/utLtWrXxv27HVrzAeSbqR8SxDsp46n0YF47EbHoixy6rXQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.3", - "core-js-compat": "^3.40.0" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.6-no-external-plugins", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", - "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz", - "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", - "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.26.9", - "@babel/types": "^7.26.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz", - "integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", - "@babel/parser": "^7.26.9", - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.9", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", - "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", - "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@socket.io/component-emitter": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", - "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/cors": { - "version": "2.8.17", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", - "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/eslint": { - "version": "8.56.12", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.12.tgz", - "integrity": "sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "22.13.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", - "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.20.0" - } - }, - "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "dev": true, - "license": "ISC" - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", - "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/helper-numbers": "1.13.2", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", - "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", - "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", - "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", - "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.13.2", - "@webassemblyjs/helper-api-error": "1.13.2", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", - "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", - "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-buffer": "1.14.1", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/wasm-gen": "1.14.1" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", - "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", - "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", - "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", - "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-buffer": "1.14.1", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/helper-wasm-section": "1.14.1", - "@webassemblyjs/wasm-gen": "1.14.1", - "@webassemblyjs/wasm-opt": "1.14.1", - "@webassemblyjs/wasm-parser": "1.14.1", - "@webassemblyjs/wast-printer": "1.14.1" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", - "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/ieee754": "1.13.2", - "@webassemblyjs/leb128": "1.13.2", - "@webassemblyjs/utf8": "1.13.2" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", - "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-buffer": "1.14.1", - "@webassemblyjs/wasm-gen": "1.14.1", - "@webassemblyjs/wasm-parser": "1.14.1" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", - "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-api-error": "1.13.2", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/ieee754": "1.13.2", - "@webassemblyjs/leb128": "1.13.2", - "@webassemblyjs/utf8": "1.13.2" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", - "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webpack-cli/configtest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", - "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", - "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", - "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "license": "MIT" - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", - "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", - "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/async-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", - "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axios": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz", - "integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/axios-mock-adapter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-2.1.0.tgz", - "integrity": "sha512-AZUe4OjECGCNNssH8SOdtneiQELsqTsat3SQQCWLPjN436/H+L9AjWfV7bF+Zg/YL9cgbhrz5671hoh+Tbn98w==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "is-buffer": "^2.0.5" - }, - "peerDependencies": { - "axios": ">= 0.17.0" - } - }, - "node_modules/babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "deprecated": "babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - }, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "eslint": ">= 4.12.1" - } - }, - "node_modules/babel-loader": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.2.1.tgz", - "integrity": "sha512-fqe8naHt46e0yIdkjUZYqddSXfej3AHajX+CSO5X7oy0EmPc6o5Xh+RClNoHjnieWz9AW4kZxW9yyFMhVB1QLA==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-cache-dir": "^4.0.0", - "schema-utils": "^4.0.0" - }, - "engines": { - "node": ">= 14.15.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0", - "webpack": ">=5" - } - }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.12", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.12.tgz", - "integrity": "sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.3", - "semver": "^6.3.1" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.10.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz", - "integrity": "sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.2", - "core-js-compat": "^3.38.0" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.3.tgz", - "integrity": "sha512-LiWSbl4CRSIa5x/JAU6jZiG9eit9w6mz+yVMFwDE83LAWvt0AfGBoZ7HS/mkhrKuh2ZlzfVZYKoLjXdqw6Yt7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.3" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/base64id": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", - "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^4.5.0 || >= 5.9" - } - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/btoa": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", - "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", - "license": "(MIT OR Apache-2.0)", - "bin": { - "btoa": "bin/btoa.js" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", - "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001700", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz", - "integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", - "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0" - } - }, - "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", - "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/coalescy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/coalescy/-/coalescy-1.0.0.tgz", - "integrity": "sha512-OmRR46eVfyaXZYI7Ai5/vnLHjWhhh99sugx+UTsmVhwaYzARb+Tcdit59/HkVxF8KdqJG5NN8ClUhzQXS3Hh+w==", - "dev": true, - "license": "MIT" - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/common-path-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", - "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", - "dev": true, - "license": "ISC" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/confusing-browser-globals": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", - "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", - "dev": true, - "license": "MIT" - }, - "node_modules/connect": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", - "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/connect/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/connect/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT" - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/core-js-compat": { - "version": "3.40.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.40.0.tgz", - "integrity": "sha512-0XEDpr5y5mijvw8Lbc6E5AkjrHfp7eEoPlu36SWeAbcL8fn1G1ANe8DBlo2XoNN89oVpxWwOjYIPVzR4ZvsKCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.24.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", - "dev": true, - "license": "MIT" - }, - "node_modules/data-view-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/inspect-js" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/date-format": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", - "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/di": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", - "dev": true, - "license": "MIT" - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true, - "license": "MIT" - }, - "node_modules/electron-to-chromium": { - "version": "1.5.104", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.104.tgz", - "integrity": "sha512-Us9M2L4cO/zMBqVkJtnj353nQhMju9slHm62NprKTmdF3HH8wYOtNvDFq/JB2+ZRoGLzdvYDiATlMHs98XBM1g==", - "dev": true, - "license": "ISC" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/engine.io": { - "version": "6.6.4", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.4.tgz", - "integrity": "sha512-ZCkIjSYNDyGn0R6ewHDtXgns/Zre/NT6Agvq1/WobF7JXgFff4SeDroKiCO3fNJreU9YG429Sc81o4w5ok/W5g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/cors": "^2.8.12", - "@types/node": ">=10.0.0", - "accepts": "~1.3.4", - "base64id": "2.0.0", - "cookie": "~0.7.2", - "cors": "~2.8.5", - "debug": "~4.3.1", - "engine.io-parser": "~5.2.1", - "ws": "~8.17.1" - }, - "engines": { - "node": ">=10.2.0" - } - }, - "node_modules/engine.io-parser": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", - "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/engine.io/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/enhanced-resolve": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", - "integrity": "sha512-kxpoMgrdtkXZ5h0SeraBS1iRntpTpQ3R8ussdb38+UAFnMGX5DDyJXePm+OCHOcoXvHDw7mc2erbJBpDnl7TPw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.2.0", - "tapable": "^0.1.8" - }, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/ent": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.2.tgz", - "integrity": "sha512-kKvD1tO6BM+oK9HzCPpUdRb4vKFQY/FPTFmurMvh6LlN68VMrdj77w8yp51/kDbpkFOS9J8w5W6zIzgM2H8/hw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "punycode": "^1.4.1", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/envinfo": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", - "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", - "dev": true, - "license": "MIT", - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/es-abstract": { - "version": "1.23.9", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", - "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.0", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-regex": "^1.2.1", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.0", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.3", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.18" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz", - "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", - "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", - "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7", - "is-date-object": "^1.0.5", - "is-symbol": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "license": "MIT" - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true, - "license": "MIT" - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-airbnb-base": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", - "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", - "dev": true, - "license": "MIT", - "dependencies": { - "confusing-browser-globals": "^1.0.10", - "object.assign": "^4.1.2", - "object.entries": "^1.1.5", - "semver": "^6.3.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "peerDependencies": { - "eslint": "^7.32.0 || ^8.2.0", - "eslint-plugin-import": "^2.25.2" - } - }, - "node_modules/eslint-friendly-formatter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/eslint-friendly-formatter/-/eslint-friendly-formatter-4.0.1.tgz", - "integrity": "sha512-+EhkPwkl/nf/fxT60yXPLAMQ+thUzfJV5rCGdUDdyM+exO3NB+07dwWiZTuyuOtTo/Ckh7W/3LJvWsB214c7ag==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^2.0.1", - "coalescy": "1.0.0", - "extend": "^3.0.0", - "minimist": "^1.2.0", - "strip-ansi": "^4.0.0", - "text-table": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-friendly-formatter/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-friendly-formatter/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-friendly-formatter/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-friendly-formatter/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/eslint-friendly-formatter/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/eslint-friendly-formatter/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/eslint-friendly-formatter/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-friendly-formatter/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-friendly-formatter/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-import-resolver-webpack": { - "version": "0.13.10", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.10.tgz", - "integrity": "sha512-ciVTEg7sA56wRMR772PyjcBRmyBMLS46xgzQZqt6cWBEKc7cK65ZSSLCTLVRu2gGtKyXUb5stwf4xxLBfERLFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "enhanced-resolve": "^0.9.1", - "find-root": "^1.1.0", - "hasown": "^2.0.2", - "interpret": "^1.4.0", - "is-core-module": "^2.15.1", - "is-regex": "^1.2.0", - "lodash": "^4.17.21", - "resolve": "^2.0.0-next.5", - "semver": "^5.7.2" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "eslint-plugin-import": ">=1.4.0", - "webpack": ">=1.11.0" - } - }, - "node_modules/eslint-import-resolver-webpack/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-import-resolver-webpack/node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-import-resolver-webpack/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", - "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", - "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.8", - "array.prototype.findlastindex": "^1.2.5", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.0", - "hasown": "^2.0.2", - "is-core-module": "^2.15.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.0", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.8", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-jasmine": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jasmine/-/eslint-plugin-jasmine-4.2.2.tgz", - "integrity": "sha512-nALbewRk63uz28UGNhUTJyd6GofXxVNFpWFNAwr9ySc6kpSRIoO4suwZqIYz3cfJmCacilmjp7+1Ocjr7zRagA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8", - "npm": ">=6" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-webpack-plugin": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-4.2.0.tgz", - "integrity": "sha512-rsfpFQ01AWQbqtjgPRr2usVRxhWDuG0YDYcG8DJOteD3EFnpeuYuOwk0PQiN7PRBTqS6ElNdtPZPggj8If9WnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "^8.56.10", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "schema-utils": "^4.2.0" - }, - "engines": { - "node": ">= 14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "eslint": "^8.0.0 || ^9.0.0", - "webpack": "^5.0.0" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true, - "license": "MIT" - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true, - "license": "MIT" - }, - "node_modules/faker": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/faker/-/faker-5.5.3.tgz", - "integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-uri": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", - "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.9.1" - } - }, - "node_modules/fastq": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", - "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT" - }, - "node_modules/finalhandler/node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "dev": true, - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/find-cache-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz", - "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==", - "dev": true, - "license": "MIT", - "dependencies": { - "common-path-prefix": "^3.0.0", - "pkg-dir": "^7.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "dev": true, - "license": "MIT" - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true, - "license": "ISC" - }, - "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/form-data": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", - "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "functions-have-names": "^1.2.3", - "hasown": "^2.0.2", - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-symbol-description": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, - "node_modules/has-bigints": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-errors/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-local": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", - "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-local/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/import-local/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/import-local/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-local/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/import-local/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/internal-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-async-function": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", - "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-object": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", - "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finalizationregistry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", - "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "license": "MIT", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", - "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", - "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/isbinaryfile": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", - "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/gjtorikian/" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jasmine": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.6.0.tgz", - "integrity": "sha512-iq7HQ5M8ydNUspjd9vbFW9Lu+6lQ1QLDIqjl0WysEllF5EJZy8XaUyNlhCJVwOx2YFzqTtARWbS56F/f0PzRFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "glob": "^7.1.6", - "jasmine-core": "^4.6.0" - }, - "bin": { - "jasmine": "bin/jasmine.js" - } - }, - "node_modules/jasmine-core": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.6.1.tgz", - "integrity": "sha512-VYz/BjjmC3klLJlLwA4Kw8ytk0zDSmbbDLNs794VnWmkcCB7I9aAL/D48VNQtmITyPvea2C3jdUMfc3kAoy0PQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/karma": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.4.tgz", - "integrity": "sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@colors/colors": "1.5.0", - "body-parser": "^1.19.0", - "braces": "^3.0.2", - "chokidar": "^3.5.1", - "connect": "^3.7.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.1", - "glob": "^7.1.7", - "graceful-fs": "^4.2.6", - "http-proxy": "^1.18.1", - "isbinaryfile": "^4.0.8", - "lodash": "^4.17.21", - "log4js": "^6.4.1", - "mime": "^2.5.2", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.5", - "qjobs": "^1.2.0", - "range-parser": "^1.2.1", - "rimraf": "^3.0.2", - "socket.io": "^4.7.2", - "source-map": "^0.6.1", - "tmp": "^0.2.1", - "ua-parser-js": "^0.7.30", - "yargs": "^16.1.1" - }, - "bin": { - "karma": "bin/karma" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/karma-chrome-launcher": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz", - "integrity": "sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "which": "^1.2.1" - } - }, - "node_modules/karma-chrome-launcher/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/karma-firefox-launcher": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-2.1.3.tgz", - "integrity": "sha512-LMM2bseebLbYjODBOVt7TCPP9OI2vZIXCavIXhkO9m+10Uj5l7u/SKoeRmYx8FYHTVGZSpk6peX+3BMHC1WwNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-wsl": "^2.2.0", - "which": "^3.0.0" - } - }, - "node_modules/karma-firefox-launcher/node_modules/which": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", - "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/karma-jasmine": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-4.0.2.tgz", - "integrity": "sha512-ggi84RMNQffSDmWSyyt4zxzh2CQGwsxvYYsprgyR1j8ikzIduEdOlcLvXjZGwXG/0j41KUXOWsUCBfbEHPWP9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "jasmine-core": "^3.6.0" - }, - "engines": { - "node": ">= 10" - }, - "peerDependencies": { - "karma": "*" - } - }, - "node_modules/karma-jasmine/node_modules/jasmine-core": { - "version": "3.99.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.99.1.tgz", - "integrity": "sha512-Hu1dmuoGcZ7AfyynN3LsfruwMbxMALMka+YtZeGoLuDEySVmVAPaonkNoBRIw/ectu8b9tVQCJNgp4a4knp+tg==", - "dev": true, - "license": "MIT" - }, - "node_modules/karma-sourcemap-loader": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.8.tgz", - "integrity": "sha512-zorxyAakYZuBcHRJE+vbrK2o2JXLFWK8VVjiT/6P+ltLBUGUvqTEkUiQ119MGdOrK7mrmxXHZF1/pfT6GgIZ6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2" - } - }, - "node_modules/karma-spec-reporter": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/karma-spec-reporter/-/karma-spec-reporter-0.0.33.tgz", - "integrity": "sha512-xRVevDUkiIVhKbDQ3CmeGEpyzA4b3HeVl95Sx5yJAvurpdKUSYF6ZEbQOqKJ7vrtDniABV1hyFez9KX9+7ruBA==", - "dev": true, - "license": "MIT", - "dependencies": { - "colors": "1.4.0" - }, - "peerDependencies": { - "karma": ">=0.9" - } - }, - "node_modules/karma-webpack": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-5.0.1.tgz", - "integrity": "sha512-oo38O+P3W2mSPCSUrQdySSPv1LvPpXP+f+bBimNomS5sW+1V4SuhCuW8TfJzV+rDv921w2fDSDw0xJbPe6U+kQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "glob": "^7.1.3", - "minimatch": "^9.0.3", - "webpack-merge": "^4.1.5" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/karma-webpack/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/karma-webpack/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/karma-webpack/node_modules/webpack-merge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", - "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.15" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.11.5" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log4js": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", - "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "date-format": "^4.0.14", - "debug": "^4.3.4", - "flatted": "^3.2.7", - "rfdc": "^1.3.0", - "streamroller": "^3.1.5" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/memory-fs": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", - "integrity": "sha512-+y4mDxU4rvXXu5UDSGCGNiesFmwCHuefGMoPCO1WYucNYj7DsLqrFaa2fXVI0H+NNiPTwwzKwspn9yTZqUGqng==", - "dev": true, - "license": "MIT" - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", - "dev": true, - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", - "dev": true, - "license": "MIT" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", - "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.values": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", - "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/own-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", - "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.6", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pkg-dir": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", - "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^6.3.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", - "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^7.1.0", - "path-exists": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", - "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^6.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", - "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/path-exists": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", - "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/pkg-dir/node_modules/yocto-queue": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", - "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" - }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/qjobs": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.9" - } - }, - "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve": "^1.20.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", - "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true, - "license": "MIT" - }, - "node_modules/regenerate-unicode-properties": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", - "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerate": "^1.4.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true, - "license": "MIT" - }, - "node_modules/regenerator-transform": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", - "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexpu-core": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz", - "integrity": "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.2.0", - "regjsgen": "^0.8.0", - "regjsparser": "^0.12.0", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regjsgen": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/regjsparser": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", - "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "jsesc": "~3.0.2" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rfdc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", - "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", - "dev": true, - "license": "MIT" - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-array-concat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", - "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safe-push-apply": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, - "license": "MIT" - }, - "node_modules/schema-utils": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz", - "integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/schema-utils/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/schema-utils/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/schema-utils/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "license": "MIT" - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", - "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true, - "license": "ISC" - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "license": "MIT", - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/socket.io": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.1.tgz", - "integrity": "sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "accepts": "~1.3.4", - "base64id": "~2.0.0", - "cors": "~2.8.5", - "debug": "~4.3.2", - "engine.io": "~6.6.0", - "socket.io-adapter": "~2.5.2", - "socket.io-parser": "~4.2.4" - }, - "engines": { - "node": ">=10.2.0" - } - }, - "node_modules/socket.io-adapter": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", - "integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "~4.3.4", - "ws": "~8.17.1" - } - }, - "node_modules/socket.io-adapter/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/socket.io-parser": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", - "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", - "dev": true, - "license": "MIT", - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/socket.io-parser/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/socket.io/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/streamroller": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", - "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "date-format": "^4.0.14", - "debug": "^4.3.4", - "fs-extra": "^8.1.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", - "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", - "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tapable": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", - "integrity": "sha512-jX8Et4hHg57mug1/079yitEKWGB3LCwoxByLsNim89LABq8NqgiX+6iYVOsq0vX8uJHkU+DZ5fnq95f800bEsQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/terser": { - "version": "5.39.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz", - "integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.11", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.11.tgz", - "integrity": "sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.25", - "jest-worker": "^27.4.5", - "schema-utils": "^4.3.0", - "serialize-javascript": "^6.0.2", - "terser": "^5.31.1" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/terser-webpack-plugin/node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/terser-webpack-plugin/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/tmp": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", - "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.14" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", - "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0", - "reflect.getprototypeof": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/ua-parser-js": { - "version": "0.7.40", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.40.tgz", - "integrity": "sha512-us1E3K+3jJppDBa3Tl0L3MOJiGhe1C6P0+nIvQAFYbxlMAx0h81eOwLmU57xgqToduDDPx3y5QsdjPfDu+FgOQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/ua-parser-js" - }, - { - "type": "paypal", - "url": "https://paypal.me/faisalman" - }, - { - "type": "github", - "url": "https://github.com/sponsors/faisalman" - } - ], - "license": "MIT", - "bin": { - "ua-parser-js": "script/cli.js" - }, - "engines": { - "node": "*" - } - }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "dev": true, - "license": "MIT" - }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", - "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", - "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", - "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", - "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uri-js/node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", - "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "dev": true, - "license": "MIT", - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dev": true, - "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" - } - }, - "node_modules/webpack": { - "version": "5.98.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.98.0.tgz", - "integrity": "sha512-UFynvx+gM44Gv9qFgj0acCQK2VE1CtdfwFdimkapco3hlPCJ/zeq73n2yVKimVbtm+TnApIugGhLJnkU6gjYXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint-scope": "^3.7.7", - "@types/estree": "^1.0.6", - "@webassemblyjs/ast": "^1.14.1", - "@webassemblyjs/wasm-edit": "^1.14.1", - "@webassemblyjs/wasm-parser": "^1.14.1", - "acorn": "^8.14.0", - "browserslist": "^4.24.0", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.1", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^4.3.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.11", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", - "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.1.1", - "@webpack-cli/info": "^2.0.2", - "@webpack-cli/serve": "^2.0.5", - "colorette": "^2.0.14", - "commander": "^10.0.1", - "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - } - }, - "node_modules/webpack-cli/node_modules/interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack-merge": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", - "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "clone-deep": "^4.0.1", - "flat": "^5.0.2", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack/node_modules/enhanced-resolve": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", - "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/webpack/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/webpack/node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", - "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "name": "netlicensing-client", + "version": "1.2.39", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "netlicensing-client", + "version": "1.2.39", + "license": "Apache-2.0", + "dependencies": { + "axios": "^1.8.4", + "btoa": "^1.2.1" + }, + "devDependencies": { + "@eslint/js": "^9.24.0", + "@types/node": "^22.14.0", + "@typescript-eslint/eslint-plugin": "^8.29.1", + "@typescript-eslint/parser": "^8.29.1", + "@vitest/eslint-plugin": "^1.1.43", + "eslint": "^9.24.0", + "eslint-plugin-import": "^2.31.0", + "prettier": "3.5.3", + "tsup": "^8.4.0", + "typescript": "^5.8.3", + "typescript-eslint": "^8.29.1", + "vitest": "^3.1.1" + }, + "engines": { + "node": ">= 16.9.0", + "npm": ">= 8.0.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz", + "integrity": "sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.2.tgz", + "integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz", + "integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.2.tgz", + "integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz", + "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz", + "integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz", + "integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz", + "integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz", + "integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz", + "integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz", + "integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz", + "integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz", + "integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz", + "integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz", + "integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz", + "integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz", + "integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.2.tgz", + "integrity": "sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz", + "integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.2.tgz", + "integrity": "sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz", + "integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz", + "integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz", + "integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz", + "integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz", + "integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.5.1.tgz", + "integrity": "sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", + "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.1.tgz", + "integrity": "sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", + "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "9.24.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.24.0.tgz", + "integrity": "sha512-uIY/y3z0uvOGX8cp1C2fiC4+ZmBhp6yZWkojtHL1YEMnRt1Y63HB9TM17proGEmeG7HeUY+UP36F0aknKYTpYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz", + "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.13.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz", + "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", + "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.39.0.tgz", + "integrity": "sha512-lGVys55Qb00Wvh8DMAocp5kIcaNzEFTmGhfFd88LfaogYTRKrdxgtlO5H6S49v2Nd8R2C6wLOal0qv6/kCkOwA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.39.0.tgz", + "integrity": "sha512-It9+M1zE31KWfqh/0cJLrrsCPiF72PoJjIChLX+rEcujVRCb4NLQ5QzFkzIZW8Kn8FTbvGQBY5TkKBau3S8cCQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.39.0.tgz", + "integrity": "sha512-lXQnhpFDOKDXiGxsU9/l8UEGGM65comrQuZ+lDcGUx+9YQ9dKpF3rSEGepyeR5AHZ0b5RgiligsBhWZfSSQh8Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.39.0.tgz", + "integrity": "sha512-mKXpNZLvtEbgu6WCkNij7CGycdw9cJi2k9v0noMb++Vab12GZjFgUXD69ilAbBh034Zwn95c2PNSz9xM7KYEAQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.39.0.tgz", + "integrity": "sha512-jivRRlh2Lod/KvDZx2zUR+I4iBfHcu2V/BA2vasUtdtTN2Uk3jfcZczLa81ESHZHPHy4ih3T/W5rPFZ/hX7RtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.39.0.tgz", + "integrity": "sha512-8RXIWvYIRK9nO+bhVz8DwLBepcptw633gv/QT4015CpJ0Ht8punmoHU/DuEd3iw9Hr8UwUV+t+VNNuZIWYeY7Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.39.0.tgz", + "integrity": "sha512-mz5POx5Zu58f2xAG5RaRRhp3IZDK7zXGk5sdEDj4o96HeaXhlUwmLFzNlc4hCQi5sGdR12VDgEUqVSHer0lI9g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.39.0.tgz", + "integrity": "sha512-+YDwhM6gUAyakl0CD+bMFpdmwIoRDzZYaTWV3SDRBGkMU/VpIBYXXEvkEcTagw/7VVkL2vA29zU4UVy1mP0/Yw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.39.0.tgz", + "integrity": "sha512-EKf7iF7aK36eEChvlgxGnk7pdJfzfQbNvGV/+l98iiMwU23MwvmV0Ty3pJ0p5WQfm3JRHOytSIqD9LB7Bq7xdQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.39.0.tgz", + "integrity": "sha512-vYanR6MtqC7Z2SNr8gzVnzUul09Wi1kZqJaek3KcIlI/wq5Xtq4ZPIZ0Mr/st/sv/NnaPwy/D4yXg5x0B3aUUA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.39.0.tgz", + "integrity": "sha512-NMRUT40+h0FBa5fb+cpxtZoGAggRem16ocVKIv5gDB5uLDgBIwrIsXlGqYbLwW8YyO3WVTk1FkFDjMETYlDqiw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.39.0.tgz", + "integrity": "sha512-0pCNnmxgduJ3YRt+D+kJ6Ai/r+TaePu9ZLENl+ZDV/CdVczXl95CbIiwwswu4L+K7uOIGf6tMo2vm8uadRaICQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.39.0.tgz", + "integrity": "sha512-t7j5Zhr7S4bBtksT73bO6c3Qa2AV/HqiGlj9+KB3gNF5upcVkx+HLgxTm8DK4OkzsOYqbdqbLKwvGMhylJCPhQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.39.0.tgz", + "integrity": "sha512-m6cwI86IvQ7M93MQ2RF5SP8tUjD39Y7rjb1qjHgYh28uAPVU8+k/xYWvxRO3/tBN2pZkSMa5RjnPuUIbrwVxeA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.39.0.tgz", + "integrity": "sha512-iRDJd2ebMunnk2rsSBYlsptCyuINvxUfGwOUldjv5M4tpa93K8tFMeYGpNk2+Nxl+OBJnBzy2/JCscGeO507kA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.39.0.tgz", + "integrity": "sha512-t9jqYw27R6Lx0XKfEFe5vUeEJ5pF3SGIM6gTfONSMb7DuG6z6wfj2yjcoZxHg129veTqU7+wOhY6GX8wmf90dA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.39.0.tgz", + "integrity": "sha512-ThFdkrFDP55AIsIZDKSBWEt/JcWlCzydbZHinZ0F/r1h83qbGeenCt/G/wG2O0reuENDD2tawfAj2s8VK7Bugg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.39.0.tgz", + "integrity": "sha512-jDrLm6yUtbOg2TYB3sBF3acUnAwsIksEYjLeHL+TJv9jg+TmTwdyjnDex27jqEMakNKf3RwwPahDIt7QXCSqRQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.39.0.tgz", + "integrity": "sha512-6w9uMuza+LbLCVoNKL5FSLE7yvYkq9laSd09bwS0tMjkwXrmib/4KmoJcrKhLWHvw19mwU+33ndC69T7weNNjQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.39.0.tgz", + "integrity": "sha512-yAkUOkIKZlK5dl7u6dg897doBgLXmUHhIINM2c+sND3DZwnrdQkkSiDh7N75Ll4mM4dxSkYfXqU9fW3lLkMFug==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz", + "integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.29.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.29.1.tgz", + "integrity": "sha512-ba0rr4Wfvg23vERs3eB+P3lfj2E+2g3lhWcCVukUuhtcdUx5lSIFZlGFEBHKr+3zizDa/TvZTptdNHVZWAkSBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.29.1", + "@typescript-eslint/type-utils": "8.29.1", + "@typescript-eslint/utils": "8.29.1", + "@typescript-eslint/visitor-keys": "8.29.1", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.29.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.29.1.tgz", + "integrity": "sha512-zczrHVEqEaTwh12gWBIJWj8nx+ayDcCJs06yoNMY0kwjMWDM6+kppljY+BxWI06d2Ja+h4+WdufDcwMnnMEWmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.29.1", + "@typescript-eslint/types": "8.29.1", + "@typescript-eslint/typescript-estree": "8.29.1", + "@typescript-eslint/visitor-keys": "8.29.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.29.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.29.1.tgz", + "integrity": "sha512-2nggXGX5F3YrsGN08pw4XpMLO1Rgtnn4AzTegC2MDesv6q3QaTU5yU7IbS1tf1IwCR0Hv/1EFygLn9ms6LIpDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.29.1", + "@typescript-eslint/visitor-keys": "8.29.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.29.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.29.1.tgz", + "integrity": "sha512-DkDUSDwZVCYN71xA4wzySqqcZsHKic53A4BLqmrWFFpOpNSoxX233lwGu/2135ymTCR04PoKiEEEvN1gFYg4Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.29.1", + "@typescript-eslint/utils": "8.29.1", + "debug": "^4.3.4", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.29.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.29.1.tgz", + "integrity": "sha512-VT7T1PuJF1hpYC3AGm2rCgJBjHL3nc+A/bhOp9sGMKfi5v0WufsX/sHCFBfNTx2F+zA6qBc/PD0/kLRLjdt8mQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.29.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.29.1.tgz", + "integrity": "sha512-l1enRoSaUkQxOQnbi0KPUtqeZkSiFlqrx9/3ns2rEDhGKfTa+88RmXqedC1zmVTOWrLc2e6DEJrTA51C9iLH5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.29.1", + "@typescript-eslint/visitor-keys": "8.29.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.29.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.29.1.tgz", + "integrity": "sha512-QAkFEbytSaB8wnmB+DflhUPz6CLbFWE2SnSCrRMEa+KnXIzDYbpsn++1HGvnfAsUY44doDXmvRkO5shlM/3UfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.29.1", + "@typescript-eslint/types": "8.29.1", + "@typescript-eslint/typescript-estree": "8.29.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.29.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.29.1.tgz", + "integrity": "sha512-RGLh5CRaUEf02viP5c1Vh1cMGffQscyHe7HPAzGpfmfflFg1wUz2rYxd+OZqwpeypYvZ8UxSxuIpF++fmOzEcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.29.1", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@vitest/eslint-plugin": { + "version": "1.1.43", + "resolved": "https://registry.npmjs.org/@vitest/eslint-plugin/-/eslint-plugin-1.1.43.tgz", + "integrity": "sha512-OLoUMO67Yg+kr7E6SjF5+Qvl2f6uNJ7ImQYnXT8WgnPiZE41ZQBsnzn70jehXrhFVadphHs2smk+yl0TFKLV5Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@typescript-eslint/utils": ">= 8.24.0", + "eslint": ">= 8.57.0", + "typescript": ">= 5.0.0", + "vitest": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "vitest": { + "optional": true + } + } + }, + "node_modules/@vitest/expect": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.1.1.tgz", + "integrity": "sha512-q/zjrW9lgynctNbwvFtQkGK9+vvHA5UzVi2V8APrp1C6fG6/MuYYkmlx4FubuqLycCeSdHD5aadWfua/Vr0EUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.1.1", + "@vitest/utils": "3.1.1", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.1.1.tgz", + "integrity": "sha512-bmpJJm7Y7i9BBELlLuuM1J1Q6EQ6K5Ye4wcyOpOMXMcePYKSIYlpcrCm4l/O6ja4VJA5G2aMJiuZkZdnxlC3SA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.1.1", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.1.1.tgz", + "integrity": "sha512-dg0CIzNx+hMMYfNmSqJlLSXEmnNhMswcn3sXO7Tpldr0LiGmg3eXdLLhwkv2ZqgHb/d5xg5F7ezNFRA1fA13yA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.1.1.tgz", + "integrity": "sha512-X/d46qzJuEDO8ueyjtKfxffiXraPRfmYasoC4i5+mlLEJ10UvPb0XH5M9C3gWuxd7BAQhpK42cJgJtq53YnWVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "3.1.1", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.1.1.tgz", + "integrity": "sha512-bByMwaVWe/+1WDf9exFxWWgAixelSdiwo2p33tpqIlM14vW7PRV5ppayVXtfycqze4Qhtwag5sVhX400MLBOOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.1.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.1.1.tgz", + "integrity": "sha512-+EmrUOOXbKzLkTDwlsc/xrwOlPDXyVk3Z6P6K4oiCndxz7YLpp/0R0UsWVOKT0IXWjjBJuSMk6D27qipaupcvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^3.0.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.1.1.tgz", + "integrity": "sha512-1XIjflyaU2k3HMArJ50bwSh3wKWPD6Q47wz/NUSmRV0zNywPc4w79ARjg/i/aNINHwA+mIALhUVqD9/aUvZNgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.1.1", + "loupe": "^3.1.3", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", + "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-shim-unscopables": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axios": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", + "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/btoa": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", + "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", + "license": "(MIT OR Apache-2.0)", + "bin": { + "btoa": "bin/btoa.js" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/bundle-require": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", + "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chai": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz", + "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/data-view-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/inspect-js" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-abstract": { + "version": "1.23.9", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", + "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.0", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.2", + "is-regex": "^1.2.1", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.3", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.18" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz", + "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/esbuild": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz", + "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.2", + "@esbuild/android-arm": "0.25.2", + "@esbuild/android-arm64": "0.25.2", + "@esbuild/android-x64": "0.25.2", + "@esbuild/darwin-arm64": "0.25.2", + "@esbuild/darwin-x64": "0.25.2", + "@esbuild/freebsd-arm64": "0.25.2", + "@esbuild/freebsd-x64": "0.25.2", + "@esbuild/linux-arm": "0.25.2", + "@esbuild/linux-arm64": "0.25.2", + "@esbuild/linux-ia32": "0.25.2", + "@esbuild/linux-loong64": "0.25.2", + "@esbuild/linux-mips64el": "0.25.2", + "@esbuild/linux-ppc64": "0.25.2", + "@esbuild/linux-riscv64": "0.25.2", + "@esbuild/linux-s390x": "0.25.2", + "@esbuild/linux-x64": "0.25.2", + "@esbuild/netbsd-arm64": "0.25.2", + "@esbuild/netbsd-x64": "0.25.2", + "@esbuild/openbsd-arm64": "0.25.2", + "@esbuild/openbsd-x64": "0.25.2", + "@esbuild/sunos-x64": "0.25.2", + "@esbuild/win32-arm64": "0.25.2", + "@esbuild/win32-ia32": "0.25.2", + "@esbuild/win32-x64": "0.25.2" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.24.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.24.0.tgz", + "integrity": "sha512-eh/jxIEJyZrvbWRe4XuVclLPDYSYYYgLy5zXGGxD6j8zjSAxFEzI2fL/8xNq6O2yKqVt+eF2YhV+hxjV6UKXwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.20.0", + "@eslint/config-helpers": "^0.2.0", + "@eslint/core": "^0.12.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.24.0", + "@eslint/plugin-kit": "^0.2.7", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.3.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", + "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", + "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.8", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", + "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expect-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz", + "integrity": "sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-symbol-description": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-bigints": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/internal-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jiti": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", + "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true, + "license": "MIT" + }, + "node_modules/loupe": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz", + "integrity": "sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==", + "dev": true, + "license": "MIT" + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", + "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postcss": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.39.0.tgz", + "integrity": "sha512-thI8kNc02yNvnmJp8dr3fNWJ9tCONDhp6TV35X6HkKGGs9E6q7YWCHbe5vKiTa7TAiNcFEmXKj3X/pG2b3ci0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.7" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.39.0", + "@rollup/rollup-android-arm64": "4.39.0", + "@rollup/rollup-darwin-arm64": "4.39.0", + "@rollup/rollup-darwin-x64": "4.39.0", + "@rollup/rollup-freebsd-arm64": "4.39.0", + "@rollup/rollup-freebsd-x64": "4.39.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.39.0", + "@rollup/rollup-linux-arm-musleabihf": "4.39.0", + "@rollup/rollup-linux-arm64-gnu": "4.39.0", + "@rollup/rollup-linux-arm64-musl": "4.39.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.39.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.39.0", + "@rollup/rollup-linux-riscv64-gnu": "4.39.0", + "@rollup/rollup-linux-riscv64-musl": "4.39.0", + "@rollup/rollup-linux-s390x-gnu": "4.39.0", + "@rollup/rollup-linux-x64-gnu": "4.39.0", + "@rollup/rollup-linux-x64-musl": "4.39.0", + "@rollup/rollup-win32-arm64-msvc": "4.39.0", + "@rollup/rollup-win32-ia32-msvc": "4.39.0", + "@rollup/rollup-win32-x64-msvc": "4.39.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/sucrase/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", + "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", + "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tinypool": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", + "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", + "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsup": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.4.0.tgz", + "integrity": "sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-require": "^5.1.0", + "cac": "^6.7.14", + "chokidar": "^4.0.3", + "consola": "^3.4.0", + "debug": "^4.4.0", + "esbuild": "^0.25.0", + "joycon": "^3.1.1", + "picocolors": "^1.1.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.34.8", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.35.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.11", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/tsup/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/tsup/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tsup/node_modules/source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "whatwg-url": "^7.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.29.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.29.1.tgz", + "integrity": "sha512-f8cDkvndhbQMPcysk6CUSGBWV+g1utqdn71P5YKwMumVMOG/5k7cHq0KyG4O52nB0oKS4aN2Tp5+wB4APJGC+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.29.1", + "@typescript-eslint/parser": "8.29.1", + "@typescript-eslint/utils": "8.29.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/unbox-primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-bigints": "^1.0.2", + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/vite": { + "version": "6.2.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.6.tgz", + "integrity": "sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "postcss": "^8.5.3", + "rollup": "^4.30.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.1.1.tgz", + "integrity": "sha512-V+IxPAE2FvXpTCHXyNem0M+gWm6J7eRyWPR6vYoG/Gl+IscNOjXzztUhimQgTxaAoUoj40Qqimaa0NLIOOAH4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.0", + "es-module-lexer": "^1.6.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.1.1.tgz", + "integrity": "sha512-kiZc/IYmKICeBAZr9DQ5rT7/6bD9G7uqQEki4fxazi1jdVl2mWGzedtBs5s6llz59yQhVb7FFY2MbHzHCnT79Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "3.1.1", + "@vitest/mocker": "3.1.1", + "@vitest/pretty-format": "^3.1.1", + "@vitest/runner": "3.1.1", + "@vitest/snapshot": "3.1.1", + "@vitest/spy": "3.1.1", + "@vitest/utils": "3.1.1", + "chai": "^5.2.0", + "debug": "^4.4.0", + "expect-type": "^1.2.0", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "std-env": "^3.8.1", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinypool": "^1.0.2", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0", + "vite-node": "3.1.1", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.1.1", + "@vitest/ui": "3.1.1", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true } + } + }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } + } } diff --git a/package.json b/package.json index c604e98..d6aad97 100644 --- a/package.json +++ b/package.json @@ -1,120 +1,91 @@ { - "name": "netlicensing-client", - "version": "1.2.39", - "description": "JavaScript Wrapper for Labs64 NetLicensing RESTful API", - "keywords": [ - "labs64", - "netlicensing", - "licensing", - "licensing-as-a-service", - "license", - "license-management", - "software-license", - "client", - "restful", - "restful-api", - "javascript", - "wrapper", - "api", - "client" - ], - "license": "Apache-2.0", - "author": "Labs64 GmbH", - "homepage": "https://netlicensing.io", - "repository": { - "type": "git", - "url": "https://github.com/Labs64/NetLicensingClient-javascript" + "name": "netlicensing-client", + "version": "1.2.39", + "description": "JavaScript Wrapper for Labs64 NetLicensing RESTful API", + "keywords": [ + "labs64", + "netlicensing", + "licensing", + "licensing-as-a-service", + "license", + "license-management", + "software-license", + "client", + "restful", + "restful-api", + "javascript", + "wrapper", + "api", + "client" + ], + "license": "Apache-2.0", + "author": "Labs64 GmbH", + "homepage": "https://netlicensing.io", + "repository": { + "type": "git", + "url": "https://github.com/Labs64/NetLicensingClient-javascript" + }, + "bugs": { + "url": "https://github.com/Labs64/NetLicensingClient-javascript/issues" + }, + "contributors": [ + { + "name": "Ready Brown", + "email": "ready.brown@hotmail.de", + "url": "https://github.com/r-brown" }, - "bugs": { - "url": "https://github.com/Labs64/NetLicensingClient-javascript/issues" + { + "name": "Viacheslav Rudkovskiy", + "email": "viachaslau.rudkovski@labs64.de", + "url": "https://github.com/v-rudkovskiy" }, - "contributors": [ - { - "name": "Ready Brown", - "email": "ready.brown@hotmail.de", - "url": "https://github.com/r-brown" - }, - { - "name": "Viacheslav Rudkovskiy", - "email": "viachaslau.rudkovski@labs64.de", - "url": "https://github.com/v-rudkovskiy" - }, - { - "name": "Andrei Yushkevich", - "email": "yushkevich@me.com", - "url": "https://github.com/yushkevich" - } - ], - "main": "dist/netlicensing-client.js", - "files": [ - "dist" - ], - "scripts": { - "build": "node build/build.cjs", - "release": "npm run build && npm run test", - "dev": "webpack --progress --watch --config build/webpack.dev.conf.cjs", - "test": "karma start test/karma.conf.js --single-run", - "test-mocha": "webpack --config build/webpack.test.conf.cjs", - "test-for-travis": "karma start test/karma.conf.js --single-run --browsers Firefox", - "lint": "eslint --ext .js,.vue src test" - }, - "dependencies": { - "axios": "^1.8.2", - "btoa": "^1.2.1", - "es6-promise": "^4.2.8" - }, - "devDependencies": { - "@babel/core": "^7.26.9", - "@babel/plugin-proposal-class-properties": "^7.16.7", - "@babel/plugin-proposal-decorators": "^7.25.9", - "@babel/plugin-proposal-export-namespace-from": "^7.16.7", - "@babel/plugin-proposal-function-sent": "^7.25.9", - "@babel/plugin-proposal-json-strings": "^7.16.7", - "@babel/plugin-proposal-numeric-separator": "^7.16.7", - "@babel/plugin-proposal-throw-expressions": "^7.25.9", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-transform-modules-commonjs": "^7.26.3", - "@babel/plugin-transform-runtime": "^7.26.9", - "@babel/preset-env": "^7.26.9", - "@babel/runtime": "^7.26.9", - "axios-mock-adapter": "^2.1.0", - "babel-eslint": "^10.1.0", - "babel-loader": "^9.2.1", - "chalk": "^4.1.2", - "eslint": "^8.2.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-friendly-formatter": "^4.0.1", - "eslint-import-resolver-webpack": "^0.13.10", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jasmine": "^4.2.2", - "eslint-webpack-plugin": "^4.2.0", - "faker": "^5.5.3", - "is-docker": "^2.2.1", - "jasmine": "^4.0.2", - "jasmine-core": "^4.0.1", - "karma": "^6.3.17", - "karma-chrome-launcher": "^3.1.0", - "karma-firefox-launcher": "^2.1.2", - "karma-jasmine": "^4.0.2", - "karma-sourcemap-loader": "^0.3.7", - "karma-spec-reporter": "0.0.33", - "karma-webpack": "^5.0.0", - "lodash": "^4.17.21", - "ora": "^5.4.1", - "rimraf": "^3.0.2", - "terser-webpack-plugin": "^5.3.1", - "webpack": "^5.76.0", - "webpack-cli": "^5.1.1", - "webpack-merge": "^5.8.0" - }, - "engines": { - "node": ">= 14.0.0", - "npm": ">= 8.0.0" - }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not ie <= 10" - ] + { + "name": "Andrei Yushkevich", + "email": "yushkevich@me.com", + "url": "https://github.com/yushkevich" + } + ], + "main": "dist/index.cjs", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist" + ], + "scripts": { + "build": "tsup", + "release": "npm run lint:typecheck && npm run test && npm run build", + "dev": "tsup --watch", + "test": "vitest run", + "test:dev": "vitest watch", + "lint": "eslint --ext .js,.mjs,.ts src", + "typecheck": "tsc --noEmit", + "lint:typecheck": "npm run lint && npm run typecheck" + }, + "dependencies": { + "axios": "^1.8.4", + "btoa": "^1.2.1" + }, + "devDependencies": { + "@eslint/js": "^9.24.0", + "@types/node": "^22.14.0", + "@typescript-eslint/eslint-plugin": "^8.29.1", + "@typescript-eslint/parser": "^8.29.1", + "@vitest/eslint-plugin": "^1.1.43", + "eslint": "^9.24.0", + "eslint-plugin-import": "^2.31.0", + "prettier": "3.5.3", + "tsup": "^8.4.0", + "typescript": "^5.8.3", + "typescript-eslint": "^8.29.1", + "vitest": "^3.1.1" + }, + "engines": { + "node": ">= 16.9.0", + "npm": ">= 8.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not ie <= 10" + ] } diff --git a/src/Constants.js b/src/Constants.js deleted file mode 100644 index c93b8c0..0000000 --- a/src/Constants.js +++ /dev/null @@ -1,226 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -export default { - BASIC_AUTHENTICATION: 'BASIC_AUTH', - APIKEY_IDENTIFICATION: 'APIKEY', - ANONYMOUS_IDENTIFICATION: 'ANONYMOUS', - - ACTIVE: 'active', - NUMBER: 'number', - NAME: 'name', - VERSION: 'version', - DELETED: 'deleted', - CASCADE: 'forceCascade', - PRICE: 'price', - DISCOUNT: 'discount', - CURRENCY: 'currency', - IN_USE: 'inUse', - FILTER: 'filter', - BASE_URL: 'baseUrl', - USERNAME: 'username', - PASSWORD: 'password', - SECURITY_MODE: 'securityMode', - - LicensingModel: { - VALID: 'valid', - TryAndBuy: { - NAME: 'TryAndBuy', - }, - Rental: { - NAME: 'Rental', - RED_THRESHOLD: 'redThreshold', - YELLOW_THRESHOLD: 'yellowThreshold', - }, - Subscription: { - NAME: 'Subscription', - }, - Floating: { - NAME: 'Floating', - }, - MultiFeature: { - NAME: 'MultiFeature', - }, - PayPerUse: { - NAME: 'PayPerUse', - }, - PricingTable: { - NAME: 'PricingTable', - }, - Quota: { - NAME: 'Quota', - }, - NodeLocked: { - NAME: 'NodeLocked', - }, - }, - - Vendor: { - VENDOR_NUMBER: 'vendorNumber', - VENDOR_TYPE: 'Vendor', - }, - - Product: { - ENDPOINT_PATH: 'product', - PRODUCT_NUMBER: 'productNumber', - LICENSEE_AUTO_CREATE: 'licenseeAutoCreate', - DESCRIPTION: 'description', - LICENSING_INFO: 'licensingInfo', - DISCOUNTS: 'discounts', - /** - * @deprecated use ProductModule.PROP_LICENSEE_SECRET_MODE instead - */ - PROP_LICENSEE_SECRET_MODE: 'licenseeSecretMode', - PROP_VAT_MODE: 'vatMode', - - Discount: { - TOTAL_PRICE: 'totalPrice', - AMOUNT_FIX: 'amountFix', - AMOUNT_PERCENT: 'amountPercent', - }, - - LicenseeSecretMode: { - /** - * @deprecated DISABLED mode is deprecated - */ - DISABLED: 'DISABLED', - PREDEFINED: 'PREDEFINED', - CLIENT: 'CLIENT', - }, - }, - - ProductModule: { - ENDPOINT_PATH: 'productmodule', - PRODUCT_MODULE_NUMBER: 'productModuleNumber', - PRODUCT_MODULE_NAME: 'productModuleName', - LICENSING_MODEL: 'licensingModel', - PROP_LICENSEE_SECRET_MODE: 'licenseeSecretMode', - }, - - LicenseTemplate: { - ENDPOINT_PATH: 'licensetemplate', - LICENSE_TEMPLATE_NUMBER: 'licenseTemplateNumber', - LICENSE_TYPE: 'licenseType', - AUTOMATIC: 'automatic', - HIDDEN: 'hidden', - HIDE_LICENSES: 'hideLicenses', - PROP_LICENSEE_SECRET: 'licenseeSecret', - LicenseType: { - FEATURE: 'FEATURE', - TIMEVOLUME: 'TIMEVOLUME', - FLOATING: 'FLOATING', - QUANTITY: 'QUANTITY', - }, - }, - - Token: { - ENDPOINT_PATH: 'token', - EXPIRATION_TIME: 'expirationTime', - TOKEN_TYPE: 'tokenType', - API_KEY: 'apiKey', - TOKEN_PROP_EMAIL: 'email', - TOKEN_PROP_VENDORNUMBER: 'vendorNumber', - TOKEN_PROP_SHOP_URL: 'shopURL', - Type: { - DEFAULT: 'DEFAULT', - SHOP: 'SHOP', - APIKEY: 'APIKEY', - }, - }, - - Transaction: { - ENDPOINT_PATH: 'transaction', - TRANSACTION_NUMBER: 'transactionNumber', - GRAND_TOTAL: 'grandTotal', - STATUS: 'status', - SOURCE: 'source', - DATE_CREATED: 'datecreated', - DATE_CLOSED: 'dateclosed', - VAT: 'vat', - VAT_MODE: 'vatMode', - LICENSE_TRANSACTION_JOIN: 'licenseTransactionJoin', - SOURCE_SHOP_ONLY: 'shopOnly', - /** - * @deprecated - */ - Status: { - CANCELLED: 'CANCELLED', - CLOSED: 'CLOSED', - PENDING: 'PENDING', - }, - }, - - Licensee: { - ENDPOINT_PATH: 'licensee', - ENDPOINT_PATH_VALIDATE: 'validate', - ENDPOINT_PATH_TRANSFER: 'transfer', - LICENSEE_NUMBER: 'licenseeNumber', - SOURCE_LICENSEE_NUMBER: 'sourceLicenseeNumber', - PROP_LICENSEE_NAME: 'licenseeName', - /** - * @deprecated use License.PROP_LICENSEE_SECRET - */ - PROP_LICENSEE_SECRET: 'licenseeSecret', - PROP_MARKED_FOR_TRANSFER: 'markedForTransfer', - }, - - License: { - ENDPOINT_PATH: 'license', - LICENSE_NUMBER: 'licenseNumber', - HIDDEN: 'hidden', - PROP_LICENSEE_SECRET: 'licenseeSecret', - }, - - PaymentMethod: { - ENDPOINT_PATH: 'paymentmethod', - }, - - Utility: { - ENDPOINT_PATH: 'utility', - ENDPOINT_PATH_LICENSE_TYPES: 'licenseTypes', - ENDPOINT_PATH_LICENSING_MODELS: 'licensingModels', - ENDPOINT_PATH_COUNTRIES: 'countries', - LICENSING_MODEL_PROPERTIES: 'LicensingModelProperties', - LICENSE_TYPE: 'LicenseType', - }, - - APIKEY: { - ROLE_APIKEY_LICENSEE: 'ROLE_APIKEY_LICENSEE', - ROLE_APIKEY_ANALYTICS: 'ROLE_APIKEY_ANALYTICS', - ROLE_APIKEY_OPERATION: 'ROLE_APIKEY_OPERATION', - ROLE_APIKEY_MAINTENANCE: 'ROLE_APIKEY_MAINTENANCE', - ROLE_APIKEY_ADMIN: 'ROLE_APIKEY_ADMIN', - }, - - Validation: { - FOR_OFFLINE_USE: 'forOfflineUse', - }, - - WarningLevel: { - GREEN: 'GREEN', - YELLOW: 'YELLOW', - RED: 'RED', - }, - - Bundle: { - ENDPOINT_PATH: 'bundle', - ENDPOINT_OBTAIN_PATH: 'obtain', - }, - - Notification: { - ENDPOINT_PATH: 'notification', - Protocol: { - WEBHOOK: 'WEBHOOK', - }, - Event: { - LICENSEE_CREATED: 'LICENSEE_CREATED', - LICENSE_CREATED: 'LICENSE_CREATED', - WARNING_LEVEL_CHANGED: 'WARNING_LEVEL_CHANGED', - PAYMENT_TRANSACTION_PROCESSED: 'PAYMENT_TRANSACTION_PROCESSED', - }, - }, -}; diff --git a/src/__mocks__/services/Service.ts b/src/__mocks__/services/Service.ts new file mode 100644 index 0000000..97f4639 --- /dev/null +++ b/src/__mocks__/services/Service.ts @@ -0,0 +1,13 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { vi } from 'vitest'; + +export default { + get: vi.fn(), + post: vi.fn(), + delete: vi.fn(), +}; diff --git a/src/constants/ApiKeyRole.ts b/src/constants/ApiKeyRole.ts new file mode 100644 index 0000000..9f8a155 --- /dev/null +++ b/src/constants/ApiKeyRole.ts @@ -0,0 +1,15 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const ApiKeyRole = Object.freeze({ + ROLE_APIKEY_LICENSEE: 'ROLE_APIKEY_LICENSEE', + ROLE_APIKEY_ANALYTICS: 'ROLE_APIKEY_ANALYTICS', + ROLE_APIKEY_OPERATION: 'ROLE_APIKEY_OPERATION', + ROLE_APIKEY_MAINTENANCE: 'ROLE_APIKEY_MAINTENANCE', + ROLE_APIKEY_ADMIN: 'ROLE_APIKEY_ADMIN', +}); + +export default ApiKeyRole; diff --git a/src/constants/LicenseType.ts b/src/constants/LicenseType.ts new file mode 100644 index 0000000..3cc8d44 --- /dev/null +++ b/src/constants/LicenseType.ts @@ -0,0 +1,14 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const LicenseType = Object.freeze({ + FEATURE: 'FEATURE', + TIMEVOLUME: 'TIMEVOLUME', + FLOATING: 'FLOATING', + QUANTITY: 'QUANTITY', +}); + +export default LicenseType; diff --git a/src/constants/LicenseeSecretMode.ts b/src/constants/LicenseeSecretMode.ts new file mode 100644 index 0000000..81085a7 --- /dev/null +++ b/src/constants/LicenseeSecretMode.ts @@ -0,0 +1,14 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const LicenseeSecretMode = Object.freeze({ + // @deprecated + DISABLED: 'DISABLED', + PREDEFINED: 'PREDEFINED', + CLIENT: 'CLIENT', +}); + +export default LicenseeSecretMode; diff --git a/src/constants/LicensingModel.ts b/src/constants/LicensingModel.ts new file mode 100644 index 0000000..25b3658 --- /dev/null +++ b/src/constants/LicensingModel.ts @@ -0,0 +1,20 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const LicensingModel = Object.freeze({ + TRY_AND_BUY: 'TryAndBuy', + SUBSCRIPTION: 'Subscription', + RENTAL: 'Rental', + FLOATING: 'Floating', + MULTI_FEATURE: 'MultiFeature', + PAY_PER_USE: 'PayPerUse', + PRICING_TABLE: 'PricingTable', + QUOTA: 'Quota', + NODE_LOCKED: 'NodeLocked', + DISCOUNT: 'Discount', +}); + +export default LicensingModel; diff --git a/src/constants/NotificationEvent.ts b/src/constants/NotificationEvent.ts new file mode 100644 index 0000000..9b03fe0 --- /dev/null +++ b/src/constants/NotificationEvent.ts @@ -0,0 +1,14 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const NotificationEvent = Object.freeze({ + LICENSEE_CREATED: 'LICENSEE_CREATED', + LICENSE_CREATED: 'LICENSE_CREATED', + WARNING_LEVEL_CHANGED: 'WARNING_LEVEL_CHANGED', + PAYMENT_TRANSACTION_PROCESSED: 'PAYMENT_TRANSACTION_PROCESSED', +}); + +export default NotificationEvent; diff --git a/src/constants/NotificationProtocol.ts b/src/constants/NotificationProtocol.ts new file mode 100644 index 0000000..44ed3c0 --- /dev/null +++ b/src/constants/NotificationProtocol.ts @@ -0,0 +1,11 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const NotificationProtocol = Object.freeze({ + WEBHOOK: 'WEBHOOK', +}); + +export default NotificationProtocol; diff --git a/src/constants/PaymentMethodEnum.ts b/src/constants/PaymentMethodEnum.ts new file mode 100644 index 0000000..1d50b46 --- /dev/null +++ b/src/constants/PaymentMethodEnum.ts @@ -0,0 +1,15 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const PaymentMethodEnum = Object.freeze({ + NULL: 'NULL', + PAYPAL: 'PAYPAL', + PAYPAL_SANDBOX: 'PAYPAL_SANDBOX', + STRIPE: 'STRIPE', + STRIPE_TESTING: 'STRIPE_TESTING', +}); + +export default PaymentMethodEnum; diff --git a/src/constants/SecurityMode.ts b/src/constants/SecurityMode.ts new file mode 100644 index 0000000..90dae29 --- /dev/null +++ b/src/constants/SecurityMode.ts @@ -0,0 +1,13 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const SecurityMode = Object.freeze({ + BASIC_AUTHENTICATION: 'BASIC_AUTH', + APIKEY_IDENTIFICATION: 'APIKEY', + ANONYMOUS_IDENTIFICATION: 'ANONYMOUS', +}); + +export default SecurityMode; diff --git a/src/constants/TimeVolumePeriod.ts b/src/constants/TimeVolumePeriod.ts new file mode 100644 index 0000000..56b0981 --- /dev/null +++ b/src/constants/TimeVolumePeriod.ts @@ -0,0 +1,14 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const TimeVolumePeriod = Object.freeze({ + DAY: 'DAY', + WEEK: 'WEEK', + MONTH: 'MONTH', + YEAR: 'YEAR', +}); + +export default TimeVolumePeriod; diff --git a/src/constants/TokenType.ts b/src/constants/TokenType.ts new file mode 100644 index 0000000..5355abf --- /dev/null +++ b/src/constants/TokenType.ts @@ -0,0 +1,14 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const TokenType = Object.freeze({ + DEFAULT: 'DEFAULT', + SHOP: 'SHOP', + APIKEY: 'APIKEY', + ACTION: 'ACTION', +}); + +export default TokenType; diff --git a/src/constants/TransactionSource.ts b/src/constants/TransactionSource.ts new file mode 100644 index 0000000..b43353b --- /dev/null +++ b/src/constants/TransactionSource.ts @@ -0,0 +1,35 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const TransactionSource = Object.freeze({ + SHOP: 'SHOP', + + AUTO_LICENSE_CREATE: 'AUTO_LICENSE_CREATE', + AUTO_LICENSE_UPDATE: 'AUTO_LICENSE_UPDATE', + AUTO_LICENSE_DELETE: 'AUTO_LICENSE_DELETE', + + AUTO_LICENSEE_CREATE: 'AUTO_LICENSEE_CREATE', + AUTO_LICENSEE_DELETE: 'AUTO_LICENSEE_DELETE', + AUTO_LICENSEE_VALIDATE: 'AUTO_LICENSEE_VALIDATE', + + AUTO_LICENSETEMPLATE_DELETE: 'AUTO_LICENSETEMPLATE_DELETE', + + AUTO_PRODUCTMODULE_DELETE: 'AUTO_PRODUCTMODULE_DELETE', + + AUTO_PRODUCT_DELETE: 'AUTO_PRODUCT_DELETE', + + AUTO_LICENSES_TRANSFER: 'AUTO_LICENSES_TRANSFER', + + SUBSCRIPTION_UPDATE: 'SUBSCRIPTION_UPDATE', + + RECURRING_PAYMENT: 'RECURRING_PAYMENT', + + CANCEL_RECURRING_PAYMENT: 'CANCEL_RECURRING_PAYMENT', + + OBTAIN_BUNDLE: 'OBTAIN_BUNDLE', +}); + +export default TransactionSource; diff --git a/src/constants/TransactionStatus.ts b/src/constants/TransactionStatus.ts new file mode 100644 index 0000000..2ce0aec --- /dev/null +++ b/src/constants/TransactionStatus.ts @@ -0,0 +1,13 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const TransactionStatus = Object.freeze({ + PENDING: 'PENDING', + CLOSED: 'CLOSED', + CANCELLED: 'CANCELLED', +}); + +export default TransactionStatus; diff --git a/src/constants/index.ts b/src/constants/index.ts new file mode 100644 index 0000000..fa95f36 --- /dev/null +++ b/src/constants/index.ts @@ -0,0 +1,122 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import LicenseeSecretMode from '@/constants/LicenseeSecretMode'; +import LicenseType from '@/constants/LicenseType'; +import NotificationEvent from '@/constants/NotificationEvent'; +import NotificationProtocol from '@/constants/NotificationProtocol'; +import SecurityMode from '@/constants/SecurityMode'; +import TimeVolumePeriod from '@/constants/TimeVolumePeriod'; +import TokenType from '@/constants/TokenType'; +import TransactionSource from '@/constants/TransactionSource'; +import TransactionStatus from '@/constants/TransactionStatus'; + +export default { + LicenseeSecretMode, + LicenseType, + NotificationEvent, + NotificationProtocol, + SecurityMode, + TimeVolumePeriod, + TokenType, + TransactionSource, + TransactionStatus, + + // @deprecated use SecurityMode.BASIC_AUTHENTICATION instead + BASIC_AUTHENTICATION: 'BASIC_AUTH', + + // @deprecated use SecurityMode.APIKEY_IDENTIFICATION instead + APIKEY_IDENTIFICATION: 'APIKEY', + + // @deprecated use SecurityMode.ANONYMOUS_IDENTIFICATION instead + ANONYMOUS_IDENTIFICATION: 'ANONYMOUS', + + FILTER: 'filter', + + Product: { + TYPE: 'Product', + ENDPOINT_PATH: 'product', + }, + + ProductModule: { + TYPE: 'ProductModule', + ENDPOINT_PATH: 'productmodule', + PRODUCT_MODULE_NUMBER: 'productModuleNumber', + }, + + Licensee: { + TYPE: 'Licensee', + ENDPOINT_PATH: 'licensee', + ENDPOINT_PATH_VALIDATE: 'validate', + ENDPOINT_PATH_TRANSFER: 'transfer', + LICENSEE_NUMBER: 'licenseeNumber', + }, + + LicenseTemplate: { + TYPE: 'LicenseTemplate', + ENDPOINT_PATH: 'licensetemplate', + + // @deprecated use LicenseType directly instead + LicenseType, + }, + + License: { + TYPE: 'License', + ENDPOINT_PATH: 'license', + }, + + Validation: { + TYPE: 'ProductModuleValidation', + }, + + Token: { + TYPE: 'Token', + ENDPOINT_PATH: 'token', + + // @deprecated use TokenType directly instead + Type: TokenType, + }, + + PaymentMethod: { + TYPE: 'PaymentMethod', + ENDPOINT_PATH: 'paymentmethod', + }, + + Bundle: { + TYPE: 'Bundle', + ENDPOINT_PATH: 'bundle', + ENDPOINT_OBTAIN_PATH: 'obtain', + }, + + Notification: { + TYPE: 'Notification', + ENDPOINT_PATH: 'notification', + + // @deprecated use NotificationProtocol directly instead + Protocol: NotificationProtocol, + + // @deprecated use NotificationEvent directly instead + Event: NotificationEvent, + }, + + Transaction: { + TYPE: 'Transaction', + ENDPOINT_PATH: 'transaction', + + // @deprecated use TransactionStatus directly instead + Status: TransactionStatus, + }, + + Utility: { + ENDPOINT_PATH: 'utility', + ENDPOINT_PATH_LICENSE_TYPES: 'licenseTypes', + ENDPOINT_PATH_LICENSING_MODELS: 'licensingModels', + ENDPOINT_PATH_COUNTRIES: 'countries', + LICENSING_MODEL_TYPE: 'LicensingModelProperties', + LICENSE_TYPE: 'LicenseType', + COUNTRY_TYPE: 'CountryType', + }, +}; diff --git a/src/converters/itemToBundle.js b/src/converters/itemToBundle.js deleted file mode 100644 index 9a204aa..0000000 --- a/src/converters/itemToBundle.js +++ /dev/null @@ -1,4 +0,0 @@ -import itemToObject from './itemToObject'; -import Bundle from '../entities/Bundle'; - -export default (item) => new Bundle(itemToObject(item)); diff --git a/src/converters/itemToBundle.ts b/src/converters/itemToBundle.ts new file mode 100644 index 0000000..a75096b --- /dev/null +++ b/src/converters/itemToBundle.ts @@ -0,0 +1,24 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import itemToObject from '@/converters/itemToObject'; +import Bundle from '@/entities/Bundle'; + +// types +import { Item } from '@/types/api/response'; +import { BundleProps } from '@/types/entities/Bundle'; + +export default (item?: Item) => { + const props = itemToObject>(item); + + const { licenseTemplateNumbers } = props; + + if (licenseTemplateNumbers && typeof licenseTemplateNumbers === 'string') { + props.licenseTemplateNumbers = licenseTemplateNumbers.split(','); + } + + return Bundle(props as BundleProps); +}; diff --git a/src/converters/itemToCountry.js b/src/converters/itemToCountry.js deleted file mode 100644 index 9f860f3..0000000 --- a/src/converters/itemToCountry.js +++ /dev/null @@ -1,4 +0,0 @@ -import itemToObject from './itemToObject'; -import Country from '../entities/Country'; - -export default (item) => new Country(itemToObject(item)); diff --git a/src/converters/itemToCountry.ts b/src/converters/itemToCountry.ts new file mode 100644 index 0000000..15696ae --- /dev/null +++ b/src/converters/itemToCountry.ts @@ -0,0 +1,16 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import itemToObject from '@/converters/itemToObject'; + +// entities +import Country from '@/entities/Country'; + +// types +import { Item } from '@/types/api/response'; +import { CountryProps } from '@/types/entities/Country'; + +export default (item?: Item) => Country(itemToObject(item)); diff --git a/src/converters/itemToLicense.js b/src/converters/itemToLicense.js deleted file mode 100644 index 1c057d3..0000000 --- a/src/converters/itemToLicense.js +++ /dev/null @@ -1,4 +0,0 @@ -import itemToObject from './itemToObject'; -import License from '../entities/License'; - -export default (item) => new License(itemToObject(item)); diff --git a/src/converters/itemToLicense.ts b/src/converters/itemToLicense.ts new file mode 100644 index 0000000..ac0cf83 --- /dev/null +++ b/src/converters/itemToLicense.ts @@ -0,0 +1,24 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import itemToObject from '@/converters/itemToObject'; +import License from '@/entities/License'; + +// types +import { Item } from '@/types/api/response'; +import { LicenseProps } from '@/types/entities/License'; + +export default (item?: Item) => { + const props = itemToObject>(item); + + const { startDate } = props; + + if (startDate && typeof startDate === 'string') { + props.startDate = startDate === 'now' ? startDate : new Date(startDate); + } + + return License(props as LicenseProps); +}; diff --git a/src/converters/itemToLicenseTemplate.js b/src/converters/itemToLicenseTemplate.js deleted file mode 100644 index 1e32c8c..0000000 --- a/src/converters/itemToLicenseTemplate.js +++ /dev/null @@ -1,4 +0,0 @@ -import itemToObject from './itemToObject'; -import LicenseTemplate from '../entities/LicenseTemplate'; - -export default (item) => new LicenseTemplate(itemToObject(item)); diff --git a/src/converters/itemToLicenseTemplate.ts b/src/converters/itemToLicenseTemplate.ts new file mode 100644 index 0000000..bdde701 --- /dev/null +++ b/src/converters/itemToLicenseTemplate.ts @@ -0,0 +1,14 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import itemToObject from '@/converters/itemToObject'; +import LicenseTemplate from '@/entities/LicenseTemplate'; + +// types +import { Item } from '@/types/api/response'; +import { LicenseTemplateProps } from '@/types/entities/LicenseTemplate'; + +export default (item?: Item) => LicenseTemplate(itemToObject(item)); diff --git a/src/converters/itemToLicensee.js b/src/converters/itemToLicensee.js deleted file mode 100644 index 2c54d09..0000000 --- a/src/converters/itemToLicensee.js +++ /dev/null @@ -1,4 +0,0 @@ -import itemToObject from './itemToObject'; -import Licensee from '../entities/Licensee'; - -export default (item) => new Licensee(itemToObject(item)); diff --git a/src/converters/itemToLicensee.ts b/src/converters/itemToLicensee.ts new file mode 100644 index 0000000..a78e174 --- /dev/null +++ b/src/converters/itemToLicensee.ts @@ -0,0 +1,14 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import itemToObject from '@/converters/itemToObject'; +import Licensee from '@/entities/Licensee'; + +// types +import { Item } from '@/types/api/response'; +import { LicenseeProps } from '@/types/entities/Licensee'; + +export default (item?: Item) => Licensee(itemToObject(item)); diff --git a/src/converters/itemToNotification.js b/src/converters/itemToNotification.js deleted file mode 100644 index a573aca..0000000 --- a/src/converters/itemToNotification.js +++ /dev/null @@ -1,4 +0,0 @@ -import itemToObject from './itemToObject'; -import Notification from '../entities/Notification'; - -export default (item) => new Notification(itemToObject(item)); diff --git a/src/converters/itemToNotification.ts b/src/converters/itemToNotification.ts new file mode 100644 index 0000000..e2ec551 --- /dev/null +++ b/src/converters/itemToNotification.ts @@ -0,0 +1,24 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import itemToObject from '@/converters/itemToObject'; +import Notification from '@/entities/Notification'; + +// types +import { Item } from '@/types/api/response'; +import { NotificationProps } from '@/types/entities/Notification'; + +export default (item?: Item) => { + const props = itemToObject>(item); + + const { events } = props; + + if (events && typeof events === 'string') { + props.events = events.split(','); + } + + return Notification(props as NotificationProps); +}; diff --git a/src/converters/itemToObject.js b/src/converters/itemToObject.js deleted file mode 100644 index 988e0f7..0000000 --- a/src/converters/itemToObject.js +++ /dev/null @@ -1,25 +0,0 @@ -const itemToObject = (item) => { - const object = {}; - const { property, list } = item; - - if (property && Array.isArray(property)) { - property.forEach((p) => { - const { name, value } = p; - if (name) object[name] = value; - }); - } - - if (list && Array.isArray(list)) { - list.forEach((l) => { - const { name } = l; - if (name) { - object[name] = object[name] || []; - object[name].push(itemToObject(l)); - } - }); - } - - return object; -}; - -export default itemToObject; diff --git a/src/converters/itemToObject.ts b/src/converters/itemToObject.ts new file mode 100644 index 0000000..2074476 --- /dev/null +++ b/src/converters/itemToObject.ts @@ -0,0 +1,34 @@ +import { Item, List } from '@/types/api/response'; + +const cast = (value: string): unknown => { + try { + return JSON.parse(value); + } catch (e) { + return value; + } +}; + +const extractProperties = (properties?: { name: string; value: string }[]) => { + const result: Record = {}; + properties?.forEach(({ name, value }) => { + result[name] = cast(value); + }); + return result; +}; + +const extractLists = (lists?: List[]) => { + const result: Record = {}; + + lists?.forEach((list) => { + const { name } = list; + result[name] = result[name] || []; + result[name].push(itemToObject(list)); + }); + return result; +}; + +const itemToObject = >(item?: Item | List): T => { + return item ? ({ ...extractProperties(item.property), ...extractLists(item.list) } as T) : ({} as T); +}; + +export default itemToObject; diff --git a/src/converters/itemToPaymentMethod.js b/src/converters/itemToPaymentMethod.js deleted file mode 100644 index f3dc336..0000000 --- a/src/converters/itemToPaymentMethod.js +++ /dev/null @@ -1,4 +0,0 @@ -import itemToObject from './itemToObject'; -import PaymentMethod from '../entities/PaymentMethod'; - -export default (item) => new PaymentMethod(itemToObject(item)); diff --git a/src/converters/itemToPaymentMethod.ts b/src/converters/itemToPaymentMethod.ts new file mode 100644 index 0000000..19caaed --- /dev/null +++ b/src/converters/itemToPaymentMethod.ts @@ -0,0 +1,14 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import itemToObject from '@/converters/itemToObject'; +import PaymentMethod from '@/entities/PaymentMethod'; + +// types +import { Item } from '@/types/api/response'; +import { PaymentMethodProps } from '@/types/entities/PaymentMethod'; + +export default (item?: Item) => PaymentMethod(itemToObject(item)); diff --git a/src/converters/itemToProduct.js b/src/converters/itemToProduct.js deleted file mode 100644 index 8821f7e..0000000 --- a/src/converters/itemToProduct.js +++ /dev/null @@ -1,15 +0,0 @@ -import itemToObject from './itemToObject'; -import Product from '../entities/Product'; - -export default (item) => { - const object = itemToObject(item); - - const discounts = object.discount; - - delete object.discount; - - const product = new Product(object); - product.setProductDiscounts(discounts); - - return product; -}; diff --git a/src/converters/itemToProduct.ts b/src/converters/itemToProduct.ts new file mode 100644 index 0000000..c6dd72c --- /dev/null +++ b/src/converters/itemToProduct.ts @@ -0,0 +1,27 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import itemToObject from '@/converters/itemToObject'; +import Product from '@/entities/Product'; +import ProductDiscount from '@/entities/ProductDiscount'; + +// types +import { Item } from '@/types/api/response'; +import { ProductProps } from '@/types/entities/Product'; +import { ProductDiscount as IProductDiscount } from '@/types/entities/ProductDiscount'; + +export default (item?: Item) => { + const props = itemToObject>(item); + + const discounts: IProductDiscount[] | undefined = props.discount as IProductDiscount[] | undefined; + delete props.discount; + + if (discounts) { + props.discounts = discounts.map((d) => ProductDiscount(d)); + } + + return Product(props as ProductProps); +}; diff --git a/src/converters/itemToProductModule.js b/src/converters/itemToProductModule.js deleted file mode 100644 index 8b67744..0000000 --- a/src/converters/itemToProductModule.js +++ /dev/null @@ -1,4 +0,0 @@ -import itemToObject from './itemToObject'; -import ProductModule from '../entities/ProductModule'; - -export default (item) => new ProductModule(itemToObject(item)); diff --git a/src/converters/itemToProductModule.ts b/src/converters/itemToProductModule.ts new file mode 100644 index 0000000..ea2911d --- /dev/null +++ b/src/converters/itemToProductModule.ts @@ -0,0 +1,14 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import itemToObject from '@/converters/itemToObject'; +import ProductModule from '@/entities/ProductModule'; + +// types +import { Item } from '@/types/api/response'; +import { ProductModuleProps } from '@/types/entities/ProductModule'; + +export default (item?: Item) => ProductModule(itemToObject(item)); diff --git a/src/converters/itemToToken.js b/src/converters/itemToToken.js deleted file mode 100644 index 1ba8239..0000000 --- a/src/converters/itemToToken.js +++ /dev/null @@ -1,4 +0,0 @@ -import itemToObject from './itemToObject'; -import Token from '../entities/Token'; - -export default (item) => new Token(itemToObject(item)); diff --git a/src/converters/itemToToken.ts b/src/converters/itemToToken.ts new file mode 100644 index 0000000..49e0c08 --- /dev/null +++ b/src/converters/itemToToken.ts @@ -0,0 +1,24 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import itemToObject from '@/converters/itemToObject'; +import Token from '@/entities/Token'; + +// types +import { Item } from '@/types/api/response'; +import { TokenProps } from '@/types/entities/Token'; + +export default (item?: Item) => { + const props = itemToObject>(item); + + const { expirationTime } = props; + + if (expirationTime && typeof expirationTime === 'string') { + props.expirationTime = new Date(expirationTime); + } + + return Token(props as TokenProps); +}; diff --git a/src/converters/itemToTransaction.js b/src/converters/itemToTransaction.js deleted file mode 100644 index e6d7da7..0000000 --- a/src/converters/itemToTransaction.js +++ /dev/null @@ -1,31 +0,0 @@ -import itemToObject from './itemToObject'; -import Transaction from '../entities/Transaction'; -import License from '../entities/License'; -import LicenseTransactionJoin from '../entities/LicenseTransactionJoin'; -import Constants from '../Constants'; - -export default (item) => { - const object = itemToObject(item); - - const { licenseTransactionJoin } = object; - - delete object.licenseTransactionJoin; - - const transaction = new Transaction(object); - - if (licenseTransactionJoin) { - const joins = []; - - licenseTransactionJoin.forEach((v) => { - const join = new LicenseTransactionJoin(); - join.setLicense(new License({ number: v[Constants.License.LICENSE_NUMBER] })); - join.setTransaction(new Transaction({ number: v[Constants.Transaction.TRANSACTION_NUMBER] })); - - joins.push(join); - }); - - transaction.setLicenseTransactionJoins(joins); - } - - return transaction; -}; diff --git a/src/converters/itemToTransaction.ts b/src/converters/itemToTransaction.ts new file mode 100644 index 0000000..a6514cd --- /dev/null +++ b/src/converters/itemToTransaction.ts @@ -0,0 +1,46 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import itemToObject from '@/converters/itemToObject'; + +// entities +import License from '@/entities/License'; +import LicenseTransactionJoin from '@/entities/LicenseTransactionJoin'; +import Transaction from '@/entities/Transaction'; + +// types +import { Item } from '@/types/api/response'; +import { TransactionProps } from '@/types/entities/Transaction'; + +export default (item?: Item) => { + const props = itemToObject>(item); + + const { dateCreated, dateClosed } = props; + + if (dateCreated && typeof dateCreated === 'string') { + props.dateCreated = new Date(dateCreated); + } + + if (dateClosed && typeof dateClosed === 'string') { + props.dateClosed = new Date(dateClosed); + } + + const licenseTransactionJoins: { licenseNumber: string; transactionNumber: string }[] | undefined = + props.licenseTransactionJoin as { licenseNumber: string; transactionNumber: string }[]; + + delete props.licenseTransactionJoin; + + if (licenseTransactionJoins) { + props.licenseTransactionJoins = licenseTransactionJoins.map(({ transactionNumber, licenseNumber }) => { + const transaction = Transaction({ number: transactionNumber }); + const license = License({ number: licenseNumber }); + + return new LicenseTransactionJoin(transaction, license); + }); + } + + return Transaction(props as TransactionProps); +}; diff --git a/src/entities/BaseEntity.js b/src/entities/BaseEntity.js deleted file mode 100644 index 16ac635..0000000 --- a/src/entities/BaseEntity.js +++ /dev/null @@ -1,230 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import CheckUtils from '../util/CheckUtils'; -import CastsUtils from '../util/CastsUtils'; - -/** - * The entity properties. - * @type {{}} - * @private - */ -const propertiesMap = new WeakMap(); - -/** - * List of properties that was defined - * @type {{}} - * @private - */ - -const definedMap = new WeakMap(); - -/** - * List of properties that need be casts - * @type {{}} - * @private - */ -const castsMap = new WeakMap(); - -export default class BaseEntity { - constructor({ properties, casts }) { - propertiesMap.set(this, {}); - definedMap.set(this, {}); - castsMap.set(this, casts || []); - - if (properties) { - this.setProperties(properties); - } - } - - /** - * Set a given property on the entity. - * @param property - * @param value - * @returns {BaseEntity} - */ - setProperty(property, value) { - // if property name has bad native type - if (!CheckUtils.isValid(property) || typeof property === 'object') { - throw new TypeError(`Bad property name:${property}`); - } - - const castedValue = this.cast(property, value); - - // define to property - this.define(property); - - // save property to propertiesMap - const properties = propertiesMap.get(this); - properties[property] = castedValue; - - return this; - } - - /** - * Alias for setProperty - * @param property - * @param value - * @returns {BaseEntity} - */ - addProperty(property, value) { - return this.setProperty(property, value); - } - - /** - * Set the entity properties. - * @param properties - * @returns {BaseEntity} - */ - setProperties(properties) { - this.removeProperties(); - - const has = Object.prototype.hasOwnProperty; - - Object.keys(properties).forEach((key) => { - if (has.call(properties, key)) { - this.setProperty(key, properties[key]); - } - }); - - return this; - } - - /** - * Check if we has property - * @param property - * @protected - */ - hasProperty(property) { - return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property); - } - - /** - * Get an property from the entity. - * @param property - * @param def - * @returns {*} - */ - getProperty(property, def) { - return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property) - ? propertiesMap.get(this)[property] - : def; - } - - /** - * Get all of the current properties on the entity. - */ - getProperties() { - return { ...propertiesMap.get(this) }; - } - - /** - * Remove property - * @param property - * @returns {BaseEntity} - */ - removeProperty(property) { - const properties = propertiesMap.get(this); - delete properties[property]; - this.removeDefine(property); - return this; - } - - /** - * Remove properties - * @param properties - */ - removeProperties(properties) { - const propertiesForRemove = properties || Object.keys(propertiesMap.get(this)); - - propertiesForRemove.forEach((property) => { - this.removeProperty(property); - }); - } - - cast(property, value) { - if (!castsMap.get(this)[property]) return value; - - return CastsUtils(castsMap.get(this)[property], value); - } - - /** - * Check if property has defined - * @param property - * @protected - */ - hasDefine(property) { - return Boolean(definedMap.get(this)[property]); - } - - /** - * Define property getter and setter - * @param property - * @protected - */ - define(property) { - if (this.hasDefine(property)) return; - - if (!CheckUtils.isValid(property) || typeof property === 'object') { - throw new TypeError(`Bad property name:${property}`); - } - - const self = this; - - // delete property - delete this[property]; - - const descriptors = { - enumerable: true, - configurable: true, - get() { - return self.getProperty(property); - }, - - set(value) { - self.setProperty(property, value); - }, - }; - - const defined = definedMap.get(this); - defined[property] = true; - - Object.defineProperty(this, property, descriptors); - } - - /** - * Remove property getter and setter - * @param property - * @protected - */ - removeDefine(property) { - if (!this.hasDefine(property)) return; - - const defined = definedMap.get(this); - delete defined[property]; - - delete this[property]; - } - - /** - * Get properties map - */ - asPropertiesMap() { - const properties = this.getProperties(); - const customProperties = {}; - - const has = Object.prototype.hasOwnProperty; - - Object.keys(this).forEach((key) => { - if (!has.call(this, key)) return; - - customProperties[key] = this[key]; - }); - - return { ...customProperties, ...properties }; - } -} diff --git a/src/entities/Bundle.js b/src/entities/Bundle.js deleted file mode 100644 index 615f92f..0000000 --- a/src/entities/Bundle.js +++ /dev/null @@ -1,126 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import BaseEntity from './BaseEntity'; - -/** - * NetLicensing Bundle entity. - * - * Properties visible via NetLicensing API: - * - * Unique number that identifies the bundle. Vendor can assign this number when creating a bundle or - * let NetLicensing generate one. - * @property string number - * - * If set to false, the bundle is disabled. - * @property boolean active - * - * Bundle name. - * @property string name - * - * Price for the bundle. If >0, it must always be accompanied by the currency specification. - * @property double price - * - * Specifies currency for the bundle price. Check data types to discover which currencies are - * supported. - * @property string currency - * - * Arbitrary additional user properties of string type may be associated with each bundle. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted. - * - * @constructor - */ -export default class Bundle extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - price: 'double', - currency: 'string', - }, - }); - } - - setNumber(number) { - return this.setProperty('number', number); - } - - getNumber(def) { - return this.getProperty('number', def); - } - - setActive(active) { - return this.setProperty('active', active); - } - - getActive(def) { - return this.getProperty('active', def); - } - - setName(name) { - return this.setProperty('name', name); - } - - getName(def) { - return this.getProperty('name', def); - } - - setDescription(description) { - return this.setProperty('description', description); - } - - getDescription(def) { - return this.getProperty('description', def); - } - - setPrice(price) { - return this.setProperty('price', price); - } - - getPrice(def) { - return this.getProperty('price', def); - } - - setCurrency(currency) { - return this.setProperty('currency', currency); - } - - getCurrency(def) { - return this.getProperty('currency', def); - } - - setLicenseTemplateNumbers(licenseTemplateNumbers) { - const numbers = (Array.isArray(licenseTemplateNumbers)) - ? licenseTemplateNumbers.join(',') - : licenseTemplateNumbers; - - return this.setProperty('licenseTemplateNumbers', numbers); - } - - getLicenseTemplateNumbers(def) { - const numbers = this.getProperty('licenseTemplateNumbers', def); - return (numbers) ? numbers.split(',') : numbers; - } - - addLicenseTemplateNumber(licenseTemplateNumber) { - const numbers = this.getLicenseTemplateNumbers([]); - numbers.push(licenseTemplateNumber); - - return this.setLicenseTemplateNumbers(numbers); - } - - removeLicenseTemplateNumber(licenseTemplateNumber) { - const numbers = this.getLicenseTemplateNumbers([]); - numbers.splice(numbers.indexOf(licenseTemplateNumber), 1); - - return this.setLicenseTemplateNumbers(numbers); - } -} diff --git a/src/entities/Bundle.ts b/src/entities/Bundle.ts new file mode 100644 index 0000000..4f475c8 --- /dev/null +++ b/src/entities/Bundle.ts @@ -0,0 +1,126 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +// types +import type { BundleProps, BundleMethods, Bundle as IBundle } from '@/types/entities/Bundle'; + +// utils +import { set, get } from '@/utils/helpers'; +import serialize from '@/utils/serialize'; + +// entity factory +import defineEntity from './defineEntity'; + +/** + * NetLicensing Bundle entity. + * + * Properties visible via NetLicensing API: + * + * Unique number that identifies the bundle. Vendor can assign this number when creating a bundle or + * let NetLicensing generate one. + * @property string number + * + * If set to false, the bundle is disabled. + * @property boolean active + * + * Bundle name. + * @property string name + * + * Price for the bundle. If >0, it must always be accompanied by the currency specification. + * @property number price + * + * Specifies currency for the bundle price. Check data types to discover which currencies are + * supported. + * @property string currency + * + * The bundle includes a set of templates, each identified by a unique template number. + * @property string[] licenseTemplateNumbers + * + * Arbitrary additional user properties of string type may be associated with each bundle. The name of user property + * must not be equal to any of the fixed property names listed above and must be none of id, deleted. + */ +const Bundle = function (properties: BundleProps = {} as BundleProps): IBundle { + const props: BundleProps = { ...properties }; + + const methods: BundleMethods = { + setActive(active: boolean) { + set(props, 'active', active); + }, + + getActive(def?: D): boolean | D { + return get(props, 'active', def) as boolean | D; + }, + + setNumber(number: string) { + set(props, 'number', number); + }, + + getNumber(def?: D): string | D { + return get(props, 'number', def) as string | D; + }, + + setName(name: string): void { + set(props, 'name', name); + }, + + getName(def?: D): string | D { + return get(props, 'name', def) as string | D; + }, + + setPrice(price: number): void { + set(props, 'price', price); + }, + + getPrice(def?: D): number | D { + return get(props, 'price', def) as number | D; + }, + + setCurrency(currency: string): void { + set(props, 'currency', currency); + }, + + getCurrency(def?: D): string | D { + return get(props, 'currency', def) as string | D; + }, + + setLicenseTemplateNumbers(numbers: string[]): void { + set(props, 'licenseTemplateNumbers', numbers); + }, + + addLicenseTemplateNumber(number: string): void { + if (!props.licenseTemplateNumbers) { + props.licenseTemplateNumbers = []; + } + + props.licenseTemplateNumbers.push(number); + }, + + getLicenseTemplateNumbers(def?: D): string[] | D { + return get(props, 'licenseTemplateNumbers', def) as string[] | D; + }, + + removeLicenseTemplateNumber(number: string): void { + const { licenseTemplateNumbers: numbers = [] } = props; + + numbers.splice(numbers.indexOf(number), 1); + props.licenseTemplateNumbers = numbers; + }, + + serialize(): Record { + if (props.licenseTemplateNumbers) { + const licenseTemplateNumbers = props.licenseTemplateNumbers.join(','); + return serialize({ ...props, licenseTemplateNumbers }); + } + + return serialize(props); + }, + }; + + return defineEntity(props as BundleProps, methods, Bundle); +}; + +export default Bundle; diff --git a/src/entities/Country.js b/src/entities/Country.js deleted file mode 100644 index 28e8834..0000000 --- a/src/entities/Country.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import BaseEntity from './BaseEntity'; - -/** - * Country entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * @property code - Unique code of country. - * - * @property name - Unique name of country - * - * @property vatPercent - Country vat. - * - * @property isEu - is country in EU. - */ -export default class Country extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - code: 'string', - name: 'string', - vatPercent: 'int', - isEu: 'boolean', - }, - }); - } - - setCode(code) { - return this.setProperty('code', code); - } - - getCode(def) { - return this.getProperty('code', def); - } - - setName(name) { - return this.setProperty('name', name); - } - - getName(def) { - return this.getProperty('name', def); - } - - setVatPercent(vat) { - return this.setProperty('vatPercent', vat); - } - - getVatPercent(def) { - return this.getProperty('vatPercent', def); - } - - setIsEu(isEu) { - return this.setProperty('isEu', isEu); - } - - getIsEu(def) { - return this.getProperty('isEu', def); - } -} diff --git a/src/entities/Country.ts b/src/entities/Country.ts new file mode 100644 index 0000000..ebfb599 --- /dev/null +++ b/src/entities/Country.ts @@ -0,0 +1,54 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import type { CountryProps, CountryMethods, Country as ICountry } from '@/types/entities/Country'; + +// entity factory +import defineEntity from './defineEntity'; + +/** + * Country entity used internally by NetLicensing. + * + * Properties visible via NetLicensing API: + * + * @property code - Unique code of country. + * @property name - Unique name of country + * @property vatPercent - Country vat. + * @property isEu - is country in EU. + */ +const Country = function (properties: CountryProps = {} as CountryProps): ICountry { + const defaults: CountryProps = { + code: '', + name: '', + vatPercent: 0, + isEu: false, + }; + + const props: CountryProps = { ...defaults, ...properties }; + + const methods: CountryMethods = { + getCode(): string { + return props.code; + }, + + getName(): string { + return props.name; + }, + + getVatPercent(): number { + return props.vatPercent as number; + }, + + getIsEu(): boolean { + return props.isEu; + }, + }; + + return defineEntity(props, methods, Country); +}; + +export default Country; diff --git a/src/entities/License.js b/src/entities/License.js deleted file mode 100644 index 03e2d84..0000000 --- a/src/entities/License.js +++ /dev/null @@ -1,131 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import BaseEntity from './BaseEntity'; - -/** - * License entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can - * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation - * transaction status is set to closed. - * @property string number - * - * Name for the licensed item. Set from license template on creation, if not specified explicitly. - * @property string name - * - * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled, - * the license is excluded from the validation process. - * @property boolean active - * - * price for the license. If >0, it must always be accompanied by the currency specification. Read-only, - * set from license template on creation. - * @property float price - * - * specifies currency for the license price. Check data types to discover which currencies are - * supported. Read-only, set from license template on creation. - * @property string currency - * - * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license - * template on creation, if not specified explicitly. - * @property boolean hidden - * - * @property string startDate - * - * Arbitrary additional user properties of string type may be associated with each license. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber, - * licenseTemplateNumber. - */ -export default class License extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - price: 'float', - hidden: 'boolean', - parentfeature: 'string', - timeVolume: 'int', - startDate: 'date', - inUse: 'boolean', - }, - }); - } - - setNumber(number) { - return this.setProperty('number', number); - } - - getNumber(def) { - return this.getProperty('number', def); - } - - setActive(active) { - return this.setProperty('active', active); - } - - getActive(def) { - return this.getProperty('active', def); - } - - setName(name) { - return this.setProperty('name', name); - } - - getName(def) { - return this.getProperty('name', def); - } - - setHidden(hidden) { - return this.setProperty('hidden', hidden); - } - - getHidden(def) { - return this.getProperty('hidden', def); - } - - setParentfeature(parentfeature) { - return this.setProperty('parentfeature', parentfeature); - } - - getParentfeature(def) { - return this.getProperty('parentfeature', def); - } - - setTimeVolume(timeVolume) { - return this.setProperty('timeVolume', timeVolume); - } - - getTimeVolume(def) { - return this.getProperty('timeVolume', def); - } - - setStartDate(startDate) { - return this.setProperty('startDate', startDate); - } - - getStartDate(def) { - return this.getProperty('startDate', def); - } - - getInUse(def) { - return this.getProperty('inUse', def); - } - - getPrice(def) { - return this.getProperty('price', def); - } - - getCurrency(def) { - return this.getProperty('currency', def); - } -} diff --git a/src/entities/License.ts b/src/entities/License.ts new file mode 100644 index 0000000..e425096 --- /dev/null +++ b/src/entities/License.ts @@ -0,0 +1,191 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import { TimeVolumePeriod } from '@/types/constants/TimeVolumePeriod'; +import { LicenseMethods, LicenseProps, License as ILicense } from '@/types/entities/License'; + +// utils +import { set, get } from '@/utils/helpers'; +import serialize from '@/utils/serialize'; + +// entity factory +import defineEntity from './defineEntity'; + +/** + * License entity used internally by NetLicensing. + * + * Properties visible via NetLicensing API: + * + * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can + * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation + * transaction status is set to closed. + * @property string number + * + * Name for the licensed item. Set from license template on creation, if not specified explicitly. + * @property string name + * + * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled, + * the license is excluded from the validation process. + * @property boolean active + * + * price for the license. If >0, it must always be accompanied by the currency specification. Read-only, + * set from license template on creation. + * @property number price + * + * specifies currency for the license price. Check data types to discover which currencies are + * supported. Read-only, set from license template on creation. + * @property string currency + * + * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license + * template on creation, if not specified explicitly. + * @property boolean hidden + * + * The unique identifier assigned to the licensee (the entity to whom the license is issued). This number is typically + * associated with a specific customer or organization. It is used internally to reference the licensee and cannot be + * changed after the license is created. + * @property string licenseeNumber + * + * The unique identifier for the license template from which this license was created. + * @property string licenseTemplateNumber + * + * A boolean flag indicating whether the license is actively being used. If true, it means the license is currently in + * use. If false, the license is not currently assigned or in use. + * @property boolean inUse + * + * This parameter is specific to TimeVolume licenses and indicates the total volume of time (e.g., in hours, days, etc.) + * associated with the license. This value defines the amount of time the license covers, which may affect the usage + * period and limits associated with the license. + * @property number timeVolume + * + * Also, specific to TimeVolume licenses, this field defines the period of time for the timeVolume + * (e.g., "DAY", "WEEK", "MONTH", "YEAR"). It provides the time unit for the timeVolume value, clarifying whether the + * time is measured in days, weeks, or any other defined period. + * @property string timeVolumePeriod + * + * For TimeVolume licenses, this field indicates the start date of the license’s validity period. This date marks when + * the license becomes active and the associated time volume starts being consumed. + * It can be represented as a string "now" or a Date object. + * @property string|Date Date startDate + * + * Parent(Feature) license number + * @property string parentfeature + * + * Arbitrary additional user properties of string type may be associated with each license. The name of user property + * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber, + * licenseTemplateNumber. + */ +const License = function (properties: LicenseProps = {} as LicenseProps): ILicense { + const props: LicenseProps = { ...(properties as T) }; + + const methods: LicenseMethods = { + setActive(active: boolean): void { + set(props, 'active', active); + }, + + getActive(def?: D): boolean | D { + return get(props, 'active', def) as boolean | D; + }, + + setNumber(number: string): void { + set(props, 'number', number); + }, + + getNumber(def?: D): string | D { + return get(props, 'number', def) as string | D; + }, + + setName(name: string): void { + set(props, 'name', name); + }, + + getName(def?: D): string | D { + return get(props, 'name', def) as string | D; + }, + + setPrice(price: number): void { + set(props, 'price', price); + }, + + getPrice(def?: D): number | D { + return get(props, 'price', def) as number | D; + }, + + setCurrency(currency: string): void { + set(props, 'currency', currency); + }, + + getCurrency(def?: D): string | D { + return get(props, 'currency', def) as string | D; + }, + + setHidden(hidden: boolean): void { + set(props, 'hidden', hidden); + }, + + getHidden(def?: D): boolean | D { + return get(props, 'hidden', def) as boolean | D; + }, + + setLicenseeNumber(number: string): void { + set(props, 'licenseeNumber', number); + }, + + getLicenseeNumber(def?: D): string | D { + return get(props, 'licenseeNumber', def) as string | D; + }, + + setLicenseTemplateNumber(number: string): void { + set(props, 'licenseTemplateNumber', number); + }, + + getLicenseTemplateNumber(def?: D): string | D { + return get(props, 'licenseTemplateNumber', def) as string | D; + }, + + // TimeVolume + setTimeVolume(timeVolume: number): void { + set(props, 'timeVolume', timeVolume); + }, + + getTimeVolume(def?: D): number | D { + return get(props, 'timeVolume', def) as number | D; + }, + + setTimeVolumePeriod(timeVolumePeriod: TimeVolumePeriod): void { + set(props, 'timeVolumePeriod', timeVolumePeriod); + }, + + getTimeVolumePeriod(def?: D): TimeVolumePeriod | D { + return get(props, 'timeVolumePeriod', def) as TimeVolumePeriod | D; + }, + + setStartDate(startDate: Date | 'now'): void { + set(props, 'startDate', startDate); + }, + + getStartDate(def?: D): Date | 'now' | D { + return get(props, 'startDate', def) as Date | 'now' | D; + }, + + // Rental + setParentfeature(parentfeature?: string): void { + set(props, 'parentfeature', parentfeature); + }, + + getParentfeature(def?: D): string | D { + return get(props, 'parentfeature', def) as string | D; + }, + + serialize(): Record { + return serialize(props, { ignore: ['inUse'] }); + }, + }; + + return defineEntity(props as LicenseProps, methods, License); +}; + +export default License; diff --git a/src/entities/LicenseTemplate.js b/src/entities/LicenseTemplate.js deleted file mode 100644 index 62d8950..0000000 --- a/src/entities/LicenseTemplate.js +++ /dev/null @@ -1,198 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import BaseEntity from './BaseEntity'; - -/** - * License template entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the license template. Vendor can - * assign this number when creating a license template or let NetLicensing generate one. - * Read-only after creation of the first license from this license template. - * @property string number - * - * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this - * license template. - * @property boolean active - * - * Name for the licensed item. - * @property string name - * - * Type of licenses created from this license template. Supported types: "FEATURE", "TIMEVOLUME", - * "FLOATING", "QUANTITY" - * @property string licenseType - * - * Price for the license. If >0, it must always be accompanied by the currency specification. - * @property double price - * - * Specifies currency for the license price. Check data types to discover which currencies are - * supported. - * @property string currency - * - * If set to true, every new licensee automatically gets one license out of this license template on - * creation. Automatic licenses must have their price set to 0. - * @property boolean automatic - * - * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase. - * @property boolean hidden - * - * If set to true, licenses from this license template are not visible to the end customer, but - * participate in validation. - * @property boolean hideLicenses - * - * If set to true, this license template defines grace period of validity granted after subscription expiration. - * @property boolean gracePeriod - * - * Mandatory for 'TIMEVOLUME' license type. - * @property integer timeVolume - * - * Time volume period for 'TIMEVOLUME' license type. Supported types: "DAY", "WEEK", "MONTH", "YEAR" - * @property integer timeVolumePeriod - * - * Mandatory for 'FLOATING' license type. - * @property integer maxSessions - * - * Mandatory for 'QUANTITY' license type. - * @property integer quantity - * - * @constructor - */ -export default class LicenseTemplate extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - licenseType: 'string', - price: 'double', - currency: 'string', - automatic: 'boolean', - hidden: 'boolean', - hideLicenses: 'boolean', - gracePeriod: 'boolean', - timeVolume: 'int', - timeVolumePeriod: 'string', - maxSessions: 'int', - quantity: 'int', - inUse: 'boolean', - }, - }); - } - - setNumber(number) { - return this.setProperty('number', number); - } - - getNumber(def) { - return this.getProperty('number', def); - } - - setActive(active) { - return this.setProperty('active', active); - } - - getActive(def) { - return this.getProperty('active', def); - } - - setName(name) { - return this.setProperty('name', name); - } - - getName(def) { - return this.getProperty('name', def); - } - - setLicenseType(licenseType) { - return this.setProperty('licenseType', licenseType); - } - - getLicenseType(def) { - return this.getProperty('licenseType', def); - } - - setPrice(price) { - return this.setProperty('price', price); - } - - getPrice(def) { - return this.getProperty('price', def); - } - - setCurrency(currency) { - return this.setProperty('currency', currency); - } - - getCurrency(def) { - return this.getProperty('currency', def); - } - - setAutomatic(automatic) { - return this.setProperty('automatic', automatic); - } - - getAutomatic(def) { - return this.getProperty('automatic', def); - } - - setHidden(hidden) { - return this.setProperty('hidden', hidden); - } - - getHidden(def) { - return this.getProperty('hidden', def); - } - - setHideLicenses(hideLicenses) { - return this.setProperty('hideLicenses', hideLicenses); - } - - getHideLicenses(def) { - return this.getProperty('hideLicenses', def); - } - - setTimeVolume(timeVolume) { - return this.setProperty('timeVolume', timeVolume); - } - - getTimeVolume(def) { - return this.getProperty('timeVolume', def); - } - - setTimeVolumePeriod(timeVolumePeriod) { - return this.setProperty('timeVolumePeriod', timeVolumePeriod); - } - - getTimeVolumePeriod(def) { - return this.getProperty('timeVolumePeriod', def); - } - - setMaxSessions(maxSessions) { - return this.setProperty('maxSessions', maxSessions); - } - - getMaxSessions(def) { - return this.getProperty('maxSessions', def); - } - - setQuantity(quantity) { - return this.setProperty('quantity', quantity); - } - - getQuantity(def) { - return this.getProperty('quantity', def); - } - - getInUse(def) { - return this.getProperty('inUse', def); - } -} diff --git a/src/entities/LicenseTemplate.ts b/src/entities/LicenseTemplate.ts new file mode 100644 index 0000000..96b7d3f --- /dev/null +++ b/src/entities/LicenseTemplate.ts @@ -0,0 +1,212 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// entity factory +import defineEntity from '@/entities/defineEntity'; + +// types +import { LicenseType } from '@/types/constants/LicenseType'; +import { TimeVolumePeriod } from '@/types/constants/TimeVolumePeriod'; +import { + LicenseTemplateMethods, + LicenseTemplateProps, + LicenseTemplate as ILicense, +} from '@/types/entities/LicenseTemplate'; + +// utils +import { set, get } from '@/utils/helpers'; +import serialize from '@/utils/serialize'; + +/** + * License template entity used internally by NetLicensing. + * + * Properties visible via NetLicensing API: + * + * Unique number (across all products of a vendor) that identifies the license template. Vendor can + * assign this number when creating a license template or let NetLicensing generate one. + * Read-only after creation of the first license from this license template. + * @property string number + * + * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this + * license template. + * @property boolean active + * + * Name for the licensed item. + * @property string name + * + * Type of licenses created from this license template. Supported types: "FEATURE", "TIMEVOLUME", + * "FLOATING", "QUANTITY" + * @property string licenseType + * + * Price for the license. If >0, it must always be accompanied by the currency specification. + * @property number price + * + * Specifies currency for the license price. Check data types to discover which currencies are + * supported. + * @property string currency + * + * If set to true, every new licensee automatically gets one license out of this license template on + * creation. Automatic licenses must have their price set to 0. + * @property boolean automatic + * + * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase. + * @property boolean hidden + * + * If set to true, licenses from this license template are not visible to the end customer, but + * participate in validation. + * @property boolean hideLicenses + * + * If set to true, this license template defines grace period of validity granted after subscription expiration. + * @property boolean gracePeriod + * + * Mandatory for 'TIMEVOLUME' license type. + * @property number timeVolume + * + * Time volume period for 'TIMEVOLUME' license type. Supported types: "DAY", "WEEK", "MONTH", "YEAR" + * @property string timeVolumePeriod + * + * Mandatory for 'FLOATING' license type. + * @property number maxSessions + * + * Mandatory for 'QUANTITY' license type. + * @property number quantity + */ + +const LicenseTemplate = function ( + properties: LicenseTemplateProps = {} as LicenseTemplateProps, +): ILicense { + const props: LicenseTemplateProps = { ...properties }; + + const methods: LicenseTemplateMethods = { + setActive(active: boolean): void { + set(props, 'active', active); + }, + + getActive(def?: D): boolean | D { + return get(props, 'active', def) as boolean | D; + }, + + setNumber(number: string): void { + set(props, 'number', number); + }, + + getNumber(def?: D): string | D { + return get(props, 'number', def) as string | D; + }, + + setName(name: string): void { + set(props, 'name', name); + }, + + getName(def?: D): string | D { + return get(props, 'name', def) as string | D; + }, + + setLicenseType(type: LicenseType): void { + set(props, 'licenseType', type); + }, + + getLicenseType(def?: D): LicenseType | D { + return get(props, 'licenseType', def) as LicenseType | D; + }, + + setPrice(price: number): void { + set(props, 'price', price); + }, + + getPrice(def?: D): number | D { + return get(props, 'price', def) as number | D; + }, + + setCurrency(currency: string): void { + set(props, 'currency', currency); + }, + + getCurrency(def?: D): string | D { + return get(props, 'currency', def) as string | D; + }, + + setAutomatic(automatic: boolean): void { + set(props, 'automatic', automatic); + }, + + getAutomatic(def?: D): boolean | D { + return get(props, 'automatic', def) as boolean | D; + }, + + setHidden(hidden: boolean): void { + set(props, 'hidden', hidden); + }, + + getHidden(def?: D): boolean | D { + return get(props, 'hidden', def) as boolean | D; + }, + + setHideLicenses(hideLicenses: boolean): void { + set(props, 'hideLicenses', hideLicenses); + }, + + getHideLicenses(def?: D): boolean | D { + return get(props, 'hideLicenses', def) as boolean | D; + }, + + setGracePeriod(gradePeriod: boolean): void { + set(props, 'gracePeriod', gradePeriod); + }, + + getGracePeriod(def?: D): boolean | D { + return get(props, 'gracePeriod', def) as boolean | D; + }, + + setTimeVolume(timeVolume: number): void { + set(props, 'timeVolume', timeVolume); + }, + + getTimeVolume(def?: D): number | D { + return get(props, 'timeVolume', def) as number | D; + }, + + setTimeVolumePeriod(timeVolumePeriod: TimeVolumePeriod): void { + set(props, 'timeVolumePeriod', timeVolumePeriod); + }, + + getTimeVolumePeriod(def?: D): TimeVolumePeriod | D { + return get(props, 'timeVolumePeriod', def) as TimeVolumePeriod | D; + }, + + setMaxSessions(maxSessions: number): void { + set(props, 'maxSessions', maxSessions); + }, + + getMaxSessions(def?: D): number | D { + return get(props, 'maxSessions', def) as number | D; + }, + + setQuantity(quantity: number): void { + set(props, 'quantity', quantity); + }, + + getQuantity(def?: D): number | D { + return get(props, 'quantity', def) as number | D; + }, + + setProductModuleNumber: function (productModuleNumber: string): void { + set(props, 'productModuleNumber', productModuleNumber); + }, + + getProductModuleNumber: function (def?: D): string | D { + return get(props, 'productModuleNumber', def) as string | D; + }, + + serialize(): Record { + return serialize(props, { ignore: ['inUse'] }); + }, + }; + + return defineEntity(props as LicenseTemplateProps, methods, LicenseTemplate); +}; + +export default LicenseTemplate; diff --git a/src/entities/LicenseTransactionJoin.js b/src/entities/LicenseTransactionJoin.js deleted file mode 100644 index 673edc0..0000000 --- a/src/entities/LicenseTransactionJoin.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -export default class LicenseTransactionJoin { - constructor(transaction, license) { - this.transaction = transaction; - this.license = license; - } - - setTransaction(transaction) { - this.transaction = transaction; - return this; - } - - getTransaction(def) { - return this.transaction || def; - } - - setLicense(license) { - this.license = license; - return this; - } - - getLicense(def) { - return this.license || def; - } -} diff --git a/src/entities/LicenseTransactionJoin.ts b/src/entities/LicenseTransactionJoin.ts new file mode 100644 index 0000000..0740c65 --- /dev/null +++ b/src/entities/LicenseTransactionJoin.ts @@ -0,0 +1,37 @@ +// types +import type { License } from '@/types/entities/License'; +import type { LicenseTransactionJoin as ILicenseTransactionJoin } from '@/types/entities/LicenseTransactionJoin'; +import type { Transaction } from '@/types/entities/Transaction'; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +export default class LicenseTransactionJoin implements ILicenseTransactionJoin { + transaction: Transaction; + license: License; + + constructor(transaction: Transaction, license: License) { + this.transaction = transaction; + this.license = license; + } + + setTransaction(transaction: Transaction): void { + this.transaction = transaction; + } + + getTransaction(): Transaction { + return this.transaction; + } + + setLicense(license: License): void { + this.license = license; + } + + getLicense(): License { + return this.license; + } +} diff --git a/src/entities/Licensee.js b/src/entities/Licensee.js deleted file mode 100644 index 0e0257d..0000000 --- a/src/entities/Licensee.js +++ /dev/null @@ -1,111 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import BaseEntity from './BaseEntity'; - -/** - * Licensee entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this - * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for - * the licensee. - * @property string number - * - * Licensee name. - * @property string name - * - * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is - * disabled (tbd). - * @property boolean active - * - * Licensee Secret for licensee - * @property string licenseeSecret - * - * Mark licensee for transfer. - * @property boolean markedForTransfer - * - * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber - * - * @constructor - */ -export default class Licensee extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - licenseeSecret: 'string', - markedForTransfer: 'boolean', - inUse: 'boolean', - }, - }); - } - - setNumber(number) { - return this.setProperty('number', number); - } - - getNumber(def) { - return this.getProperty('number', def); - } - - setActive(active) { - return this.setProperty('active', active); - } - - getActive(def) { - return this.getProperty('active', def); - } - - setName(name) { - return this.setProperty('name', name); - } - - getName(def) { - return this.getProperty('name', def); - } - - setProductNumber(productNumber) { - return this.setProperty('productNumber', productNumber); - } - - getProductNumber(def) { - return this.getProperty('productNumber', def); - } - - /** - * @deprecated - */ - setLicenseeSecret(licenseeSecret) { - return this.setProperty('licenseeSecret', licenseeSecret); - } - - /** - * @deprecated - */ - getLicenseeSecret(def) { - return this.getProperty('licenseeSecret', def); - } - - setMarkedForTransfer(markedForTransfer) { - return this.setProperty('markedForTransfer', markedForTransfer); - } - - getMarkedForTransfer(def) { - return this.getProperty('markedForTransfer', def); - } - - getInUse(def) { - return this.getProperty('inUse', def); - } -} diff --git a/src/entities/Licensee.ts b/src/entities/Licensee.ts new file mode 100644 index 0000000..4d49d9c --- /dev/null +++ b/src/entities/Licensee.ts @@ -0,0 +1,96 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +// entity factory +import defineEntity from '@/entities/defineEntity'; + +// types +import { LicenseeMethods, LicenseeProps, Licensee as ILicense } from '@/types/entities/Licensee'; + +// utils +import { set, get } from '@/utils/helpers'; +import serialize from '@/utils/serialize'; + +/** + * Licensee entity used internally by NetLicensing. + * + * Properties visible via NetLicensing API: + * + * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this + * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for + * the licensee. + * @property string number + * + * Licensee name. + * @property string name + * + * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is + * disabled (tbd). + * @property boolean active + * + * Licensee Secret for licensee deprecated use Node-Locked Licensing Model instead + * @property string licenseeSecret + * + * Mark licensee for transfer. + * @property boolean markedForTransfer + * + * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property + * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber + */ + +const Licensee = function (properties: LicenseeProps = {} as LicenseeProps): ILicense { + const props: LicenseeProps = { ...properties }; + + const methods: LicenseeMethods = { + setActive(active: boolean): void { + set(props, 'active', active); + }, + + getActive(def?: D): boolean | D { + return get(props, 'active', def) as boolean | D; + }, + + setNumber(number: string): void { + set(props, 'number', number); + }, + getNumber(def?: D): string | D { + return get(props, 'number', def) as string | D; + }, + + setName(name: string): void { + set(props, 'name', name); + }, + + getName(def?: D): string | D { + return get(props, 'name', def) as string | D; + }, + + setProductNumber(number: string): void { + set(props, 'productNumber', number); + }, + + getProductNumber(def?: D): string | D { + return get(props, 'productNumber', def) as string | D; + }, + + setMarkedForTransfer(mark: boolean): void { + set(props, 'markedForTransfer', mark); + }, + + getMarkedForTransfer(def?: D): boolean | D { + return get(props, 'markedForTransfer', def) as boolean | D; + }, + + serialize(): Record { + return serialize(props, { ignore: ['inUse'] }); + }, + }; + + return defineEntity(props as LicenseeProps, methods, Licensee); +}; + +export default Licensee; diff --git a/src/entities/Notification.js b/src/entities/Notification.js deleted file mode 100644 index 399647d..0000000 --- a/src/entities/Notification.js +++ /dev/null @@ -1,114 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import BaseEntity from './BaseEntity'; - -/** - * NetLicensing Notification entity. - * - * Properties visible via NetLicensing API: - * - * Unique number that identifies the notification. Vendor can assign this number when creating a notification or - * let NetLicensing generate one. - * @property string number - * - * If set to false, the notification is disabled. The notification will not be fired when the event triggered. - * @property boolean active - * - * Notification name. - * @property string name - * - * Notification type. Indicate the method of transmitting notification, ex: EMAIL, WEBHOOK. - * @property float type - * - * Comma separated string of events that fire the notification when emitted. - * @property string events - * - * Notification response payload. - * @property string payload - * - * Notification response url. Optional. Uses only for WEBHOOK type notification. - * @property string url - * - * Arbitrary additional user properties of string type may be associated with each notification. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted. - * - * @constructor - */ -export default class Notification extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - protocol: 'string', - events: 'string', - payload: 'string', - endpoint: 'string', - }, - }); - } - - setNumber(number) { - return this.setProperty('number', number); - } - - getNumber(def) { - return this.getProperty('number', def); - } - - setActive(active) { - return this.setProperty('active', active); - } - - getActive(def) { - return this.getProperty('active', def); - } - - setName(name) { - return this.setProperty('name', name); - } - - getName(def) { - return this.getProperty('name', def); - } - - setProtocol(type) { - return this.setProperty('protocol', type); - } - - getProtocol(def) { - return this.getProperty('protocol', def); - } - - setEvents(events) { - return this.setProperty('events', events); - } - - getEvents(def) { - return this.getProperty('events', def); - } - - setPayload(payload) { - return this.setProperty('payload', payload); - } - - getPayload(def) { - return this.getProperty('payload', def); - } - - setEndpoint(endpoint) { - return this.setProperty('endpoint', endpoint); - } - - getEndpoint(def) { - return this.getProperty('endpoint', def); - } -} diff --git a/src/entities/Notification.ts b/src/entities/Notification.ts new file mode 100644 index 0000000..a27ab56 --- /dev/null +++ b/src/entities/Notification.ts @@ -0,0 +1,132 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// entity factory +import defineEntity from '@/entities/defineEntity'; +import { NotificationEvent } from '@/types/constants/NotificationEvent'; +import { NotificationProtocol } from '@/types/constants/NotificationProtocol'; + +// types +import { NotificationMethods, NotificationProps, Notification as INotification } from '@/types/entities/Notification'; + +// utils +import { set, get } from '@/utils/helpers'; +import serialize from '@/utils/serialize'; + +/** + * NetLicensing Notification entity. + * + * Properties visible via NetLicensing API: + * + * Unique number that identifies the notification. Vendor can assign this number when creating a notification or + * let NetLicensing generate one. + * @property string number + * + * If set to false, the notification is disabled. The notification will not be fired when the event triggered. + * @property boolean active + * + * Notification name. + * @property string name + * + * Notification type. Indicate the method of transmitting notification, ex: EMAIL, WEBHOOK. + * @property float type + * + * Comma separated string of events that fire the notification when emitted. + * @property string events + * + * Notification response payload. + * @property string payload + * + * Notification response url. Optional. Uses only for WEBHOOK type notification. + * @property string url + * + * Arbitrary additional user properties of string type may be associated with each notification. + * The name of user property must not be equal to any of the fixed property names listed above and must be none of id, + * deleted. + */ + +const Notification = function ( + properties: NotificationProps = {} as NotificationProps, +): INotification { + const props: NotificationProps = { ...properties }; + + const methods: NotificationMethods = { + setActive(active: boolean): void { + set(props, 'active', active); + }, + + getActive(def?: D): boolean | D { + return get(props, 'active', def) as boolean | D; + }, + + setNumber(number: string): void { + set(props, 'number', number); + }, + + getNumber(def?: D): string | D { + return get(props, 'number', def) as string | D; + }, + + setName(name: string): void { + set(props, 'name', name); + }, + + getName(def?: D): string | D { + return get(props, 'name', def) as string | D; + }, + + setProtocol(protocol: NotificationProtocol): void { + set(props, 'protocol', protocol); + }, + + getProtocol(def?: D): NotificationProtocol | D { + return get(props, 'protocol', def) as NotificationProtocol | D; + }, + + setEvents(events: NotificationEvent[]): void { + set(props, 'events', events); + }, + + getEvents(def?: D): NotificationEvent[] | D { + return get(props, 'events', def) as NotificationEvent[] | D; + }, + + addEvent(event: NotificationEvent): void { + const events = this.getEvents([]) as NotificationEvent[]; + events.push(event); + + this.setEvents(events); + }, + + setPayload(payload: string): void { + set(props, 'payload', payload); + }, + + getPayload(def?: D): string | D { + return get(props, 'payload', def) as string | D; + }, + + setEndpoint(endpoint: string): void { + set(props, 'endpoint', endpoint); + }, + + getEndpoint(def?: D): string | D { + return get(props, 'endpoint', def) as string | D; + }, + + serialize(): Record { + const data = serialize(props); + + data.events = this.getEvents([]).join(','); + + return data; + }, + }; + + return defineEntity(props as NotificationProps, methods, Notification); +}; + +export default Notification; diff --git a/src/entities/PaymentMethod.js b/src/entities/PaymentMethod.js deleted file mode 100644 index 5d2e74c..0000000 --- a/src/entities/PaymentMethod.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import BaseEntity from './BaseEntity'; - -/** - * PaymentMethod entity used internally by NetLicensing. - * - * @property string number - * @property boolean active - * - * @constructor - */ -export default class PaymentMethod extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - 'paypal.subject': 'string', - }, - }); - } - - setNumber(number) { - return this.setProperty('number', number); - } - - getNumber(def) { - return this.getProperty('number', def); - } - - setActive(active) { - return this.setProperty('active', active); - } - - getActive(def) { - return this.getProperty('active', def); - } - - setPaypalSubject(paypalSubject) { - return this.setProperty('paypal.subject', paypalSubject); - } - - getPaypalSubject(def) { - return this.getProperty('paypal.subject', def); - } -} diff --git a/src/entities/PaymentMethod.ts b/src/entities/PaymentMethod.ts new file mode 100644 index 0000000..ec803c6 --- /dev/null +++ b/src/entities/PaymentMethod.ts @@ -0,0 +1,61 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// entity factory +import defineEntity from '@/entities/defineEntity'; + +// types +import { + PaymentMethodMethods, + PaymentMethodProps, + PaymentMethod as IPaymentMethod, +} from '@/types/entities/PaymentMethod'; + +// utils +import { set, get } from '@/utils/helpers'; + +/** + * PaymentMethod entity used internally by NetLicensing. + * + * @property string number + * @property boolean active + * @property string paypal.subject + */ +const PaymentMethod = function ( + properties: PaymentMethodProps = {} as PaymentMethodProps, +): IPaymentMethod { + const props: PaymentMethodProps = { ...properties }; + + const methods: PaymentMethodMethods = { + setActive(active: boolean): void { + set(props, 'active', active); + }, + + getActive(def?: D): boolean | D { + return get(props, 'active', def) as boolean | D; + }, + + setNumber(number: string): void { + set(props, 'number', number); + }, + + getNumber(def?: D): string | D { + return get(props, 'number', def) as string | D; + }, + + setPaypalSubject(subject: string): void { + set(props, 'paypal.subject', subject); + }, + + getPaypalSubject(def?: D): string | D { + return get(props, 'paypal.subject', def) as string | D; + }, + }; + + return defineEntity(props as PaymentMethodProps, methods, PaymentMethod); +}; + +export default PaymentMethod; diff --git a/src/entities/Product.js b/src/entities/Product.js deleted file mode 100644 index c83e57a..0000000 --- a/src/entities/Product.js +++ /dev/null @@ -1,225 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import BaseEntity from './BaseEntity'; -import ProductDiscount from './ProductDiscount'; - -/** - * The discounts map - * @type {{}} - * @private - */ -const discountsMap = new WeakMap(); - -/** - * An identifier that show if discounts was touched - * @type {{}} - * @private - */ -const discountsTouched = new WeakMap(); - -/** - * NetLicensing Product entity. - * - * Properties visible via NetLicensing API: - * - * Unique number that identifies the product. Vendor can assign this number when creating a product or - * let NetLicensing generate one. Read-only after creation of the first licensee for the product. - * @property string number - * - * If set to false, the product is disabled. No new licensees can be registered for the product, - * existing licensees can not obtain new licenses. - * @property boolean active - * - * Product name. Together with the version identifies the product for the end customer. - * @property string name - * - * Product version. Convenience parameter, additional to the product name. - * @property float version - * - * If set to 'true', non-existing licensees will be created at first validation attempt. - * @property boolean licenseeAutoCreate - * - * Licensee secret mode for product.Supported types: "DISABLED", "PREDEFINED", "CLIENT" - * @property boolean licenseeSecretMode - * - * Product description. Optional. - * @property string description - * - * Licensing information. Optional. - * @property string licensingInfo - * - * @property boolean inUse - * - * Arbitrary additional user properties of string type may be associated with each product. The name of user property - * must not be equal to any of the fixed property names listed above and must be none of id, deleted. - * - * @constructor - */ -export default class Product extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - version: 'string', - description: 'string', - licensingInfo: 'string', - licenseeAutoCreate: 'boolean', - licenseeSecretMode: 'string', - inUse: 'boolean', - }, - }); - - discountsMap.set(this, []); - discountsTouched.set(this, false); - } - - setNumber(number) { - return this.setProperty('number', number); - } - - getNumber(def) { - return this.getProperty('number', def); - } - - setActive(active) { - return this.setProperty('active', active); - } - - getActive(def) { - return this.getProperty('active', def); - } - - setName(name) { - return this.setProperty('name', name); - } - - getName(def) { - return this.getProperty('name', def); - } - - setVersion(version) { - return this.setProperty('version', version); - } - - getVersion(def) { - return this.getProperty('version', def); - } - - setLicenseeAutoCreate(licenseeAutoCreate) { - return this.setProperty('licenseeAutoCreate', licenseeAutoCreate); - } - - getLicenseeAutoCreate(def) { - return this.getProperty('licenseeAutoCreate', def); - } - - /** - * @deprecated use ProductModule.setLicenseeSecretMode instead - */ - setLicenseeSecretMode(licenseeSecretMode) { - return this.setProperty('licenseeSecretMode', licenseeSecretMode); - } - - /** - * @deprecated use ProductModule.getLicenseeSecretMode instead - */ - getLicenseeSecretMode(def) { - return this.getProperty('licenseeSecretMode', def); - } - - setDescription(description) { - return this.setProperty('description', description); - } - - getDescription(def) { - return this.getProperty('description', def); - } - - setLicensingInfo(licensingInfo) { - return this.setProperty('licensingInfo', licensingInfo); - } - - getLicensingInfo(def) { - return this.getProperty('licensingInfo', def); - } - - getInUse(def) { - return this.getProperty('inUse', def); - } - - /** - * Add discount to product - * - * @param discount NetLicensing.ProductDiscount - * @returns {NetLicensing.Product} - */ - addDiscount(discount) { - const discounts = discountsMap.get(this); - - let productDiscount = discount; - - if (typeof productDiscount !== 'string' && !(productDiscount instanceof ProductDiscount)) { - productDiscount = new ProductDiscount(productDiscount); - } - - discounts.push(productDiscount); - discountsMap.set(this, discounts); - discountsTouched.set(this, true); - - return this; - } - - /** - * Set discounts to product - * @param discounts - */ - setProductDiscounts(discounts) { - discountsMap.set(this, []); - discountsTouched.set(this, true); - - if (!discounts) return this; - - if (Array.isArray(discounts)) { - discounts.forEach((discount) => { - this.addDiscount(discount); - }); - - return this; - } - - this.addDiscount(discounts); - - return this; - } - - /** - * Get array of objects discounts - * @returns {Array} - */ - getProductDiscounts() { - return Object.assign([], discountsMap.get(this)); - } - - asPropertiesMap() { - const propertiesMap = super.asPropertiesMap(); - - if (discountsMap.get(this).length) { - propertiesMap.discount = discountsMap.get(this).map((discount) => discount.toString()); - } - - if (!propertiesMap.discount && discountsTouched.get(this)) { - propertiesMap.discount = ''; - } - - return propertiesMap; - } -} diff --git a/src/entities/Product.ts b/src/entities/Product.ts new file mode 100644 index 0000000..b7a7b75 --- /dev/null +++ b/src/entities/Product.ts @@ -0,0 +1,161 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// entity factory +import defineEntity from '@/entities/defineEntity'; + +// types +import { ProductProps, Product as IProduct, ProductMethods } from '@/types/entities/Product'; +import { ProductDiscount } from '@/types/entities/ProductDiscount'; + +// utils +import { set, get } from '@/utils/helpers'; +import serialize from '@/utils/serialize'; + +/** + * NetLicensing Product entity. + * + * Properties visible via NetLicensing API: + * + * Unique number that identifies the product. Vendor can assign this number when creating a product or + * let NetLicensing generate one. Read-only after creation of the first licensee for the product. + * @property string number + * + * If set to false, the product is disabled. No new licensees can be registered for the product, + * existing licensees can not obtain new licenses. + * @property boolean active + * + * Product name. Together with the version identifies the product for the end customer. + * @property string name + * + * Product version. Convenience parameter, additional to the product name. + * @property float version + * + * If set to 'true', non-existing licensees will be created at first validation attempt. + * @property boolean licenseeAutoCreate + * + * Licensee secret mode for product.Supported types: "DISABLED", "PREDEFINED", "CLIENT" + * @property boolean licenseeSecretMode + * + * Product description. Optional. + * @property string description + * + * Licensing information. Optional. + * @property string licensingInfo + * + * @property boolean inUse + * + * Arbitrary additional user properties of string type may be associated with each product. The name of user property + * must not be equal to any of the fixed property names listed above and must be none of id, deleted. + */ +const Product = function (properties: ProductProps = {} as ProductProps): IProduct { + const props: ProductProps = { ...properties }; + + const methods: ProductMethods = { + setActive(active: boolean): void { + set(props, 'active', active); + }, + + getActive(def?: D): boolean | D { + return get(props, 'active', def) as boolean | D; + }, + + setNumber(number: string): void { + set(props, 'number', number); + }, + + getNumber(def?: D): string | D { + return get(props, 'number', def) as string | D; + }, + + setName(name: string): void { + set(props, 'name', name); + }, + + getName(def?: D): string | D { + return get(props, 'name', def) as string | D; + }, + + setVersion(version: string): void { + set(props, 'version', version); + }, + + getVersion(def?: D): string | number | D { + return get(props, 'version', def) as string | number | D; + }, + + setDescription(description: string): void { + set(props, 'description', description); + }, + + getDescription(def?: D): string | D { + return get(props, 'description', def) as string | D; + }, + + setLicensingInfo(licensingInfo: string): void { + set(props, 'licensingInfo', licensingInfo); + }, + + getLicensingInfo(def?: D): string | D { + return get(props, 'licensingInfo', def) as string | D; + }, + + setLicenseeAutoCreate(licenseeAutoCreate: boolean): void { + set(props, 'licenseeAutoCreate', licenseeAutoCreate); + }, + + getLicenseeAutoCreate(def?: D): boolean | D { + return get(props, 'licenseeAutoCreate', def) as boolean | D; + }, + + setDiscounts(discounts: ProductDiscount[]): void { + set(props, 'discounts', discounts); + }, + + getDiscounts(def?: D): ProductDiscount[] | D { + return get(props, 'discounts', def) as ProductDiscount[] | D; + }, + + addDiscount(discount: ProductDiscount): void { + const discounts = this.getDiscounts([] as ProductDiscount[]); + discounts.push(discount); + + this.setDiscounts(discounts); + }, + + removeDiscount(discount: ProductDiscount): void { + const discounts = this.getDiscounts(); + + if (Array.isArray(discounts) && discounts.length > 0) { + discounts.splice(discounts.indexOf(discount), 1); + this.setDiscounts(discounts); + } + }, + + setProductDiscounts(productDiscounts: ProductDiscount[]): void { + this.setDiscounts(productDiscounts); + }, + + getProductDiscounts(def?: D): ProductDiscount[] | D { + return this.getDiscounts(def); + }, + + serialize(): Record { + const map: Record = serialize(props, { ignore: ['discounts', 'inUse'] }); + const discounts = this.getDiscounts(); + + if (discounts) { + map.discount = discounts.length > 0 ? discounts.map((discount) => discount.toString()) : ''; + } + + return map; + }, + }; + + return defineEntity(props as ProductProps, methods, Product); +}; + +export default Product; diff --git a/src/entities/ProductDiscount.js b/src/entities/ProductDiscount.js deleted file mode 100644 index 41f5c6d..0000000 --- a/src/entities/ProductDiscount.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -import BaseEntity from './BaseEntity'; - -export default class ProductDiscount extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - totalPrice: 'float', - currency: 'string', - amountFix: 'float', - amountPercent: 'int', - }, - }); - } - - setTotalPrice(totalPrice) { - return this.setProperty('totalPrice', totalPrice); - } - - getTotalPrice(def) { - return this.getProperty('totalPrice', def); - } - - setCurrency(currency) { - return this.setProperty('currency', currency); - } - - getCurrency(def) { - return this.getProperty('currency', def); - } - - setAmountFix(amountFix) { - return this.setProperty('amountFix', amountFix).removeProperty('amountPercent'); - } - - getAmountFix(def) { - return this.getProperty('amountFix', def); - } - - setAmountPercent(amountPercent) { - return this.setProperty('amountPercent', amountPercent).removeProperty('amountFix'); - } - - getAmountPercent(def) { - return this.getProperty('amountPercent', def); - } - - toString() { - const totalPrice = this.getTotalPrice(); - const currency = this.getCurrency(); - let amount = 0; - - if (this.getAmountFix(null)) amount = this.getAmountFix(); - if (this.getAmountPercent(null)) amount = `${this.getAmountPercent()}%`; - - return `${totalPrice};${currency};${amount}`; - } -} diff --git a/src/entities/ProductDiscount.ts b/src/entities/ProductDiscount.ts new file mode 100644 index 0000000..02a50b7 --- /dev/null +++ b/src/entities/ProductDiscount.ts @@ -0,0 +1,85 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// entity factory +import defineEntity from '@/entities/defineEntity'; + +// errors +import NlicError from '@/errors/NlicError'; + +// types +import { + ProductDiscountMethods, + ProductDiscountProps, + ProductDiscount as IProductDiscount, +} from '@/types/entities/ProductDiscount'; + +// utils +import { set, get } from '@/utils/helpers'; + +const ProductDiscount = function (properties: ProductDiscountProps = {} as ProductDiscountProps): IProductDiscount { + const props: ProductDiscountProps = { ...properties }; + + if (props.amountFix && props.amountPercent) { + throw new NlicError('Properties "amountFix" and "amountPercent" cannot be used at the same time'); + } + + const methods: ProductDiscountMethods = { + setTotalPrice(totalPrice: number): void { + set(props, 'totalPrice', totalPrice); + }, + + getTotalPrice(def?: D): number | D { + return get(props, 'totalPrice', def) as number | D; + }, + + setCurrency(currency: string): void { + set(props, 'currency', currency); + }, + + getCurrency(def?: D): string | D { + return get(props, 'currency', def) as string | D; + }, + + setAmountFix(amountFix: number): void { + set(props, 'amountFix', amountFix); + }, + + getAmountFix(def?: D): number | D { + return get(props, 'amountFix', def) as number | D; + }, + + setAmountPercent(amountPercent: number): void { + set(props, 'amountPercent', amountPercent); + }, + + getAmountPercent(def?: D): number | D { + return get(props, 'amountPercent', def) as number | D; + }, + + toString() { + const total = this.getTotalPrice(); + const currency = this.getCurrency(); + const amount = this.getAmountPercent() ? `${this.getAmountPercent()}%` : this.getAmountFix(); + + return total && currency && amount ? `${total};${currency};${amount}` : ''; + }, + }; + + return defineEntity(props, methods, ProductDiscount, { + set: (obj, prop) => { + if (prop === 'amountFix') { + delete obj.amountPercent; + } + + if (prop === 'amountPercent') { + delete obj.amountFix; + } + }, + }); +}; + +export default ProductDiscount; diff --git a/src/entities/ProductModule.js b/src/entities/ProductModule.js deleted file mode 100644 index 67ba694..0000000 --- a/src/entities/ProductModule.js +++ /dev/null @@ -1,143 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import BaseEntity from './BaseEntity'; - -/** - * Product module entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign - * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first - * licensee for the product. - * @property string number - * - * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this - * product module. - * @property boolean active - * - * Product module name that is visible to the end customers in NetLicensing Shop. - * @property string name - * - * Licensing model applied to this product module. Defines what license templates can be - * configured for the product module and how licenses for this product module are processed during validation. - * @property string licensingModel - * - * Maximum checkout validity (days). Mandatory for 'Floating' licensing model. - * @property integer maxCheckoutValidity - * - * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model. - * @property integer yellowThreshold - * - * Remaining time volume for red level. Mandatory for 'Rental' licensing model. - * @property integer redThreshold - * - * License template. Mandatory for 'Try & Buy' licensing model. Supported types: "TIMEVOLUME", "FEATURE". - * @property string licenseTemplate - * - * Licensee secret mode for product.Supported types: "PREDEFINED", "CLIENT" - * @property boolean licenseeSecretMode - * - * @constructor - */ -export default class ProductModule extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - name: 'string', - licensingModel: 'string', - maxCheckoutValidity: 'int', - yellowThreshold: 'int', - redThreshold: 'int', - licenseTemplate: 'string', - inUse: 'boolean', - licenseeSecretMode: 'string', - }, - }); - } - - setNumber(number) { - return this.setProperty('number', number); - } - - getNumber(def) { - return this.getProperty('number', def); - } - - setActive(active) { - return this.setProperty('active', active); - } - - getActive(def) { - return this.getProperty('active', def); - } - - setName(name) { - return this.setProperty('name', name); - } - - getName(def) { - return this.getProperty('name', def); - } - - setLicensingModel(licensingModel) { - return this.setProperty('licensingModel', licensingModel); - } - - getLicensingModel(def) { - return this.getProperty('licensingModel', def); - } - - setMaxCheckoutValidity(maxCheckoutValidity) { - return this.setProperty('maxCheckoutValidity', maxCheckoutValidity); - } - - getMaxCheckoutValidity(def) { - return this.getProperty('maxCheckoutValidity', def); - } - - setYellowThreshold(yellowThreshold) { - return this.setProperty('yellowThreshold', yellowThreshold); - } - - getYellowThreshold(def) { - return this.getProperty('yellowThreshold', def); - } - - setRedThreshold(redThreshold) { - return this.setProperty('redThreshold', redThreshold); - } - - getRedThreshold(def) { - return this.getProperty('redThreshold', def); - } - - setLicenseTemplate(licenseTemplate) { - return this.setProperty('licenseTemplate', licenseTemplate); - } - - getLicenseTemplate(def) { - return this.getProperty('licenseTemplate', def); - } - - getInUse(def) { - return this.getProperty('inUse', def); - } - - setLicenseeSecretMode(licenseeSecretMode) { - return this.setProperty('licenseeSecretMode', licenseeSecretMode); - } - - getLicenseeSecretMode(def) { - return this.getProperty('licenseeSecretMode', def); - } -} diff --git a/src/entities/ProductModule.ts b/src/entities/ProductModule.ts new file mode 100644 index 0000000..e71e06d --- /dev/null +++ b/src/entities/ProductModule.ts @@ -0,0 +1,131 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// entity factory +import defineEntity from '@/entities/defineEntity'; +import { LicensingModel } from '@/types/constants/LicensingModel'; + +// types +import { + ProductModule as IProductModule, + ProductModuleMethods, + ProductModuleProps, +} from '@/types/entities/ProductModule'; + +// utils +import { set, get } from '@/utils/helpers'; +import serialize from '@/utils/serialize'; + +/** + * Product module entity used internally by NetLicensing. + * + * Properties visible via NetLicensing API: + * + * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign + * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first + * licensee for the product. + * @property string number + * + * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this + * product module. + * @property boolean active + * + * Product module name that is visible to the end customers in NetLicensing Shop. + * @property string name + * + * Licensing model applied to this product module. Defines what license templates can be + * configured for the product module and how licenses for this product module are processed during validation. + * @property string licensingModel + * + * Maximum checkout validity (days). Mandatory for 'Floating' licensing model. + * @property number maxCheckoutValidity + * + * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model. + * @property number yellowThreshold + * + * Remaining time volume for red level. Mandatory for 'Rental' licensing model. + * @property number redThreshold + */ + +const ProductModule = function ( + properties: ProductModuleProps = {} as ProductModuleProps, +): IProductModule { + const props: ProductModuleProps = { ...properties }; + + const methods: ProductModuleMethods = { + setActive(active: boolean): void { + set(props, 'active', active); + }, + + getActive(def?: D): boolean | D { + return get(props, 'active', def) as boolean | D; + }, + + setNumber(number: string): void { + set(props, 'number', number); + }, + + getNumber(def?: D): string | D { + return get(props, 'number', def) as string | D; + }, + + setName(name: string): void { + set(props, 'name', name); + }, + + getName(def?: D): string | D { + return get(props, 'name', def) as string | D; + }, + + setLicensingModel(licensingModel: LicensingModel): void { + set(props, 'licensingModel', licensingModel); + }, + + getLicensingModel(def?: D): LicensingModel | D { + return get(props, 'licensingModel', def) as LicensingModel | D; + }, + + setMaxCheckoutValidity(maxCheckoutValidity: number): void { + set(props, 'maxCheckoutValidity', maxCheckoutValidity); + }, + + getMaxCheckoutValidity(def?: D): number | D { + return get(props, 'maxCheckoutValidity', def) as number | D; + }, + + setYellowThreshold(yellowThreshold: number): void { + set(props, 'yellowThreshold', yellowThreshold); + }, + + getYellowThreshold(def?: D): number | D { + return get(props, 'yellowThreshold', def) as number | D; + }, + + setRedThreshold(redThreshold: number): void { + set(props, 'redThreshold', redThreshold); + }, + + getRedThreshold(def?: D): number | D { + return get(props, 'redThreshold', def) as number | D; + }, + + setProductNumber(productNumber: string): void { + set(props, 'productNumber', productNumber); + }, + + getProductNumber: function (def?: D): string | D { + return get(props, 'productNumber', def) as string | D; + }, + + serialize(): Record { + return serialize(props, { ignore: ['inUse'] }); + }, + }; + + return defineEntity(props as ProductModuleProps, methods, ProductModule); +}; + +export default ProductModule; diff --git a/src/entities/Token.js b/src/entities/Token.js deleted file mode 100644 index f95027a..0000000 --- a/src/entities/Token.js +++ /dev/null @@ -1,168 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import BaseEntity from './BaseEntity'; - -/** - * Product module entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number - * @property string number - * - * If set to false, the token is disabled. - * @property boolean active - * - * Expiration Time - * @property string expirationTime - * - * @property string vendorNumber - * - * Token type to be generated. - * DEFAULT - default one-time token (will be expired after first request) - * SHOP - shop token is used to redirect customer to the netlicensingShop(licenseeNumber is mandatory) - * APIKEY - APIKey-token - * @property string tokenType - * - * @property string licenseeNumber - * - * @constructor - */ -export default class Token extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - active: 'boolean', - expirationTime: 'date', - vendorNumber: 'string', - tokenType: 'string', - licenseeNumber: 'string', - successURL: 'string', - successURLTitle: 'string', - cancelURL: 'string', - cancelURLTitle: 'string', - shopURL: 'string', - }, - }); - } - - setNumber(number) { - return this.setProperty('number', number); - } - - getNumber(def) { - return this.getProperty('number', def); - } - - setActive(active) { - return this.setProperty('active', active); - } - - getActive(def) { - return this.getProperty('active', def); - } - - setExpirationTime(expirationTime) { - return this.setProperty('expirationTime', expirationTime); - } - - getExpirationTime(def) { - return this.getProperty('expirationTime', def); - } - - setVendorNumber(vendorNumber) { - return this.setProperty('vendorNumber', vendorNumber); - } - - getVendorNumber(def) { - return this.getProperty('vendorNumber', def); - } - - setTokenType(tokenType) { - return this.setProperty('tokenType', tokenType); - } - - getTokenType(def) { - return this.getProperty('tokenType', def); - } - - setLicenseeNumber(licenseeNumber) { - return this.setProperty('licenseeNumber', licenseeNumber); - } - - getLicenseeNumber(def) { - return this.getProperty('licenseeNumber', def); - } - - setSuccessURL(successURL) { - return this.setProperty('successURL', successURL); - } - - getSuccessURL(def) { - return this.getProperty('successURL', def); - } - - setSuccessURLTitle(successURLTitle) { - return this.setProperty('successURLTitle', successURLTitle); - } - - getSuccessURLTitle(def) { - return this.getProperty('successURLTitle', def); - } - - setCancelURL(cancelURL) { - return this.setProperty('cancelURL', cancelURL); - } - - getCancelURL(def) { - return this.getProperty('cancelURL', def); - } - - setCancelURLTitle(cancelURLTitle) { - return this.setProperty('cancelURLTitle', cancelURLTitle); - } - - getCancelURLTitle(def) { - return this.getProperty('cancelURLTitle', def); - } - - getShopURL(def) { - return this.getProperty('shopURL', def); - } - - /** - * @deprecated - * @alias setApiKeyRole - * @param role - * @returns {*} - */ - setRole(role) { - return this.setApiKeyRole(role); - } - - /** - * @deprecated - * @alias getApiKeyRole - * @param def - * @returns {*} - */ - getRole(def) { - return this.getApiKeyRole(def); - } - - setApiKeyRole(apiKeyRole) { - return this.setProperty('apiKeyRole', apiKeyRole); - } - - getApiKeyRole(def) { - return this.getProperty('apiKeyRole', def); - } -} diff --git a/src/entities/Token.ts b/src/entities/Token.ts new file mode 100644 index 0000000..8737a29 --- /dev/null +++ b/src/entities/Token.ts @@ -0,0 +1,160 @@ +/** + * Token + * + * @see https://netlicensing.io/wiki/token-services#create-token + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + * + */ +// entity factory +import defineEntity from '@/entities/defineEntity'; + +// types +import { ApiKeyRole } from '@/types/constants/ApiKeyRole'; +import { TokenType } from '@/types/constants/TokenType'; +import { TokenProps, Token as IToken, TokenMethods } from '@/types/entities/Token'; + +// utils +import { set, get } from '@/utils/helpers'; +import serialize from '@/utils/serialize'; + +const Token = function (properties: TokenProps = {} as TokenProps): IToken { + const props: TokenProps = { ...properties }; + + const methods: TokenMethods = { + setActive(active: boolean): void { + set(props, 'active', active); + }, + + getActive(def?: D): boolean | D { + return get(props, 'active', def) as boolean | D; + }, + + setNumber(number: string): void { + set(props, 'number', number); + }, + + getNumber(def?: D): string | D { + return get(props, 'number', def) as string | D; + }, + + setExpirationTime(expirationTime: Date): void { + set(props, 'expirationTime', expirationTime); + }, + + getExpirationTime(def?: D): Date | D { + return get(props, 'expirationTime', def) as Date | D; + }, + + setTokenType(tokenType: TokenType): void { + set(props, 'tokenType', tokenType); + }, + + getTokenType(def?: D): TokenType | D { + return get(props, 'tokenType', def) as TokenType | D; + }, + + setLicenseeNumber(licenseeNumber: string): void { + set(props, 'licenseeNumber', licenseeNumber); + }, + + getLicenseeNumber(def?: D): string | D { + return get(props, 'licenseeNumber', def) as string | D; + }, + + setAction(action: string): void { + set(props, 'action', action); + }, + + getAction(def?: D): string | D { + return get(props, 'action', def) as string | D; + }, + + setApiKeyRole(apiKeyRole: ApiKeyRole): void { + set(props, 'apiKeyRole', apiKeyRole); + }, + + getApiKeyRole(def?: D): ApiKeyRole | D { + return get(props, 'apiKeyRole', def) as ApiKeyRole | D; + }, + + setBundleNumber(bundleNumber: string): void { + set(props, 'bundleNumber', bundleNumber); + }, + + getBundleNumber(def?: D): string | D { + return get(props, 'bundleNumber', def) as string | D; + }, + + setBundlePrice(bundlePrice: number): void { + set(props, 'bundlePrice', bundlePrice); + }, + + getBundlePrice: function (def?: D): number | D { + return get(props, 'bundlePrice', def) as number | D; + }, + + setProductNumber(productNumber: string): void { + set(props, 'productNumber', productNumber); + }, + + getProductNumber(def?: D): string | D { + return get(props, 'productNumber', def) as string | D; + }, + + setPredefinedShoppingItem(predefinedShoppingItem: string): void { + set(props, 'predefinedShoppingItem', predefinedShoppingItem); + }, + + getPredefinedShoppingItem(def?: D): string | D { + return get(props, 'predefinedShoppingItem', def) as string | D; + }, + + setSuccessURL(successURL: string): void { + set(props, 'successURL', successURL); + }, + + getSuccessURL(def?: D): string | D { + return get(props, 'successURL', def) as string | D; + }, + + setSuccessURLTitle(successURLTitle: string): void { + set(props, 'successURLTitle', successURLTitle); + }, + + getSuccessURLTitle(def?: D): string | D { + return get(props, 'successURLTitle', def) as string | D; + }, + + setCancelURL(cancelURL: string): void { + set(props, 'cancelURL', cancelURL); + }, + + getCancelURL(def?: D): string | D { + return get(props, 'cancelURL', def) as string | D; + }, + + setCancelURLTitle(cancelURLTitle: string): void { + set(props, 'cancelURLTitle', cancelURLTitle); + }, + + getCancelURLTitle(def?: D): string | D { + return get(props, 'cancelURLTitle', def) as string | D; + }, + + getShopURL(def?: D): string | D { + return get(props, 'shopURL', def) as string | D; + }, + + serialize(): Record { + return serialize(props, { ignore: ['shopURL'] }); + }, + }; + + return defineEntity(props as TokenProps, methods, Token); +}; + +export default Token; diff --git a/src/entities/Transaction.js b/src/entities/Transaction.js deleted file mode 100644 index c3564d5..0000000 --- a/src/entities/Transaction.js +++ /dev/null @@ -1,179 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import BaseEntity from './BaseEntity'; -import LicenseTransactionJoin from './LicenseTransactionJoin'; -import License from './License'; - -/** - * Transaction entity used internally by NetLicensing. - * - * Properties visible via NetLicensing API: - * - * Unique number (across all products of a vendor) that identifies the transaction. This number is - * always generated by NetLicensing. - * @property string number - * - * always true for transactions - * @property boolean active - * - * Status of transaction. "CANCELLED", "CLOSED", "PENDING". - * @property string status - * - * "SHOP". AUTO transaction for internal use only. - * @property string source - * - * grand total for SHOP transaction (see source). - * @property float grandTotal - * - * discount for SHOP transaction (see source). - * @property float discount - * - * specifies currency for money fields (grandTotal and discount). Check data types to discover which - * @property string currency - * - * Date created. Optional. - * @property string dateCreated - * - * Date closed. Optional. - * @property string dateClosed - * - * @constructor - */ -export default class Transaction extends BaseEntity { - constructor(properties) { - super({ - properties, - // The attributes that should be cast to native types. - casts: { - number: 'string', - name: 'string', - status: 'string', - source: 'string', - grandTotal: 'float', - discount: 'float', - currency: 'string', - dateCreated: 'date', - dateClosed: 'date', - active: 'boolean', - paymentMethod: 'string', - }, - }); - } - - setNumber(number) { - return this.setProperty('number', number); - } - - getNumber(def) { - return this.getProperty('number', def); - } - - setName(name) { - return this.setProperty('name', name); - } - - getName(def) { - return this.getProperty('name', def); - } - - setStatus(status) { - return this.setProperty('status', status); - } - - getStatus(def) { - return this.getProperty('status', def); - } - - setSource(source) { - return this.setProperty('source', source); - } - - getSource(def) { - return this.getProperty('source', def); - } - - setGrandTotal(grandTotal) { - return this.setProperty('grandTotal', grandTotal); - } - - getGrandTotal(def) { - return this.getProperty('grandTotal', def); - } - - setDiscount(discount) { - return this.setProperty('discount', discount); - } - - getDiscount(def) { - return this.getProperty('discount', def); - } - - setCurrency(currency) { - return this.setProperty('currency', currency); - } - - getCurrency(def) { - return this.getProperty('currency', def); - } - - setDateCreated(dateCreated) { - return this.setProperty('dateCreated', dateCreated); - } - - getDateCreated(def) { - return this.getProperty('dateCreated', def); - } - - setDateClosed(dateClosed) { - return this.setProperty('dateClosed', dateClosed); - } - - getDateClosed(def) { - return this.getProperty('dateClosed', def); - } - - setPaymentMethod(paymentMethod) { - return this.setProperty('paymentMethod', paymentMethod); - } - - getPaymentMethod(def) { - return this.getProperty('paymentMethod', def); - } - - setActive() { - return this.setProperty('active', true); - } - - getLicenseTransactionJoins(def) { - return this.getProperty('licenseTransactionJoins', def); - } - - setLicenseTransactionJoins(licenseTransactionJoins) { - return this.setProperty('licenseTransactionJoins', licenseTransactionJoins); - } - - setListLicenseTransactionJoin(properties) { - if (!properties) return; - - const licenseTransactionJoins = this.getProperty('licenseTransactionJoins', []); - const licenseTransactionJoin = new LicenseTransactionJoin(); - - properties.forEach((property) => { - if (property.name === 'licenseNumber') { - licenseTransactionJoin.setLicense(new License({ number: property.value })); - } - - if (property.name === 'transactionNumber') { - licenseTransactionJoin.setTransaction(new Transaction({ number: property.value })); - } - }); - - licenseTransactionJoins.push(licenseTransactionJoin); - this.setProperty('licenseTransactionJoins', licenseTransactionJoins); - } -} diff --git a/src/entities/Transaction.ts b/src/entities/Transaction.ts new file mode 100644 index 0000000..b3e0b88 --- /dev/null +++ b/src/entities/Transaction.ts @@ -0,0 +1,154 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// entity factory +import defineEntity from '@/entities/defineEntity'; + +// types +import { PaymentMethodEnum } from '@/types/constants/PaymentMethodEnum'; +import { TransactionSource } from '@/types/constants/TransactionSource'; +import { TransactionStatus } from '@/types/constants/TransactionStatus'; +import { LicenseTransactionJoin } from '@/types/entities/LicenseTransactionJoin'; +import { TransactionMethods, TransactionProps, Transaction as ITransaction } from '@/types/entities/Transaction'; + +// utils +import { set, get } from '@/utils/helpers'; +import serialize from '@/utils/serialize'; + +/** + * Transaction entity used internally by NetLicensing. + * + * Properties visible via NetLicensing API: + * + * Unique number (across all products of a vendor) that identifies the transaction. This number is + * always generated by NetLicensing. + * @property string number + * + * always true for transactions + * @property boolean active + * + * Status of transaction. "CANCELLED", "CLOSED", "PENDING". + * @property string status + * + * "SHOP". AUTO transaction for internal use only. + * @property string source + * + * grand total for SHOP transaction (see source). + * @property number grandTotal + * + * discount for SHOP transaction (see source). + * @property number discount + * + * specifies currency for money fields (grandTotal and discount). Check data types to discover which + * @property string currency + * + * Date created. Optional. + * @property string dateCreated + * + * Date closed. Optional. + * @property string dateClosed + */ + +const Transaction = function ( + properties: TransactionProps = {} as TransactionProps, +): ITransaction { + const props: TransactionProps = { ...properties }; + + const methods: TransactionMethods = { + setActive(active: boolean) { + set(props, 'active', active); + }, + + getActive(def?: D): boolean | D { + return get(props, 'active', def) as boolean | D; + }, + + setNumber(number: string): void { + set(props, 'number', number); + }, + + getNumber(def?: D): string | D { + return get(props, 'number', def) as string | D; + }, + + setStatus(status: TransactionStatus): void { + set(props, 'status', status); + }, + + getStatus(def?: D): TransactionStatus | D { + return get(props, 'status', def) as TransactionStatus | D; + }, + + setSource(source: TransactionSource): void { + set(props, 'source', source); + }, + getSource(def?: D): TransactionSource | D { + return get(props, 'source', def) as TransactionSource | D; + }, + setGrandTotal(grandTotal: number): void { + set(props, 'grandTotal', grandTotal); + }, + getGrandTotal(def?: D): number | D { + return get(props, 'grandTotal', def) as number | D; + }, + + setDiscount(discount: number): void { + set(props, 'discount', discount); + }, + + getDiscount(def?: D): number | D { + return get(props, 'discount', def) as number | D; + }, + + setCurrency(currency: string): void { + set(props, 'currency', currency); + }, + + getCurrency(def?: D): string | D { + return get(props, 'currency', def) as string | D; + }, + + setDateCreated(dateCreated: Date): void { + set(props, 'dateCreated', dateCreated); + }, + + getDateCreated(def?: D): Date | D { + return get(props, 'dateCreated', def) as Date | D; + }, + + setDateClosed(dateCreated: Date): void { + set(props, 'dateClosed', dateCreated); + }, + + getDateClosed(def?: D): Date | D { + return get(props, 'dateClosed', def) as Date | D; + }, + + setPaymentMethod(paymentMethod: PaymentMethodEnum): void { + set(props, 'paymentMethod', paymentMethod); + }, + + getPaymentMethod(def?: D): PaymentMethodEnum | D { + return get(props, 'paymentMethod', def) as PaymentMethodEnum | D; + }, + + setLicenseTransactionJoins(joins: LicenseTransactionJoin[]): void { + set(props, 'licenseTransactionJoins', joins); + }, + + getLicenseTransactionJoins(def?: D): LicenseTransactionJoin[] | D { + return get(props, 'licenseTransactionJoins', def) as LicenseTransactionJoin[] | D; + }, + + serialize() { + return serialize(props, { ignore: ['licenseTransactionJoins', 'inUse'] }); + }, + }; + + return defineEntity(props as TransactionProps, methods, Transaction); +}; + +export default Transaction; diff --git a/src/entities/defineEntity.ts b/src/entities/defineEntity.ts new file mode 100644 index 0000000..5631073 --- /dev/null +++ b/src/entities/defineEntity.ts @@ -0,0 +1,111 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import type { + Entity, + EntityMethods, + Proto, + PropGetEventListener, + PropSetEventListener, +} from '@/types/entities/defineEntity'; + +// utils +import { set, has, get } from '@/utils/helpers'; +import serialize from '@/utils/serialize'; + +const defineEntity = function

( + props: T, + methods: M, + proto: P = {} as P, + options?: { set?: PropSetEventListener; get?: PropGetEventListener }, +) { + const listeners: { set: PropSetEventListener[]; get: PropGetEventListener[] } = { + set: [], + get: [], + }; + + if (options?.get) { + listeners.get.push(options.get); + } + + if (options?.set) { + listeners.set.push(options.set); + } + + const base: EntityMethods = { + set(key, value): void { + set(props, key, value); + }, + + get(key, def) { + return get(props, key, def); + }, + + has(key) { + return has(props, key); + }, + + // Aliases + setProperty(key, value) { + this.set(key, value); + }, + + addProperty(key, value) { + this.set(key, value); + }, + + getProperty(key, def) { + return this.get(key, def); + }, + + hasProperty(key) { + return this.has(key); + }, + + setProperties(properties) { + Object.entries(properties).forEach(([k, v]) => { + this.set(k as keyof T, v as T[keyof T]); + }); + }, + + serialize() { + return serialize(props); + }, + }; + + return new Proxy(props, { + get(obj: T, prop: string | symbol, receiver) { + if (Object.hasOwn(methods, prop)) { + return methods[prop as keyof typeof methods]; + } + + if (Object.hasOwn(base, prop)) { + return base[prop as keyof typeof base]; + } + + listeners.get.forEach((l) => { + l(obj, prop, receiver); + }); + + return Reflect.get(obj, prop, receiver); + }, + + set(obj, prop, value, receiver) { + listeners.set.forEach((l) => { + l(obj, prop, value, receiver); + }); + + return Reflect.set(obj, prop, value, receiver); + }, + + getPrototypeOf() { + return proto.prototype || null; + }, + }) as Entity; +}; + +export default defineEntity; diff --git a/src/errors/NlicError.js b/src/errors/NlicError.js deleted file mode 100644 index bc5562e..0000000 --- a/src/errors/NlicError.js +++ /dev/null @@ -1,32 +0,0 @@ -export default class NlicError extends Error { - constructor(...args) { - super(...args); - - this.config = {}; - this.response = {}; - this.request = {}; - this.code = ''; - - this.isNlicError = true; - this.isAxiosError = true; - } - - toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code, - }; - } -} diff --git a/src/errors/NlicError.ts b/src/errors/NlicError.ts new file mode 100644 index 0000000..4d2d0a0 --- /dev/null +++ b/src/errors/NlicError.ts @@ -0,0 +1,21 @@ +import { AxiosError, AxiosResponse, InternalAxiosRequestConfig } from 'axios'; + +export default class NlicError extends AxiosError { + isNlicError = true; + + constructor( + message?: string, + code?: string, + config?: InternalAxiosRequestConfig, + request?: unknown, + response?: AxiosResponse, + stack?: string, + ) { + super(message, code, config, request, response); + this.isNlicError = true; + + if (stack) { + this.stack = stack; + } + } +} diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 9b2f659..0000000 --- a/src/index.js +++ /dev/null @@ -1,127 +0,0 @@ -// Constants -import Constants from './Constants'; - -// VO -import Context from './vo/Context'; -import Page from './vo/Page'; -import ValidationParameters from './vo/ValidationParameters'; -import ValidationResults from './vo/ValidationResults'; - -// Services -import Service from './services/Service'; -import LicenseeService from './services/LicenseeService'; -import LicenseService from './services/LicenseService'; -import LicenseTemplateService from './services/LicenseTemplateService'; -import PaymentMethodService from './services/PaymentMethodService'; -import ProductModuleService from './services/ProductModuleService'; -import ProductService from './services/ProductService'; -import TokenService from './services/TokenService'; -import TransactionService from './services/TransactionService'; -import UtilityService from './services/UtilityService'; -import BundleService from './services/BundleService'; -import NotificationService from './services/NotificationService'; - -// Entities -import BaseEntity from './entities/BaseEntity'; -import Country from './entities/Country'; -import License from './entities/License'; -import Licensee from './entities/Licensee'; -import LicenseTemplate from './entities/LicenseTemplate'; -import PaymentMethod from './entities/PaymentMethod'; -import Product from './entities/Product'; -import ProductDiscount from './entities/ProductDiscount'; -import ProductModule from './entities/ProductModule'; -import Token from './entities/Token'; -import Transaction from './entities/Transaction'; -import LicenseTransactionJoin from './entities/LicenseTransactionJoin'; -import Bundle from './entities/Bundle'; -import Notification from './entities/Notification'; - -// Converters -import itemToCountry from './converters/itemToCountry'; -import itemToLicense from './converters/itemToLicense'; -import itemToLicensee from './converters/itemToLicensee'; -import itemToLicenseTemplate from './converters/itemToLicenseTemplate'; -import itemToObject from './converters/itemToObject'; -import itemToPaymentMethod from './converters/itemToPaymentMethod'; -import itemToProduct from './converters/itemToProduct'; -import itemToProductModule from './converters/itemToProductModule'; -import itemToToken from './converters/itemToToken'; -import itemToTransaction from './converters/itemToTransaction'; -import itemToBundle from './converters/itemToBundle'; - -// Utils -import CastsUtils from './util/CastsUtils'; -import CheckUtils from './util/CheckUtils'; -import FilterUtils from './util/FilterUtils'; - -// Errors -import NlicError from './errors/NlicError'; - -// Create the default instance to be exported -// eslint-disable-next-line import/prefer-default-export -export { - // Constants - Constants, - - // Expose VO - Context, - Page, - ValidationParameters, - ValidationResults, - - // Expose Services - Service, - LicenseeService, - LicenseService, - LicenseTemplateService, - PaymentMethodService, - ProductModuleService, - ProductService, - TokenService, - TransactionService, - UtilityService, - BundleService, - NotificationService, - - // Expose Entities - BaseEntity, - Country, - License, - Licensee, - LicenseTemplate, - PaymentMethod, - Product, - ProductDiscount, - ProductModule, - Token, - Transaction, - LicenseTransactionJoin, - Bundle, - Notification, - - // Expose Converters - itemToCountry, - itemToLicense, - itemToLicensee, - itemToLicenseTemplate, - itemToObject, - itemToPaymentMethod, - itemToProduct, - itemToProductModule, - itemToToken, - itemToTransaction, - itemToBundle, - - // Expose Utils - CastsUtils, - CheckUtils, - FilterUtils, - - // Errors - NlicError, -}; - -// module.exports = NetLicensing; - -// Allow use of default import syntax in TypeScript diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..09f2b21 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,151 @@ +// constants +import Constants from '@/constants'; +import ApiKeyRole from '@/constants/ApiKeyRole'; +import LicenseeSecretMode from '@/constants/LicenseeSecretMode'; +import LicenseType from '@/constants/LicenseType'; +import LicensingModel from '@/constants/LicensingModel'; +import NotificationEvent from '@/constants/NotificationEvent'; +import NotificationProtocol from '@/constants/NotificationProtocol'; +import PaymentMethodEnum from '@/constants/PaymentMethodEnum'; +import SecurityMode from '@/constants/SecurityMode'; +import TimeVolumePeriod from '@/constants/TimeVolumePeriod'; +import TokenType from '@/constants/TokenType'; +import TransactionSource from '@/constants/TransactionSource'; +import TransactionStatus from '@/constants/TransactionStatus'; + +// converters +import itemToBundle from '@/converters/itemToBundle'; +import itemToCountry from '@/converters/itemToCountry'; +import itemToLicense from '@/converters/itemToLicense'; +import itemToLicensee from '@/converters/itemToLicensee'; +import itemToLicenseTemplate from '@/converters/itemToLicenseTemplate'; +import itemToNotification from '@/converters/itemToNotification'; +import itemToObject from '@/converters/itemToObject'; +import itemToPaymentMethod from '@/converters/itemToPaymentMethod'; +import itemToProduct from '@/converters/itemToProduct'; +import itemToProductModule from '@/converters/itemToProductModule'; +import itemToToken from '@/converters/itemToToken'; +import itemToTransaction from '@/converters/itemToTransaction'; + +// entities +import Bundle from '@/entities/Bundle'; +import Country from '@/entities/Country'; +import defineEntity from '@/entities/defineEntity'; +import License from '@/entities/License'; +import Licensee from '@/entities/Licensee'; +import LicenseTemplate from '@/entities/LicenseTemplate'; +import LicenseTransactionJoin from '@/entities/LicenseTransactionJoin'; +import Notification from '@/entities/Notification'; +import PaymentMethod from '@/entities/PaymentMethod'; +import Product from '@/entities/Product'; +import ProductDiscount from '@/entities/ProductDiscount'; +import ProductModule from '@/entities/ProductModule'; +import Token from '@/entities/Token'; +import Transaction from '@/entities/Transaction'; + +// errors +import NlicError from '@/errors/NlicError'; + +// services +import BundleService from '@/services/BundleService'; +import LicenseeService from '@/services/LicenseeService'; +import LicenseService from '@/services/LicenseService'; +import LicenseTemplateService from '@/services/LicenseTemplateService'; +import NotificationService from '@/services/NotificationService'; +import PaymentMethodService from '@/services/PaymentMethodService'; +import ProductModuleService from '@/services/ProductModuleService'; +import ProductService from '@/services/ProductService'; +import Service from '@/services/Service'; +import TokenService from '@/services/TokenService'; +import TransactionService from '@/services/TransactionService'; +import UtilityService from '@/services/UtilityService'; + +// utils +import { encode as filterEncode, decode as filterDecode } from '@/utils/filter'; +import serialize from '@/utils/serialize'; +import { isValid, isDefined, ensureNotNull, ensureNotEmpty } from '@/utils/validation'; + +// value object +import Context from '@/vo/Context'; +import Page from '@/vo/Page'; +import ValidationParameters from '@/vo/ValidationParameters'; +import ValidationResults from '@/vo/ValidationResults'; + +export { + // constants + Constants, + ApiKeyRole, + LicenseeSecretMode, + LicenseType, + LicensingModel, + NotificationEvent, + NotificationProtocol, + PaymentMethodEnum, + SecurityMode, + TimeVolumePeriod, + TokenType, + TransactionSource, + TransactionStatus, + + // converters + itemToBundle, + itemToCountry, + itemToLicense, + itemToLicensee, + itemToLicenseTemplate, + itemToNotification, + itemToObject, + itemToPaymentMethod, + itemToProduct, + itemToProductModule, + itemToToken, + itemToTransaction, + + // entities + Bundle, + Country, + defineEntity, + License, + Licensee, + LicenseTemplate, + LicenseTransactionJoin, + Notification, + PaymentMethod, + Product, + ProductDiscount, + ProductModule, + Token, + Transaction, + + // errors + NlicError, + + // services + BundleService, + LicenseeService, + LicenseService, + LicenseTemplateService, + NotificationService, + PaymentMethodService, + ProductModuleService, + ProductService, + Service, + TokenService, + TransactionService, + UtilityService, + + // utils + filterEncode, + filterDecode, + serialize, + isValid, + isDefined, + ensureNotNull, + ensureNotEmpty, + + // vo + Context, + Page, + ValidationParameters, + ValidationResults, +}; diff --git a/src/services/BundleService.js b/src/services/BundleService.js deleted file mode 100644 index f56384c..0000000 --- a/src/services/BundleService.js +++ /dev/null @@ -1,184 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import Service from './Service'; -import Constants from '../Constants'; -import CheckUtils from '../util/CheckUtils'; -import FilterUtils from '../util/FilterUtils'; -import itemToBundle from '../converters/itemToBundle'; -import itemToLicense from '../converters/itemToLicense'; -import Page from '../vo/Page'; - -/** - * JS representation of the Bundle Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/bundle-services - * - * @constructor - */ - -export default { - /** - * Creates new bundle with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#create-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param bundle NetLicensing.Bundle - * - * return the newly created bundle object in promise - * @returns {Promise} - */ - - async create(context, bundle) { - const { data: { items: { item: items } } } = await Service - .post(context, Constants.Bundle.ENDPOINT_PATH, bundle.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'Bundle'); - - return itemToBundle(item); - }, - - /** - * Gets bundle by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#get-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the bundle number - * @param number string - * - * return the bundle object in promise - * @returns {Promise} - */ - async get(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .get(context, `${Constants.Bundle.ENDPOINT_PATH}/${number}`); - - const [item] = items.filter(({ type }) => type === 'Bundle'); - - return itemToBundle(item); - }, - - /** - * Returns bundle of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#bundles-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of bundle entities or empty array if nothing found in promise. - * @returns {Promise} - */ - async list(context, filter) { - const queryParams = {}; - - if (filter) { - if (!CheckUtils.isValid(filter)) throw new TypeError(`filter has bad value ${filter}`); - queryParams[Constants.FILTER] = typeof filter === 'string' ? filter : FilterUtils.encode(filter); - } - - const { data } = await Service.get(context, Constants.Bundle.ENDPOINT_PATH, queryParams); - - return Page( - data.items.item.filter(({ type }) => type === 'Bundle').map((v) => itemToBundle(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Updates bundle properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#update-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * bundle number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param bundle NetLicensing.Bundle - * - * updated bundle in promise. - * @returns {Promise} - */ - async update(context, number, bundle) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .post(context, `${Constants.Bundle.ENDPOINT_PATH}/${number}`, bundle.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'Bundle'); - - return itemToBundle(item); - }, - - /** - * Deletes bundle.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#delete-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * bundle number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete(context, number, forceCascade) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const queryParams = { forceCascade: Boolean(forceCascade) }; - - return Service.delete(context, `${Constants.Bundle.ENDPOINT_PATH}/${number}`, queryParams); - }, - - /** - * Obtain bundle.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/bundle-services#obtain-bundle - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * bundle number - * @param number string - * - * licensee number - * @param licenseeNumber String - * - * return array of licenses - * @returns {Promise} - */ - async obtain(context, number, licenseeNumber) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - CheckUtils.paramNotEmpty(licenseeNumber, Constants.Licensee.LICENSEE_NUMBER); - - const { ENDPOINT_PATH, ENDPOINT_OBTAIN_PATH } = Constants.Bundle; - - const queryParams = { [Constants.Licensee.LICENSEE_NUMBER]: licenseeNumber }; - - const { data: { items: { item: items } } } = await Service - .post(context, `${ENDPOINT_PATH}/${number}/${ENDPOINT_OBTAIN_PATH}`, queryParams); - - return items.filter(({ type }) => type === 'License').map((i) => itemToLicense(i)); - }, -}; diff --git a/src/services/BundleService.ts b/src/services/BundleService.ts new file mode 100644 index 0000000..67c20e4 --- /dev/null +++ b/src/services/BundleService.ts @@ -0,0 +1,233 @@ +/** + * JS representation of the Bundle Service. See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/bundle-services + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// constants +import Constants from '@/constants'; + +// converters +import itemToBundle from '@/converters/itemToBundle'; + +// services +import itemToLicense from '@/converters/itemToLicense'; +import Service from '@/services/Service'; + +// types +import { ItemPagination } from '@/types/api/response'; +import { Bundle, BundleProps } from '@/types/entities/Bundle'; +import { License, LicenseProps } from '@/types/entities/License'; +import { BundleService } from '@/types/services/BundleService'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page as IPage } from '@/types/vo/Page'; + +// utils +import { encode } from '@/utils/filter'; +import { ensureNotEmpty, ensureNotNull } from '@/utils/validation'; + +// vo +import Page from '@/vo/Page'; + +const endpoint = Constants.Bundle.ENDPOINT_PATH; +const endpointObtain = Constants.Bundle.ENDPOINT_OBTAIN_PATH; +const type = Constants.Bundle.TYPE; + +const bundleService: BundleService = { + /** + * Gets bundle by its number.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/bundle-services#get-bundle + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the bundle number + * @param number string + * + * (optional) service request config + * @param config + * + * return the bundle object in promise + * @returns {Promise} + */ + async get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + const response = await Service.get(context, `${endpoint}/${number}`, {}, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToBundle(item); + }, + + /** + * Returns bundle of a vendor.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/bundle-services#bundles-list + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|null + * + * (optional) service request config + * @param config + * + * array of bundle entities or empty array if nothing found in promise. + * @returns {Promise} + */ + async list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>> { + const data: { [Constants.FILTER]: string } = {}; + + if (filter) { + data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter); + } + + const response = await Service.get(context, endpoint, data, config); + const items = response.data.items; + + const bundles: Bundle[] | undefined = items?.item.filter((v) => v.type === type).map((v) => itemToBundle(v)); + + return Page(bundles || [], items as ItemPagination); + }, + + /** + * Creates new bundle with given properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/bundle-services#create-bundle + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param bundle NetLicensing.Bundle + * + * (optional) service request config + * @param config + * + * return the newly created bundle object in promise + * @returns {Promise} + */ + async create( + context: Context, + bundle: Bundle, + config?: RequestConfig, + ): Promise> { + ensureNotNull(bundle, 'bundle'); + + const response = await Service.post(context, endpoint, bundle.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToBundle(item); + }, + + /** + * Updates bundle properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/bundle-services#update-bundle + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * bundle number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param bundle NetLicensing.Bundle + * + * (optional) service request config + * @param config + * + * updated bundle in promise. + * @returns {Promise} + */ + async update( + context: Context, + number: string, + bundle: Bundle, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + ensureNotNull(bundle, 'bundle'); + + const response = await Service.post(context, `${endpoint}/${number}`, bundle.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToBundle(item); + }, + + /** + * Deletes bundle.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/bundle-services#delete-bundle + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * bundle number + * @param number string + * + * if true, any entities that depend on the one being deleted will be deleted too + * @param forceCascade boolean + * + * (optional) service request config + * @param config + * + * return boolean state of delete in promise + * @returns {Promise} + */ + delete(context: Context, number: string, forceCascade?: boolean, config?: RequestConfig): Promise { + ensureNotEmpty(number, 'number'); + + return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config); + }, + + /** + * Obtain bundle.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/bundle-services#obtain-bundle + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * bundle number + * @param number string + * + * licensee number + * @param licenseeNumber String + * + * (optional) service request config + * @param config + * + * return array of licenses + * @returns {Promise} + */ + async obtain( + context: Context, + number: string, + licenseeNumber: string, + config?: RequestConfig, + ): Promise[]> { + ensureNotEmpty(number, 'number'); + ensureNotEmpty(licenseeNumber, 'licenseeNumber'); + + const data = { [Constants.Licensee.LICENSEE_NUMBER]: licenseeNumber }; + + const response = await Service.post(context, `${endpoint}/${number}/${endpointObtain}`, data, config); + const items = response.data.items; + + return items?.item.filter((v) => v.type === Constants.License.TYPE).map((v) => itemToLicense(v)) || []; + }, +}; + +export default bundleService; diff --git a/src/services/LicenseService.js b/src/services/LicenseService.js deleted file mode 100644 index d3abfe4..0000000 --- a/src/services/LicenseService.js +++ /dev/null @@ -1,184 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import CheckUtils from '../util/CheckUtils'; -import Constants from '../Constants'; -import Service from './Service'; -import FilterUtils from '../util/FilterUtils'; -import itemToLicense from '../converters/itemToLicense'; -import Page from '../vo/Page'; - -/** - * JS representation of the License Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/license-services - * - * @constructor - */ - -export default { - /** - * Creates new license object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#create-license - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent licensee to which the new license is to be added - * @param licenseeNumber string - * - * license template that the license is created from - * @param licenseTemplateNumber string - * - * For privileged logins specifies transaction for the license creation. For regular logins new - * transaction always created implicitly, and the operation will be in a separate transaction. - * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with - * auto-generated number. - * @param transactionNumber null|string - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param license NetLicensing.License - * - * return the newly created license object in promise - * @returns {Promise} - */ - async create(context, licenseeNumber, licenseTemplateNumber, transactionNumber, license) { - CheckUtils.paramNotEmpty(licenseeNumber, Constants.Licensee.LICENSEE_NUMBER); - CheckUtils.paramNotEmpty(licenseTemplateNumber, Constants.LicenseTemplate.LICENSE_TEMPLATE_NUMBER); - - license.setProperty(Constants.Licensee.LICENSEE_NUMBER, licenseeNumber); - license.setProperty(Constants.LicenseTemplate.LICENSE_TEMPLATE_NUMBER, licenseTemplateNumber); - - if (transactionNumber) license.setProperty(Constants.Transaction.TRANSACTION_NUMBER, transactionNumber); - - const { data: { items: { item: items } } } = await Service - .post(context, Constants.License.ENDPOINT_PATH, license.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'License'); - - return itemToLicense(item); - }, - - /** - * Gets license by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#get-license - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the license number - * @param number string - * - * return the license in promise - * @returns {Promise} - */ - async get(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .get(context, `${Constants.License.ENDPOINT_PATH}/${number}`); - - const [item] = items.filter(({ type }) => type === 'License'); - - return itemToLicense(item); - }, - - /** - * Returns licenses of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#licenses-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * return array of licenses (of all products) or empty array if nothing found in promise. - * @returns {Promise} - */ - async list(context, filter) { - const queryParams = {}; - - if (filter) { - if (!CheckUtils.isValid(filter)) { - throw new TypeError(`filter has bad value ${filter}`); - } - queryParams[Constants.FILTER] = typeof filter === 'string' ? filter : FilterUtils.encode(filter); - } - - const { data } = await Service - .get(context, Constants.License.ENDPOINT_PATH, queryParams); - - return Page( - data.items.item.filter(({ type }) => type === 'License').map((v) => itemToLicense(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Updates license properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#update-license - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license number - * @param number string - * - * transaction for the license update. Created implicitly if transactionNumber is null. In this case the - * operation will be in a separate transaction. - * @param transactionNumber string|null - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param license NetLicensing.License - * - * return updated license in promise. - * @returns {Promise} - */ - async update(context, number, transactionNumber, license) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - if (transactionNumber) license.setProperty(Constants.Transaction.TRANSACTION_NUMBER, transactionNumber); - - const { data: { items: { item: items } } } = await Service - .post(context, `${Constants.License.ENDPOINT_PATH}/${number}`, license.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'License'); - - return itemToLicense(item); - }, - - /** - * Deletes license.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-services#delete-license - * - * When any license is deleted, corresponding transaction is created automatically. - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete(context, number, forceCascade) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const queryParams = { forceCascade: Boolean(forceCascade) }; - - return Service - .delete(context, `${Constants.License.ENDPOINT_PATH}/${number}`, queryParams); - }, -}; diff --git a/src/services/LicenseService.ts b/src/services/LicenseService.ts new file mode 100644 index 0000000..4c171e7 --- /dev/null +++ b/src/services/LicenseService.ts @@ -0,0 +1,241 @@ +/** + * JS representation of the License Service. See NetLicensingAPI for details: + * https://netlicensing.io/wiki/license-services + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// constants +import Constants from '@/constants'; + +// converters +import itemToLicense from '@/converters/itemToLicense'; + +// services +import Service from '@/services/Service'; + +// types +import { ItemPagination, NlicResponse } from '@/types/api/response'; +import { LicenseProps, License } from '@/types/entities/License'; +import { LicenseService } from '@/types/services/LicenseService'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page as IPage } from '@/types/vo/Page'; + +// utils +import { encode } from '@/utils/filter'; +import { ensureNotEmpty, ensureNotNull } from '@/utils/validation'; + +// vo +import Page from '@/vo/Page'; + +const endpoint = Constants.License.ENDPOINT_PATH; +const type = Constants.License.TYPE; + +const licenseService: LicenseService = { + /** + * Gets license by its number.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/license-services#get-license + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the license number + * @param number string + * + * (optional) service request config + * @param config + * + * return the license in promise + * @returns {Promise} + */ + async get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + const response = await Service.get(context, `${endpoint}/${number}`, {}, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToLicense(item); + }, + + /** + * Returns licenses of a vendor.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/license-services#licenses-list + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|undefined + * + * (optional) service request config + * @param config + * + * return array of licenses (of all products) or empty array if nothing found in promise. + * @returns {Promise} + */ + async list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>> { + const data: { [Constants.FILTER]: string } = {}; + + if (filter) { + data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter); + } + + const response = await Service.get(context, endpoint, data, config); + const items = response.data.items; + + const list: License[] | undefined = items?.item.filter((v) => v.type === type).map((v) => itemToLicense(v)); + + return Page(list || [], items as ItemPagination); + }, + + /** + * Creates new license object with given properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/license-services#create-license + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * parent licensee to which the new license is to be added + * @param licenseeNumber string + * + * license template that the license is created from + * @param licenseTemplateNumber string + * + * For privileged logins specifies transaction for the license creation. For regular logins new + * transaction always created implicitly, and the operation will be in a separate transaction. + * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with + * auto-generated number. + * @param transactionNumber null|string + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param license NetLicensing.License + * + * (optional) service request config + * @param config + * + * return the newly created license object in promise + * @returns {Promise} + */ + async create( + context: Context, + licenseeNumber: string | null, + licenseTemplateNumber: string | null, + transactionNumber: string | null, + license: License, + config?: RequestConfig, + ): Promise> { + ensureNotNull(license, 'license'); + + const data = license.serialize(); + + if (licenseeNumber) { + data.licenseeNumber = licenseeNumber; + } + + if (licenseTemplateNumber) { + data.licenseTemplateNumber = licenseTemplateNumber; + } + + if (transactionNumber) { + data.transactionNumber = transactionNumber; + } + + const response = await Service.post(context, endpoint, data, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToLicense(item); + }, + + /** + * Updates license properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/license-services#update-license + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * license number + * @param number string + * + * transaction for the license update. Created implicitly if transactionNumber is null. In this case the + * operation will be in a separate transaction. + * @param transactionNumber string|null + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param license NetLicensing.License + * + * (optional) service request config + * @param config + * + * return updated license in promise. + * @returns {Promise} + */ + async update( + context: Context, + number: string, + transactionNumber: string | null, + license: License, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + ensureNotNull(license, 'license'); + + const data = license.serialize(); + + if (transactionNumber) { + data.transactionNumber = transactionNumber; + } + + const response = await Service.post(context, `${endpoint}/${number}`, data, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToLicense(item); + }, + + /** + * Deletes license.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/license-services#delete-license + * + * When any license is deleted, corresponding transaction is created automatically. + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * license number + * @param number string + * + * if true, any entities that depend on the one being deleted will be deleted too + * @param forceCascade boolean + * + * (optional) service request config + * @param config + * + * return boolean state of delete in promise + * @returns {Promise} + */ + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config); + }, +}; + +export default licenseService; diff --git a/src/services/LicenseTemplateService.js b/src/services/LicenseTemplateService.js deleted file mode 100644 index 96ddfa1..0000000 --- a/src/services/LicenseTemplateService.js +++ /dev/null @@ -1,165 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import CheckUtils from '../util/CheckUtils'; -import Constants from '../Constants'; -import Service from './Service'; -import FilterUtils from '../util/FilterUtils'; -import itemToLicenseTemplate from '../converters/itemToLicenseTemplate'; -import Page from '../vo/Page'; - -/** - * JS representation of the ProductModule Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/license-template-services - * - * @constructor - */ - -export default { - /** - * Creates new license template object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#create-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent product module to which the new license template is to be added - * @param productModuleNumber - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param licenseTemplate NetLicensing.LicenseTemplate - * - * the newly created license template object in promise - * @returns {Promise} - */ - async create(context, productModuleNumber, licenseTemplate) { - CheckUtils.paramNotEmpty(productModuleNumber, Constants.ProductModule.PRODUCT_MODULE_NUMBER); - - licenseTemplate.setProperty(Constants.ProductModule.PRODUCT_MODULE_NUMBER, productModuleNumber); - - const { data: { items: { item: items } } } = await Service - .post(context, Constants.LicenseTemplate.ENDPOINT_PATH, licenseTemplate.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'LicenseTemplate'); - - return itemToLicenseTemplate(item); - }, - - /** - * Gets license template by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#get-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the license template number - * @param number string - * - * return the license template object in promise - * @returns {Promise} - */ - async get(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .get(context, `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`); - - const [item] = items.filter(({ type }) => type === 'LicenseTemplate'); - - return itemToLicenseTemplate(item); - }, - - /** - * Returns all license templates of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#license-templates-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of license templates (of all products/modules) or null/empty list if nothing found in promise. - * @returns {Promise} - */ - async list(context, filter) { - const queryParams = {}; - - if (filter) { - if (!CheckUtils.isValid(filter)) { - throw new TypeError(`filter has bad value ${filter}`); - } - queryParams[Constants.FILTER] = typeof filter === 'string' ? filter : FilterUtils.encode(filter); - } - - const { data } = await Service - .get(context, Constants.LicenseTemplate.ENDPOINT_PATH, queryParams); - - return Page( - data.items.item.filter(({ type }) => type === 'LicenseTemplate').map((v) => itemToLicenseTemplate(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Updates license template properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/license-template-services#update-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license template number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param licenseTemplate NetLicensing.LicenseTemplate - * - * updated license template in promise. - * @returns {Promise} - */ - async update(context, number, licenseTemplate) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const path = `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`; - - const { data: { items: { item: items } } } = await Service - .post(context, path, licenseTemplate.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'LicenseTemplate'); - - return itemToLicenseTemplate(item); - }, - - /** - * Deletes license template.See NetLicensingAPI JavaDoc for details: - * @see https://netlicensing.io/wiki/license-template-services#delete-license-template - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license template number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete(context, number, forceCascade) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const queryParams = { forceCascade: Boolean(forceCascade) }; - - return Service - .delete(context, `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`, queryParams); - }, -}; diff --git a/src/services/LicenseTemplateService.ts b/src/services/LicenseTemplateService.ts new file mode 100644 index 0000000..8365edd --- /dev/null +++ b/src/services/LicenseTemplateService.ts @@ -0,0 +1,211 @@ +/** + * JS representation of the ProductModule Service. See NetLicensingAPI for details: + * https://netlicensing.io/wiki/license-template-services + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// constants +import Constants from '@/constants'; + +// converters +import itemToLicenseTemplate from '@/converters/itemToLicenseTemplate'; + +// services +import Service from '@/services/Service'; + +// types +import { ItemPagination, NlicResponse } from '@/types/api/response'; +import { LicenseTemplateProps, LicenseTemplate } from '@/types/entities/LicenseTemplate'; +import { LicenseTemplateService } from '@/types/services/LicenseTemplateService'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page as IPage } from '@/types/vo/Page'; + +// utils +import { encode } from '@/utils/filter'; +import { ensureNotEmpty, ensureNotNull } from '@/utils/validation'; + +// vo +import Page from '@/vo/Page'; + +const endpoint = Constants.LicenseTemplate.ENDPOINT_PATH; +const type = Constants.LicenseTemplate.TYPE; + +const licenseTemplateService: LicenseTemplateService = { + /** + * Gets license template by its number.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/license-template-services#get-license-template + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the license template number + * @param number string + * + * (optional) service request config + * @param config + * + * return the license template object in promise + * @returns {Promise} + */ + async get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + const response = await Service.get(context, `${endpoint}/${number}`, {}, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToLicenseTemplate(item); + }, + + /** + * Returns all license templates of a vendor.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/license-template-services#license-templates-list + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|null + * + * (optional) service request config + * @param config + * + * array of license templates (of all products/modules) or null/empty list if nothing found in promise. + * @returns {Promise} + */ + async list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>> { + const data: { [Constants.FILTER]: string } = {}; + + if (filter) { + data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter); + } + + const response = await Service.get(context, endpoint, data, config); + const items = response.data.items; + + const list: LicenseTemplate[] | undefined = items?.item + .filter((v) => v.type === type) + .map((v) => itemToLicenseTemplate(v)); + + return Page(list || [], items as ItemPagination); + }, + + /** + * Creates new license template object with given properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/license-template-services#create-license-template + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * parent product module to which the new license template is to be added + * @param productModuleNumber + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param licenseTemplate NetLicensing.LicenseTemplate + * + * (optional) service request config + * @param config + * + * the newly created license template object in promise + * @returns {Promise} + */ + async create( + context: Context, + productModuleNumber: string | null, + licenseTemplate: LicenseTemplate, + config?: RequestConfig, + ): Promise> { + ensureNotNull(licenseTemplate, 'licenseTemplate'); + + const data = licenseTemplate.serialize(); + + if (productModuleNumber) { + data.productModuleNumber = productModuleNumber; + } + + const response = await Service.post(context, endpoint, data, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToLicenseTemplate(item); + }, + + /** + * Updates license template properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/license-template-services#update-license-template + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * license template number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param licenseTemplate NetLicensing.LicenseTemplate + * + * (optional) service request config + * @param config + * + * updated license template in promise. + * @returns {Promise} + */ + async update( + context: Context, + number: string, + licenseTemplate: LicenseTemplate, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + ensureNotNull(licenseTemplate, 'licenseTemplate'); + + const response = await Service.post(context, `${endpoint}/${number}`, licenseTemplate.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToLicenseTemplate(item); + }, + + /** + * Deletes license template.See NetLicensingAPI JavaDoc for details: + * @see https://netlicensing.io/wiki/license-template-services#delete-license-template + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * license template number + * @param number string + * + * if true, any entities that depend on the one being deleted will be deleted too + * @param forceCascade boolean + * + * (optional) service request config + * @param config + * + * return boolean state of delete in promise + * @returns {Promise} + */ + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config); + }, +}; + +export default licenseTemplateService; diff --git a/src/services/LicenseeService.js b/src/services/LicenseeService.js deleted file mode 100644 index c8d5e4d..0000000 --- a/src/services/LicenseeService.js +++ /dev/null @@ -1,269 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import CheckUtils from '../util/CheckUtils'; -import FilterUtils from '../util/FilterUtils'; -import Constants from '../Constants'; -import Service from './Service'; -import ValidationResults from '../vo/ValidationResults'; -import itemToLicensee from '../converters/itemToLicensee'; -import Page from '../vo/Page'; -import itemToObject from '../converters/itemToObject'; - -/** - * JS representation of the Licensee Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/licensee-services - * - * @constructor - */ - -export default { - /** - * Creates new licensee object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#create-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent product to which the new licensee is to be added - * @param productNumber string - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param licensee NetLicensing.Licensee - * - * return the newly created licensee object in promise - * @returns {Promise} - */ - async create(context, productNumber, licensee) { - CheckUtils.paramNotEmpty(productNumber, Constants.Product.PRODUCT_NUMBER); - - licensee.setProperty(Constants.Product.PRODUCT_NUMBER, productNumber); - - const { data: { items: { item: items } } } = await Service - .post(context, Constants.Licensee.ENDPOINT_PATH, licensee.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'Licensee'); - - return itemToLicensee(item); - }, - - /** - * Gets licensee by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#get-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the licensee number - * @param number string - * - * return the licensee in promise - * @returns {Promise} - */ - async get(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .get(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`); - - const [item] = items.filter(({ type }) => type === 'Licensee'); - - return itemToLicensee(item); - }, - - /** - * Returns all licensees of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#licensees-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of licensees (of all products) or empty array if nothing found in promise. - * @returns {Promise} - */ - async list(context, filter) { - const queryParams = {}; - - if (filter) { - if (!CheckUtils.isValid(filter)) { - throw new TypeError(`filter has bad value ${filter}`); - } - queryParams[Constants.FILTER] = typeof filter === 'string' ? filter : FilterUtils.encode(filter); - } - - const { data } = await Service - .get(context, Constants.Licensee.ENDPOINT_PATH, queryParams); - - return Page( - data.items.item.filter(({ type }) => type === 'Licensee').map((v) => itemToLicensee(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Updates licensee properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#update-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * licensee number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param licensee NetLicensing.Licensee - * - * return updated licensee in promise. - * @returns {Promise} - */ - async update(context, number, licensee) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .post(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, licensee.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'Licensee'); - - return itemToLicensee(item); - }, - - /** - * Deletes licensee.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#delete-licensee - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * licensee number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete(context, number, forceCascade) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const queryParams = { forceCascade: Boolean(forceCascade) }; - - return Service - .delete(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, queryParams); - }, - - /** - * Validates active licenses of the licensee. - * In the case of multiple product modules validation, - * required parameters indexes will be added automatically. - * See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/licensee-services#validate-licensee - * - * @param context NetLicensing.Context - * - * licensee number - * @param number string - * - * optional validation parameters. See ValidationParameters and licensing model documentation for - * details. - * @param validationParameters NetLicensing.ValidationParameters. - * - * @returns {ValidationResults} - */ - async validate(context, number, validationParameters) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const queryParams = {}; - - if (validationParameters.getProductNumber()) { - queryParams.productNumber = validationParameters.getProductNumber(); - } - - Object.keys(validationParameters.getLicenseeProperties()).forEach((key) => { - queryParams[key] = validationParameters.getLicenseeProperty(key); - }); - - if (validationParameters.isForOfflineUse()) { - queryParams.forOfflineUse = true; - } - - if (validationParameters.getDryRun()) { - queryParams.dryRun = true; - } - - let pmIndex = 0; - const parameters = validationParameters.getParameters(); - - const has = Object.prototype.hasOwnProperty; - - Object.keys(parameters).forEach((productModuleName) => { - queryParams[`${Constants.ProductModule.PRODUCT_MODULE_NUMBER}${pmIndex}`] = productModuleName; - if (!has.call(parameters, productModuleName)) return; - - const parameter = parameters[productModuleName]; - - Object.keys(parameter).forEach((key) => { - if (has.call(parameter, key)) { - queryParams[key + pmIndex] = parameter[key]; - } - }); - pmIndex += 1; - }); - - const { data: { items: { item: items }, ttl } } = await Service.post( - context, - `${Constants.Licensee.ENDPOINT_PATH}/${number}/${Constants.Licensee.ENDPOINT_PATH_VALIDATE}`, - queryParams, - ); - - const validationResults = new ValidationResults(); - validationResults.setTtl(ttl); - - items.filter(({ type }) => type === 'ProductModuleValidation').forEach((v) => { - const item = itemToObject(v); - validationResults.setProductModuleValidation(item[Constants.ProductModule.PRODUCT_MODULE_NUMBER], item); - }); - - return validationResults; - }, - - /** - * Transfer licenses between licensees. - * @see https://netlicensing.io/wiki/licensee-services#transfer-licenses - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the number of the licensee receiving licenses - * @param number string - * - * the number of the licensee delivering licenses - * @param sourceLicenseeNumber string - * - * @returns {Promise} - */ - transfer(context, number, sourceLicenseeNumber) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - CheckUtils.paramNotEmpty(sourceLicenseeNumber, Constants.Licensee.SOURCE_LICENSEE_NUMBER); - - const queryParams = { sourceLicenseeNumber }; - - return Service - .post( - context, - `${Constants.Licensee.ENDPOINT_PATH}/${number}/${Constants.Licensee.ENDPOINT_PATH_TRANSFER}`, - queryParams, - ); - }, -}; diff --git a/src/services/LicenseeService.ts b/src/services/LicenseeService.ts new file mode 100644 index 0000000..25836a9 --- /dev/null +++ b/src/services/LicenseeService.ts @@ -0,0 +1,332 @@ +/** + * Licensee Service. See NetLicensingAPI for details: + * https://netlicensing.io/wiki/licensee-services + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// constants +import Constants from '@/constants'; + +// converters +import itemToLicensee from '@/converters/itemToLicensee'; +import itemToObject from '@/converters/itemToObject'; + +// services +import Service from '@/services/Service'; + +// types +import { ItemPagination, NlicResponse } from '@/types/api/response'; +import { LicenseeProps, Licensee } from '@/types/entities/Licensee'; +import { LicenseeService } from '@/types/services/LicenseeService'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page as IPage } from '@/types/vo/Page'; +import { ValidationParameters } from '@/types/vo/ValidationParameters'; + +// utils +import { encode } from '@/utils/filter'; +import { ensureNotEmpty, ensureNotNull } from '@/utils/validation'; + +// vo +import Page from '@/vo/Page'; +import ValidationResults from '@/vo/ValidationResults'; + +const endpoint = Constants.Licensee.ENDPOINT_PATH; +const endpointValidate = Constants.Licensee.ENDPOINT_PATH_VALIDATE; +const endpointTransfer = Constants.Licensee.ENDPOINT_PATH_TRANSFER; +const type = Constants.Licensee.TYPE; + +const licenseeService: LicenseeService = { + /** + * Gets licensee by its number.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/licensee-services#get-licensee + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the licensee number + * @param number string + * + * (optional) service request config + * @param config + * + * return the licensee in promise + * @returns {Promise} + */ + async get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + const response = await Service.get(context, `${endpoint}/${number}`, {}, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToLicensee(item); + }, + + /** + * Returns all licensees of a vendor.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/licensee-services#licensees-list + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|null + * + * (optional) service request config + * @param config + * + * array of licensees (of all products) or empty array if nothing found in promise. + * @returns {Promise} + */ + async list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>> { + const data: { [Constants.FILTER]: string } = {}; + + if (filter) { + data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter); + } + + const response = await Service.get(context, endpoint, data, config); + const items = response.data.items; + + const list: Licensee[] | undefined = items?.item.filter((v) => v.type === type).map((v) => itemToLicensee(v)); + + return Page(list || [], items as ItemPagination); + }, + + /** + * Creates new licensee object with given properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/licensee-services#create-licensee + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * parent product to which the new licensee is to be added + * @param productNumber string + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param licensee NetLicensing.Licensee + * + * (optional) service request config + * @param config + * + * return the newly created licensee object in promise + * @returns {Promise} + */ + async create( + context: Context, + productNumber: string, + licensee: Licensee, + config?: RequestConfig, + ): Promise> { + ensureNotNull(licensee, 'licensee'); + + const data = licensee.serialize(); + + if (productNumber) { + data.productNumber = productNumber; + } + + const response = await Service.post(context, endpoint, data, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToLicensee(item); + }, + + /** + * Updates licensee properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/licensee-services#update-licensee + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * licensee number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param licensee NetLicensing.Licensee + * + * (optional) service request config + * @param config + * + * return updated licensee in promise. + * @returns {Promise} + */ + async update( + context: Context, + number: string, + licensee: Licensee, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + ensureNotNull(licensee, 'licensee'); + + const response = await Service.post(context, `${endpoint}/${number}`, licensee.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToLicensee(item); + }, + + /** + * Deletes licensee.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/licensee-services#delete-licensee + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * licensee number + * @param number string + * + * if true, any entities that depend on the one being deleted will be deleted too + * @param forceCascade boolean + * + * (optional) service request config + * @param config + * + * return boolean state of delete in promise + * @returns {Promise} + */ + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config); + }, + + /** + * Validates active licenses of the licensee. + * In the case of multiple product modules validation, + * required parameters indexes will be added automatically. + * See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/licensee-services#validate-licensee + * + * @param context NetLicensing.Context + * + * licensee number + * @param number string + * + * optional validation parameters. See ValidationParameters and licensing model documentation for + * details. + * @param validationParameters NetLicensing.ValidationParameters. + * + * (optional) service request config + * @param config + * + * @returns {ValidationResults} + */ + async validate( + context: Context, + number: string, + validationParameters?: ValidationParameters, + config?: RequestConfig, + ): Promise { + ensureNotEmpty(number, 'number'); + + const data: Record = {}; + + if (validationParameters) { + const productNumber: string | undefined = validationParameters.productNumber; + + if (productNumber) { + data.productNumber = productNumber; + } + + const licenseeProperties = validationParameters.licenseeProperties; + + Object.keys(licenseeProperties).forEach((key: string) => { + data[key] = validationParameters.getLicenseeProperty(key); + }); + + if (validationParameters.isForOfflineUse()) { + data.forOfflineUse = true; + } + + if (validationParameters.isDryRun()) { + data.dryRun = true; + } + + const parameters = validationParameters.getParameters(); + + Object.keys(parameters).forEach((pmNumber, i) => { + data[`${Constants.ProductModule.PRODUCT_MODULE_NUMBER}${i}`] = pmNumber; + + const parameter = parameters[pmNumber]; + + if (parameter) { + Object.keys(parameter).forEach((key: string) => { + data[key + i] = parameter[key]; + }); + } + }); + } + + const response = await Service.post(context, `${endpoint}/${number}/${endpointValidate}`, data, config); + + const validationResults = new ValidationResults(); + + const ttl = response.data.ttl; + + if (ttl) { + validationResults.setTtl(ttl); + } + + const items = response.data.items?.item.filter((v) => v.type === Constants.Validation.TYPE); + + items?.forEach((v) => { + validationResults.setValidation(itemToObject(v)); + }); + + return validationResults; + }, + + /** + * Transfer licenses between licensees. + * @see https://netlicensing.io/wiki/licensee-services#transfer-licenses + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the number of the licensee receiving licenses + * @param number string + * + * the number of the licensee delivering licenses + * @param sourceLicenseeNumber string + * + * (optional) service request config + * @param config + * + * @returns {Promise} + */ + transfer( + context: Context, + number: string, + sourceLicenseeNumber: string, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + ensureNotEmpty(sourceLicenseeNumber, 'sourceLicenseeNumber'); + + const data = { sourceLicenseeNumber }; + + return Service.post(context, `${endpoint}/${number}/${endpointTransfer}`, data, config); + }, +}; + +export default licenseeService; diff --git a/src/services/NotificationService.js b/src/services/NotificationService.js deleted file mode 100644 index cd1aeee..0000000 --- a/src/services/NotificationService.js +++ /dev/null @@ -1,148 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import Service from './Service'; -import Constants from '../Constants'; -import CheckUtils from '../util/CheckUtils'; -import FilterUtils from '../util/FilterUtils'; -import itemToNotification from '../converters/itemToNotification'; -import Page from '../vo/Page'; - -/** - * JS representation of the Notification Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/notification-services - * - * @constructor - */ - -export default { - /** - * Creates new notification with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#create-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param notification NetLicensing.Notification - * - * return the newly created notification object in promise - * @returns {Promise} - */ - - async create(context, notification) { - const { data: { items: { item: items } } } = await Service - .post(context, Constants.Notification.ENDPOINT_PATH, notification.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'Notification'); - - return itemToNotification(item); - }, - - /** - * Gets notification by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#get-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the notification number - * @param number string - * - * return the notification object in promise - * @returns {Promise} - */ - async get(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .get(context, `${Constants.Notification.ENDPOINT_PATH}/${number}`); - - const [item] = items.filter(({ type }) => type === 'Notification'); - - return itemToNotification(item); - }, - - /** - * Returns notifications of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#notifications-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of notification entities or empty array if nothing found in promise. - * @returns {Promise} - */ - async list(context, filter) { - const queryParams = {}; - - if (filter) { - if (!CheckUtils.isValid(filter)) throw new TypeError(`filter has bad value ${filter}`); - queryParams[Constants.FILTER] = typeof filter === 'string' ? filter : FilterUtils.encode(filter); - } - - const { data } = await Service.get(context, Constants.Notification.ENDPOINT_PATH, queryParams); - - return Page( - data.items.item.filter(({ type }) => type === 'Notification').map((v) => itemToNotification(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Updates notification properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#update-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * notification number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param notification NetLicensing.Notification - * - * updated notification in promise. - * @returns {Promise} - */ - async update(context, number, notification) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .post(context, `${Constants.Notification.ENDPOINT_PATH}/${number}`, notification.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'Notification'); - - return itemToNotification(item); - }, - - /** - * Deletes notification.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/notification-services#delete-notification - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * notification number - * @param number string - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - return Service.delete(context, `${Constants.Notification.ENDPOINT_PATH}/${number}`); - }, -}; diff --git a/src/services/NotificationService.ts b/src/services/NotificationService.ts new file mode 100644 index 0000000..d9f656a --- /dev/null +++ b/src/services/NotificationService.ts @@ -0,0 +1,201 @@ +/** + * JS representation of the Notification Service. See NetLicensingAPI for details: + * https://netlicensing.io/wiki/notification-services + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// constants +import Constants from '@/constants'; + +// converters +import itemToNotification from '@/converters/itemToNotification'; + +// services +import Service from '@/services/Service'; + +// types +import { ItemPagination, NlicResponse } from '@/types/api/response'; +import { NotificationProps, Notification } from '@/types/entities/Notification'; +import { NotificationService } from '@/types/services/NotificationService'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page as IPage } from '@/types/vo/Page'; + +// utils +import { encode } from '@/utils/filter'; +import { ensureNotEmpty, ensureNotNull } from '@/utils/validation'; + +// vo +import Page from '@/vo/Page'; + +const endpoint = Constants.Notification.ENDPOINT_PATH; +const type = Constants.Notification.TYPE; + +const notificationService: NotificationService = { + /** + * Gets notification by its number.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/notification-services#get-notification + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the notification number + * @param number string + * + * (optional) service request config + * @param config + * + * return the notification object in promise + * @returns {Promise} + */ + async get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + const response = await Service.get(context, `${endpoint}/${number}`, {}, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToNotification(item); + }, + + /** + * Returns notifications of a vendor.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/notification-services#notifications-list + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|null + * + * (optional) service request config + * @param config + * + * array of notification entities or empty array if nothing found in promise. + * @returns {Promise} + */ + async list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>> { + const data: { [Constants.FILTER]: string } = {}; + + if (filter) { + data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter); + } + + const response = await Service.get(context, endpoint, data, config); + const items = response.data.items; + + const list: Notification[] | undefined = items?.item + .filter((v) => v.type === type) + .map((v) => itemToNotification(v)); + + return Page(list || [], items as ItemPagination); + }, + + /** + * Creates new notification with given properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/notification-services#create-notification + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param notification NetLicensing.Notification + * + * (optional) service request config + * @param config + * + * return the newly created notification object in promise + * @returns {Promise} + */ + async create( + context: Context, + notification: Notification, + config?: RequestConfig, + ): Promise> { + ensureNotNull(notification, 'notification'); + + const response = await Service.post(context, endpoint, notification.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToNotification(item); + }, + + /** + * Updates notification properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/notification-services#update-notification + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * notification number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param notification NetLicensing.Notification + * + * (optional) service request config + * @param config + * + * updated notification in promise. + * @returns {Promise} + */ + async update( + context: Context, + number: string, + notification: Notification, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + ensureNotNull(notification, 'notification'); + + const response = await Service.post(context, `${endpoint}/${number}`, notification.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToNotification(item); + }, + + /** + * Deletes notification.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/notification-services#delete-notification + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * notification number + * @param number string + * + * if true, any entities that depend on the one being deleted will be deleted too + * @param forceCascade boolean + * + * (optional) service request config + * @param config + * + * return boolean state of delete in promise + * @returns {Promise} + */ + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config); + }, +}; + +export default notificationService; diff --git a/src/services/PaymentMethodService.js b/src/services/PaymentMethodService.js deleted file mode 100644 index fb45d58..0000000 --- a/src/services/PaymentMethodService.js +++ /dev/null @@ -1,103 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import Constants from '../Constants'; -import CheckUtils from '../util/CheckUtils'; -import Service from './Service'; -import FilterUtils from '../util/FilterUtils'; -import itemToPaymentMethod from '../converters/itemToPaymentMethod'; -import Page from '../vo/Page'; - -export default { - /** - * Gets payment method by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/payment-method-services#get-payment-method - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the payment method number - * @param number string - * - * return the payment method in promise - * @returns {Promise} - */ - async get(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .get(context, `${Constants.PaymentMethod.ENDPOINT_PATH}/${number}`); - - const [item] = items.filter(({ type }) => type === 'PaymentMethod'); - - return itemToPaymentMethod(item); - }, - - /** - * Returns payment methods of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/payment-method-services#payment-methods-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of payment method entities or empty array if nothing found in promise. - * @returns {Promise} - */ - async list(context, filter) { - const queryParams = {}; - - if (filter) { - if (!CheckUtils.isValid(filter)) { - throw new TypeError(`filter has bad value ${filter}`); - } - queryParams[Constants.FILTER] = typeof filter === 'string' ? filter : FilterUtils.encode(filter); - } - - const { data } = await Service - .get(context, Constants.PaymentMethod.ENDPOINT_PATH, queryParams); - - return Page( - data.items.item.filter(({ type }) => type === 'PaymentMethod').map((v) => itemToPaymentMethod(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Updates payment method properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/payment-method-services#update-payment-method - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the payment method number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param paymentMethod NetLicensing.PaymentMethod - * - * return updated payment method in promise. - * @returns {Promise} - */ - async update(context, number, paymentMethod) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const path = `${Constants.PaymentMethod.ENDPOINT_PATH}/${number}`; - - const { data: { items: { item: items } } } = await Service - .post(context, path, paymentMethod.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'PaymentMethod'); - - return itemToPaymentMethod(item); - }, -}; diff --git a/src/services/PaymentMethodService.ts b/src/services/PaymentMethodService.ts new file mode 100644 index 0000000..0df13b8 --- /dev/null +++ b/src/services/PaymentMethodService.ts @@ -0,0 +1,136 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// constants +import Constants from '@/constants'; + +// converters +import itemToPaymentMethod from '@/converters/itemToPaymentMethod'; + +// services +import Service from '@/services/Service'; + +// types +import { ItemPagination } from '@/types/api/response'; +import { PaymentMethodProps, PaymentMethod } from '@/types/entities/PaymentMethod'; +import { PaymentMethodService } from '@/types/services/PaymentMethodService'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page as IPage } from '@/types/vo/Page'; + +// utils +import { encode } from '@/utils/filter'; +import { ensureNotEmpty, ensureNotNull } from '@/utils/validation'; + +// vo +import Page from '@/vo/Page'; + +const endpoint = Constants.PaymentMethod.ENDPOINT_PATH; +const type = Constants.PaymentMethod.TYPE; + +const paymentMethodService: PaymentMethodService = { + /** + * Gets payment method by its number.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/payment-method-services#get-payment-method + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the payment method number + * @param number string + * + * (optional) service request config + * @param config + * + * return the payment method in promise + * @returns {Promise} + */ + async get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + const response = await Service.get(context, `${endpoint}/${number}`, {}, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToPaymentMethod(item); + }, + + /** + * Returns payment methods of a vendor.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/payment-method-services#payment-methods-list + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|null + * + * (optional) service request config + * @param config + * + * array of payment method entities or empty array if nothing found in promise. + * @returns {Promise} + */ + async list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>> { + const data: { [Constants.FILTER]: string } = {}; + + if (filter) { + data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter); + } + + const response = await Service.get(context, endpoint, data, config); + const items = response.data.items; + + const list: PaymentMethod[] | undefined = items?.item + .filter((v) => v.type === type) + .map((v) => itemToPaymentMethod(v)); + + return Page(list || [], items as ItemPagination); + }, + + /** + * Updates payment method properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/payment-method-services#update-payment-method + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the payment method number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param paymentMethod NetLicensing.PaymentMethod + * + * (optional) service request config + * @param config + * + * return updated payment method in promise. + * @returns {Promise} + */ + async update( + context: Context, + number: string, + paymentMethod: PaymentMethod, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + ensureNotNull(paymentMethod, 'paymentMethod'); + + const response = await Service.post(context, `${endpoint}/${number}`, paymentMethod.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToPaymentMethod(item); + }, +}; + +export default paymentMethodService; diff --git a/src/services/ProductModuleService.js b/src/services/ProductModuleService.js deleted file mode 100644 index 1adad05..0000000 --- a/src/services/ProductModuleService.js +++ /dev/null @@ -1,161 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import CheckUtils from '../util/CheckUtils'; -import Constants from '../Constants'; -import Service from './Service'; -import FilterUtils from '../util/FilterUtils'; -import itemToProductModule from '../converters/itemToProductModule'; -import Page from '../vo/Page'; - -/** - * JS representation of the ProductModule Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/product-module-services - * - * @constructor - */ - -export default { - /** - * Creates new product module object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#create-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent product to which the new product module is to be added - * @param productNumber string - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param productModule NetLicensing.ProductModule - * - * the newly created product module object in promise - * @returns {Promise} - */ - async create(context, productNumber, productModule) { - CheckUtils.paramNotEmpty(productNumber, Constants.Product.PRODUCT_NUMBER); - - productModule.setProperty(Constants.Product.PRODUCT_NUMBER, productNumber); - - const { data: { items: { item: items } } } = await Service - .post(context, Constants.ProductModule.ENDPOINT_PATH, productModule.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'ProductModule'); - - return itemToProductModule(item); - }, - - /** - * Gets product module by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#get-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the product module number - * @param number string - * - * return the product module object in promise - * @returns {Promise} - */ - async get(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .get(context, `${Constants.ProductModule.ENDPOINT_PATH}/${number}`); - - const [item] = items.filter(({ type }) => type === 'ProductModule'); - - return itemToProductModule(item); - }, - - /** - * Returns products of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#product-modules-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of product modules entities or empty array if nothing found in promise. - * @returns {Promise} - */ - async list(context, filter) { - const queryParams = {}; - - if (filter) { - if (!CheckUtils.isValid(filter)) { - throw new TypeError(`filter has bad value ${filter}`); - } - queryParams[Constants.FILTER] = typeof filter === 'string' ? filter : FilterUtils.encode(filter); - } - - const { data } = await Service.get(context, Constants.ProductModule.ENDPOINT_PATH, queryParams); - - return Page( - data.items.item.filter(({ type }) => type === 'ProductModule').map((v) => itemToProductModule(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Updates product module properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#update-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product module number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param productModule NetLicensing.ProductModule - * - * updated product module in promise. - * @returns {Promise} - */ - async update(context, number, productModule) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .post(context, `${Constants.ProductModule.ENDPOINT_PATH}/${number}`, productModule.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'ProductModule'); - - return itemToProductModule(item); - }, - - /** - * Deletes product module.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-module-services#delete-product-module - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product module number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete(context, number, forceCascade) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const queryParams = { forceCascade: Boolean(forceCascade) }; - - return Service.delete(context, `${Constants.ProductModule.ENDPOINT_PATH}/${number}`, queryParams); - }, -}; diff --git a/src/services/ProductModuleService.ts b/src/services/ProductModuleService.ts new file mode 100644 index 0000000..9724110 --- /dev/null +++ b/src/services/ProductModuleService.ts @@ -0,0 +1,211 @@ +/** + * JS representation of the ProductModule Service. See NetLicensingAPI for details: + * https://netlicensing.io/wiki/product-module-services + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// constants +import Constants from '@/constants'; + +// converters +import itemToProductModule from '@/converters/itemToProductModule'; + +// services +import Service from '@/services/Service'; + +// types +import { ItemPagination, NlicResponse } from '@/types/api/response'; +import { ProductModuleProps, ProductModule } from '@/types/entities/ProductModule'; +import { ProductModuleService } from '@/types/services/ProductModuleService'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page as IPage } from '@/types/vo/Page'; + +// utils +import { encode } from '@/utils/filter'; +import { ensureNotEmpty, ensureNotNull } from '@/utils/validation'; + +// vo +import Page from '@/vo/Page'; + +const endpoint = Constants.ProductModule.ENDPOINT_PATH; +const type = Constants.ProductModule.TYPE; + +const productModuleService: ProductModuleService = { + /** + * Gets product module by its number.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/product-module-services#get-product-module + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the product module number + * @param number string + * + * (optional) service request config + * @param config + * + * return the product module object in promise + * @returns {Promise} + */ + async get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + const response = await Service.get(context, `${endpoint}/${number}`, {}, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToProductModule(item); + }, + + /** + * Returns products of a vendor.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/product-module-services#product-modules-list + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|null + * + * (optional) service request config + * @param config + * + * array of product modules entities or empty array if nothing found in promise. + * @returns {Promise} + */ + async list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>> { + const data: { [Constants.FILTER]: string } = {}; + + if (filter) { + data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter); + } + + const response = await Service.get(context, endpoint, data, config); + const items = response.data.items; + + const list: ProductModule[] | undefined = items?.item + .filter((v) => v.type === type) + .map((v) => itemToProductModule(v)); + + return Page(list || [], items as ItemPagination); + }, + + /** + * Creates new product module object with given properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/product-module-services#create-product-module + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * parent product to which the new product module is to be added + * @param productNumber string + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param productModule NetLicensing.ProductModule + * + * (optional) service request config + * @param config + * + * the newly created product module object in promise + * @returns {Promise} + */ + async create( + context: Context, + productNumber: string | null, + productModule: ProductModule, + config?: RequestConfig, + ): Promise> { + ensureNotNull(productModule, 'productModule'); + + const data = productModule.serialize(); + + if (productNumber) { + data.productNumber = productNumber; + } + + const response = await Service.post(context, endpoint, data, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToProductModule(item); + }, + + /** + * Updates product module properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/product-module-services#update-product-module + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * product module number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param productModule NetLicensing.ProductModule + * + * (optional) service request config + * @param config + * + * updated product module in promise. + * @returns {Promise} + */ + async update( + context: Context, + number: string, + productModule: ProductModule, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + ensureNotNull(productModule, 'productModule'); + + const response = await Service.post(context, `${endpoint}/${number}`, productModule.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToProductModule(item); + }, + + /** + * Deletes product module.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/product-module-services#delete-product-module + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * product module number + * @param number string + * + * if true, any entities that depend on the one being deleted will be deleted too + * @param forceCascade boolean + * + * (optional) service request config + * @param config + * + * return boolean state of delete in promise + * @returns {Promise} + */ + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config); + }, +}; + +export default productModuleService; diff --git a/src/services/ProductService.js b/src/services/ProductService.js deleted file mode 100644 index 33df2a8..0000000 --- a/src/services/ProductService.js +++ /dev/null @@ -1,153 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import Service from './Service'; -import Constants from '../Constants'; -import CheckUtils from '../util/CheckUtils'; -import FilterUtils from '../util/FilterUtils'; -import itemToProduct from '../converters/itemToProduct'; -import Page from '../vo/Page'; - -/** - * JS representation of the Product Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/product-services - * - * @constructor - */ - -export default { - /** - * Creates new product with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#create-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param product NetLicensing.Product - * - * return the newly created product object in promise - * @returns {Promise} - */ - - async create(context, product) { - const { data: { items: { item: items } } } = await Service - .post(context, Constants.Product.ENDPOINT_PATH, product.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'Product'); - - return itemToProduct(item); - }, - - /** - * Gets product by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#get-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the product number - * @param number string - * - * return the product object in promise - * @returns {Promise} - */ - async get(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .get(context, `${Constants.Product.ENDPOINT_PATH}/${number}`); - - const [item] = items.filter(({ type }) => type === 'Product'); - - return itemToProduct(item); - }, - - /** - * Returns products of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#products-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of product entities or empty array if nothing found in promise. - * @returns {Promise} - */ - async list(context, filter) { - const queryParams = {}; - - if (filter) { - if (!CheckUtils.isValid(filter)) throw new TypeError(`filter has bad value ${filter}`); - queryParams[Constants.FILTER] = typeof filter === 'string' ? filter : FilterUtils.encode(filter); - } - - const { data } = await Service.get(context, Constants.Product.ENDPOINT_PATH, queryParams); - - return Page( - data.items.item.filter(({ type }) => type === 'Product').map((v) => itemToProduct(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Updates product properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#update-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param product NetLicensing.Product - * - * updated product in promise. - * @returns {Promise} - */ - async update(context, number, product) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .post(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, product.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'Product'); - - return itemToProduct(item); - }, - - /** - * Deletes product.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/product-services#delete-product - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete(context, number, forceCascade) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const queryParams = { forceCascade: Boolean(forceCascade) }; - - return Service.delete(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, queryParams); - }, -}; diff --git a/src/services/ProductService.ts b/src/services/ProductService.ts new file mode 100644 index 0000000..c8b9034 --- /dev/null +++ b/src/services/ProductService.ts @@ -0,0 +1,199 @@ +/** + * JS representation of the Product Service. See NetLicensingAPI for details: + * https://netlicensing.io/wiki/product-services + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// constants +import Constants from '@/constants'; + +// converters +import itemToProduct from '@/converters/itemToProduct'; + +// services +import Service from '@/services/Service'; + +// types +import { ItemPagination, NlicResponse } from '@/types/api/response'; +import { ProductProps, Product } from '@/types/entities/Product'; +import { ProductService } from '@/types/services/ProductService'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page as IPage } from '@/types/vo/Page'; + +// utils +import { encode } from '@/utils/filter'; +import { ensureNotEmpty, ensureNotNull } from '@/utils/validation'; + +// vo +import Page from '@/vo/Page'; + +const endpoint = Constants.Product.ENDPOINT_PATH; +const type = Constants.Product.TYPE; + +const productService: ProductService = { + /** + * Gets product by its number.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/product-services#get-product + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the product number + * @param number string + * + * (optional) service request config + * @param config + * + * return the product object in promise + * @returns {Promise} + */ + async get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + const response = await Service.get(context, `${endpoint}/${number}`, {}, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToProduct(item); + }, + + /** + * Returns products of a vendor.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/product-services#products-list + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|null + * + * (optional) service request config + * @param config + * + * array of product entities or empty array if nothing found in promise. + * @returns {Promise} + */ + async list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>> { + const data: { [Constants.FILTER]: string } = {}; + + if (filter) { + data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter); + } + + const response = await Service.get(context, endpoint, data, config); + const items = response.data.items; + + const list: Product[] | undefined = items?.item.filter((v) => v.type === type).map((v) => itemToProduct(v)); + + return Page(list || [], items as ItemPagination); + }, + + /** + * Creates new product with given properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/product-services#create-product + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param product NetLicensing.Product + * + * (optional) service request config + * @param config + * + * return the newly created product object in promise + * @returns {Promise} + */ + async create( + context: Context, + product: Product, + config?: RequestConfig, + ): Promise> { + ensureNotNull(product, 'product'); + + const response = await Service.post(context, endpoint, product.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToProduct(item); + }, + + /** + * Updates product properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/product-services#update-product + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * product number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param product NetLicensing.Product + * + * (optional) service request config + * @param config + * + * updated product in promise. + * @returns {Promise} + */ + async update( + context: Context, + number: string, + product: Product, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + ensureNotNull(product, 'product'); + + const response = await Service.post(context, `${endpoint}/${number}`, product.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToProduct(item); + }, + + /** + * Deletes product.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/product-services#delete-product + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * product number + * @param number string + * + * if true, any entities that depend on the one being deleted will be deleted too + * @param forceCascade boolean + * + * (optional) service request config + * @param config + * + * return boolean state of delete in promise + * @returns {Promise} + */ + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config); + }, +}; + +export default productService; diff --git a/src/services/Service.js b/src/services/Service.js deleted file mode 100644 index 1b7f011..0000000 --- a/src/services/Service.js +++ /dev/null @@ -1,239 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -import axios from 'axios'; -import btoa from 'btoa'; -import Constants from '../Constants'; -import NlicError from '../errors/NlicError'; -import pkg from '../../package.json'; - -let httpXHR = {}; -let axiosInstance = null; - -export default class Service { - static getAxiosInstance() { - return axiosInstance || axios; - } - - static setAxiosInstance(instance) { - axiosInstance = instance; - } - - static getLastHttpRequestInfo() { - return httpXHR; - } - - /** - * Helper method for performing GET request to N - etLicensing API services. Finds and returns first suitable item with - * type resultType from the response. - * - * Context for the NetLicensing API call - * @param context - * - * the REST URL template - * @param urlTemplate - * - * The REST query parameters values. May be null if there are no parameters. - * @param queryParams - * - * @returns {Promise} - */ - static get(context, urlTemplate, queryParams) { - return Service.request(context, 'get', urlTemplate, queryParams); - } - - /** - * Helper method for performing POST request to NetLicensing API services. Finds and returns first suitable item - * with type resultType from the response. - * - * context for the NetLicensing API call - * @param context - * - * the REST URL template - * @param urlTemplate - * - * The REST query parameters values. May be null if there are no parameters. - * @param queryParams - * - * @returns {Promise} - */ - static post(context, urlTemplate, queryParams) { - return Service.request(context, 'post', urlTemplate, queryParams); - } - - /** - * - * @param context - * @param urlTemplate - * @param queryParams - * @returns {Promise} - */ - static delete(context, urlTemplate, queryParams) { - return Service.request(context, 'delete', urlTemplate, queryParams); - } - - /** - * Send request to NetLicensing RestApi - * @param context - * @param method - * @param urlTemplate - * @param queryParams - * @returns {Promise} - */ - static request(context, method, urlTemplate, queryParams) { - const template = String(urlTemplate); - const params = queryParams || {}; - - if (!template) throw new TypeError('Url template must be specified'); - - // validate http method - if (['get', 'post', 'delete'].indexOf(method.toLowerCase()) < 0) { - throw new Error(`Invalid request type:${method}, allowed requests types: GET, POST, DELETE.`); - } - - // validate context - if (!context.getBaseUrl(null)) { - throw new Error('Base url must be specified'); - } - - const request = { - url: encodeURI(`${context.getBaseUrl()}/${template}`), - method: method.toLowerCase(), - responseType: 'json', - headers: { - Accept: 'application/json', - 'X-Requested-With': 'XMLHttpRequest', - }, - transformRequest: [(data, headers) => { - if (headers['Content-Type'] === 'application/x-www-form-urlencoded') { - return Service.toQueryString(data); - } - - if (!headers['NetLicensing-Origin']) { - // eslint-disable-next-line no-param-reassign - headers['NetLicensing-Origin'] = `NetLicensing/Javascript ${pkg.version}`; - } - return data; - }], - }; - - // only node.js has a process variable that is of [[Class]] process - if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - request.headers['User-agent'] = `NetLicensing/Javascript ${pkg.version}/node&${process.version}`; - } - - if (['put', 'post', 'patch'].indexOf(request.method) >= 0) { - if (request.method === 'post') { - request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; - } - request.data = params; - } else { - request.params = params; - } - - switch (context.getSecurityMode()) { - // Basic Auth - case Constants.BASIC_AUTHENTICATION: - if (!context.getUsername()) throw new Error('Missing parameter "username"'); - if (!context.getPassword()) throw new Error('Missing parameter "password"'); - - request.auth = { - username: context.getUsername(), - password: context.getPassword(), - }; - break; - // ApiKey Auth - case Constants.APIKEY_IDENTIFICATION: - if (!context.getApiKey()) throw new Error('Missing parameter "apiKey"'); - - request.headers.Authorization = `Basic ${btoa(`apiKey:${context.getApiKey()}`)}`; - break; - // without authorization - case Constants.ANONYMOUS_IDENTIFICATION: - break; - default: - throw new Error('Unknown security mode'); - } - - return Service.getAxiosInstance()(request) - .then((response) => { - response.infos = Service.getInfo(response, []); - - const errors = response.infos.filter(({ type }) => type === 'ERROR'); - - if (errors.length) { - const error = new Error(errors[0].value); - error.config = response.config; - error.request = response.request; - error.response = response; - throw error; - } - - httpXHR = response; - return response; - }) - .catch((e) => { - if (e.response) { - httpXHR = e.response; - - // The request was made and the server responded with a status code - // that falls out of the range of 2xx - - const error = new NlicError(e); - - error.config = e.config; - error.code = e.code; - error.request = e.request; - error.response = e.response; - - // The request was made and the server responded with a status code - // that falls out of the range of 2xx - const { data } = e.response; - - if (data) { - error.infos = Service.getInfo(e.response, []); - - const [info = {}] = error.infos.filter(({ type }) => type === 'ERROR'); - error.message = info.value || 'Unknown'; - } - - throw error; - } - - throw e; - }); - } - - static getInfo(response, def) { - try { - return response.data.infos.info || def; - } catch (e) { - return def; - } - } - - static toQueryString(data, prefix) { - const query = []; - - const has = Object.prototype.hasOwnProperty; - - Object.keys(data) - .forEach((key) => { - if (has.call(data, key)) { - const k = prefix ? `${prefix}[${key}]` : key; - let v = data[key]; - v = (v instanceof Date) ? v.toISOString() : v; - query.push((v !== null && typeof v === 'object') - ? Service.toQueryString(v, k) - : `${encodeURIComponent(k)}=${encodeURIComponent(v)}`); - } - }); - - return query.join('&') - .replace(/%5B[0-9]+%5D=/g, '='); - } -} diff --git a/src/services/Service/index.ts b/src/services/Service/index.ts new file mode 100644 index 0000000..ac92da9 --- /dev/null +++ b/src/services/Service/index.ts @@ -0,0 +1,79 @@ +import { AxiosInstance, AxiosResponse, Method } from 'axios'; + +// service +import { setAxiosInstance, getAxiosInstance, getLastResponse, getInfo } from '@/services/Service/instance'; +import { get, post, del } from '@/services/Service/methods'; +import request from '@/services/Service/request'; +import toQueryString from '@/services/Service/toQueryString'; + +// types +import { Info, NlicResponse } from '@/types/api/response'; +import { RequestConfig, Service } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; + +export { get, post, del, request, toQueryString }; + +const service: Service = { + setAxiosInstance(this: void, instance: AxiosInstance) { + setAxiosInstance(instance); + }, + + getAxiosInstance(this: void): AxiosInstance { + return getAxiosInstance(); + }, + + getLastHttpRequestInfo(this: void): AxiosResponse | null { + return getLastResponse(); + }, + + getInfo(this: void): Info[] { + return getInfo(); + }, + + get( + this: void, + context: Context, + endpoint: string, + data?: Record, + config?: RequestConfig, + ): Promise> { + return get(context, endpoint, data, config); + }, + + post( + this: void, + context: Context, + endpoint: string, + data?: Record, + config?: RequestConfig, + ): Promise> { + return post(context, endpoint, data, config); + }, + + delete( + this: void, + context: Context, + endpoint: string, + data?: Record, + config?: RequestConfig, + ): Promise> { + return del(context, endpoint, data, config); + }, + + request( + this: void, + context: Context, + method: Method, + endpoint: string, + data?: Record, + config?: RequestConfig, + ): Promise> { + return request(context, method, endpoint, data, config); + }, + + toQueryString>(this: void, data: T): string { + return toQueryString(data); + }, +}; + +export default service; diff --git a/src/services/Service/instance.ts b/src/services/Service/instance.ts new file mode 100644 index 0000000..9aefc66 --- /dev/null +++ b/src/services/Service/instance.ts @@ -0,0 +1,24 @@ +import axios, { AxiosInstance, AxiosResponse } from 'axios'; +import { Info } from '@/types/api/response'; + +let axiosInstance: AxiosInstance = axios.create(); +let lastResponse: AxiosResponse | null = null; +let info: Info[] = []; + +export const setAxiosInstance = (instance: AxiosInstance): void => { + axiosInstance = instance; +}; + +export const getAxiosInstance = (): AxiosInstance => axiosInstance; + +export const setLastResponse = (response: AxiosResponse | null): void => { + lastResponse = response; +}; + +export const getLastResponse = (): AxiosResponse | null => lastResponse; + +export const setInfo = (infos: Info[]): void => { + info = infos; +}; + +export const getInfo = (): Info[] => info; diff --git a/src/services/Service/methods.ts b/src/services/Service/methods.ts new file mode 100644 index 0000000..b19fe51 --- /dev/null +++ b/src/services/Service/methods.ts @@ -0,0 +1,30 @@ +import type { AxiosResponse } from 'axios'; + +// types +import type { NlicResponse } from '@/types/api/response'; +import type { RequestConfig } from '@/types/services/Service'; +import type { Context } from '@/types/vo/Context'; + +// service +import request from './request'; + +export const get = ( + context: Context, + endpoint: string, + data?: Record, + config?: RequestConfig, +): Promise> => request(context, 'get', endpoint, data, config); + +export const post = ( + context: Context, + endpoint: string, + data?: Record, + config?: RequestConfig, +): Promise> => request(context, 'post', endpoint, data, config); + +export const del = ( + context: Context, + endpoint: string, + data?: Record, + config?: RequestConfig, +): Promise> => request(context, 'delete', endpoint, data, config); diff --git a/src/services/Service/request.ts b/src/services/Service/request.ts new file mode 100644 index 0000000..3475c94 --- /dev/null +++ b/src/services/Service/request.ts @@ -0,0 +1,152 @@ +import { AxiosRequestConfig, Method, AxiosRequestHeaders, AxiosResponse, AxiosError, AxiosInstance } from 'axios'; + +// constants +import SecurityMode from '@/constants/SecurityMode'; + +// errors +import NlicError from '@/errors/NlicError'; + +// types +import type { NlicResponse } from '@/types/api/response'; +import type { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; + +// package.json +import pkg from '../../../package.json'; + +// service +import { getAxiosInstance, setLastResponse, setInfo } from './instance'; +import toQueryString from './toQueryString'; + +export default async ( + context: Context, + method: Method, + endpoint: string, + data?: Record, + config?: RequestConfig, +): Promise> => { + const headers: Record = { + Accept: 'application/json', + 'X-Requested-With': 'XMLHttpRequest', + }; + + // only node.js has a process variable that is of [[Class]] process + if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { + headers['User-agent'] = `NetLicensing/Javascript ${pkg.version}/node&${process.version}`; + } + + const req: AxiosRequestConfig = { + method, + headers, + url: encodeURI(`${context.getBaseUrl()}/${endpoint}`), + responseType: 'json', + transformRequest: (d: unknown, h: AxiosRequestHeaders) => { + if (h['Content-Type'] === 'application/x-www-form-urlencoded') { + return toQueryString(d as Record); + } + + if (!h['NetLicensing-Origin']) { + h['NetLicensing-Origin'] = `NetLicensing/Javascript ${pkg.version}`; + } + + return d; + }, + }; + + if (['put', 'post', 'patch'].indexOf(method.toLowerCase()) >= 0) { + if (req.method === 'post') { + headers['Content-Type'] = 'application/x-www-form-urlencoded'; + } + req.data = data; + } else { + req.params = data; + } + + switch (context.getSecurityMode()) { + // Basic Auth + case SecurityMode.BASIC_AUTHENTICATION: + { + if (!context.getUsername()) { + throw new NlicError('Missing parameter "username"'); + } + + if (!context.getPassword()) { + throw new NlicError('Missing parameter "password"'); + } + + req.auth = { + username: context.getUsername(), + password: context.getPassword(), + }; + } + break; + // ApiKey Auth + case SecurityMode.APIKEY_IDENTIFICATION: + if (!context.getApiKey()) { + throw new NlicError('Missing parameter "apiKey"'); + } + + headers.Authorization = `Basic ${btoa(`apiKey:${context.getApiKey()}`)}`; + break; + // without authorization + case SecurityMode.ANONYMOUS_IDENTIFICATION: + break; + default: + throw new NlicError('Unknown security mode'); + } + + const instance: AxiosInstance = config?.axiosInstance || getAxiosInstance(); + + try { + const response: AxiosResponse = await instance(req); + const info = response.data.infos?.info || []; + + setLastResponse(response); + setInfo(info); + + if (config?.onResponse) { + config.onResponse(response); + } + + if (info.length > 0) { + if (config?.onInfo) { + config.onInfo(info); + } + + const eInfo = info.find(({ type }) => type === 'ERROR'); + + if (eInfo) { + throw new NlicError(eInfo.value, eInfo.id, response.config, response.request, response); + } + } + + return response; + } catch (e) { + const error = e as AxiosError; + + const response = error.response; + const info = (response?.data as NlicResponse)?.infos?.info || []; + + setLastResponse(response || null); + setInfo(info); + + let message = (e as AxiosError).message; + + if (response?.data && info.length > 0) { + const eInfo = info.find(({ type }) => type === 'ERROR'); + + if (eInfo) { + message = eInfo.value; + } + } + + throw new NlicError( + message, + error.code, + error.config, + error.request, + error.response as AxiosResponse, + error.stack, + ); + } +}; diff --git a/src/services/Service/toQueryString.ts b/src/services/Service/toQueryString.ts new file mode 100644 index 0000000..5b13cb3 --- /dev/null +++ b/src/services/Service/toQueryString.ts @@ -0,0 +1,37 @@ +export default >(data: T): string => { + const query: string[] = []; + + const build = (obj: unknown, keyPrefix?: string): void => { + if (obj === null || obj === undefined) { + return; + } + + if (Array.isArray(obj)) { + obj.forEach((item) => { + build(item, keyPrefix ? `${keyPrefix}` : ''); + }); + + return; + } + + if (obj instanceof Date) { + query.push(`${keyPrefix}=${encodeURIComponent(obj.toISOString())}`); + return; + } + + if (typeof obj === 'object') { + Object.keys(obj).forEach((key) => { + const value = obj[key as keyof typeof obj]; + build(value, keyPrefix ? `${keyPrefix}[${encodeURIComponent(key)}]` : encodeURIComponent(key)); + }); + + return; + } + + query.push(`${keyPrefix}=${encodeURIComponent(obj as string)}`); + }; + + build(data); + + return query.join('&'); +}; diff --git a/src/services/TokenService.js b/src/services/TokenService.js deleted file mode 100644 index 7fe8d02..0000000 --- a/src/services/TokenService.js +++ /dev/null @@ -1,123 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import Constants from '../Constants'; -import Service from './Service'; -import CheckUtils from '../util/CheckUtils'; -import FilterUtils from '../util/FilterUtils'; -import itemToToken from '../converters/itemToToken'; -import Page from '../vo/Page'; - -/** - * JS representation of the Token Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/token-services - * - * @constructor - */ - -export default { - /** - * Creates new token.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#create-token - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param token NetLicensing.Token - * - * return created token in promise - * @returns {Promise} - */ - async create(context, token) { - const { data: { items: { item: items } } } = await Service - .post(context, Constants.Token.ENDPOINT_PATH, token.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'Token'); - - return itemToToken(item); - }, - - /** - * Gets token by its number..See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#get-token - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the token number - * @param number - * - * return the token in promise - * @returns {Promise} - */ - async get(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .get(context, `${Constants.Token.ENDPOINT_PATH}/${number}`); - - const [item] = items.filter(({ type }) => type === 'Token'); - - return itemToToken(item); - }, - - /** - * Returns tokens of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#tokens-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of token entities or empty array if nothing found. - * @return array - */ - async list(context, filter) { - const queryParams = {}; - - if (filter) { - if (!CheckUtils.isValid(filter)) { - throw new TypeError(`filter has bad value ${filter}`); - } - queryParams[Constants.FILTER] = typeof filter === 'string' ? filter : FilterUtils.encode(filter); - } - - const { data } = await Service - .get(context, Constants.Token.ENDPOINT_PATH, queryParams); - - return Page( - data.items.item.filter(({ type }) => type === 'Token').map((v) => itemToToken(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Delete token by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/token-services#delete-token - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the token number - * @param number string - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - return Service - .delete(context, `${Constants.Token.ENDPOINT_PATH}/${number}`); - }, -}; diff --git a/src/services/TokenService.ts b/src/services/TokenService.ts new file mode 100644 index 0000000..6189624 --- /dev/null +++ b/src/services/TokenService.ts @@ -0,0 +1,164 @@ +/** + * JS representation of the Token Service. See NetLicensingAPI for details: + * https://netlicensing.io/wiki/token-services + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// constants +import Constants from '@/constants'; + +// converters +import itemToToken from '@/converters/itemToToken'; + +// services +import Service from '@/services/Service'; + +// types +import { ItemPagination, NlicResponse } from '@/types/api/response'; +import { TokenProps, Token } from '@/types/entities/Token'; +import { RequestConfig } from '@/types/services/Service'; +import { TokenService } from '@/types/services/TokenService'; +import { Context } from '@/types/vo/Context'; +import { Page as IPage } from '@/types/vo/Page'; + +// utils +import { encode } from '@/utils/filter'; +import { ensureNotEmpty, ensureNotNull } from '@/utils/validation'; + +// vo +import Page from '@/vo/Page'; + +const endpoint = Constants.Token.ENDPOINT_PATH; +const type = Constants.Token.TYPE; + +const tokenService: TokenService = { + /** + * Gets token by its number.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/token-services#get-token + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the token number + * @param number + * + * (optional) service request config + * @param config + * + * return the token in promise + * @returns {Promise} + */ + async get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + const response = await Service.get(context, `${endpoint}/${number}`, {}, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToToken(item); + }, + + /** + * Returns tokens of a vendor.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/token-services#tokens-list + * + * determines the vendor on whose behalf the call is performed + * @param context Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|undefined|null + * + * (optional) service request config + * @param config + * + * array of token entities or empty array if nothing found. + * @return array + */ + async list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>> { + const data: { [Constants.FILTER]: string } = {}; + + if (filter) { + data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter); + } + + const response = await Service.get(context, endpoint, data, config); + const items = response.data.items; + + const list: Token[] | undefined = items?.item.filter((v) => v.type === type).map((v) => itemToToken(v)); + + return Page(list || [], items as ItemPagination); + }, + + /** + * Creates new token.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/token-services#create-token + * + * determines the vendor on whose behalf the call is performed + * @param context Context + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param token Token + * + * (optional) service request config + * @param config + * + * return created token in promise + * @returns {Promise} + */ + async create( + context: Context, + token: Token, + config?: RequestConfig, + ): Promise> { + ensureNotNull(token, 'token'); + + const response = await Service.post(context, endpoint, token.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToToken(item); + }, + + /** + * Delete token by its number.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/token-services#delete-token + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the token number + * @param number string + * + * if true, any entities that depend on the one being deleted will be deleted too + * @param forceCascade boolean + * + * (optional) service request config + * @param config + * + * return boolean state of delete in promise + * @returns {Promise} + */ + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config); + }, +}; + +export default tokenService; diff --git a/src/services/TransactionService.js b/src/services/TransactionService.js deleted file mode 100644 index bc56781..0000000 --- a/src/services/TransactionService.js +++ /dev/null @@ -1,139 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import Constants from '../Constants'; -import Service from './Service'; -import CheckUtils from '../util/CheckUtils'; -import FilterUtils from '../util/FilterUtils'; -import itemToTransaction from '../converters/itemToTransaction'; -import Page from '../vo/Page'; - -/** - * JS representation of the Transaction Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/transaction-services - * - * Transaction is created each time change to LicenseService licenses happens. For instance licenses are - * obtained by a licensee, licenses disabled by vendor, licenses deleted, etc. Transaction is created no matter what - * source has initiated the change to licenses: it can be either a direct purchase of licenses by a licensee via - * NetLicensing Shop, or licenses can be given to a licensee by a vendor. Licenses can also be assigned implicitly by - * NetLicensing if it is defined so by a license model (e.g. evaluation license may be given automatically). All these - * events are reflected in transactions. Of all the transaction handling routines only read-only routines are exposed to - * the public API, as transactions are only allowed to be created and modified by NetLicensing internally. - * - * @constructor - */ - -export default { - /** - * Creates new transaction object with given properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#create-transaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param transaction NetLicensing.Transaction - * - * return the newly created transaction object in promise - * @returns {Promise} - */ - async create(context, transaction) { - const { data: { items: { item: items } } } = await Service - .post(context, Constants.Transaction.ENDPOINT_PATH, transaction.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'Transaction'); - - return itemToTransaction(item); - }, - - /** - * Gets transaction by its number.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#get-transaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the transaction number - * @param number string - * - * return the transaction in promise - * @returns {Promise} - */ - async get(context, number) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .get(context, `${Constants.Transaction.ENDPOINT_PATH}/${number}`); - - const [item] = items.filter(({ type }) => type === 'Transaction'); - - return itemToTransaction(item); - }, - - /** - * Returns all transactions of a vendor.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#transactions-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string - * - * array of transaction entities or empty array if nothing found in promise. - * @returns {Promise} - */ - async list(context, filter) { - const queryParams = {}; - - if (filter) { - if (!CheckUtils.isValid(filter)) { - throw new TypeError(`filter has bad value ${filter}`); - } - queryParams[Constants.FILTER] = typeof filter === 'string' ? filter : FilterUtils.encode(filter); - } - - const { data } = await Service - .get(context, Constants.Transaction.ENDPOINT_PATH, queryParams); - - return Page( - data.items.item.filter(({ type }) => type === 'Transaction').map((v) => itemToTransaction(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Updates transaction properties.See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/transaction-services#update-transaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * transaction number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param transaction NetLicensing.Transaction - * - * return updated transaction in promise. - * @returns {Promise} - */ - async update(context, number, transaction) { - CheckUtils.paramNotEmpty(number, Constants.NUMBER); - - const { data: { items: { item: items } } } = await Service - .post(context, `${Constants.Transaction.ENDPOINT_PATH}/${number}`, transaction.asPropertiesMap()); - - const [item] = items.filter(({ type }) => type === 'Transaction'); - - return itemToTransaction(item); - }, -}; diff --git a/src/services/TransactionService.ts b/src/services/TransactionService.ts new file mode 100644 index 0000000..ab9bf39 --- /dev/null +++ b/src/services/TransactionService.ts @@ -0,0 +1,176 @@ +/** + * JS representation of the Transaction Service. See NetLicensingAPI for details: + * https://netlicensing.io/wiki/transaction-services + * + * Transaction is created each time change to LicenseService licenses happens. For instance licenses are + * obtained by a licensee, licenses disabled by vendor, licenses deleted, etc. Transaction is created no matter what + * source has initiated the change to licenses: it can be either a direct purchase of licenses by a licensee via + * NetLicensing Shop, or licenses can be given to a licensee by a vendor. Licenses can also be assigned implicitly by + * NetLicensing if it is defined so by a license model (e.g. evaluation license may be given automatically). All these + * events are reflected in transactions. Of all the transaction handling routines only read-only routines are exposed to + * the public API, as transactions are only allowed to be created and modified by NetLicensing internally. + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import Constants from '@/constants'; + +// converters +import itemToTransaction from '@/converters/itemToTransaction'; + +// services +import Service from '@/services/Service'; + +// types +import type { ItemPagination } from '@/types/api/response'; +import type { TransactionProps, Transaction } from '@/types/entities/Transaction'; +import type { RequestConfig } from '@/types/services/Service'; +import type { TransactionService } from '@/types/services/TransactionService'; +import type { Context } from '@/types/vo/Context'; +import type { Page as IPage } from '@/types/vo/Page'; + +// utils +import { encode } from '@/utils/filter'; +import { ensureNotEmpty, ensureNotNull } from '@/utils/validation'; + +// vo +import Page from '@/vo/Page'; + +const endpoint = Constants.Transaction.ENDPOINT_PATH; +const type = Constants.Transaction.TYPE; + +const transactionService: TransactionService = { + /** + * Gets transaction by its number.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/transaction-services#get-transaction + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the transaction number + * @param number string + * + * (optional) service request config + * @param config + * + * return the transaction in promise + * @returns {Promise} + */ + async get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + + const response = await Service.get(context, `${endpoint}/${number}`, {}, config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToTransaction(item); + }, + + /** + * Returns all transactions of a vendor.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/transaction-services#transactions-list + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string + * + * (optional) service request config + * @param config + * + * array of transaction entities or empty array if nothing found in promise. + * @returns {Promise} + */ + async list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>> { + const data: { [Constants.FILTER]: string } = {}; + + if (filter) { + data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter); + } + + const response = await Service.get(context, endpoint, data, config); + const items = response.data.items; + + const list: Transaction[] | undefined = items?.item + .filter((v) => v.type === type) + .map((v) => itemToTransaction(v)); + + return Page(list || [], items as ItemPagination); + }, + + /** + * Creates new transaction object with given properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/transaction-services#create-transaction + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param transaction NetLicensing.Transaction + * + * (optional) service request config + * @param config + * + * return the newly created transaction object in promise + * @returns {Promise} + */ + async create( + context: Context, + transaction: Transaction, + config?: RequestConfig, + ): Promise> { + ensureNotNull(transaction, 'transaction'); + + const response = await Service.post(context, endpoint, transaction.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToTransaction(item); + }, + + /** + * Updates transaction properties.See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/transaction-services#update-transaction + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * transaction number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param transaction NetLicensing.Transaction + * + * (optional) service request config + * @param config + * + * return updated transaction in promise. + * @returns {Promise} + */ + async update( + context: Context, + number: string, + transaction: Transaction, + config?: RequestConfig, + ): Promise> { + ensureNotEmpty(number, 'number'); + ensureNotNull(transaction, 'transaction'); + + const response = await Service.post(context, `${endpoint}/${number}`, transaction.serialize(), config); + const item = response.data.items?.item.find((v) => v.type === type); + + return itemToTransaction(item); + }, +}; + +export default transactionService; diff --git a/src/services/UtilityService.js b/src/services/UtilityService.js deleted file mode 100644 index f07fb2c..0000000 --- a/src/services/UtilityService.js +++ /dev/null @@ -1,106 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import Constants from '../Constants'; -import Service from './Service'; -import CheckUtils from '../util/CheckUtils'; -import FilterUtils from '../util/FilterUtils'; -import itemToObject from '../converters/itemToObject'; -import Page from '../vo/Page'; -import itemToCountry from '../converters/itemToCountry'; - -/** - * JS representation of the Utility Service. See NetLicensingAPI for details: - * https://netlicensing.io/wiki/utility-services - * @constructor - */ - -export default { - /** - * Returns all license types. See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/utility-services#license-types-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * array of available license types or empty array if nothing found in promise. - * @returns {Promise} - */ - async listLicenseTypes(context) { - const { data } = await Service - .get(context, `${Constants.Utility.ENDPOINT_PATH}/${Constants.Utility.ENDPOINT_PATH_LICENSE_TYPES}`); - - return Page( - data.items.item.filter(({ type }) => type === 'LicenseType').map((v) => itemToObject(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Returns all license models. See NetLicensingAPI for details: - * @see https://netlicensing.io/wiki/utility-services#licensing-models-list - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * array of available license models or empty array if nothing found in promise. - * @returns {Promise} - */ - async listLicensingModels(context) { - const { data } = await Service - .get(context, `${Constants.Utility.ENDPOINT_PATH}/${Constants.Utility.ENDPOINT_PATH_LICENSING_MODELS}`); - - return Page( - data.items.item.filter(({ type }) => type === 'LicensingModelProperties').map((v) => itemToObject(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, - - /** - * Returns all countries. - * - * determines the vendor on whose behalf the call is performed - * @param context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter - * - * collection of available countries or null/empty list if nothing found in promise. - * @returns {Promise} - */ - async listCountries(context, filter) { - const queryParams = {}; - - if (filter) { - if (!CheckUtils.isValid(filter)) { - throw new TypeError(`filter has bad value ${filter}`); - } - queryParams[Constants.FILTER] = typeof filter === 'string' ? filter : FilterUtils.encode(filter); - } - - const { data } = await Service - .get( - context, - `${Constants.Utility.ENDPOINT_PATH}/${Constants.Utility.ENDPOINT_PATH_COUNTRIES}`, - queryParams, - ); - - return Page( - data.items.item.filter(({ type }) => type === 'Country').map((v) => itemToCountry(v)), - data.items.pagenumber, - data.items.itemsnumber, - data.items.totalpages, - data.items.totalitems, - ); - }, -}; diff --git a/src/services/UtilityService.ts b/src/services/UtilityService.ts new file mode 100644 index 0000000..d1e1c2b --- /dev/null +++ b/src/services/UtilityService.ts @@ -0,0 +1,133 @@ +/** + * JS representation of the Utility Service. See NetLicensingAPI for details: + * https://netlicensing.io/wiki/utility-services + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import Constants from '@/constants'; + +// converters +import itemToCountry from '@/converters/itemToCountry'; +import itemToObject from '@/converters/itemToObject'; + +// services +import Service from '@/services/Service'; + +// types +import { ItemPagination } from '@/types/api/response'; +import { LicenseType } from '@/types/constants/LicenseType'; +import { LicensingModel } from '@/types/constants/LicensingModel'; +import { Country } from '@/types/entities/Country'; +import { RequestConfig } from '@/types/services/Service'; +import { UtilityService } from '@/types/services/UtilityService'; +import { Context } from '@/types/vo/Context'; +import { Page as IPage } from '@/types/vo/Page'; + +// utils +import { encode } from '@/utils/filter'; + +// vo +import Page from '@/vo/Page'; + +const baseEndpoint = Constants.Utility.ENDPOINT_PATH; + +const utilityService: UtilityService = { + /** + * Returns all license types. See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/utility-services#license-types-list + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * (optional) service request config + * @param config + * + * array of available license types or empty array if nothing found in promise. + * @returns {Promise} + */ + async listLicenseTypes(context: Context, config?: RequestConfig): Promise> { + const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_LICENSE_TYPES}`; + + const response = await Service.get(context, endpoint, undefined, config); + const items = response.data.items; + + const type = Constants.Utility.LICENSE_TYPE; + + const licenseTypes: string[] | undefined = items?.item + .filter((v) => v.type === type) + .map((v) => itemToObject<{ name: string }>(v).name); + + return Page((licenseTypes as LicenseType[]) || [], items as ItemPagination); + }, + + /** + * Returns all license models. See NetLicensingAPI for details: + * @see https://netlicensing.io/wiki/utility-services#licensing-models-list + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * (optional) service request config + * @param config + * + * array of available license models or empty array if nothing found in promise. + * @returns {Promise} + */ + async listLicensingModels(context: Context, config?: RequestConfig): Promise> { + const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_LICENSING_MODELS}`; + + const response = await Service.get(context, endpoint, undefined, config); + const items = response.data.items; + + const type = Constants.Utility.LICENSING_MODEL_TYPE; + + const licensingModels: string[] | undefined = items?.item + .filter((v) => v.type === type) + .map((v) => itemToObject<{ name: string }>(v).name); + + return Page((licensingModels as LicensingModel[]) || [], items as ItemPagination); + }, + + /** + * Returns all countries. + * + * determines the vendor on whose behalf the call is performed + * @param context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter + * + * (optional) service request config + * @param config + * + * collection of available countries or null/empty list if nothing found in promise. + * @returns {Promise} + */ + async listCountries( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise> { + const data: { [Constants.FILTER]: string } = {}; + + if (filter) { + data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter); + } + + const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_COUNTRIES}`; + + const response = await Service.get(context, endpoint, data, config); + const items = response.data.items; + + const type = Constants.Utility.COUNTRY_TYPE; + + const countries: Country[] | undefined = items?.item.filter((v) => v.type === type).map((v) => itemToCountry(v)); + + return Page(countries || [], items as ItemPagination); + }, +}; + +export default utilityService; diff --git a/src/types/api/response.ts b/src/types/api/response.ts new file mode 100644 index 0000000..c6a41ea --- /dev/null +++ b/src/types/api/response.ts @@ -0,0 +1,39 @@ +export interface Info { + id: string; + type: 'ERROR' | 'WARNING' | 'INFO'; + value: string; +} + +export interface List { + property: { value: string; name: string }[]; + list: List[]; + name: string; +} + +export interface Item { + property: { value: string; name: string }[]; + list: List[]; + type: string; +} + +export interface ItemPagination { + pagenumber: string | null; + itemsnumber: string | null; + totalpages: string | null; + totalitems: string | null; + hasnext: string | null; +} + +export type Items = { item: Item[] } & ItemPagination; + +export interface NlicResponse { + signature: null | string; + + infos: { + info: Info[]; + }; + + items: Items | null; + + ttl: string | null; +} diff --git a/src/types/constants/ApiKeyRole.ts b/src/types/constants/ApiKeyRole.ts new file mode 100644 index 0000000..2798d6a --- /dev/null +++ b/src/types/constants/ApiKeyRole.ts @@ -0,0 +1,10 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import ApiKeyRoleEnum from '@/constants/ApiKeyRole'; + +export type ApiKeyRoleKeys = keyof typeof ApiKeyRoleEnum; +export type ApiKeyRole = (typeof ApiKeyRoleEnum)[ApiKeyRoleKeys]; diff --git a/src/types/constants/LicenseType.ts b/src/types/constants/LicenseType.ts new file mode 100644 index 0000000..3cc4325 --- /dev/null +++ b/src/types/constants/LicenseType.ts @@ -0,0 +1,10 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import LicenseTypeEnum from '@/constants/LicenseType'; + +export type LicenseTypeKeys = keyof typeof LicenseTypeEnum; +export type LicenseType = (typeof LicenseTypeEnum)[LicenseTypeKeys]; diff --git a/src/types/constants/LicenseeSecretMode.ts b/src/types/constants/LicenseeSecretMode.ts new file mode 100644 index 0000000..efecceb --- /dev/null +++ b/src/types/constants/LicenseeSecretMode.ts @@ -0,0 +1,4 @@ +import LicenseeSecretModeEnum from '@/constants/LicenseeSecretMode'; + +export type LicenseeSecretModeKeys = keyof typeof LicenseeSecretModeEnum; +export type LicenseeSecretMode = (typeof LicenseeSecretModeEnum)[LicenseeSecretModeKeys]; diff --git a/src/types/constants/LicensingModel.ts b/src/types/constants/LicensingModel.ts new file mode 100644 index 0000000..5e6d628 --- /dev/null +++ b/src/types/constants/LicensingModel.ts @@ -0,0 +1,10 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import LicensingModelEnum from '@/constants/LicensingModel'; + +export type LicensingModelKeys = keyof typeof LicensingModelEnum; +export type LicensingModel = (typeof LicensingModelEnum)[LicensingModelKeys]; diff --git a/src/types/constants/NotificationEvent.ts b/src/types/constants/NotificationEvent.ts new file mode 100644 index 0000000..73749c9 --- /dev/null +++ b/src/types/constants/NotificationEvent.ts @@ -0,0 +1,10 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import EventEnum from '@/constants/NotificationEvent'; + +export type NotificationEventKeys = keyof typeof EventEnum; +export type NotificationEvent = (typeof EventEnum)[NotificationEventKeys]; diff --git a/src/types/constants/NotificationProtocol.ts b/src/types/constants/NotificationProtocol.ts new file mode 100644 index 0000000..fe2b819 --- /dev/null +++ b/src/types/constants/NotificationProtocol.ts @@ -0,0 +1,10 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import NotificationProtocolEnum from '@/constants/NotificationProtocol'; + +export type NotificationProtocolKeys = keyof typeof NotificationProtocolEnum; +export type NotificationProtocol = (typeof NotificationProtocolEnum)[NotificationProtocolKeys]; diff --git a/src/types/constants/PaymentMethodEnum.ts b/src/types/constants/PaymentMethodEnum.ts new file mode 100644 index 0000000..780db7d --- /dev/null +++ b/src/types/constants/PaymentMethodEnum.ts @@ -0,0 +1,4 @@ +import PaymentMethod from '@/constants/PaymentMethodEnum'; + +export type PaymentMethodKeys = keyof typeof PaymentMethod; +export type PaymentMethodEnum = (typeof PaymentMethod)[PaymentMethodKeys]; diff --git a/src/types/constants/SecurityMode.ts b/src/types/constants/SecurityMode.ts new file mode 100644 index 0000000..d93c13c --- /dev/null +++ b/src/types/constants/SecurityMode.ts @@ -0,0 +1,4 @@ +import SecurityModeEnum from '@/constants/SecurityMode'; + +export type SecurityModeKeys = keyof typeof SecurityModeEnum; +export type SecurityMode = (typeof SecurityModeEnum)[SecurityModeKeys]; diff --git a/src/types/constants/TimeVolumePeriod.ts b/src/types/constants/TimeVolumePeriod.ts new file mode 100644 index 0000000..6d1c221 --- /dev/null +++ b/src/types/constants/TimeVolumePeriod.ts @@ -0,0 +1,4 @@ +import TimeVolumePeriodEnum from '@/constants/TimeVolumePeriod'; + +export type TimeVolumePeriodKeys = keyof typeof TimeVolumePeriodEnum; +export type TimeVolumePeriod = (typeof TimeVolumePeriodEnum)[TimeVolumePeriodKeys]; diff --git a/src/types/constants/TokenType.ts b/src/types/constants/TokenType.ts new file mode 100644 index 0000000..df72e22 --- /dev/null +++ b/src/types/constants/TokenType.ts @@ -0,0 +1,10 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import TokenTypeEnum from '@/constants/TokenType'; + +export type TokenTypeKeys = keyof typeof TokenTypeEnum; +export type TokenType = (typeof TokenTypeEnum)[TokenTypeKeys]; diff --git a/src/types/constants/TransactionSource.ts b/src/types/constants/TransactionSource.ts new file mode 100644 index 0000000..daf3808 --- /dev/null +++ b/src/types/constants/TransactionSource.ts @@ -0,0 +1,4 @@ +import TransactionSourceEnum from '@/constants/TransactionSource'; + +export type TransactionSourceKeys = keyof typeof TransactionSourceEnum; +export type TransactionSource = (typeof TransactionSourceEnum)[TransactionSourceKeys]; diff --git a/src/types/constants/TransactionStatus.ts b/src/types/constants/TransactionStatus.ts new file mode 100644 index 0000000..26eead1 --- /dev/null +++ b/src/types/constants/TransactionStatus.ts @@ -0,0 +1,4 @@ +import TransactionStatusEnum from '@/constants/TransactionStatus'; + +export type TransactionStatusKeys = keyof typeof TransactionStatusEnum; +export type TransactionStatus = (typeof TransactionStatusEnum)[TransactionStatusKeys]; diff --git a/src/types/entities/Bundle.ts b/src/types/entities/Bundle.ts new file mode 100644 index 0000000..44ffeed --- /dev/null +++ b/src/types/entities/Bundle.ts @@ -0,0 +1,50 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import type { Entity } from '@/types/entities/defineEntity'; + +export type BundleProps = T & { + active?: boolean; + number?: string; + name?: string; + price?: number; + currency?: string; + licenseTemplateNumbers?: string[]; +}; + +export interface BundleMethods { + setActive(active: boolean): void; + + getActive(def?: D): boolean | D; + + setNumber(number: string): void; + + getNumber(def?: D): string | D; + + setName(name: string): void; + + getName(def?: D): string | D; + + setPrice(price: number): void; + + getPrice(def?: D): number | D; + + setCurrency(currency: string): void; + + getCurrency(def?: D): string | D; + + setLicenseTemplateNumbers(numbers: string[]): void; + + getLicenseTemplateNumbers(def?: D): string[] | D; + + addLicenseTemplateNumber(number: string): void; + + removeLicenseTemplateNumber(number: string): void; + + serialize(): Record; +} + +export type Bundle = Entity, BundleMethods>; diff --git a/src/types/entities/Country.ts b/src/types/entities/Country.ts new file mode 100644 index 0000000..4f52f76 --- /dev/null +++ b/src/types/entities/Country.ts @@ -0,0 +1,26 @@ +import { Entity } from '@/types/entities/defineEntity'; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +export interface CountryProps { + readonly code: string; + readonly name: string; + readonly vatPercent?: number; + readonly isEu: boolean; +} + +export interface CountryMethods { + getCode(): string; + + getName(): string; + + getVatPercent(): number; + + getIsEu(): boolean; +} + +export type Country = Entity; diff --git a/src/types/entities/License.ts b/src/types/entities/License.ts new file mode 100644 index 0000000..a437f11 --- /dev/null +++ b/src/types/entities/License.ts @@ -0,0 +1,88 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import type { TimeVolumePeriod } from '@/types/constants/TimeVolumePeriod'; +import type { Entity } from '@/types/entities/defineEntity'; + +export type LicenseProps = { + active?: boolean; + number?: string; + name?: string; + price?: number; + currency?: string; + hidden?: boolean; + licenseeNumber?: string; + licenseTemplateNumber?: string; + + // TimeVolume + timeVolume?: number; + timeVolumePeriod?: TimeVolumePeriod; + startDate?: Date | 'now'; + + // Rental + parentfeature?: string; + + readonly inUse?: boolean; +} & T; + +export interface LicenseMethods { + setActive(active: boolean): void; + + getActive(def?: D): boolean | D; + + setNumber(number: string): void; + + getNumber(def?: D): string | D; + + setName(name: string): void; + + getName(def?: D): string | D; + + setPrice(price: number): void; + + getPrice(def?: D): number | D; + + setCurrency(currency: string): void; + + getCurrency(def?: D): string | D; + + setHidden(hidden: boolean): void; + + getHidden(def?: D): boolean | D; + + setLicenseeNumber(number: string): void; + + getLicenseeNumber(def?: D): string | D; + + setLicenseTemplateNumber(number: string): void; + + getLicenseTemplateNumber(def?: D): string | D; + + // TimeVolume + + setTimeVolume(timeVolume: number): void; + + getTimeVolume(def?: D): number | D; + + setTimeVolumePeriod(timeVolumePeriod: TimeVolumePeriod): void; + + getTimeVolumePeriod(def?: D): TimeVolumePeriod | D; + + setStartDate(startDate: Date | 'now'): void; + + getStartDate(def?: D): Date | 'now' | D; + + // Rental + + setParentfeature(parentfeature?: string): void; + + getParentfeature(def?: D): string | D; + + serialize(): Record; +} + +export type License = Entity, LicenseMethods>; diff --git a/src/types/entities/LicenseTemplate.ts b/src/types/entities/LicenseTemplate.ts new file mode 100644 index 0000000..14f3b68 --- /dev/null +++ b/src/types/entities/LicenseTemplate.ts @@ -0,0 +1,95 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import type { LicenseType } from '@/types/constants/LicenseType'; +import type { TimeVolumePeriod } from '@/types/constants/TimeVolumePeriod'; +import { Entity } from '@/types/entities/defineEntity'; + +export type LicenseTemplateProps = { + active?: boolean; + number?: string; + name?: string; + licenseType?: LicenseType; + price?: number; + currency?: string; + automatic?: boolean; + hidden?: boolean; + hideLicenses?: boolean; + gracePeriod?: boolean; + timeVolume?: number; + timeVolumePeriod?: TimeVolumePeriod; + maxSessions?: number; + quantity?: number; + productModuleNumber?: string; + readonly inUse?: boolean; +} & T; + +export interface LicenseTemplateMethods { + setActive(active: boolean): void; + + getActive(def?: D): boolean | D; + + setNumber(number: string): void; + + getNumber(def?: D): string | D; + + setName(name: string): void; + + getName(def?: D): string | D; + + setLicenseType(type: LicenseType): void; + + getLicenseType(def?: D): LicenseType | D; + + setPrice(price: number): void; + + getPrice(def?: D): number | D; + + setCurrency(currency: string): void; + + getCurrency(def?: D): string | D; + + setAutomatic(automatic: boolean): void; + + getAutomatic(def?: D): boolean | D; + + setHidden(hidden: boolean): void; + + getHidden(def?: D): boolean | D; + + setHideLicenses(hideLicenses: boolean): void; + + getHideLicenses(def?: D): boolean | D; + + setGracePeriod(gradePeriod: boolean): void; + + getGracePeriod(def?: D): boolean | D; + + setTimeVolume(timeVolume: number): void; + + getTimeVolume(def?: D): number | D; + + setTimeVolumePeriod(timeVolumePeriod: TimeVolumePeriod): void; + + getTimeVolumePeriod(def?: D): TimeVolumePeriod | D; + + setMaxSessions(maxSessions: number): void; + + getMaxSessions(def?: D): number | D; + + setQuantity(quantity: number): void; + + getQuantity(def?: D): number | D; + + setProductModuleNumber(productModuleNumber: string): void; + + getProductModuleNumber(def?: D): string | D; + + serialize(): Record; +} + +export type LicenseTemplate = Entity, LicenseTemplateMethods>; diff --git a/src/types/entities/LicenseTransactionJoin.ts b/src/types/entities/LicenseTransactionJoin.ts new file mode 100644 index 0000000..1222bee --- /dev/null +++ b/src/types/entities/LicenseTransactionJoin.ts @@ -0,0 +1,21 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import type { License } from '@/types/entities/License'; +import type { Transaction } from '@/types/entities/Transaction'; + +export interface LicenseTransactionJoin { + transaction: Transaction; + license: License; + + setTransaction(transaction: Transaction): void; + + getTransaction(): Transaction; + + setLicense(license: License): void; + + getLicense(license: License): License; +} diff --git a/src/types/entities/Licensee.ts b/src/types/entities/Licensee.ts new file mode 100644 index 0000000..963fa16 --- /dev/null +++ b/src/types/entities/Licensee.ts @@ -0,0 +1,43 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import type { Entity } from '@/types/entities/defineEntity'; + +export type LicenseeProps = { + active?: boolean; + number?: string; + name?: string; + markedForTransfer?: boolean; + productNumber?: string; + readonly inUse?: boolean; +} & T; + +export interface LicenseeMethods { + setActive(active: boolean): void; + + getActive(def?: D): boolean | D; + + setNumber(number: string): void; + + getNumber(def?: D): string | D; + + setName(name: string): void; + + getName(def?: D): string | D; + + setProductNumber(number: string): void; + + getProductNumber(def?: D): string | D; + + setMarkedForTransfer(mark: boolean): void; + + getMarkedForTransfer(def?: D): boolean | D; + + serialize(): Record; +} + +export type Licensee = Entity, LicenseeMethods>; diff --git a/src/types/entities/Notification.ts b/src/types/entities/Notification.ts new file mode 100644 index 0000000..3c2cdc4 --- /dev/null +++ b/src/types/entities/Notification.ts @@ -0,0 +1,55 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import type { NotificationEvent } from '@/types/constants/NotificationEvent'; +import type { NotificationProtocol } from '@/types/constants/NotificationProtocol'; +import type { Entity } from '@/types/entities/defineEntity'; + +export type NotificationProps = { + active?: boolean; + number?: string; + name?: string; + protocol?: NotificationProtocol; + events?: NotificationEvent[]; + payload?: string; + endpoint?: string; +} & T; + +export interface NotificationMethods { + setActive(active: boolean): void; + + getActive(def?: D): boolean | D; + + setNumber(number: string): void; + + getNumber(def?: D): string | D; + + setName(name: string): void; + + getName(def?: D): string | D; + + setProtocol(protocol: NotificationProtocol): void; + + getProtocol(def?: D): NotificationProtocol | D; + + setEvents(events: NotificationEvent[]): void; + + getEvents(def?: D): NotificationEvent[] | D; + + addEvent(event: NotificationEvent): void; + + setPayload(payload: string): void; + + getPayload(def?: D): string | D; + + setEndpoint(endpoint: string): void; + + getEndpoint(def?: D): string | D; + + serialize(): Record; +} + +export type Notification = Entity, NotificationMethods>; diff --git a/src/types/entities/PaymentMethod.ts b/src/types/entities/PaymentMethod.ts new file mode 100644 index 0000000..b27eed4 --- /dev/null +++ b/src/types/entities/PaymentMethod.ts @@ -0,0 +1,29 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { Entity } from '@/types/entities/defineEntity'; + +export type PaymentMethodProps = T & { + active?: boolean; + number?: string; + 'paypal.subject'?: string; +}; + +export interface PaymentMethodMethods { + setActive(active: boolean): void; + + getActive(def?: D): boolean | D; + + setNumber(number: string): void; + + getNumber(def?: D): string | D; + + setPaypalSubject(subject: string): void; + + getPaypalSubject(def?: D): string | D; +} + +export type PaymentMethod = Entity, PaymentMethodMethods>; diff --git a/src/types/entities/Product.ts b/src/types/entities/Product.ts new file mode 100644 index 0000000..e1342b8 --- /dev/null +++ b/src/types/entities/Product.ts @@ -0,0 +1,67 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +import { Entity } from '@/types/entities/defineEntity'; +import { ProductDiscount } from '@/types/entities/ProductDiscount'; + +export type ProductProps = { + active?: boolean; + number?: string; + name?: string; + version?: string | number; + description?: string; + licensingInfo?: string; + licenseeAutoCreate?: boolean; + discounts?: ProductDiscount[]; + readonly inUse?: boolean; +} & T; + +export interface ProductMethods { + setActive(active: boolean): void; + + getActive(def?: D): boolean | D; + + setNumber(number: string): void; + + getNumber(def?: D): string | D; + + setName(name: string): void; + + getName(def?: D): string | D; + + setVersion(version: string): void; + + getVersion(def?: D): string | number | D; + + setDescription(description: string): void; + + getDescription(def?: D): string | D; + + setLicensingInfo(licensingInfo: string): void; + + getLicensingInfo(def?: D): string | D; + + setLicenseeAutoCreate(licenseeAutoCreate: boolean): void; + + getLicenseeAutoCreate(def?: D): boolean | D; + + setDiscounts(discounts: ProductDiscount[]): void; + + getDiscounts(def?: D): ProductDiscount[] | D; + + addDiscount(discount: ProductDiscount): void; + + removeDiscount(discount: ProductDiscount): void; + + setProductDiscounts(productDiscounts: ProductDiscount[]): void; + + getProductDiscounts(def?: D): ProductDiscount[] | D; + + serialize(): Record; +} + +export type Product = Entity, ProductMethods>; diff --git a/src/types/entities/ProductDiscount.ts b/src/types/entities/ProductDiscount.ts new file mode 100644 index 0000000..1a28060 --- /dev/null +++ b/src/types/entities/ProductDiscount.ts @@ -0,0 +1,36 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { Entity } from '@/types/entities/defineEntity'; + +export interface ProductDiscountProps { + totalPrice?: number; + currency?: string; + amountFix?: number; + amountPercent?: number; +} + +export interface ProductDiscountMethods { + setTotalPrice(totalPrice: number): void; + + getTotalPrice(def?: D): number | D; + + setCurrency(currency: string): void; + + getCurrency(def?: D): string | D; + + setAmountFix(amountFix: number): void; + + getAmountFix(def?: D): number | D; + + setAmountPercent(amountPercent: number): void; + + getAmountPercent(def?: D): number | D; + + toString(): string; +} + +export type ProductDiscount = Entity; diff --git a/src/types/entities/ProductModule.ts b/src/types/entities/ProductModule.ts new file mode 100644 index 0000000..93cbb43 --- /dev/null +++ b/src/types/entities/ProductModule.ts @@ -0,0 +1,59 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import { LicensingModel } from '@/types/constants/LicensingModel'; +import { Entity } from '@/types/entities/defineEntity'; + +export type ProductModuleProps = { + active?: boolean; + number?: string; + name?: string; + licensingModel?: LicensingModel; + maxCheckoutValidity?: number; + yellowThreshold?: number; + redThreshold?: number; + productNumber?: string; + readonly inUse?: boolean; +} & T; + +export interface ProductModuleMethods { + setActive(active: boolean): void; + + getActive(def?: D): boolean | D; + + setNumber(number: string): void; + + getNumber(def?: D): string | D; + + setName(name: string): void; + + getName(def?: D): string | D; + + setLicensingModel(licensingModel: LicensingModel): void; + + getLicensingModel(def?: D): LicensingModel | D; + + setMaxCheckoutValidity(maxCheckoutValidity: number): void; + + getMaxCheckoutValidity(def?: D): number | D; + + setYellowThreshold(yellowThreshold: number): void; + + getYellowThreshold(def?: D): number | D; + + setRedThreshold(redThreshold: number): void; + + getRedThreshold(def?: D): number | D; + + setProductNumber(productNumber: string): void; + + getProductNumber(def?: D): string | D; + + serialize(): Record; +} + +export type ProductModule = Entity, ProductModuleMethods>; diff --git a/src/types/entities/Token.ts b/src/types/entities/Token.ts new file mode 100644 index 0000000..04362b3 --- /dev/null +++ b/src/types/entities/Token.ts @@ -0,0 +1,98 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +// types +import { ApiKeyRole } from '@/types/constants/ApiKeyRole'; +import { TokenType } from '@/types/constants/TokenType'; +import { Entity } from '@/types/entities/defineEntity'; + +export type TokenProps = { + active?: boolean; + number?: string; + expirationTime?: Date; + tokenType?: TokenType; + licenseeNumber?: string; + action?: string; + apiKeyRole?: ApiKeyRole; + bundleNumber?: string; + bundlePrice?: number; + productNumber?: string; + predefinedShoppingItem?: string; + successURL?: string; + successURLTitle?: string; + cancelURL?: string; + cancelURLTitle?: string; + readonly shopURL?: string; +} & T; + +export interface TokenMethods { + setActive(active: boolean): void; + + getActive(def?: D): boolean | D; + + setNumber(number: string): void; + + getNumber(def?: D): string | D; + + setExpirationTime(expirationTime: Date): void; + + getExpirationTime(def?: D): Date | D; + + setTokenType(tokenType: TokenType): void; + + getTokenType(def?: D): TokenType | D; + + setLicenseeNumber(licenseeNumber: string): void; + + getLicenseeNumber(def?: D): string | D; + + setAction(action: string): void; + + getAction(def?: D): string | D; + + setApiKeyRole(apiKeyRole: ApiKeyRole): void; + + getApiKeyRole(def?: D): ApiKeyRole | D; + + setBundleNumber(bundleNumber: string): void; + + getBundleNumber(def?: D): string | D; + + setBundlePrice(bundlePrice: number): void; + + getBundlePrice(def?: D): number | D; + + setProductNumber(productNumber: string): void; + + getProductNumber(def?: D): string | D; + + setPredefinedShoppingItem(predefinedShoppingItem: string): void; + + getPredefinedShoppingItem(def?: D): string | D; + + setSuccessURL(successURL: string): void; + + getSuccessURL(def?: D): string | D; + + setSuccessURLTitle(successURLTitle: string): void; + + getSuccessURLTitle(def?: D): string | D; + + setCancelURL(cancelURL: string): void; + + getCancelURL(def?: D): string | D; + + setCancelURLTitle(cancelURLTitle: string): void; + + getCancelURLTitle(def?: D): string | D; + + getShopURL(def?: D): string | D; + + serialize(): Record; +} + +export type Token = Entity, TokenMethods>; diff --git a/src/types/entities/Transaction.ts b/src/types/entities/Transaction.ts new file mode 100644 index 0000000..1c0195a --- /dev/null +++ b/src/types/entities/Transaction.ts @@ -0,0 +1,91 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import { PaymentMethodEnum } from '@/types/constants/PaymentMethodEnum'; +import { TransactionSource } from '@/types/constants/TransactionSource'; +import { TransactionStatus } from '@/types/constants/TransactionStatus'; +import type { Entity } from '@/types/entities/defineEntity'; +import type { LicenseTransactionJoin } from '@/types/entities/LicenseTransactionJoin'; + +export interface TransactionBaseProps { + active?: boolean; + number?: string; + status?: TransactionStatus; + source?: TransactionSource; + grandTotal?: number; + discount?: number; + currency?: string; + dateCreated?: Date; + dateClosed?: Date; + paymentMethod?: PaymentMethodEnum; + licenseTransactionJoins?: LicenseTransactionJoin[]; +} + +export type TransactionProps = { + active?: boolean; + number?: string; + status?: TransactionStatus; + source?: TransactionSource; + grandTotal?: number; + discount?: number; + currency?: string; + dateCreated?: Date; + dateClosed?: Date; + paymentMethod?: PaymentMethodEnum; + licenseTransactionJoins?: LicenseTransactionJoin[]; + readonly inUse?: boolean; +} & T; + +export interface TransactionMethods { + setActive(active: boolean): void; + + getActive(def?: D): boolean | D; + + setNumber(number: string): void; + + getNumber(def?: D): string | D; + + setStatus(status: TransactionStatus): void; + + getStatus(def?: D): TransactionStatus | D; + + setSource(source: TransactionSource): void; + + getSource(def?: D): TransactionSource | D; + + setGrandTotal(grandTotal: number): void; + + getGrandTotal(def?: D): number | D; + + setDiscount(discount: number): void; + + getDiscount(def?: D): number | D; + + setCurrency(currency: string): void; + + getCurrency(def?: D): string | D; + + setDateCreated(dateCreated: Date): void; + + getDateCreated(def?: D): Date | D; + + setDateClosed(dateCreated: Date): void; + + getDateClosed(def?: D): Date | D; + + setPaymentMethod(paymentMethod: PaymentMethodEnum): void; + + getPaymentMethod(def?: D): PaymentMethodEnum | D; + + setLicenseTransactionJoins(joins: LicenseTransactionJoin[]): void; + + getLicenseTransactionJoins(def?: D): LicenseTransactionJoin[] | D; + + serialize(): Record; +} + +export type Transaction = Entity, TransactionMethods>; diff --git a/src/types/entities/defineEntity.ts b/src/types/entities/defineEntity.ts new file mode 100644 index 0000000..a5b1046 --- /dev/null +++ b/src/types/entities/defineEntity.ts @@ -0,0 +1,34 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +export interface EntityMethods { + set(key: K, value: T[K]): void; + + get(key: K, def?: D): T[K] | D; + + has(key: K): boolean; + + setProperty(key: K, value: T[K]): void; + + addProperty(key: K, value: T[K]): void; + + getProperty(key: K, def?: D): T[K] | D; + + hasProperty(key: K): boolean; + + setProperties(properties: Partial): void; + + serialize(): Record; +} + +export interface Proto { + prototype: object; +} + +export type PropGetEventListener = (obj: T, prop: string | symbol, receiver: unknown) => void; +export type PropSetEventListener = (obj: T, prop: string | symbol, value: unknown, receiver: unknown) => void; + +export type Entity = T & M & EntityMethods; diff --git a/src/types/services/BundleService.ts b/src/types/services/BundleService.ts new file mode 100644 index 0000000..4a22f6d --- /dev/null +++ b/src/types/services/BundleService.ts @@ -0,0 +1,51 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import { AxiosResponse } from 'axios'; +import { NlicResponse } from '@/types/api/response'; +import { Bundle, BundleProps } from '@/types/entities/Bundle'; +import { License, LicenseProps } from '@/types/entities/License'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page } from '@/types/vo/Page'; + +export interface BundleService { + get(context: Context, number: string, config?: RequestConfig): Promise>; + + list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>>; + + create( + context: Context, + bundle: Bundle, + config?: RequestConfig, + ): Promise>; + + update( + context: Context, + number: string, + bundle: Bundle, + config?: RequestConfig, + ): Promise>; + + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise>; + + obtain( + context: Context, + number: string, + licenseeNumber: string, + config?: RequestConfig, + ): Promise[]>; +} diff --git a/src/types/services/LicenseService.ts b/src/types/services/LicenseService.ts new file mode 100644 index 0000000..42ab72b --- /dev/null +++ b/src/types/services/LicenseService.ts @@ -0,0 +1,47 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import { AxiosResponse } from 'axios'; +import { NlicResponse } from '@/types/api/response'; +import { License, LicenseProps } from '@/types/entities/License'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page } from '@/types/vo/Page'; + +export interface LicenseService { + get(context: Context, number: string, config?: RequestConfig): Promise>; + + list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>>; + + create( + context: Context, + licenseeNumber: string | null, + licenseTemplateNumber: string | null, + transactionNumber: string | null, + license: License, + config?: RequestConfig, + ): Promise>; + + update( + context: Context, + number: string, + transactionNumber: string | null, + license: License, + config?: RequestConfig, + ): Promise>; + + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise>; +} diff --git a/src/types/services/LicenseTemplateService.ts b/src/types/services/LicenseTemplateService.ts new file mode 100644 index 0000000..cc5ecca --- /dev/null +++ b/src/types/services/LicenseTemplateService.ts @@ -0,0 +1,49 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// types +import { NlicResponse } from '@/types/api/response'; +import { LicenseTemplate, LicenseTemplateProps } from '@/types/entities/LicenseTemplate'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page } from '@/types/vo/Page'; + +export interface LicenseTemplateService { + get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise>; + + list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>>; + + create( + context: Context, + productModuleNumber: string | null, + licenseTemplate: LicenseTemplate, + config?: RequestConfig, + ): Promise>; + + update( + context: Context, + number: string, + licenseTemplate: LicenseTemplate, + config?: RequestConfig, + ): Promise>; + + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise>; +} diff --git a/src/types/services/LicenseeService.ts b/src/types/services/LicenseeService.ts new file mode 100644 index 0000000..77d2786 --- /dev/null +++ b/src/types/services/LicenseeService.ts @@ -0,0 +1,63 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// types +import { NlicResponse } from '@/types/api/response'; +import { Licensee, LicenseeProps } from '@/types/entities/Licensee'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page } from '@/types/vo/Page'; +import { ValidationParameters } from '@/types/vo/ValidationParameters'; + +// vo +import ValidationResults from '@/vo/ValidationResults'; + +export interface LicenseeService { + get(context: Context, number: string, config?: RequestConfig): Promise>; + + list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>>; + + create( + context: Context, + productNumber: string, + licensee: Licensee, + config?: RequestConfig, + ): Promise>; + + update( + context: Context, + number: string, + licensee: Licensee, + config?: RequestConfig, + ): Promise>; + + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise>; + + validate( + context: Context, + number: string, + parameters?: ValidationParameters, + config?: RequestConfig, + ): Promise; + + transfer( + context: Context, + number: string, + sourceLicenseeNumber: string, + config?: RequestConfig, + ): Promise>; +} diff --git a/src/types/services/NotificationService.ts b/src/types/services/NotificationService.ts new file mode 100644 index 0000000..5f2006e --- /dev/null +++ b/src/types/services/NotificationService.ts @@ -0,0 +1,48 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// types +import { NlicResponse } from '@/types/api/response'; +import { Notification, NotificationProps } from '@/types/entities/Notification'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page } from '@/types/vo/Page'; + +export interface NotificationService { + get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise>; + + list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>>; + + create( + context: Context, + notification: Notification, + config?: RequestConfig, + ): Promise>; + + update( + context: Context, + number: string, + notification: Notification, + config?: RequestConfig, + ): Promise>; + + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise>; +} diff --git a/src/types/services/PaymentMethodService.ts b/src/types/services/PaymentMethodService.ts new file mode 100644 index 0000000..9a5f562 --- /dev/null +++ b/src/types/services/PaymentMethodService.ts @@ -0,0 +1,31 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { PaymentMethod, PaymentMethodProps } from '@/types/entities/PaymentMethod'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page } from '@/types/vo/Page'; + +export interface PaymentMethodService { + get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise>; + + list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>>; + + update( + context: Context, + number: string, + paymentMethod: PaymentMethod, + config?: RequestConfig, + ): Promise>; +} diff --git a/src/types/services/ProductModuleService.ts b/src/types/services/ProductModuleService.ts new file mode 100644 index 0000000..864b7e0 --- /dev/null +++ b/src/types/services/ProductModuleService.ts @@ -0,0 +1,49 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// types +import { NlicResponse } from '@/types/api/response'; +import { ProductModule, ProductModuleProps } from '@/types/entities/ProductModule'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page } from '@/types/vo/Page'; + +export interface ProductModuleService { + get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise>; + + list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>>; + + create( + context: Context, + productNumber: string | null, + productModule: ProductModule, + config?: RequestConfig, + ): Promise>; + + update( + context: Context, + number: string, + productModule: ProductModule, + config?: RequestConfig, + ): Promise>; + + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise>; +} diff --git a/src/types/services/ProductService.ts b/src/types/services/ProductService.ts new file mode 100644 index 0000000..a6f6a5e --- /dev/null +++ b/src/types/services/ProductService.ts @@ -0,0 +1,44 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { AxiosResponse } from 'axios'; + +// types +import { NlicResponse } from '@/types/api/response'; +import { Product, ProductProps } from '@/types/entities/Product'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page } from '@/types/vo/Page'; + +export interface ProductService { + get(context: Context, number: string, config?: RequestConfig): Promise>; + + list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>>; + + create( + context: Context, + product: Product, + config?: RequestConfig, + ): Promise>; + + update( + context: Context, + number: string, + product: Product, + config?: RequestConfig, + ): Promise>; + + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise>; +} diff --git a/src/types/services/Service.ts b/src/types/services/Service.ts new file mode 100644 index 0000000..a3e3b36 --- /dev/null +++ b/src/types/services/Service.ts @@ -0,0 +1,69 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import type { AxiosInstance, AxiosResponse, Method } from 'axios'; +import { Info, NlicResponse } from '@/types/api/response'; +import type { Context } from '@/types/vo/Context'; + +export interface RequestConfig { + onInfo?: (info: Info[]) => void; + onResponse?: (response: AxiosResponse) => void; + axiosInstance?: AxiosInstance; +} + +export interface Service { + setAxiosInstance(this: void, instance: AxiosInstance): void; + + getAxiosInstance(this: void): AxiosInstance; + + // @deprecated use getResponse in RequestConfig + getLastHttpRequestInfo(this: void): AxiosResponse | null; + + // @deprecated use getInfo in RequestConfig + getInfo(this: void): Info[]; + + /** + * this: void + * @param context + * @param endpoint + * @param data + * @param config + */ + get( + this: void, + context: Context, + endpoint: string, + data?: Record, + config?: RequestConfig, + ): Promise>; + + post( + this: void, + context: Context, + endpoint: string, + data?: Record, + config?: RequestConfig, + ): Promise>; + + delete( + this: void, + context: Context, + endpoint: string, + data?: Record, + config?: RequestConfig, + ): Promise>; + + request( + this: void, + context: Context, + method: Method, + endpoint: string, + data?: Record, + config?: RequestConfig, + ): Promise>; + + toQueryString>(data: T): string; +} diff --git a/src/types/services/TokenService.ts b/src/types/services/TokenService.ts new file mode 100644 index 0000000..119b89b --- /dev/null +++ b/src/types/services/TokenService.ts @@ -0,0 +1,34 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +import { AxiosResponse } from 'axios'; + +// types +import { NlicResponse } from '@/types/api/response'; +import { Token, TokenProps } from '@/types/entities/Token'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page } from '@/types/vo/Page'; + +export interface TokenService { + get(context: Context, number: string, config?: RequestConfig): Promise>; + + list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>>; + + create(context: Context, token: Token, config?: RequestConfig): Promise>; + + delete( + context: Context, + number: string, + forceCascade: boolean, + config?: RequestConfig, + ): Promise>; +} diff --git a/src/types/services/TransactionService.ts b/src/types/services/TransactionService.ts new file mode 100644 index 0000000..6ae699e --- /dev/null +++ b/src/types/services/TransactionService.ts @@ -0,0 +1,37 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { Transaction, TransactionProps } from '@/types/entities/Transaction'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page } from '@/types/vo/Page'; + +export interface TransactionService { + get( + context: Context, + number: string, + config?: RequestConfig, + ): Promise>; + + list( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise[]>>; + + create( + context: Context, + transaction: Transaction, + config?: RequestConfig, + ): Promise>; + + update( + context: Context, + number: string, + transaction: Transaction, + config?: RequestConfig, + ): Promise>; +} diff --git a/src/types/services/UtilityService.ts b/src/types/services/UtilityService.ts new file mode 100644 index 0000000..d4b5daa --- /dev/null +++ b/src/types/services/UtilityService.ts @@ -0,0 +1,24 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { LicenseType } from '@/types/constants/LicenseType'; +import { LicensingModel } from '@/types/constants/LicensingModel'; +import { Country } from '@/types/entities/Country'; +import { RequestConfig } from '@/types/services/Service'; +import { Context } from '@/types/vo/Context'; +import { Page } from '@/types/vo/Page'; + +export interface UtilityService { + listLicenseTypes(context: Context, config?: RequestConfig): Promise>; + + listLicensingModels(context: Context, config?: RequestConfig): Promise>; + + listCountries( + context: Context, + filter?: Record | string | null, + config?: RequestConfig, + ): Promise>; +} diff --git a/src/types/vo/Context.ts b/src/types/vo/Context.ts new file mode 100644 index 0000000..6e5d0b4 --- /dev/null +++ b/src/types/vo/Context.ts @@ -0,0 +1,45 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import type { SecurityMode } from '@/types/constants/SecurityMode'; + +export interface ContextConfig { + baseUrl?: string; + securityMode?: SecurityMode; + username?: string; + password?: string; + apiKey?: string; + publicKey?: string; +} + +export interface Context extends ContextConfig { + baseUrl: string; + securityMode: SecurityMode; + + setBaseUrl(baseUrl: string): this; + + getBaseUrl(): string; + + setSecurityMode(securityMode: SecurityMode): this; + + getSecurityMode(): SecurityMode; + + setUsername(username: string): this; + + getUsername(def?: D): string | D; + + setPassword(password: string): this; + + getPassword(def?: D): string | D; + + setApiKey(apiKey: string): this; + + getApiKey(def?: D): string | D; + + setPublicKey(publicKey: string): this; + + getPublicKey(def?: D): string | D; +} diff --git a/src/types/vo/Page.ts b/src/types/vo/Page.ts new file mode 100644 index 0000000..3e4ebc2 --- /dev/null +++ b/src/types/vo/Page.ts @@ -0,0 +1,32 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +export interface Pagination { + pageNumber: number; + itemsNumber: number; + totalPages: number; + totalItems: number; + hasNext: boolean; +} + +export interface PaginationMethods { + getContent(): T; + + getPagination(): Pagination; + + getPageNumber(): number; + + getItemsNumber(): number; + + getTotalPages(): number; + + getTotalItems(): number; + + hasNext(): boolean; +} + +export type Page = PaginationMethods & T; diff --git a/src/types/vo/ValidationParameters.ts b/src/types/vo/ValidationParameters.ts new file mode 100644 index 0000000..2ede450 --- /dev/null +++ b/src/types/vo/ValidationParameters.ts @@ -0,0 +1,60 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +export type Parameter = Record; + +export type Parameters = Record; + +export interface LicenseeProperties { + licenseeName?: string; + licenseeSecret?: string; + + [key: string]: string | undefined; +} + +export interface ValidationParameters { + productNumber?: string; + dryRun?: boolean; + forOfflineUse?: boolean; + licenseeProperties: LicenseeProperties; + parameters: Parameters; + + setProductNumber(productNumber: string): this; + + getProductNumber(): string | undefined; + + setLicenseeName(name: string): this; + + getLicenseeName(): string | undefined; + + setLicenseeSecret(secret: string): this; + + getLicenseeSecret(): string | undefined; + + getLicenseeProperties(): LicenseeProperties; + + setLicenseeProperty(key: string, value: string): this; + + getLicenseeProperty(key: string, def?: D): string | D; + + setForOfflineUse(forOfflineUse: boolean): this; + + isForOfflineUse(): boolean; + + setDryRun(dryRun: boolean): this; + + isDryRun(): boolean; + + setParameter(productModuleNumber: string, parameter: Parameter): this; + + getParameters(): Parameters; + + getParameter(productModuleNumber: string): Parameter | undefined; + + setProductModuleValidationParameters(productModuleNumber: string, productModuleParameters: Parameter): this; + + getProductModuleValidationParameters(productModuleNumber: string): Parameter | undefined; +} diff --git a/src/types/vo/ValidationResults.ts b/src/types/vo/ValidationResults.ts new file mode 100644 index 0000000..bcbecc1 --- /dev/null +++ b/src/types/vo/ValidationResults.ts @@ -0,0 +1,32 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +export interface ProductModuleValidation { + productModuleNumber: string; + + [key: string]: string; +} + +export interface ValidationResult { + readonly validations: Record; + ttl?: Date; + + getValidators(): Record; + + setValidation(validation: ProductModuleValidation): this; + + getValidation(productModuleNumber: string, def?: D): ProductModuleValidation | D; + + setProductModuleValidation(validation: ProductModuleValidation): this; + + getProductModuleValidation(productModuleNumber: string, def?: D): ProductModuleValidation | D; + + setTtl(ttl: Date | string): this; + + getTtl(): Date | undefined; + + toString(): string; +} diff --git a/src/util/CastsUtils.js b/src/util/CastsUtils.js deleted file mode 100644 index 649d338..0000000 --- a/src/util/CastsUtils.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -// Cast an attribute to a native JS type. -export default (key, value) => { - switch (key.trim().toLowerCase()) { - case 'str': - case 'string': - return String(value); - case 'int': - case 'integer': { - const n = parseInt(value, 10); - return Number.isNaN(n) ? value : n; - } - case 'float': - case 'double': { - const n = parseFloat(value); - return Number.isNaN(n) ? value : n; - } - case 'bool': - case 'boolean': - switch (value) { - case 'true': - case 'TRUE': - return true; - case 'false': - case 'FALSE': - return false; - default: - return Boolean(value); - } - case 'date': - return (value === 'now') ? 'now' : new Date(String(value)); - default: - return value; - } -}; diff --git a/src/util/CheckUtils.js b/src/util/CheckUtils.js deleted file mode 100644 index c719ead..0000000 --- a/src/util/CheckUtils.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -export default { - isValid(value) { - let valid = (value !== undefined && typeof value !== 'function'); - if (typeof value === 'number') valid = Number.isFinite(value) && !Number.isNaN(value); - return valid; - }, - - paramNotNull(parameter, parameterName) { - if (!this.isValid(parameter)) throw new TypeError(`Parameter ${parameterName} has bad value ${parameter}`); - if (parameter === null) throw new TypeError(`Parameter ${parameterName} cannot be null`); - }, - - paramNotEmpty(parameter, parameterName) { - if (!this.isValid(parameter)) throw new TypeError(`Parameter ${parameterName} has bad value ${parameter}`); - if (!parameter) throw new TypeError(`Parameter ${parameterName} cannot be null or empty string`); - }, -}; diff --git a/src/util/FilterUtils.js b/src/util/FilterUtils.js deleted file mode 100644 index e0018db..0000000 --- a/src/util/FilterUtils.js +++ /dev/null @@ -1,22 +0,0 @@ -export default { - FILTER_DELIMITER: ';', - FILTER_PAIR_DELIMITER: '=', - encode(filter = {}) { - const query = []; - const has = Object.prototype.hasOwnProperty; - Object.keys(filter).forEach((key) => { - if (has.call(filter, key)) { - query.push(`${key}${this.FILTER_PAIR_DELIMITER}${filter[key]}`); - } - }); - return query.join(this.FILTER_DELIMITER); - }, - decode(query = '') { - const filter = {}; - query.split(this.FILTER_DELIMITER).forEach((v) => { - const [name, value] = v.split(this.FILTER_PAIR_DELIMITER); - filter[name] = value; - }); - return filter; - }, -}; diff --git a/src/utils/filter.ts b/src/utils/filter.ts new file mode 100644 index 0000000..d93d15c --- /dev/null +++ b/src/utils/filter.ts @@ -0,0 +1,27 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +const FILTER_DELIMITER = ';'; +const FILTER_PAIR_DELIMITER = '='; + +export const encode = (filter: Record): string => { + return Object.keys(filter) + .map((key) => `${key}${FILTER_PAIR_DELIMITER}${String(filter[key])}`) + .join(FILTER_DELIMITER); +}; + +export const decode = (filter: string): Record => { + const result: Record = {}; + + filter.split(FILTER_DELIMITER).forEach((v) => { + const [name, value] = v.split(FILTER_PAIR_DELIMITER); + result[name] = value; + }); + + return result; +}; + +export default { encode, decode }; diff --git a/src/utils/helpers.ts b/src/utils/helpers.ts new file mode 100644 index 0000000..3d7f3a7 --- /dev/null +++ b/src/utils/helpers.ts @@ -0,0 +1,17 @@ +export const has = (obj: T, key: K): boolean => { + return Object.hasOwn(obj, key); +}; + +export const set = (obj: T, key: K, value: T[K]): void => { + obj[key] = value; +}; + +export const get = (obj: T, key: K, def?: D): T[K] | D => { + return has(obj, key) ? obj[key] : (def as D); +}; + +export default { + has, + set, + get, +}; diff --git a/src/utils/serialize.ts b/src/utils/serialize.ts new file mode 100644 index 0000000..094d394 --- /dev/null +++ b/src/utils/serialize.ts @@ -0,0 +1,54 @@ +/** + * Converts an object into a map of type Record, where the value of each object property is converted + * to a string. + * If the property's value is `undefined`, it will be replaced with an empty string. + * If the value is already a string, it will remain unchanged. + * If the value is Date instance, it wll be replaced with an ISO format date string. + * For complex types (objects, arrays, etc.), the value will be serialized into a JSON string. + * If serialization fails, the value will be converted to a string using `String()`. + * + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + * + * @param obj - The object to be converted into a map. + * @param options + * @returns A map (Record) with converted property values from the object. + */ +export default (obj: T, options: { ignore?: string[] } = {}): Record => { + const map: Record = {}; + + const { ignore = [] } = options; + + Object.entries(obj).forEach(([k, v]) => { + // ignore keys + if (ignore.includes(k)) { + return; + } + + if (typeof v === 'function') { + // ignore functions + return; + } else if (v === undefined) { + map[k] = ''; // if the value is `undefined`, replace it with an empty string + } else if (typeof v === 'string') { + map[k] = v; // If the value is already a string, leave it unchanged + } else if (v instanceof Date) { + // if the value is Date, convert it to ISO string + map[k] = v.toISOString(); + } else if (typeof v !== 'object' || v === null) { + // If it's not an object (or is null), convert it to string + map[k] = String(v); + } else { + // Try to serialize the object or array into JSON + try { + map[k] = JSON.stringify(v); + } catch { + map[k] = String(v); + } + } + }); + + return map; +}; diff --git a/src/utils/validation.ts b/src/utils/validation.ts new file mode 100644 index 0000000..2a5ca28 --- /dev/null +++ b/src/utils/validation.ts @@ -0,0 +1,47 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +export const isDefined = (value: unknown): boolean => { + return typeof value !== 'undefined' && typeof value !== 'function'; +}; + +export const isValid = (value: unknown): boolean => { + if (!isDefined(value)) { + return false; + } + + if (typeof value === 'number') { + return !Number.isNaN(value); + } + + return true; +}; + +export const ensureNotNull = (value: unknown, name: string): void => { + if (value === null) { + throw new TypeError(`Parameter "${name}" cannot be null.`); + } + + if (!isValid(value)) { + throw new TypeError(`Parameter "${name}" has an invalid value.`); + } +}; + +export const ensureNotEmpty = (value: unknown, name: string): void => { + ensureNotNull(value, name); + + if (!value) { + throw new TypeError(`Parameter "${name}" cannot be empty.`); + } +}; + +export default { + isDefined, + isValid, + ensureNotNull, + ensureNotEmpty, +}; diff --git a/src/vo/Context.js b/src/vo/Context.js deleted file mode 100644 index 12c499c..0000000 --- a/src/vo/Context.js +++ /dev/null @@ -1,237 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ -import Constants from '../Constants'; -import CheckUtils from '../util/CheckUtils'; - -/** - * The context values. - * @type {{}} - * @private - */ -const valuesMap = new WeakMap(); - -/** - * List of values that was defined - * @type {{}} - * @private - */ -const definedMap = new WeakMap(); - -/** - * Context defaults - * @type {{baseUrl: string, securityMode}} - * @private - */ -const defaultsMap = new WeakMap(); - -export default class Context { - constructor(values) { - defaultsMap.set(this, { - baseUrl: 'https://go.netlicensing.io/core/v2/rest', - securityMode: Constants.BASIC_AUTHENTICATION, - }); - - valuesMap.set(this, {}); - - definedMap.set(this, {}); - - this.setValues({ ...defaultsMap.get(this), ...values }); - } - - setBaseUrl(baseUrl) { - return this.setValue('baseUrl', baseUrl); - } - - getBaseUrl(def) { - return this.getValue('baseUrl', def); - } - - setUsername(username) { - return this.setValue('username', username); - } - - getUsername(def) { - return this.getValue('username', def); - } - - setPassword(password) { - return this.setValue('password', password); - } - - getPassword(def) { - return this.getValue('password', def); - } - - setApiKey(apiKey) { - return this.setValue('apiKey', apiKey); - } - - getApiKey(def) { - return this.getValue('apiKey', def); - } - - setSecurityMode(securityMode) { - return this.setValue('securityMode', securityMode); - } - - getSecurityMode(def) { - return this.getValue('securityMode', def); - } - - setVendorNumber(vendorNumber) { - return this.setValue('vendorNumber', vendorNumber); - } - - getVendorNumber(def) { - return this.getValue('vendorNumber', def); - } - - /** - * Set a given values on the context. - * @param key - * @param value - * @returns {Context} - */ - setValue(key, value) { - // check values - if (!CheckUtils.isValid(key) || typeof key === 'object') throw new Error(`Bad value key:${key}`); - if (!CheckUtils.isValid(value)) throw new Error(`Value ${key} has wrong value${value}`); - - // define keys - this.define(key); - - let copedValue = value; - - if (typeof value === 'object' && value !== null) { - copedValue = (Array.isArray(value)) ? Object.assign([], value) : ({ ...value }); - } - - const values = valuesMap.get(this); - values[key] = copedValue; - - return this; - } - - /** - * Set the array of context values. - * @param values - * @returns {Context} - */ - setValues(values) { - this.removeValues(); - - const has = Object.prototype.hasOwnProperty; - - Object.keys(values).forEach((key) => { - if (has.call(values, key)) { - this.setValue(key, values[key]); - } - }); - - return this; - } - - /** - * Get an value from the context. - * @param key - * @param def - * @returns {*} - */ - getValue(key, def) { - return (key in valuesMap.get(this)) - ? valuesMap.get(this)[key] - : def; - } - - /** - * Get all of the current value on the context. - */ - getValues() { - return { ...valuesMap.get(this) }; - } - - /** - * Remove value - * @param key - * @returns {Context} - */ - removeValue(key) { - const values = valuesMap.get(this); - delete values[key]; - - this.removeDefine(key); - return this; - } - - /** - * Remove values - * @param keys - */ - removeValues(keys) { - const keysAr = keys || Object.keys(valuesMap.get(this)); - keysAr.forEach((key) => this.removeValue(key)); - } - - /** - * Define value getter and setter - * @param key - * @param onlyGetter - * @private - */ - define(key, onlyGetter) { - if (this.hasDefine(key)) return; - - if (!CheckUtils.isValid(key) || typeof property === 'object') { - throw new TypeError(`Bad value name:${key}`); - } - - const self = this; - - // delete property - delete this[key]; - - const descriptors = { - enumerable: true, - configurable: true, - get() { - return self.getValue(key); - }, - }; - - if (!onlyGetter) { - descriptors.set = (value) => self.setValue(key, value); - } - - const defined = definedMap.get(this); - defined[key] = true; - - Object.defineProperty(this, key, descriptors); - } - - /** - * Check if value has defined - * @param key - * @private - */ - hasDefine(key) { - return Boolean(definedMap.get(this)[key]); - } - - /** - * Remove value getter and setter - * @param key - * @private - */ - removeDefine(key) { - if (!this.hasDefine(key)) return; - - const defined = definedMap.get(this); - delete defined[key]; - - delete this[key]; - } -} diff --git a/src/vo/Context.ts b/src/vo/Context.ts new file mode 100644 index 0000000..0a8b5e4 --- /dev/null +++ b/src/vo/Context.ts @@ -0,0 +1,85 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import SecurityModeEnum from '@/constants/SecurityMode'; + +// types +import type { SecurityMode } from '@/types/constants/SecurityMode'; +import type { ContextConfig, Context as IContext } from '@/types/vo/Context'; + +class Context implements IContext { + baseUrl: string; + securityMode: SecurityMode; + username?: string; + password?: string; + apiKey?: string; + publicKey?: string; + + constructor(props?: ContextConfig) { + this.baseUrl = props?.baseUrl || 'https://go.netlicensing.io/core/v2/rest'; + this.securityMode = props?.securityMode || SecurityModeEnum.BASIC_AUTHENTICATION; + this.username = props?.username; + this.password = props?.password; + this.apiKey = props?.apiKey; + this.publicKey = props?.publicKey; + } + + setBaseUrl(baseUrl: string): this { + this.baseUrl = baseUrl; + return this; + } + + getBaseUrl(): string { + return this.baseUrl; + } + + setSecurityMode(securityMode: SecurityMode): this { + this.securityMode = securityMode; + return this; + } + + getSecurityMode(): SecurityMode { + return this.securityMode; + } + + setUsername(username: string): this { + this.username = username; + return this; + } + + getUsername(def?: D): string | D { + return (this.username || def) as string | D; + } + + setPassword(password: string): this { + this.password = password; + return this; + } + + getPassword(def?: D): string | D { + return (this.password || def) as string | D; + } + + setApiKey(apiKey: string): this { + this.apiKey = apiKey; + return this; + } + + getApiKey(def?: D): string | D { + return (this.apiKey || def) as string | D; + } + + setPublicKey(publicKey: string): this { + this.publicKey = publicKey; + return this; + } + + getPublicKey(def?: D): string | D { + return (this.publicKey || def) as string | D; + } +} + +export default Context; diff --git a/src/vo/Page.js b/src/vo/Page.js deleted file mode 100644 index 80d6fb6..0000000 --- a/src/vo/Page.js +++ /dev/null @@ -1,38 +0,0 @@ -export default (content = [], pageNumber = 0, itemsNumber = 0, totalPages = 0, totalItems = 0) => { - const paginator = { - getContent() { - return content; - }, - - getPageNumber() { - return pageNumber; - }, - - getItemsNumber() { - return itemsNumber; - }, - - getTotalPages() { - return totalPages; - }, - - getTotalItems() { - return totalItems; - }, - - hasNext() { - return (totalPages > pageNumber + 1); - }, - }; - - const paginatorKeys = Object.keys(paginator); - - return new Proxy(content, { - get(target, key) { - if (paginatorKeys.indexOf(key) !== -1) { - return paginator[key]; - } - return target[key]; - }, - }); -}; diff --git a/src/vo/Page.ts b/src/vo/Page.ts new file mode 100644 index 0000000..e981ae9 --- /dev/null +++ b/src/vo/Page.ts @@ -0,0 +1,71 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +import { ItemPagination } from '@/types/api/response'; +import { Page as IPage, Pagination, PaginationMethods } from '@/types/vo/Page'; + +const Page = function (content: T, pagination?: Partial) { + const pageNumber = parseInt(pagination?.pagenumber || '0', 10); + const itemsNumber = parseInt(pagination?.itemsnumber || '0', 10); + const totalPages = parseInt(pagination?.totalpages || '0', 10); + const totalItems = parseInt(pagination?.totalitems || '0', 10); + + const page: PaginationMethods = { + getContent(): T { + return content; + }, + + getPagination(): Pagination { + return { + pageNumber, + itemsNumber, + totalPages, + totalItems, + hasNext: totalPages > pageNumber + 1, + }; + }, + + getPageNumber(): number { + return pageNumber; + }, + + getItemsNumber(): number { + return itemsNumber; + }, + + getTotalPages(): number { + return totalPages; + }, + + getTotalItems(): number { + return totalItems; + }, + + hasNext(): boolean { + return totalPages > pageNumber + 1; + }, + }; + + return new Proxy(content, { + get(obj: T, prop: string | symbol, receiver) { + if (Object.hasOwn(page, prop)) { + return page[prop as keyof typeof page]; + } + + return Reflect.get(obj, prop, receiver); + }, + + set(obj, prop, value, receiver) { + return Reflect.set(obj, prop, value, receiver); + }, + + getPrototypeOf() { + return (Page.prototype as object) || null; + }, + }) as IPage; +}; + +export default Page; diff --git a/src/vo/ValidationParameters.js b/src/vo/ValidationParameters.js deleted file mode 100644 index 784ea41..0000000 --- a/src/vo/ValidationParameters.js +++ /dev/null @@ -1,149 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -export default class ValidationParameters { - constructor() { - this.parameters = {}; - this.licenseeProperties = {}; - } - - /** - * Sets the target product - * - * optional productNumber, must be provided in case licensee auto-create is enabled - * @param productNumber - * @returns {ValidationParameters} - */ - setProductNumber(productNumber) { - this.productNumber = productNumber; - return this; - } - - /** - * Get the target product - * @returns {*} - */ - getProductNumber() { - return this.productNumber; - } - - /** - * Sets the name for the new licensee - * - * optional human-readable licensee name in case licensee will be auto-created. This parameter must not - * be the name, but can be used to store any other useful string information with new licensees, up to - * 1000 characters. - * @param licenseeName - * @returns {ValidationParameters} - */ - setLicenseeName(licenseeName) { - this.licenseeProperties.licenseeName = licenseeName; - return this; - } - - /** - * Get the licensee name - * @returns {*} - */ - getLicenseeName() { - return this.licenseeProperties.licenseeName; - } - - /** - * Sets the licensee secret - * - * licensee secret stored on the client side. Refer to Licensee Secret documentation for details. - * @param licenseeSecret - * @returns {ValidationParameters} - * @deprecated use 'NodeLocked' licensingModel instead - */ - setLicenseeSecret(licenseeSecret) { - this.licenseeProperties.licenseeSecret = licenseeSecret; - return this; - } - - /** - * Get the licensee secret - * @returns {*} - * @deprecated use 'NodeLocked' licensingModel instead - */ - getLicenseeSecret() { - return this.licenseeProperties.licenseeSecret; - } - - /** - * Get all licensee properties - */ - getLicenseeProperties() { - return this.licenseeProperties; - } - - /** - * Set licensee property - * @param key - * @param value - */ - setLicenseeProperty(key, value) { - this.licenseeProperties[key] = value; - return this; - } - - /** - * Get licensee property - * @param key - */ - getLicenseeProperty(key, def) { - return this.licenseeProperties[key] || def; - } - - /** - * Indicates, that the validation response is intended the offline use - * - * @param forOfflineUse - * if "true", validation response will be extended with data required for the offline use - */ - setForOfflineUse(forOfflineUse) { - this.forOfflineUse = !!forOfflineUse; - return this; - } - - isForOfflineUse() { - return !!this.forOfflineUse; - } - - setDryRun(dryRun) { - this.dryRun = !!dryRun; - return this; - } - - getDryRun(def) { - return this.dryRun || def; - } - - /** - * Get validation parameters - * @returns {*} - */ - getParameters() { - return { ...this.parameters }; - } - - getProductModuleValidationParameters(productModuleNumber) { - return { ...this.parameters[productModuleNumber] }; - } - - setProductModuleValidationParameters(productModuleNumber, productModuleParameters) { - if (this.parameters[productModuleNumber] === undefined - || !Object.keys(this.parameters[productModuleNumber]).length) { - this.parameters[productModuleNumber] = {}; - } - - this.parameters[productModuleNumber] = { ...this.parameters[productModuleNumber], ...productModuleParameters }; - - return this; - } -} diff --git a/src/vo/ValidationParameters.ts b/src/vo/ValidationParameters.ts new file mode 100644 index 0000000..194370b --- /dev/null +++ b/src/vo/ValidationParameters.ts @@ -0,0 +1,107 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import { + ValidationParameters as IValidationParameters, + Parameter, + Parameters, + LicenseeProperties, +} from '@/types/vo/ValidationParameters'; + +class ValidationParameters implements IValidationParameters { + productNumber?: string; + dryRun?: boolean; + forOfflineUse?: boolean; + licenseeProperties: LicenseeProperties; + parameters: Parameters; + + constructor() { + this.parameters = {}; + this.licenseeProperties = {}; + } + + setProductNumber(productNumber: string): this { + this.productNumber = productNumber; + return this; + } + + getProductNumber(): string | undefined { + return this.productNumber; + } + + setLicenseeName(licenseeName: string): this { + this.licenseeProperties.licenseeName = licenseeName; + return this; + } + + getLicenseeName(): string | undefined { + return this.licenseeProperties.licenseeName; + } + + setLicenseeSecret(licenseeSecret: string): this { + this.licenseeProperties.licenseeSecret = licenseeSecret; + return this; + } + + getLicenseeSecret(): string | undefined { + return this.licenseeProperties.licenseeSecret; + } + + getLicenseeProperties(): LicenseeProperties { + return this.licenseeProperties; + } + + setLicenseeProperty(key: string, value: string): this { + this.licenseeProperties[key] = value; + return this; + } + + getLicenseeProperty(key: string, def?: D): string | D { + return (this.licenseeProperties[key] || def) as string | D; + } + + setForOfflineUse(forOfflineUse: boolean): this { + this.forOfflineUse = forOfflineUse; + return this; + } + + isForOfflineUse() { + return !!this.forOfflineUse; + } + + setDryRun(dryRun: boolean): this { + this.dryRun = dryRun; + return this; + } + + isDryRun(): boolean { + return !!this.dryRun; + } + + getParameters(): Parameters { + return this.parameters; + } + + setParameter(productModuleNumber: string, parameter: Parameter): this { + this.parameters[productModuleNumber] = parameter; + return this; + } + + getParameter(productModuleNumber: string): Parameter | undefined { + return this.parameters[productModuleNumber]; + } + + getProductModuleValidationParameters(productModuleNumber: string): Parameter | undefined { + return this.getParameter(productModuleNumber); + } + + setProductModuleValidationParameters(productModuleNumber: string, productModuleParameters: Parameter): this { + return this.setParameter(productModuleNumber, productModuleParameters); + } +} + +export default ValidationParameters; diff --git a/src/vo/ValidationResults.js b/src/vo/ValidationResults.js deleted file mode 100644 index 2353c99..0000000 --- a/src/vo/ValidationResults.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -import CheckUtils from '../util/CheckUtils'; - -export default class ValidationResults { - constructor() { - this.validators = {}; - } - - getValidators() { - return { ...this.validators }; - } - - setProductModuleValidation(productModuleNumber, productModuleValidation) { - if (!CheckUtils.isValid(productModuleNumber) || typeof productModuleNumber === 'object') { - throw new TypeError(`Bad productModuleNumber:${productModuleNumber}`); - } - - this.validators[productModuleNumber] = productModuleValidation; - - return this; - } - - getProductModuleValidation(productModuleNumber) { - if (!CheckUtils.isValid(productModuleNumber) || typeof productModuleNumber === 'object') { - throw new TypeError(`Bad productModuleNumber:${productModuleNumber}`); - } - - return this.validators[productModuleNumber]; - } - - setTtl(ttl) { - if (!CheckUtils.isValid(ttl) || typeof ttl === 'object') { - throw new TypeError(`Bad ttl:${ttl}`); - } - this.ttl = new Date(String(ttl)); - - return this; - } - - getTtl() { - return (this.ttl) ? new Date(this.ttl) : undefined; - } - - toString() { - let data = 'ValidationResult ['; - - const validators = this.getValidators(); - const has = Object.prototype.hasOwnProperty; - - Object.keys(validators).forEach((productModuleNumber) => { - data += `ProductModule<${productModuleNumber}>`; - if (has.call(validators, productModuleNumber)) { - data += JSON.stringify(validators[productModuleNumber]); - } - }); - - data += ']'; - - return data; - } -} diff --git a/src/vo/ValidationResults.ts b/src/vo/ValidationResults.ts new file mode 100644 index 0000000..5a212d8 --- /dev/null +++ b/src/vo/ValidationResults.ts @@ -0,0 +1,72 @@ +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +// types +import { ProductModuleValidation, ValidationResult as IValidationResult } from '@/types/vo/ValidationResults'; + +// utils +import { isValid } from '@/utils/validation'; + +class ValidationResults implements IValidationResult { + readonly validations: Record; + ttl?: Date; + + constructor() { + this.validations = {}; + } + + getValidators(): Record { + return this.validations; + } + + setValidation(validation: ProductModuleValidation): this { + this.validations[validation.productModuleNumber] = validation; + return this; + } + + getValidation(productModuleNumber: string, def?: D): ProductModuleValidation | D { + return this.validations[productModuleNumber] || def; + } + + setProductModuleValidation(validation: ProductModuleValidation): this { + return this.setValidation(validation); + } + + getProductModuleValidation(productModuleNumber: string, def?: D): ProductModuleValidation | D { + return this.getValidation(productModuleNumber, def); + } + + setTtl(ttl: Date | string): this { + if (!isValid(ttl)) { + throw new TypeError(`Bad ttl:${ttl.toString()}`); + } + + this.ttl = new Date(ttl); + return this; + } + + getTtl(): Date | undefined { + return this.ttl; + } + + toString(): string { + let data = 'ValidationResult ['; + + Object.keys(this.validations).forEach((pmNumber) => { + data += `ProductModule<${pmNumber}>`; + + if (pmNumber in this.validations) { + data += JSON.stringify(this.validations[pmNumber]); + } + }); + + data += ']'; + + return data; + } +} + +export default ValidationResults; diff --git a/test/factories/bundle.js b/test/factories/bundle.js deleted file mode 100644 index a85b676..0000000 --- a/test/factories/bundle.js +++ /dev/null @@ -1,12 +0,0 @@ -import faker from 'faker'; -import Bundle from '@/entities/Bundle'; -import factory from './factory'; - -export default factory((data = {}) => new Bundle({ - number: Math.random().toString(36).substr(2, 9), - name: faker.lorem.words(), - active: faker.datatype.boolean(), - custom_property: faker.lorem.words(), - - ...data, -})); diff --git a/test/factories/factory.js b/test/factories/factory.js deleted file mode 100644 index f5aa923..0000000 --- a/test/factories/factory.js +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable no-param-reassign */ -import isPlainObject from 'lodash/isPlainObject'; - -export default (factory) => (count = 1, data = {}) => { - if (isPlainObject(count)) { - data = count; - count = 1; - } - const result = []; - for (let i = 0; i < count; i += 1) { - result.push(factory(data)); - } - - return (result.length === 1) ? result[0] : result; -}; diff --git a/test/factories/license.js b/test/factories/license.js deleted file mode 100644 index 085b021..0000000 --- a/test/factories/license.js +++ /dev/null @@ -1,12 +0,0 @@ -import faker from 'faker'; -import License from '@/entities/License'; -import factory from './factory'; - -export default factory((data = {}) => new License({ - number: Math.random().toString(36).substr(2, 9), - name: faker.name.findName(), - active: faker.datatype.boolean(), - custom_property: faker.lorem.words(), - - ...data, -})); diff --git a/test/factories/licenseTemplate.js b/test/factories/licenseTemplate.js deleted file mode 100644 index b640914..0000000 --- a/test/factories/licenseTemplate.js +++ /dev/null @@ -1,16 +0,0 @@ -import faker from 'faker'; -import LicenseTemplate from '@/entities/LicenseTemplate'; -import factory from './factory'; - -export default factory((data = {}) => new LicenseTemplate({ - number: Math.random().toString(36).substr(2, 9), - name: faker.lorem.words(), - active: faker.datatype.boolean(), - licenseType: 'TIMEVOLUME', - timeVolume: faker.datatype.number({ min: 1, max: 10 }), - price: parseFloat(faker.commerce.price()), - currency: 'EUR', - custom_property: faker.lorem.words(), - - ...data, -})); diff --git a/test/factories/licensee.js b/test/factories/licensee.js deleted file mode 100644 index 155ba4b..0000000 --- a/test/factories/licensee.js +++ /dev/null @@ -1,12 +0,0 @@ -import faker from 'faker'; -import Licensee from '@/entities/Licensee'; -import factory from './factory'; - -export default factory((data = {}) => new Licensee({ - number: Math.random().toString(36).substr(2, 9), - name: faker.lorem.words(), - active: faker.datatype.boolean(), - custom_property: faker.lorem.words(), - - ...data, -})); diff --git a/test/factories/notification.js b/test/factories/notification.js deleted file mode 100644 index 9b968f8..0000000 --- a/test/factories/notification.js +++ /dev/null @@ -1,16 +0,0 @@ -import faker from 'faker'; -import Notification from '@/entities/Notification'; -import factory from './factory'; - -export default factory((data = {}) => new Notification({ - number: Math.random().toString(36).substr(2, 9), - name: faker.lorem.words(), - active: faker.datatype.boolean(), - protocol: Math.round(Math.random()) ? 'WEBHOOK' : 'EMAIL', - events: faker.hacker.verb(), - payload: faker.lorem.sentence(), - endpoint: faker.internet.url(), - custom_property: faker.lorem.words(), - - ...data, -})); diff --git a/test/factories/paymentMethod.js b/test/factories/paymentMethod.js deleted file mode 100644 index a48b9c7..0000000 --- a/test/factories/paymentMethod.js +++ /dev/null @@ -1,12 +0,0 @@ -import faker from 'faker'; -import PaymentMethod from '@/entities/PaymentMethod'; -import factory from './factory'; - -const randomItem = (array) => array[Math.floor(Math.random() * array.length)]; - -export default factory((data = {}) => new PaymentMethod({ - number: randomItem(['PAYPAL', 'PAYPAL_SANDBOX', 'STRIPE']), - active: faker.datatype.boolean(), - - ...data, -})); diff --git a/test/factories/product.js b/test/factories/product.js deleted file mode 100644 index 9ac247f..0000000 --- a/test/factories/product.js +++ /dev/null @@ -1,16 +0,0 @@ -import faker from 'faker'; -import Product from '@/entities/Product'; -import factory from './factory'; - -export default factory((data = {}) => new Product({ - number: Math.random().toString(36).substr(2, 9), - name: faker.lorem.words(), - active: faker.datatype.boolean(), - version: faker.system.semver(), - description: faker.lorem.sentence(), - licensingInfo: faker.lorem.sentence(), - licenseeAutoCreate: faker.datatype.boolean(), - custom_property: faker.lorem.words(), - - ...data, -})); diff --git a/test/factories/productDiscount.js b/test/factories/productDiscount.js deleted file mode 100644 index 7ec9828..0000000 --- a/test/factories/productDiscount.js +++ /dev/null @@ -1,24 +0,0 @@ -import faker from 'faker'; -import ProductDiscount from '@/entities/ProductDiscount'; -import factory from './factory'; - -export const fix = factory((data = {}) => new ProductDiscount({ - totalPrice: faker.commerce.price(50), - currency: 'EUR', - amountFix: faker.datatype.number({ min: 1, max: 10 }), - - ...data, -})); - -export const percent = factory((data = {}) => new ProductDiscount({ - totalPrice: faker.commerce.price(50), - currency: 'EUR', - amountPercent: faker.datatype.number({ min: 1, max: 10 }), - - ...data, -})); - -export default { - fix, - percent, -}; diff --git a/test/factories/productModule.js b/test/factories/productModule.js deleted file mode 100644 index e3ca00c..0000000 --- a/test/factories/productModule.js +++ /dev/null @@ -1,13 +0,0 @@ -import faker from 'faker'; -import ProductModule from '@/entities/ProductModule'; -import factory from './factory'; - -export default factory((data = {}) => new ProductModule({ - number: Math.random().toString(36).substr(2, 9), - name: faker.lorem.words(), - active: faker.datatype.boolean(), - licensingModel: 'Subscription', - custom_property: faker.lorem.words(), - - ...data, -})); diff --git a/test/factories/token.js b/test/factories/token.js deleted file mode 100644 index 51fe3bf..0000000 --- a/test/factories/token.js +++ /dev/null @@ -1,23 +0,0 @@ -import faker from 'faker'; -import Constants from '@/Constants'; -import Token from '@/entities/Token'; -import factory from './factory'; - -const randomItem = (array) => array[Math.floor(Math.random() * array.length)]; - -export default factory((data = {}) => { - const token = new Token({ - number: faker.datatype.uuid(), - active: faker.datatype.boolean(), - expirationTime: faker.date.future(), - tokenType: randomItem(Object.values(Constants.Token.Type)), - - ...data, - }); - - if (!token.licenseeNumber && token.tokenType === Constants.Token.Type.SHOP) { - token.licenseeNumber = faker.datatype.uuid(); - } - - return token; -}); diff --git a/test/factories/transaction.js b/test/factories/transaction.js deleted file mode 100644 index f5e68e8..0000000 --- a/test/factories/transaction.js +++ /dev/null @@ -1,11 +0,0 @@ -import faker from 'faker'; -import Transaction from '@/entities/Transaction'; -import factory from './factory'; - -export default factory((data = {}) => new Transaction({ - number: faker.datatype.uuid(), - source: 'SHOP', - status: 'PENDING', - - ...data, -})); diff --git a/test/factories/utility.js b/test/factories/utility.js deleted file mode 100644 index 33f3813..0000000 --- a/test/factories/utility.js +++ /dev/null @@ -1,16 +0,0 @@ -import factory from './factory'; - -const randomItem = (array) => array[Math.floor(Math.random() * array.length)]; - -export const licenseType = factory(() => ({ - name: randomItem(['FEATURE', 'TIMEVOLUME', 'FLOATING', 'QUANTITY']), -})); - -export const licensingModel = factory(() => ({ - name: randomItem(['TimeLimitedEvaluation', 'TimeVolume', 'FeatureWithTimeVolume']), -})); - -export default { - licenseType, - licensingModel, -}; diff --git a/test/factories/validate.js b/test/factories/validate.js deleted file mode 100644 index 2b5808e..0000000 --- a/test/factories/validate.js +++ /dev/null @@ -1,11 +0,0 @@ -import faker from 'faker'; -import factory from './factory'; - -export default factory((data = {}) => ({ - productModuleNumber: Math.random().toString(36).substr(2, 9), - valid: faker.datatype.boolean(), - expires: faker.date.future(), - licensingModel: 'Subscription', - - ...data, -})); diff --git a/test/index.js b/test/index.js deleted file mode 100644 index a3154af..0000000 --- a/test/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import 'es6-promise/auto'; - -// require all test files (files that ends with .spec.js) -const testsContext = require.context('./specs', true, /\.spec$/); -testsContext.keys().forEach(testsContext); diff --git a/test/karma.conf.js b/test/karma.conf.js deleted file mode 100644 index a240449..0000000 --- a/test/karma.conf.js +++ /dev/null @@ -1,64 +0,0 @@ -// This is a karma config file. For more details see -// http://karma-runner.github.io/0.13/config/configuration-file.html -// we are also using it with karma-webpack -// https://github.com/webpack/karma-webpack -const isDocker = require('is-docker')(); - -const webpackConfig = require('../build/webpack.test.conf.cjs'); - -delete webpackConfig.output; - -const browsers = ['Chrome']; - -if (!isDocker) { - // browsers.push('Firefox'); -} - -module.exports = (config) => { - config.set({ - // to run in additional browsers: - // 1. install corresponding karma launcher - // http://karma-runner.github.io/0.13/config/browsers.html - // 2. add it to the `browsers` array below. - browsers, - customLaunchers: { - Chrome: { - base: 'ChromeHeadless', - // We must disable the Chrome sandbox when running Chrome inside Docker - // Chrome's sandbox needs more permissions than Docker allows by default - flags: isDocker ? ['--no-sandbox'] : [], - }, - }, - - frameworks: ['jasmine', 'webpack'], - - reporters: ['spec'], - - files: [ - './index.js', - ], - - preprocessors: { - './index.js': ['webpack', 'sourcemap'], - }, - - webpack: webpackConfig, - - webpackMiddleware: { - noInfo: true, - }, - - coverageReporter: { - dir: './coverage', - reporters: [ - { - type: 'lcov', - subdir: '.', - }, - { - type: 'text-summary', - }, - ], - }, - }); -}; diff --git a/test/response/Info.js b/test/response/Info.js deleted file mode 100644 index da84508..0000000 --- a/test/response/Info.js +++ /dev/null @@ -1,34 +0,0 @@ -export default class info { - constructor(value, id, type = 'error') { - this.value = value; - this.id = id; - this.type = type; - } - - setValue(value) { - this.value = value; - return this; - } - - getValue() { - return this.value; - } - - setId(id) { - this.id = id; - return this; - } - - getId() { - return this.id; - } - - setType(type) { - this.type = type; - return this; - } - - getType() { - return this.type; - } -} diff --git a/test/response/Item.js b/test/response/Item.js deleted file mode 100644 index 1a94848..0000000 --- a/test/response/Item.js +++ /dev/null @@ -1,52 +0,0 @@ -import _each from 'lodash/each'; -import _castArray from 'lodash/castArray'; -import _isObject from 'lodash/isObject'; - -export default class Item { - constructor(object = {}, type = null) { - this.type = type || object.constructor.name; - this.property = []; - this.list = []; - - const covert = (obj, handler = { property: [], list: [] }) => { - _each(obj, (value, name) => { - if (_isObject(value)) { - _each(_castArray(value), (v) => { - const list = { property: [], list: [], name, type: v.constructor.name }; - handler.list.push(list); - covert(v, list); - }); - return; - } - - const property = { value, name }; - handler.property.push(property); - }); - }; - - if (_isObject(object)) { - covert(object, this); - } - } - - getProperty() { - return this.property; - } - - addProperty(key, value) { - this.property.push(key, value); - return this; - } - - getList() { - return this.list; - } - - setType(type) { - this.type = type; - } - - getType() { - return this.type; - } -} diff --git a/test/response/index.js b/test/response/index.js deleted file mode 100644 index a523490..0000000 --- a/test/response/index.js +++ /dev/null @@ -1,68 +0,0 @@ -import _castArray from 'lodash/castArray'; -import Item from './Item'; -import Info from './Info'; - -export default class Response { - constructor(data = []) { - this.id = null; - this.ttl = null; - this.items = { - item: [], - pagenumber: null, - itemsnumber: null, - totalpages: null, - totalitems: null, - hasnext: null, - }; - this.infos = { info: [] }; - - _castArray(data).forEach((v) => { - if (v instanceof Item) { - this.items.item.push(v); - } else if (v instanceof Info) { - this.infos.info.push(v); - } - }); - - this.setPage(); - } - - addItem(item) { - if (!(item instanceof Item)) { - throw new Error('Expected item to be an instance of the "Item"'); - } - - this.items.item.push(item); - - const page = this.items.pagenumber; - const perPage = this.items.totalitems / this.items.totalpages; - const totalItems = this.items.totalitems; - - this.setPage(page, perPage, totalItems); - - return this; - } - - addInfo(info) { - if (!(info instanceof Info)) { - throw new Error('Expected info to be an instance of the "Info"'); - } - - this.infos.info.push(info); - - return this; - } - - setTTL(ttl) { - this.ttl = ttl; - } - - setPage(page = 0, perPage = 100, totalItems = this.items.item.length) { - this.items.pagenumber = page; - this.items.itemsnumber = this.items.item.length; - this.items.totalpages = Math.ceil(totalItems / perPage); - this.items.totalitems = totalItems; - this.items.hasnext = this.items.totalpages > this.items.pagenumber + 1; - return this; - } -} diff --git a/test/specs/.eslintrc b/test/specs/.eslintrc deleted file mode 100644 index 60d7d15..0000000 --- a/test/specs/.eslintrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "env": { - "jasmine": true - }, - "plugins": [ - "jasmine" - ] -} \ No newline at end of file diff --git a/test/specs/converters/itemToBundle.spec.ts b/test/specs/converters/itemToBundle.spec.ts new file mode 100644 index 0000000..e1e53cf --- /dev/null +++ b/test/specs/converters/itemToBundle.spec.ts @@ -0,0 +1,44 @@ +import { describe, it, expect } from 'vitest'; + +// converters +import itemToBundle from '@/converters/itemToBundle'; + +// entities +import Bundle from '@/entities/Bundle'; + +// types +import { Item } from '@/types/api/response'; +import { BundleProps } from '@/types/entities/Bundle'; + +describe('itemToBundle converter', () => { + it('should correctly convert item to Bundle', () => { + const item: Item = { + property: [ + { value: 'B1', name: 'number' }, + { value: 'true', name: 'active' }, + { value: 'Sample name', name: 'name' }, + { value: '2.99', name: 'price' }, + { value: 'USD', name: 'currency' }, + { value: 'LT1,LT2,LT4', name: 'licenseTemplateNumbers' }, + { value: 'X', name: 'customProperty' }, + ], + list: [], + type: 'Bundle', + }; + + const result = itemToBundle(item); + + const expected: BundleProps<{ customProperty: string }> = { + number: 'B1', + active: true, + name: 'Sample name', + price: 2.99, + currency: 'USD', + licenseTemplateNumbers: ['LT1', 'LT2', 'LT4'], + customProperty: 'X', + }; + + expect(result).toBeInstanceOf(Bundle); + expect(result).toStrictEqual(expected); + }); +}); diff --git a/test/specs/converters/itemToCountry.spec.ts b/test/specs/converters/itemToCountry.spec.ts new file mode 100644 index 0000000..74e8e9f --- /dev/null +++ b/test/specs/converters/itemToCountry.spec.ts @@ -0,0 +1,38 @@ +import { describe, it, expect } from 'vitest'; + +// converters +import itemToCountry from '@/converters/itemToCountry'; + +// entities +import Country from '@/entities/Country'; + +// types +import { Item } from '@/types/api/response'; +import { CountryProps } from '@/types/entities/Country'; + +describe('itemToCountry converter', () => { + it('should correctly convert item to Token', () => { + const item: Item = { + property: [ + { name: 'code', value: 'GE' }, + { name: 'name', value: 'Germany' }, + { name: 'isEu', value: 'true' }, + { name: 'vatPercent', value: '20' }, + ], + list: [], + type: 'Country', + }; + + const result = itemToCountry(item); + + const expected: CountryProps = { + code: 'GE', + name: 'Germany', + vatPercent: 20, + isEu: true, + }; + + expect(result).toBeInstanceOf(Country); + expect(result).toStrictEqual(expected); + }); +}); diff --git a/test/specs/converters/itemToLicense.spec.ts b/test/specs/converters/itemToLicense.spec.ts new file mode 100644 index 0000000..d6e9c8c --- /dev/null +++ b/test/specs/converters/itemToLicense.spec.ts @@ -0,0 +1,58 @@ +import { describe, it, expect } from 'vitest'; + +// converters +import itemToLicense from '@/converters/itemToLicense'; + +// entities +import License from '@/entities/License'; + +// types +import { Item } from '@/types/api/response'; +import { LicenseProps } from '@/types/entities/License'; + +describe('itemToLicense converter', () => { + it('should correctly convert item to License', () => { + const item: Item = { + property: [ + { value: 'L1', name: 'number' }, + { value: 'true', name: 'active' }, + { value: 'Sample name', name: 'name' }, + { value: '3.99', name: 'price' }, + { value: 'EUR', name: 'currency' }, + { value: 'false', name: 'hidden' }, + { value: 'LE1', name: 'licenseeNumber' }, + { value: 'LT1', name: 'licenseTemplateNumber' }, + { value: '10', name: 'timeVolume' }, + { value: 'DAY', name: 'timeVolumePeriod' }, + { value: '2024-01-03T12:00:00.000Z', name: 'startDate' }, + { value: 'PF1', name: 'parentfeature' }, + { value: 'X', name: 'customProperty' }, + { value: 'true', name: 'inUse' }, + ], + list: [], + type: 'License', + }; + + const result = itemToLicense(item); + + const expected: LicenseProps<{ customProperty: string }> = { + number: 'L1', + active: true, + name: 'Sample name', + price: 3.99, + currency: 'EUR', + hidden: false, + licenseeNumber: 'LE1', + licenseTemplateNumber: 'LT1', + timeVolume: 10, + timeVolumePeriod: 'DAY', + parentfeature: 'PF1', + customProperty: 'X', + inUse: true, + }; + + expect(result).toBeInstanceOf(License); + expect(result).toMatchObject(expected); + expect((result.startDate as Date).toISOString()).toBe('2024-01-03T12:00:00.000Z'); + }); +}); diff --git a/test/specs/converters/itemToLicenseTemplate.spec.ts b/test/specs/converters/itemToLicenseTemplate.spec.ts new file mode 100644 index 0000000..4123e0a --- /dev/null +++ b/test/specs/converters/itemToLicenseTemplate.spec.ts @@ -0,0 +1,64 @@ +import { describe, it, expect } from 'vitest'; + +// converters +import itemToLicenseTemplate from '@/converters/itemToLicenseTemplate'; + +// entities +import LicenseTemplate from '@/entities/LicenseTemplate'; + +// types +import { Item } from '@/types/api/response'; +import { LicenseTemplateProps } from '@/types/entities/LicenseTemplate'; + +describe('itemToLicenseTemplate converter', () => { + it('should correctly convert item to LicenseTemplate', () => { + const item: Item = { + property: [ + { name: 'number', value: 'L1' }, + { name: 'active', value: 'true' }, + { name: 'name', value: 'Sample name' }, + { name: 'licenseType', value: 'QUANTITY' }, + { name: 'price', value: '2.99' }, + { name: 'currency', value: 'EUR' }, + { name: 'automatic', value: 'true' }, + { name: 'hidden', value: 'true' }, + { name: 'hideLicenses', value: 'false' }, + { name: 'gracePeriod', value: 'false' }, + { name: 'timeVolume', value: '12' }, + { name: 'timeVolumePeriod', value: 'MONTH' }, + { name: 'maxSessions', value: '3' }, + { name: 'quantity', value: '10' }, + { name: 'productModuleNumber', value: 'PM1' }, + { name: 'customProperty', value: 'X' }, + { name: 'inUse', value: 'false' }, + ], + list: [], + type: 'LicenseTemplate', + }; + + const result = itemToLicenseTemplate(item); + + const expected: LicenseTemplateProps<{ customProperty: string }> = { + number: 'L1', + active: true, + name: 'Sample name', + licenseType: 'QUANTITY', + price: 2.99, + currency: 'EUR', + automatic: true, + hidden: true, + hideLicenses: false, + gracePeriod: false, + timeVolume: 12, + timeVolumePeriod: 'MONTH', + maxSessions: 3, + quantity: 10, + productModuleNumber: 'PM1', + customProperty: 'X', + inUse: false, + }; + + expect(result).toBeInstanceOf(LicenseTemplate); + expect(result).toStrictEqual(expected); + }); +}); diff --git a/test/specs/converters/itemToLicensee.spec.ts b/test/specs/converters/itemToLicensee.spec.ts new file mode 100644 index 0000000..7ac524b --- /dev/null +++ b/test/specs/converters/itemToLicensee.spec.ts @@ -0,0 +1,44 @@ +import { describe, it, expect } from 'vitest'; + +// converters +import itemToLicensee from '@/converters/itemToLicensee'; + +// entities +import Licensee from '@/entities/Licensee'; + +// types +import { Item } from '@/types/api/response'; +import { LicenseeProps } from '@/types/entities/Licensee'; + +describe('itemToLicensee converter', () => { + it('should correctly convert item to Licensee', () => { + const item: Item = { + property: [ + { name: 'number', value: 'L1' }, + { name: 'active', value: 'true' }, + { name: 'name', value: 'Sample name' }, + { name: 'markedForTransfer', value: 'false' }, + { name: 'productNumber', value: 'P1' }, + { name: 'customProperty', value: 'X' }, + { name: 'inUse', value: 'true' }, + ], + list: [], + type: 'Licensee', + }; + + const result = itemToLicensee(item); + + const expected: LicenseeProps<{ customProperty: string }> = { + number: 'L1', + active: true, + name: 'Sample name', + markedForTransfer: false, + productNumber: 'P1', + customProperty: 'X', + inUse: true, + }; + + expect(result).toBeInstanceOf(Licensee); + expect(result).toStrictEqual(expected); + }); +}); diff --git a/test/specs/converters/itemToNotification.spec.ts b/test/specs/converters/itemToNotification.spec.ts new file mode 100644 index 0000000..2e046bc --- /dev/null +++ b/test/specs/converters/itemToNotification.spec.ts @@ -0,0 +1,46 @@ +import { describe, it, expect } from 'vitest'; + +// converters +import itemToNotification from '@/converters/itemToNotification'; + +// entities +import Notification from '@/entities/Notification'; + +// types +import { Item } from '@/types/api/response'; +import { NotificationProps } from '@/types/entities/Notification'; + +describe('itemToNotification converter', () => { + it('should correctly convert item to Notification', () => { + const item: Item = { + property: [ + { name: 'number', value: 'L1' }, + { name: 'active', value: 'true' }, + { name: 'name', value: 'Sample name' }, + { name: 'protocol', value: 'WEBHOOK' }, + { name: 'events', value: 'LICENSEE_CREATED,LICENSE_CREATED' }, + { name: 'payload', value: '{$}' }, + { name: 'endpoint', value: 'http://some-endpoint.test' }, + { name: 'customProperty', value: 'X' }, + ], + list: [], + type: 'Notification', + }; + + const result = itemToNotification(item); + + const expected: NotificationProps<{ customProperty: string }> = { + number: 'L1', + active: true, + name: 'Sample name', + protocol: 'WEBHOOK', + events: ['LICENSEE_CREATED', 'LICENSE_CREATED'], + payload: '{$}', + endpoint: 'http://some-endpoint.test', + customProperty: 'X', + }; + + expect(result).toBeInstanceOf(Notification); + expect(result).toStrictEqual(expected); + }); +}); diff --git a/test/specs/converters/itemToPaymentMethod.spec.ts b/test/specs/converters/itemToPaymentMethod.spec.ts new file mode 100644 index 0000000..74faf46 --- /dev/null +++ b/test/specs/converters/itemToPaymentMethod.spec.ts @@ -0,0 +1,38 @@ +import { describe, it, expect } from 'vitest'; + +// converters +import itemToPaymentMethod from '@/converters/itemToPaymentMethod'; + +// entities +import PaymentMethod from '@/entities/PaymentMethod'; + +// types +import { Item } from '@/types/api/response'; +import { PaymentMethodProps } from '@/types/entities/PaymentMethod'; + +describe('itemToPaymentMethod converter', () => { + it('should correctly convert item to PaymentMethod', () => { + const item: Item = { + property: [ + { name: 'number', value: 'PAYPAL' }, + { name: 'active', value: 'true' }, + { name: 'paypal.subject', value: 'P-SUBJECT' }, + { name: 'customProperty', value: 'X' }, + ], + list: [], + type: 'PaymentMethod', + }; + + const result = itemToPaymentMethod(item); + + const expected: PaymentMethodProps<{ customProperty: string }> = { + number: 'PAYPAL', + active: true, + 'paypal.subject': 'P-SUBJECT', + customProperty: 'X', + }; + + expect(result).toBeInstanceOf(PaymentMethod); + expect(result).toStrictEqual(expected); + }); +}); diff --git a/test/specs/converters/itemToProduct.spec.ts b/test/specs/converters/itemToProduct.spec.ts new file mode 100644 index 0000000..089727f --- /dev/null +++ b/test/specs/converters/itemToProduct.spec.ts @@ -0,0 +1,72 @@ +import { describe, it, expect } from 'vitest'; + +// converters +import itemToProduct from '@/converters/itemToProduct'; + +// entities +import Product from '@/entities/Product'; +import ProductDiscount from '@/entities/ProductDiscount'; + +// types +import { Item } from '@/types/api/response'; +import { ProductProps } from '@/types/entities/Product'; + +describe('itemToProduct converter', () => { + it('should correctly convert item to Product', () => { + const item: Item = { + property: [ + { name: 'number', value: 'P1' }, + { name: 'active', value: 'true' }, + { name: 'name', value: 'Sample name' }, + { name: 'version', value: '1.0-Alfa' }, + { name: 'description', value: 'Sample description' }, + { name: 'licensingInfo', value: 'Licensing info' }, + { name: 'licenseeAutoCreate', value: 'false' }, + { name: 'customProperty', value: 'X' }, + { name: 'inUse', value: 'true' }, + ], + list: [ + { + property: [ + { value: '3000.00', name: 'totalPrice' }, + { value: 'EUR', name: 'currency' }, + { value: '10', name: 'amountPercent' }, + ], + list: [], + name: 'discount', + }, + { + property: [ + { value: '100.00', name: 'totalPrice' }, + { value: 'USD', name: 'currency' }, + { value: '3', name: 'amountFix' }, + ], + list: [], + name: 'discount', + }, + ], + type: 'Product', + }; + + const result = itemToProduct(item); + + const expected: ProductProps<{ customProperty: string }> = { + number: 'P1', + active: true, + name: 'Sample name', + version: '1.0-Alfa', + description: 'Sample description', + licensingInfo: 'Licensing info', + licenseeAutoCreate: false, + discounts: [ + ProductDiscount({ totalPrice: 3000, currency: 'EUR', amountPercent: 10 }), + ProductDiscount({ totalPrice: 100, currency: 'USD', amountFix: 3 }), + ], + customProperty: 'X', + inUse: true, + }; + + expect(result).toBeInstanceOf(Product); + expect(result).toStrictEqual(expected); + }); +}); diff --git a/test/specs/converters/itemToProductModule.spec.ts b/test/specs/converters/itemToProductModule.spec.ts new file mode 100644 index 0000000..8e0c84d --- /dev/null +++ b/test/specs/converters/itemToProductModule.spec.ts @@ -0,0 +1,50 @@ +import { describe, it, expect } from 'vitest'; + +// converters +import itemToProductModule from '@/converters/itemToProductModule'; + +// entities +import ProductModule from '@/entities/ProductModule'; + +// types +import { Item } from '@/types/api/response'; +import { ProductModuleProps } from '@/types/entities/ProductModule'; + +describe('itemToProductModule converter', () => { + it('should correctly convert item to ProductModule', () => { + const item: Item = { + property: [ + { name: 'number', value: 'PM1' }, + { name: 'active', value: 'true' }, + { name: 'name', value: 'Sample name' }, + { name: 'licensingModel', value: 'Subscription' }, + { name: 'maxCheckoutValidity', value: '3' }, + { name: 'yellowThreshold', value: '6' }, + { name: 'redThreshold', value: '10' }, + { name: 'productNumber', value: 'P1' }, + { name: 'customProperty', value: 'X' }, + { name: 'inUse', value: 'true' }, + ], + list: [], + type: 'ProductModule', + }; + + const result = itemToProductModule(item); + + const expected: ProductModuleProps<{ customProperty: string }> = { + number: 'PM1', + active: true, + name: 'Sample name', + licensingModel: 'Subscription', + maxCheckoutValidity: 3, + yellowThreshold: 6, + redThreshold: 10, + productNumber: 'P1', + customProperty: 'X', + inUse: true, + }; + + expect(result).toBeInstanceOf(ProductModule); + expect(result).toStrictEqual(expected); + }); +}); diff --git a/test/specs/converters/itemToToken.spec.ts b/test/specs/converters/itemToToken.spec.ts new file mode 100644 index 0000000..5aef338 --- /dev/null +++ b/test/specs/converters/itemToToken.spec.ts @@ -0,0 +1,64 @@ +import { describe, it, expect } from 'vitest'; + +// converters +import itemToToken from '@/converters/itemToToken'; + +// entities +import Token from '@/entities/Token'; + +// types +import { Item } from '@/types/api/response'; +import { TokenProps } from '@/types/entities/Token'; + +describe('itemToToken converter', () => { + it('should correctly convert item to Token', () => { + const item: Item = { + property: [ + { name: 'number', value: 'T1' }, + { name: 'active', value: 'true' }, + { name: 'expirationTime', value: '2024-01-03T12:00:00.000Z' }, + { name: 'tokenType', value: 'SHOP' }, + { name: 'licenseeNumber', value: 'L1' }, + { name: 'action', value: 'licenseeLogin' }, + { name: 'apiKeyRole', value: 'ROLE_APIKEY_ADMIN' }, + { name: 'bundleNumber', value: 'B1' }, + { name: 'bundlePrice', value: '0.99' }, + { name: 'productNumber', value: 'P1' }, + { name: 'predefinedShoppingItem', value: 'PSI1' }, + { name: 'successURL', value: 'http://some-success-url.test' }, + { name: 'successURLTitle', value: 'Sample of success title' }, + { name: 'cancelURL', value: 'http://some-cancel-url.test' }, + { name: 'cancelURLTitle', value: 'Sample of cancel title' }, + { name: 'shopURL', value: 'http://some-shop-url.test' }, + { name: 'customProperty', value: 'X' }, + ], + list: [], + type: 'Token', + }; + + const result = itemToToken(item); + + const expected: TokenProps<{ customProperty: string }> = { + number: 'T1', + active: true, + tokenType: 'SHOP', + expirationTime: new Date('2024-01-03T12:00:00.000Z'), + licenseeNumber: 'L1', + action: 'licenseeLogin', + apiKeyRole: 'ROLE_APIKEY_ADMIN', + bundleNumber: 'B1', + bundlePrice: 0.99, + productNumber: 'P1', + predefinedShoppingItem: 'PSI1', + successURL: 'http://some-success-url.test', + successURLTitle: 'Sample of success title', + cancelURL: 'http://some-cancel-url.test', + cancelURLTitle: 'Sample of cancel title', + shopURL: 'http://some-shop-url.test', + customProperty: 'X', + }; + + expect(result).toBeInstanceOf(Token); + expect(result).toStrictEqual(expected); + }); +}); diff --git a/test/specs/converters/itemToTransaction.spec.ts b/test/specs/converters/itemToTransaction.spec.ts new file mode 100644 index 0000000..89229f5 --- /dev/null +++ b/test/specs/converters/itemToTransaction.spec.ts @@ -0,0 +1,77 @@ +import { describe, it, expect } from 'vitest'; + +// converters +import itemToTransaction from '@/converters/itemToTransaction'; + +// entities +import License from '@/entities/License'; +import LicenseTransactionJoin from '@/entities/LicenseTransactionJoin'; +import Transaction from '@/entities/Transaction'; + +// types +import type { Item } from '@/types/api/response'; +import type { TransactionProps } from '@/types/entities/Transaction'; + +describe('itemToTransaction converter', () => { + it('should correctly convert item to Transaction', () => { + const item: Item = { + property: [ + { name: 'number', value: 'T1' }, + { name: 'active', value: 'true' }, + { name: 'status', value: 'CLOSED' }, + { name: 'source', value: 'AUTO_LICENSEE_VALIDATE' }, + { name: 'grandTotal', value: '10.99' }, + { name: 'discount', value: '2.99' }, + { name: 'currency', value: 'EUR' }, + { name: 'dateCreated', value: '2025-04-23T13:51:14.024Z' }, + { name: 'dateClosed', value: '2025-04-24T13:51:14.024Z' }, + { name: 'paymentMethod', value: 'PAYPAL' }, + { name: 'customProperty', value: 'X' }, + { name: 'inUse', value: 'true' }, + ], + list: [ + { + property: [ + { name: 'licenseNumber', value: 'L1' }, + { name: 'transactionNumber', value: 'T1' }, + ], + list: [], + name: 'licenseTransactionJoin', + }, + { + property: [ + { name: 'licenseNumber', value: 'L2' }, + { name: 'transactionNumber', value: 'T2' }, + ], + list: [], + name: 'licenseTransactionJoin', + }, + ], + type: 'Transaction', + }; + + const result = itemToTransaction(item); + + const expected: TransactionProps<{ customProperty: string }> = { + number: 'T1', + active: true, + status: 'CLOSED', + source: 'AUTO_LICENSEE_VALIDATE', + grandTotal: 10.99, + discount: 2.99, + currency: 'EUR', + dateCreated: new Date('2025-04-23T13:51:14.024Z'), + dateClosed: new Date('2025-04-24T13:51:14.024Z'), + paymentMethod: 'PAYPAL', + licenseTransactionJoins: [ + new LicenseTransactionJoin(Transaction({ number: 'T1' }), License({ number: 'L1' })), + new LicenseTransactionJoin(Transaction({ number: 'T2' }), License({ number: 'L2' })), + ], + customProperty: 'X', + inUse: true, + }; + + expect(result).toBeInstanceOf(Transaction); + expect(result).toMatchObject(expected); + }); +}); diff --git a/test/specs/entities/Bundle.spec.ts b/test/specs/entities/Bundle.spec.ts new file mode 100644 index 0000000..40dc58c --- /dev/null +++ b/test/specs/entities/Bundle.spec.ts @@ -0,0 +1,166 @@ +import { describe, it, expect } from 'vitest'; + +// entities +import Bundle from '@/entities/Bundle'; + +// test utils +import expectEntity from '@test-utils/expectEntity'; +import expectEntityProp from '@test-utils/expectEntityProp'; + +describe('Bundle', () => { + it('should create a Bundle with default properties', () => { + const bundle = Bundle(); + + expectEntity(bundle, { + active: undefined, + number: undefined, + name: undefined, + price: undefined, + currency: undefined, + licenseTemplateNumbers: undefined, + }); + }); + + it('should create a Bundle with provided properties', () => { + const props = { + active: true, + number: 'B123', + name: 'Sample Name', + price: 66.99, + currency: 'EUR', + licenseTemplateNumbers: ['LT1', 'LT2'], + }; + + const bundle = Bundle(props); + + expectEntity(bundle, props); + expect(bundle).toStrictEqual(props); + }); + + it('should set and get active status correctly', () => { + const bundle = Bundle(); + + bundle.setActive(true); + expectEntityProp(bundle, 'active', true); + + bundle.active = false; + expectEntityProp(bundle, 'active', false); + + bundle.set('active', true); + expectEntityProp(bundle, 'active', true); + + bundle.setProperty('active', true); + expectEntityProp(bundle, 'active', true); + }); + + it('should set and get number correctly', () => { + const bundle = Bundle(); + + bundle.setNumber('B1'); + expectEntityProp(bundle, 'number', 'B1'); + + bundle.number = 'B2'; + expectEntityProp(bundle, 'number', 'B2'); + + bundle.set('number', 'B3'); + expectEntityProp(bundle, 'number', 'B3'); + + bundle.setProperty('number', 'B4'); + expectEntityProp(bundle, 'number', 'B4'); + }); + + it('should set and get name correctly', () => { + const bundle = Bundle(); + + bundle.setName('B1'); + expectEntityProp(bundle, 'name', 'B1'); + + bundle.name = 'B2'; + expectEntityProp(bundle, 'name', 'B2'); + + bundle.set('name', 'B3'); + expectEntityProp(bundle, 'name', 'B3'); + + bundle.setProperty('name', 'B4'); + expectEntityProp(bundle, 'name', 'B4'); + }); + + it('should set and get price correctly', () => { + const bundle = Bundle(); + + bundle.setPrice(66.99); + expectEntityProp(bundle, 'price', 66.99); + + bundle.price = 69.96; + expectEntityProp(bundle, 'price', 69.96); + + bundle.set('price', 96.69); + expectEntityProp(bundle, 'price', 96.69); + + bundle.setProperty('price', 99.66); + expectEntityProp(bundle, 'price', 99.66); + }); + + it('should set and get currency correctly', () => { + const bundle = Bundle(); + + bundle.setCurrency('EUR'); + expectEntityProp(bundle, 'currency', 'EUR'); + + bundle.currency = 'USD'; + expectEntityProp(bundle, 'currency', 'USD'); + + bundle.set('currency', 'UAH'); + expectEntityProp(bundle, 'currency', 'UAH'); + + bundle.setProperty('currency', 'GEL'); + expectEntityProp(bundle, 'currency', 'GEL'); + }); + + it('should set and get license template numbers correctly', () => { + const bundle = Bundle(); + + bundle.setLicenseTemplateNumbers(['LT1', 'LT2']); + expectEntityProp(bundle, 'licenseTemplateNumbers', ['LT1', 'LT2']); + + bundle.licenseTemplateNumbers = ['LT3']; + expectEntityProp(bundle, 'licenseTemplateNumbers', ['LT3']); + + bundle.set('licenseTemplateNumbers', ['LT4', 'LT5']); + expectEntityProp(bundle, 'licenseTemplateNumbers', ['LT4', 'LT5']); + + bundle.setProperty('licenseTemplateNumbers', ['LT6']); + expectEntityProp(bundle, 'licenseTemplateNumbers', ['LT6']); + }); + + it('should allow custom properties', () => { + const customBundle = Bundle({ number: 'B999', foo: 'bar', isFooBar: true }); + expect(customBundle.foo).toBe('bar'); + expect(customBundle.isFooBar).toBe(true); + }); + + it('should create an instance of Bundle', () => { + const bundle = Bundle(); + expect(bundle instanceof Bundle).toBe(true); + }); + + it('should be correct map', () => { + const bundle = Bundle({ + active: true, + number: 'B123', + name: 'Sample Name', + price: 66.99, + currency: 'EUR', + licenseTemplateNumbers: ['LT1', 'LT2'], + }); + + expect(bundle.serialize()).toStrictEqual({ + active: 'true', + number: 'B123', + name: 'Sample Name', + price: '66.99', + currency: 'EUR', + licenseTemplateNumbers: 'LT1,LT2', + }); + }); +}); diff --git a/test/specs/entities/Country.spec.js b/test/specs/entities/Country.spec.js deleted file mode 100644 index a5de459..0000000 --- a/test/specs/entities/Country.spec.js +++ /dev/null @@ -1,133 +0,0 @@ -import Country from '@/entities/Country'; - -describe('entities/Country', () => { - let country; - - beforeEach(() => { - country = new Country(); - }); - - it('check "code" property setters/getters', () => { - country.setProperty('code', 'DE'); - expect(country.getProperty('code')).toBe('DE'); - expect(country.getCode()).toBe('DE'); - expect(country.code).toBe('DE'); - - country.setCode('BY'); - expect(country.getProperty('code')).toBe('BY'); - expect(country.getCode()).toBe('BY'); - expect(country.code).toBe('BY'); - - country.code = 'UA'; - expect(country.getProperty('code')).toBe('UA'); - expect(country.getCode()).toBe('UA'); - expect(country.code).toBe('UA'); - }); - - it('check "name" property setters/getters', () => { - country.setProperty('name', 'name_0'); - expect(country.getProperty('name')).toBe('name_0'); - expect(country.getName()).toBe('name_0'); - expect(country.name).toBe('name_0'); - - country.setName('name_1'); - expect(country.getProperty('name')).toBe('name_1'); - expect(country.getName()).toBe('name_1'); - expect(country.name).toBe('name_1'); - - country.name = 'name_2'; - expect(country.getProperty('name')).toBe('name_2'); - expect(country.getName()).toBe('name_2'); - expect(country.name).toBe('name_2'); - }); - - it('check "vatPercent" property setters/getters', () => { - country.setProperty('vatPercent', 10); - expect(country.getProperty('vatPercent')).toBe(10); - expect(country.getVatPercent()).toBe(10); - expect(country.vatPercent).toBe(10); - - country.setVatPercent(20); - expect(country.getProperty('vatPercent')).toBe(20); - expect(country.getVatPercent()).toBe(20); - expect(country.vatPercent).toBe(20); - - country.vatPercent = 30; - expect(country.getProperty('vatPercent')).toBe(30); - expect(country.getVatPercent()).toBe(30); - expect(country.vatPercent).toBe(30); - }); - - it('check "isEu" property setters/getters', () => { - country.setProperty('isEu', true); - expect(country.getProperty('isEu')).toBe(true); - expect(country.getIsEu()).toBe(true); - expect(country.isEu).toBe(true); - - country.setIsEu(false); - expect(country.getProperty('isEu')).toBe(false); - expect(country.getIsEu()).toBe(false); - expect(country.isEu).toBe(false); - - country.isEu = true; - expect(country.getProperty('isEu')).toBe(true); - expect(country.getIsEu()).toBe(true); - expect(country.isEu).toBe(true); - }); - - it('check cast an properties to a native js type', () => { - country.setProperty('code', 1); - expect(country.getProperty('code')).toBe('1'); - country.setProperty('code', true); - expect(country.getProperty('code')).toBe('true'); - - country.setProperty('name', 1); - expect(country.getProperty('name')).toBe('1'); - country.setProperty('name', true); - expect(country.getProperty('name')).toBe('true'); - - country.setProperty('vatPercent', '015'); - expect(country.getProperty('vatPercent')).toBe(15); - country.setProperty('vatPercent', 15.99); - expect(country.getProperty('vatPercent')).toBe(15); - country.setProperty('vatPercent', '15*3'); - expect(country.getProperty('vatPercent')).toBe(15); - country.setProperty('vatPercent', '15e2'); - expect(country.getProperty('vatPercent')).toBe(15); - - country.setProperty('isEu', 1); - expect(country.getProperty('isEu')).toBe(true); - country.setProperty('isEu', 0); - expect(country.getProperty('isEu')).toBe(false); - country.setProperty('isEu', ''); - expect(country.getProperty('isEu')).toBe(false); - country.setProperty('isEu', '123'); - expect(country.getProperty('isEu')).toBe(true); - country.setProperty('isEu', null); - expect(country.getProperty('isEu')).toBe(false); - }); - - it('check "removeProperty" method', () => { - country.setProperty('code', 'EU'); - country.removeProperty('code'); - - expect(country.getProperty('code')).toBe(undefined); - expect(country.code).toBe(undefined); - expect(country.getCode()).toBe(undefined); - }); - - it('check "removeDefine" method', () => { - country.setProperty('code', 'EU'); - country.removeDefine('code'); - - expect(country.code).toBe(undefined); - expect(country.getProperty('code')).toBe('EU'); - expect(country.getCode()).toBe('EU'); - - country.code = 'DE'; - - expect(country.code).toBe('DE'); - expect(country.getProperty('code')).toBe('EU'); - expect(country.getCode()).toBe('EU'); - }); -}); diff --git a/test/specs/entities/Country.spec.ts b/test/specs/entities/Country.spec.ts new file mode 100644 index 0000000..c5bf781 --- /dev/null +++ b/test/specs/entities/Country.spec.ts @@ -0,0 +1,42 @@ +import { describe, it, expect } from 'vitest'; + +// entities +import Country from '@/entities/Country'; + +// test utils +import expectEntity from '@test-utils/expectEntity'; + +describe('Country Entity', () => { + it('should create a Country with default values', () => { + const country = Country(); + + expectEntity(country, { + code: '', + name: '', + vatPercent: 0, + isEu: false, + }); + }); + + it('should create a Country with provided properties', () => { + const countryProps = { + code: 'US', + name: 'United States', + vatPercent: 7, + isEu: false, + }; + const country = Country(countryProps); + + expectEntity(country, { + code: 'US', + name: 'United States', + vatPercent: 7, + isEu: false, + }); + }); + + it('should create an instance of Country', () => { + const country = Country(); + expect(country instanceof Country).toBe(true); + }); +}); diff --git a/test/specs/entities/License.spec.js b/test/specs/entities/License.spec.js deleted file mode 100644 index 7c75d32..0000000 --- a/test/specs/entities/License.spec.js +++ /dev/null @@ -1,234 +0,0 @@ -import License from '@/entities/License'; - -describe('entities/License', () => { - let license; - - beforeEach(() => { - license = new License(); - }); - - it('check "number" property setters/getters', () => { - license.setProperty('number', 'number_0'); - expect(license.getProperty('number')).toBe('number_0'); - expect(license.getNumber()).toBe('number_0'); - expect(license.number).toBe('number_0'); - - license.setNumber('number_1'); - expect(license.getProperty('number')).toBe('number_1'); - expect(license.getNumber()).toBe('number_1'); - expect(license.number).toBe('number_1'); - - license.number = 'number_2'; - expect(license.getProperty('number')).toBe('number_2'); - expect(license.getNumber()).toBe('number_2'); - expect(license.number).toBe('number_2'); - }); - - it('check "name" property setters/getters', () => { - license.setProperty('name', 'name_0'); - expect(license.getProperty('name')).toBe('name_0'); - expect(license.getName()).toBe('name_0'); - expect(license.name).toBe('name_0'); - - license.setName('name_1'); - expect(license.getProperty('name')).toBe('name_1'); - expect(license.getName()).toBe('name_1'); - expect(license.name).toBe('name_1'); - - license.name = 'name_2'; - expect(license.getProperty('name')).toBe('name_2'); - expect(license.getName()).toBe('name_2'); - expect(license.name).toBe('name_2'); - }); - - it('check "active" property setters/getters', () => { - license.setProperty('active', true); - expect(license.getProperty('active')).toBe(true); - expect(license.getActive()).toBe(true); - expect(license.active).toBe(true); - - license.setActive(false); - expect(license.getProperty('active')).toBe(false); - expect(license.getActive()).toBe(false); - expect(license.active).toBe(false); - - license.active = true; - expect(license.getProperty('active')).toBe(true); - expect(license.getActive()).toBe(true); - expect(license.active).toBe(true); - }); - - it('check "parentfeature" property setters/getters', () => { - license.setProperty('parentfeature', 'parentfeature_0'); - expect(license.getProperty('parentfeature')).toBe('parentfeature_0'); - expect(license.getParentfeature()).toBe('parentfeature_0'); - expect(license.parentfeature).toBe('parentfeature_0'); - - license.setParentfeature('parentfeature_1'); - expect(license.getProperty('parentfeature')).toBe('parentfeature_1'); - expect(license.getParentfeature()).toBe('parentfeature_1'); - expect(license.parentfeature).toBe('parentfeature_1'); - - license.parentfeature = 'parentfeature_2'; - expect(license.getProperty('parentfeature')).toBe('parentfeature_2'); - expect(license.getParentfeature()).toBe('parentfeature_2'); - expect(license.parentfeature).toBe('parentfeature_2'); - }); - - it('check "timeVolume" property setters/getters', () => { - license.setProperty('timeVolume', 1); - expect(license.getProperty('timeVolume')).toBe(1); - expect(license.getTimeVolume()).toBe(1); - expect(license.timeVolume).toBe(1); - - license.setTimeVolume(2); - expect(license.getProperty('timeVolume')).toBe(2); - expect(license.getTimeVolume()).toBe(2); - expect(license.timeVolume).toBe(2); - - license.timeVolume = 3; - expect(license.getProperty('timeVolume')).toBe(3); - expect(license.getTimeVolume()).toBe(3); - expect(license.timeVolume).toBe(3); - }); - - it('check "startDate" property setters/getters', () => { - license.setProperty('startDate', new Date('2055-01-01')); - expect(license.getProperty('startDate').toISOString()).toBe(new Date('2055-01-01').toISOString()); - expect(license.getStartDate().toISOString()).toBe(new Date('2055-01-01').toISOString()); - expect(license.startDate.toISOString()).toBe(new Date('2055-01-01').toISOString()); - - license.setStartDate(new Date('2055-01-02')); - expect(license.getProperty('startDate').toISOString()).toBe(new Date('2055-01-02').toISOString()); - expect(license.getStartDate().toISOString()).toBe(new Date('2055-01-02').toISOString()); - expect(license.startDate.toISOString()).toBe(new Date('2055-01-02').toISOString()); - - license.startDate = new Date('2055-01-03'); - expect(license.getProperty('startDate').toISOString()).toBe(new Date('2055-01-03').toISOString()); - expect(license.getStartDate().toISOString()).toBe(new Date('2055-01-03').toISOString()); - expect(license.startDate.toISOString()).toBe(new Date('2055-01-03').toISOString()); - }); - - it('check "price" property getters', () => { - license.setProperty('price', 100); - expect(license.getProperty('price')).toBe(100); - expect(license.getPrice()).toBe(100); - expect(license.price).toBe(100); - }); - - it('check "currency" property getters', () => { - license.setProperty('currency', 'EUR'); - expect(license.getProperty('currency')).toBe('EUR'); - expect(license.getCurrency()).toBe('EUR'); - expect(license.currency).toBe('EUR'); - }); - - it('check "inUse" property setters/getters', () => { - license.setProperty('inUse', true); - expect(license.getProperty('inUse')).toBe(true); - expect(license.getInUse()).toBe(true); - expect(license.inUse).toBe(true); - }); - - it('check "custom-property" property setters/getters', () => { - license.setProperty('custom_property', 'my_custom_property_0'); - expect(license.getProperty('custom_property')).toBe('my_custom_property_0'); - expect(license.custom_property).toBe('my_custom_property_0'); - - license.custom_property = 'my_custom_property_1'; - expect(license.getProperty('custom_property')).toBe('my_custom_property_1'); - expect(license.custom_property).toBe('my_custom_property_1'); - }); - - it('check cast an properties to a native js type', () => { - license.setProperty('number', 1); - expect(license.getProperty('number')).toBe('1'); - license.setProperty('number', true); - expect(license.getProperty('number')).toBe('true'); - - license.setProperty('active', 1); - expect(license.getProperty('active')).toBe(true); - license.setProperty('active', 0); - expect(license.getProperty('active')).toBe(false); - license.setProperty('active', ''); - expect(license.getProperty('active')).toBe(false); - license.setProperty('active', '123'); - expect(license.getProperty('active')).toBe(true); - license.setProperty('active', null); - expect(license.getProperty('active')).toBe(false); - - license.setProperty('startDate', '2055-01-01'); - expect(license.getProperty('startDate') instanceof Date).toBe(true); - license.setProperty('startDate', new Date()); - expect(license.getProperty('startDate') instanceof Date).toBe(true); - - license.setProperty('name', 1); - expect(license.getProperty('name')).toBe('1'); - license.setProperty('name', true); - expect(license.getProperty('name')).toBe('true'); - - license.setProperty('price', '3.14'); - expect(license.getProperty('price')).toBe(3.14); - - license = new License(); - license.setProperty('price', '314e-2'); - expect(license.getProperty('price')).toBe(3.14); - - license = new License(); - license.setProperty('price', '0.0314E+2'); - expect(license.getProperty('price')).toBe(3.14); - - license = new License(); - license.setProperty('price', '3.14any non-numeric characters'); - expect(license.getProperty('price')).toBe(3.14); - - license.setProperty('hidden', 1); - expect(license.getProperty('hidden')).toBe(true); - license.setProperty('hidden', 0); - expect(license.getProperty('hidden')).toBe(false); - license.setProperty('hidden', ''); - expect(license.getProperty('hidden')).toBe(false); - license.setProperty('hidden', '123'); - expect(license.getProperty('hidden')).toBe(true); - license.setProperty('hidden', null); - expect(license.getProperty('hidden')).toBe(false); - - license.setProperty('parentfeature', 1); - expect(license.getProperty('parentfeature')).toBe('1'); - license.setProperty('parentfeature', true); - expect(license.getProperty('parentfeature')).toBe('true'); - - license.setProperty('timeVolume', '015'); - expect(license.getProperty('timeVolume')).toBe(15); - license.setProperty('timeVolume', 15.99); - expect(license.getProperty('timeVolume')).toBe(15); - license.setProperty('timeVolume', '15*3'); - expect(license.getProperty('timeVolume')).toBe(15); - license.setProperty('timeVolume', '15e2'); - expect(license.getProperty('timeVolume')).toBe(15); - }); - - it('check "removeProperty" method', () => { - license.setProperty('number', 'number'); - license.removeProperty('number'); - - expect(license.getProperty('number')).toBe(undefined); - expect(license.number).toBe(undefined); - expect(license.getNumber()).toBe(undefined); - }); - - it('check "removeDefine" method', () => { - license.setProperty('number', 'number'); - license.removeDefine('number'); - - expect(license.number).toBe(undefined); - expect(license.getProperty('number')).toBe('number'); - expect(license.getNumber()).toBe('number'); - - license.number = 'number_1'; - - expect(license.number).toBe('number_1'); - expect(license.getProperty('number')).toBe('number'); - expect(license.getNumber()).toBe('number'); - }); -}); diff --git a/test/specs/entities/License.spec.ts b/test/specs/entities/License.spec.ts new file mode 100644 index 0000000..e466b2e --- /dev/null +++ b/test/specs/entities/License.spec.ts @@ -0,0 +1,301 @@ +import { describe, it, expect } from 'vitest'; +// constants +import TimeVolumePeriod from '@/constants/TimeVolumePeriod'; + +// entities +import License from '@/entities/License'; + +// test utils +import { LicenseProps } from '@/types/entities/License'; +import expectEntity from '@test-utils/expectEntity'; +import expectEntityProp from '@test-utils/expectEntityProp'; + +describe('License Entity', () => { + it('should create a License with default properties', () => { + const license = License(); + + expectEntity(license, { + active: undefined, + number: undefined, + name: undefined, + price: undefined, + currency: undefined, + hidden: undefined, + licenseeNumber: undefined, + licenseTemplateNumber: undefined, + timeVolume: undefined, + timeVolumePeriod: undefined, + startDate: undefined, + inUse: undefined, + }); + }); + + it('should create a License with provided properties', () => { + const props: LicenseProps = { + number: '12345', + name: 'Sample License', + price: 100, + currency: 'USD', + active: true, + hidden: false, + licenseeNumber: 'ABC123', + licenseTemplateNumber: 'TPL001', + timeVolume: 50, + timeVolumePeriod: TimeVolumePeriod.DAY, + startDate: 'now', + parentfeature: 'PARENT123', + inUse: true, + }; + + const license = License(props); + + expectEntity(license, props); + expect(license).toStrictEqual(props); + }); + + it('should set and get active status correctly', () => { + const license = License(); + + license.setActive(true); + expectEntityProp(license, 'active', true); + + license.active = false; + expectEntityProp(license, 'active', false); + + license.set('active', true); + expectEntityProp(license, 'active', true); + + license.setProperty('active', false); + expectEntityProp(license, 'active', false); + }); + + it('should set and get number correctly', () => { + const license = License(); + + license.setNumber('L1'); + expectEntityProp(license, 'number', 'L1'); + + license.number = 'L2'; + expectEntityProp(license, 'number', 'L2'); + + license.set('number', 'L3'); + expectEntityProp(license, 'number', 'L3'); + + license.setProperty('number', 'L4'); + expectEntityProp(license, 'number', 'L4'); + }); + + it('should set and get name correctly', () => { + const license = License(); + + license.setName('Name 1'); + expectEntityProp(license, 'name', 'Name 1'); + + license.name = 'Name 2'; + expectEntityProp(license, 'name', 'Name 2'); + + license.set('name', 'Name 3'); + expectEntityProp(license, 'name', 'Name 3'); + + license.setProperty('name', 'Name 4'); + expectEntityProp(license, 'name', 'Name 4'); + }); + + it('should set and get price correctly', () => { + const license = License(); + + license.setPrice(99.66); + expectEntityProp(license, 'price', 99.66); + + license.price = 66.99; + expectEntityProp(license, 'price', 66.99); + + license.set('price', 69.69); + expectEntityProp(license, 'price', 69.69); + + license.setProperty('price', 23.69); + expectEntityProp(license, 'price', 23.69); + }); + + it('should set and get currency correctly', () => { + const license = License(); + + license.setCurrency('EUR'); + expectEntityProp(license, 'currency', 'EUR'); + + license.currency = 'USD'; + expectEntityProp(license, 'currency', 'USD'); + + license.set('currency', 'UAH'); + expectEntityProp(license, 'currency', 'UAH'); + + license.setProperty('currency', 'GEL'); + expectEntityProp(license, 'currency', 'GEL'); + }); + + it('should set and get hidden status correctly', () => { + const license = License(); + + license.setHidden(true); + expectEntityProp(license, 'hidden', true); + + license.hidden = false; + expectEntityProp(license, 'hidden', false); + + license.set('hidden', true); + expectEntityProp(license, 'hidden', true); + + license.setProperty('hidden', false); + expectEntityProp(license, 'hidden', false); + }); + + it('should set and get licensee number correctly', () => { + const license = License(); + + license.setLicenseeNumber('L1'); + expectEntityProp(license, 'licenseeNumber', 'L1'); + + license.licenseeNumber = 'L2'; + expectEntityProp(license, 'licenseeNumber', 'L2'); + + license.set('licenseeNumber', 'L3'); + expectEntityProp(license, 'licenseeNumber', 'L3'); + + license.setProperty('licenseeNumber', 'L4'); + expectEntityProp(license, 'licenseeNumber', 'L4'); + }); + + it('should set and get license template number correctly', () => { + const license = License(); + + license.setLicenseTemplateNumber('LT1'); + expectEntityProp(license, 'licenseTemplateNumber', 'LT1'); + + license.licenseTemplateNumber = 'LT2'; + expectEntityProp(license, 'licenseTemplateNumber', 'LT2'); + + license.set('licenseTemplateNumber', 'LT3'); + expectEntityProp(license, 'licenseTemplateNumber', 'LT3'); + + license.setProperty('licenseTemplateNumber', 'LT4'); + expectEntityProp(license, 'licenseTemplateNumber', 'LT4'); + }); + + it('should return correct inUse status', () => { + const license = License({ inUse: true }); + expectEntityProp(license, 'inUse', true); + }); + + it('should set and get time volume correctly', () => { + const license = License(); + license.setTimeVolume(1); + expectEntityProp(license, 'timeVolume', 1); + + license.timeVolume = 2; + expectEntityProp(license, 'timeVolume', 2); + + license.set('timeVolume', 3); + expectEntityProp(license, 'timeVolume', 3); + + license.setProperty('timeVolume', 4); + expectEntityProp(license, 'timeVolume', 4); + }); + + it('should set and get time volume period correctly', () => { + const license = License(); + + license.setTimeVolumePeriod(TimeVolumePeriod.MONTH); + expectEntityProp(license, 'timeVolumePeriod', TimeVolumePeriod.MONTH); + + license.timeVolumePeriod = TimeVolumePeriod.DAY; + expectEntityProp(license, 'timeVolumePeriod', TimeVolumePeriod.DAY); + + license.set('timeVolumePeriod', TimeVolumePeriod.WEEK); + expectEntityProp(license, 'timeVolumePeriod', TimeVolumePeriod.WEEK); + + license.setProperty('timeVolumePeriod', TimeVolumePeriod.YEAR); + expectEntityProp(license, 'timeVolumePeriod', TimeVolumePeriod.YEAR); + }); + + it('should set and get start date correctly', () => { + const license = License(); + + const date1 = new Date(); + + license.setStartDate(date1); + expectEntityProp(license, 'startDate', date1); + + const date2 = new Date(); + + license.startDate = date2; + expectEntityProp(license, 'startDate', date2); + + license.set('startDate', 'now'); + expectEntityProp(license, 'startDate', 'now'); + + const date3 = new Date(); + + license.setProperty('startDate', date3); + expectEntityProp(license, 'startDate', date3); + }); + + it('should set and get parent feature correctly', () => { + const license = License(); + + license.setParentfeature('PF1'); + expectEntityProp(license, 'parentfeature', 'PF1'); + + license.parentfeature = 'PF2'; + expectEntityProp(license, 'parentfeature', 'PF2'); + + license.set('parentfeature', 'PF3'); + expectEntityProp(license, 'parentfeature', 'PF3'); + + license.setProperty('parentfeature', 'PF4'); + expectEntityProp(license, 'parentfeature', 'PF4'); + }); + + it('should allow custom properties', () => { + const customLicense = License({ number: 'L999', foo: 'bar', isFooBar: true }); + expect(customLicense.foo).toBe('bar'); + expect(customLicense.isFooBar).toBe(true); + }); + + it('should create an instance of License', () => { + const license = License(); + expect(license instanceof License).toBe(true); + }); + + it('should be correct map', () => { + const license = License({ + number: '12345', + name: 'Sample License', + price: 100, + currency: 'USD', + active: true, + hidden: false, + licenseeNumber: 'ABC123', + licenseTemplateNumber: 'TPL001', + timeVolume: 50, + timeVolumePeriod: TimeVolumePeriod.DAY, + startDate: 'now', + parentfeature: 'PARENT123', + inUse: true, + }); + + expect(license.serialize()).toStrictEqual({ + number: '12345', + name: 'Sample License', + price: '100', + currency: 'USD', + active: 'true', + hidden: 'false', + licenseeNumber: 'ABC123', + licenseTemplateNumber: 'TPL001', + timeVolume: '50', + timeVolumePeriod: TimeVolumePeriod.DAY, + startDate: 'now', + parentfeature: 'PARENT123', + }); + }); +}); diff --git a/test/specs/entities/LicenseTemplate.spec.js b/test/specs/entities/LicenseTemplate.spec.js deleted file mode 100644 index 508384a..0000000 --- a/test/specs/entities/LicenseTemplate.spec.js +++ /dev/null @@ -1,368 +0,0 @@ -import LicenseTemplate from '@/entities/LicenseTemplate'; - -describe('entities/LicenseTemplate', () => { - let licenseTemplate; - - beforeEach(() => { - licenseTemplate = new LicenseTemplate(); - }); - - it('check "number" property setters/getters', () => { - licenseTemplate.setProperty('number', 'number_0'); - expect(licenseTemplate.getProperty('number')).toBe('number_0'); - expect(licenseTemplate.getNumber()).toBe('number_0'); - expect(licenseTemplate.number).toBe('number_0'); - - licenseTemplate.setNumber('number_1'); - expect(licenseTemplate.getProperty('number')).toBe('number_1'); - expect(licenseTemplate.getNumber()).toBe('number_1'); - expect(licenseTemplate.number).toBe('number_1'); - - licenseTemplate.number = 'number_2'; - expect(licenseTemplate.getProperty('number')).toBe('number_2'); - expect(licenseTemplate.getNumber()).toBe('number_2'); - expect(licenseTemplate.number).toBe('number_2'); - }); - - it('check "name" property setters/getters', () => { - licenseTemplate.setProperty('name', 'name_0'); - expect(licenseTemplate.getProperty('name')).toBe('name_0'); - expect(licenseTemplate.getName()).toBe('name_0'); - expect(licenseTemplate.name).toBe('name_0'); - - licenseTemplate.setName('name_1'); - expect(licenseTemplate.getProperty('name')).toBe('name_1'); - expect(licenseTemplate.getName()).toBe('name_1'); - expect(licenseTemplate.name).toBe('name_1'); - - licenseTemplate.name = 'name_2'; - expect(licenseTemplate.getProperty('name')).toBe('name_2'); - expect(licenseTemplate.getName()).toBe('name_2'); - expect(licenseTemplate.name).toBe('name_2'); - }); - - it('check "active" property setters/getters', () => { - licenseTemplate.setProperty('active', true); - expect(licenseTemplate.getProperty('active')).toBe(true); - expect(licenseTemplate.getActive()).toBe(true); - expect(licenseTemplate.active).toBe(true); - - licenseTemplate.setActive(false); - expect(licenseTemplate.getProperty('active')).toBe(false); - expect(licenseTemplate.getActive()).toBe(false); - expect(licenseTemplate.active).toBe(false); - - licenseTemplate.active = true; - expect(licenseTemplate.getProperty('active')).toBe(true); - expect(licenseTemplate.getActive()).toBe(true); - expect(licenseTemplate.active).toBe(true); - }); - - it('check "licenseType" property setters/getters', () => { - licenseTemplate.setProperty('licenseType', 'TIMEVOLUME'); - expect(licenseTemplate.getProperty('licenseType')).toBe('TIMEVOLUME'); - expect(licenseTemplate.getLicenseType()).toBe('TIMEVOLUME'); - expect(licenseTemplate.licenseType).toBe('TIMEVOLUME'); - - licenseTemplate.setLicenseType('FLOATING'); - expect(licenseTemplate.getProperty('licenseType')).toBe('FLOATING'); - expect(licenseTemplate.getLicenseType()).toBe('FLOATING'); - expect(licenseTemplate.licenseType).toBe('FLOATING'); - - licenseTemplate.licenseType = 'FEATURE'; - expect(licenseTemplate.getProperty('licenseType')).toBe('FEATURE'); - expect(licenseTemplate.getLicenseType()).toBe('FEATURE'); - expect(licenseTemplate.licenseType).toBe('FEATURE'); - }); - - it('check "price" property setters/getters', () => { - licenseTemplate.setProperty('price', 10); - expect(licenseTemplate.getProperty('price')).toBe(10); - expect(licenseTemplate.getPrice()).toBe(10); - expect(licenseTemplate.price).toBe(10); - - licenseTemplate.setPrice(20); - expect(licenseTemplate.getProperty('price')).toBe(20); - expect(licenseTemplate.getPrice()).toBe(20); - expect(licenseTemplate.price).toBe(20); - - licenseTemplate.price = 30; - expect(licenseTemplate.getProperty('price')).toBe(30); - expect(licenseTemplate.getPrice()).toBe(30); - expect(licenseTemplate.price).toBe(30); - }); - - it('check "currency" property setters/getters', () => { - licenseTemplate.setProperty('currency', 'EUR'); - expect(licenseTemplate.getProperty('currency')).toBe('EUR'); - expect(licenseTemplate.getCurrency()).toBe('EUR'); - expect(licenseTemplate.currency).toBe('EUR'); - - licenseTemplate.setCurrency('USD'); - expect(licenseTemplate.getProperty('currency')).toBe('USD'); - expect(licenseTemplate.getCurrency()).toBe('USD'); - expect(licenseTemplate.currency).toBe('USD'); - - licenseTemplate.currency = 'BYN'; - expect(licenseTemplate.getProperty('currency')).toBe('BYN'); - expect(licenseTemplate.getCurrency()).toBe('BYN'); - expect(licenseTemplate.currency).toBe('BYN'); - }); - - it('check "automatic" property setters/getters', () => { - licenseTemplate.setProperty('automatic', true); - expect(licenseTemplate.getProperty('automatic')).toBe(true); - expect(licenseTemplate.getAutomatic()).toBe(true); - expect(licenseTemplate.automatic).toBe(true); - - licenseTemplate.setAutomatic(false); - expect(licenseTemplate.getProperty('automatic')).toBe(false); - expect(licenseTemplate.getAutomatic()).toBe(false); - expect(licenseTemplate.automatic).toBe(false); - - licenseTemplate.automatic = true; - expect(licenseTemplate.getProperty('automatic')).toBe(true); - expect(licenseTemplate.getAutomatic()).toBe(true); - expect(licenseTemplate.automatic).toBe(true); - }); - - it('check "hidden" property setters/getters', () => { - licenseTemplate.setProperty('hidden', true); - expect(licenseTemplate.getProperty('hidden')).toBe(true); - expect(licenseTemplate.getHidden()).toBe(true); - expect(licenseTemplate.hidden).toBe(true); - - licenseTemplate.setHidden(false); - expect(licenseTemplate.getProperty('hidden')).toBe(false); - expect(licenseTemplate.getHidden()).toBe(false); - expect(licenseTemplate.hidden).toBe(false); - - licenseTemplate.hidden = true; - expect(licenseTemplate.getProperty('hidden')).toBe(true); - expect(licenseTemplate.getHidden()).toBe(true); - expect(licenseTemplate.hidden).toBe(true); - }); - - it('check "hideLicenses" property setters/getters', () => { - licenseTemplate.setProperty('hideLicenses', true); - expect(licenseTemplate.getProperty('hideLicenses')).toBe(true); - expect(licenseTemplate.getHideLicenses()).toBe(true); - expect(licenseTemplate.hideLicenses).toBe(true); - - licenseTemplate.setHideLicenses(false); - expect(licenseTemplate.getProperty('hideLicenses')).toBe(false); - expect(licenseTemplate.getHideLicenses()).toBe(false); - expect(licenseTemplate.hideLicenses).toBe(false); - - licenseTemplate.hideLicenses = true; - expect(licenseTemplate.getProperty('hideLicenses')).toBe(true); - expect(licenseTemplate.getHideLicenses()).toBe(true); - expect(licenseTemplate.hideLicenses).toBe(true); - }); - - it('check "timeVolume" property setters/getters', () => { - licenseTemplate.setProperty('timeVolume', 10); - expect(licenseTemplate.getProperty('timeVolume')).toBe(10); - expect(licenseTemplate.getTimeVolume()).toBe(10); - expect(licenseTemplate.timeVolume).toBe(10); - - licenseTemplate.setTimeVolume(20); - expect(licenseTemplate.getProperty('timeVolume')).toBe(20); - expect(licenseTemplate.getTimeVolume()).toBe(20); - expect(licenseTemplate.timeVolume).toBe(20); - - licenseTemplate.timeVolume = 30; - expect(licenseTemplate.getProperty('timeVolume')).toBe(30); - expect(licenseTemplate.getTimeVolume()).toBe(30); - expect(licenseTemplate.timeVolume).toBe(30); - }); - - it('check "timeVolumePeriod" property setters/getters', () => { - licenseTemplate.setProperty('timeVolumePeriod', 'DAY'); - expect(licenseTemplate.getProperty('timeVolumePeriod')).toBe('DAY'); - expect(licenseTemplate.getTimeVolumePeriod()).toBe('DAY'); - expect(licenseTemplate.timeVolumePeriod).toBe('DAY'); - - licenseTemplate.setTimeVolumePeriod('WEEK'); - expect(licenseTemplate.getProperty('timeVolumePeriod')).toBe('WEEK'); - expect(licenseTemplate.getTimeVolumePeriod()).toBe('WEEK'); - expect(licenseTemplate.timeVolumePeriod).toBe('WEEK'); - - licenseTemplate.timeVolumePeriod = 'MONTH'; - expect(licenseTemplate.getProperty('timeVolumePeriod')).toBe('MONTH'); - expect(licenseTemplate.getTimeVolumePeriod()).toBe('MONTH'); - expect(licenseTemplate.timeVolumePeriod).toBe('MONTH'); - }); - - it('check "maxSessions" property setters/getters', () => { - licenseTemplate.setProperty('maxSessions', 10); - expect(licenseTemplate.getProperty('maxSessions')).toBe(10); - expect(licenseTemplate.getMaxSessions()).toBe(10); - expect(licenseTemplate.maxSessions).toBe(10); - - licenseTemplate.setMaxSessions(20); - expect(licenseTemplate.getProperty('maxSessions')).toBe(20); - expect(licenseTemplate.getMaxSessions()).toBe(20); - expect(licenseTemplate.maxSessions).toBe(20); - - licenseTemplate.maxSessions = 30; - expect(licenseTemplate.getProperty('maxSessions')).toBe(30); - expect(licenseTemplate.getMaxSessions()).toBe(30); - expect(licenseTemplate.maxSessions).toBe(30); - }); - - it('check "maxSessions" property setters/getters', () => { - licenseTemplate.setProperty('quantity', 10); - expect(licenseTemplate.getProperty('quantity')).toBe(10); - expect(licenseTemplate.getQuantity()).toBe(10); - expect(licenseTemplate.quantity).toBe(10); - - licenseTemplate.setQuantity(20); - expect(licenseTemplate.getProperty('quantity')).toBe(20); - expect(licenseTemplate.getQuantity()).toBe(20); - expect(licenseTemplate.quantity).toBe(20); - - licenseTemplate.quantity = 30; - expect(licenseTemplate.getProperty('quantity')).toBe(30); - expect(licenseTemplate.getQuantity()).toBe(30); - expect(licenseTemplate.quantity).toBe(30); - }); - - it('check "inUse" property setters/getters', () => { - licenseTemplate.setProperty('inUse', true); - expect(licenseTemplate.getProperty('inUse')).toBe(true); - expect(licenseTemplate.getInUse()).toBe(true); - expect(licenseTemplate.inUse).toBe(true); - }); - - it('check "custom-property" property setters/getters', () => { - licenseTemplate.setProperty('custom_property', 'my_custom_property_0'); - expect(licenseTemplate.getProperty('custom_property')).toBe('my_custom_property_0'); - expect(licenseTemplate.custom_property).toBe('my_custom_property_0'); - - licenseTemplate.custom_property = 'my_custom_property_1'; - expect(licenseTemplate.getProperty('custom_property')).toBe('my_custom_property_1'); - expect(licenseTemplate.custom_property).toBe('my_custom_property_1'); - }); - - it('check cast an properties to a native js type', () => { - licenseTemplate.setProperty('number', 1); - expect(licenseTemplate.getProperty('number')).toBe('1'); - licenseTemplate.setProperty('number', true); - expect(licenseTemplate.getProperty('number')).toBe('true'); - - licenseTemplate.setProperty('active', 1); - expect(licenseTemplate.getProperty('active')).toBe(true); - licenseTemplate.setProperty('active', 0); - expect(licenseTemplate.getProperty('active')).toBe(false); - licenseTemplate.setProperty('active', ''); - expect(licenseTemplate.getProperty('active')).toBe(false); - licenseTemplate.setProperty('active', '123'); - expect(licenseTemplate.getProperty('active')).toBe(true); - licenseTemplate.setProperty('active', null); - expect(licenseTemplate.getProperty('active')).toBe(false); - - licenseTemplate.setProperty('name', 1); - expect(licenseTemplate.getProperty('name')).toBe('1'); - licenseTemplate.setProperty('name', true); - expect(licenseTemplate.getProperty('name')).toBe('true'); - - licenseTemplate.setProperty('licenseType', 1); - expect(licenseTemplate.getProperty('licenseType')).toBe('1'); - licenseTemplate.setProperty('licenseType', true); - expect(licenseTemplate.getProperty('licenseType')).toBe('true'); - - licenseTemplate.setProperty('price', '3.14'); - expect(licenseTemplate.getProperty('price')).toBe(3.14); - licenseTemplate.setProperty('price', '314e-2'); - expect(licenseTemplate.getProperty('price')).toBe(3.14); - licenseTemplate.setProperty('price', '0.0314E+2'); - expect(licenseTemplate.getProperty('price')).toBe(3.14); - licenseTemplate.setProperty('price', '3.14any non-numeric characters'); - expect(licenseTemplate.getProperty('price')).toBe(3.14); - - licenseTemplate.setProperty('automatic', 1); - expect(licenseTemplate.getProperty('automatic')).toBe(true); - licenseTemplate.setProperty('automatic', 0); - expect(licenseTemplate.getProperty('automatic')).toBe(false); - licenseTemplate.setProperty('automatic', ''); - expect(licenseTemplate.getProperty('automatic')).toBe(false); - licenseTemplate.setProperty('automatic', '123'); - expect(licenseTemplate.getProperty('automatic')).toBe(true); - licenseTemplate.setProperty('automatic', null); - expect(licenseTemplate.getProperty('automatic')).toBe(false); - - licenseTemplate.setProperty('hidden', 1); - expect(licenseTemplate.getProperty('hidden')).toBe(true); - licenseTemplate.setProperty('hidden', 0); - expect(licenseTemplate.getProperty('hidden')).toBe(false); - licenseTemplate.setProperty('hidden', ''); - expect(licenseTemplate.getProperty('hidden')).toBe(false); - licenseTemplate.setProperty('hidden', '123'); - expect(licenseTemplate.getProperty('hidden')).toBe(true); - licenseTemplate.setProperty('hidden', null); - expect(licenseTemplate.getProperty('hidden')).toBe(false); - - licenseTemplate.setProperty('hideLicenses', 1); - expect(licenseTemplate.getProperty('hideLicenses')).toBe(true); - licenseTemplate.setProperty('hideLicenses', 0); - expect(licenseTemplate.getProperty('hideLicenses')).toBe(false); - licenseTemplate.setProperty('hideLicenses', ''); - expect(licenseTemplate.getProperty('hideLicenses')).toBe(false); - licenseTemplate.setProperty('hideLicenses', '123'); - expect(licenseTemplate.getProperty('hideLicenses')).toBe(true); - licenseTemplate.setProperty('hideLicenses', null); - expect(licenseTemplate.getProperty('hideLicenses')).toBe(false); - - licenseTemplate.setProperty('timeVolume', '015'); - expect(licenseTemplate.getProperty('timeVolume')).toBe(15); - licenseTemplate.setProperty('timeVolume', 15.99); - expect(licenseTemplate.getProperty('timeVolume')).toBe(15); - licenseTemplate.setProperty('timeVolume', '15*3'); - expect(licenseTemplate.getProperty('timeVolume')).toBe(15); - licenseTemplate.setProperty('timeVolume', '15e2'); - expect(licenseTemplate.getProperty('timeVolume')).toBe(15); - - licenseTemplate.setProperty('maxSessions', '015'); - expect(licenseTemplate.getProperty('maxSessions')).toBe(15); - licenseTemplate.setProperty('maxSessions', 15.99); - expect(licenseTemplate.getProperty('maxSessions')).toBe(15); - licenseTemplate.setProperty('maxSessions', '15*3'); - expect(licenseTemplate.getProperty('maxSessions')).toBe(15); - licenseTemplate.setProperty('maxSessions', '15e2'); - expect(licenseTemplate.getProperty('maxSessions')).toBe(15); - - licenseTemplate.setProperty('quantity', '015'); - expect(licenseTemplate.getProperty('quantity')).toBe(15); - licenseTemplate.setProperty('quantity', 15.99); - expect(licenseTemplate.getProperty('quantity')).toBe(15); - licenseTemplate.setProperty('quantity', '15*3'); - expect(licenseTemplate.getProperty('quantity')).toBe(15); - licenseTemplate.setProperty('quantity', '15e2'); - expect(licenseTemplate.getProperty('quantity')).toBe(15); - }); - - it('check "removeProperty" method', () => { - licenseTemplate.setProperty('number', 'number'); - licenseTemplate.removeProperty('number'); - - expect(licenseTemplate.getProperty('number')).toBe(undefined); - expect(licenseTemplate.number).toBe(undefined); - expect(licenseTemplate.getNumber()).toBe(undefined); - }); - - it('check "removeDefine" method', () => { - licenseTemplate.setProperty('number', 'number'); - licenseTemplate.removeDefine('number'); - - expect(licenseTemplate.number).toBe(undefined); - expect(licenseTemplate.getProperty('number')).toBe('number'); - expect(licenseTemplate.getNumber()).toBe('number'); - - licenseTemplate.number = 'number_1'; - - expect(licenseTemplate.number).toBe('number_1'); - expect(licenseTemplate.getProperty('number')).toBe('number'); - expect(licenseTemplate.getNumber()).toBe('number'); - }); -}); diff --git a/test/specs/entities/LicenseTemplate.spec.ts b/test/specs/entities/LicenseTemplate.spec.ts new file mode 100644 index 0000000..3105686 --- /dev/null +++ b/test/specs/entities/LicenseTemplate.spec.ts @@ -0,0 +1,352 @@ +import { describe, it, expect } from 'vitest'; +// constants +import LicenseType from '@/constants/LicenseType'; +import TimeVolumePeriod from '@/constants/TimeVolumePeriod'; + +// entities +import LicenseTemplate from '@/entities/LicenseTemplate'; + +// test utils +import expectEntity from '@test-utils/expectEntity'; +import expectEntityProp from '@test-utils/expectEntityProp'; + +describe('LicenseTemplate Entity', () => { + it('should create a LicenseTemplate with default properties', () => { + const licenseTemplate = LicenseTemplate(); + + expectEntity(licenseTemplate, { + active: undefined, + number: undefined, + name: undefined, + licenseType: undefined, + price: undefined, + currency: undefined, + automatic: undefined, + hidden: undefined, + hideLicenses: undefined, + gracePeriod: undefined, + timeVolume: undefined, + timeVolumePeriod: undefined, + maxSessions: undefined, + quantity: undefined, + productModuleNumber: undefined, + inUse: undefined, + }); + }); + + it('should create a LicenseTemplate with provided properties', () => { + const props = { + number: 'LT123', + name: 'Sample License Template', + active: true, + licenseType: LicenseType.TIMEVOLUME, + price: 100, + currency: 'USD', + automatic: true, + hidden: false, + hideLicenses: true, + gracePeriod: true, + timeVolume: 12, + timeVolumePeriod: TimeVolumePeriod.MONTH, + maxSessions: 10, + quantity: 1000, + productModuleNumber: 'PM1', + inUse: true, + }; + + const licenseTemplate = LicenseTemplate(props); + + expectEntity(licenseTemplate, props); + expect(licenseTemplate).toStrictEqual(props); + }); + + it('should set and get active status correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setActive(true); + expectEntityProp(licenseTemplate, 'active', true); + + licenseTemplate.active = false; + expectEntityProp(licenseTemplate, 'active', false); + + licenseTemplate.set('active', true); + expectEntityProp(licenseTemplate, 'active', true); + + licenseTemplate.setProperty('active', false); + expectEntityProp(licenseTemplate, 'active', false); + }); + + it('should set and get number correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setNumber('LT1'); + expectEntityProp(licenseTemplate, 'number', 'LT1'); + + licenseTemplate.number = 'LT2'; + expectEntityProp(licenseTemplate, 'number', 'LT2'); + + licenseTemplate.set('number', 'LT3'); + expectEntityProp(licenseTemplate, 'number', 'LT3'); + + licenseTemplate.setProperty('number', 'LT4'); + expectEntityProp(licenseTemplate, 'number', 'LT4'); + }); + + it('should set and get name correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setName('LT1'); + expectEntityProp(licenseTemplate, 'name', 'LT1'); + + licenseTemplate.name = 'LT2'; + expectEntityProp(licenseTemplate, 'name', 'LT2'); + + licenseTemplate.set('name', 'LT3'); + expectEntityProp(licenseTemplate, 'name', 'LT3'); + + licenseTemplate.setProperty('name', 'LT4'); + expectEntityProp(licenseTemplate, 'name', 'LT4'); + }); + + it('should set and get license type correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setLicenseType(LicenseType.QUANTITY); + expectEntityProp(licenseTemplate, 'licenseType', LicenseType.QUANTITY); + + licenseTemplate.licenseType = LicenseType.FEATURE; + expectEntityProp(licenseTemplate, 'licenseType', LicenseType.FEATURE); + + licenseTemplate.set('licenseType', LicenseType.TIMEVOLUME); + expectEntityProp(licenseTemplate, 'licenseType', LicenseType.TIMEVOLUME); + + licenseTemplate.setProperty('licenseType', LicenseType.FLOATING); + expectEntityProp(licenseTemplate, 'licenseType', LicenseType.FLOATING); + }); + + it('should set and get price correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setPrice(200); + expectEntityProp(licenseTemplate, 'price', 200); + + licenseTemplate.price = 50; + expectEntityProp(licenseTemplate, 'price', 50); + + licenseTemplate.set('price', 500); + expectEntityProp(licenseTemplate, 'price', 500); + + licenseTemplate.setProperty('price', 66); + expectEntityProp(licenseTemplate, 'price', 66); + }); + + it('should set and get price and currency correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setCurrency('EUR'); + expectEntityProp(licenseTemplate, 'currency', 'EUR'); + + licenseTemplate.currency = 'USD'; + expectEntityProp(licenseTemplate, 'currency', 'USD'); + + licenseTemplate.set('currency', 'UAH'); + expectEntityProp(licenseTemplate, 'currency', 'UAH'); + + licenseTemplate.setProperty('currency', 'GEL'); + expectEntityProp(licenseTemplate, 'currency', 'GEL'); + }); + + it('should set and get automatic status correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setAutomatic(true); + expectEntityProp(licenseTemplate, 'automatic', true); + + licenseTemplate.automatic = false; + expectEntityProp(licenseTemplate, 'automatic', false); + + licenseTemplate.set('automatic', true); + expectEntityProp(licenseTemplate, 'automatic', true); + + licenseTemplate.setProperty('automatic', false); + expectEntityProp(licenseTemplate, 'automatic', false); + }); + + it('should set and get hidden status correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setHidden(true); + expectEntityProp(licenseTemplate, 'hidden', true); + + licenseTemplate.hidden = false; + expectEntityProp(licenseTemplate, 'hidden', false); + + licenseTemplate.set('hidden', true); + expectEntityProp(licenseTemplate, 'hidden', true); + + licenseTemplate.setProperty('hidden', false); + expectEntityProp(licenseTemplate, 'hidden', false); + }); + + it('should set and get hide licenses status correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setHideLicenses(true); + expectEntityProp(licenseTemplate, 'hideLicenses', true); + + licenseTemplate.hideLicenses = false; + expectEntityProp(licenseTemplate, 'hideLicenses', false); + + licenseTemplate.set('hideLicenses', true); + expectEntityProp(licenseTemplate, 'hideLicenses', true); + + licenseTemplate.setProperty('hideLicenses', false); + expectEntityProp(licenseTemplate, 'hideLicenses', false); + }); + + it('should set and get grace period status correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setGracePeriod(true); + expectEntityProp(licenseTemplate, 'gracePeriod', true); + + licenseTemplate.gracePeriod = false; + expectEntityProp(licenseTemplate, 'gracePeriod', false); + + licenseTemplate.set('gracePeriod', true); + expectEntityProp(licenseTemplate, 'gracePeriod', true); + + licenseTemplate.setProperty('gracePeriod', false); + expectEntityProp(licenseTemplate, 'gracePeriod', false); + }); + + it('should set and get time volume correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setTimeVolume(10); + expectEntityProp(licenseTemplate, 'timeVolume', 10); + + licenseTemplate.timeVolume = 20; + expectEntityProp(licenseTemplate, 'timeVolume', 20); + + licenseTemplate.set('timeVolume', 30); + expectEntityProp(licenseTemplate, 'timeVolume', 30); + + licenseTemplate.setProperty('timeVolume', 40); + expectEntityProp(licenseTemplate, 'timeVolume', 40); + }); + + it('should set and get time volume period correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setTimeVolumePeriod(TimeVolumePeriod.DAY); + expectEntityProp(licenseTemplate, 'timeVolumePeriod', TimeVolumePeriod.DAY); + + licenseTemplate.timeVolumePeriod = TimeVolumePeriod.MONTH; + expectEntityProp(licenseTemplate, 'timeVolumePeriod', TimeVolumePeriod.MONTH); + + licenseTemplate.set('timeVolumePeriod', TimeVolumePeriod.WEEK); + expectEntityProp(licenseTemplate, 'timeVolumePeriod', TimeVolumePeriod.WEEK); + + licenseTemplate.setProperty('timeVolumePeriod', TimeVolumePeriod.YEAR); + expectEntityProp(licenseTemplate, 'timeVolumePeriod', TimeVolumePeriod.YEAR); + }); + + it('should set and get max sessions correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setMaxSessions(5); + expectEntityProp(licenseTemplate, 'maxSessions', 5); + + licenseTemplate.maxSessions = 10; + expectEntityProp(licenseTemplate, 'maxSessions', 10); + + licenseTemplate.set('maxSessions', 7); + expectEntityProp(licenseTemplate, 'maxSessions', 7); + + licenseTemplate.setProperty('maxSessions', 9); + expectEntityProp(licenseTemplate, 'maxSessions', 9); + }); + + it('should set and get quantity correctly for QUANTITY license type', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setQuantity(100); + expectEntityProp(licenseTemplate, 'quantity', 100); + + licenseTemplate.quantity = 200; + expectEntityProp(licenseTemplate, 'quantity', 200); + + licenseTemplate.set('quantity', 150); + expectEntityProp(licenseTemplate, 'quantity', 150); + + licenseTemplate.setProperty('quantity', 350); + expectEntityProp(licenseTemplate, 'quantity', 350); + }); + + it('should set and get productModuleNumber correctly', () => { + const licenseTemplate = LicenseTemplate(); + + licenseTemplate.setProductModuleNumber('PM1'); + expectEntityProp(licenseTemplate, 'productModuleNumber', 'PM1'); + + licenseTemplate.productModuleNumber = 'PM2'; + expectEntityProp(licenseTemplate, 'productModuleNumber', 'PM2'); + + licenseTemplate.set('productModuleNumber', 'PM3'); + expectEntityProp(licenseTemplate, 'productModuleNumber', 'PM3'); + + licenseTemplate.setProperty('productModuleNumber', 'PM4'); + expectEntityProp(licenseTemplate, 'productModuleNumber', 'PM4'); + }); + + it('should allow custom properties', () => { + const licenseTemplate = LicenseTemplate({ number: 'L999', foo: 'bar', isFooBar: true }); + expect(licenseTemplate.foo).toBe('bar'); + expect(licenseTemplate.isFooBar).toBe(true); + }); + + it('should create an instance of LicenseTemplate', () => { + const licenseTemplate = LicenseTemplate(); + expect(licenseTemplate instanceof LicenseTemplate).toBe(true); + }); + + it('should be correct map', () => { + const licenseTemplate = LicenseTemplate({ + number: 'LT123', + name: 'Sample License Template', + active: true, + licenseType: LicenseType.TIMEVOLUME, + price: 100, + currency: 'USD', + automatic: true, + hidden: false, + hideLicenses: true, + gracePeriod: true, + timeVolume: 12, + timeVolumePeriod: TimeVolumePeriod.MONTH, + maxSessions: 10, + quantity: 1000, + productModuleNumber: 'PM1', + inUse: true, + }); + + expect(licenseTemplate.serialize()).toStrictEqual({ + number: 'LT123', + name: 'Sample License Template', + active: 'true', + licenseType: LicenseType.TIMEVOLUME, + price: '100', + currency: 'USD', + automatic: 'true', + hidden: 'false', + hideLicenses: 'true', + gracePeriod: 'true', + timeVolume: '12', + timeVolumePeriod: TimeVolumePeriod.MONTH, + maxSessions: '10', + quantity: '1000', + productModuleNumber: 'PM1', + }); + }); +}); diff --git a/test/specs/entities/Licensee.spec.js b/test/specs/entities/Licensee.spec.js deleted file mode 100644 index 257fd3b..0000000 --- a/test/specs/entities/Licensee.spec.js +++ /dev/null @@ -1,174 +0,0 @@ -import Licensee from '@/entities/Licensee'; - -describe('entities/Licensee', () => { - let licensee; - - beforeEach(() => { - licensee = new Licensee(); - }); - - it('check "number" property setters/getters', () => { - licensee.setProperty('number', 'number_0'); - expect(licensee.getProperty('number')).toBe('number_0'); - expect(licensee.getNumber()).toBe('number_0'); - expect(licensee.number).toBe('number_0'); - - licensee.setNumber('number_1'); - expect(licensee.getProperty('number')).toBe('number_1'); - expect(licensee.getNumber()).toBe('number_1'); - expect(licensee.number).toBe('number_1'); - - licensee.number = 'number_2'; - expect(licensee.getProperty('number')).toBe('number_2'); - expect(licensee.getNumber()).toBe('number_2'); - expect(licensee.number).toBe('number_2'); - }); - - it('check "name" property setters/getters', () => { - licensee.setProperty('name', 'name_0'); - expect(licensee.getProperty('name')).toBe('name_0'); - expect(licensee.getName()).toBe('name_0'); - expect(licensee.name).toBe('name_0'); - - licensee.setName('name_1'); - expect(licensee.getProperty('name')).toBe('name_1'); - expect(licensee.getName()).toBe('name_1'); - expect(licensee.name).toBe('name_1'); - - licensee.name = 'name_2'; - expect(licensee.getProperty('name')).toBe('name_2'); - expect(licensee.getName()).toBe('name_2'); - expect(licensee.name).toBe('name_2'); - }); - - it('check "active" property setters/getters', () => { - licensee.setProperty('active', true); - expect(licensee.getProperty('active')).toBe(true); - expect(licensee.getActive()).toBe(true); - expect(licensee.active).toBe(true); - - licensee.setActive(false); - expect(licensee.getProperty('active')).toBe(false); - expect(licensee.getActive()).toBe(false); - expect(licensee.active).toBe(false); - - licensee.active = true; - expect(licensee.getProperty('active')).toBe(true); - expect(licensee.getActive()).toBe(true); - expect(licensee.active).toBe(true); - }); - - it('check "licenseeSecret" property setters/getters', () => { - licensee.setProperty('licenseeSecret', 'licenseeSecret_0'); - expect(licensee.getProperty('licenseeSecret')).toBe('licenseeSecret_0'); - expect(licensee.getLicenseeSecret()).toBe('licenseeSecret_0'); - expect(licensee.licenseeSecret).toBe('licenseeSecret_0'); - - licensee.setLicenseeSecret('licenseeSecret_1'); - expect(licensee.getProperty('licenseeSecret')).toBe('licenseeSecret_1'); - expect(licensee.getLicenseeSecret()).toBe('licenseeSecret_1'); - expect(licensee.licenseeSecret).toBe('licenseeSecret_1'); - - licensee.licenseeSecret = 'licenseeSecret_2'; - expect(licensee.getProperty('licenseeSecret')).toBe('licenseeSecret_2'); - expect(licensee.getLicenseeSecret()).toBe('licenseeSecret_2'); - expect(licensee.licenseeSecret).toBe('licenseeSecret_2'); - }); - - it('check "markedForTransfer" property setters/getters', () => { - licensee.setProperty('markedForTransfer', true); - expect(licensee.getProperty('markedForTransfer')).toBe(true); - expect(licensee.getMarkedForTransfer()).toBe(true); - expect(licensee.markedForTransfer).toBe(true); - - licensee.setMarkedForTransfer(false); - expect(licensee.getProperty('markedForTransfer')).toBe(false); - expect(licensee.getMarkedForTransfer()).toBe(false); - expect(licensee.markedForTransfer).toBe(false); - - licensee.markedForTransfer = true; - expect(licensee.getProperty('markedForTransfer')).toBe(true); - expect(licensee.getMarkedForTransfer()).toBe(true); - expect(licensee.markedForTransfer).toBe(true); - }); - - it('check "inUse" property setters/getters', () => { - licensee.setProperty('inUse', true); - expect(licensee.getProperty('inUse')).toBe(true); - expect(licensee.getInUse()).toBe(true); - expect(licensee.inUse).toBe(true); - }); - - it('check "custom-property" property setters/getters', () => { - licensee.setProperty('custom_property', 'my_custom_property_0'); - expect(licensee.getProperty('custom_property')).toBe('my_custom_property_0'); - expect(licensee.custom_property).toBe('my_custom_property_0'); - - licensee.custom_property = 'my_custom_property_1'; - expect(licensee.getProperty('custom_property')).toBe('my_custom_property_1'); - expect(licensee.custom_property).toBe('my_custom_property_1'); - }); - - it('check cast an properties to a native js type', () => { - licensee.setProperty('number', 1); - expect(licensee.getProperty('number')).toBe('1'); - licensee.setProperty('number', true); - expect(licensee.getProperty('number')).toBe('true'); - - licensee.setProperty('active', 1); - expect(licensee.getProperty('active')).toBe(true); - licensee.setProperty('active', 0); - expect(licensee.getProperty('active')).toBe(false); - licensee.setProperty('active', ''); - expect(licensee.getProperty('active')).toBe(false); - licensee.setProperty('active', '123'); - expect(licensee.getProperty('active')).toBe(true); - licensee.setProperty('active', null); - expect(licensee.getProperty('active')).toBe(false); - - licensee.setProperty('name', 1); - expect(licensee.getProperty('name')).toBe('1'); - licensee.setProperty('name', true); - expect(licensee.getProperty('name')).toBe('true'); - - licensee.setProperty('licenseeSecret', 1); - expect(licensee.getProperty('licenseeSecret')).toBe('1'); - licensee.setProperty('licenseeSecret', true); - expect(licensee.getProperty('licenseeSecret')).toBe('true'); - - licensee.setProperty('markedForTransfer', 1); - expect(licensee.getProperty('markedForTransfer')).toBe(true); - licensee.setProperty('markedForTransfer', 0); - expect(licensee.getProperty('markedForTransfer')).toBe(false); - licensee.setProperty('markedForTransfer', ''); - expect(licensee.getProperty('markedForTransfer')).toBe(false); - licensee.setProperty('markedForTransfer', '123'); - expect(licensee.getProperty('markedForTransfer')).toBe(true); - licensee.setProperty('markedForTransfer', null); - expect(licensee.getProperty('markedForTransfer')).toBe(false); - }); - - it('check "removeProperty" method', () => { - licensee.setProperty('number', 'number'); - licensee.removeProperty('number'); - - expect(licensee.getProperty('number')).toBe(undefined); - expect(licensee.number).toBe(undefined); - expect(licensee.getNumber()).toBe(undefined); - }); - - it('check "removeDefine" method', () => { - licensee.setProperty('number', 'number'); - licensee.removeDefine('number'); - - expect(licensee.number).toBe(undefined); - expect(licensee.getProperty('number')).toBe('number'); - expect(licensee.getNumber()).toBe('number'); - - licensee.number = 'number_1'; - - expect(licensee.number).toBe('number_1'); - expect(licensee.getProperty('number')).toBe('number'); - expect(licensee.getNumber()).toBe('number'); - }); -}); diff --git a/test/specs/entities/Licensee.spec.ts b/test/specs/entities/Licensee.spec.ts new file mode 100644 index 0000000..95eaef8 --- /dev/null +++ b/test/specs/entities/Licensee.spec.ts @@ -0,0 +1,157 @@ +import { describe, it, expect } from 'vitest'; + +// entities +import Licensee from '@/entities/Licensee'; + +// test utils +import expectEntity from '@test-utils/expectEntity'; +import expectEntityProp from '@test-utils/expectEntityProp'; + +describe('Licensee Entity', () => { + it('should create a Licensee with default properties', () => { + const licensee = Licensee(); + + expectEntity(licensee, { + active: undefined, + number: undefined, + name: undefined, + productNumber: undefined, + markedForTransfer: undefined, + inUse: undefined, + }); + }); + + it('should create a Licensee with provided properties', () => { + const props = { + number: '12345', + name: 'Sample Licensee', + active: true, + licenseeSecret: 'secret123', + markedForTransfer: false, + productNumber: 'PN123', + inUse: true, + }; + + const licensee = Licensee(props); + + expectEntity(licensee, props); + expect(licensee).toStrictEqual(props); + }); + + it('should set and get active status correctly', () => { + const licensee = Licensee(); + + licensee.setActive(true); + expectEntityProp(licensee, 'active', true); + + licensee.active = false; + expectEntityProp(licensee, 'active', false); + + licensee.set('active', true); + expectEntityProp(licensee, 'active', true); + + licensee.setProperty('active', false); + expectEntityProp(licensee, 'active', false); + }); + + it('should set and get number correctly', () => { + const licensee = Licensee(); + + licensee.setNumber('L1'); + expectEntityProp(licensee, 'number', 'L1'); + + licensee.number = 'L2'; + expectEntityProp(licensee, 'number', 'L2'); + + licensee.set('number', 'L3'); + expectEntityProp(licensee, 'number', 'L3'); + + licensee.setProperty('number', 'L4'); + expectEntityProp(licensee, 'number', 'L4'); + }); + + it('should set and get name correctly', () => { + const licensee = Licensee(); + + licensee.setName('Name 1'); + expectEntityProp(licensee, 'name', 'Name 1'); + + licensee.name = 'Name 2'; + expectEntityProp(licensee, 'name', 'Name 2'); + + licensee.set('name', 'Name 3'); + expectEntityProp(licensee, 'name', 'Name 3'); + + licensee.setProperty('name', 'Name 4'); + expectEntityProp(licensee, 'name', 'Name 4'); + }); + + it('should set and get product number correctly', () => { + const licensee = Licensee(); + + licensee.setProductNumber('P1'); + expectEntityProp(licensee, 'productNumber', 'P1'); + + licensee.productNumber = 'P2'; + expectEntityProp(licensee, 'productNumber', 'P2'); + + licensee.set('productNumber', 'P3'); + expectEntityProp(licensee, 'productNumber', 'P3'); + + licensee.setProperty('productNumber', 'P4'); + expectEntityProp(licensee, 'productNumber', 'P4'); + }); + + it('should set and get marked for transfer status correctly', () => { + const licensee = Licensee(); + + licensee.setMarkedForTransfer(true); + expectEntityProp(licensee, 'markedForTransfer', true); + + licensee.markedForTransfer = false; + expectEntityProp(licensee, 'markedForTransfer', false); + + licensee.set('markedForTransfer', true); + expectEntityProp(licensee, 'markedForTransfer', true); + + licensee.setProperty('markedForTransfer', true); + expectEntityProp(licensee, 'markedForTransfer', true); + }); + + it('should return correct inUse status', () => { + const licensee = Licensee({ inUse: true }); + expectEntityProp(licensee, 'inUse', true); + }); + + it('should allow custom properties', () => { + const licensee = Licensee({ number: 'L999', foo: 'bar', isFooBar: true }); + expect(licensee.foo).toBe('bar'); + expect(licensee.isFooBar).toBe(true); + }); + + it('should create an instance of Licensee', () => { + const licensee = Licensee(); + expect(licensee instanceof Licensee).toBe(true); + }); + + it('should be correct map', () => { + const licensee = Licensee({ + number: '12345', + name: 'Sample Licensee', + active: true, + licenseeSecret: 'secret123', + markedForTransfer: false, + productNumber: 'PN123', + inUse: true, + }); + + expect(licensee.serialize()).toStrictEqual({ + number: '12345', + name: 'Sample Licensee', + active: 'true', + licenseeSecret: 'secret123', + markedForTransfer: 'false', + productNumber: 'PN123', + }); + }); +}); diff --git a/test/specs/entities/Notification.spec.js b/test/specs/entities/Notification.spec.js deleted file mode 100644 index 97c8527..0000000 --- a/test/specs/entities/Notification.spec.js +++ /dev/null @@ -1,169 +0,0 @@ -import Notification from '@/entities/Notification'; -import Constants from '@/Constants'; - -describe('entities/Notification', () => { - let notification; - - beforeEach(() => { - notification = new Notification(); - }); - - it('check "number" property setters/getters', () => { - notification.setProperty('number', 'number_0'); - expect(notification.getProperty('number')).toBe('number_0'); - expect(notification.getNumber()).toBe('number_0'); - expect(notification.number).toBe('number_0'); - - notification.setNumber('number_1'); - expect(notification.getProperty('number')).toBe('number_1'); - expect(notification.getNumber()).toBe('number_1'); - expect(notification.number).toBe('number_1'); - - notification.number = 'number_2'; - expect(notification.getProperty('number')).toBe('number_2'); - expect(notification.getNumber()).toBe('number_2'); - expect(notification.number).toBe('number_2'); - }); - - it('check "name" property setters/getters', () => { - notification.setProperty('name', 'name_0'); - expect(notification.getProperty('name')).toBe('name_0'); - expect(notification.getName()).toBe('name_0'); - expect(notification.name).toBe('name_0'); - - notification.setName('name_1'); - expect(notification.getProperty('name')).toBe('name_1'); - expect(notification.getName()).toBe('name_1'); - expect(notification.name).toBe('name_1'); - - notification.name = 'name_2'; - expect(notification.getProperty('name')).toBe('name_2'); - expect(notification.getName()).toBe('name_2'); - expect(notification.name).toBe('name_2'); - }); - - it('check "active" property setters/getters', () => { - notification.setProperty('active', true); - expect(notification.getProperty('active')).toBe(true); - expect(notification.getActive()).toBe(true); - expect(notification.active).toBe(true); - - notification.setActive(false); - expect(notification.getProperty('active')).toBe(false); - expect(notification.getActive()).toBe(false); - expect(notification.active).toBe(false); - - notification.active = true; - expect(notification.getProperty('active')).toBe(true); - expect(notification.getActive()).toBe(true); - expect(notification.active).toBe(true); - }); - - it('check "protocol" property setters/getters', () => { - notification.setProperty('protocol', 'WEBHOOK'); - expect(notification.getProperty('protocol')).toBe('WEBHOOK'); - expect(notification.getProtocol()).toBe('WEBHOOK'); - expect(notification.protocol).toBe('WEBHOOK'); - - notification.setProtocol('EMAIL'); - expect(notification.getProperty('protocol')).toBe('EMAIL'); - expect(notification.getProtocol()).toBe('EMAIL'); - expect(notification.protocol).toBe('EMAIL'); - - notification.protocol = 'EMAIL'; - expect(notification.getProperty('protocol')).toBe('EMAIL'); - expect(notification.getProtocol()).toBe('EMAIL'); - expect(notification.protocol).toBe('EMAIL'); - }); - - it('check "events" property setters/getters', () => { - notification.setProperty('events', 'LICENSEE_CREATED,LICENSE_CREATED'); - expect(notification.getProperty('events')).toBe('LICENSEE_CREATED,LICENSE_CREATED'); - expect(notification.getEvents()).toBe('LICENSEE_CREATED,LICENSE_CREATED'); - expect(notification.events).toBe('LICENSEE_CREATED,LICENSE_CREATED'); - - notification.setEvents('LICENSEE_CREATED'); - expect(notification.getProperty('events')).toBe('LICENSEE_CREATED'); - expect(notification.getEvents()).toBe('LICENSEE_CREATED'); - expect(notification.events).toBe('LICENSEE_CREATED'); - - notification.events = 'LICENSE_CREATED'; - expect(notification.getProperty('events')).toBe('LICENSE_CREATED'); - expect(notification.getEvents()).toBe('LICENSE_CREATED'); - expect(notification.events).toBe('LICENSE_CREATED'); - }); - - it('check "payload" property setters/getters', () => { - notification.setProperty('payload', 'some-payload'); - expect(notification.getProperty('payload')).toBe('some-payload'); - expect(notification.getPayload()).toBe('some-payload'); - expect(notification.payload).toBe('some-payload'); - - notification.setPayload('some-payload-1'); - expect(notification.getProperty('payload')).toBe('some-payload-1'); - expect(notification.getPayload()).toBe('some-payload-1'); - expect(notification.payload).toBe('some-payload-1'); - - notification.payload = 'some-payload-2'; - expect(notification.getProperty('payload')).toBe('some-payload-2'); - expect(notification.getPayload()).toBe('some-payload-2'); - expect(notification.payload).toBe('some-payload-2'); - }); - - it('check "endpoint" property setters/getters', () => { - notification.setProperty('endpoint', 'https://example.com'); - expect(notification.getProperty('endpoint')).toBe('https://example.com'); - expect(notification.getEndpoint()).toBe('https://example.com'); - expect(notification.endpoint).toBe('https://example.com'); - - notification.setEndpoint('https://example2.com'); - expect(notification.getProperty('endpoint')).toBe('https://example2.com'); - expect(notification.getEndpoint()).toBe('https://example2.com'); - expect(notification.endpoint).toBe('https://example2.com'); - - notification.endpoint = 'https://example3.com'; - expect(notification.getProperty('endpoint')).toBe('https://example3.com'); - expect(notification.getEndpoint()).toBe('https://example3.com'); - expect(notification.endpoint).toBe('https://example3.com'); - }); - - it('check "custom-property" property setters/getters', () => { - notification.setProperty('custom_property', 'my_custom_property_0'); - expect(notification.getProperty('custom_property')).toBe('my_custom_property_0'); - expect(notification.custom_property).toBe('my_custom_property_0'); - - notification.custom_property = 'my_custom_property_1'; - expect(notification.getProperty('custom_property')).toBe('my_custom_property_1'); - expect(notification.custom_property).toBe('my_custom_property_1'); - }); - - it('check "removeProperty" method', () => { - notification.setProperty('number', 'number'); - notification.removeProperty('number'); - - expect(notification.getProperty('number')).toBe(undefined); - expect(notification.number).toBe(undefined); - expect(notification.getNumber()).toBe(undefined); - }); - - it('check "removeDefine" method', () => { - notification.setProperty('number', 'number'); - notification.removeDefine('number'); - - expect(notification.number).toBe(undefined); - expect(notification.getProperty('number')).toBe('number'); - expect(notification.getNumber()).toBe('number'); - - notification.number = 'number_1'; - - expect(notification.number).toBe('number_1'); - expect(notification.getProperty('number')).toBe('number'); - expect(notification.getNumber()).toBe('number'); - }); - - it('check events', () => { - expect(Constants.Notification.Event.LICENSEE_CREATED).toBe('LICENSEE_CREATED'); - expect(Constants.Notification.Event.LICENSE_CREATED).toBe('LICENSE_CREATED'); - expect(Constants.Notification.Event.WARNING_LEVEL_CHANGED).toBe('WARNING_LEVEL_CHANGED'); - }); -}); diff --git a/test/specs/entities/Notification.spec.ts b/test/specs/entities/Notification.spec.ts new file mode 100644 index 0000000..6a22a05 --- /dev/null +++ b/test/specs/entities/Notification.spec.ts @@ -0,0 +1,197 @@ +import { describe, it, expect } from 'vitest'; +// constants +import Event from '@/constants/NotificationEvent'; +import Protocol from '@/constants/NotificationProtocol'; + +// entities +import Notification from '@/entities/Notification'; + +// test utils +import expectEntity from '@test-utils/expectEntity'; +import expectEntityProp from '@test-utils/expectEntityProp'; + +describe('Notification Entity', () => { + it('should create a Notification with default properties', () => { + const notification = Notification(); + + expectEntity(notification, { + active: undefined, + number: undefined, + name: undefined, + protocol: undefined, + events: undefined, + payload: undefined, + endpoint: undefined, + }); + }); + + it('should create a Notification with provided properties', () => { + const props = { + active: true, + number: 'N123', + name: 'Sample Name', + protocol: Protocol.WEBHOOK, + events: [Event.LICENSE_CREATED, Event.LICENSEE_CREATED], + payload: '{$}', + endpoint: 'http://some-endpoint.test', + }; + + const notification = Notification(props); + + expectEntity(notification, { + active: true, + number: 'N123', + name: 'Sample Name', + protocol: Protocol.WEBHOOK, + events: [Event.LICENSE_CREATED, Event.LICENSEE_CREATED], + payload: '{$}', + endpoint: 'http://some-endpoint.test', + }); + }); + + it('should set and get active status correctly', () => { + const notification = Notification(); + + notification.setActive(true); + expectEntityProp(notification, 'active', true); + + notification.active = false; + expectEntityProp(notification, 'active', false); + + notification.set('active', true); + expectEntityProp(notification, 'active', true); + + notification.setProperty('active', true); + expectEntityProp(notification, 'active', true); + }); + + it('should set and get number correctly', () => { + const notification = Notification(); + + notification.setNumber('N123'); + expectEntityProp(notification, 'number', 'N123'); + + notification.number = 'N456'; + expectEntityProp(notification, 'number', 'N456'); + + notification.set('number', 'N789'); + expectEntityProp(notification, 'number', 'N789'); + + notification.setProperty('number', 'N234'); + expectEntityProp(notification, 'number', 'N234'); + }); + + it('should set and get name correctly', () => { + const notification = Notification(); + notification.setName('N1'); + expectEntityProp(notification, 'name', 'N1'); + + notification.name = 'N2'; + expectEntityProp(notification, 'name', 'N2'); + + notification.set('name', 'N3'); + expectEntityProp(notification, 'name', 'N3'); + + notification.setProperty('name', 'N4'); + expectEntityProp(notification, 'name', 'N4'); + }); + + it('should set and get protocol correctly', () => { + const n1 = Notification(); + n1.setProtocol(Protocol.WEBHOOK); + expectEntityProp(n1, 'protocol', Protocol.WEBHOOK); + + const n2 = Notification(); + n2.protocol = Protocol.WEBHOOK; + expectEntityProp(n2, 'protocol', Protocol.WEBHOOK); + + const n3 = Notification(); + n3.set('protocol', Protocol.WEBHOOK); + expectEntityProp(n3, 'protocol', Protocol.WEBHOOK); + + const n4 = Notification(); + n4.setProperty('protocol', Protocol.WEBHOOK); + expectEntityProp(n4, 'protocol', Protocol.WEBHOOK); + }); + + it('should set and get events correctly', () => { + const notification = Notification(); + + notification.setEvents([Event.LICENSE_CREATED]); + expectEntityProp(notification, 'events', [Event.LICENSE_CREATED]); + + notification.events = [Event.LICENSEE_CREATED]; + expectEntityProp(notification, 'events', [Event.LICENSEE_CREATED]); + + notification.set('events', [Event.WARNING_LEVEL_CHANGED]); + expectEntityProp(notification, 'events', [Event.WARNING_LEVEL_CHANGED]); + + notification.setProperty('events', [Event.WARNING_LEVEL_CHANGED]); + expectEntityProp(notification, 'events', [Event.WARNING_LEVEL_CHANGED]); + }); + + it('should set and get payload correctly', () => { + const notification = Notification(); + + notification.setPayload('{$}'); + expectEntityProp(notification, 'payload', '{$}'); + + notification.payload = '{$.timestamp}'; + expectEntityProp(notification, 'payload', '{$.timestamp}'); + + notification.set('payload', '{$.origin}'); + expectEntityProp(notification, 'payload', '{$.origin}'); + + notification.setProperty('payload', '{$.entities}'); + expectEntityProp(notification, 'payload', '{$.entities}'); + }); + + it('should set and get endpoint correctly', () => { + const notification = Notification(); + + notification.setEndpoint('endpoint 1'); + expectEntityProp(notification, 'endpoint', 'endpoint 1'); + + notification.endpoint = 'endpoint 2'; + expectEntityProp(notification, 'endpoint', 'endpoint 2'); + + notification.set('endpoint', 'endpoint 3'); + expectEntityProp(notification, 'endpoint', 'endpoint 3'); + + notification.setProperty('endpoint', 'endpoint 4'); + expectEntityProp(notification, 'endpoint', 'endpoint 4'); + }); + + it('should allow custom properties', () => { + const notification = Notification({ number: 'N999', foo: 'bar', isFooBar: true }); + expect(notification.foo).toBe('bar'); + expect(notification.isFooBar).toBe(true); + }); + + it('should create an instance of Notification', () => { + const notification = Notification(); + expect(notification instanceof Notification).toBe(true); + }); + + it('should be correct map', () => { + const notification = Notification({ + active: true, + number: 'N123', + name: 'Sample Name', + protocol: Protocol.WEBHOOK, + events: [Event.LICENSE_CREATED, Event.LICENSEE_CREATED], + payload: '{$}', + endpoint: 'http://some-endpoint.test', + }); + + expect(notification.serialize()).toStrictEqual({ + active: 'true', + number: 'N123', + name: 'Sample Name', + protocol: 'WEBHOOK', + events: 'LICENSE_CREATED,LICENSEE_CREATED', + payload: '{$}', + endpoint: 'http://some-endpoint.test', + }); + }); +}); diff --git a/test/specs/entities/PaymentMethod.spec.js b/test/specs/entities/PaymentMethod.spec.js deleted file mode 100644 index 40ad028..0000000 --- a/test/specs/entities/PaymentMethod.spec.js +++ /dev/null @@ -1,107 +0,0 @@ -import PaymentMethod from '@/entities/PaymentMethod'; - -describe('entities/PaymentMethod', () => { - let paymentMethod; - - beforeEach(() => { - paymentMethod = new PaymentMethod(); - }); - - it('check "number" property setters/getters', () => { - paymentMethod.setProperty('number', 'number_0'); - expect(paymentMethod.getProperty('number')).toBe('number_0'); - expect(paymentMethod.getNumber()).toBe('number_0'); - expect(paymentMethod.number).toBe('number_0'); - - paymentMethod.setNumber('number_1'); - expect(paymentMethod.getProperty('number')).toBe('number_1'); - expect(paymentMethod.getNumber()).toBe('number_1'); - expect(paymentMethod.number).toBe('number_1'); - - paymentMethod.number = 'number_2'; - expect(paymentMethod.getProperty('number')).toBe('number_2'); - expect(paymentMethod.getNumber()).toBe('number_2'); - expect(paymentMethod.number).toBe('number_2'); - }); - - it('check "active" property setters/getters', () => { - paymentMethod.setProperty('active', true); - expect(paymentMethod.getProperty('active')).toBe(true); - expect(paymentMethod.getActive()).toBe(true); - expect(paymentMethod.active).toBe(true); - - paymentMethod.setActive(false); - expect(paymentMethod.getProperty('active')).toBe(false); - expect(paymentMethod.getActive()).toBe(false); - expect(paymentMethod.active).toBe(false); - - paymentMethod.active = true; - expect(paymentMethod.getProperty('active')).toBe(true); - expect(paymentMethod.getActive()).toBe(true); - expect(paymentMethod.active).toBe(true); - }); - - it('check "paypal.subject" property setters/getters', () => { - paymentMethod.setProperty('paypal.subject', 'subject_0'); - expect(paymentMethod.getProperty('paypal.subject')).toBe('subject_0'); - expect(paymentMethod.getPaypalSubject()).toBe('subject_0'); - expect(paymentMethod['paypal.subject']).toBe('subject_0'); - - paymentMethod.setPaypalSubject('subject_1'); - expect(paymentMethod.getProperty('paypal.subject')).toBe('subject_1'); - expect(paymentMethod.getPaypalSubject()).toBe('subject_1'); - expect(paymentMethod['paypal.subject']).toBe('subject_1'); - - paymentMethod['paypal.subject'] = 'subject_2'; - expect(paymentMethod.getProperty('paypal.subject')).toBe('subject_2'); - expect(paymentMethod.getPaypalSubject()).toBe('subject_2'); - expect(paymentMethod['paypal.subject']).toBe('subject_2'); - }); - - it('check cast an properties to a native js type', () => { - paymentMethod.setProperty('number', 1); - expect(paymentMethod.getProperty('number')).toBe('1'); - paymentMethod.setProperty('number', true); - expect(paymentMethod.getProperty('number')).toBe('true'); - - paymentMethod.setProperty('active', 1); - expect(paymentMethod.getProperty('active')).toBe(true); - paymentMethod.setProperty('active', 0); - expect(paymentMethod.getProperty('active')).toBe(false); - paymentMethod.setProperty('active', ''); - expect(paymentMethod.getProperty('active')).toBe(false); - paymentMethod.setProperty('active', '123'); - expect(paymentMethod.getProperty('active')).toBe(true); - paymentMethod.setProperty('active', null); - expect(paymentMethod.getProperty('active')).toBe(false); - - paymentMethod.setProperty('paypal.subject', 1); - expect(paymentMethod.getProperty('paypal.subject')).toBe('1'); - paymentMethod.setProperty('paypal.subject', true); - expect(paymentMethod.getProperty('paypal.subject')).toBe('true'); - }); - - it('check "removeProperty" method', () => { - paymentMethod.setProperty('number', 'number'); - paymentMethod.removeProperty('number'); - - expect(paymentMethod.getProperty('number')).toBe(undefined); - expect(paymentMethod.number).toBe(undefined); - expect(paymentMethod.getNumber()).toBe(undefined); - }); - - it('check "removeDefine" method', () => { - paymentMethod.setProperty('number', 'number'); - paymentMethod.removeDefine('number'); - - expect(paymentMethod.number).toBe(undefined); - expect(paymentMethod.getProperty('number')).toBe('number'); - expect(paymentMethod.getNumber()).toBe('number'); - - paymentMethod.number = 'number_1'; - - expect(paymentMethod.number).toBe('number_1'); - expect(paymentMethod.getProperty('number')).toBe('number'); - expect(paymentMethod.getNumber()).toBe('number'); - }); -}); diff --git a/test/specs/entities/PaymentMethod.spec.ts b/test/specs/entities/PaymentMethod.spec.ts new file mode 100644 index 0000000..21661a0 --- /dev/null +++ b/test/specs/entities/PaymentMethod.spec.ts @@ -0,0 +1,51 @@ +import { describe, it, expect } from 'vitest'; + +// entities +import PaymentMethod from '@/entities/PaymentMethod'; + +// test utils +import expectEntity from '@test-utils/expectEntity'; + +describe('PaymentMethod Entity', () => { + it('should create a PaymentMethod with default values', () => { + const paymentMethod = PaymentMethod(); + + expectEntity(paymentMethod, { + active: undefined, + number: undefined, + 'paypal.subject': undefined, + }); + }); + + it('should create a PaymentMethod with provided properties', () => { + const props = { + active: true, + number: 'PAYPAL', + 'paypal.subject': 'dummy.subject', + }; + + const paymentMethod = PaymentMethod(props); + + expectEntity(paymentMethod, props); + expect(paymentMethod).toStrictEqual(props); + }); + + it('should create an instance of PaymentMethod', () => { + const paymentMethod = PaymentMethod(); + expect(paymentMethod instanceof PaymentMethod).toBe(true); + }); + + it('should be correct map', () => { + const paymentMethod = PaymentMethod({ + active: true, + number: 'PAYPAL', + 'paypal.subject': 'dummy.subject', + }); + + expect(paymentMethod.serialize()).toStrictEqual({ + active: 'true', + number: 'PAYPAL', + 'paypal.subject': 'dummy.subject', + }); + }); +}); diff --git a/test/specs/entities/Product.spec.js b/test/specs/entities/Product.spec.js deleted file mode 100644 index 1266df7..0000000 --- a/test/specs/entities/Product.spec.js +++ /dev/null @@ -1,258 +0,0 @@ -import Product from '@/entities/Product'; -import Constants from '@/Constants'; -import ProductDiscount from '@/entities/ProductDiscount'; - -describe('entities/Product', () => { - let product; - - beforeEach(() => { - product = new Product(); - }); - - it('check "number" property setters/getters', () => { - product.setProperty('number', 'number_0'); - expect(product.getProperty('number')).toBe('number_0'); - expect(product.getNumber()).toBe('number_0'); - expect(product.number).toBe('number_0'); - - product.setNumber('number_1'); - expect(product.getProperty('number')).toBe('number_1'); - expect(product.getNumber()).toBe('number_1'); - expect(product.number).toBe('number_1'); - - product.number = 'number_2'; - expect(product.getProperty('number')).toBe('number_2'); - expect(product.getNumber()).toBe('number_2'); - expect(product.number).toBe('number_2'); - }); - - it('check "name" property setters/getters', () => { - product.setProperty('name', 'name_0'); - expect(product.getProperty('name')).toBe('name_0'); - expect(product.getName()).toBe('name_0'); - expect(product.name).toBe('name_0'); - - product.setName('name_1'); - expect(product.getProperty('name')).toBe('name_1'); - expect(product.getName()).toBe('name_1'); - expect(product.name).toBe('name_1'); - - product.name = 'name_2'; - expect(product.getProperty('name')).toBe('name_2'); - expect(product.getName()).toBe('name_2'); - expect(product.name).toBe('name_2'); - }); - - it('check "active" property setters/getters', () => { - product.setProperty('active', true); - expect(product.getProperty('active')).toBe(true); - expect(product.getActive()).toBe(true); - expect(product.active).toBe(true); - - product.setActive(false); - expect(product.getProperty('active')).toBe(false); - expect(product.getActive()).toBe(false); - expect(product.active).toBe(false); - - product.active = true; - expect(product.getProperty('active')).toBe(true); - expect(product.getActive()).toBe(true); - expect(product.active).toBe(true); - }); - - it('check "version" property setters/getters', () => { - product.setProperty('version', '1.05'); - expect(product.getProperty('version')).toBe('1.05'); - expect(product.getVersion()).toBe('1.05'); - expect(product.version).toBe('1.05'); - - product.setVersion('2.0'); - expect(product.getProperty('version')).toBe('2.0'); - expect(product.getVersion()).toBe('2.0'); - expect(product.version).toBe('2.0'); - - product.version = '1.1'; - expect(product.getProperty('version')).toBe('1.1'); - expect(product.getVersion()).toBe('1.1'); - expect(product.version).toBe('1.1'); - }); - - it('check "description" property setters/getters', () => { - product.setProperty('description', 'description_0'); - expect(product.getProperty('description')).toBe('description_0'); - expect(product.getDescription()).toBe('description_0'); - expect(product.description).toBe('description_0'); - - product.setDescription('description_1'); - expect(product.getProperty('description')).toBe('description_1'); - expect(product.getDescription()).toBe('description_1'); - expect(product.description).toBe('description_1'); - - product.description = 'description_2'; - expect(product.getProperty('description')).toBe('description_2'); - expect(product.getDescription()).toBe('description_2'); - expect(product.description).toBe('description_2'); - }); - - it('check "licensingInfo" property setters/getters', () => { - product.setProperty('licensingInfo', 'licensingInfo_0'); - expect(product.getProperty('licensingInfo')).toBe('licensingInfo_0'); - expect(product.getLicensingInfo()).toBe('licensingInfo_0'); - expect(product.licensingInfo).toBe('licensingInfo_0'); - - product.setLicensingInfo('licensingInfo_1'); - expect(product.getProperty('licensingInfo')).toBe('licensingInfo_1'); - expect(product.getLicensingInfo()).toBe('licensingInfo_1'); - expect(product.licensingInfo).toBe('licensingInfo_1'); - - product.licensingInfo = 'licensingInfo_2'; - expect(product.getProperty('licensingInfo')).toBe('licensingInfo_2'); - expect(product.getLicensingInfo()).toBe('licensingInfo_2'); - expect(product.licensingInfo).toBe('licensingInfo_2'); - }); - - it('check "licenseeAutoCreate" property setters/getters', () => { - product.setProperty('licenseeAutoCreate', true); - expect(product.getProperty('licenseeAutoCreate')).toBe(true); - expect(product.getLicenseeAutoCreate()).toBe(true); - expect(product.licenseeAutoCreate).toBe(true); - - product.setLicenseeAutoCreate(false); - expect(product.getProperty('licenseeAutoCreate')).toBe(false); - expect(product.getLicenseeAutoCreate()).toBe(false); - expect(product.licenseeAutoCreate).toBe(false); - - product.licenseeAutoCreate = true; - expect(product.getProperty('licenseeAutoCreate')).toBe(true); - expect(product.getLicenseeAutoCreate()).toBe(true); - expect(product.licenseeAutoCreate).toBe(true); - }); - - it('check "licenseeSecretMode" property setters/getters', () => { - product.setProperty('licenseeSecretMode', Constants.Product.LicenseeSecretMode.DISABLED); - expect(product.getProperty('licenseeSecretMode')).toBe(Constants.Product.LicenseeSecretMode.DISABLED); - expect(product.getLicenseeSecretMode()).toBe(Constants.Product.LicenseeSecretMode.DISABLED); - expect(product.licenseeSecretMode).toBe(Constants.Product.LicenseeSecretMode.DISABLED); - - product.setLicenseeSecretMode(Constants.Product.LicenseeSecretMode.PREDEFINED); - expect(product.getProperty('licenseeSecretMode')).toBe(Constants.Product.LicenseeSecretMode.PREDEFINED); - expect(product.getLicenseeSecretMode()).toBe(Constants.Product.LicenseeSecretMode.PREDEFINED); - expect(product.licenseeSecretMode).toBe(Constants.Product.LicenseeSecretMode.PREDEFINED); - - product.licenseeSecretMode = Constants.Product.LicenseeSecretMode.CLIENT; - expect(product.getProperty('licenseeSecretMode')).toBe(Constants.Product.LicenseeSecretMode.CLIENT); - expect(product.getLicenseeSecretMode()).toBe(Constants.Product.LicenseeSecretMode.CLIENT); - expect(product.licenseeSecretMode).toBe(Constants.Product.LicenseeSecretMode.CLIENT); - }); - - it('check "inUse" property setters/getters', () => { - product.setProperty('inUse', true); - expect(product.getProperty('inUse')).toBe(true); - expect(product.getInUse()).toBe(true); - expect(product.inUse).toBe(true); - }); - - it('check "custom-property" property setters/getters', () => { - product.setProperty('custom_property', 'my_custom_property_0'); - expect(product.getProperty('custom_property')).toBe('my_custom_property_0'); - expect(product.custom_property).toBe('my_custom_property_0'); - - product.custom_property = 'my_custom_property_1'; - expect(product.getProperty('custom_property')).toBe('my_custom_property_1'); - expect(product.custom_property).toBe('my_custom_property_1'); - }); - - it('check "addDiscount" , "getProductDiscounts", "setProductDiscounts" methods', () => { - product.addDiscount(new ProductDiscount().setTotalPrice(10).setCurrency('EUR').setAmountFix(8)); - product.addDiscount(new ProductDiscount().setTotalPrice(20).setCurrency('EUR').setAmountPercent(50)); - product.addDiscount(new ProductDiscount().setTotalPrice(30).setCurrency('EUR').setAmountFix(25)); - product.addDiscount(new ProductDiscount().setTotalPrice(40).setCurrency('EUR').setAmountPercent(34)); - product.addDiscount(new ProductDiscount().setTotalPrice(50).setCurrency('EUR').setAmountFix(15)); - expect(product.getProductDiscounts().length).toBe(5); - - product.setProductDiscounts([ - new ProductDiscount().setTotalPrice(10).setCurrency('EUR').setAmountFix(8), - new ProductDiscount().setTotalPrice(20).setCurrency('EUR').setAmountPercent(50), - new ProductDiscount().setTotalPrice(30).setCurrency('EUR').setAmountFix(25), - ]); - - expect(product.getProductDiscounts().length).toBe(3); - - product.setProductDiscounts(new ProductDiscount().setTotalPrice(10).setCurrency('EUR').setAmountFix(8)); - expect(product.getProductDiscounts().length).toBe(1); - - product.setProductDiscounts(null); - expect(product.getProductDiscounts().length).toBe(0); - }); - - it('check cast an properties to a native js type', () => { - product.setProperty('number', 1); - expect(product.getProperty('number')).toBe('1'); - product.setProperty('number', true); - expect(product.getProperty('number')).toBe('true'); - - product.setProperty('active', 1); - expect(product.getProperty('active')).toBe(true); - product.setProperty('active', 0); - expect(product.getProperty('active')).toBe(false); - product.setProperty('active', ''); - expect(product.getProperty('active')).toBe(false); - product.setProperty('active', '123'); - expect(product.getProperty('active')).toBe(true); - product.setProperty('active', null); - expect(product.getProperty('active')).toBe(false); - - product.setProperty('name', 1); - expect(product.getProperty('name')).toBe('1'); - product.setProperty('name', true); - expect(product.getProperty('name')).toBe('true'); - - product.setProperty('version', 1); - expect(product.getProperty('version')).toBe('1'); - - product.setProperty('description', 1); - expect(product.getProperty('description')).toBe('1'); - product.setProperty('description', true); - expect(product.getProperty('description')).toBe('true'); - - product.setProperty('licensingInfo', 1); - expect(product.getProperty('licensingInfo')).toBe('1'); - product.setProperty('licensingInfo', true); - expect(product.getProperty('licensingInfo')).toBe('true'); - - product.setProperty('licenseeAutoCreate', 1); - expect(product.getProperty('licenseeAutoCreate')).toBe(true); - product.setProperty('licenseeAutoCreate', 0); - expect(product.getProperty('licenseeAutoCreate')).toBe(false); - product.setProperty('licenseeAutoCreate', ''); - expect(product.getProperty('licenseeAutoCreate')).toBe(false); - product.setProperty('licenseeAutoCreate', '123'); - expect(product.getProperty('licenseeAutoCreate')).toBe(true); - product.setProperty('licenseeAutoCreate', null); - expect(product.getProperty('licenseeAutoCreate')).toBe(false); - }); - - it('check "removeProperty" method', () => { - product.setProperty('number', 'number'); - product.removeProperty('number'); - - expect(product.getProperty('number')).toBe(undefined); - expect(product.number).toBe(undefined); - expect(product.getNumber()).toBe(undefined); - }); - - it('check "removeDefine" method', () => { - product.setProperty('number', 'number'); - product.removeDefine('number'); - - expect(product.number).toBe(undefined); - expect(product.getProperty('number')).toBe('number'); - expect(product.getNumber()).toBe('number'); - - product.number = 'number_1'; - - expect(product.number).toBe('number_1'); - expect(product.getProperty('number')).toBe('number'); - expect(product.getNumber()).toBe('number'); - }); -}); diff --git a/test/specs/entities/Product.spec.ts b/test/specs/entities/Product.spec.ts new file mode 100644 index 0000000..a594067 --- /dev/null +++ b/test/specs/entities/Product.spec.ts @@ -0,0 +1,225 @@ +import { describe, it, expect } from 'vitest'; + +// entities +import Product from '@/entities/Product'; +import ProductDiscount from '@/entities/ProductDiscount'; + +// test utils +import expectEntity from '@test-utils/expectEntity'; +import expectEntityProp from '@test-utils/expectEntityProp'; + +describe('Product entity', () => { + it('should create a Product with default properties', () => { + const product = Product(); + + expectEntity(product, { + active: undefined, + number: undefined, + name: undefined, + version: undefined, + description: undefined, + licensingInfo: undefined, + licenseeAutoCreate: undefined, + discounts: undefined, + inUse: undefined, + }); + }); + + it('should create a Product with provided properties', () => { + const props = { + active: true, + number: 'P1', + name: 'Sample Name', + version: '1.0', + description: 'Sample Description', + licensingInfo: 'Sample License Info', + licenseeAutoCreate: false, + discounts: [ProductDiscount({ totalPrice: 0, currency: 'EUR', amountFix: 5 })], + inUse: true, + }; + + const product = Product(props); + + expectEntity(product, props); + expect(product).toStrictEqual(props); + }); + + it('should set and get active correctly', () => { + const product = Product(); + + product.setActive(true); + expectEntityProp(product, 'active', true); + + product.active = false; + expectEntityProp(product, 'active', false); + + product.set('active', true); + expectEntityProp(product, 'active', true); + + product.setProperty('active', false); + expectEntityProp(product, 'active', false); + }); + + it('should set and get number correctly', () => { + const product = Product(); + + product.setNumber('P1'); + expectEntityProp(product, 'number', 'P1'); + + product.number = 'P2'; + expectEntityProp(product, 'number', 'P2'); + + product.set('number', 'P3'); + expectEntityProp(product, 'number', 'P3'); + + product.setProperty('number', 'P4'); + expectEntityProp(product, 'number', 'P4'); + }); + + it('should set and get name correctly', () => { + const product = Product(); + + product.setName('Name 1'); + expectEntityProp(product, 'name', 'Name 1'); + + product.name = 'Name 2'; + expectEntityProp(product, 'name', 'Name 2'); + + product.set('name', 'Name 3'); + expectEntityProp(product, 'name', 'Name 3'); + + product.setProperty('name', 'Name 4'); + expectEntityProp(product, 'name', 'Name 4'); + }); + + it('should set and get version correctly', () => { + const product = Product(); + + product.setVersion('1.0'); + expectEntityProp(product, 'version', '1.0'); + + product.version = '1.1'; + expectEntityProp(product, 'version', '1.1'); + + product.set('version', '1.2'); + expectEntityProp(product, 'version', '1.2'); + + product.setProperty('version', '1.3'); + expectEntityProp(product, 'version', '1.3'); + }); + + it('should set and get description correctly', () => { + const product = Product(); + + product.setDescription('Description 1'); + expectEntityProp(product, 'description', 'Description 1'); + + product.description = 'Description 2'; + expectEntityProp(product, 'description', 'Description 2'); + + product.set('description', 'Description 3'); + expectEntityProp(product, 'description', 'Description 3'); + + product.setProperty('description', 'Description 4'); + expectEntityProp(product, 'description', 'Description 4'); + }); + + it('should set and get licensingInfo correctly', () => { + const product = Product(); + + product.setLicensingInfo('Licensing Info 1'); + expectEntityProp(product, 'licensingInfo', 'Licensing Info 1'); + + product.licensingInfo = 'Licensing Info 2'; + expectEntityProp(product, 'licensingInfo', 'Licensing Info 2'); + + product.set('licensingInfo', 'Licensing Info 3'); + expectEntityProp(product, 'licensingInfo', 'Licensing Info 3'); + + product.setProperty('licensingInfo', 'Licensing Info 4'); + expectEntityProp(product, 'licensingInfo', 'Licensing Info 4'); + }); + + it('should set and get licenseeAutoCreate correctly', () => { + const product = Product(); + + product.setLicenseeAutoCreate(true); + expectEntityProp(product, 'licenseeAutoCreate', true); + + product.licenseeAutoCreate = false; + expectEntityProp(product, 'licenseeAutoCreate', false); + + product.set('licenseeAutoCreate', true); + expectEntityProp(product, 'licenseeAutoCreate', true); + + product.setProperty('licenseeAutoCreate', false); + expectEntityProp(product, 'licenseeAutoCreate', false); + }); + + it('should set and get discounts correctly', () => { + const product = Product(); + + const discount1 = ProductDiscount({ totalPrice: 10, currency: 'EUR', amountFix: 1 }); + const discount2 = ProductDiscount({ totalPrice: 20, currency: 'USD', amountPercent: 3 }); + const discount3 = ProductDiscount({ totalPrice: 30, currency: 'UAH', amountPercent: 5 }); + const discount4 = ProductDiscount({ totalPrice: 40, currency: 'GEL', amountFix: 10 }); + + product.setDiscounts([discount1, discount3]); + expectEntityProp(product, 'discounts', [discount1, discount3]); + + product.discounts = [discount2]; + expectEntityProp(product, 'discounts', [discount2]); + + product.set('discounts', [discount3, discount4]); + expectEntityProp(product, 'discounts', [discount3, discount4]); + + product.setProperty('discounts', [discount1, discount2, discount4]); + expectEntityProp(product, 'discounts', [discount1, discount2, discount4]); + + product.discounts.push(discount3); + expectEntityProp(product, 'discounts', [discount1, discount2, discount4, discount3]); + + product.removeDiscount(discount1); + product.removeDiscount(discount2); + product.removeDiscount(discount3); + expectEntityProp(product, 'discounts', [discount4]); + + product.getDiscounts()?.push(discount1); + expectEntityProp(product, 'discounts', [discount4, discount1]); + }); + + it('should create an instance of Product', () => { + const product = Product(); + expect(product instanceof Product).toBe(true); + }); + + it('should return correct map', () => { + const props = { + active: true, + number: 'P1', + name: 'Sample Name', + version: '1.0', + description: 'Sample Description', + licensingInfo: 'Sample License Info', + licenseeAutoCreate: false, + discounts: [ + ProductDiscount({ totalPrice: 200, currency: 'EUR', amountFix: 5 }), + ProductDiscount({ totalPrice: 50, currency: 'USD', amountPercent: 25 }), + ], + inUse: true, + }; + + const product = Product(props); + + expect(product.serialize()).toStrictEqual({ + active: 'true', + number: 'P1', + name: 'Sample Name', + version: '1.0', + description: 'Sample Description', + licensingInfo: 'Sample License Info', + licenseeAutoCreate: 'false', + discount: ['200;EUR;5', '50;USD;25%'], + }); + }); +}); diff --git a/test/specs/entities/ProductDiscount.spec.js b/test/specs/entities/ProductDiscount.spec.js deleted file mode 100644 index 3c863f2..0000000 --- a/test/specs/entities/ProductDiscount.spec.js +++ /dev/null @@ -1,147 +0,0 @@ -import ProductDiscount from '@/entities/ProductDiscount'; - -describe('entities/ProductDiscount', () => { - let productDiscount; - - beforeEach(() => { - productDiscount = new ProductDiscount(); - }); - - it('check "totalPrice" property setters/getters', () => { - productDiscount.setProperty('totalPrice', 10); - expect(productDiscount.getProperty('totalPrice')).toBe(10); - expect(productDiscount.getTotalPrice()).toBe(10); - expect(productDiscount.totalPrice).toBe(10); - - productDiscount.setTotalPrice(20); - expect(productDiscount.getProperty('totalPrice')).toBe(20); - expect(productDiscount.getTotalPrice()).toBe(20); - expect(productDiscount.totalPrice).toBe(20); - - productDiscount.totalPrice = 30; - expect(productDiscount.getProperty('totalPrice')).toBe(30); - expect(productDiscount.getTotalPrice()).toBe(30); - expect(productDiscount.totalPrice).toBe(30); - }); - - it('check "currency" property setters/getters', () => { - productDiscount.setProperty('currency', 'EUR'); - expect(productDiscount.getProperty('currency')).toBe('EUR'); - expect(productDiscount.getCurrency()).toBe('EUR'); - expect(productDiscount.currency).toBe('EUR'); - - productDiscount.setCurrency('USD'); - expect(productDiscount.getProperty('currency')).toBe('USD'); - expect(productDiscount.getCurrency()).toBe('USD'); - expect(productDiscount.currency).toBe('USD'); - - productDiscount.currency = 'BYN'; - expect(productDiscount.getProperty('currency')).toBe('BYN'); - expect(productDiscount.getCurrency()).toBe('BYN'); - expect(productDiscount.currency).toBe('BYN'); - }); - - it('check "amountFix" property setters/getters', () => { - productDiscount.setProperty('amountFix', 10); - expect(productDiscount.getProperty('amountFix')).toBe(10); - expect(productDiscount.getAmountFix()).toBe(10); - expect(productDiscount.amountFix).toBe(10); - - productDiscount.setAmountFix(20); - expect(productDiscount.getProperty('amountFix')).toBe(20); - expect(productDiscount.getAmountFix()).toBe(20); - expect(productDiscount.amountFix).toBe(20); - - productDiscount.amountFix = 30; - expect(productDiscount.getProperty('amountFix')).toBe(30); - expect(productDiscount.getAmountFix()).toBe(30); - expect(productDiscount.amountFix).toBe(30); - }); - - it('check "amountPercent" property setters/getters', () => { - productDiscount.setProperty('amountPercent', 10); - expect(productDiscount.getProperty('amountPercent')).toBe(10); - expect(productDiscount.getAmountPercent()).toBe(10); - expect(productDiscount.amountPercent).toBe(10); - - productDiscount.setAmountPercent(20); - expect(productDiscount.getProperty('amountPercent')).toBe(20); - expect(productDiscount.getAmountPercent()).toBe(20); - expect(productDiscount.amountPercent).toBe(20); - - productDiscount.amountPercent = 30; - expect(productDiscount.getProperty('amountPercent')).toBe(30); - expect(productDiscount.getAmountPercent()).toBe(30); - expect(productDiscount.amountPercent).toBe(30); - }); - - it('check "toString" method', () => { - productDiscount.setProperty('totalPrice', 100); - productDiscount.setProperty('currency', 'EUR'); - productDiscount.setProperty('amountFix', 5); - expect(productDiscount.toString()).toBe('100;EUR;5'); - - productDiscount.setProperty('totalPrice', 50); - productDiscount.setProperty('currency', 'USD'); - productDiscount.setProperty('amountPercent', 10); - expect(productDiscount.toString()).toBe('50;USD;10%'); - }); - - it('check cast an properties to a native js type', () => { - productDiscount.setProperty('totalPrice', '3.14'); - expect(productDiscount.getProperty('totalPrice')).toBe(3.14); - productDiscount.setProperty('totalPrice', '314e-2'); - expect(productDiscount.getProperty('totalPrice')).toBe(3.14); - productDiscount.setProperty('totalPrice', '0.0314E+2'); - expect(productDiscount.getProperty('totalPrice')).toBe(3.14); - productDiscount.setProperty('totalPrice', '3.14any non-numeric characters'); - expect(productDiscount.getProperty('totalPrice')).toBe(3.14); - - productDiscount.setProperty('currency', 1); - expect(productDiscount.getProperty('currency')).toBe('1'); - productDiscount.setProperty('currency', true); - expect(productDiscount.getProperty('currency')).toBe('true'); - - productDiscount.setProperty('amountFix', '3.14'); - expect(productDiscount.getProperty('amountFix')).toBe(3.14); - productDiscount.setProperty('amountFix', '314e-2'); - expect(productDiscount.getProperty('amountFix')).toBe(3.14); - productDiscount.setProperty('amountFix', '0.0314E+2'); - expect(productDiscount.getProperty('amountFix')).toBe(3.14); - productDiscount.setProperty('amountFix', '3.14any non-numeric characters'); - expect(productDiscount.getProperty('amountFix')).toBe(3.14); - - productDiscount.setProperty('amountPercent', '015'); - expect(productDiscount.getProperty('amountPercent')).toBe(15); - productDiscount.setProperty('amountPercent', 15.99); - expect(productDiscount.getProperty('amountPercent')).toBe(15); - productDiscount.setProperty('amountPercent', '15*3'); - expect(productDiscount.getProperty('amountPercent')).toBe(15); - productDiscount.setProperty('amountPercent', '15e2'); - expect(productDiscount.getProperty('amountPercent')).toBe(15); - }); - - it('check "removeProperty" method', () => { - productDiscount.setProperty('totalPrice', 10); - productDiscount.removeProperty('totalPrice'); - - expect(productDiscount.getProperty('totalPrice')).toBe(undefined); - expect(productDiscount.totalPrice).toBe(undefined); - expect(productDiscount.getTotalPrice()).toBe(undefined); - }); - - it('check "removeDefine" method', () => { - productDiscount.setProperty('totalPrice', 20); - productDiscount.removeDefine('totalPrice'); - - expect(productDiscount.totalPrice).toBe(undefined); - expect(productDiscount.getProperty('totalPrice')).toBe(20); - expect(productDiscount.getTotalPrice()).toBe(20); - - productDiscount.totalPrice = 30; - - expect(productDiscount.totalPrice).toBe(30); - expect(productDiscount.getProperty('totalPrice')).toBe(20); - expect(productDiscount.getTotalPrice()).toBe(20); - }); -}); diff --git a/test/specs/entities/ProductDiscount.spec.ts b/test/specs/entities/ProductDiscount.spec.ts new file mode 100644 index 0000000..a3307f1 --- /dev/null +++ b/test/specs/entities/ProductDiscount.spec.ts @@ -0,0 +1,170 @@ +import { describe, it, expect } from 'vitest'; + +// entities +import ProductDiscount from '@/entities/ProductDiscount'; + +// errors +import NlicError from '@/errors/NlicError'; + +// test utils +import expectEntity from '@test-utils/expectEntity'; +import expectEntityProp from '@test-utils/expectEntityProp'; + +describe('ProductDiscount entity', () => { + it('should create a ProductDiscount with default properties', () => { + const productDiscount = ProductDiscount(); + + expectEntity(productDiscount, { + totalPrice: undefined, + currency: undefined, + amountFix: undefined, + amountPercent: undefined, + }); + }); + + it('should throw if both "amountFix" and "amountPercent" are provided', () => { + expect(() => + ProductDiscount({ + amountFix: 100, + amountPercent: 10, + }), + ).toThrowError(new NlicError('Properties "amountFix" and "amountPercent" cannot be used at the same time')); + }); + + it('should allow creation with only "amountFix"', () => { + expect(() => + ProductDiscount({ + amountFix: 100, + }), + ).not.toThrow(); + }); + + it('should allow creation with only "amountPercent"', () => { + expect(() => + ProductDiscount({ + amountPercent: 10, + }), + ).not.toThrow(); + }); + + it('should create a ProductDiscount with provided properties', () => { + const props = { + totalPrice: 10, + currency: 'EUR', + amountFix: 100, + }; + + const discount = ProductDiscount(props); + + expectEntity(discount, props); + expect(discount).toStrictEqual(props); + }); + + it('should set and get totalPrice correctly', () => { + const discount = ProductDiscount(); + + discount.setTotalPrice(10); + expectEntityProp(discount, 'totalPrice', 10); + + discount.totalPrice = 20; + expectEntityProp(discount, 'totalPrice', 20); + + discount.set('totalPrice', 30); + expectEntityProp(discount, 'totalPrice', 30); + + discount.setProperty('totalPrice', 40); + expectEntityProp(discount, 'totalPrice', 40); + }); + + it('should set and get currency correctly', () => { + const discount = ProductDiscount(); + + discount.setCurrency('USD'); + expectEntityProp(discount, 'currency', 'USD'); + + discount.currency = 'EUR'; + expectEntityProp(discount, 'currency', 'EUR'); + + discount.set('currency', 'UAH'); + expectEntityProp(discount, 'currency', 'UAH'); + + discount.setProperty('currency', 'GEL'); + expectEntityProp(discount, 'currency', 'GEL'); + }); + + it('should set and get amountFix correctly', () => { + const discount = ProductDiscount(); + + discount.setAmountFix(10); + expectEntityProp(discount, 'amountFix', 10); + + discount.amountFix = 20; + expectEntityProp(discount, 'amountFix', 20); + + discount.set('amountFix', 30); + expectEntityProp(discount, 'amountFix', 30); + + discount.setProperty('amountFix', 40); + expectEntityProp(discount, 'amountFix', 40); + }); + + it('should set and get amountPercent correctly', () => { + const discount = ProductDiscount(); + + discount.setAmountPercent(10); + expectEntityProp(discount, 'amountPercent', 10); + + discount.amountPercent = 20; + expectEntityProp(discount, 'amountPercent', 20); + + discount.set('amountPercent', 30); + expectEntityProp(discount, 'amountPercent', 30); + + discount.setProperty('amountPercent', 40); + expectEntityProp(discount, 'amountPercent', 40); + }); + + it('should remove amountPercent when amountFix set', () => { + const discount = ProductDiscount({ + amountPercent: 100, + }); + + discount.amountFix = 20; + + expect(discount.amountPercent).toBeUndefined(); + expect(discount.amountFix).toBe(20); + }); + + it('should remove amountFix when amountPercent set', () => { + const discount = ProductDiscount({ + amountFix: 100, + }); + + discount.amountPercent = 20; + + expect(discount.amountFix).toBeUndefined(); + expect(discount.amountPercent).toBe(20); + }); + + it('should create an instance of ProductDiscount', () => { + const discount = ProductDiscount(); + expect(discount instanceof ProductDiscount).toBe(true); + }); + + it('should return correct string from toString()', () => { + const fixDiscount = ProductDiscount({ + totalPrice: 10, + currency: 'EUR', + amountFix: 2, + }); + + const percentDiscount = ProductDiscount({ + totalPrice: 100, + currency: 'USD', + amountPercent: 3, + }); + + expect(fixDiscount.toString()).toBe('10;EUR;2'); + expect(percentDiscount.toString()).toBe('100;USD;3%'); + }); +}); diff --git a/test/specs/entities/ProductModule.spec.js b/test/specs/entities/ProductModule.spec.js deleted file mode 100644 index 54a006f..0000000 --- a/test/specs/entities/ProductModule.spec.js +++ /dev/null @@ -1,246 +0,0 @@ -import ProductModule from '@/entities/ProductModule'; - -describe('entities/ProductModule', () => { - let productModule; - - beforeEach(() => { - productModule = new ProductModule(); - }); - - it('check "number" property setters/getters', () => { - productModule.setProperty('number', 'number_0'); - expect(productModule.getProperty('number')).toBe('number_0'); - expect(productModule.getNumber()).toBe('number_0'); - expect(productModule.number).toBe('number_0'); - - productModule.setNumber('number_1'); - expect(productModule.getProperty('number')).toBe('number_1'); - expect(productModule.getNumber()).toBe('number_1'); - expect(productModule.number).toBe('number_1'); - - productModule.number = 'number_2'; - expect(productModule.getProperty('number')).toBe('number_2'); - expect(productModule.getNumber()).toBe('number_2'); - expect(productModule.number).toBe('number_2'); - }); - - it('check "name" property setters/getters', () => { - productModule.setProperty('name', 'name_0'); - expect(productModule.getProperty('name')).toBe('name_0'); - expect(productModule.getName()).toBe('name_0'); - expect(productModule.name).toBe('name_0'); - - productModule.setName('name_1'); - expect(productModule.getProperty('name')).toBe('name_1'); - expect(productModule.getName()).toBe('name_1'); - expect(productModule.name).toBe('name_1'); - - productModule.name = 'name_2'; - expect(productModule.getProperty('name')).toBe('name_2'); - expect(productModule.getName()).toBe('name_2'); - expect(productModule.name).toBe('name_2'); - }); - - it('check "active" property setters/getters', () => { - productModule.setProperty('active', true); - expect(productModule.getProperty('active')).toBe(true); - expect(productModule.getActive()).toBe(true); - expect(productModule.active).toBe(true); - - productModule.setActive(false); - expect(productModule.getProperty('active')).toBe(false); - expect(productModule.getActive()).toBe(false); - expect(productModule.active).toBe(false); - - productModule.active = true; - expect(productModule.getProperty('active')).toBe(true); - expect(productModule.getActive()).toBe(true); - expect(productModule.active).toBe(true); - }); - - it('check "licensingModel" property setters/getters', () => { - productModule.setProperty('licensingModel', 'TryAndBuy'); - expect(productModule.getProperty('licensingModel')).toBe('TryAndBuy'); - expect(productModule.getLicensingModel()).toBe('TryAndBuy'); - expect(productModule.licensingModel).toBe('TryAndBuy'); - - productModule.setLicensingModel('Subscription'); - expect(productModule.getProperty('licensingModel')).toBe('Subscription'); - expect(productModule.getLicensingModel()).toBe('Subscription'); - expect(productModule.licensingModel).toBe('Subscription'); - - productModule.licensingModel = 'Rental'; - expect(productModule.getProperty('licensingModel')).toBe('Rental'); - expect(productModule.getLicensingModel()).toBe('Rental'); - expect(productModule.licensingModel).toBe('Rental'); - }); - - it('check "maxCheckoutValidity" property setters/getters', () => { - productModule.setProperty('maxCheckoutValidity', 1); - expect(productModule.getProperty('maxCheckoutValidity')).toBe(1); - expect(productModule.getMaxCheckoutValidity()).toBe(1); - expect(productModule.maxCheckoutValidity).toBe(1); - - productModule.setMaxCheckoutValidity(2); - expect(productModule.getProperty('maxCheckoutValidity')).toBe(2); - expect(productModule.getMaxCheckoutValidity()).toBe(2); - expect(productModule.maxCheckoutValidity).toBe(2); - - productModule.maxCheckoutValidity = 3; - expect(productModule.getProperty('maxCheckoutValidity')).toBe(3); - expect(productModule.getMaxCheckoutValidity()).toBe(3); - expect(productModule.maxCheckoutValidity).toBe(3); - }); - - it('check "yellowThreshold" property setters/getters', () => { - productModule.setProperty('yellowThreshold', 1); - expect(productModule.getProperty('yellowThreshold')).toBe(1); - expect(productModule.getYellowThreshold()).toBe(1); - expect(productModule.yellowThreshold).toBe(1); - - productModule.setYellowThreshold(2); - expect(productModule.getProperty('yellowThreshold')).toBe(2); - expect(productModule.getYellowThreshold()).toBe(2); - expect(productModule.yellowThreshold).toBe(2); - - productModule.yellowThreshold = 3; - expect(productModule.getProperty('yellowThreshold')).toBe(3); - expect(productModule.getYellowThreshold()).toBe(3); - expect(productModule.yellowThreshold).toBe(3); - }); - - it('check "redThreshold" property setters/getters', () => { - productModule.setProperty('redThreshold', 1); - expect(productModule.getProperty('redThreshold')).toBe(1); - expect(productModule.getRedThreshold()).toBe(1); - expect(productModule.redThreshold).toBe(1); - - productModule.setRedThreshold(2); - expect(productModule.getProperty('redThreshold')).toBe(2); - expect(productModule.getRedThreshold()).toBe(2); - expect(productModule.redThreshold).toBe(2); - - productModule.redThreshold = 3; - expect(productModule.getProperty('redThreshold')).toBe(3); - expect(productModule.getRedThreshold()).toBe(3); - expect(productModule.redThreshold).toBe(3); - }); - - it('check "licenseTemplate" property setters/getters', () => { - productModule.setProperty('licenseTemplate', 'TIMEVOLUME'); - expect(productModule.getProperty('licenseTemplate')).toBe('TIMEVOLUME'); - expect(productModule.getLicenseTemplate()).toBe('TIMEVOLUME'); - expect(productModule.licenseTemplate).toBe('TIMEVOLUME'); - - productModule.setLicenseTemplate('FEATURE'); - expect(productModule.getProperty('licenseTemplate')).toBe('FEATURE'); - expect(productModule.getLicenseTemplate()).toBe('FEATURE'); - expect(productModule.licenseTemplate).toBe('FEATURE'); - - productModule.licenseTemplate = 'TIMEVOLUME'; - expect(productModule.getProperty('licenseTemplate')).toBe('TIMEVOLUME'); - expect(productModule.getLicenseTemplate()).toBe('TIMEVOLUME'); - expect(productModule.licenseTemplate).toBe('TIMEVOLUME'); - }); - - it('check "inUse" property setters/getters', () => { - productModule.setProperty('inUse', true); - expect(productModule.getProperty('inUse')).toBe(true); - expect(productModule.getInUse()).toBe(true); - expect(productModule.inUse).toBe(true); - }); - - it('check "custom-property" property setters/getters', () => { - productModule.setProperty('custom_property', 'my_custom_property_0'); - expect(productModule.getProperty('custom_property')).toBe('my_custom_property_0'); - expect(productModule.custom_property).toBe('my_custom_property_0'); - - productModule.custom_property = 'my_custom_property_1'; - expect(productModule.getProperty('custom_property')).toBe('my_custom_property_1'); - expect(productModule.custom_property).toBe('my_custom_property_1'); - }); - - it('check cast an properties to a native js type', () => { - productModule.setProperty('number', 1); - expect(productModule.getProperty('number')).toBe('1'); - productModule.setProperty('number', true); - expect(productModule.getProperty('number')).toBe('true'); - - productModule.setProperty('active', 1); - expect(productModule.getProperty('active')).toBe(true); - productModule.setProperty('active', 0); - expect(productModule.getProperty('active')).toBe(false); - productModule.setProperty('active', ''); - expect(productModule.getProperty('active')).toBe(false); - productModule.setProperty('active', '123'); - expect(productModule.getProperty('active')).toBe(true); - productModule.setProperty('active', null); - expect(productModule.getProperty('active')).toBe(false); - - productModule.setProperty('name', 1); - expect(productModule.getProperty('name')).toBe('1'); - productModule.setProperty('name', true); - expect(productModule.getProperty('name')).toBe('true'); - - productModule.setProperty('licensingModel', 1); - expect(productModule.getProperty('licensingModel')).toBe('1'); - productModule.setProperty('licensingModel', true); - expect(productModule.getProperty('licensingModel')).toBe('true'); - - productModule.setProperty('maxCheckoutValidity', '015'); - expect(productModule.getProperty('maxCheckoutValidity')).toBe(15); - productModule.setProperty('maxCheckoutValidity', 15.99); - expect(productModule.getProperty('maxCheckoutValidity')).toBe(15); - productModule.setProperty('maxCheckoutValidity', '15*3'); - expect(productModule.getProperty('maxCheckoutValidity')).toBe(15); - productModule.setProperty('maxCheckoutValidity', '15e2'); - expect(productModule.getProperty('maxCheckoutValidity')).toBe(15); - - productModule.setProperty('yellowThreshold', '015'); - expect(productModule.getProperty('yellowThreshold')).toBe(15); - productModule.setProperty('yellowThreshold', 15.99); - expect(productModule.getProperty('yellowThreshold')).toBe(15); - productModule.setProperty('yellowThreshold', '15*3'); - expect(productModule.getProperty('yellowThreshold')).toBe(15); - productModule.setProperty('yellowThreshold', '15e2'); - expect(productModule.getProperty('yellowThreshold')).toBe(15); - - productModule.setProperty('redThreshold', '015'); - expect(productModule.getProperty('redThreshold')).toBe(15); - productModule.setProperty('redThreshold', 15.99); - expect(productModule.getProperty('redThreshold')).toBe(15); - productModule.setProperty('redThreshold', '15*3'); - expect(productModule.getProperty('redThreshold')).toBe(15); - productModule.setProperty('redThreshold', '15e2'); - expect(productModule.getProperty('redThreshold')).toBe(15); - - productModule.setProperty('licenseTemplate', 1); - expect(productModule.getProperty('licenseTemplate')).toBe('1'); - productModule.setProperty('licenseTemplate', true); - expect(productModule.getProperty('licenseTemplate')).toBe('true'); - }); - - it('check "removeProperty" method', () => { - productModule.setProperty('number', 'number'); - productModule.removeProperty('number'); - - expect(productModule.getProperty('number')).toBe(undefined); - expect(productModule.number).toBe(undefined); - expect(productModule.getNumber()).toBe(undefined); - }); - - it('check "removeDefine" method', () => { - productModule.setProperty('number', 'number'); - productModule.removeDefine('number'); - - expect(productModule.number).toBe(undefined); - expect(productModule.getProperty('number')).toBe('number'); - expect(productModule.getNumber()).toBe('number'); - - productModule.number = 'number_1'; - - expect(productModule.number).toBe('number_1'); - expect(productModule.getProperty('number')).toBe('number'); - expect(productModule.getNumber()).toBe('number'); - }); -}); diff --git a/test/specs/entities/ProductModule.spec.ts b/test/specs/entities/ProductModule.spec.ts new file mode 100644 index 0000000..6548248 --- /dev/null +++ b/test/specs/entities/ProductModule.spec.ts @@ -0,0 +1,212 @@ +import { describe, it, expect } from 'vitest'; + +// constants +import LicensingModel from '@/constants/LicensingModel'; + +// entities +import ProductModule from '@/entities/ProductModule'; + +// test utils +import expectEntity from '@test-utils/expectEntity'; +import expectEntityProp from '@test-utils/expectEntityProp'; + +describe('ProductModule Entity', () => { + it('should create a LicenseTemplate with default properties', () => { + const productModule = ProductModule(); + + expectEntity(productModule, { + active: undefined, + number: undefined, + name: undefined, + licensingModel: undefined, + maxCheckoutValidity: undefined, + yellowThreshold: undefined, + redThreshold: undefined, + productNumber: undefined, + inUse: undefined, + }); + }); + + it('should create a LicenseTemplate with provided properties', () => { + const props = { + active: true, + number: 'PM1', + name: 'Name Sample', + licensingModel: LicensingModel.FLOATING, + maxCheckoutValidity: 3, + yellowThreshold: 5, + redThreshold: 8, + productNumber: 'P1', + inUse: true, + }; + + const productModule = ProductModule(props); + + expectEntity(productModule, props); + expect(productModule).toStrictEqual(props); + }); + + it('should set and get active status correctly', () => { + const productModule = ProductModule(); + + productModule.setActive(true); + expectEntityProp(productModule, 'active', true); + + productModule.active = false; + expectEntityProp(productModule, 'active', false); + + productModule.set('active', true); + expectEntityProp(productModule, 'active', true); + + productModule.setProperty('active', false); + expectEntityProp(productModule, 'active', false); + }); + + it('should set and get number correctly', () => { + const productModule = ProductModule(); + + productModule.setNumber('PM1'); + expectEntityProp(productModule, 'number', 'PM1'); + + productModule.number = 'PM2'; + expectEntityProp(productModule, 'number', 'PM2'); + + productModule.set('number', 'LT3'); + expectEntityProp(productModule, 'number', 'LT3'); + + productModule.setProperty('number', 'LT4'); + expectEntityProp(productModule, 'number', 'LT4'); + }); + + it('should set and get name correctly', () => { + const productModule = ProductModule(); + + productModule.setName('LT1'); + expectEntityProp(productModule, 'name', 'LT1'); + + productModule.name = 'LT2'; + expectEntityProp(productModule, 'name', 'LT2'); + + productModule.set('name', 'LT3'); + expectEntityProp(productModule, 'name', 'LT3'); + + productModule.setProperty('name', 'LT4'); + expectEntityProp(productModule, 'name', 'LT4'); + }); + + it('should set and get licensingModel correctly', () => { + const productModule = ProductModule(); + + productModule.setLicensingModel(LicensingModel.PAY_PER_USE); + expectEntityProp(productModule, 'licensingModel', LicensingModel.PAY_PER_USE); + + productModule.licensingModel = LicensingModel.QUOTA; + expectEntityProp(productModule, 'licensingModel', LicensingModel.QUOTA); + + productModule.set('licensingModel', LicensingModel.PRICING_TABLE); + expectEntityProp(productModule, 'licensingModel', LicensingModel.PRICING_TABLE); + + productModule.setProperty('licensingModel', LicensingModel.FLOATING); + expectEntityProp(productModule, 'licensingModel', LicensingModel.FLOATING); + }); + + it('should set and get maxCheckoutValidity correctly', () => { + const productModule = ProductModule(); + + productModule.setMaxCheckoutValidity(200); + expectEntityProp(productModule, 'maxCheckoutValidity', 200); + + productModule.maxCheckoutValidity = 50; + expectEntityProp(productModule, 'maxCheckoutValidity', 50); + + productModule.set('maxCheckoutValidity', 500); + expectEntityProp(productModule, 'maxCheckoutValidity', 500); + + productModule.setProperty('maxCheckoutValidity', 66); + expectEntityProp(productModule, 'maxCheckoutValidity', 66); + }); + + it('should set and get yellowThreshold correctly', () => { + const productModule = ProductModule(); + + productModule.setYellowThreshold(200); + expectEntityProp(productModule, 'yellowThreshold', 200); + + productModule.yellowThreshold = 50; + expectEntityProp(productModule, 'yellowThreshold', 50); + + productModule.set('yellowThreshold', 500); + expectEntityProp(productModule, 'yellowThreshold', 500); + + productModule.setProperty('yellowThreshold', 66); + expectEntityProp(productModule, 'yellowThreshold', 66); + }); + + it('should set and get redThreshold correctly', () => { + const productModule = ProductModule(); + + productModule.setRedThreshold(200); + expectEntityProp(productModule, 'redThreshold', 200); + + productModule.redThreshold = 50; + expectEntityProp(productModule, 'redThreshold', 50); + + productModule.set('redThreshold', 500); + expectEntityProp(productModule, 'redThreshold', 500); + + productModule.setProperty('redThreshold', 66); + expectEntityProp(productModule, 'redThreshold', 66); + }); + + it('should set and get productNumber correctly', () => { + const productModule = ProductModule(); + + productModule.setProductNumber('P1'); + expectEntityProp(productModule, 'productNumber', 'P1'); + + productModule.productNumber = 'P2'; + expectEntityProp(productModule, 'productNumber', 'P2'); + + productModule.set('productNumber', 'P3'); + expectEntityProp(productModule, 'productNumber', 'P3'); + + productModule.setProperty('productNumber', 'P4'); + expectEntityProp(productModule, 'productNumber', 'P4'); + }); + + it('should allow custom properties', () => { + const productModule = ProductModule({ number: 'L999', foo: 'bar', isFooBar: true }); + expect(productModule.foo).toBe('bar'); + expect(productModule.isFooBar).toBe(true); + }); + + it('should create an instance of ProductModule', () => { + const productModule = ProductModule(); + expect(productModule instanceof ProductModule).toBe(true); + }); + + it('should be correct map', () => { + const productModule = ProductModule({ + active: true, + number: 'PM1', + name: 'Name Sample', + licensingModel: LicensingModel.FLOATING, + maxCheckoutValidity: 3, + yellowThreshold: 5, + redThreshold: 8, + productNumber: 'P1', + inUse: true, + }); + + expect(productModule.serialize()).toStrictEqual({ + active: 'true', + number: 'PM1', + name: 'Name Sample', + licensingModel: LicensingModel.FLOATING, + maxCheckoutValidity: '3', + yellowThreshold: '5', + redThreshold: '8', + productNumber: 'P1', + }); + }); +}); diff --git a/test/specs/entities/Token.spec.js b/test/specs/entities/Token.spec.js deleted file mode 100644 index f1bd669..0000000 --- a/test/specs/entities/Token.spec.js +++ /dev/null @@ -1,267 +0,0 @@ -import Token from '@/entities/Token'; - -describe('entities/Token', () => { - let token; - - beforeEach(() => { - token = new Token(); - }); - - it('check "number" property getters', () => { - token.setProperty('number', 'number_0'); - expect(token.getProperty('number')).toBe('number_0'); - expect(token.getNumber()).toBe('number_0'); - expect(token.number).toBe('number_0'); - }); - - it('check "active" property setters/getters', () => { - token.setProperty('active', true); - expect(token.getProperty('active')).toBe(true); - expect(token.getActive()).toBe(true); - expect(token.active).toBe(true); - - token.setActive(false); - expect(token.getProperty('active')).toBe(false); - expect(token.getActive()).toBe(false); - expect(token.active).toBe(false); - - token.active = true; - expect(token.getProperty('active')).toBe(true); - expect(token.getActive()).toBe(true); - expect(token.active).toBe(true); - }); - - it('check "expirationTime" property setters/getters', () => { - token.setProperty('expirationTime', new Date('2055-01-01')); - expect(token.getProperty('expirationTime').toISOString()).toBe(new Date('2055-01-01').toISOString()); - expect(token.getExpirationTime().toISOString()).toBe(new Date('2055-01-01').toISOString()); - expect(token.expirationTime.toISOString()).toBe(new Date('2055-01-01').toISOString()); - - token.setExpirationTime(new Date('2055-01-02')); - expect(token.getProperty('expirationTime').toISOString()).toBe(new Date('2055-01-02').toISOString()); - expect(token.getExpirationTime().toISOString()).toBe(new Date('2055-01-02').toISOString()); - expect(token.expirationTime.toISOString()).toBe(new Date('2055-01-02').toISOString()); - - token.expirationTime = new Date('2055-01-03'); - expect(token.getProperty('expirationTime').toISOString()).toBe(new Date('2055-01-03').toISOString()); - expect(token.getExpirationTime().toISOString()).toBe(new Date('2055-01-03').toISOString()); - expect(token.expirationTime.toISOString()).toBe(new Date('2055-01-03').toISOString()); - }); - - it('check "vendorNumber" property setters/getters', () => { - token.setProperty('vendorNumber', 'vendorNumber_0'); - expect(token.getProperty('vendorNumber')).toBe('vendorNumber_0'); - expect(token.getVendorNumber()).toBe('vendorNumber_0'); - expect(token.vendorNumber).toBe('vendorNumber_0'); - - token.setVendorNumber('vendorNumber_1'); - expect(token.getProperty('vendorNumber')).toBe('vendorNumber_1'); - expect(token.getVendorNumber()).toBe('vendorNumber_1'); - expect(token.vendorNumber).toBe('vendorNumber_1'); - - token.vendorNumber = 'vendorNumber_2'; - expect(token.getProperty('vendorNumber')).toBe('vendorNumber_2'); - expect(token.getVendorNumber()).toBe('vendorNumber_2'); - expect(token.vendorNumber).toBe('vendorNumber_2'); - }); - - it('check "tokenType" property setters/getters', () => { - token.setProperty('tokenType', 'tokenType_0'); - expect(token.getProperty('tokenType')).toBe('tokenType_0'); - expect(token.getTokenType()).toBe('tokenType_0'); - expect(token.tokenType).toBe('tokenType_0'); - - token.setTokenType('tokenType_1'); - expect(token.getProperty('tokenType')).toBe('tokenType_1'); - expect(token.getTokenType()).toBe('tokenType_1'); - expect(token.tokenType).toBe('tokenType_1'); - - token.tokenType = 'tokenType_2'; - expect(token.getProperty('tokenType')).toBe('tokenType_2'); - expect(token.getTokenType()).toBe('tokenType_2'); - expect(token.tokenType).toBe('tokenType_2'); - }); - - it('check "licenseeNumber" property setters/getters', () => { - token.setProperty('licenseeNumber', 'licenseeNumber_0'); - expect(token.getProperty('licenseeNumber')).toBe('licenseeNumber_0'); - expect(token.getLicenseeNumber()).toBe('licenseeNumber_0'); - expect(token.licenseeNumber).toBe('licenseeNumber_0'); - - token.setLicenseeNumber('licenseeNumber_1'); - expect(token.getProperty('licenseeNumber')).toBe('licenseeNumber_1'); - expect(token.getLicenseeNumber()).toBe('licenseeNumber_1'); - expect(token.licenseeNumber).toBe('licenseeNumber_1'); - - token.licenseeNumber = 'licenseeNumber_2'; - expect(token.getProperty('licenseeNumber')).toBe('licenseeNumber_2'); - expect(token.getLicenseeNumber()).toBe('licenseeNumber_2'); - expect(token.licenseeNumber).toBe('licenseeNumber_2'); - }); - - it('check "successURL" property setters/getters', () => { - token.setProperty('successURL', 'successURL_0'); - expect(token.getProperty('successURL')).toBe('successURL_0'); - expect(token.getSuccessURL()).toBe('successURL_0'); - expect(token.successURL).toBe('successURL_0'); - - token.setSuccessURL('successURL_1'); - expect(token.getProperty('successURL')).toBe('successURL_1'); - expect(token.getSuccessURL()).toBe('successURL_1'); - expect(token.successURL).toBe('successURL_1'); - - token.successURL = 'successURL_2'; - expect(token.getProperty('successURL')).toBe('successURL_2'); - expect(token.getSuccessURL()).toBe('successURL_2'); - expect(token.successURL).toBe('successURL_2'); - }); - - it('check "successURLTitle" property setters/getters', () => { - token.setProperty('successURLTitle', 'successURLTitle_0'); - expect(token.getProperty('successURLTitle')).toBe('successURLTitle_0'); - expect(token.getSuccessURLTitle()).toBe('successURLTitle_0'); - expect(token.successURLTitle).toBe('successURLTitle_0'); - - token.setSuccessURLTitle('successURLTitle_1'); - expect(token.getProperty('successURLTitle')).toBe('successURLTitle_1'); - expect(token.getSuccessURLTitle()).toBe('successURLTitle_1'); - expect(token.successURLTitle).toBe('successURLTitle_1'); - - token.successURLTitle = 'successURLTitle_2'; - expect(token.getProperty('successURLTitle')).toBe('successURLTitle_2'); - expect(token.getSuccessURLTitle()).toBe('successURLTitle_2'); - expect(token.successURLTitle).toBe('successURLTitle_2'); - }); - - it('check "cancelURL" property setters/getters', () => { - token.setProperty('cancelURL', 'cancelURL_0'); - expect(token.getProperty('cancelURL')).toBe('cancelURL_0'); - expect(token.getCancelURL()).toBe('cancelURL_0'); - expect(token.cancelURL).toBe('cancelURL_0'); - - token.setCancelURL('cancelURL_1'); - expect(token.getProperty('cancelURL')).toBe('cancelURL_1'); - expect(token.getCancelURL()).toBe('cancelURL_1'); - expect(token.cancelURL).toBe('cancelURL_1'); - - token.cancelURL = 'cancelURL_2'; - expect(token.getProperty('cancelURL')).toBe('cancelURL_2'); - expect(token.getCancelURL()).toBe('cancelURL_2'); - expect(token.cancelURL).toBe('cancelURL_2'); - }); - - it('check "cancelURLTitle" property setters/getters', () => { - token.setProperty('cancelURLTitle', 'cancelURLTitle_0'); - expect(token.getProperty('cancelURLTitle')).toBe('cancelURLTitle_0'); - expect(token.getCancelURLTitle()).toBe('cancelURLTitle_0'); - expect(token.cancelURLTitle).toBe('cancelURLTitle_0'); - - token.setCancelURLTitle('cancelURLTitle_1'); - expect(token.getProperty('cancelURLTitle')).toBe('cancelURLTitle_1'); - expect(token.getCancelURLTitle()).toBe('cancelURLTitle_1'); - expect(token.cancelURLTitle).toBe('cancelURLTitle_1'); - - token.cancelURLTitle = 'cancelURLTitle_2'; - expect(token.getProperty('cancelURLTitle')).toBe('cancelURLTitle_2'); - expect(token.getCancelURLTitle()).toBe('cancelURLTitle_2'); - expect(token.cancelURLTitle).toBe('cancelURLTitle_2'); - }); - - it('check "shopURL" property setters/getters', () => { - token.setProperty('shopURL', 'http://shop_url_example.com'); - expect(token.getProperty('shopURL')).toBe('http://shop_url_example.com'); - expect(token.getShopURL()).toBe('http://shop_url_example.com'); - expect(token.shopURL).toBe('http://shop_url_example.com'); - }); - - it('check cast an properties to a native js type', () => { - token.setProperty('number', 1); - expect(token.getProperty('number')).toBe('1'); - - token = new Token(); - token.setProperty('number', true); - expect(token.getProperty('number')).toBe('true'); - - token.setProperty('active', 1); - expect(token.getProperty('active')).toBe(true); - token.setProperty('active', 0); - expect(token.getProperty('active')).toBe(false); - token.setProperty('active', ''); - expect(token.getProperty('active')).toBe(false); - token.setProperty('active', '123'); - expect(token.getProperty('active')).toBe(true); - token.setProperty('active', null); - expect(token.getProperty('active')).toBe(false); - - token.setProperty('expirationTime', '2055-01-01'); - expect(token.getProperty('expirationTime') instanceof Date).toBe(true); - token.setProperty('expirationTime', new Date()); - expect(token.getProperty('expirationTime') instanceof Date).toBe(true); - - token.setProperty('vendorNumber', 1); - expect(token.getProperty('vendorNumber')).toBe('1'); - token.setProperty('vendorNumber', true); - expect(token.getProperty('vendorNumber')).toBe('true'); - - token.setProperty('tokenType', 1); - expect(token.getProperty('tokenType')).toBe('1'); - token.setProperty('tokenType', true); - expect(token.getProperty('tokenType')).toBe('true'); - - token.setProperty('licenseeNumber', 1); - expect(token.getProperty('licenseeNumber')).toBe('1'); - token.setProperty('licenseeNumber', true); - expect(token.getProperty('licenseeNumber')).toBe('true'); - - token.setProperty('successURL', 1); - expect(token.getProperty('successURL')).toBe('1'); - token.setProperty('successURL', true); - expect(token.getProperty('successURL')).toBe('true'); - - token.setProperty('successURLTitle', 1); - expect(token.getProperty('successURLTitle')).toBe('1'); - token.setProperty('successURLTitle', true); - expect(token.getProperty('successURLTitle')).toBe('true'); - - token.setProperty('cancelURL', 1); - expect(token.getProperty('cancelURL')).toBe('1'); - token.setProperty('cancelURL', true); - expect(token.getProperty('cancelURL')).toBe('true'); - - token.setProperty('cancelURLTitle', 1); - expect(token.getProperty('cancelURLTitle')).toBe('1'); - token.setProperty('cancelURLTitle', true); - expect(token.getProperty('cancelURLTitle')).toBe('true'); - - token.setProperty('shopURL', 1); - expect(token.getProperty('shopURL')).toBe('1'); - - token = new Token(); - token.setProperty('shopURL', true); - expect(token.getProperty('shopURL')).toBe('true'); - }); - - it('check "removeProperty" method', () => { - token.setProperty('successURL', 'successURL'); - token.removeProperty('successURL'); - - expect(token.getProperty('successURL')).toBe(undefined); - expect(token.successURL).toBe(undefined); - expect(token.getSuccessURL()).toBe(undefined); - }); - - it('check "removeDefine" method', () => { - token.setProperty('successURL', 'successURL'); - token.removeDefine('successURL'); - - expect(token.successURL).toBe(undefined); - expect(token.getProperty('successURL')).toBe('successURL'); - expect(token.getSuccessURL()).toBe('successURL'); - - token.successURL = 'successURL_1'; - - expect(token.successURL).toBe('successURL_1'); - expect(token.getProperty('successURL')).toBe('successURL'); - expect(token.getSuccessURL()).toBe('successURL'); - }); -}); diff --git a/test/specs/entities/Token.spec.ts b/test/specs/entities/Token.spec.ts new file mode 100644 index 0000000..1fc300b --- /dev/null +++ b/test/specs/entities/Token.spec.ts @@ -0,0 +1,359 @@ +import { describe, it, expect } from 'vitest'; + +// constants +import ApiKeyRole from '@/constants/ApiKeyRole'; +import TokenType from '@/constants/TokenType'; + +// entities +import Token from '@/entities/Token'; + +// test utils +import expectEntity from '@test-utils/expectEntity'; +import expectEntityProp from '@test-utils/expectEntityProp'; + +describe('Token entity', () => { + it('should create a Token with default properties', () => { + const token = Token(); + + expectEntity(token, { + active: undefined, + number: undefined, + expirationTime: undefined, + tokenType: undefined, + licenseeNumber: undefined, + action: undefined, + apiKeyRole: undefined, + bundleNumber: undefined, + bundlePrice: undefined, + productNumber: undefined, + predefinedShoppingItem: undefined, + successURL: undefined, + successURLTitle: undefined, + cancelURL: undefined, + cancelURLTitle: undefined, + shopURL: undefined, + }); + }); + + it('should create a Token with provided properties', () => { + const props = { + active: true, + number: 'T1', + expirationTime: new Date(), + tokenType: TokenType.SHOP, + licenseeNumber: 'L1', + action: 'action1', + apiKeyRole: ApiKeyRole.ROLE_APIKEY_LICENSEE, + bundleNumber: 'B1', + bundlePrice: 2.99, + productNumber: 'P1', + predefinedShoppingItem: 'SI1', + successURL: 'SURL1', + successURLTitle: 'STitle1', + cancelURL: 'CURL1', + cancelURLTitle: 'CTitle1', + shopURL: 'http://some-shop.url', + }; + + const token = Token(props); + + expectEntity(token, props); + expect(token).toStrictEqual(props); + }); + + it('should set and get active correctly', () => { + const token = Token(); + + token.setActive(true); + expectEntityProp(token, 'active', true); + + token.active = false; + expectEntityProp(token, 'active', false); + + token.set('active', true); + expectEntityProp(token, 'active', true); + + token.setProperty('active', false); + expectEntityProp(token, 'active', false); + }); + + it('should set and get number correctly', () => { + const token = Token(); + + token.setNumber('T1'); + expectEntityProp(token, 'number', 'T1'); + + token.number = 'T2'; + expectEntityProp(token, 'number', 'T2'); + + token.set('number', 'T3'); + expectEntityProp(token, 'number', 'T3'); + + token.setProperty('number', 'T4'); + expectEntityProp(token, 'number', 'T4'); + }); + + it('should set and get expirationTime correctly', () => { + const token = Token(); + + const date1 = new Date(); + token.setExpirationTime(date1); + expectEntityProp(token, 'expirationTime', date1); + + const date2 = new Date(); + token.expirationTime = date2; + expectEntityProp(token, 'expirationTime', date2); + + const date3 = new Date(); + token.set('expirationTime', date3); + expectEntityProp(token, 'expirationTime', date3); + + const date4 = new Date(); + token.setProperty('expirationTime', date4); + expectEntityProp(token, 'expirationTime', date4); + }); + + it('should set and get tokenType correctly', () => { + const token = Token(); + + token.setTokenType(TokenType.DEFAULT); + expectEntityProp(token, 'tokenType', TokenType.DEFAULT); + + token.tokenType = TokenType.SHOP; + expectEntityProp(token, 'tokenType', TokenType.SHOP); + + token.set('tokenType', TokenType.ACTION); + expectEntityProp(token, 'tokenType', TokenType.ACTION); + + token.setProperty('tokenType', TokenType.APIKEY); + expectEntityProp(token, 'tokenType', TokenType.APIKEY); + }); + + it('should set and get licenseeNumber correctly', () => { + const token = Token(); + + token.setLicenseeNumber('L1'); + expectEntityProp(token, 'licenseeNumber', 'L1'); + + token.licenseeNumber = 'L2'; + expectEntityProp(token, 'licenseeNumber', 'L2'); + + token.set('licenseeNumber', 'L3'); + expectEntityProp(token, 'licenseeNumber', 'L3'); + + token.setProperty('licenseeNumber', 'L4'); + expectEntityProp(token, 'licenseeNumber', 'L4'); + }); + + it('should set and get action correctly', () => { + const token = Token(); + + token.setAction('Action1'); + expectEntityProp(token, 'action', 'Action1'); + + token.action = 'Action2'; + expectEntityProp(token, 'action', 'Action2'); + + token.set('action', 'Action3'); + expectEntityProp(token, 'action', 'Action3'); + + token.setProperty('action', 'Action4'); + expectEntityProp(token, 'action', 'Action4'); + }); + + it('should set and get apiKeyRole correctly', () => { + const token = Token(); + + token.setApiKeyRole(ApiKeyRole.ROLE_APIKEY_ADMIN); + expectEntityProp(token, 'apiKeyRole', ApiKeyRole.ROLE_APIKEY_ADMIN); + + token.apiKeyRole = ApiKeyRole.ROLE_APIKEY_ANALYTICS; + expectEntityProp(token, 'apiKeyRole', ApiKeyRole.ROLE_APIKEY_ANALYTICS); + + token.set('apiKeyRole', ApiKeyRole.ROLE_APIKEY_MAINTENANCE); + expectEntityProp(token, 'apiKeyRole', ApiKeyRole.ROLE_APIKEY_MAINTENANCE); + + token.setProperty('apiKeyRole', ApiKeyRole.ROLE_APIKEY_LICENSEE); + expectEntityProp(token, 'apiKeyRole', ApiKeyRole.ROLE_APIKEY_LICENSEE); + }); + + it('should set and get bundleNumber correctly', () => { + const token = Token(); + + token.setBundleNumber('B1'); + expectEntityProp(token, 'bundleNumber', 'B1'); + + token.bundleNumber = 'B2'; + expectEntityProp(token, 'bundleNumber', 'B2'); + + token.set('bundleNumber', 'B3'); + expectEntityProp(token, 'bundleNumber', 'B3'); + + token.setProperty('bundleNumber', 'B4'); + expectEntityProp(token, 'bundleNumber', 'B4'); + }); + + it('should set and get bundlePrice correctly', () => { + const token = Token(); + + token.setBundlePrice(2.99); + expectEntityProp(token, 'bundlePrice', 2.99); + + token.bundlePrice = 3.99; + expectEntityProp(token, 'bundlePrice', 3.99); + + token.set('bundlePrice', 4.99); + expectEntityProp(token, 'bundlePrice', 4.99); + + token.setProperty('bundlePrice', 5.99); + expectEntityProp(token, 'bundlePrice', 5.99); + }); + + it('should set and get productNumber correctly', () => { + const token = Token(); + + token.setProductNumber('P1'); + expectEntityProp(token, 'productNumber', 'P1'); + + token.productNumber = 'P2'; + expectEntityProp(token, 'productNumber', 'P2'); + + token.set('productNumber', 'P3'); + expectEntityProp(token, 'productNumber', 'P3'); + + token.setProperty('productNumber', 'P4'); + expectEntityProp(token, 'productNumber', 'P4'); + }); + + it('should set and get predefinedShoppingItem correctly', () => { + const token = Token(); + + token.setPredefinedShoppingItem('SI1'); + expectEntityProp(token, 'predefinedShoppingItem', 'SI1'); + + token.predefinedShoppingItem = 'SI2'; + expectEntityProp(token, 'predefinedShoppingItem', 'SI2'); + + token.set('predefinedShoppingItem', 'SI3'); + expectEntityProp(token, 'predefinedShoppingItem', 'SI3'); + + token.setProperty('predefinedShoppingItem', 'SI4'); + expectEntityProp(token, 'predefinedShoppingItem', 'SI4'); + }); + + it('should set and get successURL correctly', () => { + const token = Token(); + + token.setSuccessURL('URL1'); + expectEntityProp(token, 'successURL', 'URL1'); + + token.successURL = 'URL2'; + expectEntityProp(token, 'successURL', 'URL2'); + + token.set('successURL', 'URL3'); + expectEntityProp(token, 'successURL', 'URL3'); + + token.setProperty('successURL', 'URL4'); + expectEntityProp(token, 'successURL', 'URL4'); + }); + + it('should set and get successURLTitle correctly', () => { + const token = Token(); + + token.setSuccessURLTitle('Title1'); + expectEntityProp(token, 'successURLTitle', 'Title1'); + + token.successURLTitle = 'Title2'; + expectEntityProp(token, 'successURLTitle', 'Title2'); + + token.set('successURLTitle', 'Title3'); + expectEntityProp(token, 'successURLTitle', 'Title3'); + + token.setProperty('successURLTitle', 'Title4'); + expectEntityProp(token, 'successURLTitle', 'Title4'); + }); + + it('should set and get cancelURL correctly', () => { + const token = Token(); + + token.setCancelURL('URL1'); + expectEntityProp(token, 'cancelURL', 'URL1'); + + token.cancelURL = 'URL2'; + expectEntityProp(token, 'cancelURL', 'URL2'); + + token.set('cancelURL', 'URL3'); + expectEntityProp(token, 'cancelURL', 'URL3'); + + token.setProperty('cancelURL', 'URL4'); + expectEntityProp(token, 'cancelURL', 'URL4'); + }); + + it('should set and get cancelURLTitle correctly', () => { + const token = Token(); + + token.setCancelURLTitle('Title1'); + expectEntityProp(token, 'cancelURLTitle', 'Title1'); + + token.cancelURLTitle = 'Title2'; + expectEntityProp(token, 'cancelURLTitle', 'Title2'); + + token.set('cancelURLTitle', 'Title3'); + expectEntityProp(token, 'cancelURLTitle', 'Title3'); + + token.setProperty('cancelURLTitle', 'Title4'); + expectEntityProp(token, 'cancelURLTitle', 'Title4'); + }); + + it('should get shopURL correctly', () => { + const token = Token({ + shopURL: 'https://some-shop.url', + }); + + expectEntityProp(token, 'shopURL', 'https://some-shop.url'); + }); + + it('should create an instance of Token', () => { + const token = Token(); + expect(token instanceof Token).toBe(true); + }); + + it('should be correct map', () => { + const token = Token({ + active: true, + number: 'T1', + expirationTime: new Date('2024-01-03T12:00:00.000Z'), + tokenType: TokenType.SHOP, + licenseeNumber: 'L1', + action: 'action1', + apiKeyRole: ApiKeyRole.ROLE_APIKEY_LICENSEE, + bundleNumber: 'B1', + bundlePrice: 2.99, + productNumber: 'P1', + predefinedShoppingItem: 'SI1', + successURL: 'SURL1', + successURLTitle: 'STitle1', + cancelURL: 'CURL1', + cancelURLTitle: 'CTitle1', + shopURL: 'http://some-shop.url', + }); + + expect(token.serialize()).toStrictEqual({ + active: 'true', + number: 'T1', + expirationTime: '2024-01-03T12:00:00.000Z', + tokenType: TokenType.SHOP, + licenseeNumber: 'L1', + action: 'action1', + apiKeyRole: ApiKeyRole.ROLE_APIKEY_LICENSEE, + bundleNumber: 'B1', + bundlePrice: '2.99', + productNumber: 'P1', + predefinedShoppingItem: 'SI1', + successURL: 'SURL1', + successURLTitle: 'STitle1', + cancelURL: 'CURL1', + cancelURLTitle: 'CTitle1', + }); + }); +}); diff --git a/test/specs/entities/Transaction.spec.js b/test/specs/entities/Transaction.spec.js deleted file mode 100644 index 35695eb..0000000 --- a/test/specs/entities/Transaction.spec.js +++ /dev/null @@ -1,293 +0,0 @@ -import Transaction from '@/entities/Transaction'; - -describe('entities/Transaction', () => { - let transaction; - - beforeEach(() => { - transaction = new Transaction(); - }); - - it('check "number" property setters/getters', () => { - transaction.setProperty('number', 'number_0'); - expect(transaction.getProperty('number')).toBe('number_0'); - expect(transaction.getNumber()).toBe('number_0'); - expect(transaction.number).toBe('number_0'); - - transaction.setNumber('number_1'); - expect(transaction.getProperty('number')).toBe('number_1'); - expect(transaction.getNumber()).toBe('number_1'); - expect(transaction.number).toBe('number_1'); - - transaction.number = 'number_2'; - expect(transaction.getProperty('number')).toBe('number_2'); - expect(transaction.getNumber()).toBe('number_2'); - expect(transaction.number).toBe('number_2'); - }); - - it('check "name" property setters/getters', () => { - transaction.setProperty('name', 'name_0'); - expect(transaction.getProperty('name')).toBe('name_0'); - expect(transaction.getName()).toBe('name_0'); - expect(transaction.name).toBe('name_0'); - - transaction.setName('name_1'); - expect(transaction.getProperty('name')).toBe('name_1'); - expect(transaction.getName()).toBe('name_1'); - expect(transaction.name).toBe('name_1'); - - transaction.name = 'name_2'; - expect(transaction.getProperty('name')).toBe('name_2'); - expect(transaction.getName()).toBe('name_2'); - expect(transaction.name).toBe('name_2'); - }); - - it('check "status" property setters/getters', () => { - transaction.setProperty('status', 'status_0'); - expect(transaction.getProperty('status')).toBe('status_0'); - expect(transaction.getStatus()).toBe('status_0'); - expect(transaction.status).toBe('status_0'); - - transaction.setStatus('status_1'); - expect(transaction.getProperty('status')).toBe('status_1'); - expect(transaction.getStatus()).toBe('status_1'); - expect(transaction.status).toBe('status_1'); - - transaction.status = 'status_2'; - expect(transaction.getProperty('status')).toBe('status_2'); - expect(transaction.getStatus()).toBe('status_2'); - expect(transaction.status).toBe('status_2'); - }); - - it('check "source" property setters/getters', () => { - transaction.setProperty('source', 'source_0'); - expect(transaction.getProperty('source')).toBe('source_0'); - expect(transaction.getSource()).toBe('source_0'); - expect(transaction.source).toBe('source_0'); - - transaction.setSource('source_1'); - expect(transaction.getProperty('source')).toBe('source_1'); - expect(transaction.getSource()).toBe('source_1'); - expect(transaction.source).toBe('source_1'); - - transaction.source = 'source_2'; - expect(transaction.getProperty('source')).toBe('source_2'); - expect(transaction.getSource()).toBe('source_2'); - expect(transaction.source).toBe('source_2'); - }); - - it('check "grandTotal" property setters/getters', () => { - transaction.setProperty('grandTotal', 1); - expect(transaction.getProperty('grandTotal')).toBe(1); - expect(transaction.getGrandTotal()).toBe(1); - expect(transaction.grandTotal).toBe(1); - - transaction.setGrandTotal(2); - expect(transaction.getProperty('grandTotal')).toBe(2); - expect(transaction.getGrandTotal()).toBe(2); - expect(transaction.grandTotal).toBe(2); - - transaction.grandTotal = 3; - expect(transaction.getProperty('grandTotal')).toBe(3); - expect(transaction.getGrandTotal()).toBe(3); - expect(transaction.grandTotal).toBe(3); - }); - - it('check "discount" property setters/getters', () => { - transaction.setProperty('discount', 1); - expect(transaction.getProperty('discount')).toBe(1); - expect(transaction.getDiscount()).toBe(1); - expect(transaction.discount).toBe(1); - - transaction.setDiscount(2); - expect(transaction.getProperty('discount')).toBe(2); - expect(transaction.getDiscount()).toBe(2); - expect(transaction.discount).toBe(2); - - transaction.discount = 3; - expect(transaction.getProperty('discount')).toBe(3); - expect(transaction.getDiscount()).toBe(3); - expect(transaction.discount).toBe(3); - }); - - it('check "currency" property setters/getters', () => { - transaction.setProperty('currency', 'EUR'); - expect(transaction.getProperty('currency')).toBe('EUR'); - expect(transaction.getCurrency()).toBe('EUR'); - expect(transaction.currency).toBe('EUR'); - - transaction.setCurrency('USD'); - expect(transaction.getProperty('currency')).toBe('USD'); - expect(transaction.getCurrency()).toBe('USD'); - expect(transaction.currency).toBe('USD'); - - transaction.currency = 'BYN'; - expect(transaction.getProperty('currency')).toBe('BYN'); - expect(transaction.getCurrency()).toBe('BYN'); - expect(transaction.currency).toBe('BYN'); - }); - - it('check "dateCreated" property setters/getters', () => { - transaction.setProperty('dateCreated', new Date('2055-01-01')); - expect(transaction.getProperty('dateCreated').toISOString()).toBe(new Date('2055-01-01').toISOString()); - expect(transaction.getDateCreated().toISOString()).toBe(new Date('2055-01-01').toISOString()); - expect(transaction.dateCreated.toISOString()).toBe(new Date('2055-01-01').toISOString()); - - transaction.setDateCreated(new Date('2055-01-02')); - expect(transaction.getProperty('dateCreated').toISOString()).toBe(new Date('2055-01-02').toISOString()); - expect(transaction.getDateCreated().toISOString()).toBe(new Date('2055-01-02').toISOString()); - expect(transaction.dateCreated.toISOString()).toBe(new Date('2055-01-02').toISOString()); - - transaction.dateCreated = new Date('2055-01-03'); - expect(transaction.getProperty('dateCreated').toISOString()).toBe(new Date('2055-01-03').toISOString()); - expect(transaction.getDateCreated().toISOString()).toBe(new Date('2055-01-03').toISOString()); - expect(transaction.dateCreated.toISOString()).toBe(new Date('2055-01-03').toISOString()); - }); - - it('check "dateClosed" property setters/getters', () => { - transaction.setProperty('dateClosed', new Date('2055-01-01')); - expect(transaction.getProperty('dateClosed').toISOString()).toBe(new Date('2055-01-01').toISOString()); - expect(transaction.getDateClosed().toISOString()).toBe(new Date('2055-01-01').toISOString()); - expect(transaction.dateClosed.toISOString()).toBe(new Date('2055-01-01').toISOString()); - - transaction.setDateClosed(new Date('2055-01-02')); - expect(transaction.getProperty('dateClosed').toISOString()).toBe(new Date('2055-01-02').toISOString()); - expect(transaction.getDateClosed().toISOString()).toBe(new Date('2055-01-02').toISOString()); - expect(transaction.dateClosed.toISOString()).toBe(new Date('2055-01-02').toISOString()); - - transaction.dateClosed = new Date('2055-01-03'); - expect(transaction.getProperty('dateClosed').toISOString()).toBe(new Date('2055-01-03').toISOString()); - expect(transaction.getDateClosed().toISOString()).toBe(new Date('2055-01-03').toISOString()); - expect(transaction.dateClosed.toISOString()).toBe(new Date('2055-01-03').toISOString()); - }); - - it('check "active" property setters/getters', () => { - transaction.setActive(); - expect(transaction.getProperty('active')).toBe(true); - expect(transaction.active).toBe(true); - }); - - it('check "paymentMethod" property setters/getters', () => { - transaction.setProperty('paymentMethod', 'paymentMethod_0'); - expect(transaction.getProperty('paymentMethod')).toBe('paymentMethod_0'); - expect(transaction.getPaymentMethod()).toBe('paymentMethod_0'); - expect(transaction.paymentMethod).toBe('paymentMethod_0'); - - transaction.setPaymentMethod('paymentMethod_1'); - expect(transaction.getProperty('paymentMethod')).toBe('paymentMethod_1'); - expect(transaction.getPaymentMethod()).toBe('paymentMethod_1'); - expect(transaction.paymentMethod).toBe('paymentMethod_1'); - - transaction.paymentMethod = 'paymentMethod_2'; - expect(transaction.getProperty('paymentMethod')).toBe('paymentMethod_2'); - expect(transaction.getPaymentMethod()).toBe('paymentMethod_2'); - expect(transaction.paymentMethod).toBe('paymentMethod_2'); - }); - - it('check cast an properties to a native js type', () => { - transaction.setProperty('number', 1); - expect(transaction.getProperty('number')).toBe('1'); - transaction.setProperty('number', true); - expect(transaction.getProperty('number')).toBe('true'); - - transaction.setProperty('active', 1); - expect(transaction.getProperty('active')).toBe(true); - - transaction = new Transaction(); - transaction.setProperty('active', 0); - expect(transaction.getProperty('active')).toBe(false); - - transaction = new Transaction(); - transaction.setProperty('active', ''); - expect(transaction.getProperty('active')).toBe(false); - - transaction = new Transaction(); - transaction.setProperty('active', '123'); - expect(transaction.getProperty('active')).toBe(true); - - transaction = new Transaction(); - transaction.setProperty('active', null); - expect(transaction.getProperty('active')).toBe(false); - - transaction.setProperty('name', 1); - expect(transaction.getProperty('name')).toBe('1'); - transaction.setProperty('name', true); - expect(transaction.getProperty('name')).toBe('true'); - - transaction.setProperty('status', 1); - expect(transaction.getProperty('status')).toBe('1'); - transaction.setProperty('status', true); - expect(transaction.getProperty('status')).toBe('true'); - - transaction.setProperty('source', 1); - expect(transaction.getProperty('source')).toBe('1'); - transaction.setProperty('source', true); - expect(transaction.getProperty('source')).toBe('true'); - - transaction.setProperty('source', 1); - expect(transaction.getProperty('source')).toBe('1'); - transaction.setProperty('source', true); - expect(transaction.getProperty('source')).toBe('true'); - - transaction.setProperty('grandTotal', '3.14'); - expect(transaction.getProperty('grandTotal')).toBe(3.14); - transaction.setProperty('grandTotal', '314e-2'); - expect(transaction.getProperty('grandTotal')).toBe(3.14); - transaction.setProperty('grandTotal', '0.0314E+2'); - expect(transaction.getProperty('grandTotal')).toBe(3.14); - transaction.setProperty('grandTotal', '3.14any non-numeric characters'); - expect(transaction.getProperty('grandTotal')).toBe(3.14); - - transaction.setProperty('discount', '3.14'); - expect(transaction.getProperty('discount')).toBe(3.14); - transaction.setProperty('discount', '314e-2'); - expect(transaction.getProperty('discount')).toBe(3.14); - transaction.setProperty('discount', '0.0314E+2'); - expect(transaction.getProperty('discount')).toBe(3.14); - transaction.setProperty('discount', '3.14any non-numeric characters'); - expect(transaction.getProperty('discount')).toBe(3.14); - - transaction.setProperty('currency', 1); - expect(transaction.getProperty('currency')).toBe('1'); - transaction.setProperty('currency', true); - expect(transaction.getProperty('currency')).toBe('true'); - - transaction.setProperty('dateCreated', '2055-01-01'); - expect(transaction.getProperty('dateCreated') instanceof Date).toBe(true); - transaction.setProperty('dateCreated', new Date()); - expect(transaction.getProperty('dateCreated') instanceof Date).toBe(true); - - transaction.setProperty('dateClosed', '2055-01-01'); - expect(transaction.getProperty('dateClosed') instanceof Date).toBe(true); - transaction.setProperty('dateClosed', new Date()); - expect(transaction.getProperty('dateClosed') instanceof Date).toBe(true); - - transaction.setProperty('paymentMethod', 1); - expect(transaction.getProperty('paymentMethod')).toBe('1'); - transaction.setProperty('paymentMethod', true); - expect(transaction.getProperty('paymentMethod')).toBe('true'); - }); - - it('check "removeProperty" method', () => { - transaction.setProperty('number', 'number'); - transaction.removeProperty('number'); - - expect(transaction.getProperty('number')).toBe(undefined); - expect(transaction.number).toBe(undefined); - expect(transaction.getNumber()).toBe(undefined); - }); - - it('check "removeDefine" method', () => { - transaction.setProperty('number', 'number'); - transaction.removeDefine('number'); - - expect(transaction.number).toBe(undefined); - expect(transaction.getProperty('number')).toBe('number'); - expect(transaction.getNumber()).toBe('number'); - - transaction.number = 'number_1'; - - expect(transaction.number).toBe('number_1'); - expect(transaction.getProperty('number')).toBe('number'); - expect(transaction.getNumber()).toBe('number'); - }); -}); diff --git a/test/specs/entities/Transaction.spec.ts b/test/specs/entities/Transaction.spec.ts new file mode 100644 index 0000000..d86598c --- /dev/null +++ b/test/specs/entities/Transaction.spec.ts @@ -0,0 +1,279 @@ +import { describe, it, expect } from 'vitest'; + +// constants +import PaymentMethodEnum from '@/constants/PaymentMethodEnum'; +import TransactionSource from '@/constants/TransactionSource'; +import TransactionStatus from '@/constants/TransactionStatus'; + +// entities +import License from '@/entities/License'; +import LicenseTransactionJoin from '@/entities/LicenseTransactionJoin'; +import Transaction from '@/entities/Transaction'; + +// test utils +import expectEntity from '@test-utils/expectEntity'; +import expectEntityProp from '@test-utils/expectEntityProp'; + +describe('Transaction entity', () => { + it('should create a Transaction with default properties', () => { + const transaction = Transaction(); + + expectEntity(transaction, { + active: undefined, + number: undefined, + status: undefined, + source: undefined, + grandTotal: undefined, + discount: undefined, + currency: undefined, + dateCreated: undefined, + dateClosed: undefined, + paymentMethod: undefined, + licenseTransactionJoins: undefined, + }); + }); + + it('should create a Transaction with provided properties', () => { + const props = { + active: true, + number: 'T1', + status: TransactionStatus.PENDING, + source: TransactionSource.SHOP, + grandTotal: 12.5, + discount: 2.2, + currency: 'EUR', + dateCreated: new Date(), + dateClosed: new Date(), + paymentMethod: PaymentMethodEnum.PAYPAL, + licenseTransactionJoins: [new LicenseTransactionJoin(Transaction({ number: 'T1' }), License({ number: 'L1' }))], + }; + + const transaction = Transaction(props); + + expectEntity(transaction, props); + expect(transaction).toStrictEqual(props); + }); + + it('should set and get number correctly', () => { + const transaction = Transaction(); + + transaction.setNumber('T1'); + expectEntityProp(transaction, 'number', 'T1'); + + transaction.number = 'T2'; + expectEntityProp(transaction, 'number', 'T2'); + + transaction.set('number', 'T3'); + expectEntityProp(transaction, 'number', 'T3'); + + transaction.setProperty('number', 'T4'); + expectEntityProp(transaction, 'number', 'T4'); + }); + + it('should set and get status correctly', () => { + const transaction = Transaction(); + + transaction.setStatus(TransactionStatus.PENDING); + expectEntityProp(transaction, 'status', TransactionStatus.PENDING); + + transaction.status = TransactionStatus.CLOSED; + expectEntityProp(transaction, 'status', TransactionStatus.CLOSED); + + transaction.set('status', TransactionStatus.CANCELLED); + expectEntityProp(transaction, 'status', TransactionStatus.CANCELLED); + + transaction.setProperty('status', TransactionStatus.PENDING); + expectEntityProp(transaction, 'status', TransactionStatus.PENDING); + }); + + it('should set and get source correctly', () => { + const transaction = Transaction(); + + transaction.setSource(TransactionSource.SHOP); + expectEntityProp(transaction, 'source', TransactionSource.SHOP); + + transaction.source = TransactionSource.RECURRING_PAYMENT; + expectEntityProp(transaction, 'source', TransactionSource.RECURRING_PAYMENT); + + transaction.set('source', TransactionSource.OBTAIN_BUNDLE); + expectEntityProp(transaction, 'source', TransactionSource.OBTAIN_BUNDLE); + + transaction.setProperty('source', TransactionSource.AUTO_LICENSETEMPLATE_DELETE); + expectEntityProp(transaction, 'source', TransactionSource.AUTO_LICENSETEMPLATE_DELETE); + }); + + it('should set and get grandTotal correctly', () => { + const transaction = Transaction(); + + transaction.setGrandTotal(1.99); + expectEntityProp(transaction, 'grandTotal', 1.99); + + transaction.grandTotal = 2.99; + expectEntityProp(transaction, 'grandTotal', 2.99); + + transaction.set('grandTotal', 3.0); + expectEntityProp(transaction, 'grandTotal', 3.0); + + transaction.setProperty('grandTotal', 5.75); + expectEntityProp(transaction, 'grandTotal', 5.75); + }); + + it('should set and get discount correctly', () => { + const transaction = Transaction(); + + transaction.setDiscount(20); + expectEntityProp(transaction, 'discount', 20); + + transaction.discount = 10; + expectEntityProp(transaction, 'discount', 10); + + transaction.set('discount', 5); + expectEntityProp(transaction, 'discount', 5); + + transaction.setProperty('discount', 7); + expectEntityProp(transaction, 'discount', 7); + }); + + it('should set and get currency correctly', () => { + const transaction = Transaction(); + + transaction.setCurrency('USD'); + expectEntityProp(transaction, 'currency', 'USD'); + + transaction.currency = 'EUR'; + expectEntityProp(transaction, 'currency', 'EUR'); + + transaction.set('currency', 'UAH'); + expectEntityProp(transaction, 'currency', 'UAH'); + + transaction.setProperty('currency', 'GEL'); + expectEntityProp(transaction, 'currency', 'GEL'); + }); + + it('should set and get dateCreated correctly', () => { + const transaction = Transaction(); + + const date1 = new Date('2024-01-01T12:00:00Z'); + transaction.setDateCreated(date1); + expectEntityProp(transaction, 'dateCreated', date1); + + const date2 = new Date('2024-01-02T12:00:00Z'); + transaction.dateCreated = date2; + expectEntityProp(transaction, 'dateCreated', date2); + + const date3 = new Date('2024-01-03T12:00:00Z'); + transaction.set('dateCreated', date3); + expectEntityProp(transaction, 'dateCreated', date3); + + const date4 = new Date('2024-01-04T12:00:00Z'); + transaction.setProperty('dateCreated', date4); + expectEntityProp(transaction, 'dateCreated', date4); + }); + + it('should set and get dateClosed correctly', () => { + const transaction = Transaction(); + + const date1 = new Date('2024-01-01T12:00:00Z'); + transaction.setDateClosed(date1); + expectEntityProp(transaction, 'dateClosed', date1); + + const date2 = new Date('2024-01-02T12:00:00Z'); + transaction.dateClosed = date2; + expectEntityProp(transaction, 'dateClosed', date2); + + const date3 = new Date('2024-01-03T12:00:00Z'); + transaction.set('dateClosed', date3); + expectEntityProp(transaction, 'dateClosed', date3); + + const date4 = new Date('2024-01-04T12:00:00Z'); + transaction.setProperty('dateClosed', date4); + expectEntityProp(transaction, 'dateClosed', date4); + }); + + it('should set and get paymentMethod correctly', () => { + const transaction = Transaction(); + + transaction.setPaymentMethod(PaymentMethodEnum.PAYPAL); + expectEntityProp(transaction, 'paymentMethod', PaymentMethodEnum.PAYPAL); + + transaction.paymentMethod = PaymentMethodEnum.PAYPAL_SANDBOX; + expectEntityProp(transaction, 'paymentMethod', PaymentMethodEnum.PAYPAL_SANDBOX); + + transaction.set('paymentMethod', PaymentMethodEnum.STRIPE); + expectEntityProp(transaction, 'paymentMethod', PaymentMethodEnum.STRIPE); + + transaction.setProperty('paymentMethod', PaymentMethodEnum.STRIPE_TESTING); + expectEntityProp(transaction, 'paymentMethod', PaymentMethodEnum.STRIPE_TESTING); + }); + + it('should set and get licenseTransactionJoins correctly', () => { + const join1 = new LicenseTransactionJoin(Transaction({ number: 'T1' }), License({ number: 'L1' })); + const join2 = new LicenseTransactionJoin(Transaction({ number: 'T2' }), License({ number: 'L2' })); + const join3 = new LicenseTransactionJoin(Transaction({ number: 'T3' }), License({ number: 'L3' })); + const join4 = new LicenseTransactionJoin(Transaction({ number: 'T4' }), License({ number: 'L4' })); + + const transaction = Transaction(); + + transaction.setLicenseTransactionJoins([join1, join3]); + expectEntityProp(transaction, 'licenseTransactionJoins', [join1, join3]); + + transaction.licenseTransactionJoins = [join2]; + expectEntityProp(transaction, 'licenseTransactionJoins', [join2]); + + transaction.set('licenseTransactionJoins', [join4, join3]); + expectEntityProp(transaction, 'licenseTransactionJoins', [join4, join3]); + + transaction.setProperty('licenseTransactionJoins', [join4, join2, join3]); + expectEntityProp(transaction, 'licenseTransactionJoins', [join4, join2, join3]); + }); + + it('should set and get active status correctly', () => { + const transaction = Transaction(); + + transaction.setActive(true); + expectEntityProp(transaction, 'active', true); + + transaction.active = false; + expectEntityProp(transaction, 'active', false); + + transaction.set('active', true); + expectEntityProp(transaction, 'active', true); + + transaction.setProperty('active', false); + expectEntityProp(transaction, 'active', false); + }); + + it('should create an instance of Transaction', () => { + const transaction = Transaction(); + expect(transaction instanceof Transaction).toBe(true); + }); + + it('should be correct map', () => { + const transaction = Transaction({ + active: true, + number: 'T1', + status: TransactionStatus.PENDING, + source: TransactionSource.SHOP, + grandTotal: 12.5, + discount: 2.2, + currency: 'EUR', + dateCreated: new Date('2024-01-03T12:00:00.000Z'), + dateClosed: new Date('2024-01-04T12:00:00.000Z'), + paymentMethod: PaymentMethodEnum.PAYPAL, + licenseTransactionJoins: [new LicenseTransactionJoin(Transaction({ number: 'T1' }), License({ number: 'L1' }))], + }); + + expect(transaction.serialize()).toStrictEqual({ + active: 'true', + number: 'T1', + status: TransactionStatus.PENDING, + source: TransactionSource.SHOP, + grandTotal: '12.5', + discount: '2.2', + currency: 'EUR', + dateCreated: '2024-01-03T12:00:00.000Z', + dateClosed: '2024-01-04T12:00:00.000Z', + paymentMethod: PaymentMethodEnum.PAYPAL, + }); + }); +}); diff --git a/test/specs/entities/defineEntity.spec.ts b/test/specs/entities/defineEntity.spec.ts new file mode 100644 index 0000000..7890bcb --- /dev/null +++ b/test/specs/entities/defineEntity.spec.ts @@ -0,0 +1,103 @@ +import { describe, it, expect, beforeEach } from 'vitest'; +import defineEntity from '@/entities/defineEntity'; +import type { Entity } from '@/types/entities/defineEntity'; + +class TestEntity { + isTest: boolean; + + constructor() { + this.isTest = true; + } +} + +describe('Define entity', () => { + interface Props { + name: string; + value: number; + nested?: { key: string }; + } + + interface Methods { + getName(): string; + + setName(name: string): void; + } + + let entity: Entity; + let props: Props; + + beforeEach(() => { + props = { name: 'Test', value: 42 }; + + const methods: Methods = { + getName(): string { + return props.name; + }, + + setName(name: string): void { + props.name = name; + }, + }; + + entity = defineEntity(props, methods, TestEntity); + }); + + it('should get and set properties using base methods', () => { + entity.set('name', 'Test'); + expect(entity.get('name')).toBe('Test'); + entity.set('name', 'Updated'); + expect(entity.get('name')).toBe('Updated'); + }); + + it('should work with method aliases', () => { + entity.setProperty('value', 100); + expect(entity.getProperty('value')).toBe(100); + + expect(entity.hasProperty('value')).toBe(true); + expect(entity.has('value')).toBe(true); + // @ts-expect-error: for test reasons, we expect 'missing' to not exist + expect(entity.has('missing')).toBe(false); + // @ts-expect-error: for test reasons, we expect 'missing' to not be a valid property + expect(entity.hasProperty('missing')).toBe(false); + }); + + it('should set multiple properties via setProperties', () => { + entity.setProperties({ name: 'Batch', value: 999 }); + expect(entity.get('name')).toBe('Batch'); + expect(entity.get('value')).toBe(999); + }); + + it('should convert to map correctly', () => { + entity.set('nested', { key: 'val' }); + + const data = entity.serialize(); + expect(data.name).toBe('Test'); + expect(data.value).toBe('42'); + expect(data.nested).toBe(JSON.stringify({ key: 'val' })); + }); + + it('should call custom methods defined in methods object', () => { + expect(entity.getName()).toBe('Test'); + entity.setName('Custom'); + expect(entity.getName()).toBe('Custom'); + }); + + it('should preserve access to direct props', () => { + expect(entity.name).toBe('Test'); + entity.name = 'DirectChange'; + expect(entity.name).toBe('DirectChange'); + }); + + it('should allow adding unknown fields dynamically', () => { + // @ts-expect-error: for test reasons, dynamic property added + entity.set('customField', 'hello'); + // @ts-expect-error: for test reasons, dynamic property added + expect(entity.get('customField')).toBe('hello'); + // @ts-expect-error: for test reasons, dynamic property added + expect(entity.customField).toBe('hello'); + }); + + it('should instanceof TestEntity', () => { + expect(entity instanceof TestEntity).toBe(true); + }); +}); diff --git a/test/specs/services/BundleService.spec.js b/test/specs/services/BundleService.spec.js deleted file mode 100644 index 8504300..0000000 --- a/test/specs/services/BundleService.spec.js +++ /dev/null @@ -1,171 +0,0 @@ -import axios from 'axios'; -import AxiosMockAdapter from 'axios-mock-adapter'; -import bundleFactory from 'test@/factories/bundle'; -import Item from 'test@/response/Item'; -import Info from 'test@/response/Info'; -import Response from 'test@/response'; -import Context from '@/vo/Context'; -import Bundle from '@/entities/Bundle'; -import BundleService from '@/services/BundleService'; -import Service from '@/services/Service'; -import NlicError from '@/errors/NlicError'; - -describe('services/BundleService', () => { - let context; - let mock; - - beforeAll(() => { - context = new Context().setUsername('Demo').setPassword('demo'); - }); - - beforeEach(() => { - mock = new AxiosMockAdapter(axios); - }); - - it('check "create" method', async () => { - const bundle = bundleFactory(); - - // configure mock for create request - mock.onPost(`${context.getBaseUrl()}/bundle`) - .reply(200, new Response(new Item(bundle))); - - const entity = await BundleService.create( - context, - bundle, - ); - - expect(entity instanceof Bundle).toBe(true); - expect(entity.getProperty('number', null)).toBe(bundle.number); - expect(entity.getProperty('name', null)).toBe(bundle.name); - expect(entity.getProperty('active', null)).toBe(bundle.active); - expect(entity.getProperty('custom_property', null)).toBe(bundle.custom_property); - }); - - describe('check "get" method', () => { - it('should return entity', async () => { - const bundle = bundleFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/bundle/${bundle.number}`) - .reply(200, new Response(new Item(bundle))); - - const entity = await BundleService.get(context, bundle.number); - - expect(entity instanceof Bundle).toBe(true); - expect(entity.getProperty('number', null)).toBe(bundle.number); - expect(entity.getProperty('name', null)).toBe(bundle.name); - expect(entity.getProperty('active', null)).toBe(bundle.active); - expect(entity.getProperty('custom_property', null)).toBe(bundle.custom_property); - }); - - it('should throw error when entity not found', async () => { - const number = 'Any-number-that-not-exist'; - - // configure mock for product get request - mock.onGet(`${context.getBaseUrl()}/bundle/${number}`) - .reply(400, new Response( - new Info('Requested bundle does not exist', 'NotFoundException'), - )); - - try { - await BundleService.get(context, number); - fail('should throw error'); - } catch (e) { - expect(e instanceof NlicError).toBe(true); - } - }); - }); - - describe('check "list" method', async () => { - it('should return entities array', async () => { - const bundles = bundleFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/bundle`) - .reply(200, new Response(bundles.map((v) => new Item(v)))); - - const list = await BundleService.list(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(10); - - list.forEach((entity, k) => { - const bundle = bundles[k]; - expect(entity instanceof Bundle).toBe(true); - expect(entity.getProperty('number', null)).toBe(bundle.number); - expect(entity.getProperty('name', null)).toBe(bundle.name); - expect(entity.getProperty('active', null)).toBe(bundle.active); - expect(entity.getProperty('custom_property', null)).toBe(bundle.custom_property); - }); - }); - - it('should has pagination', async () => { - const bundles = bundleFactory(100); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/bundle`) - .reply(200, new Response(bundles.map((v) => new Item(v)))); - - const list = await BundleService.list(context); - - expect(list.getPageNumber()).toBe(0); - expect(list.getItemsNumber()).toBe(100); - expect(list.getTotalPages()).toBe(1); - expect(list.getTotalItems()).toBe(100); - expect(list.hasNext()).toBe(false); - }); - - it('check "filter parameter"', async () => { - const bundles = bundleFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/bundle`) - .reply(200, new Response(bundles.map((v) => new Item(v)))); - - // if filter parameter is object - await BundleService.list(context, { page: 2, items: 10 }); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=2;items=10'); - - // if filter parameter is string - await BundleService.list(context, 'page=3;items=20'); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=3;items=20'); - }); - }); - - it('check "update" method', async () => { - let bundle = bundleFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/bundle/${bundle.number}`) - .reply(200, new Response(new Item(bundle))); - - bundle = await BundleService.get(context, bundle.number); - - bundle.setProperty('name', 'MY-NAME-UPDATED'); - bundle.setProperty('custom_property', 'MY-CUSTOM-PROPERTY-UPDATED'); - - // configure mock for update request - mock.onPost(`${context.getBaseUrl()}/bundle/${bundle.number}`) - .reply(200, new Response(new Item(bundle))); - - const updated = await BundleService.update(context, bundle.getProperty('number'), bundle); - - expect(updated instanceof Bundle).toBe(true); - expect(updated.getProperty('name', null)).toBe(bundle.name); - expect(updated.getProperty('custom_property', null)).toBe(bundle.custom_property); - }); - - it('check "delete" method', async () => { - const number = 'some-number'; - - // configure mock for delete request - mock.onDelete(`${context.getBaseUrl()}/bundle/${number}`) - .reply(204); - - await BundleService.delete(context, number); - - expect(Service.getLastHttpRequestInfo().status).toBe(204); - }); -}); diff --git a/test/specs/services/BundleService.spec.ts b/test/specs/services/BundleService.spec.ts new file mode 100644 index 0000000..b4b6aa4 --- /dev/null +++ b/test/specs/services/BundleService.spec.ts @@ -0,0 +1,226 @@ +import { AxiosResponse } from 'axios'; +import { describe, it, expect, vi, afterEach } from 'vitest'; + +// constants +import Constants from '@/constants'; + +// entities +import Bundle from '@/entities/Bundle'; + +// services +import BundleService from '@/services/BundleService'; +import Service from '@/services/Service'; + +// types +import { NlicResponse } from '@/types/api/response'; + +// vo +import Context from '@/vo/Context'; + +// test utils +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +// mocking +vi.mock('@/services/Service'); + +describe('BundleService', () => { + const context = new Context({ username: 'demo', password: '123' }); + const config = {}; + const endpoint = Constants.Bundle.ENDPOINT_PATH; + const itemType = Constants.Bundle.TYPE; + + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe('get', () => { + it('returns a valid bundle', async () => { + const number = 'B1'; + const props = { + number, + active: 'true', + name: 'Sample name', + price: '2.99', + currency: 'USD', + licenseTemplateNumbers: 'LT1,LT2,LT4', + customProperty: 'X', + }; + + const items = [createMockItem(itemType, props), createMockItem('OtherType', { number: 'Ignored' })]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const bundle = await BundleService.get(context, number, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}/${number}`, {}, config); + + expect(bundle).toStrictEqual({ + number, + active: true, + name: 'Sample name', + price: 2.99, + currency: 'USD', + licenseTemplateNumbers: ['LT1', 'LT2', 'LT4'], + customProperty: 'X', + }); + }); + }); + + describe('list', () => { + it('returns array of bundles', async () => { + const raw = [ + { type: itemType, props: { number: 'B1', active: 'false', customProperty: 'A' } }, + { type: itemType, props: { number: 'B2', active: 'true', customProperty: 'B' } }, + { type: 'Product', props: { number: 'P1', active: 'true', customProperty: 'C' } }, + { type: 'License', props: { number: 'L1', active: 'true', customProperty: 'D' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props)); + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await BundleService.list<{ customProperty: string }>(context, '', config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + const expected = raw + .filter(({ type }) => type === itemType) + .map(({ props }) => ({ + number: props.number, + active: JSON.parse(props.active) as boolean, + customProperty: props.customProperty, + })); + + expect(result).toEqual(expected); + }); + + it('parses pagination', async () => { + const pagination = { + pagenumber: '1', + itemsnumber: '10', + totalpages: '30', + totalitems: '300', + hasnext: 'true', + }; + const items = Array.from({ length: 10 }, (_, i) => createMockItem(itemType, { number: `L${i}` })); + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items, undefined, pagination), + } as AxiosResponse); + + const result = await BundleService.list(context, '', config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + expect(result.getPagination()).toStrictEqual({ + pageNumber: parseInt(pagination.pagenumber, 10), + itemsNumber: parseInt(pagination.itemsnumber, 10), + totalPages: parseInt(pagination.totalpages, 10), + totalItems: parseInt(pagination.totalitems, 10), + hasNext: true, + }); + }); + + it('sends correct filter param', async () => { + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse() } as AxiosResponse); + await BundleService.list(context, { page: 2, items: 10 }, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, { filter: 'page=2;items=10' }, config); + }); + }); + + describe('create', () => { + it('creates a bundle', async () => { + const bundle = Bundle({ number: 'B1', active: false, customProperty: 'X' }); + const items = [ + createMockItem(itemType, { number: 'B1', active: 'false', customProperty: 'X' }), + createMockItem('OtherType', { number: 'Ignored' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await BundleService.create(context, bundle, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith(context, endpoint, bundle.serialize(), config); + + expect(result).toStrictEqual(bundle); + }); + }); + + describe('update', () => { + it('updates a bundle', async () => { + const number = 'B1'; + + const bundle = Bundle({ number, active: false, customProperty: 'X' }); + const items = [ + createMockItem(itemType, { number, active: 'false', customProperty: 'X' }), + createMockItem('OtherType', { number: 'Ignored' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await BundleService.update(context, number, bundle, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith(context, `${endpoint}/${number}`, bundle.serialize(), config); + + expect(result).toStrictEqual(bundle); + }); + }); + + describe('delete', () => { + it('deletes a bundle', async () => { + vi.mocked(Service).delete.mockResolvedValueOnce({ status: 204 } as AxiosResponse); + + const number = 'B1'; + const response = await BundleService.delete(context, number, true, config); + + expect(response.status).toBe(204); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.delete).toHaveBeenCalledWith(context, `${endpoint}/${number}`, { forceCascade: true }, config); + }); + }); + + describe('obtain', () => { + it('should obtain a bundle', async () => { + const raw = [ + { type: Constants.License.TYPE, props: { number: 'L1', active: 'false', customProperty: 'A' } }, + { type: Constants.License.TYPE, props: { number: 'L2', active: 'true', customProperty: 'B' } }, + { type: 'OtherType', props: { number: 'Ignored', active: 'false', customProperty: 'C' } }, + { type: 'OtherType', props: { number: 'Ignored too', active: 'false', customProperty: 'D' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props)); + vi.mocked(Service).post.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const number = 'B1'; + const licenseeNumber = 'L1'; + + const result = await BundleService.obtain(context, number, licenseeNumber, config); + + const obtainEndpoint = `${endpoint}/${number}/${Constants.Bundle.ENDPOINT_OBTAIN_PATH}`; + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith(context, obtainEndpoint, { licenseeNumber }, config); + + const expected = raw + .filter(({ type }) => type === Constants.License.TYPE) + .map(({ props }) => ({ + number: props.number, + active: JSON.parse(props.active) as boolean, + customProperty: props.customProperty, + })); + + expect(result).toEqual(expected); + }); + }); +}); diff --git a/test/specs/services/LicenseService.spec.js b/test/specs/services/LicenseService.spec.js deleted file mode 100644 index d2b99b7..0000000 --- a/test/specs/services/LicenseService.spec.js +++ /dev/null @@ -1,182 +0,0 @@ -import axios from 'axios'; -import AxiosMockAdapter from 'axios-mock-adapter'; -import licenseFactory from 'test@/factories/license'; -import Item from 'test@/response/Item'; -import Info from 'test@/response/Info'; -import Response from 'test@/response'; -import Context from '@/vo/Context'; -import License from '@/entities/License'; -import LicenseService from '@/services/LicenseService'; -import Service from '@/services/Service'; -import NlicError from '@/errors/NlicError'; - -describe('services/LicenseService', () => { - let context; - let mock; - - beforeAll(() => { - context = new Context().setUsername('Demo').setPassword('demo'); - }); - - beforeEach(() => { - mock = new AxiosMockAdapter(axios); - }); - - it('check "create" method', async () => { - const license = licenseFactory({ - licenseeNumber: 'some number', - licenseTemplateNumber: 'some number', - }); - - // configure mock for create request - mock.onPost(`${context.getBaseUrl()}/license`) - .reply(200, new Response(new Item(license))); - - const entity = await LicenseService.create( - context, - 'some licensee number', - 'some license template number', - 'some transaction number', - license, - ); - - expect(entity instanceof License).toBe(true); - expect(entity.getProperty('number', null)).toBe(license.number); - expect(entity.getProperty('name', null)).toBe(license.name); - expect(entity.getProperty('active', null)).toBe(license.active); - expect(entity.getProperty('custom_property', null)).toBe(license.custom_property); - }); - - describe('check "get" method', () => { - it('should return entity', async () => { - const license = licenseFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/license/${license.number}`) - .reply(200, new Response(new Item(license))); - - const entity = await LicenseService.get(context, license.number); - - expect(entity instanceof License).toBe(true); - expect(entity.getProperty('number', null)).toBe(license.number); - expect(entity.getProperty('name', null)).toBe(license.name); - expect(entity.getProperty('active', null)).toBe(license.active); - expect(entity.getProperty('custom_property', null)).toBe(license.custom_property); - }); - - it('should throw error when entity not found', async () => { - const number = 'Any-number-that-not-exist'; - - // configure mock for product get request - mock.onGet(`${context.getBaseUrl()}/license/${number}`) - .reply(400, new Response( - new Info('Requested license does not exist', 'NotFoundException'), - )); - - try { - await LicenseService.get(context, number); - fail('should throw error'); - } catch (e) { - expect(e instanceof NlicError).toBe(true); - } - }); - }); - - describe('check "list" method', async () => { - it('should return entities array', async () => { - const licenses = licenseFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/license`) - .reply(200, new Response(licenses.map((v) => new Item(v)))); - - const list = await LicenseService.list(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(10); - - list.forEach((entity, k) => { - const license = licenses[k]; - expect(entity instanceof License).toBe(true); - expect(entity.getProperty('number', null)).toBe(license.number); - expect(entity.getProperty('name', null)).toBe(license.name); - expect(entity.getProperty('active', null)).toBe(license.active); - expect(entity.getProperty('custom_property', null)).toBe(license.custom_property); - }); - }); - - it('should has pagination', async () => { - const licenses = licenseFactory(100); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/license`) - .reply(200, new Response(licenses.map((v) => new Item(v)))); - - const list = await LicenseService.list(context); - - expect(list.getPageNumber()).toBe(0); - expect(list.getItemsNumber()).toBe(100); - expect(list.getTotalPages()).toBe(1); - expect(list.getTotalItems()).toBe(100); - expect(list.hasNext()).toBe(false); - }); - - it('check "filter parameter"', async () => { - const licenses = licenseFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/license`) - .reply(200, new Response(licenses.map((v) => new Item(v)))); - - // if filter parameter is object - await LicenseService.list(context, { page: 2, items: 10 }); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=2;items=10'); - - // if filter parameter is string - await LicenseService.list(context, 'page=3;items=20'); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=3;items=20'); - }); - }); - - it('check "update" method', async () => { - let license = licenseFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/license/${license.number}`) - .reply(200, new Response(new Item(license))); - - license = await LicenseService.get(context, license.number); - - license.setProperty('name', 'MY-NAME-UPDATED'); - license.setProperty('custom_property', 'MY-CUSTOM-PROPERTY-UPDATED'); - - // configure mock for update request - mock.onPost(`${context.getBaseUrl()}/license/${license.number}`) - .reply(200, new Response(new Item(license))); - - const updated = await LicenseService.update( - context, - license.getProperty('number'), - 'some transaction number', - license, - ); - - expect(updated instanceof License).toBe(true); - expect(updated.getProperty('name', null)).toBe(license.name); - expect(updated.getProperty('custom_property', null)).toBe(license.custom_property); - }); - - it('check "delete" method', async () => { - const number = 'some-number'; - - // configure mock for delete request - mock.onDelete(`${context.getBaseUrl()}/license/${number}`) - .reply(204); - - await LicenseService.delete(context, number); - - expect(Service.getLastHttpRequestInfo().status).toBe(204); - }); -}); diff --git a/test/specs/services/LicenseService.spec.ts b/test/specs/services/LicenseService.spec.ts new file mode 100644 index 0000000..b88770f --- /dev/null +++ b/test/specs/services/LicenseService.spec.ts @@ -0,0 +1,218 @@ +import { AxiosResponse } from 'axios'; +import { describe, it, expect, vi, afterEach } from 'vitest'; + +// constants +import Constants from '@/constants'; +import TimeVolumePeriod from '@/constants/TimeVolumePeriod'; + +// entities +import License from '@/entities/License'; + +// services +import LicenseService from '@/services/LicenseService'; +import Service from '@/services/Service'; + +// types +import { NlicResponse } from '@/types/api/response'; + +// vo +import Context from '@/vo/Context'; + +// test utils +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +// mocking +vi.mock('@/services/Service'); + +describe('LicenseService', () => { + const context = new Context({ username: 'demo', password: '123' }); + const config = {}; + const endpoint = Constants.License.ENDPOINT_PATH; + const itemType = Constants.License.TYPE; + + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe('get', () => { + it('returns a valid license', async () => { + const number = 'L1'; + + const props = { + number, + active: 'true', + name: 'License name', + price: '2.99', + currency: 'EUR', + hidden: 'true', + licenseeNumber: 'LE1', + licenseTemplateNumber: 'LT1', + timeVolume: '12', + timeVolumePeriod: TimeVolumePeriod.MONTH, + startDate: 'now', + parentfeature: 'PF1', + inUse: 'true', + }; + + const items = [createMockItem(itemType, props), createMockItem('Product', { number: 'P1' })]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const license = await LicenseService.get(context, number, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}/${number}`, {}, config); + + expect(license).toStrictEqual({ + number, + active: true, + name: 'License name', + price: 2.99, + currency: 'EUR', + hidden: true, + licenseeNumber: 'LE1', + licenseTemplateNumber: 'LT1', + timeVolume: 12, + timeVolumePeriod: TimeVolumePeriod.MONTH, + startDate: 'now', + parentfeature: 'PF1', + inUse: true, + }); + }); + }); + + describe('list', () => { + it('returns array of licenses', async () => { + const raw = [ + { type: itemType, props: { number: 'L1', active: 'false', customProperty: 'A' } }, + { type: itemType, props: { number: 'L2', active: 'true', customProperty: 'B' } }, + { type: 'Product', props: { number: 'P1', active: 'true', customProperty: 'C' } }, + { type: 'Licensee', props: { number: 'L1', active: 'true', customProperty: 'D' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props)); + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await LicenseService.list<{ customProperty: string }>(context, '', config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + const expected = raw + .filter(({ type }) => type === itemType) + .map(({ props }) => ({ + number: props.number, + active: JSON.parse(props.active) as boolean, + customProperty: props.customProperty, + })); + + expect(result).toEqual(expect.arrayContaining(expected)); + }); + + it('parses pagination', async () => { + const pagination = { + pagenumber: '1', + itemsnumber: '10', + totalpages: '30', + totalitems: '300', + hasnext: 'true', + }; + const items = Array.from({ length: 10 }, (_, i) => createMockItem(itemType, { number: `L${i}` })); + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items, undefined, pagination), + } as AxiosResponse); + + const result = await LicenseService.list(context, '', config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + expect(result.getPagination()).toStrictEqual({ + pageNumber: parseInt(pagination.pagenumber, 10), + itemsNumber: parseInt(pagination.itemsnumber, 10), + totalPages: parseInt(pagination.totalpages, 10), + totalItems: parseInt(pagination.totalitems, 10), + hasNext: true, + }); + }); + + it('sends correct filter param', async () => { + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse() } as AxiosResponse); + await LicenseService.list(context, { page: 2, items: 10 }, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, { filter: 'page=2;items=10' }, config); + }); + }); + + describe('create', () => { + it('creates a license', async () => { + const license = License({ number: 'L1', active: false, customProperty: 'X' }); + + const items = [ + createMockItem(itemType, { number: 'L1', active: 'false', customProperty: 'X' }), + createMockItem('Product', { number: 'P1', active: 'true', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await LicenseService.create(context, 'LE1', 'LT1', null, license, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + endpoint, + { + number: 'L1', + active: 'false', + customProperty: 'X', + licenseeNumber: 'LE1', + licenseTemplateNumber: 'LT1', + }, + config, + ); + + expect(result).toStrictEqual(license); + }); + }); + + describe('update', () => { + it('updates a license', async () => { + const number = 'L1'; + + const license = License({ number, active: false, customProperty: 'X' }); + const items = [ + createMockItem(itemType, { number, active: 'false', customProperty: 'X' }), + createMockItem('Product', { number: 'P1', active: 'ture', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await LicenseService.update(context, number, null, license, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith(context, `${endpoint}/${number}`, license.serialize(), config); + + expect(result).toStrictEqual(license); + }); + }); + + describe('delete', () => { + it('deletes a license', async () => { + vi.mocked(Service).delete.mockResolvedValueOnce({ status: 204 } as AxiosResponse); + + const number = 'L1'; + const response = await LicenseService.delete(context, number, true, config); + + expect(response.status).toBe(204); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.delete).toHaveBeenCalledWith(context, `${endpoint}/${number}`, { forceCascade: true }, config); + }); + }); +}); diff --git a/test/specs/services/LicenseTemplateService.spec.js b/test/specs/services/LicenseTemplateService.spec.js deleted file mode 100644 index 3216a07..0000000 --- a/test/specs/services/LicenseTemplateService.spec.js +++ /dev/null @@ -1,187 +0,0 @@ -import axios from 'axios'; -import AxiosMockAdapter from 'axios-mock-adapter'; -import licenseTemplateFactory from 'test@/factories/licenseTemplate'; -import Item from 'test@/response/Item'; -import Info from 'test@/response/Info'; -import Response from 'test@/response'; -import Context from '@/vo/Context'; -import LicenseTemplate from '@/entities/LicenseTemplate'; -import LicenseTemplateService from '@/services/LicenseTemplateService'; -import Service from '@/services/Service'; -import NlicError from '@/errors/NlicError'; - -describe('services/LicenseTemplateService', () => { - let context; - let mock; - - beforeAll(() => { - context = new Context().setUsername('Demo').setPassword('demo'); - }); - - beforeEach(() => { - mock = new AxiosMockAdapter(axios); - }); - - it('check "create" method', async () => { - const licenseTemplate = licenseTemplateFactory(); - - // configure mock for create request - mock.onPost(`${context.getBaseUrl()}/licensetemplate`) - .reply(200, new Response(new Item(licenseTemplate))); - - const entity = await LicenseTemplateService.create(context, 'some number', licenseTemplate); - - expect(entity instanceof LicenseTemplate).toBe(true); - expect(entity.getProperty('number', null)).toBe(licenseTemplate.number); - expect(entity.getProperty('name', null)).toBe(licenseTemplate.name); - expect(entity.getProperty('active', null)).toBe(licenseTemplate.active); - expect(entity.getProperty('licenseType', null)).toBe(licenseTemplate.licenseType); - expect(entity.getProperty('timeVolume', null)).toBe(licenseTemplate.timeVolume); - expect(entity.getProperty('price', null)).toBe(licenseTemplate.price); - expect(entity.getProperty('currency', null)).toBe(licenseTemplate.currency); - expect(entity.getProperty('custom_property', null)).toBe(licenseTemplate.custom_property); - }); - - describe('check "get" method', () => { - it('should return entity', async () => { - const licenseTemplate = licenseTemplateFactory(); - - // configure mock for get request - mock.onGet( - `${context.getBaseUrl()}/licensetemplate/${licenseTemplate.number}`, - ).reply(200, new Response(new Item(licenseTemplate))); - - const entity = await LicenseTemplateService.get(context, licenseTemplate.number); - - expect(entity instanceof LicenseTemplate).toBe(true); - expect(entity.getProperty('number', null)).toBe(licenseTemplate.number); - expect(entity.getProperty('name', null)).toBe(licenseTemplate.name); - expect(entity.getProperty('active', null)).toBe(licenseTemplate.active); - expect(entity.getProperty('licenseType', null)).toBe(licenseTemplate.licenseType); - expect(entity.getProperty('timeVolume', null)).toBe(licenseTemplate.timeVolume); - expect(entity.getProperty('price', null)).toBe(licenseTemplate.price); - expect(entity.getProperty('currency', null)).toBe(licenseTemplate.currency); - expect(entity.getProperty('custom_property', null)).toBe(licenseTemplate.custom_property); - }); - - it('should throw error when entity not found', async () => { - const number = 'Any-number-that-not-exist'; - - // configure mock for product get request - mock.onGet(`${context.getBaseUrl()}/licensetemplate/${number}`) - .reply(400, new Response( - new Info('Requested licenseTemplate does not exist', 'NotFoundException'), - )); - try { - await LicenseTemplateService.get(context, number); - fail('should throw error'); - } catch (e) { - expect(e instanceof NlicError).toBe(true); - } - }); - }); - - describe('check "list" method', async () => { - it('should return entities array', async () => { - const licenseTemplates = licenseTemplateFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/licensetemplate`) - .reply(200, new Response(licenseTemplates.map((v) => new Item(v)))); - - const list = await LicenseTemplateService.list(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(10); - - list.forEach((entity, k) => { - const licenseTemplate = licenseTemplates[k]; - expect(entity instanceof LicenseTemplate).toBe(true); - expect(entity.getProperty('number', null)).toBe(licenseTemplate.number); - expect(entity.getProperty('name', null)).toBe(licenseTemplate.name); - expect(entity.getProperty('active', null)).toBe(licenseTemplate.active); - expect(entity.getProperty('licenseType', null)).toBe(licenseTemplate.licenseType); - expect(entity.getProperty('timeVolume', null)).toBe(licenseTemplate.timeVolume); - expect(entity.getProperty('price', null)).toBe(licenseTemplate.price); - expect(entity.getProperty('currency', null)).toBe(licenseTemplate.currency); - expect(entity.getProperty('custom_property', null)).toBe(licenseTemplate.custom_property); - }); - }); - - it('should has pagination', async () => { - const licenseTemplates = licenseTemplateFactory(100); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/licensetemplate`) - .reply(() => { - const response = new Response(licenseTemplates.map((v) => new Item(v))); - response.setPage(0, 100, 1050); - - return [200, response]; - }); - - const list = await LicenseTemplateService.list(context); - - expect(list.getPageNumber()).toBe(0); - expect(list.getItemsNumber()).toBe(100); - expect(list.getTotalPages()).toBe(11); - expect(list.getTotalItems()).toBe(1050); - expect(list.hasNext()).toBe(true); - }); - - it('check "filter parameter"', async () => { - const licenseTemplates = licenseTemplateFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/licensetemplate`) - .reply(200, new Response(licenseTemplates.map((v) => new Item(v)))); - - // if filter parameter is object - await LicenseTemplateService.list(context, { page: 2, items: 10 }); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=2;items=10'); - - // if filter parameter is string - await LicenseTemplateService.list(context, 'page=3;items=20'); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=3;items=20'); - }); - }); - - it('check "update" method', async () => { - let licenseTemplate = licenseTemplateFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/licensetemplate/${licenseTemplate.number}`) - .reply(200, new Response(new Item(licenseTemplate))); - - licenseTemplate = await LicenseTemplateService.get(context, licenseTemplate.number); - - licenseTemplate.setProperty('name', 'MY-NAME-UPDATED'); - licenseTemplate.setProperty('custom_property', 'MY-CUSTOM-PROPERTY-UPDATED'); - - // configure mock for update request - mock.onPost(`${context.getBaseUrl()}/licensetemplate/${licenseTemplate.number}`) - .reply(200, new Response(new Item(licenseTemplate))); - - const updated = await LicenseTemplateService - .update(context, licenseTemplate.getProperty('number'), licenseTemplate); - - expect(updated instanceof LicenseTemplate).toBe(true); - expect(updated.getProperty('name', null)).toBe(licenseTemplate.name); - expect(updated.getProperty('price', null)).toBe(licenseTemplate.price); - expect(updated.getProperty('custom_property', null)).toBe(licenseTemplate.custom_property); - }); - - it('check "delete" method', async () => { - const number = 'some-number'; - - // configure mock for delete request - mock.onDelete(`${context.getBaseUrl()}/licensetemplate/${number}`) - .reply(204); - - await LicenseTemplateService.delete(context, number); - - expect(Service.getLastHttpRequestInfo().status).toBe(204); - }); -}); diff --git a/test/specs/services/LicenseTemplateService.spec.ts b/test/specs/services/LicenseTemplateService.spec.ts new file mode 100644 index 0000000..5c79486 --- /dev/null +++ b/test/specs/services/LicenseTemplateService.spec.ts @@ -0,0 +1,225 @@ +import { AxiosResponse } from 'axios'; +import { describe, it, expect, vi, afterEach } from 'vitest'; + +// constants +import Constants from '@/constants'; +import LicenseType from '@/constants/LicenseType'; +import TimeVolumePeriod from '@/constants/TimeVolumePeriod'; + +// entities +import LicenseTemplate from '@/entities/LicenseTemplate'; + +// services +import LicenseTemplateService from '@/services/LicenseTemplateService'; +import Service from '@/services/Service'; + +// types +import { NlicResponse } from '@/types/api/response'; + +// vo +import Context from '@/vo/Context'; + +// test utils +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +// mocking +vi.mock('@/services/Service'); + +describe('LicenseTemplateService', () => { + const context = new Context({ username: 'demo', password: '123' }); + const config = {}; + const endpoint = Constants.LicenseTemplate.ENDPOINT_PATH; + const itemType = Constants.LicenseTemplate.TYPE; + + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe('get', () => { + it('returns a valid licenseTemplate', async () => { + const number = 'LT1'; + + const props = { + number, + active: 'false', + name: 'Sample name', + licenseType: LicenseType.QUANTITY, + price: '5.99', + currency: 'UAH', + automatic: 'true', + hidden: 'false', + hideLicenses: 'false', + gracePeriod: 'true', + timeVolume: '12', + timeVolumePeriod: TimeVolumePeriod.YEAR, + maxSessions: '3', + quantity: '30', + productModuleNumber: 'PM1', + inUse: 'true', + }; + + const items = [createMockItem(itemType, props), createMockItem('Product', { number: 'P1' })]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const licenseTemplate = await LicenseTemplateService.get(context, number, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}/${number}`, {}, config); + + expect(licenseTemplate).toStrictEqual({ + number, + active: false, + name: 'Sample name', + licenseType: LicenseType.QUANTITY, + price: 5.99, + currency: 'UAH', + automatic: true, + hidden: false, + hideLicenses: false, + gracePeriod: true, + timeVolume: 12, + timeVolumePeriod: TimeVolumePeriod.YEAR, + maxSessions: 3, + quantity: 30, + productModuleNumber: 'PM1', + inUse: true, + }); + }); + }); + + describe('list', () => { + it('returns array of licenseTemplates', async () => { + const raw = [ + { type: itemType, props: { number: 'L1', active: 'false', customProperty: 'A' } }, + { type: itemType, props: { number: 'L2', active: 'true', customProperty: 'B' } }, + { type: 'Product', props: { number: 'P1', active: 'true', customProperty: 'C' } }, + { type: 'License', props: { number: 'L1', active: 'true', customProperty: 'D' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props)); + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await LicenseTemplateService.list<{ customProperty: string }>(context, '', config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + const expected = raw + .filter(({ type }) => type === itemType) + .map(({ props }) => ({ + number: props.number, + active: JSON.parse(props.active) as boolean, + customProperty: props.customProperty, + })); + + expect(result).toEqual(expect.arrayContaining(expected)); + }); + + it('parses pagination', async () => { + const pagination = { + pagenumber: '1', + itemsnumber: '10', + totalpages: '30', + totalitems: '300', + hasnext: 'true', + }; + const items = Array.from({ length: 10 }, (_, i) => createMockItem(itemType, { number: `L${i}` })); + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items, undefined, pagination), + } as AxiosResponse); + + const result = await LicenseTemplateService.list(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + expect(result.getPagination()).toStrictEqual({ + pageNumber: parseInt(pagination.pagenumber, 10), + itemsNumber: parseInt(pagination.itemsnumber, 10), + totalPages: parseInt(pagination.totalpages, 10), + totalItems: parseInt(pagination.totalitems, 10), + hasNext: true, + }); + }); + + it('sends correct filter param', async () => { + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse() } as AxiosResponse); + await LicenseTemplateService.list(context, { page: 2, items: 10 }, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, { filter: 'page=2;items=10' }, config); + }); + }); + + describe('create', () => { + it('creates a licenseTemplate', async () => { + const productModuleNumber = 'PM1'; + const licenseTemplate = LicenseTemplate({ number: 'LT1', active: false, customProperty: 'X' }); + + const items = [ + createMockItem(itemType, { number: 'LT1', active: 'false', customProperty: 'X' }), + createMockItem('Product', { number: 'P1', active: 'true', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await LicenseTemplateService.create(context, productModuleNumber, licenseTemplate, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + endpoint, + { + productModuleNumber, + number: 'LT1', + active: 'false', + customProperty: 'X', + }, + config, + ); + + expect(result).toStrictEqual(licenseTemplate); + }); + }); + + describe('update', () => { + it('updates a licenseTemplate', async () => { + const number = 'LT1'; + + const licenseTemplate = LicenseTemplate({ number, active: false, customProperty: 'X' }); + const items = [ + createMockItem(itemType, { number, active: 'false', customProperty: 'X' }), + createMockItem('Product', { number: 'P1', active: 'ture', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await LicenseTemplateService.update(context, number, licenseTemplate, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith(context, `${endpoint}/${number}`, licenseTemplate.serialize(), config); + + expect(result).toStrictEqual(licenseTemplate); + }); + }); + + describe('delete', () => { + it('deletes a licenseTemplate', async () => { + vi.mocked(Service).delete.mockResolvedValueOnce({ status: 204 } as AxiosResponse); + + const number = 'LT1'; + const response = await LicenseTemplateService.delete(context, number, true, config); + + expect(response.status).toBe(204); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.delete).toHaveBeenCalledWith(context, `${endpoint}/${number}`, { forceCascade: true }, config); + }); + }); +}); diff --git a/test/specs/services/LicenseeService.spec.js b/test/specs/services/LicenseeService.spec.js deleted file mode 100644 index 0e46971..0000000 --- a/test/specs/services/LicenseeService.spec.js +++ /dev/null @@ -1,213 +0,0 @@ -import axios from 'axios'; -import AxiosMockAdapter from 'axios-mock-adapter'; -import licenseeFactory from 'test@/factories/licensee'; -import validateFactory from 'test@/factories/validate'; -import Item from 'test@/response/Item'; -import Info from 'test@/response/Info'; -import Response from 'test@/response'; -import Context from '@/vo/Context'; -import ValidationParameters from '@/vo/ValidationParameters'; -import Licensee from '@/entities/Licensee'; -import LicenseeService from '@/services/LicenseeService'; -import ValidationResults from '@/vo/ValidationResults'; -import Service from '@/services/Service'; -import NlicError from '@/errors/NlicError'; - -describe('services/LicenseeService', () => { - let context; - let mock; - - beforeAll(() => { - context = new Context().setUsername('Demo').setPassword('demo'); - }); - - beforeEach(() => { - mock = new AxiosMockAdapter(axios); - }); - - it('check "create" method', async () => { - const licensee = licenseeFactory(); - - // configure mock for create request - mock.onPost(`${context.getBaseUrl()}/licensee`) - .reply(200, new Response(new Item(licensee))); - - const entity = await LicenseeService.create(context, 'some number', licensee); - - expect(entity instanceof Licensee).toBe(true); - expect(entity.getProperty('number', null)).toBe(licensee.number); - expect(entity.getProperty('name', null)).toBe(licensee.name); - expect(entity.getProperty('active', null)).toBe(licensee.active); - expect(entity.getProperty('custom_property', null)).toBe(licensee.custom_property); - }); - - describe('check "get" method', () => { - it('should return entity', async () => { - const licensee = licenseeFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/licensee/${licensee.number}`) - .reply(200, new Response(new Item(licensee))); - - const entity = await LicenseeService.get(context, licensee.number); - - expect(entity instanceof Licensee).toBe(true); - expect(entity.getProperty('number', null)).toBe(licensee.number); - expect(entity.getProperty('name', null)).toBe(licensee.name); - expect(entity.getProperty('active', null)).toBe(licensee.active); - expect(entity.getProperty('custom_property', null)).toBe(licensee.custom_property); - }); - - it('should throw error when entity not found', async () => { - const number = 'Any-number-that-not-exist'; - - // configure mock for product get request - mock.onGet(`${context.getBaseUrl()}/licensee/${number}`) - .reply(400, new Response(new Info('Requested licenseTemplate does not exist', 'NotFoundException'))); - - try { - await LicenseeService.get(context, number); - fail('should throw error'); - } catch (e) { - expect(e instanceof NlicError).toBe(true); - } - }); - }); - - describe('check "list" method', () => { - it('should return entities array', async () => { - const licensees = licenseeFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/licensee`) - .reply(200, new Response(licensees.map((v) => new Item(v)))); - - const list = await LicenseeService.list(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(10); - - list.forEach((entity, k) => { - const licensee = licensees[k]; - expect(entity instanceof Licensee).toBe(true); - expect(entity.getProperty('number', null)).toBe(licensee.number); - expect(entity.getProperty('name', null)).toBe(licensee.name); - expect(entity.getProperty('active', null)).toBe(licensee.active); - expect(entity.getProperty('custom_property', null)).toBe(licensee.custom_property); - }); - }); - - it('should has pagination', async () => { - const licensees = licenseeFactory(100); - - // configure mock for list request - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/licensee`) - .reply(() => { - const response = new Response(licensees.map((v) => new Item(v))); - response.setPage(0, 100, 1000); - - return [200, response]; - }); - - const list = await LicenseeService.list(context); - - expect(list.getPageNumber()).toBe(0); - expect(list.getItemsNumber()).toBe(100); - expect(list.getTotalPages()).toBe(10); - expect(list.getTotalItems()).toBe(1000); - expect(list.hasNext()).toBe(true); - }); - - it('check "filter parameter"', async () => { - const licensees = licenseeFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/licensee`) - .reply(200, new Response(licensees.map((v) => new Item(v)))); - - // if filter parameter is object - await LicenseeService.list(context, { page: 2, items: 10 }); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=2;items=10'); - - // if filter parameter is string - await LicenseeService.list(context, 'page=3;items=20'); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=3;items=20'); - }); - }); - - it('check "update" method', async () => { - let licensee = licenseeFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/licensee/${licensee.number}`) - .reply(200, new Response(new Item(licensee))); - - licensee = await LicenseeService.get(context, licensee.number); - - licensee.setProperty('name', 'MY-NAME-UPDATED'); - licensee.setProperty('custom_property', 'MY-CUSTOM-PROPERTY-UPDATED'); - - // configure mock for update request - mock.onPost(`${context.getBaseUrl()}/licensee/${licensee.number}`) - .reply(200, new Response(new Item(licensee))); - - const updated = await LicenseeService.update(context, licensee.getProperty('number'), licensee); - - expect(updated instanceof Licensee).toBe(true); - expect(updated.getProperty('name', null)).toBe(licensee.name); - expect(updated.getProperty('custom_property', null)).toBe(licensee.custom_property); - }); - - it('check "validate" method', async () => { - const licensee = licenseeFactory({ productNumber: 'some number', licenseeName: 'some name' }); - const validate = validateFactory({ productModuleNumber: 'some product module number' }); - - const validationParameters = new ValidationParameters() - .setLicenseeName(licensee.getProperty('name')) - .setProductNumber('some number'); - - mock.onPost(`${context.getBaseUrl()}/licensee/${licensee.number}/validate`) - .reply(() => { - const res = new Response(new Item(validate, 'ProductModuleValidation')); - res.ttl = new Date(); - - return [200, res]; - }); - - const result = await LicenseeService.validate(context, licensee.getProperty('number'), validationParameters); - - expect(result instanceof ValidationResults).toBe(true); - expect(result.getTtl() instanceof Date).toBe(true); - expect(Object.keys(result.getValidators()).length).toBe(1); - }); - - it('check "transfer" method', async () => { - const licensee = licenseeFactory(); - const transferLicensee = licenseeFactory(); - - transferLicensee.setProperty('markedForTransfer', true); - - mock.onPost(`${context.getBaseUrl()}/licensee` - + `/${licensee.number}/transfer`) - .reply(204); - await LicenseeService - .transfer(context, licensee.getProperty('number'), transferLicensee.getProperty('number')); - - expect(Service.getLastHttpRequestInfo().status).toBe(204); - }); - - it('check "delete" method', async () => { - const number = 'some-number'; - - // configure mock for delete request - mock.onDelete(`${context.getBaseUrl()}/licensee/${number}`) - .reply(204); - - await LicenseeService.delete(context, number); - - expect(Service.getLastHttpRequestInfo().status).toBe(204); - }); -}); diff --git a/test/specs/services/LicenseeService.spec.ts b/test/specs/services/LicenseeService.spec.ts new file mode 100644 index 0000000..71420fb --- /dev/null +++ b/test/specs/services/LicenseeService.spec.ts @@ -0,0 +1,269 @@ +import { AxiosResponse } from 'axios'; +import { describe, it, expect, vi, afterEach } from 'vitest'; + +// constants +import Constants from '@/constants'; + +// entities +import Licensee from '@/entities/Licensee'; + +// services +import LicenseeService from '@/services/LicenseeService'; +import Service from '@/services/Service'; + +// types +import { NlicResponse } from '@/types/api/response'; + +// vo +import Context from '@/vo/Context'; +import ValidationParameters from '@/vo/ValidationParameters'; + +// test utils +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +// mocking +vi.mock('@/services/Service'); + +describe('LicenseeService', () => { + const context = new Context({ username: 'demo', password: '123' }); + const config = {}; + const endpoint = Constants.Licensee.ENDPOINT_PATH; + const itemType = Constants.Licensee.TYPE; + + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe('get', () => { + it('returns a valid licensee', async () => { + const number = 'L1'; + const props = { + number, + active: 'true', + name: 'Sample name', + markedForTransfer: 'false', + productNumber: 'P1', + inUse: 'true', + customProperty: 'My-Property', + }; + + const items = [createMockItem(itemType, props), createMockItem('Product', { number: 'P1' })]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const licensee = await LicenseeService.get(context, number, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}/${number}`, {}, config); + + expect(licensee).toStrictEqual({ + number: 'L1', + active: true, + name: 'Sample name', + markedForTransfer: false, + productNumber: 'P1', + inUse: true, + customProperty: 'My-Property', + }); + }); + }); + + describe('list', () => { + it('returns array of licensees', async () => { + const raw = [ + { type: itemType, props: { number: 'L1', active: 'false', customProperty: 'A' } }, + { type: itemType, props: { number: 'L2', active: 'true', customProperty: 'B' } }, + { type: 'Product', props: { number: 'P1', active: 'true', customProperty: 'C' } }, + { type: 'License', props: { number: 'L1', active: 'true', customProperty: 'D' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props)); + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await LicenseeService.list<{ customProperty: string }>(context, '', config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + const expected = raw + .filter(({ type }) => type === itemType) + .map(({ props }) => ({ + number: props.number, + active: JSON.parse(props.active) as boolean, + customProperty: props.customProperty, + })); + + expect(result).toEqual(expect.arrayContaining(expected)); + }); + + it('parses pagination', async () => { + const pagination = { + pagenumber: '1', + itemsnumber: '10', + totalpages: '30', + totalitems: '300', + hasnext: 'true', + }; + const items = Array.from({ length: 10 }, (_, i) => createMockItem(itemType, { number: `L${i}` })); + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items, undefined, pagination), + } as AxiosResponse); + + const result = await LicenseeService.list(context, '', config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + expect(result.getPagination()).toStrictEqual({ + pageNumber: parseInt(pagination.pagenumber, 10), + itemsNumber: parseInt(pagination.itemsnumber, 10), + totalPages: parseInt(pagination.totalpages, 10), + totalItems: parseInt(pagination.totalitems, 10), + hasNext: true, + }); + }); + + it('sends correct filter param', async () => { + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse() } as AxiosResponse); + await LicenseeService.list(context, { page: 2, items: 10 }, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, { filter: 'page=2;items=10' }, config); + }); + }); + + describe('create', () => { + it('creates a licensee', async () => { + const productNumber = 'P1'; + + const licensee = Licensee({ number: 'L1', active: false, customProperty: 'X' }); + + const items = [ + createMockItem(itemType, { number: 'L1', active: 'false', customProperty: 'X' }), + createMockItem('Product', { number: 'P1', active: 'true', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await LicenseeService.create(context, productNumber, licensee, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + endpoint, + { productNumber, number: 'L1', active: 'false', customProperty: 'X' }, + config, + ); + + expect(result).toStrictEqual(licensee); + }); + }); + + describe('update', () => { + it('updates a licensee', async () => { + const number = 'L1'; + + const licensee = Licensee({ number, active: false, customProperty: 'X' }); + const items = [ + createMockItem(itemType, { number, active: 'false', customProperty: 'X' }), + createMockItem('Product', { number: 'P1', active: 'ture', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await LicenseeService.update(context, number, licensee, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith(context, `${endpoint}/${number}`, licensee.serialize(), config); + + expect(result).toStrictEqual(licensee); + }); + }); + + describe('delete', () => { + it('deletes a licensee', async () => { + vi.mocked(Service).delete.mockResolvedValueOnce({ status: 204 } as AxiosResponse); + + const number = 'L1'; + const response = await LicenseeService.delete(context, number, true, config); + + expect(response.status).toBe(204); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.delete).toHaveBeenCalledWith(context, `${endpoint}/${number}`, { forceCascade: true }, config); + }); + }); + + describe('validate', () => { + it('validate a licensee', async () => { + const raw = [ + { type: Constants.Validation.TYPE, props: { productModuleNumber: 'PM1', valid: 'true' } }, + { type: Constants.Validation.TYPE, props: { productModuleNumber: 'PM2', valid: 'false' } }, + { type: Constants.Validation.TYPE, props: { productModuleNumber: 'PM3', valid: 'true' } }, + { type: 'License', props: { number: 'L1', active: 'true' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props as unknown as Record)); + vi.mocked(Service).post.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const number = 'L1'; + + const validationParameters = new ValidationParameters(); + validationParameters.setProductNumber('P1'); + validationParameters.setLicenseeProperty('someLicenseeProperty', 'Z'); + validationParameters.setParameter('PM1', { xParameter: 'X', yParameter: 'Y' }); + validationParameters.setParameter('PM2', { xParameter: 'X', yParameter: 'Y' }); + + const validationEndpoint = `${endpoint}/${number}/${Constants.Licensee.ENDPOINT_PATH_VALIDATE}`; + + const result = await LicenseeService.validate(context, number, validationParameters, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + validationEndpoint, + { + productNumber: 'P1', + someLicenseeProperty: 'Z', + productModuleNumber0: 'PM1', + productModuleNumber1: 'PM2', + xParameter0: 'X', + xParameter1: 'X', + yParameter0: 'Y', + yParameter1: 'Y', + }, + config, + ); + + const expected = raw + .filter(({ type }) => type === Constants.Validation.TYPE) + .map(({ props }) => ({ + productModuleNumber: props.productModuleNumber, + valid: JSON.parse(props.valid || '') as boolean, + })); + + expect(Object.values(result.validations)).toEqual(expected); + }); + }); + + describe('transfer', () => { + it('transfer a licensee', async () => { + const number = 'L1'; + const sourceLicenseeNumber = 'SL1'; + + vi.mocked(Service).post.mockResolvedValueOnce({ status: 200 } as AxiosResponse); + + const transferEndpoint = `${endpoint}/${number}/${Constants.Licensee.ENDPOINT_PATH_TRANSFER}`; + + await LicenseeService.transfer(context, number, sourceLicenseeNumber, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith(context, transferEndpoint, { sourceLicenseeNumber }, config); + }); + }); +}); diff --git a/test/specs/services/NotificationService.spec.js b/test/specs/services/NotificationService.spec.js deleted file mode 100644 index 601524b..0000000 --- a/test/specs/services/NotificationService.spec.js +++ /dev/null @@ -1,192 +0,0 @@ -import axios from 'axios'; -import AxiosMockAdapter from 'axios-mock-adapter'; -import notificationFactory from 'test@/factories/notification'; -import Item from 'test@/response/Item'; -import Info from 'test@/response/Info'; -import Response from 'test@/response'; -import Context from '@/vo/Context'; -import Notification from '@/entities/Notification'; -import NotificationService from '@/services/NotificationService'; -import Constants from '@/Constants'; -import Service from '@/services/Service'; -import NlicError from '@/errors/NlicError'; - -describe('services/NotificationService', () => { - let context; - let mock; - - beforeAll(() => { - context = new Context().setUsername('Demo').setPassword('demo'); - }); - - beforeEach(() => { - mock = new AxiosMockAdapter(axios); - }); - - it('check "create" method', async () => { - const notification = notificationFactory(); - - // configure mock for create request - mock.onPost(`${context.getBaseUrl()}/${Constants.Notification.ENDPOINT_PATH}`) - .reply(200, new Response( - new Item({ ...notification }, 'Notification'), - )); - - const entity = await NotificationService.create(context, notification); - - expect(entity instanceof Notification).toBe(true); - expect(entity.getProperty('number', null)).toBe(notification.number); - expect(entity.getProperty('name', null)).toBe(notification.name); - expect(entity.getProperty('active', null)).toBe(notification.active); - expect(entity.getProperty('protocol', null)).toBe(notification.protocol); - expect(entity.getProperty('events', null)).toBe(notification.events); - expect(entity.getProperty('payload', null)).toBe(notification.payload); - expect(entity.getProperty('endpoint', null)).toBe(notification.endpoint); - expect(entity.getProperty('custom_property', null)).toBe(notification.custom_property); - }); - - describe('check "get" method', () => { - it('should return entity', async () => { - const notification = notificationFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/${Constants.Notification.ENDPOINT_PATH}/${notification.number}`) - .reply(200, new Response( - new Item({ ...notification }, 'Notification'), - )); - - const entity = await NotificationService.get(context, notification.number); - - expect(entity instanceof Notification).toBe(true); - expect(entity.getProperty('number', null)).toBe(notification.number); - expect(entity.getProperty('name', null)).toBe(notification.name); - expect(entity.getProperty('active', null)).toBe(notification.active); - expect(entity.getProperty('protocol', null)).toBe(notification.protocol); - expect(entity.getProperty('events', null)).toBe(notification.events); - expect(entity.getProperty('payload', null)).toBe(notification.payload); - expect(entity.getProperty('endpoint', null)).toBe(notification.endpoint); - expect(entity.getProperty('custom_property', null)).toBe(notification.custom_property); - }); - - it('should throw error when entity not found', async () => { - const number = 'Any-number-that-not-exist'; - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/${Constants.Notification.ENDPOINT_PATH}/${number}`) - .reply(400, new Response( - new Info('Requested notification does not exist', 'NotFoundException'), - )); - try { - await NotificationService.get(context, number); - fail('should throw error'); - } catch (e) { - expect(e instanceof NlicError).toBe(true); - } - }); - }); - - describe('check "list" method', () => { - it('should return entities array', async () => { - const notifications = notificationFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/${Constants.Notification.ENDPOINT_PATH}`) - .reply(200, new Response(notifications.map((v) => new Item(v, 'Notification')))); - - const list = await NotificationService.list(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(10); - - list.forEach((entity, k) => { - const notification = notifications[k]; - expect(entity.getProperty('number', null)).toBe(notification.number); - expect(entity.getProperty('name', null)).toBe(notification.name); - expect(entity.getProperty('active', null)).toBe(notification.active); - expect(entity.getProperty('protocol', null)).toBe(notification.protocol); - expect(entity.getProperty('events', null)).toBe(notification.events); - expect(entity.getProperty('payload', null)).toBe(notification.payload); - expect(entity.getProperty('endpoint', null)).toBe(notification.endpoint); - expect(entity.getProperty('custom_property', null)).toBe(notification.custom_property); - }); - }); - - it('should has pagination', async () => { - const notifications = notificationFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/${Constants.Notification.ENDPOINT_PATH}`) - .reply(() => { - const response = new Response(notifications.map((v) => new Item(v, 'VendorHook'))); - response.setPage(2, 10, 1000); - - return [200, response]; - }); - - const list = await NotificationService.list(context, { page: 2, items: 10 }); - - expect(list.getPageNumber()).toBe(2); - expect(list.getItemsNumber()).toBe(10); - expect(list.getTotalPages()).toBe(100); - expect(list.getTotalItems()).toBe(1000); - expect(list.hasNext()).toBe(true); - }); - - it('check filter', async () => { - const notifications = notificationFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/${Constants.Notification.ENDPOINT_PATH}`) - .reply(200, new Response(notifications.map((v) => new Item(v)))); - - // if filter parameter is object - await NotificationService.list(context, { page: 2, items: 10 }); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=2;items=10'); - - // if filter parameter is string - await NotificationService.list(context, 'page=3;items=20'); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=3;items=20'); - }); - }); - - it('check "update" method', async () => { - let notification = notificationFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/${Constants.Notification.ENDPOINT_PATH}/${notification.number}`) - .reply(200, new Response( - new Item({ ...notification }, 'Notification'), - )); - - notification = await NotificationService.get(context, notification.number); - - notification.setProperty('name', 'MY-NAME-UPDATED'); - notification.setProperty('custom_property', 'MY-CUSTOM-PROPERTY-UPDATED'); - - // configure mock for update request - mock.onPost(`${context.getBaseUrl()}/${Constants.Notification.ENDPOINT_PATH}/${notification.number}`) - .reply(200, new Response( - new Item({ ...notification }, 'Notification'), - )); - - const updated = await NotificationService.update(context, notification.getProperty('number'), notification); - - expect(updated instanceof Notification).toBe(true); - expect(updated.getProperty('name', null)).toBe(notification.name); - expect(updated.getProperty('custom_property', null)).toBe(notification.custom_property); - }); - - it('check "delete" method', async () => { - const number = 'some-number'; - - // configure mock for delete request - mock.onDelete(`${context.getBaseUrl()}/${Constants.Notification.ENDPOINT_PATH}/${number}`) - .reply(204); - - await NotificationService.delete(context, number); - - expect(Service.getLastHttpRequestInfo().status).toBe(204); - }); -}); diff --git a/test/specs/services/NotificationService.spec.ts b/test/specs/services/NotificationService.spec.ts new file mode 100644 index 0000000..180dde8 --- /dev/null +++ b/test/specs/services/NotificationService.spec.ts @@ -0,0 +1,226 @@ +import { AxiosResponse } from 'axios'; +import { describe, it, expect, vi, afterEach } from 'vitest'; + +// constants +import Constants from '@/constants'; +import NotificationProtocol from '@/constants/NotificationProtocol'; + +// entities +import Notification from '@/entities/Notification'; + +// services +import NotificationService from '@/services/NotificationService'; +import Service from '@/services/Service'; + +// types +import { NlicResponse } from '@/types/api/response'; + +// vo +import Context from '@/vo/Context'; + +// test utils +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +// mocking +vi.mock('@/services/Service'); + +describe('NotificationService', () => { + const context = new Context({ username: 'demo', password: '123' }); + const config = {}; + const endpoint = Constants.Notification.ENDPOINT_PATH; + const itemType = Constants.Notification.TYPE; + + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe('get', () => { + it('returns a valid notification', async () => { + const number = 'N1'; + + const props = { + number, + active: 'true', + name: 'Sample name', + protocol: NotificationProtocol.WEBHOOK, + events: 'LICENSEE_CREATED,LICENSE_CREATED', + payload: '{$}', + endpoint: 'http://some-endpoint.test', + }; + + const items = [createMockItem(itemType, props), createMockItem('Product', { number: 'P1' })]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const notification = await NotificationService.get(context, number, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}/${number}`, {}, config); + + expect(notification).toStrictEqual({ + number, + active: true, + name: 'Sample name', + protocol: NotificationProtocol.WEBHOOK, + events: ['LICENSEE_CREATED', 'LICENSE_CREATED'], + payload: '{$}', + endpoint: 'http://some-endpoint.test', + }); + }); + }); + + describe('list', () => { + it('returns array of notifications', async () => { + const raw = [ + { type: itemType, props: { number: 'N1', active: 'false', customProperty: 'A' } }, + { type: itemType, props: { number: 'N2', active: 'true', customProperty: 'B' } }, + { type: 'Product', props: { number: 'P1', active: 'true', customProperty: 'C' } }, + { type: 'License', props: { number: 'L1', active: 'true', customProperty: 'D' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props)); + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await NotificationService.list<{ customProperty: string }>(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + const expected = raw + .filter(({ type }) => type === itemType) + .map(({ props }) => ({ + number: props.number, + active: JSON.parse(props.active) as boolean, + customProperty: props.customProperty, + })); + + expect(result).toEqual(expect.arrayContaining(expected)); + }); + + it('parses pagination', async () => { + const pagination = { + pagenumber: '1', + itemsnumber: '10', + totalpages: '30', + totalitems: '300', + hasnext: 'true', + }; + const items = Array.from({ length: 10 }, (_, i) => createMockItem(itemType, { number: `L${i}` })); + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items, undefined, pagination), + } as AxiosResponse); + + const result = await NotificationService.list(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + expect(result.getPagination()).toStrictEqual({ + pageNumber: parseInt(pagination.pagenumber, 10), + itemsNumber: parseInt(pagination.itemsnumber, 10), + totalPages: parseInt(pagination.totalpages, 10), + totalItems: parseInt(pagination.totalitems, 10), + hasNext: true, + }); + }); + + it('sends correct filter param', async () => { + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse() } as AxiosResponse); + await NotificationService.list(context, { page: 2, items: 10 }, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, { filter: 'page=2;items=10' }, config); + }); + }); + + describe('create', () => { + it('creates a notification', async () => { + const notification = Notification({ + number: 'N1', + active: false, + events: ['LICENSEE_CREATED', 'LICENSE_CREATED'], + customProperty: 'X', + }); + + const items = [ + createMockItem(itemType, { + number: 'N1', + active: 'false', + events: 'LICENSEE_CREATED,LICENSE_CREATED', + customProperty: 'X', + }), + createMockItem('Product', { number: 'P1', active: 'true', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await NotificationService.create(context, notification, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + endpoint, + { + number: 'N1', + active: 'false', + events: 'LICENSEE_CREATED,LICENSE_CREATED', + customProperty: 'X', + }, + config, + ); + + expect(result).toStrictEqual(notification); + }); + }); + + describe('update', () => { + it('updates a notification', async () => { + const number = 'N1'; + + const notification = Notification({ + number, + active: false, + events: ['LICENSEE_CREATED', 'LICENSE_CREATED'], + customProperty: 'X', + }); + + const items = [ + createMockItem(itemType, { + number, + active: 'false', + events: 'LICENSEE_CREATED,LICENSE_CREATED', + customProperty: 'X', + }), + createMockItem('Product', { number: 'P1', active: 'ture', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await NotificationService.update(context, number, notification, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith(context, `${endpoint}/${number}`, notification.serialize(), config); + + expect(result).toStrictEqual(notification); + }); + }); + + describe('delete', () => { + it('deletes a notification', async () => { + vi.mocked(Service).delete.mockResolvedValueOnce({ status: 204 } as AxiosResponse); + + const number = 'N1'; + const response = await NotificationService.delete(context, number, true, config); + + expect(response.status).toBe(204); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.delete).toHaveBeenCalledWith(context, `${endpoint}/${number}`, { forceCascade: true }, config); + }); + }); +}); diff --git a/test/specs/services/PaymentMethodService.spec.js b/test/specs/services/PaymentMethodService.spec.js deleted file mode 100644 index 37bf769..0000000 --- a/test/specs/services/PaymentMethodService.spec.js +++ /dev/null @@ -1,117 +0,0 @@ -import axios from 'axios'; -import AxiosMockAdapter from 'axios-mock-adapter'; -import paymentMethodFactory from 'test@/factories/paymentMethod'; -import Item from 'test@/response/Item'; -import Info from 'test@/response/Info'; -import Response from 'test@/response'; -import Context from '@/vo/Context'; -import PaymentMethod from '@/entities/PaymentMethod'; -import PaymentMethodService from '@/services/PaymentMethodService'; -import NlicError from '@/errors/NlicError'; - -describe('services/PaymentMethodService', () => { - let context; - let mock; - - beforeAll(() => { - context = new Context().setUsername('Demo').setPassword('demo'); - }); - - beforeEach(() => { - mock = new AxiosMockAdapter(axios); - }); - - describe('check "get" method', () => { - it('should return entity', async () => { - const paymentMethod = paymentMethodFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/paymentmethod/${paymentMethod.number}`) - .reply(200, new Response(new Item(paymentMethod))); - - const entity = await PaymentMethodService.get(context, paymentMethod.number); - - expect(entity instanceof PaymentMethod).toBe(true); - expect(entity.getProperty('number', null)).toBe(paymentMethod.number); - }); - - it('should throw error when payment method is not supported', async () => { - const number = 'Payment-that-is-not-supported'; - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/paymentmethod/${number}`) - .reply(() => { - if (['PAYPAL', 'PAYPAL_SANDBOX', 'STRIPE'].indexOf(number) === -1) { - return [400, new Response( - new Info('Requested payment method is not supported', 'MalformedRequestException'), - )]; - } - - return [200, new Response(new Item(paymentMethodFactory({ number })))]; - }); - - try { - await PaymentMethodService.get(context, number); - - fail('should throw error'); - } catch (e) { - expect(e instanceof Error).toBe(true); - } - }); - - it('should throw error when entity not found', async () => { - const number = 'Any-number-that-not-exist'; - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/paymentmethod/${number}`) - .reply(400, new Response( - new Info('Requested paymentMethod does not exist', 'NotFoundException'), - )); - - try { - await PaymentMethodService.get(context, number); - fail('should throw error'); - } catch (e) { - expect(e instanceof NlicError).toBe(true); - } - }); - }); - - describe('check "list" method', async () => { - it('should return entities array', async () => { - const paymentMethods = paymentMethodFactory(3); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/paymentmethod`) - .reply(200, new Response(paymentMethods.map((v) => new Item(v)))); - - const list = await PaymentMethodService.list(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(3); - - list.forEach((entity, k) => { - const paymentMethod = paymentMethods[k]; - expect(entity instanceof PaymentMethod).toBe(true); - expect(entity.getProperty('number', null)).toBe(paymentMethod.number); - expect(entity.getProperty('active', null)).toBe(paymentMethod.active); - }); - }); - - it('should has pagination', async () => { - const paymentMethods = paymentMethodFactory(3); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/paymentmethod`) - .reply(200, new Response(paymentMethods.map((v) => new Item(v)))); - - const list = await PaymentMethodService.list(context); - - expect(list.getPageNumber()).toBe(0); - expect(list.getItemsNumber()).toBe(3); - expect(list.getTotalPages()).toBe(1); - expect(list.getTotalItems()).toBe(3); - expect(list.hasNext()).toBe(false); - }); - }); -}); diff --git a/test/specs/services/PaymentMethodService.spec.ts b/test/specs/services/PaymentMethodService.spec.ts new file mode 100644 index 0000000..19a14a5 --- /dev/null +++ b/test/specs/services/PaymentMethodService.spec.ts @@ -0,0 +1,159 @@ +import { AxiosResponse } from 'axios'; +import { describe, it, expect, vi, afterEach } from 'vitest'; + +// constants +import Constants from '@/constants'; + +// entities +import PaymentMethod from '@/entities/PaymentMethod'; + +// services +import PaymentMethodService from '@/services/PaymentMethodService'; +import Service from '@/services/Service'; + +// types +import { NlicResponse } from '@/types/api/response'; + +// vo +import Context from '@/vo/Context'; + +// test utils +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +// mocking +vi.mock('@/services/Service'); + +describe('PaymentMethodService', () => { + const context = new Context({ username: 'demo', password: '123' }); + const config = {}; + const endpoint = Constants.PaymentMethod.ENDPOINT_PATH; + const itemType = Constants.PaymentMethod.TYPE; + + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe('get', () => { + it('returns a valid paymentMethod', async () => { + const number = 'PAYPAL'; + + const props = { + number, + active: 'false', + 'paypal.subject': 'P-SUBJECT', + }; + + const items = [createMockItem(itemType, props), createMockItem('Product', { number: 'P1' })]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const paymentMethod = await PaymentMethodService.get(context, number, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}/${number}`, {}, config); + + expect(paymentMethod).toStrictEqual({ + number, + active: false, + 'paypal.subject': 'P-SUBJECT', + }); + }); + }); + + describe('list', () => { + it('returns array of paymentMethods', async () => { + const raw = [ + { type: itemType, props: { number: 'PAYPAL', active: 'false', customProperty: 'A' } }, + { type: itemType, props: { number: 'STRIPE', active: 'true', customProperty: 'B' } }, + { type: 'Product', props: { number: 'P1', active: 'true', customProperty: 'C' } }, + { type: 'License', props: { number: 'L1', active: 'true', customProperty: 'D' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props)); + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await PaymentMethodService.list<{ customProperty: string }>(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + const expected = raw + .filter(({ type }) => type === itemType) + .map(({ props }) => ({ + number: props.number, + active: JSON.parse(props.active) as boolean, + customProperty: props.customProperty, + })); + + expect(result).toEqual(expect.arrayContaining(expected)); + }); + + it('parses pagination', async () => { + const pagination = { + pagenumber: '1', + itemsnumber: '10', + totalpages: '30', + totalitems: '300', + hasnext: 'true', + }; + const items = Array.from({ length: 10 }, (_, i) => createMockItem(itemType, { number: `L${i}` })); + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items, undefined, pagination), + } as AxiosResponse); + + const result = await PaymentMethodService.list(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + expect(result.getPagination()).toStrictEqual({ + pageNumber: parseInt(pagination.pagenumber, 10), + itemsNumber: parseInt(pagination.itemsnumber, 10), + totalPages: parseInt(pagination.totalpages, 10), + totalItems: parseInt(pagination.totalitems, 10), + hasNext: true, + }); + }); + + it('sends correct filter param', async () => { + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse() } as AxiosResponse); + await PaymentMethodService.list(context, { page: 2, items: 10 }, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, { filter: 'page=2;items=10' }, config); + }); + }); + + describe('update', () => { + it('updates a paymentMethod', async () => { + const number = 'STRIPE'; + + const paymentMethod = PaymentMethod({ + number, + active: true, + customProperty: 'X', + }); + + const items = [ + createMockItem(itemType, { + number, + active: 'true', + customProperty: 'X', + }), + createMockItem('Product', { number: 'P1', active: 'ture', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await PaymentMethodService.update(context, number, paymentMethod, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith(context, `${endpoint}/${number}`, paymentMethod.serialize(), config); + + expect(result).toStrictEqual(paymentMethod); + }); + }); +}); diff --git a/test/specs/services/ProductModuleService.spec.js b/test/specs/services/ProductModuleService.spec.js deleted file mode 100644 index b129a68..0000000 --- a/test/specs/services/ProductModuleService.spec.js +++ /dev/null @@ -1,174 +0,0 @@ -import axios from 'axios'; -import AxiosMockAdapter from 'axios-mock-adapter'; -import productModuleFactory from 'test@/factories/productModule'; -import Item from 'test@/response/Item'; -import Info from 'test@/response/Info'; -import Response from 'test@/response'; -import Context from '@/vo/Context'; -import ProductModule from '@/entities/ProductModule'; -import ProductModuleService from '@/services/ProductModuleService'; -import Service from '@/services/Service'; -import NlicError from '@/errors/NlicError'; - -describe('services/ProductModuleService', () => { - let context; - let mock; - - beforeAll(() => { - context = new Context().setUsername('Demo').setPassword('demo'); - }); - - beforeEach(() => { - mock = new AxiosMockAdapter(axios); - }); - - it('check "create" method', async () => { - const productModule = productModuleFactory(); - - // configure mock for create request - mock.onPost(`${context.getBaseUrl()}/productmodule`) - .reply(200, new Response(new Item(productModule))); - - const entity = await ProductModuleService.create(context, 'some number', productModule); - - expect(entity instanceof ProductModule).toBe(true); - expect(entity.getProperty('number', null)).toBe(productModule.number); - expect(entity.getProperty('name', null)).toBe(productModule.name); - expect(entity.getProperty('active', null)).toBe(productModule.active); - expect(entity.getProperty('licensingModel', null)).toBe(productModule.licensingModel); - expect(entity.getProperty('custom_property', null)).toBe(productModule.custom_property); - }); - - describe('check "get" method', () => { - it('should return entity', async () => { - const productModule = productModuleFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/productmodule/${productModule.number}`) - .reply(200, new Response(new Item(productModule))); - - const entity = await ProductModuleService.get(context, productModule.number); - - expect(entity instanceof ProductModule).toBe(true); - expect(entity.getProperty('number', null)).toBe(productModule.number); - expect(entity.getProperty('name', null)).toBe(productModule.name); - expect(entity.getProperty('active', null)).toBe(productModule.active); - expect(entity.getProperty('licensingModel', null)).toBe(productModule.licensingModel); - expect(entity.getProperty('custom_property', null)).toBe(productModule.custom_property); - }); - - it('should throw error when entity not found', async () => { - const number = 'Any-number-that-not-exist'; - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/productmodule/${number}`) - .reply(400, new Response( - new Info('Requested productModule does not exist', 'NotFoundException'), - )); - try { - await ProductModuleService.get(context, number); - fail('should throw error'); - } catch (e) { - expect(e instanceof NlicError).toBe(true); - } - }); - }); - - describe('check "list" method', () => { - it('should return entities array', async () => { - const productModules = productModuleFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/productmodule`) - .reply(200, new Response(productModules.map((v) => new Item(v)))); - - const list = await ProductModuleService.list(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(10); - - list.forEach((entity, k) => { - const productModule = productModules[k]; - expect(entity.getProperty('number', null)).toBe(productModule.number); - expect(entity.getProperty('name', null)).toBe(productModule.name); - expect(entity.getProperty('active', null)).toBe(productModule.active); - expect(entity.getProperty('licensingModel', null)).toBe(productModule.licensingModel); - expect(entity.getProperty('custom_property', null)).toBe(productModule.custom_property); - }); - }); - - it('should has pagination', async () => { - const productModules = productModuleFactory(50); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/productmodule`) - .reply(() => { - const response = new Response(productModules.map((v) => new Item(v))); - response.setPage(3, 50, 1050); - - return [200, response]; - }); - - const list = await ProductModuleService.list(context, { page: 3, items: 50 }); - - expect(list.getPageNumber()).toBe(3); - expect(list.getItemsNumber()).toBe(50); - expect(list.getTotalPages()).toBe(21); - expect(list.getTotalItems()).toBe(1050); - expect(list.hasNext()).toBe(true); - }); - - it('check "filter parameter"', async () => { - const productModules = productModuleFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/productmodule`) - .reply(200, new Response(productModules.map((v) => new Item(v)))); - - // if filter parameter is object - await ProductModuleService.list(context, { page: 2, items: 10 }); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=2;items=10'); - - // if filter parameter is string - await ProductModuleService.list(context, 'page=3;items=20'); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=3;items=20'); - }); - }); - - it('check "update" method', async () => { - let productModule = productModuleFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/productmodule/${productModule.number}`) - .reply(200, new Response(new Item(productModule))); - - productModule = await ProductModuleService.get(context, productModule.number); - - productModule.setProperty('name', 'MY-NAME-UPDATED'); - productModule.setProperty('custom_property', 'MY-CUSTOM-PROPERTY-UPDATED'); - - // configure mock for update request - mock.onPost(`${context.getBaseUrl()}/productmodule/${productModule.number}`) - .reply(200, new Response(new Item(productModule))); - - const updated = await ProductModuleService.update(context, productModule.getProperty('number'), productModule); - - expect(updated instanceof ProductModule).toBe(true); - expect(updated.getProperty('name', null)).toBe(productModule.name); - expect(updated.getProperty('custom_property', null)).toBe(productModule.custom_property); - }); - - it('check "delete" method', async () => { - const number = 'some-number'; - - // configure mock for delete request - mock.onDelete(`${context.getBaseUrl()}/productmodule/${number}`) - .reply(204); - - await ProductModuleService.delete(context, number); - - expect(Service.getLastHttpRequestInfo().status).toBe(204); - }); -}); diff --git a/test/specs/services/ProductModuleService.spec.ts b/test/specs/services/ProductModuleService.spec.ts new file mode 100644 index 0000000..eac1d1c --- /dev/null +++ b/test/specs/services/ProductModuleService.spec.ts @@ -0,0 +1,273 @@ +import { AxiosResponse } from 'axios'; +import { describe, it, expect, vi, afterEach } from 'vitest'; + +// constants +import Constants from '@/constants'; +import LicensingModel from '@/constants/LicensingModel'; + +// entities +import ProductModule from '@/entities/ProductModule'; + +// services +import ProductModuleService from '@/services/ProductModuleService'; +import Service from '@/services/Service'; + +// types +import { NlicResponse } from '@/types/api/response'; + +// vo +import Context from '@/vo/Context'; + +// test utils +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +// mocking +vi.mock('@/services/Service'); + +describe('ProductModuleService', () => { + const context = new Context({ username: 'demo', password: '123' }); + const config = {}; + const endpoint = Constants.ProductModule.ENDPOINT_PATH; + const itemType = Constants.ProductModule.TYPE; + + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe('get', () => { + it('returns a valid productModule', async () => { + const number = 'PM1'; + + const props = { + number, + active: 'false', + name: 'Sample name', + licensingModel: LicensingModel.QUOTA, + maxCheckoutValidity: '3', + yellowThreshold: '5', + redThreshold: '10', + productNumber: 'P1', + inUse: 'true', + }; + + const items = [createMockItem(itemType, props), createMockItem('Product', { number: 'P1' })]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const productModule = await ProductModuleService.get(context, number, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}/${number}`, {}, config); + + expect(productModule).toStrictEqual({ + number, + active: false, + name: 'Sample name', + licensingModel: LicensingModel.QUOTA, + maxCheckoutValidity: 3, + yellowThreshold: 5, + redThreshold: 10, + productNumber: 'P1', + inUse: true, + }); + }); + }); + + describe('list', () => { + it('returns array of productModules', async () => { + const raw = [ + { type: itemType, props: { number: 'PM1', active: 'false', customProperty: 'A' } }, + { type: itemType, props: { number: 'PM2', active: 'true', customProperty: 'B' } }, + { type: 'Product', props: { number: 'P1', active: 'true', customProperty: 'C' } }, + { type: 'License', props: { number: 'L1', active: 'true', customProperty: 'D' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props)); + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await ProductModuleService.list<{ customProperty: string }>(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + const expected = raw + .filter(({ type }) => type === itemType) + .map(({ props }) => ({ + number: props.number, + active: JSON.parse(props.active) as boolean, + customProperty: props.customProperty, + })); + + expect(result).toEqual(expect.arrayContaining(expected)); + }); + + it('parses pagination', async () => { + const pagination = { + pagenumber: '1', + itemsnumber: '10', + totalpages: '30', + totalitems: '300', + hasnext: 'true', + }; + const items = Array.from({ length: 10 }, (_, i) => createMockItem(itemType, { number: `L${i}` })); + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items, undefined, pagination), + } as AxiosResponse); + + const result = await ProductModuleService.list(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + expect(result.getPagination()).toStrictEqual({ + pageNumber: parseInt(pagination.pagenumber, 10), + itemsNumber: parseInt(pagination.itemsnumber, 10), + totalPages: parseInt(pagination.totalpages, 10), + totalItems: parseInt(pagination.totalitems, 10), + hasNext: true, + }); + }); + + it('sends correct filter param', async () => { + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse() } as AxiosResponse); + await ProductModuleService.list(context, { page: 2, items: 10 }, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, { filter: 'page=2;items=10' }, config); + }); + }); + + describe('create', () => { + it('creates a productModule', async () => { + const productNumber = 'P1'; + + const productModule = ProductModule({ + active: false, + name: 'Sample name', + licensingModel: LicensingModel.QUOTA, + maxCheckoutValidity: 3, + yellowThreshold: 5, + redThreshold: 10, + productNumber: 'P1', + customProperty: 'X', + inUse: true, + }); + + const items = [ + createMockItem(itemType, { + productNumber, + active: 'false', + name: 'Sample name', + licensingModel: LicensingModel.QUOTA, + maxCheckoutValidity: '3', + yellowThreshold: '5', + redThreshold: '10', + customProperty: 'X', + inUse: 'true', + }), + createMockItem('Product', { number: 'P1', active: 'true', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await ProductModuleService.create(context, 'P1', productModule, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + endpoint, + { + productNumber, + active: 'false', + name: 'Sample name', + licensingModel: LicensingModel.QUOTA, + maxCheckoutValidity: '3', + yellowThreshold: '5', + redThreshold: '10', + customProperty: 'X', + }, + config, + ); + + expect(result).toStrictEqual(productModule); + }); + }); + + describe('update', () => { + it('updates a productModule', async () => { + const number = 'PM1'; + + const productModule = ProductModule({ + number, + active: false, + name: 'Sample name', + licensingModel: LicensingModel.QUOTA, + maxCheckoutValidity: 3, + yellowThreshold: 5, + redThreshold: 10, + productNumber: 'P1', + customProperty: 'X', + inUse: true, + }); + + const items = [ + createMockItem(itemType, { + number, + active: 'false', + name: 'Sample name', + licensingModel: LicensingModel.QUOTA, + maxCheckoutValidity: '3', + yellowThreshold: '5', + redThreshold: '10', + productNumber: 'P1', + customProperty: 'X', + inUse: 'true', + }), + createMockItem('Product', { number: 'P1', active: 'ture', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await ProductModuleService.update(context, number, productModule, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + `${endpoint}/${number}`, + { + number, + active: 'false', + name: 'Sample name', + licensingModel: LicensingModel.QUOTA, + maxCheckoutValidity: '3', + yellowThreshold: '5', + redThreshold: '10', + productNumber: 'P1', + customProperty: 'X', + }, + config, + ); + + expect(result).toStrictEqual(productModule); + }); + }); + + describe('delete', () => { + it('deletes a productModule', async () => { + vi.mocked(Service).delete.mockResolvedValueOnce({ status: 204 } as AxiosResponse); + + const number = 'PM1'; + const response = await ProductModuleService.delete(context, number, true, config); + + expect(response.status).toBe(204); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.delete).toHaveBeenCalledWith(context, `${endpoint}/${number}`, { forceCascade: true }, config); + }); + }); +}); diff --git a/test/specs/services/ProductService.spec.js b/test/specs/services/ProductService.spec.js deleted file mode 100644 index b7ca0c0..0000000 --- a/test/specs/services/ProductService.spec.js +++ /dev/null @@ -1,213 +0,0 @@ -import axios from 'axios'; -import AxiosMockAdapter from 'axios-mock-adapter'; -import productFactory from 'test@/factories/product'; -import { fix as discountFixFactory, percent as discountPercentFactory } from 'test@/factories/productDiscount'; -import Item from 'test@/response/Item'; -import Info from 'test@/response/Info'; -import Response from 'test@/response'; -import Context from '@/vo/Context'; -import Product from '@/entities/Product'; -import ProductService from '@/services/ProductService'; -import Service from '@/services/Service'; -import NlicError from '@/errors/NlicError'; - -describe('services/ProductService', () => { - let context; - let mock; - - beforeAll(() => { - context = new Context().setUsername('Demo').setPassword('demo'); - }); - - beforeEach(() => { - mock = new AxiosMockAdapter(axios); - }); - - it('check "create" method', async () => { - const product = productFactory(); - const fixDiscount = discountFixFactory(); - const percentDiscount = discountPercentFactory(); - - product.addDiscount(fixDiscount); - product.addDiscount(percentDiscount); - - // configure mock for create request - mock.onPost(`${context.getBaseUrl()}/product`) - .reply(200, new Response( - new Item({ ...product, discount: [fixDiscount, percentDiscount] }, 'Product'), - )); - - const entity = await ProductService.create(context, product); - - expect(entity instanceof Product).toBe(true); - expect(entity.getProperty('number', null)).toBe(product.number); - expect(entity.getProperty('name', null)).toBe(product.name); - expect(entity.getProperty('active', null)).toBe(product.active); - expect(entity.getProperty('version', null)).toBe(product.version); - expect(entity.getProperty('description', null)).toBe(product.description); - expect(entity.getProperty('licensingInfo', null)).toBe(product.licensingInfo); - expect(entity.getProperty('licenseeAutoCreate', null)).toBe(product.licenseeAutoCreate); - expect(entity.getProperty('custom_property', null)).toBe(product.custom_property); - expect(entity.getProductDiscounts().length).toBe(2); - }); - - describe('check "get" method', () => { - it('should return entity', async () => { - const product = productFactory(); - const fixDiscount = discountFixFactory(); - const percentDiscount = discountPercentFactory(); - - product.addDiscount(fixDiscount); - product.addDiscount(percentDiscount); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/product/${product.number}`) - .reply(200, new Response( - new Item({ ...product, discount: [fixDiscount, percentDiscount] }, 'Product'), - )); - - const entity = await ProductService.get(context, product.number); - - expect(entity instanceof Product).toBe(true); - expect(entity.getProperty('number', null)).toBe(product.number); - expect(entity.getProperty('name', null)).toBe(product.name); - expect(entity.getProperty('active', null)).toBe(product.active); - expect(entity.getProperty('version', null)).toBe(product.version); - expect(entity.getProperty('description', null)).toBe(product.description); - expect(entity.getProperty('licensingInfo', null)).toBe(product.licensingInfo); - expect(entity.getProperty('licenseeAutoCreate', null)).toBe(product.licenseeAutoCreate); - expect(entity.getProperty('custom_property', null)).toBe(product.custom_property); - expect(entity.getProductDiscounts().length).toBe(2); - }); - - it('should throw error when entity not found', async () => { - const number = 'Any-number-that-not-exist'; - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/product/${number}`) - .reply(400, new Response( - new Info('Requested product does not exist', 'NotFoundException'), - )); - try { - await ProductService.get(context, number); - fail('should throw error'); - } catch (e) { - expect(e instanceof NlicError).toBe(true); - } - }); - }); - - describe('check "list" method', () => { - it('should return entities array', async () => { - const products = productFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/product`) - .reply(200, new Response(products.map((v) => new Item(v)))); - - const list = await ProductService.list(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(10); - - list.forEach((entity, k) => { - const product = products[k]; - expect(entity.getProperty('number', null)).toBe(product.number); - expect(entity.getProperty('name', null)).toBe(product.name); - expect(entity.getProperty('active', null)).toBe(product.active); - expect(entity.getProperty('version', null)).toBe(product.version); - expect(entity.getProperty('description', null)).toBe(product.description); - expect(entity.getProperty('licensingInfo', null)).toBe(product.licensingInfo); - expect(entity.getProperty('licenseeAutoCreate', null)).toBe(product.licenseeAutoCreate); - expect(entity.getProperty('custom_property', null)).toBe(product.custom_property); - }); - }); - - it('should has pagination', async () => { - const products = productFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/product`) - .reply(() => { - const response = new Response(products.map((v) => new Item(v))); - response.setPage(2, 10, 1000); - - return [200, response]; - }); - - const list = await ProductService.list(context, { page: 2, items: 10 }); - - expect(list.getPageNumber()).toBe(2); - expect(list.getItemsNumber()).toBe(10); - expect(list.getTotalPages()).toBe(100); - expect(list.getTotalItems()).toBe(1000); - expect(list.hasNext()).toBe(true); - }); - - it('check filter', async () => { - const products = productFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/product`) - .reply(200, new Response(products.map((v) => new Item(v)))); - - // if filter parameter is object - await ProductService.list(context, { page: 2, items: 10 }); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=2;items=10'); - - // if filter parameter is string - await ProductService.list(context, 'page=3;items=20'); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=3;items=20'); - }); - }); - - it('check "update" method', async () => { - let product = productFactory(); - const fixDiscount = discountFixFactory(); - const percentDiscount = discountPercentFactory(); - const discountForUpdate = discountFixFactory(); - - product.addDiscount(fixDiscount); - product.addDiscount(percentDiscount); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/product/${product.number}`) - .reply(200, new Response( - new Item({ ...product, discount: [fixDiscount, percentDiscount] }, 'Product'), - )); - - product = await ProductService.get(context, product.number); - - product.setProperty('name', 'MY-NAME-UPDATED'); - product.setProperty('custom_property', 'MY-CUSTOM-PROPERTY-UPDATED'); - - product.addDiscount(discountForUpdate); - - // configure mock for update request - mock.onPost(`${context.getBaseUrl()}/product/${product.number}`) - .reply(200, new Response( - new Item({ ...product, discount: [fixDiscount, percentDiscount, discountForUpdate] }, 'Product'), - )); - - const updated = await ProductService.update(context, product.getProperty('number'), product); - - expect(updated instanceof Product).toBe(true); - expect(updated.getProperty('name', null)).toBe(product.name); - expect(updated.getProperty('custom_property', null)).toBe(product.custom_property); - expect(updated.getProductDiscounts().length).toBe(3); - }); - - it('check "delete" method', async () => { - const number = 'some-number'; - - // configure mock for delete request - mock.onDelete(`${context.getBaseUrl()}/product/${number}`) - .reply(204); - - await ProductService.delete(context, number); - - expect(Service.getLastHttpRequestInfo().status).toBe(204); - }); -}); diff --git a/test/specs/services/ProductService.spec.ts b/test/specs/services/ProductService.spec.ts new file mode 100644 index 0000000..9a9c95c --- /dev/null +++ b/test/specs/services/ProductService.spec.ts @@ -0,0 +1,313 @@ +import { AxiosResponse } from 'axios'; +import { describe, it, expect, vi, afterEach } from 'vitest'; + +// constants +import Constants from '@/constants'; + +// entities +import Product from '@/entities/Product'; +import ProductDiscount from '@/entities/ProductDiscount'; + +// services +import ProductService from '@/services/ProductService'; +import Service from '@/services/Service'; + +// types +import { NlicResponse } from '@/types/api/response'; + +// vo +import Context from '@/vo/Context'; + +// test utils +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +// mocking +vi.mock('@/services/Service'); + +describe('ProductService', () => { + const context = new Context({ username: 'demo', password: '123' }); + const config = {}; + const endpoint = Constants.Product.ENDPOINT_PATH; + const itemType = Constants.Product.TYPE; + + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe('get', () => { + it('returns a valid product', async () => { + const number = 'P1'; + + const props = { + number, + active: 'true', + name: 'Sample name', + version: '1.0-alfa', + description: 'Description', + licensingInfo: 'Licensing Info', + licenseeAutoCreate: 'false', + discount: [ + { + totalPrice: '100.00', + currency: 'EUR', + amountPercent: '10', + }, + { + totalPrice: '200.00', + currency: 'USD', + amountFix: '3', + }, + ], + inUse: 'true', + }; + + const items = [createMockItem(itemType, props), createMockItem('Transaction', { number: 'T1' })]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const product = await ProductService.get(context, number, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}/${number}`, {}, config); + + expect(product).toStrictEqual({ + number, + active: true, + name: 'Sample name', + version: '1.0-alfa', + description: 'Description', + licensingInfo: 'Licensing Info', + licenseeAutoCreate: false, + discounts: [ + ProductDiscount({ totalPrice: 100, currency: 'EUR', amountPercent: 10 }), + ProductDiscount({ totalPrice: 200, currency: 'USD', amountFix: 3 }), + ], + inUse: true, + }); + }); + }); + + describe('list', () => { + it('returns array of products', async () => { + const raw = [ + { type: itemType, props: { number: 'P1', active: 'false', customProperty: 'A' } }, + { type: itemType, props: { number: 'P2', active: 'true', customProperty: 'B' } }, + { type: 'Transaction', props: { number: 'T1', active: 'true', customProperty: 'C' } }, + { type: 'License', props: { number: 'L1', active: 'true', customProperty: 'D' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props)); + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await ProductService.list<{ customProperty: string }>(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + const expected = raw + .filter(({ type }) => type === itemType) + .map(({ props }) => ({ + number: props.number, + active: JSON.parse(props.active) as boolean, + customProperty: props.customProperty, + })); + + expect(result).toEqual(expect.arrayContaining(expected)); + }); + + it('parses pagination', async () => { + const pagination = { + pagenumber: '1', + itemsnumber: '10', + totalpages: '30', + totalitems: '300', + hasnext: 'true', + }; + const items = Array.from({ length: 10 }, (_, i) => createMockItem(itemType, { number: `P${i}` })); + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items, undefined, pagination), + } as AxiosResponse); + + const result = await ProductService.list(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + expect(result.getPagination()).toStrictEqual({ + pageNumber: parseInt(pagination.pagenumber, 10), + itemsNumber: parseInt(pagination.itemsnumber, 10), + totalPages: parseInt(pagination.totalpages, 10), + totalItems: parseInt(pagination.totalitems, 10), + hasNext: true, + }); + }); + + it('sends correct filter param', async () => { + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse() } as AxiosResponse); + await ProductService.list(context, { page: 2, items: 10 }, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, { filter: 'page=2;items=10' }, config); + }); + }); + + describe('create', () => { + it('creates a product', async () => { + const product = Product({ + number: 'P1', + active: true, + name: 'Sample name', + version: '1.0-alfa', + description: 'Description', + licensingInfo: 'Licensing Info', + licenseeAutoCreate: false, + discounts: [ + ProductDiscount({ totalPrice: 100, currency: 'EUR', amountPercent: 10 }), + ProductDiscount({ totalPrice: 200, currency: 'USD', amountFix: 3 }), + ], + inUse: true, + }); + + const items = [ + createMockItem(itemType, { + number: 'P1', + active: 'true', + name: 'Sample name', + version: '1.0-alfa', + description: 'Description', + licensingInfo: 'Licensing Info', + licenseeAutoCreate: 'false', + discount: [ + { + totalPrice: '100.00', + currency: 'EUR', + amountPercent: '10', + }, + { + totalPrice: '200.00', + currency: 'USD', + amountFix: '3', + }, + ], + inUse: 'true', + }), + createMockItem('Transaction', { number: 'T1', active: 'true', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await ProductService.create(context, product, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + endpoint, + { + number: 'P1', + active: 'true', + name: 'Sample name', + version: '1.0-alfa', + description: 'Description', + licensingInfo: 'Licensing Info', + licenseeAutoCreate: 'false', + discount: ['100;EUR;10%', '200;USD;3'], + }, + config, + ); + + expect(result).toStrictEqual(product); + }); + }); + + describe('update', () => { + it('updates a product', async () => { + const number = 'P1'; + + const product = Product({ + number, + active: true, + name: 'Sample name', + version: '1.0-alfa', + description: 'Description', + licensingInfo: 'Licensing Info', + licenseeAutoCreate: false, + discounts: [ + ProductDiscount({ totalPrice: 100, currency: 'EUR', amountPercent: 10 }), + ProductDiscount({ totalPrice: 200, currency: 'USD', amountFix: 3 }), + ], + customProperty: 'X', + inUse: true, + }); + + const items = [ + createMockItem(itemType, { + number, + active: 'true', + name: 'Sample name', + version: '1.0-alfa', + description: 'Description', + licensingInfo: 'Licensing Info', + licenseeAutoCreate: 'false', + discount: [ + { + totalPrice: '100.00', + currency: 'EUR', + amountPercent: '10', + }, + { + totalPrice: '200.00', + currency: 'USD', + amountFix: '3', + }, + ], + customProperty: 'X', + inUse: 'true', + }), + createMockItem('Transaction', { number: 'T1', active: 'ture', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await ProductService.update(context, number, product, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + `${endpoint}/${number}`, + { + number, + active: 'true', + name: 'Sample name', + version: '1.0-alfa', + description: 'Description', + licensingInfo: 'Licensing Info', + licenseeAutoCreate: 'false', + discount: ['100;EUR;10%', '200;USD;3'], + customProperty: 'X', + }, + config, + ); + + expect(result).toStrictEqual(product); + }); + }); + + describe('delete', () => { + it('deletes a product', async () => { + vi.mocked(Service).delete.mockResolvedValueOnce({ status: 204 } as AxiosResponse); + + const number = 'PM1'; + const response = await ProductService.delete(context, number, true, config); + + expect(response.status).toBe(204); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.delete).toHaveBeenCalledWith(context, `${endpoint}/${number}`, { forceCascade: true }, config); + }); + }); +}); diff --git a/test/specs/services/Service.spec.ts b/test/specs/services/Service.spec.ts new file mode 100644 index 0000000..a2e9eac --- /dev/null +++ b/test/specs/services/Service.spec.ts @@ -0,0 +1,126 @@ +import { describe, it, expect, vi, beforeEach } from 'vitest'; + +// services +import Service from '@/services/Service'; + +// types +import { Info } from '@/types/api/response'; +import { RequestConfig } from '@/types/services/Service'; + +// vo +import Context from '@/vo/Context'; + +// utils +import createMockAxiosInstance from '@test-utils/createMockAxiosInstance'; +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +describe('Service', () => { + let mockAxios: ReturnType; + + beforeEach(() => { + mockAxios = createMockAxiosInstance(); + Service.setAxiosInstance(mockAxios); + }); + + describe('axios integration', () => { + it('calls axios and triggers response/info callbacks', async () => { + const infos = [{ id: 'SomeInfo', type: 'INFO', value: 'Test warning' }]; + const items = [createMockItem('SomeItem', { number: 'N1' })]; + const data = createMockResponse(items, infos as Info[]); + + mockAxios = createMockAxiosInstance({ data }); + Service.setAxiosInstance(mockAxios); + + const context = new Context({ username: 'demo', password: '123' }); + const onResponse = vi.fn(); + const onInfo = vi.fn(); + + const response = await Service.get(context, 'token/123', {}, { onResponse, onInfo }); + + expect(mockAxios).toHaveBeenCalledOnce(); + expect(onResponse).toHaveBeenCalledWith(response); + expect(onInfo).toHaveBeenCalledWith(infos); + expect(response).toMatchObject({ data }); + }); + }); + + describe.each([ + ['get', Service.get], + ['post', Service.post], + ['delete', Service.delete], + [ + 'request', + (ctx: Context, url: string, data?: Record, cfg?: RequestConfig) => + Service.request(ctx, 'put', url, data, cfg), + ], + ])('%s method', (methodName, method) => { + it('includes default headers and parameters', async () => { + const context = new Context({ username: 'demo', password: '123' }); + const payload = { someData: 'value' }; + + await method(context, 'some-url', payload, { axiosInstance: mockAxios }); + + expect(mockAxios).toHaveBeenCalledWith( + expect.objectContaining({ + headers: expect.objectContaining({ Accept: 'application/json' }) as Record, + url: expect.stringContaining('some-url') as string, + ...(methodName === 'post' || methodName === 'request' ? { data: payload } : { params: payload }), + }), + ); + }); + + describe('auth strategies', () => { + it('uses basic auth when username/password provided', async () => { + const context = new Context({ username: 'demo', password: '123' }); + + await method(context, 'some-url', {}, { axiosInstance: mockAxios }); + + expect(mockAxios).toHaveBeenCalledWith( + expect.objectContaining({ + auth: { + username: context.getUsername(), + password: context.getPassword(), + }, + }), + ); + }); + + it('uses apiKey when securityMode is APIKEY', async () => { + const context = new Context({ securityMode: 'APIKEY', apiKey: 'some-api-key' }); + + await method(context, 'some-url', {}, { axiosInstance: mockAxios }); + + expect(mockAxios).toHaveBeenCalledWith( + expect.objectContaining({ + headers: expect.objectContaining({ + Authorization: `Basic ${btoa('apiKey:some-api-key')}`, + }) as Record, + }), + ); + }); + }); + }); + + describe('toQueryString', () => { + it('serializes flat objects', () => { + expect(Service.toQueryString({ name: 'John', age: 30 })).toBe('name=John&age=30'); + }); + + it('serializes nested objects', () => { + expect(Service.toQueryString({ user: { name: 'John', age: 30 } })).toBe('user[name]=John&user[age]=30'); + }); + + it('serializes arrays', () => { + expect(Service.toQueryString({ tags: ['tag1', 'tag2'] })).toBe('tags=tag1&tags=tag2'); + }); + + it('serializes dates', () => { + const str = Service.toQueryString({ createdAt: new Date('2025-04-22T00:00:00Z') }); + expect(str).toContain('createdAt=2025-04-22T00%3A00%3A00.000Z'); + }); + + it('skips null and undefined values', () => { + expect(Service.toQueryString({ name: 'John', age: null, address: undefined })).toBe('name=John'); + }); + }); +}); diff --git a/test/specs/services/Token.spec.ts b/test/specs/services/Token.spec.ts new file mode 100644 index 0000000..d723700 --- /dev/null +++ b/test/specs/services/Token.spec.ts @@ -0,0 +1,251 @@ +import { AxiosResponse } from 'axios'; +import { describe, it, expect, vi, afterEach } from 'vitest'; + +// constants +import Constants from '@/constants'; + +// entities +import Token from '@/entities/Token'; + +// services +import Service from '@/services/Service'; +import TokenService from '@/services/TokenService'; + +// types +import { NlicResponse } from '@/types/api/response'; + +// vo +import Context from '@/vo/Context'; + +// test utils +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +// mocking +vi.mock('@/services/Service'); + +describe('TokenService', () => { + const context = new Context({ username: 'demo', password: '123' }); + const config = {}; + const endpoint = Constants.Token.ENDPOINT_PATH; + const itemType = Constants.Token.TYPE; + + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe('get', () => { + it('returns a token', async () => { + const number = 'T1'; + + const props = { + number, + active: 'true', + tokenType: 'SHOP', + expirationTime: '2024-01-03T12:00:00.000Z', + licenseeNumber: 'L1', + action: 'licenseeLogin', + apiKeyRole: 'ROLE_APIKEY_ADMIN', + bundleNumber: 'B1', + bundlePrice: '0.99', + productNumber: 'P1', + predefinedShoppingItem: 'PSI1', + successURL: 'http://some-success-url.test', + successURLTitle: 'Sample of success title', + cancelURL: 'http://some-cancel-url.test', + cancelURLTitle: 'Sample of cancel title', + shopURL: 'http://some-shop-url.test', + customProperty: 'X', + }; + + const items = [createMockItem(itemType, props), createMockItem('Product', { number: 'P1' })]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const token = await TokenService.get(context, number, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}/${number}`, {}, config); + + expect(token).toStrictEqual({ + number, + active: true, + expirationTime: new Date('2024-01-03T12:00:00.000Z'), + tokenType: 'SHOP', + licenseeNumber: 'L1', + action: 'licenseeLogin', + apiKeyRole: 'ROLE_APIKEY_ADMIN', + bundleNumber: 'B1', + bundlePrice: 0.99, + productNumber: 'P1', + predefinedShoppingItem: 'PSI1', + successURL: 'http://some-success-url.test', + successURLTitle: 'Sample of success title', + cancelURL: 'http://some-cancel-url.test', + cancelURLTitle: 'Sample of cancel title', + shopURL: 'http://some-shop-url.test', + customProperty: 'X', + }); + }); + }); + + describe('list', () => { + it('returns array of tokens', async () => { + const raw = [ + { type: itemType, props: { number: 'T1', active: 'false', customProperty: 'A' } }, + { type: itemType, props: { number: 'T2', active: 'true', customProperty: 'B' } }, + { type: 'Product', props: { number: 'P1', active: 'true', customProperty: 'C' } }, + { type: 'License', props: { number: 'L1', active: 'true', customProperty: 'D' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props)); + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await TokenService.list<{ customProperty: string }>(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + const expected = raw + .filter(({ type }) => type === itemType) + .map(({ props }) => ({ + number: props.number, + active: JSON.parse(props.active) as boolean, + customProperty: props.customProperty, + })); + + expect(result).toEqual(expect.arrayContaining(expected)); + }); + + it('parses pagination', async () => { + const pagination = { + pagenumber: '1', + itemsnumber: '10', + totalpages: '30', + totalitems: '300', + hasnext: 'true', + }; + const items = Array.from({ length: 10 }, (_, i) => createMockItem(itemType, { number: `P${i}` })); + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items, undefined, pagination), + } as AxiosResponse); + + const result = await TokenService.list(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + expect(result.getPagination()).toStrictEqual({ + pageNumber: parseInt(pagination.pagenumber, 10), + itemsNumber: parseInt(pagination.itemsnumber, 10), + totalPages: parseInt(pagination.totalpages, 10), + totalItems: parseInt(pagination.totalitems, 10), + hasNext: true, + }); + }); + + it('sends correct filter param', async () => { + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse() } as AxiosResponse); + await TokenService.list(context, { page: 2, items: 10 }, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, { filter: 'page=2;items=10' }, config); + }); + }); + + describe('create', () => { + it('creates a token', async () => { + const token = Token({ + number: 'T1', + active: true, + expirationTime: new Date('2024-01-03T12:00:00.000Z'), + tokenType: 'SHOP', + licenseeNumber: 'L1', + action: 'licenseeLogin', + apiKeyRole: 'ROLE_APIKEY_ADMIN', + bundleNumber: 'B1', + bundlePrice: 0.99, + productNumber: 'P1', + predefinedShoppingItem: 'PSI1', + successURL: 'http://some-success-url.test', + successURLTitle: 'Sample of success title', + cancelURL: 'http://some-cancel-url.test', + cancelURLTitle: 'Sample of cancel title', + shopURL: 'http://some-shop-url.test', + customProperty: 'X', + }); + + const items = [ + createMockItem(itemType, { + number: 'T1', + active: 'true', + tokenType: 'SHOP', + expirationTime: '2024-01-03T12:00:00.000Z', + licenseeNumber: 'L1', + action: 'licenseeLogin', + apiKeyRole: 'ROLE_APIKEY_ADMIN', + bundleNumber: 'B1', + bundlePrice: '0.99', + productNumber: 'P1', + predefinedShoppingItem: 'PSI1', + successURL: 'http://some-success-url.test', + successURLTitle: 'Sample of success title', + cancelURL: 'http://some-cancel-url.test', + cancelURLTitle: 'Sample of cancel title', + shopURL: 'http://some-shop-url.test', + customProperty: 'X', + }), + createMockItem('Product', { number: 'P1', active: 'true', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await TokenService.create(context, token, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + endpoint, + { + number: 'T1', + active: 'true', + tokenType: 'SHOP', + expirationTime: '2024-01-03T12:00:00.000Z', + licenseeNumber: 'L1', + action: 'licenseeLogin', + apiKeyRole: 'ROLE_APIKEY_ADMIN', + bundleNumber: 'B1', + bundlePrice: '0.99', + productNumber: 'P1', + predefinedShoppingItem: 'PSI1', + successURL: 'http://some-success-url.test', + successURLTitle: 'Sample of success title', + cancelURL: 'http://some-cancel-url.test', + cancelURLTitle: 'Sample of cancel title', + customProperty: 'X', + }, + config, + ); + + expect(result).toStrictEqual(token); + }); + }); + + describe('delete', () => { + it('deletes a token', async () => { + vi.mocked(Service).delete.mockResolvedValueOnce({ status: 204 } as AxiosResponse); + + const number = 'PM1'; + const response = await TokenService.delete(context, number, true, config); + + expect(response.status).toBe(204); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.delete).toHaveBeenCalledWith(context, `${endpoint}/${number}`, { forceCascade: true }, config); + }); + }); +}); diff --git a/test/specs/services/TokenService.spec.js b/test/specs/services/TokenService.spec.js deleted file mode 100644 index bc92476..0000000 --- a/test/specs/services/TokenService.spec.js +++ /dev/null @@ -1,162 +0,0 @@ -import axios from 'axios'; -import AxiosMockAdapter from 'axios-mock-adapter'; -import tokenFactory from 'test@/factories/token'; -import Item from 'test@/response/Item'; -import Info from 'test@/response/Info'; -import Response from 'test@/response'; -import Context from '@/vo/Context'; -import Token from '@/entities/Token'; -import TokenService from '@/services/TokenService'; -import Constants from '@/Constants'; -import Service from '@/services/Service'; -import NlicError from '@/errors/NlicError'; - -describe('services/TokenService', () => { - let context; - let mock; - - beforeAll(() => { - context = new Context().setUsername('Demo').setPassword('demo'); - }); - - beforeEach(() => { - mock = new AxiosMockAdapter(axios); - }); - - it('check "create" method', async () => { - const token = tokenFactory({ - tokenType: Constants.Token.Type.SHOP, - licenseeNumber: 'some number', - }); - - // configure mock for create request - mock.onPost(`${context.getBaseUrl()}/token`) - .reply(200, new Response(new Item(token))); - - const entity = await TokenService.create(context, token); - - expect(entity instanceof Token).toBe(true); - expect(entity.getProperty('number', null)).toBeTruthy(); - expect(entity.getProperty('tokenType', null)).toBe(token.getProperty('tokenType')); - expect(entity.getProperty('licenseeNumber', null)).toBe(token.getProperty('licenseeNumber')); - expect(entity.getProperty('expirationTime', null) instanceof Date).toBe(true); - }); - - describe('check "get" method', () => { - it('should return entity', async () => { - const token = tokenFactory({ - tokenType: Constants.Token.Type.SHOP, - licenseeNumber: 'some number', - }); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/token/${token.number}`) - .reply(200, new Response(new Item(token))); - - const entity = await TokenService.get(context, token.number); - - expect(entity instanceof Token).toBe(true); - expect(entity.getProperty('number', null)).toBeTruthy(); - expect(entity.getProperty('tokenType', null)).toBe(token.tokenType); - expect(entity.getProperty('licenseeNumber', null)).toBe(token.licenseeNumber); - expect(entity.getProperty('expirationTime', null) instanceof Date).toBe(true); - }); - - it('should throw error when entity not found', async () => { - const number = 'Any-number-that-not-exist'; - - // configure mock for product get request - mock.onGet(`${context.getBaseUrl()}/token/${number}`) - .reply(400, new Response( - new Info('Requested token does not exist', 'NotFoundException'), - )); - - try { - await TokenService.get(context, number); - fail('should throw error'); - } catch (e) { - expect(e instanceof NlicError).toBe(true); - } - }); - }); - - describe('check "list" method', async () => { - it('should return entities array', async () => { - const tokens = tokenFactory(10, { - tokenType: Constants.Token.Type.SHOP, - }); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/token`) - .reply(200, new Response(tokens.map((v) => new Item(v)))); - - const list = await TokenService.list(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(10); - - list.forEach((entity, k) => { - const token = tokens[k]; - expect(entity instanceof Token).toBe(true); - expect(entity.getProperty('number', null)).toBeTruthy(); - expect(entity.getProperty('tokenType', null)).toBe(token.tokenType); - expect(entity.getProperty('licenseeNumber', null)).toBe(token.licenseeNumber); - expect(entity.getProperty('expirationTime', null) instanceof Date).toBe(true); - }); - }); - - it('should has pagination', async () => { - const tokens = tokenFactory(100); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/token`) - .reply(() => { - const response = new Response(tokens.map((v) => new Item(v))); - response.setPage(1, 100, 200); - - return [200, response]; - }); - - const list = await TokenService.list(context, { page: 1 }); - - expect(list.getPageNumber()).toBe(1); - expect(list.getItemsNumber()).toBe(100); - expect(list.getTotalPages()).toBe(2); - expect(list.getTotalItems()).toBe(200); - expect(list.hasNext()).toBe(false); - }); - - it('check "filter parameter in list" method', async () => { - const token = tokenFactory({ - tokenType: Constants.Token.Type.SHOP, - licenseeNumber: 'some number', - }); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/token`) - .reply(200, new Response(new Item(token))); - - // if filter parameter is object - await TokenService.list(context, { page: 2, items: 10 }); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=2;items=10'); - - // if filter parameter is string - await TokenService.list(context, 'page=3;items=20'); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=3;items=20'); - }); - }); - - it('check "delete" method', async () => { - const number = 'some-number'; - - // configure mock for delete request - mock.onDelete(`${context.getBaseUrl()}/token/${number}`) - .reply(204); - - await TokenService.delete(context, number); - - expect(Service.getLastHttpRequestInfo().status).toBe(204); - }); -}); diff --git a/test/specs/services/TransactionService.spec.js b/test/specs/services/TransactionService.spec.js deleted file mode 100644 index 3efce4f..0000000 --- a/test/specs/services/TransactionService.spec.js +++ /dev/null @@ -1,155 +0,0 @@ -import axios from 'axios'; -import AxiosMockAdapter from 'axios-mock-adapter'; -import transactionFactory from 'test@/factories/transaction'; -import Item from 'test@/response/Item'; -import Info from 'test@/response/Info'; -import Response from 'test@/response'; -import Context from '@/vo/Context'; -import Transaction from '@/entities/Transaction'; -import TransactionService from '@/services/TransactionService'; -import Service from '@/services/Service'; -import NlicError from '@/errors/NlicError'; - -describe('services/TransactionService', () => { - let context; - let mock; - - beforeAll(() => { - context = new Context().setUsername('Demo').setPassword('demo'); - }); - - beforeEach(() => { - mock = new AxiosMockAdapter(axios); - }); - - it('check "create" method', async () => { - const transaction = transactionFactory(); - - // configure mock for create request - mock.onPost(`${context.getBaseUrl()}/transaction`) - .reply(200, new Response(new Item(transaction))); - - const entity = await TransactionService.create(context, transaction); - - expect(entity instanceof Transaction).toBe(true); - expect(entity.getProperty('number', null)).toBe(transaction.number); - expect(entity.getProperty('status', null)).toBe(transaction.status); - expect(entity.getProperty('source', null)).toBe(transaction.source); - }); - - describe('check "get" method', () => { - it('should return entity', async () => { - const transaction = transactionFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/transaction/${transaction.number}`) - .reply(200, new Response(new Item(transaction))); - - const entity = await TransactionService.get(context, transaction.number); - - expect(entity instanceof Transaction).toBe(true); - expect(entity.getProperty('number', null)).toBe(transaction.number); - expect(entity.getProperty('status', null)).toBe(transaction.status); - expect(entity.getProperty('source', null)).toBe(transaction.source); - }); - - it('should throw error when entity not found', async () => { - const number = 'Any-number-that-not-exist'; - - // configure mock for product get request - mock.onGet(`${context.getBaseUrl()}/transaction/${number}`) - .reply(400, new Response( - new Info('Requested transaction does not exist', 'NotFoundException'), - )); - try { - await TransactionService.get(context, number); - fail('should throw error'); - } catch (e) { - expect(e instanceof NlicError).toBe(true); - } - }); - }); - - describe('check "list" method', async () => { - it('should return entities array', async () => { - const transactions = transactionFactory(10); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/transaction`) - .reply(200, new Response(transactions.map((v) => new Item(v)))); - - const list = await TransactionService.list(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(10); - - list.forEach((entity, k) => { - const transaction = transactions[k]; - expect(entity instanceof Transaction).toBe(true); - expect(entity.getProperty('number', null)).toBe(transaction.number); - expect(entity.getProperty('status', null)).toBe(transaction.status); - expect(entity.getProperty('source', null)).toBe(transaction.source); - }); - }); - - it('should has pagination', async () => { - const transactions = transactionFactory(40); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/transaction`) - .reply(() => { - const response = new Response(transactions.map((v) => new Item(v))); - response.setPage(3, 40, 1200); - - return [200, response]; - }); - - const list = await TransactionService.list(context, { page: 3, items: 40 }); - - expect(list.getPageNumber()).toBe(3); - expect(list.getItemsNumber()).toBe(40); - expect(list.getTotalPages()).toBe(30); - expect(list.getTotalItems()).toBe(1200); - expect(list.hasNext()).toBe(true); - }); - - it('check "filter parameter in list" method', async () => { - const transaction = transactionFactory(); - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/transaction`) - .reply(200, new Response(new Item(transaction))); - - // if filter parameter is object - await TransactionService.list(context, { page: 2, items: 10 }); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=2;items=10'); - - // if filter parameter is string - await TransactionService.list(context, 'page=3;items=20'); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=3;items=20'); - }); - }); - - it('check "update" method', async () => { - let transaction = transactionFactory(); - - // configure mock for get request - mock.onGet(`${context.getBaseUrl()}/transaction/${transaction.number}`) - .reply(200, new Response(new Item(transaction))); - - transaction = await TransactionService.get(context, transaction.number); - - transaction.setProperty('status', 'CLOSED'); - - // configure mock for update request - mock.onPost(`${context.getBaseUrl()}/transaction/${transaction.number}`) - .reply(200, new Response(new Item(transaction))); - - const updated = await TransactionService.update(context, transaction.getProperty('number'), transaction); - - expect(updated instanceof Transaction).toBe(true); - expect(updated.getProperty('status', null)).toBe(transaction.getProperty('status')); - }); -}); diff --git a/test/specs/services/TransactionService.spec.ts b/test/specs/services/TransactionService.spec.ts new file mode 100644 index 0000000..b758886 --- /dev/null +++ b/test/specs/services/TransactionService.spec.ts @@ -0,0 +1,303 @@ +import { AxiosResponse } from 'axios'; +import { describe, it, expect, vi, afterEach } from 'vitest'; + +// constants +import Constants from '@/constants'; + +// entities +import License from '@/entities/License'; +import LicenseTransactionJoin from '@/entities/LicenseTransactionJoin'; +import Transaction from '@/entities/Transaction'; + +// services +import Service from '@/services/Service'; +import TransactionService from '@/services/TransactionService'; + +// types +import { NlicResponse } from '@/types/api/response'; + +// vo +import Context from '@/vo/Context'; + +// test utils +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +// mocking +vi.mock('@/services/Service'); + +describe('TransactionService', () => { + const context = new Context({ username: 'demo', password: '123' }); + const config = {}; + const endpoint = Constants.Transaction.ENDPOINT_PATH; + const itemType = Constants.Transaction.TYPE; + + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe('get', () => { + it('returns a transaction', async () => { + const number = 'T1'; + + const props = { + number, + active: 'true', + status: 'CLOSED', + source: 'AUTO_LICENSEE_VALIDATE', + grandTotal: '10.99', + discount: '2.99', + currency: 'EUR', + dateCreated: '2025-04-23T13:51:14.024Z', + dateClosed: '2025-04-24T13:51:14.024Z', + paymentMethod: 'PAYPAL', + licenseTransactionJoin: [ + { licenseNumber: 'L1', transactionNumber: 'T1' }, + { licenseNumber: 'L2', transactionNumber: 'T2' }, + ], + customProperty: 'X', + inUse: 'true', + }; + + const items = [createMockItem(itemType, props), createMockItem('Product', { number: 'P1' })]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const transaction = await TransactionService.get(context, number, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}/${number}`, {}, config); + + expect(transaction).toStrictEqual({ + number, + active: true, + status: 'CLOSED', + source: 'AUTO_LICENSEE_VALIDATE', + grandTotal: 10.99, + discount: 2.99, + currency: 'EUR', + dateCreated: new Date('2025-04-23T13:51:14.024Z'), + dateClosed: new Date('2025-04-24T13:51:14.024Z'), + paymentMethod: 'PAYPAL', + licenseTransactionJoins: [ + new LicenseTransactionJoin(Transaction({ number: 'T1' }), License({ number: 'L1' })), + new LicenseTransactionJoin(Transaction({ number: 'T2' }), License({ number: 'L2' })), + ], + customProperty: 'X', + inUse: true, + }); + }); + }); + + describe('list', () => { + it('returns array of transactions', async () => { + const raw = [ + { type: itemType, props: { number: 'T1', active: 'false', customProperty: 'A' } }, + { type: itemType, props: { number: 'T2', active: 'true', customProperty: 'B' } }, + { type: 'Product', props: { number: 'P1', active: 'true', customProperty: 'C' } }, + { type: 'License', props: { number: 'L1', active: 'true', customProperty: 'D' } }, + ]; + + const items = raw.map(({ type, props }) => createMockItem(type, props)); + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await TransactionService.list<{ customProperty: string }>(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + const expected = raw + .filter(({ type }) => type === itemType) + .map(({ props }) => ({ + number: props.number, + active: JSON.parse(props.active) as boolean, + customProperty: props.customProperty, + })); + + expect(result).toEqual(expect.arrayContaining(expected)); + }); + + it('parses pagination', async () => { + const pagination = { + pagenumber: '1', + itemsnumber: '10', + totalpages: '30', + totalitems: '300', + hasnext: 'true', + }; + const items = Array.from({ length: 10 }, (_, i) => createMockItem(itemType, { number: `L${i}` })); + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items, undefined, pagination), + } as AxiosResponse); + + const result = await TransactionService.list(context, null, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, `${endpoint}`, {}, config); + + expect(result.getPagination()).toStrictEqual({ + pageNumber: parseInt(pagination.pagenumber, 10), + itemsNumber: parseInt(pagination.itemsnumber, 10), + totalPages: parseInt(pagination.totalpages, 10), + totalItems: parseInt(pagination.totalitems, 10), + hasNext: true, + }); + }); + + it('sends correct filter param', async () => { + vi.mocked(Service).get.mockResolvedValueOnce({ data: createMockResponse() } as AxiosResponse); + await TransactionService.list(context, { page: 2, items: 10 }, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, { filter: 'page=2;items=10' }, config); + }); + }); + + describe('create', () => { + it('creates a transaction', async () => { + const transaction = Transaction({ + number: 'T1', + active: true, + status: 'CLOSED', + source: 'AUTO_LICENSEE_VALIDATE', + grandTotal: 10.99, + discount: 2.99, + currency: 'EUR', + dateCreated: new Date('2025-04-23T13:51:14.024Z'), + dateClosed: new Date('2025-04-24T13:51:14.024Z'), + paymentMethod: 'PAYPAL', + licenseTransactionJoins: [ + new LicenseTransactionJoin(Transaction({ number: 'T1' }), License({ number: 'L1' })), + new LicenseTransactionJoin(Transaction({ number: 'T2' }), License({ number: 'L2' })), + ], + customProperty: 'X', + inUse: true, + }); + + const items = [ + createMockItem(itemType, { + number: 'T1', + active: 'true', + status: 'CLOSED', + source: 'AUTO_LICENSEE_VALIDATE', + grandTotal: '10.99', + discount: '2.99', + currency: 'EUR', + dateCreated: '2025-04-23T13:51:14.024Z', + dateClosed: '2025-04-24T13:51:14.024Z', + paymentMethod: 'PAYPAL', + licenseTransactionJoin: [ + { licenseNumber: 'L1', transactionNumber: 'T1' }, + { licenseNumber: 'L2', transactionNumber: 'T2' }, + ], + customProperty: 'X', + inUse: 'true', + }), + createMockItem('Product', { number: 'P1', active: 'true', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await TransactionService.create(context, transaction, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + endpoint, + { + number: 'T1', + active: 'true', + status: 'CLOSED', + source: 'AUTO_LICENSEE_VALIDATE', + grandTotal: '10.99', + discount: '2.99', + currency: 'EUR', + dateCreated: '2025-04-23T13:51:14.024Z', + dateClosed: '2025-04-24T13:51:14.024Z', + paymentMethod: 'PAYPAL', + customProperty: 'X', + }, + config, + ); + + expect(result).toStrictEqual(transaction); + }); + }); + + describe('update', () => { + it('updates a transaction', async () => { + const number = 'T1'; + + const transaction = Transaction({ + number, + active: true, + status: 'CLOSED', + source: 'AUTO_LICENSEE_VALIDATE', + grandTotal: 10.99, + discount: 2.99, + currency: 'EUR', + dateCreated: new Date('2025-04-23T13:51:14.024Z'), + dateClosed: new Date('2025-04-24T13:51:14.024Z'), + paymentMethod: 'PAYPAL', + licenseTransactionJoins: [ + new LicenseTransactionJoin(Transaction({ number: 'T1' }), License({ number: 'L1' })), + new LicenseTransactionJoin(Transaction({ number: 'T2' }), License({ number: 'L2' })), + ], + customProperty: 'X', + inUse: true, + }); + + const items = [ + createMockItem(itemType, { + number, + active: 'true', + status: 'CLOSED', + source: 'AUTO_LICENSEE_VALIDATE', + grandTotal: '10.99', + discount: '2.99', + currency: 'EUR', + dateCreated: '2025-04-23T13:51:14.024Z', + dateClosed: '2025-04-24T13:51:14.024Z', + paymentMethod: 'PAYPAL', + licenseTransactionJoin: [ + { licenseNumber: 'L1', transactionNumber: 'T1' }, + { licenseNumber: 'L2', transactionNumber: 'T2' }, + ], + customProperty: 'X', + inUse: 'true', + }), + createMockItem('Product', { number: 'P1', active: 'ture', customProperty: 'Y' }), + ]; + + vi.mocked(Service).post.mockResolvedValueOnce({ data: createMockResponse(items) } as AxiosResponse); + + const result = await TransactionService.update(context, number, transaction, config); + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.post).toHaveBeenCalledWith( + context, + `${endpoint}/${number}`, + { + number: 'T1', + active: 'true', + status: 'CLOSED', + source: 'AUTO_LICENSEE_VALIDATE', + grandTotal: '10.99', + discount: '2.99', + currency: 'EUR', + dateCreated: '2025-04-23T13:51:14.024Z', + dateClosed: '2025-04-24T13:51:14.024Z', + paymentMethod: 'PAYPAL', + customProperty: 'X', + }, + config, + ); + + expect(result).toStrictEqual(transaction); + }); + }); +}); diff --git a/test/specs/services/UtilityService.spec.js b/test/specs/services/UtilityService.spec.js deleted file mode 100644 index c83b692..0000000 --- a/test/specs/services/UtilityService.spec.js +++ /dev/null @@ -1,194 +0,0 @@ -import axios from 'axios'; -import AxiosMockAdapter from 'axios-mock-adapter'; -import { licenseType as licenseTypeFactory, licensingModel as licensingModelFactory } from 'test@/factories/utility'; -import Item from 'test@/response/Item'; -import Response from 'test@/response'; -import Context from '@/vo/Context'; -import UtilityService from '@/services/UtilityService'; -import Service from '@/services/Service'; -import Country from '@/entities/Country'; - -describe('services/UtilityService', () => { - let context; - let mock; - - beforeAll(() => { - context = new Context().setUsername('Demo').setPassword('demo'); - }); - - beforeEach(() => { - mock = new AxiosMockAdapter(axios); - }); - - describe('check "listLicenseTypes" method', async () => { - it('should return entities array', async () => { - const licenseTypes = licenseTypeFactory(10); - - // configure mock for list request - // eslint-disable-next-line max-len - mock.onGet(`${context.getBaseUrl()}/utility/licenseTypes`) - .reply(200, new Response(licenseTypes.map((v) => new Item(v, 'LicenseType')))); - - const list = await UtilityService.listLicenseTypes(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(10); - }); - - it('should has pagination', async () => { - const licenseTypes = licenseTypeFactory(10); - - // configure mock for list request - // eslint-disable-next-line max-len - mock.onGet(`${context.getBaseUrl()}/utility/licenseTypes`) - .reply(200, new Response(licenseTypes.map((v) => new Item(v, 'LicenseType')))); - - const list = await UtilityService.listLicenseTypes(context); - - expect(list.getPageNumber()).toBe(0); - expect(list.getItemsNumber()).toBe(10); - expect(list.getTotalPages()).toBe(1); - expect(list.getTotalItems()).toBe(10); - expect(list.hasNext()).toBe(false); - }); - }); - - describe('check "listLicensingModels" method', async () => { - it('should return entities array', async () => { - const licenseModels = licensingModelFactory(10); - - // configure mock for list request - // eslint-disable-next-line max-len - mock.onGet(`${context.getBaseUrl()}/utility/licensingModels`) - .reply(200, new Response(licenseModels.map((v) => new Item(v, 'LicensingModelProperties')))); - - const list = await UtilityService.listLicensingModels(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(10); - }); - - it('should has pagination', async () => { - const licenseModels = licensingModelFactory(10); - - // configure mock for list request - // eslint-disable-next-line max-len - mock.onGet(`${context.getBaseUrl()}/utility/licensingModels`) - .reply(200, new Response(licenseModels.map((v) => new Item(v, 'LicensingModelProperties')))); - - const list = await UtilityService.listLicensingModels(context); - - expect(list.getPageNumber()).toBe(0); - expect(list.getItemsNumber()).toBe(10); - expect(list.getTotalPages()).toBe(1); - expect(list.getTotalItems()).toBe(10); - expect(list.hasNext()).toBe(false); - }); - }); - - describe('check "listCountries" method', () => { - it('should return entities array', async () => { - const countries = [ - new Country({ - code: 'AF', - name: 'AFGHANISTAN', - vatPercent: 0, - isEu: false, - }), - new Country({ - code: 'DE', - name: 'GERMANY', - vatPercent: 19, - isEu: true, - }), - new Country({ - code: 'AT', - name: 'AUSTRIA', - vatPercent: 20, - isEu: true, - }), - ]; - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/utility/countries`) - .reply(200, new Response(countries.map((v) => new Item(v)))); - - const list = await UtilityService.listCountries(context); - - expect(Array.isArray(list)).toBe(true); - expect(list.length).toBe(3); - }); - - it('should has pagination', async () => { - const countries = [ - new Country({ - code: 'AF', - name: 'AFGHANISTAN', - vatPercent: 0, - isEu: false, - }), - new Country({ - code: 'DE', - name: 'GERMANY', - vatPercent: 19, - isEu: true, - }), - new Country({ - code: 'AT', - name: 'AUSTRIA', - vatPercent: 20, - isEu: true, - }), - ]; - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/utility/countries`) - .reply(200, new Response(countries.map((v) => new Item(v)))); - - const list = await UtilityService.listCountries(context); - - expect(list.getPageNumber()).toBe(0); - expect(list.getItemsNumber()).toBe(3); - expect(list.getTotalPages()).toBe(1); - expect(list.getTotalItems()).toBe(3); - expect(list.hasNext()).toBe(false); - }); - - it('check "filter parameter in list" method', async () => { - const countries = [ - new Country({ - code: 'AF', - name: 'AFGHANISTAN', - vatPercent: 0, - isEu: false, - }), - new Country({ - code: 'DE', - name: 'GERMANY', - vatPercent: 19, - isEu: true, - }), - new Country({ - code: 'AT', - name: 'AUSTRIA', - vatPercent: 20, - isEu: true, - }), - ]; - - // configure mock for list request - mock.onGet(`${context.getBaseUrl()}/utility/countries`) - .reply(200, new Response(countries.map((v) => new Item(v)))); - - // if filter parameter is object - await UtilityService.listCountries(context, { page: 2, items: 10 }); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=2;items=10'); - - // if filter parameter is string - await UtilityService.listCountries(context, 'page=3;items=20'); - - expect(Service.getLastHttpRequestInfo().config.params.filter).toBe('page=3;items=20'); - }); - }); -}); diff --git a/test/specs/services/UtilityService.spec.ts b/test/specs/services/UtilityService.spec.ts new file mode 100644 index 0000000..44f94ad --- /dev/null +++ b/test/specs/services/UtilityService.spec.ts @@ -0,0 +1,110 @@ +import { AxiosResponse } from 'axios'; +import { describe, it, expect, vi, afterEach } from 'vitest'; + +// constants +import Constants from '@/constants'; + +// entities +import Token from '@/entities/Token'; + +// services +import Service from '@/services/Service'; +import UtilityService from '@/services/UtilityService'; + +// types +import { NlicResponse } from '@/types/api/response'; + +// vo +import Context from '@/vo/Context'; + +// test utils +import { createMockItem, createMockResponse } from '@test-utils/nlic'; + +// mocking +vi.mock('@/services/Service'); + +vi.mock('@/services/Service'); + +describe('UtilityService', () => { + const context = new Context({ username: 'demo', password: '123' }); + const config = {}; + + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe('listLicenseTypes', () => { + it('should fetch license types', async () => { + const type = Constants.Utility.LICENSE_TYPE; + const items = [ + createMockItem(type, { name: 'FLOATING' }), + createMockItem(type, { name: 'NODE_LOCKED' }), + createMockItem('OtherType', { name: 'Ignored' }), + ]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await UtilityService.listLicenseTypes(context, config); + + const endpoint = `${Constants.Utility.ENDPOINT_PATH}/${Constants.Utility.ENDPOINT_PATH_LICENSE_TYPES}`; + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, undefined, config); + + expect(result).toEqual(['FLOATING', 'NODE_LOCKED']); + }); + }); + + describe('listLicensingModels', () => { + it('should fetch licensing models', async () => { + const type = Constants.Utility.LICENSING_MODEL_TYPE; + const items = [ + createMockItem(type, { name: 'Subscription' }), + createMockItem(type, { name: 'NodeLocked' }), + createMockItem('OtherType', { name: 'Ignored' }), + ]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await UtilityService.listLicensingModels(context, config); + + const endpoint = `${Constants.Utility.ENDPOINT_PATH}/${Constants.Utility.ENDPOINT_PATH_LICENSING_MODELS}`; + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, undefined, config); + + expect(result).toEqual(['Subscription', 'NodeLocked']); + }); + }); + + describe('listCountries', () => { + it('should fetch countries', async () => { + const type = Constants.Utility.COUNTRY_TYPE; + const items = [ + createMockItem(type, { code: 'GE', name: 'Georgia', isEu: 'false' }), + createMockItem(type, { code: 'DE', name: 'Germany', isEu: 'true', vatPercent: '20' }), + createMockItem('OtherType', { code: 'XX', name: 'Other' }), + ]; + + vi.mocked(Service).get.mockResolvedValueOnce({ + data: createMockResponse(items), + } as AxiosResponse); + + const result = await UtilityService.listCountries(context, '', config); + + const endpoint = `${Constants.Utility.ENDPOINT_PATH}/${Constants.Utility.ENDPOINT_PATH_COUNTRIES}`; + + // eslint-disable-next-line @typescript-eslint/unbound-method + expect(Service.get).toHaveBeenCalledWith(context, endpoint, {}, config); + + expect(result).toEqual([ + { code: 'GE', name: 'Georgia', isEu: false, vatPercent: 0 }, + { code: 'DE', name: 'Germany', isEu: true, vatPercent: 20 }, + ]); + }); + }); +}); diff --git a/test/specs/utils/filter.spec.ts b/test/specs/utils/filter.spec.ts new file mode 100644 index 0000000..8b9ecf5 --- /dev/null +++ b/test/specs/utils/filter.spec.ts @@ -0,0 +1,42 @@ +import { describe, it, expect } from 'vitest'; +import { encode, decode } from '@/utils/filter'; + +describe('filter encode/decode', () => { + it('should encode object into filter string', () => { + const filter = { + page: 1, + item: 10, + status: 'active', + }; + + const result = encode(filter); + expect(result).toBe('page=1;item=10;status=active'); + }); + + it('should decode filter string into object', () => { + const filterString = 'page=1;item=10;status=active'; + + const result = decode(filterString); + expect(result).toEqual({ + page: '1', + item: '10', + status: 'active', + }); + }); + + it('should handle empty object encode', () => { + expect(encode({})).toBe(''); + }); + + it('should handle empty string decode', () => { + expect(decode('')).toEqual({}); + }); + + it('should ignore malformed pairs in decode', () => { + const result = decode('page=1;malformed;item=2'); + expect(result).toEqual({ + page: '1', + item: '2', + }); + }); +}); diff --git a/test/specs/utils/serialize.spec.ts b/test/specs/utils/serialize.spec.ts new file mode 100644 index 0000000..251be66 --- /dev/null +++ b/test/specs/utils/serialize.spec.ts @@ -0,0 +1,109 @@ +import { describe, it, expect } from 'vitest'; +import serialize from '@/utils/serialize'; + +describe('serialize', () => { + it('should convert string properties correctly', () => { + const obj = { name: 'Test', value: 'Hello' }; + const result = serialize(obj); + expect(result).toEqual({ + name: 'Test', + value: 'Hello', + }); + }); + + it('should convert Date properties correctly', () => { + const obj = { date: new Date('2024-01-03T12:00:00.0Z') }; + const result = serialize(obj); + expect(result).toEqual({ date: '2024-01-03T12:00:00.000Z' }); + }); + + it('should convert number properties to string', () => { + const obj = { number: 123, float: 45.67 }; + const result = serialize(obj); + expect(result).toEqual({ + number: '123', + float: '45.67', + }); + }); + + it('should handle undefined properties', () => { + const obj = { name: 'Test', value: undefined }; + const result = serialize(obj); + expect(result).toEqual({ + name: 'Test', + value: '', // undefined should become an empty string + }); + }); + + it('should convert boolean properties to string', () => { + const obj = { active: true, isChecked: false }; + const result = serialize(obj); + expect(result).toEqual({ + active: 'true', + isChecked: 'false', + }); + }); + + it('should serialize object properties correctly', () => { + const obj = { nested: { key: 'value' } }; + const result = serialize(obj); + expect(result).toEqual({ + nested: '{"key":"value"}', // object should be serialized to JSON string + }); + }); + + it('should handle null properties', () => { + const obj = { nullValue: null }; + const result = serialize(obj); + expect(result).toEqual({ + nullValue: 'null', // null should be converted to the string 'null' + }); + }); + + it('should handle array properties correctly', () => { + const obj = { numbers: [1, 2, 3], strings: ['a', 'b'] }; + const result = serialize(obj); + expect(result).toEqual({ + numbers: '[1,2,3]', // array should be serialized to JSON string + strings: '["a","b"]', // array should be serialized to JSON string + }); + }); + + it('should handle mixed types correctly', () => { + const obj = { + name: 'Test', + age: 30, + isActive: true, + details: { nested: 'value' }, + numbers: [1, 2], + }; + const result = serialize(obj); + expect(result).toEqual({ + name: 'Test', + age: '30', + isActive: 'true', + details: '{"nested":"value"}', + numbers: '[1,2]', + }); + }); + + it('should handle an empty object', () => { + const obj = {}; + const result = serialize(obj); + expect(result).toEqual({}); + }); + + it('should ignore function properties', () => { + const obj = { + name: 'Test', + log: () => 'Hello, world!', + }; + + const result = serialize(obj); + + // Ensure the function is ignored and doesn't appear in the map + expect(result).toEqual({ + name: 'Test', + }); + }); +}); diff --git a/test/utils/createMockAxiosInstance.ts b/test/utils/createMockAxiosInstance.ts new file mode 100644 index 0000000..2172646 --- /dev/null +++ b/test/utils/createMockAxiosInstance.ts @@ -0,0 +1,35 @@ +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { vi } from 'vitest'; + +export const createMockAxiosInstance = (response?: Partial): AxiosInstance => { + const defaultResponse = { + data: {}, + status: 200, + statusText: 'OK', + headers: {}, + config: {}, + ...response, + } as AxiosResponse; + + const handler = vi.fn().mockResolvedValue(defaultResponse); + + const instance = Object.assign(handler, { + request: vi.fn().mockResolvedValue(defaultResponse), + get: vi.fn().mockResolvedValue(defaultResponse), + delete: vi.fn().mockResolvedValue(defaultResponse), + head: vi.fn().mockResolvedValue(defaultResponse), + options: vi.fn().mockResolvedValue(defaultResponse), + post: vi.fn().mockResolvedValue(defaultResponse), + put: vi.fn().mockResolvedValue(defaultResponse), + patch: vi.fn().mockResolvedValue(defaultResponse), + defaults: {}, + interceptors: { + request: { use: vi.fn(), eject: vi.fn() }, + response: { use: vi.fn(), eject: vi.fn() }, + }, + }); + + return instance as unknown as AxiosInstance; +}; + +export default createMockAxiosInstance; diff --git a/test/utils/expectEntity.ts b/test/utils/expectEntity.ts new file mode 100644 index 0000000..2d67d6f --- /dev/null +++ b/test/utils/expectEntity.ts @@ -0,0 +1,35 @@ +// types +import { Entity } from '@/types/entities/defineEntity'; + +// test utils +import expectEntityProp from './expectEntityProp'; + +/** + * Asserts that multiple properties of the given entity match expected values. + * + * Delegates each property check to `expectEntityProp`, comparing: + * - Direct property value + * - Named getter method value + * - Generic `get` method value + * - Generic `getProperty` method value + * + * Useful for verifying entity state in a concise and readable way. + * + * @template T - The shape of the entity. + * @template E - A partial object containing expected values for the entity. + * @param {Entity} entity - The entity instance to check. + * @param {Partial} expected - An object of expected values to compare against the entity. + * + * @example + * expectEntity(product, { + * name: 'P1', + * active: true, + * }); + */ +const expectEntity = (entity: Entity, expected: E) => { + Object.entries(expected).forEach(([key, value]) => { + expectEntityProp(entity, key as keyof T, value); + }); +}; + +export default expectEntity; diff --git a/test/utils/expectEntityProp.ts b/test/utils/expectEntityProp.ts new file mode 100644 index 0000000..aa4dd22 --- /dev/null +++ b/test/utils/expectEntityProp.ts @@ -0,0 +1,40 @@ +import { expect } from 'vitest'; + +import { Entity } from '@/types/entities/defineEntity'; + +/** + * Asserts that the given entity's property matches the expected value. + * + * Performs the check in three ways: + * - Direct property access (e.g. `entity[property]`) + * - Named getter method (e.g. `entity.getXyz()`) + * - Generic `get` method (e.g. `entity.get('xyz')`) + * - Generic `getProperty` method (e.g. `entity.getProperty('xyz')`) + * + * @template T - The entity type. + * @template E - The expected value type. + * @param {T} entity - The entity instance to check. + * @param {keyof T} property - The property name to validate. + * @param {E} expected - The expected value of the property. + * + * @example + * expectEntityProp(product, 'number', 'P1'); + */ +const expectEntityProp = (entity: Entity, property: keyof T, expected: E) => { + const key = property as string; + const getter = `get${key[0].toUpperCase()}${key.slice(1)}` as keyof T; + + // check direct property access + expect(entity[property]).toEqual(expected); + + // is getter ex. entity.getXyz exists, check it, skip for custom fields + if (typeof entity[getter] === 'function') { + expect((entity[getter] as () => unknown)()).toEqual(expected); + } + + // check generic methods + expect(entity.get(property)).toEqual(expected); + expect(entity.getProperty(property)).toEqual(expected); +}; + +export default expectEntityProp; diff --git a/test/utils/nlic.ts b/test/utils/nlic.ts new file mode 100644 index 0000000..7e09ca8 --- /dev/null +++ b/test/utils/nlic.ts @@ -0,0 +1,64 @@ +import { Info, Item, ItemPagination, Items, List, NlicResponse } from '@/types/api/response'; + +const toProperty = (data: Record): { name: string; value: string }[] => + Object.entries(data) + .filter(([, value]) => value) + .map(([name, value]) => ({ name, value }) as { name: string; value: string }); + +export const createMockItem = ( + type: string, + props: Record[]> = {}, +): Item => { + const property: { name: string; value: string }[] = []; + const list: List[] = []; + + for (const [key, value] of Object.entries(props)) { + if (Array.isArray(value)) { + for (const obj of value) { + list.push({ name: key, list: [], property: toProperty(obj) }); + } + } else { + property.push({ name: key, value }); + } + } + + return { + type, + list, + property, + }; +}; + +export const createMockResponse = ( + items: Item[] = [], + info: Info[] = [], + pagination: Partial = {}, +): NlicResponse => { + const defaultPagination: ItemPagination = { + pagenumber: null, + itemsnumber: null, + totalpages: null, + totalitems: null, + hasnext: null, + }; + + const itemsData: Items | null = items.length > 0 ? { item: items, ...defaultPagination, ...pagination } : null; + + return { + signature: null, + infos: { + info: info, + }, + items: itemsData, + ttl: null, + }; +}; + +export const createMockErrorResponse = (infos: Info[]): NlicResponse => { + return { + signature: null, + infos: { info: infos }, + items: null, + ttl: null, + }; +}; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..235358a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "moduleResolution": "Node", + "lib": ["ES2022", "DOM"], + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "resolveJsonModule": true, + "isolatedModules": true, + "forceConsistentCasingInFileNames": true, + "baseUrl": "./", + "paths": { + "@/*": ["src/*"], + "@test-utils/*": [ + "test/utils/*" + ], + } + }, + "include": [ + "src", + "test", + "test/**/*.ts", + "./*.config.ts" + ], + "exclude": [ + "dist", + "node_modules" + ] +} diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 0000000..36bae48 --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entry: ['src/index.ts'], + format: ['cjs', 'esm', 'iife'], + globalName: 'NetLicensing', + dts: true, + minify: true, + splitting: false, + sourcemap: true, + clean: true, + target: 'esnext', + esbuildOptions(options) { + options.legalComments = 'none'; + }, +}); diff --git a/vitest.config.mjs b/vitest.config.mjs new file mode 100644 index 0000000..03e8d75 --- /dev/null +++ b/vitest.config.mjs @@ -0,0 +1,16 @@ +import path from 'path'; +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + resolve: { + alias: { + '@': path.resolve(__dirname, 'src'), + '@test-utils': path.resolve(__dirname, 'test/utils'), + }, + }, + test: { + globals: true, + environment: 'node', + include: ['**/*.spec.ts'], + }, +}); From 898b6d094e1a356a855f904d183b70607ac3a739 Mon Sep 17 00:00:00 2001 From: Viacheslav Rudkovskyi Date: Tue, 29 Apr 2025 16:42:07 +0300 Subject: [PATCH 02/12] restore docs folder --- docs/client-demo.html | 31 ++++ docs/client-demo.js | 418 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 449 insertions(+) create mode 100644 docs/client-demo.html create mode 100644 docs/client-demo.js diff --git a/docs/client-demo.html b/docs/client-demo.html new file mode 100644 index 0000000..b1d99b3 --- /dev/null +++ b/docs/client-demo.html @@ -0,0 +1,31 @@ + + + + + Labs64 NetLicensing JavaScript Client Demo + + + + + + +

Labs64 NetLicensing
JavaScript Client + Demo

+

This demo showcases RESTful API access + to NetLicensing’s core features.

+

+ + +

+ + + + diff --git a/docs/client-demo.js b/docs/client-demo.js new file mode 100644 index 0000000..56e6386 --- /dev/null +++ b/docs/client-demo.js @@ -0,0 +1,418 @@ +const NetLicensingDemo = function () { + var context = new NetLicensing.Context().setUsername('demo').setPassword('demo'); + + var randomNumber = Math.random().toString(36).slice(2); + var productNumber = numberWithPrefix('P', randomNumber); + var productModuleNumber = numberWithPrefix('M', randomNumber); + var licenseTemplateNumber = numberWithPrefix('E', randomNumber); + var licenseeNumber = numberWithPrefix('I', randomNumber); + var licenseNumber = numberWithPrefix('L', randomNumber); + + // region ********* Utilities + + console.log('==> UtilityService'); + + var UtilityServicePromise = Promise.resolve() + .then(function () { + return NetLicensing.UtilityService.listLicenseTypes(context); + }) + .then(function (listLicenseTypes) { + console.log('UtilityService.listLicenseTypes() :', listLicenseTypes); + return NetLicensing.UtilityService.listLicensingModels(context); + }) + .then(function (listLicensingModels) { + console.log('UtilityService.listLicensingModels() :', listLicensingModels); + return NetLicensing.UtilityService.listCountries(context); + }) + .then(function (listCountries) { + console.log('UtilityService.listCountries() :', listCountries); + }); + + // endregion + + // region ********* Product + + var product = new NetLicensing.Product() + .setNumber(productNumber) + .setName(numberWithPrefix('Product-', Math.random().toString(36).slice(2))); + + var ProductServicePromise = UtilityServicePromise.then(function () { + console.log('==> ProductService'); + + return NetLicensing.ProductService.create(context, product) + .then(function (createdProduct) { + console.log('ProductService.create() :', createdProduct); + return NetLicensing.ProductService.get(context, createdProduct.getNumber()); + }) + .then(function (getProduct) { + console.log('ProductService.get() :', getProduct); + var listProducts = NetLicensing.ProductService.list(context); + return getProduct; + }) + .then(function (listProducts) { + console.log('ProductService.list() :', listProducts); + product.setProperty('Updated Property', 'Property Value'); + return NetLicensing.ProductService.update(context, product.getNumber(), product); + }) + .then(function (updatedProduct) { + console.log('ProductService.update() :', updatedProduct); + return NetLicensing.ProductService.delete(context, productNumber, true); + }) + .then(function () { + console.log('ProductService.delete()'); + var listProducts = NetLicensing.ProductService.list(context); + }) + .then(function (listProducts) { + console.log('ProductService.list() :', listProducts); + // Recreate Product for later use + return NetLicensing.ProductService.create(context, product); + }) + .then(function (createdProduct) { + console.log('ProductService.create() :', createdProduct); + return createdProduct; + }); + }); + + // endregion + + // region ********* ProductModule + + var productModule = new NetLicensing.ProductModule() + .setNumber(productModuleNumber) + .setName(numberWithPrefix('ProductModule-', Math.random().toString(36).slice(2))) + .setLicensingModel(NetLicensing.Constants.LicensingModel.TryAndBuy.NAME); + + var ProductModuleServicePromise = ProductServicePromise.then(function (createdProduct) { + console.log('==> ProductModuleService'); + return NetLicensing.ProductModuleService.create(context, createdProduct.getNumber(), productModule) + .then(function (createdProductModule) { + console.log('ProductModuleService.create() :', createdProductModule); + return NetLicensing.ProductModuleService.get(context, createdProductModule.getNumber()); + }) + .then(function (getProductModule) { + console.log('ProductModuleService.get() :', getProductModule); + return NetLicensing.ProductModuleService.list(context); + }) + .then(function (listProductModules) { + console.log('ProductModuleService.list() :', listProductModules); + productModule.setProperty('Updated Property', 'Property Value'); + return NetLicensing.ProductModuleService.update(context, productModule.getNumber(), productModule); + }) + .then(function (updatedProductModule) { + console.log('ProductModuleService.update() :', updatedProductModule); + return NetLicensing.ProductModuleService.delete(context, productModuleNumber, true); + }) + .then(function () { + console.log('ProductModuleService.delete() :'); + return NetLicensing.ProductModuleService.list(context); + }) + .then(function (listProductModules) { + console.log('ProductModuleService.list() :', listProductModules); + // Recreate ProductModule for later use + return NetLicensing.ProductModuleService.create(context, productNumber, productModule); + }) + .then(function (createdProductModule) { + console.log('ProductModuleService.create() :', productModule); + return createdProductModule; + }); + }); + + // endregion + + // region ********* LicenseTemplate + + var licenseTemplate = new NetLicensing.LicenseTemplate() + .setNumber(licenseTemplateNumber) + .setName(numberWithPrefix('LicenseTemplate-', Math.random().toString(36).slice(2))) + .setLicenseType(NetLicensing.Constants.LicenseTemplate.LicenseType.FEATURE) + .setPrice('12.5') + .setCurrency('EUR') + .setAutomatic(false) + .setHidden(false); + + var LicenseTemplateServicePromise = ProductModuleServicePromise.then(function (createdProductModule) { + console.log('==> LicenseTemplateService'); + return NetLicensing.LicenseTemplateService.create(context, createdProductModule.getNumber(), licenseTemplate) + .then(function (createdLicenseTemplate) { + console.log('LicenseTemplateService.create() :', createdLicenseTemplate); + return NetLicensing.LicenseTemplateService.get(context, createdLicenseTemplate.getNumber()); + }) + .then(function (getLicenseTemplate) { + console.log('LicenseTemplateService.get() :', getLicenseTemplate); + return NetLicensing.LicenseTemplateService.list(context); + }) + .then(function (listLicenseTemplate) { + console.log('LicenseTemplateService.list() :', listLicenseTemplate); + licenseTemplate.setProperty('Updated Property', 'Updated Value'); + return NetLicensing.LicenseTemplateService.update(context, licenseTemplateNumber, licenseTemplate); + }) + .then(function (updatedLicenseTemplate) { + console.log('LicenseTemplateService.update() :', updatedLicenseTemplate); + return NetLicensing.LicenseTemplateService.delete(context, updatedLicenseTemplate.getNumber(), true); + }) + .then(function () { + console.log('LicenseTemplateService.delete() :'); + return NetLicensing.LicenseTemplateService.list(context); + }) + .then(function (listLicenseTemplate) { + console.log('LicenseTemplateService.list() :', listLicenseTemplate); + // Create LicenseTemplate for later use + return NetLicensing.LicenseTemplateService.create(context, createdProductModule.getNumber(), licenseTemplate); + }) + .then(function (createdLicenseTemplate) { + console.log('LicenseTemplateService.create() :', createdLicenseTemplate); + return createdLicenseTemplate; + }); + }); + + // endregion + + // region ********* Licensee + + var licensee = new NetLicensing.Licensee().setNumber(licenseeNumber).setName(licenseeNumber + 'na'); + + var LicenseeServicePromise = LicenseTemplateServicePromise.then(function (createdLicenseTemplate) { + console.log('==> LicenseeService'); + return NetLicensing.LicenseeService.create(context, productNumber, licensee) + .then(function (createdLicensee) { + console.log('LicenseeService.create() :', createdLicensee); + return NetLicensing.LicenseeService.get(context, createdLicensee.getNumber()); + }) + .then(function (getLicensee) { + console.log('LicenseeService.get() :', getLicensee); + return NetLicensing.LicenseeService.list(context); + }) + .then(function (listLicensee) { + console.log('LicenseeService.list() :', listLicensee); + + licensee.setProperty('Updated Property', 'Updated Value'); + return NetLicensing.LicenseeService.update(context, licenseeNumber, licensee); + }) + .then(function (updatedLicensee) { + console.log('LicenseeService.update() :', updatedLicensee); + return NetLicensing.LicenseeService.delete(context, updatedLicensee.getNumber(), true); + }) + .then(function () { + console.log('LicenseeService.delete() :'); + return NetLicensing.LicenseeService.list(context); + }) + .then(function (listLicensees) { + console.log('LicenseeService.list() :', listLicensees); + // Create Licensee for later use + return NetLicensing.LicenseeService.create(context, productNumber, licensee); + }) + .then(function (createdLicensee) { + console.log('LicenseeService.create() :', createdLicensee); + return createdLicensee; + }); + }); + + // endregion + + // region ********* License + + var license = new NetLicensing.License().setNumber(licenseNumber); + + var LicenseServicePromise = LicenseeServicePromise.then(function (createdLicensee) { + console.log('==> LicenseService'); + return NetLicensing.LicenseService.create(context, licenseeNumber, licenseTemplateNumber, null, license) + .then(function (createdLicense) { + console.log('LicenseService.create() :', createdLicense); + return NetLicensing.LicenseService.get(context, createdLicense.getNumber()); + }) + .then(function (getLicense) { + console.log('LicenseService.get() :', getLicense); + return NetLicensing.LicenseService.list(context); + }) + .then(function (listLicenses) { + console.log('LicenseService.list() :', listLicenses); + license.setProperty('Updated Property', 'Updated Value'); + return NetLicensing.LicenseService.update(context, licenseNumber, null, license); + }) + .then(function (updatedLicense) { + console.log('LicenseService.update() :', updatedLicense); + return NetLicensing.LicenseService.delete(context, updatedLicense.getNumber(), true); + }) + .then(function () { + console.log('LicenseService.delete() :'); + return NetLicensing.LicenseService.list(context); + }) + .then(function (listLicenses) { + console.log('LicenseService.list() :', listLicenses); + // Create License for later use + return NetLicensing.LicenseService.create(context, licenseeNumber, licenseTemplateNumber, null, license); + }) + .then(function (createdLicense) { + console.log('LicenseService.create() :', createdLicense); + return createdLicense; + }); + }); + + // endregion + + // region ********* PaymentMethod + + var PaymentMethodsServicePromise = LicenseServicePromise.then(function () { + console.log('==> PaymentMethodService'); + return NetLicensing.PaymentMethodService.list(context).then(function (paymentMethods) { + console.log('PaymentMethodService.list() :', paymentMethods); + return paymentMethods; + }); + }); + + // endregion + + // region ********* Token + var token = new NetLicensing.Token().setTokenType('APIKEY'); + + var TokenServicePromise = PaymentMethodsServicePromise.then(function () { + console.log('==> TokenService'); + + return NetLicensing.TokenService.create(context, token) + .then(function (createdToken) { + console.log('TokenService.create(APIKEY) :', createdToken); + context.setApiKey(createdToken.getNumber()); + context.setSecurityMode(NetLicensing.Constants.APIKEY_IDENTIFICATION); + + token.setTokenType('SHOP'); + token.setLicenseeNumber(licenseeNumber); + + return NetLicensing.TokenService.create(context, token); + }) + .then(function (shopToken) { + console.log('TokenService.create(SHOP) :', shopToken); + context.setSecurityMode(NetLicensing.Constants.BASIC_AUTHENTICATION); + return [shopToken, NetLicensing.TokenService.list(context, 'tokenType=SHOP')]; + }) + .then(function (shopTokenArray) { + console.log('TokenService.list(SHOP) :', shopTokenArray[1]); + console.log('TokenService.delete() :'); + return NetLicensing.TokenService.delete(context, shopTokenArray[0].getNumber()); + }) + .then(function (shopTokenDelete) { + return NetLicensing.TokenService.list(context, 'tokenType=SHOP'); + }) + .then(function (shopTokenList) { + console.log('TokenService.list(SHOP) :', shopTokenList); + return shopTokenList; + }); + }); + + // endregion + + // region ********* Validate + + var validationParameters = new NetLicensing.ValidationParameters() + .setProductNumber(productNumber) + .setLicenseeName(numberWithPrefix('Licensee-', Math.random().toString(36).slice(2))) + .setProductModuleValidationParameters(productModuleNumber, { + key: 'paramKey', + value: 'paramValue', + }); + + var ValidationPromise = TokenServicePromise.then(function () { + console.log('==> Validation'); + + return NetLicensing.LicenseeService.validate(context, licenseeNumber, validationParameters) + .then(function (validationResult) { + console.log('LicenseeService.validate(APIKEY_IDENTIFICATION) :', validationResult.getValidators()); + context.setSecurityMode(NetLicensing.Constants.APIKEY_IDENTIFICATION); + return NetLicensing.LicenseeService.validate(context, licenseeNumber, validationParameters); + }) + .then(function (validationResult) { + context.setSecurityMode(NetLicensing.Constants.BASIC_AUTHENTICATION); + console.log('LicenseeService.validate(BASIC_AUTHENTICATION) :', validationResult.getValidators()); + return validationResult; + }); + }); + + // endregion + + // region ********* Transfer + + var TransferPromise = ValidationPromise.then(function () { + console.log('==> Transfer'); + var transferLicensee = new NetLicensing.Licensee().setNumber('TR' + licenseeNumber).setMarkedForTransfer(true); + + return NetLicensing.LicenseeService.create(context, productNumber, transferLicensee) + .then(function (transferLicensee) { + console.log('LicenseeService.create(transfer-from) :', transferLicensee); + var transferLicense = new NetLicensing.License().setNumber('TR' + licenseNumber); + + return NetLicensing.LicenseService.create( + context, + transferLicensee.getNumber(), + licenseTemplateNumber, + null, + transferLicense, + ); + }) + .then(function (newTransferLicense) { + console.log('LicenseeService.create(transfer-to) :', newTransferLicense); + return NetLicensing.LicenseeService.transfer(context, licensee.getNumber(), transferLicensee.getNumber()); + }) + .then(function () { + return NetLicensing.LicenseService.list(context, 'licenseeNumber=' + licensee.getNumber()); + }) + .then(function (licenseList) { + console.log('LicenseeService.list(transfer) :', licenseList); + return licenseList; + }); + }); + + var TransferWithApiKeyPromise = TransferPromise.then(function () { + var transferLicenseeWithApiKey = new NetLicensing.Licensee() + .setNumber('AP' + licenseeNumber) + .setMarkedForTransfer(true); + + return NetLicensing.LicenseeService.create(context, productNumber, transferLicenseeWithApiKey) + .then(function (transferLicenseeWithApiKey) { + console.log('LicenseeService.create(transfer-from) :', transferLicenseeWithApiKey); + var transferLicenseWithApiKey = new NetLicensing.License().setNumber('AP' + licenseNumber); + + return NetLicensing.LicenseService.create( + context, + transferLicenseeWithApiKey.getNumber(), + licenseTemplateNumber, + null, + transferLicenseWithApiKey, + ); + }) + .then(function (newTransferLicense) { + console.log('LicenseeService.create(transfer-to) :', newTransferLicense); + context.setSecurityMode(NetLicensing.Constants.APIKEY_IDENTIFICATION); + return NetLicensing.LicenseeService.transfer( + context, + licensee.getNumber(), + transferLicenseeWithApiKey.getNumber(), + ); + }) + .then(function (newTransferLicense) { + context.setSecurityMode(NetLicensing.Constants.BASIC_AUTHENTICATION); + return NetLicensing.LicenseService.list(context, 'licenseeNumber=' + licensee.getNumber()); + }) + .then(function (licenseList) { + console.log('LicenseeService.list(transfer) :', licenseList); + return licenseList; + }); + }); + + // endregion + + // region ********* CleanUp + + var cleanUp = TransferWithApiKeyPromise.then(function () { + console.log('All done.'); + return NetLicensing.ProductService.delete(context, productNumber, true); + }); + // endregion +}; + + +function numberWithPrefix(prefix, number) { + return prefix.concat(number).concat("-DEMO"); +} + +function clearBox(elementID) { + document.getElementById(elementID).innerHTML = ""; +} From f33cf095f1d63820d927bc7311a3d141ebb2fa37 Mon Sep 17 00:00:00 2001 From: Viacheslav Rudkovskyi Date: Tue, 29 Apr 2025 18:45:21 +0300 Subject: [PATCH 03/12] update docs small improvements --- docs/client-demo.html | 2 +- docs/client-demo.js | 606 +++++++++++++------------------- src/constants/index.ts | 2 +- src/errors/NlicError.ts | 5 + src/services/Service/request.ts | 29 +- tsup.config.ts | 1 + 6 files changed, 274 insertions(+), 371 deletions(-) diff --git a/docs/client-demo.html b/docs/client-demo.html index b1d99b3..c0c5a58 100644 --- a/docs/client-demo.html +++ b/docs/client-demo.html @@ -3,7 +3,7 @@ Labs64 NetLicensing JavaScript Client Demo - +