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/index.d.mts b/dist/index.d.mts new file mode 100644 index 0000000..b6de828 --- /dev/null +++ b/dist/index.d.mts @@ -0,0 +1,1804 @@ +import { AxiosResponse, AxiosInstance, Method, AxiosError, InternalAxiosRequestConfig } from 'axios'; + +declare const _default$g: { + LicenseeSecretMode: Readonly<{ + DISABLED: "DISABLED"; + PREDEFINED: "PREDEFINED"; + CLIENT: "CLIENT"; + }>; + LicenseType: Readonly<{ + FEATURE: "FEATURE"; + TIMEVOLUME: "TIMEVOLUME"; + FLOATING: "FLOATING"; + QUANTITY: "QUANTITY"; + }>; + NotificationEvent: Readonly<{ + LICENSEE_CREATED: "LICENSEE_CREATED"; + LICENSE_CREATED: "LICENSE_CREATED"; + WARNING_LEVEL_CHANGED: "WARNING_LEVEL_CHANGED"; + PAYMENT_TRANSACTION_PROCESSED: "PAYMENT_TRANSACTION_PROCESSED"; + }>; + NotificationProtocol: Readonly<{ + WEBHOOK: "WEBHOOK"; + }>; + SecurityMode: Readonly<{ + BASIC_AUTHENTICATION: "BASIC_AUTH"; + APIKEY_IDENTIFICATION: "APIKEY"; + ANONYMOUS_IDENTIFICATION: "ANONYMOUS"; + }>; + TimeVolumePeriod: Readonly<{ + DAY: "DAY"; + WEEK: "WEEK"; + MONTH: "MONTH"; + YEAR: "YEAR"; + }>; + TokenType: Readonly<{ + DEFAULT: "DEFAULT"; + SHOP: "SHOP"; + APIKEY: "APIKEY"; + ACTION: "ACTION"; + }>; + TransactionSource: Readonly<{ + 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"; + }>; + TransactionStatus: Readonly<{ + PENDING: "PENDING"; + CLOSED: "CLOSED"; + CANCELLED: "CANCELLED"; + }>; + BASIC_AUTHENTICATION: string; + APIKEY_IDENTIFICATION: string; + ANONYMOUS_IDENTIFICATION: string; + FILTER: string; + Product: { + TYPE: string; + ENDPOINT_PATH: string; + }; + ProductModule: { + TYPE: string; + ENDPOINT_PATH: string; + PRODUCT_MODULE_NUMBER: string; + }; + Licensee: { + TYPE: string; + ENDPOINT_PATH: string; + ENDPOINT_PATH_VALIDATE: string; + ENDPOINT_PATH_TRANSFER: string; + LICENSEE_NUMBER: string; + }; + LicenseTemplate: { + TYPE: string; + ENDPOINT_PATH: string; + LicenseType: Readonly<{ + FEATURE: "FEATURE"; + TIMEVOLUME: "TIMEVOLUME"; + FLOATING: "FLOATING"; + QUANTITY: "QUANTITY"; + }>; + }; + License: { + TYPE: string; + ENDPOINT_PATH: string; + }; + Validation: { + TYPE: string; + }; + Token: { + TYPE: string; + ENDPOINT_PATH: string; + Type: Readonly<{ + DEFAULT: "DEFAULT"; + SHOP: "SHOP"; + APIKEY: "APIKEY"; + ACTION: "ACTION"; + }>; + }; + PaymentMethod: { + TYPE: string; + ENDPOINT_PATH: string; + }; + Bundle: { + TYPE: string; + ENDPOINT_PATH: string; + ENDPOINT_OBTAIN_PATH: string; + }; + Notification: { + TYPE: string; + ENDPOINT_PATH: string; + Protocol: Readonly<{ + WEBHOOK: "WEBHOOK"; + }>; + Event: Readonly<{ + LICENSEE_CREATED: "LICENSEE_CREATED"; + LICENSE_CREATED: "LICENSE_CREATED"; + WARNING_LEVEL_CHANGED: "WARNING_LEVEL_CHANGED"; + PAYMENT_TRANSACTION_PROCESSED: "PAYMENT_TRANSACTION_PROCESSED"; + }>; + }; + Transaction: { + TYPE: string; + ENDPOINT_PATH: string; + Status: Readonly<{ + PENDING: "PENDING"; + CLOSED: "CLOSED"; + CANCELLED: "CANCELLED"; + }>; + }; + Utility: { + ENDPOINT_PATH: string; + ENDPOINT_PATH_LICENSE_TYPES: string; + ENDPOINT_PATH_LICENSING_MODELS: string; + ENDPOINT_PATH_COUNTRIES: string; + LICENSING_MODEL_TYPE: string; + LICENSE_TYPE: string; + COUNTRY_TYPE: string; + }; +}; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const ApiKeyRole: Readonly<{ + 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"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const LicenseeSecretMode: Readonly<{ + DISABLED: "DISABLED"; + PREDEFINED: "PREDEFINED"; + CLIENT: "CLIENT"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const LicenseType: Readonly<{ + FEATURE: "FEATURE"; + TIMEVOLUME: "TIMEVOLUME"; + FLOATING: "FLOATING"; + QUANTITY: "QUANTITY"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const LicensingModel: Readonly<{ + 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"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const NodeSecretMode: Readonly<{ + PREDEFINED: "PREDEFINED"; + CLIENT: "CLIENT"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const NotificationEvent: Readonly<{ + LICENSEE_CREATED: "LICENSEE_CREATED"; + LICENSE_CREATED: "LICENSE_CREATED"; + WARNING_LEVEL_CHANGED: "WARNING_LEVEL_CHANGED"; + PAYMENT_TRANSACTION_PROCESSED: "PAYMENT_TRANSACTION_PROCESSED"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const NotificationProtocol: Readonly<{ + WEBHOOK: "WEBHOOK"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const PaymentMethodEnum: Readonly<{ + NULL: "NULL"; + PAYPAL: "PAYPAL"; + PAYPAL_SANDBOX: "PAYPAL_SANDBOX"; + STRIPE: "STRIPE"; + STRIPE_TESTING: "STRIPE_TESTING"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const SecurityMode: Readonly<{ + BASIC_AUTHENTICATION: "BASIC_AUTH"; + APIKEY_IDENTIFICATION: "APIKEY"; + ANONYMOUS_IDENTIFICATION: "ANONYMOUS"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const TimeVolumePeriod: Readonly<{ + DAY: "DAY"; + WEEK: "WEEK"; + MONTH: "MONTH"; + YEAR: "YEAR"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const TokenType: Readonly<{ + DEFAULT: "DEFAULT"; + SHOP: "SHOP"; + APIKEY: "APIKEY"; + ACTION: "ACTION"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const TransactionSource: Readonly<{ + 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"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const TransactionStatus: Readonly<{ + PENDING: "PENDING"; + CLOSED: "CLOSED"; + CANCELLED: "CANCELLED"; +}>; + +interface Info { + id: string; + type: 'ERROR' | 'WARNING' | 'INFO'; + value: string; +} +interface List { + property: { + value: string; + name: string; + }[]; + list: List[]; + name: string; +} +interface Item { + property: { + value: string; + name: string; + }[]; + list: List[]; + type: string; +} +interface ItemPagination { + pagenumber: string | null; + itemsnumber: string | null; + totalpages: string | null; + totalitems: string | null; + hasnext: string | null; +} +type Items = { + item: Item[]; +} & ItemPagination; +interface NlicResponse { + signature: null | string; + infos: { + info: Info[]; + }; + items: Items | null; + ttl: string | null; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type ApiKeyRoleKeys = keyof typeof ApiKeyRole; +type ApiKeyRoleValues = (typeof ApiKeyRole)[ApiKeyRoleKeys]; + +type LicenseeSecretModeKeys = keyof typeof LicenseeSecretMode; +type LicenseeSecretModeValues = (typeof LicenseeSecretMode)[LicenseeSecretModeKeys]; + +type NodeSecretModeKeys = keyof typeof NodeSecretMode; +type NodeSecretModeValues = (typeof NodeSecretMode)[NodeSecretModeKeys]; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type LicenseTypeKeys = keyof typeof LicenseType; +type LicenseTypeValues = (typeof LicenseType)[LicenseTypeKeys]; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type LicensingModelKeys = keyof typeof LicensingModel; +type LicensingModelValues = (typeof LicensingModel)[LicensingModelKeys]; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type NotificationEventKeys = keyof typeof NotificationEvent; +type NotificationEventValues = (typeof NotificationEvent)[NotificationEventKeys]; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type NotificationProtocolKeys = keyof typeof NotificationProtocol; +type NotificationProtocolValues = (typeof NotificationProtocol)[NotificationProtocolKeys]; + +type PaymentMethodKeys = keyof typeof PaymentMethodEnum; +type PaymentMethodValues = (typeof PaymentMethodEnum)[PaymentMethodKeys]; + +type SecurityModeKeys = keyof typeof SecurityMode; +type SecurityModeValues = (typeof SecurityMode)[SecurityModeKeys]; + +type TimeVolumePeriodKeys = keyof typeof TimeVolumePeriod; +type TimeVolumePeriodValues = (typeof TimeVolumePeriod)[TimeVolumePeriodKeys]; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type TokenTypeKeys = keyof typeof TokenType; +type TokenTypeValues = (typeof TokenType)[TokenTypeKeys]; + +type TransactionSourceKeys = keyof typeof TransactionSource; +type TransactionSourceValues = (typeof TransactionSource)[TransactionSourceKeys]; + +type TransactionStatusKeys = keyof typeof TransactionStatus; +type TransactionStatusValues = (typeof TransactionStatus)[TransactionStatusKeys]; + +type RequiredProps = Required>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +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; +} +interface Proto { + prototype: object; +} +type PropGetEventListener = (obj: T, prop: string | symbol, receiver: unknown) => void; +type PropSetEventListener = (obj: T, prop: string | symbol, value: unknown, receiver: unknown) => void; +type Entity = T & M & EntityMethods; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +interface CountryProps { + readonly code: string; + readonly name: string; + readonly vatPercent?: number; + readonly isEu: boolean; +} +interface CountryMethods { + getCode(): string; + getName(): string; + getVatPercent(): number; + getIsEu(): boolean; +} +type CountryEntity = Entity; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type LicenseProps = { + active?: boolean; + number?: string; + name?: string; + price?: number; + currency?: string; + hidden?: boolean; + licenseeNumber?: string; + licenseTemplateNumber?: string; + timeVolume?: number; + timeVolumePeriod?: TimeVolumePeriodValues; + startDate?: Date | 'now'; + parentfeature?: string; + readonly inUse?: boolean; +} & T; +type SavedLicenseProps = RequiredProps & LicenseProps; +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; + setTimeVolume(timeVolume: number): void; + getTimeVolume(def?: D): number | D; + setTimeVolumePeriod(timeVolumePeriod: TimeVolumePeriodValues): void; + getTimeVolumePeriod(def?: D): TimeVolumePeriodValues | D; + setStartDate(startDate: Date | 'now'): void; + getStartDate(def?: D): Date | 'now' | D; + setParentfeature(parentfeature?: string): void; + getParentfeature(def?: D): string | D; + serialize(): Record; +} +type LicenseEntity = Entity, LicenseMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface WarningLevelSummary { + RED: string[]; + YELLOW: string[]; + GREEN: string[]; +} +type LicenseeProps = { + active?: boolean; + number?: string; + name?: string; + markedForTransfer?: boolean; + productNumber?: string; + aliases?: string[]; + readonly inUse?: boolean; + readonly warningLevelSummary?: WarningLevelSummary; +} & T; +type SavedLicenseeProps = RequiredProps & LicenseeProps; +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; +} +type LicenseeEntity = Entity, LicenseeMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type LicenseTemplateProps = { + active?: boolean; + number?: string; + name?: string; + licenseType?: LicenseTypeValues; + price?: number; + currency?: string; + automatic?: boolean; + hidden?: boolean; + hideLicenses?: boolean; + gracePeriod?: boolean; + timeVolume?: number; + timeVolumePeriod?: TimeVolumePeriodValues; + maxSessions?: number; + quantity?: number; + productModuleNumber?: string; + readonly inUse?: boolean; +} & T; +type SavedLicenseTemplateProps = RequiredProps & LicenseTemplateProps; +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: LicenseTypeValues): void; + getLicenseType(def?: D): LicenseTypeValues | 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: TimeVolumePeriodValues): void; + getTimeVolumePeriod(def?: D): TimeVolumePeriodValues | 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; +} +type LicenseTemplateEntity = Entity, LicenseTemplateMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type TransactionProps = { + active?: boolean; + number?: string; + status?: TransactionStatusValues; + source?: TransactionSourceValues; + grandTotal?: number; + discount?: number; + currency?: string; + dateCreated?: Date; + dateClosed?: Date; + paymentMethod?: PaymentMethodValues; + licenseTransactionJoins?: LicenseTransactionJoinEntity[]; + readonly inUse?: boolean; +} & T; +type SavedTransactionProps = RequiredProps & TransactionProps; +interface TransactionMethods { + setActive(active: boolean): void; + getActive(def?: D): boolean | D; + setNumber(number: string): void; + getNumber(def?: D): string | D; + setStatus(status: TransactionStatusValues): void; + getStatus(def?: D): TransactionStatusValues | D; + setSource(source: TransactionSourceValues): void; + getSource(def?: D): TransactionSourceValues | 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: PaymentMethodValues): void; + getPaymentMethod(def?: D): PaymentMethodValues | D; + setLicenseTransactionJoins(joins: LicenseTransactionJoinEntity[]): void; + getLicenseTransactionJoins(def?: D): LicenseTransactionJoinEntity[] | D; + serialize(): Record; +} +type TransactionEntity = Entity, TransactionMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface LicenseTransactionJoinProps { + transaction: TransactionEntity; + license: LicenseEntity; +} +interface LicenseTransactionJoinMethods { + setTransaction(t: TransactionEntity): void; + getTransaction(): TransactionEntity; + setLicense(l: LicenseEntity): void; + getLicense(): LicenseEntity; +} +type LicenseTransactionJoinEntity = LicenseTransactionJoinProps & LicenseTransactionJoinMethods; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type NotificationProps = { + active?: boolean; + number?: string; + name?: string; + protocol?: NotificationProtocolValues; + events?: NotificationEventValues[]; + payload?: string; + endpoint?: string; +} & T; +type SavedNotificationProps = RequiredProps & NotificationProps; +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: NotificationProtocolValues): void; + getProtocol(def?: D): NotificationProtocolValues | D; + setEvents(events: NotificationEventValues[]): void; + getEvents(def?: D): NotificationEventValues[] | D; + addEvent(event: NotificationEventValues): void; + setPayload(payload: string): void; + getPayload(def?: D): string | D; + setEndpoint(endpoint: string): void; + getEndpoint(def?: D): string | D; + serialize(): Record; +} +type NotificationEntity = Entity, NotificationMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type PaymentMethodProps = T & { + active?: boolean; + number?: string; +}; +type SavedPaymentMethodProps = RequiredProps & PaymentMethodProps; +interface PaymentMethodMethods { + setActive(active: boolean): void; + getActive(def?: D): boolean | D; + setNumber(number: string): void; + getNumber(def?: D): string | D; +} +type PaymentMethodEntity = Entity, PaymentMethodMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ProductDiscountProps { + totalPrice?: number; + currency?: string; + amountFix?: number; + amountPercent?: number; +} +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; +} +type ProductDiscountEntity = Entity; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type ProductProps = { + active?: boolean; + number?: string; + name?: string; + version?: string | number; + description?: string; + licensingInfo?: string; + licenseeAutoCreate?: boolean; + discounts?: ProductDiscountEntity[]; + readonly inUse?: boolean; +} & T; +type SavedProductProps = RequiredProps & ProductProps; +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: ProductDiscountEntity[]): void; + getDiscounts(def?: D): ProductDiscountEntity[] | D; + addDiscount(discount: ProductDiscountEntity): void; + removeDiscount(discount: ProductDiscountEntity): void; + setProductDiscounts(productDiscounts: ProductDiscountEntity[]): void; + getProductDiscounts(def?: D): ProductDiscountEntity[] | D; + serialize(): Record; +} +type ProductEntity = Entity, ProductMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type ProductModuleProps = { + active?: boolean; + number?: string; + name?: string; + licensingModel?: LicensingModelValues; + maxCheckoutValidity?: number; + yellowThreshold?: number; + redThreshold?: number; + productNumber?: string; + nodeSecretMode?: NodeSecretModeValues; + readonly inUse?: boolean; +} & T; +type SavedProductModuleProps = RequiredProps & ProductModuleProps; +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: LicensingModelValues): void; + getLicensingModel(def?: D): LicensingModelValues | 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; +} +type ProductModuleEntity = Entity, ProductModuleMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type TokenProps = { + active?: boolean; + number?: string; + expirationTime?: Date; + tokenType?: TokenTypeValues; + licenseeNumber?: string; + action?: string; + apiKeyRole?: ApiKeyRoleValues; + bundleNumber?: string; + bundlePrice?: number; + productNumber?: string; + predefinedShoppingItem?: string; + successURL?: string; + successURLTitle?: string; + cancelURL?: string; + cancelURLTitle?: string; + readonly shopURL?: string; +} & T; +type SavedTokenProps = RequiredProps & TokenProps; +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: TokenTypeValues): void; + getTokenType(def?: D): TokenTypeValues | D; + setLicenseeNumber(licenseeNumber: string): void; + getLicenseeNumber(def?: D): string | D; + setAction(action: string): void; + getAction(def?: D): string | D; + setApiKeyRole(apiKeyRole: ApiKeyRoleValues): void; + getApiKeyRole(def?: D): ApiKeyRoleValues | 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; +} +type TokenEntity = Entity, TokenMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ContextConfig { + baseUrl?: string; + securityMode?: SecurityModeValues; + username?: string; + password?: string; + apiKey?: string; + publicKey?: string; +} +interface ContextInstance extends ContextConfig { + baseUrl: string; + securityMode: SecurityModeValues; + setBaseUrl(baseUrl: string): this; + getBaseUrl(): string; + setSecurityMode(securityMode: SecurityModeValues): this; + getSecurityMode(): SecurityModeValues; + 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; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface RequestConfig { + onInfo?: (info: Info[]) => void; + onResponse?: (response: AxiosResponse) => void; + axiosInstance?: AxiosInstance; +} +interface IService { + setAxiosInstance(this: void, instance: AxiosInstance): void; + getAxiosInstance(this: void): AxiosInstance; + getLastHttpRequestInfo(this: void): AxiosResponse | null; + getInfo(this: void): Info[]; + /** + * this: void + * @param context + * @param endpoint + * @param data + * @param config + */ + get(this: void, context: ContextInstance, endpoint: string, data?: Record, config?: RequestConfig): Promise>; + post(this: void, context: ContextInstance, endpoint: string, data?: Record, config?: RequestConfig): Promise>; + delete(this: void, context: ContextInstance, endpoint: string, data?: Record, config?: RequestConfig): Promise>; + request(this: void, context: ContextInstance, method: Method, endpoint: string, data?: Record, config?: RequestConfig): Promise>; + toQueryString>(data: T): string; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +interface Pagination { + pageNumber: number; + itemsNumber: number; + totalPages: number; + totalItems: number; + hasNext: boolean; +} +interface PaginationMethods { + getContent(): T; + getPagination(): Pagination; + getPageNumber(): number; + getItemsNumber(): number; + getTotalPages(): number; + getTotalItems(): number; + hasNext(): boolean; +} +type PageInstance = PaginationMethods & T; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface IBundleService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, bundle: BundleEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, bundle: BundleEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; + obtain(context: ContextInstance, number: string, licenseeNumber: string, config?: RequestConfig): Promise>[]>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +type Parameter = Record; +type Parameters = Record; +interface LicenseeProperties { + licenseeName?: string; + licenseeSecret?: string; + [key: string]: string | undefined; +} +interface ValidationParametersInstance { + 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; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +interface ProductModuleValidation { + productModuleNumber: string; + [key: string]: string; +} +interface ValidationResultsInstance { + 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; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ILicenseeService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, productNumber: string, licensee: LicenseeEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, licensee: LicenseeEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; + validate(context: ContextInstance, number: string, parameters?: ValidationParametersInstance, config?: RequestConfig): Promise; + transfer(context: ContextInstance, number: string, sourceLicenseeNumber: string, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ILicenseService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, licenseeNumber: string | null, licenseTemplateNumber: string | null, transactionNumber: string | null, license: LicenseEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, transactionNumber: string | null, license: LicenseEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ILicenseTemplateService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, productModuleNumber: string | null, licenseTemplate: LicenseTemplateEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, licenseTemplate: LicenseTemplateEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface INotificationService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, notification: NotificationEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, notification: NotificationEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface IPaymentMethodService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + update(context: ContextInstance, number: string, paymentMethod: PaymentMethodEntity, config?: RequestConfig): Promise>>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface IProductModuleService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, productNumber: string | null, productModule: ProductModuleEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, productModule: ProductModuleEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface IProductService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, product: ProductEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, product: ProductEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ITokenService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, token: TokenEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ITransactionService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, transaction: TransactionEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, transaction: TransactionEntity, config?: RequestConfig): Promise>>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface IUtilityService { + listLicenseTypes(context: ContextInstance, config?: RequestConfig): Promise>; + listLicensingModels(context: ContextInstance, config?: RequestConfig): Promise>; + listCountries(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type BundleProps = T & { + active?: boolean; + number?: string; + name?: string; + price?: number; + currency?: string; + licenseTemplateNumbers?: string[]; +}; +type SavedBundleProps = RequiredProps & BundleProps; +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; +} +type BundleEntity = Entity, BundleMethods>; + +declare const _default$f: (item?: Item) => BundleEntity; + +declare const _default$e: (item?: Item) => CountryEntity; + +declare const _default$d: (item?: Item) => LicenseEntity; + +declare const _default$c: (item?: Item) => LicenseeEntity; + +declare const _default$b: (item?: Item) => LicenseTemplateEntity; + +declare const _default$a: (item?: Item) => NotificationEntity; + +declare const itemToObject: >(item?: Item | List) => T; + +declare const _default$9: (item?: Item) => PaymentMethodEntity; + +declare const _default$8: (item?: Item) => ProductEntity; + +declare const _default$7: (item?: Item) => ProductModuleEntity; + +declare const _default$6: (item?: Item) => TokenEntity; + +declare const _default$5: (item?: Item) => TransactionEntity; + +/** + * @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 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. + */ +declare const Bundle: (properties?: BundleProps) => BundleEntity; + +/** + * @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. + */ +declare const Country: (properties?: CountryProps) => CountryEntity; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +declare const defineEntity:

(props: T, methods: M, proto?: P, options?: { + set?: PropSetEventListener; + get?: PropGetEventListener; +}) => Entity; + +/** + * 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. + */ +declare const License: (properties?: LicenseProps) => LicenseEntity; + +/** + * @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 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 + */ +declare const Licensee: (properties?: LicenseeProps) => LicenseeEntity; + +/** + * 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 + */ +declare const LicenseTemplate: (properties?: LicenseTemplateProps) => LicenseTemplateEntity; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare class LicenseTransactionJoin implements LicenseTransactionJoinEntity { + transaction: TransactionEntity; + license: LicenseEntity; + constructor(transaction: TransactionEntity, license: LicenseEntity); + setTransaction(transaction: TransactionEntity): void; + getTransaction(): TransactionEntity; + setLicense(license: LicenseEntity): void; + getLicense(): LicenseEntity; +} +declare const _default$4: (transaction: TransactionEntity, license: LicenseEntity) => LicenseTransactionJoin; + +/** + * 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. + */ +declare const Notification: (properties?: NotificationProps) => NotificationEntity; + +/** + * PaymentMethod entity used internally by NetLicensing. + * + * @property string number + * @property boolean active + * @property string paypal.subject + */ +declare const PaymentMethod: (properties?: PaymentMethodProps) => PaymentMethodEntity; + +/** + * 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 string 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. + */ +declare const Product: (properties?: ProductProps) => ProductEntity; + +declare const ProductDiscount: (properties?: ProductDiscountProps) => ProductDiscountEntity; + +/** + * 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 + */ +declare const ProductModule: (properties?: ProductModuleProps) => ProductModuleEntity; + +declare const Token: (properties?: TokenProps) => TokenEntity; + +/** + * 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 + */ +declare const Transaction: (properties?: TransactionProps) => TransactionEntity; + +declare class NlicError extends AxiosError { + isNlicError: boolean; + constructor(message?: string, code?: string, config?: InternalAxiosRequestConfig, request?: unknown, response?: AxiosResponse, stack?: string); +} + +declare const bundleService: IBundleService; + +declare const licenseeService: ILicenseeService; + +declare const licenseService: ILicenseService; + +declare const licenseTemplateService: ILicenseTemplateService; + +declare const notificationService: INotificationService; + +declare const paymentMethodService: IPaymentMethodService; + +declare const productModuleService: IProductModuleService; + +declare const productService: IProductService; + +declare const service: IService; + +declare const tokenService: ITokenService; + +declare const transactionService: ITransactionService; + +declare const utilityService: IUtilityService; + +declare const encode: (filter: Record) => string; +declare const decode: (filter: string) => Record; + +/** + * 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. + */ +declare const _default$3: (obj: T, options?: { + ignore?: string[]; +}) => Record; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const isDefined: (value: unknown) => boolean; +declare const isValid: (value: unknown) => boolean; +declare const ensureNotNull: (value: unknown, name: string) => void; +declare const ensureNotEmpty: (value: unknown, name: string) => void; + +declare const _default$2: (props?: ContextConfig) => ContextInstance; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +declare const Page: (content: T, pagination?: Partial) => PageInstance; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +declare const _default$1: () => ValidationParametersInstance; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +declare const _default: () => ValidationResultsInstance; + +export { ApiKeyRole, type ApiKeyRoleKeys, type ApiKeyRoleValues, Bundle, type BundleEntity, type BundleMethods, type BundleProps, bundleService as BundleService, _default$g as Constants, _default$2 as Context, type ContextConfig, type ContextInstance, Country, type CountryEntity, type CountryMethods, type CountryProps, type Entity, type EntityMethods, type IBundleService, type ILicenseService, type ILicenseTemplateService, type ILicenseeService, type INotificationService, type IPaymentMethodService, type IProductModuleService, type IProductService, type IService, type ITokenService, type ITransactionService, type IUtilityService, type Info, type Item, type ItemPagination, type Items, License, type LicenseEntity, type LicenseMethods, type LicenseProps, licenseService as LicenseService, LicenseTemplate, type LicenseTemplateEntity, type LicenseTemplateMethods, type LicenseTemplateProps, licenseTemplateService as LicenseTemplateService, _default$4 as LicenseTransactionJoin, type LicenseTransactionJoinEntity, type LicenseTransactionJoinMethods, type LicenseTransactionJoinProps, LicenseType, type LicenseTypeKeys, type LicenseTypeValues, Licensee, type LicenseeEntity, type LicenseeMethods, type LicenseeProperties, type LicenseeProps, LicenseeSecretMode, type LicenseeSecretModeKeys, type LicenseeSecretModeValues, licenseeService as LicenseeService, LicensingModel, type LicensingModelKeys, type LicensingModelValues, type List, NlicError, type NlicResponse, NodeSecretMode, type NodeSecretModeKeys, type NodeSecretModeValues, Notification, type NotificationEntity, NotificationEvent, type NotificationEventKeys, type NotificationEventValues, type NotificationMethods, type NotificationProps, NotificationProtocol, type NotificationProtocolKeys, type NotificationProtocolValues, notificationService as NotificationService, Page, type PageInstance, type Pagination, type PaginationMethods, type Parameter, type Parameters, PaymentMethod, type PaymentMethodEntity, PaymentMethodEnum, type PaymentMethodKeys, type PaymentMethodMethods, type PaymentMethodProps, paymentMethodService as PaymentMethodService, type PaymentMethodValues, Product, ProductDiscount, type ProductDiscountEntity, type ProductDiscountMethods, type ProductDiscountProps, type ProductEntity, type ProductMethods, ProductModule, type ProductModuleEntity, type ProductModuleMethods, type ProductModuleProps, productModuleService as ProductModuleService, type ProductModuleValidation, type ProductProps, productService as ProductService, type PropGetEventListener, type PropSetEventListener, type Proto, type RequestConfig, type RequiredProps, type SavedBundleProps, type SavedLicenseProps, type SavedLicenseTemplateProps, type SavedLicenseeProps, type SavedNotificationProps, type SavedPaymentMethodProps, type SavedProductModuleProps, type SavedProductProps, type SavedTokenProps, type SavedTransactionProps, SecurityMode, type SecurityModeKeys, type SecurityModeValues, service as Service, TimeVolumePeriod, type TimeVolumePeriodKeys, type TimeVolumePeriodValues, Token, type TokenEntity, type TokenMethods, type TokenProps, tokenService as TokenService, TokenType, type TokenTypeKeys, type TokenTypeValues, Transaction, type TransactionEntity, type TransactionMethods, type TransactionProps, transactionService as TransactionService, TransactionSource, type TransactionSourceKeys, type TransactionSourceValues, TransactionStatus, type TransactionStatusKeys, type TransactionStatusValues, utilityService as UtilityService, _default$1 as ValidationParameters, type ValidationParametersInstance, _default as ValidationResults, type ValidationResultsInstance, type WarningLevelSummary, defineEntity, ensureNotEmpty, ensureNotNull, decode as filterDecode, encode as filterEncode, isDefined, isValid, _default$f as itemToBundle, _default$e as itemToCountry, _default$d as itemToLicense, _default$b as itemToLicenseTemplate, _default$c as itemToLicensee, _default$a as itemToNotification, itemToObject, _default$9 as itemToPaymentMethod, _default$8 as itemToProduct, _default$7 as itemToProductModule, _default$6 as itemToToken, _default$5 as itemToTransaction, _default$3 as serialize }; diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..b6de828 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,1804 @@ +import { AxiosResponse, AxiosInstance, Method, AxiosError, InternalAxiosRequestConfig } from 'axios'; + +declare const _default$g: { + LicenseeSecretMode: Readonly<{ + DISABLED: "DISABLED"; + PREDEFINED: "PREDEFINED"; + CLIENT: "CLIENT"; + }>; + LicenseType: Readonly<{ + FEATURE: "FEATURE"; + TIMEVOLUME: "TIMEVOLUME"; + FLOATING: "FLOATING"; + QUANTITY: "QUANTITY"; + }>; + NotificationEvent: Readonly<{ + LICENSEE_CREATED: "LICENSEE_CREATED"; + LICENSE_CREATED: "LICENSE_CREATED"; + WARNING_LEVEL_CHANGED: "WARNING_LEVEL_CHANGED"; + PAYMENT_TRANSACTION_PROCESSED: "PAYMENT_TRANSACTION_PROCESSED"; + }>; + NotificationProtocol: Readonly<{ + WEBHOOK: "WEBHOOK"; + }>; + SecurityMode: Readonly<{ + BASIC_AUTHENTICATION: "BASIC_AUTH"; + APIKEY_IDENTIFICATION: "APIKEY"; + ANONYMOUS_IDENTIFICATION: "ANONYMOUS"; + }>; + TimeVolumePeriod: Readonly<{ + DAY: "DAY"; + WEEK: "WEEK"; + MONTH: "MONTH"; + YEAR: "YEAR"; + }>; + TokenType: Readonly<{ + DEFAULT: "DEFAULT"; + SHOP: "SHOP"; + APIKEY: "APIKEY"; + ACTION: "ACTION"; + }>; + TransactionSource: Readonly<{ + 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"; + }>; + TransactionStatus: Readonly<{ + PENDING: "PENDING"; + CLOSED: "CLOSED"; + CANCELLED: "CANCELLED"; + }>; + BASIC_AUTHENTICATION: string; + APIKEY_IDENTIFICATION: string; + ANONYMOUS_IDENTIFICATION: string; + FILTER: string; + Product: { + TYPE: string; + ENDPOINT_PATH: string; + }; + ProductModule: { + TYPE: string; + ENDPOINT_PATH: string; + PRODUCT_MODULE_NUMBER: string; + }; + Licensee: { + TYPE: string; + ENDPOINT_PATH: string; + ENDPOINT_PATH_VALIDATE: string; + ENDPOINT_PATH_TRANSFER: string; + LICENSEE_NUMBER: string; + }; + LicenseTemplate: { + TYPE: string; + ENDPOINT_PATH: string; + LicenseType: Readonly<{ + FEATURE: "FEATURE"; + TIMEVOLUME: "TIMEVOLUME"; + FLOATING: "FLOATING"; + QUANTITY: "QUANTITY"; + }>; + }; + License: { + TYPE: string; + ENDPOINT_PATH: string; + }; + Validation: { + TYPE: string; + }; + Token: { + TYPE: string; + ENDPOINT_PATH: string; + Type: Readonly<{ + DEFAULT: "DEFAULT"; + SHOP: "SHOP"; + APIKEY: "APIKEY"; + ACTION: "ACTION"; + }>; + }; + PaymentMethod: { + TYPE: string; + ENDPOINT_PATH: string; + }; + Bundle: { + TYPE: string; + ENDPOINT_PATH: string; + ENDPOINT_OBTAIN_PATH: string; + }; + Notification: { + TYPE: string; + ENDPOINT_PATH: string; + Protocol: Readonly<{ + WEBHOOK: "WEBHOOK"; + }>; + Event: Readonly<{ + LICENSEE_CREATED: "LICENSEE_CREATED"; + LICENSE_CREATED: "LICENSE_CREATED"; + WARNING_LEVEL_CHANGED: "WARNING_LEVEL_CHANGED"; + PAYMENT_TRANSACTION_PROCESSED: "PAYMENT_TRANSACTION_PROCESSED"; + }>; + }; + Transaction: { + TYPE: string; + ENDPOINT_PATH: string; + Status: Readonly<{ + PENDING: "PENDING"; + CLOSED: "CLOSED"; + CANCELLED: "CANCELLED"; + }>; + }; + Utility: { + ENDPOINT_PATH: string; + ENDPOINT_PATH_LICENSE_TYPES: string; + ENDPOINT_PATH_LICENSING_MODELS: string; + ENDPOINT_PATH_COUNTRIES: string; + LICENSING_MODEL_TYPE: string; + LICENSE_TYPE: string; + COUNTRY_TYPE: string; + }; +}; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const ApiKeyRole: Readonly<{ + 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"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const LicenseeSecretMode: Readonly<{ + DISABLED: "DISABLED"; + PREDEFINED: "PREDEFINED"; + CLIENT: "CLIENT"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const LicenseType: Readonly<{ + FEATURE: "FEATURE"; + TIMEVOLUME: "TIMEVOLUME"; + FLOATING: "FLOATING"; + QUANTITY: "QUANTITY"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const LicensingModel: Readonly<{ + 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"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const NodeSecretMode: Readonly<{ + PREDEFINED: "PREDEFINED"; + CLIENT: "CLIENT"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const NotificationEvent: Readonly<{ + LICENSEE_CREATED: "LICENSEE_CREATED"; + LICENSE_CREATED: "LICENSE_CREATED"; + WARNING_LEVEL_CHANGED: "WARNING_LEVEL_CHANGED"; + PAYMENT_TRANSACTION_PROCESSED: "PAYMENT_TRANSACTION_PROCESSED"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const NotificationProtocol: Readonly<{ + WEBHOOK: "WEBHOOK"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const PaymentMethodEnum: Readonly<{ + NULL: "NULL"; + PAYPAL: "PAYPAL"; + PAYPAL_SANDBOX: "PAYPAL_SANDBOX"; + STRIPE: "STRIPE"; + STRIPE_TESTING: "STRIPE_TESTING"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const SecurityMode: Readonly<{ + BASIC_AUTHENTICATION: "BASIC_AUTH"; + APIKEY_IDENTIFICATION: "APIKEY"; + ANONYMOUS_IDENTIFICATION: "ANONYMOUS"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const TimeVolumePeriod: Readonly<{ + DAY: "DAY"; + WEEK: "WEEK"; + MONTH: "MONTH"; + YEAR: "YEAR"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const TokenType: Readonly<{ + DEFAULT: "DEFAULT"; + SHOP: "SHOP"; + APIKEY: "APIKEY"; + ACTION: "ACTION"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const TransactionSource: Readonly<{ + 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"; +}>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const TransactionStatus: Readonly<{ + PENDING: "PENDING"; + CLOSED: "CLOSED"; + CANCELLED: "CANCELLED"; +}>; + +interface Info { + id: string; + type: 'ERROR' | 'WARNING' | 'INFO'; + value: string; +} +interface List { + property: { + value: string; + name: string; + }[]; + list: List[]; + name: string; +} +interface Item { + property: { + value: string; + name: string; + }[]; + list: List[]; + type: string; +} +interface ItemPagination { + pagenumber: string | null; + itemsnumber: string | null; + totalpages: string | null; + totalitems: string | null; + hasnext: string | null; +} +type Items = { + item: Item[]; +} & ItemPagination; +interface NlicResponse { + signature: null | string; + infos: { + info: Info[]; + }; + items: Items | null; + ttl: string | null; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type ApiKeyRoleKeys = keyof typeof ApiKeyRole; +type ApiKeyRoleValues = (typeof ApiKeyRole)[ApiKeyRoleKeys]; + +type LicenseeSecretModeKeys = keyof typeof LicenseeSecretMode; +type LicenseeSecretModeValues = (typeof LicenseeSecretMode)[LicenseeSecretModeKeys]; + +type NodeSecretModeKeys = keyof typeof NodeSecretMode; +type NodeSecretModeValues = (typeof NodeSecretMode)[NodeSecretModeKeys]; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type LicenseTypeKeys = keyof typeof LicenseType; +type LicenseTypeValues = (typeof LicenseType)[LicenseTypeKeys]; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type LicensingModelKeys = keyof typeof LicensingModel; +type LicensingModelValues = (typeof LicensingModel)[LicensingModelKeys]; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type NotificationEventKeys = keyof typeof NotificationEvent; +type NotificationEventValues = (typeof NotificationEvent)[NotificationEventKeys]; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type NotificationProtocolKeys = keyof typeof NotificationProtocol; +type NotificationProtocolValues = (typeof NotificationProtocol)[NotificationProtocolKeys]; + +type PaymentMethodKeys = keyof typeof PaymentMethodEnum; +type PaymentMethodValues = (typeof PaymentMethodEnum)[PaymentMethodKeys]; + +type SecurityModeKeys = keyof typeof SecurityMode; +type SecurityModeValues = (typeof SecurityMode)[SecurityModeKeys]; + +type TimeVolumePeriodKeys = keyof typeof TimeVolumePeriod; +type TimeVolumePeriodValues = (typeof TimeVolumePeriod)[TimeVolumePeriodKeys]; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type TokenTypeKeys = keyof typeof TokenType; +type TokenTypeValues = (typeof TokenType)[TokenTypeKeys]; + +type TransactionSourceKeys = keyof typeof TransactionSource; +type TransactionSourceValues = (typeof TransactionSource)[TransactionSourceKeys]; + +type TransactionStatusKeys = keyof typeof TransactionStatus; +type TransactionStatusValues = (typeof TransactionStatus)[TransactionStatusKeys]; + +type RequiredProps = Required>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +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; +} +interface Proto { + prototype: object; +} +type PropGetEventListener = (obj: T, prop: string | symbol, receiver: unknown) => void; +type PropSetEventListener = (obj: T, prop: string | symbol, value: unknown, receiver: unknown) => void; +type Entity = T & M & EntityMethods; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +interface CountryProps { + readonly code: string; + readonly name: string; + readonly vatPercent?: number; + readonly isEu: boolean; +} +interface CountryMethods { + getCode(): string; + getName(): string; + getVatPercent(): number; + getIsEu(): boolean; +} +type CountryEntity = Entity; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type LicenseProps = { + active?: boolean; + number?: string; + name?: string; + price?: number; + currency?: string; + hidden?: boolean; + licenseeNumber?: string; + licenseTemplateNumber?: string; + timeVolume?: number; + timeVolumePeriod?: TimeVolumePeriodValues; + startDate?: Date | 'now'; + parentfeature?: string; + readonly inUse?: boolean; +} & T; +type SavedLicenseProps = RequiredProps & LicenseProps; +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; + setTimeVolume(timeVolume: number): void; + getTimeVolume(def?: D): number | D; + setTimeVolumePeriod(timeVolumePeriod: TimeVolumePeriodValues): void; + getTimeVolumePeriod(def?: D): TimeVolumePeriodValues | D; + setStartDate(startDate: Date | 'now'): void; + getStartDate(def?: D): Date | 'now' | D; + setParentfeature(parentfeature?: string): void; + getParentfeature(def?: D): string | D; + serialize(): Record; +} +type LicenseEntity = Entity, LicenseMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface WarningLevelSummary { + RED: string[]; + YELLOW: string[]; + GREEN: string[]; +} +type LicenseeProps = { + active?: boolean; + number?: string; + name?: string; + markedForTransfer?: boolean; + productNumber?: string; + aliases?: string[]; + readonly inUse?: boolean; + readonly warningLevelSummary?: WarningLevelSummary; +} & T; +type SavedLicenseeProps = RequiredProps & LicenseeProps; +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; +} +type LicenseeEntity = Entity, LicenseeMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type LicenseTemplateProps = { + active?: boolean; + number?: string; + name?: string; + licenseType?: LicenseTypeValues; + price?: number; + currency?: string; + automatic?: boolean; + hidden?: boolean; + hideLicenses?: boolean; + gracePeriod?: boolean; + timeVolume?: number; + timeVolumePeriod?: TimeVolumePeriodValues; + maxSessions?: number; + quantity?: number; + productModuleNumber?: string; + readonly inUse?: boolean; +} & T; +type SavedLicenseTemplateProps = RequiredProps & LicenseTemplateProps; +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: LicenseTypeValues): void; + getLicenseType(def?: D): LicenseTypeValues | 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: TimeVolumePeriodValues): void; + getTimeVolumePeriod(def?: D): TimeVolumePeriodValues | 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; +} +type LicenseTemplateEntity = Entity, LicenseTemplateMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type TransactionProps = { + active?: boolean; + number?: string; + status?: TransactionStatusValues; + source?: TransactionSourceValues; + grandTotal?: number; + discount?: number; + currency?: string; + dateCreated?: Date; + dateClosed?: Date; + paymentMethod?: PaymentMethodValues; + licenseTransactionJoins?: LicenseTransactionJoinEntity[]; + readonly inUse?: boolean; +} & T; +type SavedTransactionProps = RequiredProps & TransactionProps; +interface TransactionMethods { + setActive(active: boolean): void; + getActive(def?: D): boolean | D; + setNumber(number: string): void; + getNumber(def?: D): string | D; + setStatus(status: TransactionStatusValues): void; + getStatus(def?: D): TransactionStatusValues | D; + setSource(source: TransactionSourceValues): void; + getSource(def?: D): TransactionSourceValues | 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: PaymentMethodValues): void; + getPaymentMethod(def?: D): PaymentMethodValues | D; + setLicenseTransactionJoins(joins: LicenseTransactionJoinEntity[]): void; + getLicenseTransactionJoins(def?: D): LicenseTransactionJoinEntity[] | D; + serialize(): Record; +} +type TransactionEntity = Entity, TransactionMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface LicenseTransactionJoinProps { + transaction: TransactionEntity; + license: LicenseEntity; +} +interface LicenseTransactionJoinMethods { + setTransaction(t: TransactionEntity): void; + getTransaction(): TransactionEntity; + setLicense(l: LicenseEntity): void; + getLicense(): LicenseEntity; +} +type LicenseTransactionJoinEntity = LicenseTransactionJoinProps & LicenseTransactionJoinMethods; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type NotificationProps = { + active?: boolean; + number?: string; + name?: string; + protocol?: NotificationProtocolValues; + events?: NotificationEventValues[]; + payload?: string; + endpoint?: string; +} & T; +type SavedNotificationProps = RequiredProps & NotificationProps; +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: NotificationProtocolValues): void; + getProtocol(def?: D): NotificationProtocolValues | D; + setEvents(events: NotificationEventValues[]): void; + getEvents(def?: D): NotificationEventValues[] | D; + addEvent(event: NotificationEventValues): void; + setPayload(payload: string): void; + getPayload(def?: D): string | D; + setEndpoint(endpoint: string): void; + getEndpoint(def?: D): string | D; + serialize(): Record; +} +type NotificationEntity = Entity, NotificationMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type PaymentMethodProps = T & { + active?: boolean; + number?: string; +}; +type SavedPaymentMethodProps = RequiredProps & PaymentMethodProps; +interface PaymentMethodMethods { + setActive(active: boolean): void; + getActive(def?: D): boolean | D; + setNumber(number: string): void; + getNumber(def?: D): string | D; +} +type PaymentMethodEntity = Entity, PaymentMethodMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ProductDiscountProps { + totalPrice?: number; + currency?: string; + amountFix?: number; + amountPercent?: number; +} +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; +} +type ProductDiscountEntity = Entity; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type ProductProps = { + active?: boolean; + number?: string; + name?: string; + version?: string | number; + description?: string; + licensingInfo?: string; + licenseeAutoCreate?: boolean; + discounts?: ProductDiscountEntity[]; + readonly inUse?: boolean; +} & T; +type SavedProductProps = RequiredProps & ProductProps; +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: ProductDiscountEntity[]): void; + getDiscounts(def?: D): ProductDiscountEntity[] | D; + addDiscount(discount: ProductDiscountEntity): void; + removeDiscount(discount: ProductDiscountEntity): void; + setProductDiscounts(productDiscounts: ProductDiscountEntity[]): void; + getProductDiscounts(def?: D): ProductDiscountEntity[] | D; + serialize(): Record; +} +type ProductEntity = Entity, ProductMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type ProductModuleProps = { + active?: boolean; + number?: string; + name?: string; + licensingModel?: LicensingModelValues; + maxCheckoutValidity?: number; + yellowThreshold?: number; + redThreshold?: number; + productNumber?: string; + nodeSecretMode?: NodeSecretModeValues; + readonly inUse?: boolean; +} & T; +type SavedProductModuleProps = RequiredProps & ProductModuleProps; +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: LicensingModelValues): void; + getLicensingModel(def?: D): LicensingModelValues | 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; +} +type ProductModuleEntity = Entity, ProductModuleMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type TokenProps = { + active?: boolean; + number?: string; + expirationTime?: Date; + tokenType?: TokenTypeValues; + licenseeNumber?: string; + action?: string; + apiKeyRole?: ApiKeyRoleValues; + bundleNumber?: string; + bundlePrice?: number; + productNumber?: string; + predefinedShoppingItem?: string; + successURL?: string; + successURLTitle?: string; + cancelURL?: string; + cancelURLTitle?: string; + readonly shopURL?: string; +} & T; +type SavedTokenProps = RequiredProps & TokenProps; +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: TokenTypeValues): void; + getTokenType(def?: D): TokenTypeValues | D; + setLicenseeNumber(licenseeNumber: string): void; + getLicenseeNumber(def?: D): string | D; + setAction(action: string): void; + getAction(def?: D): string | D; + setApiKeyRole(apiKeyRole: ApiKeyRoleValues): void; + getApiKeyRole(def?: D): ApiKeyRoleValues | 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; +} +type TokenEntity = Entity, TokenMethods>; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ContextConfig { + baseUrl?: string; + securityMode?: SecurityModeValues; + username?: string; + password?: string; + apiKey?: string; + publicKey?: string; +} +interface ContextInstance extends ContextConfig { + baseUrl: string; + securityMode: SecurityModeValues; + setBaseUrl(baseUrl: string): this; + getBaseUrl(): string; + setSecurityMode(securityMode: SecurityModeValues): this; + getSecurityMode(): SecurityModeValues; + 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; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface RequestConfig { + onInfo?: (info: Info[]) => void; + onResponse?: (response: AxiosResponse) => void; + axiosInstance?: AxiosInstance; +} +interface IService { + setAxiosInstance(this: void, instance: AxiosInstance): void; + getAxiosInstance(this: void): AxiosInstance; + getLastHttpRequestInfo(this: void): AxiosResponse | null; + getInfo(this: void): Info[]; + /** + * this: void + * @param context + * @param endpoint + * @param data + * @param config + */ + get(this: void, context: ContextInstance, endpoint: string, data?: Record, config?: RequestConfig): Promise>; + post(this: void, context: ContextInstance, endpoint: string, data?: Record, config?: RequestConfig): Promise>; + delete(this: void, context: ContextInstance, endpoint: string, data?: Record, config?: RequestConfig): Promise>; + request(this: void, context: ContextInstance, method: Method, endpoint: string, data?: Record, config?: RequestConfig): Promise>; + toQueryString>(data: T): string; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +interface Pagination { + pageNumber: number; + itemsNumber: number; + totalPages: number; + totalItems: number; + hasNext: boolean; +} +interface PaginationMethods { + getContent(): T; + getPagination(): Pagination; + getPageNumber(): number; + getItemsNumber(): number; + getTotalPages(): number; + getTotalItems(): number; + hasNext(): boolean; +} +type PageInstance = PaginationMethods & T; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface IBundleService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, bundle: BundleEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, bundle: BundleEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; + obtain(context: ContextInstance, number: string, licenseeNumber: string, config?: RequestConfig): Promise>[]>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +type Parameter = Record; +type Parameters = Record; +interface LicenseeProperties { + licenseeName?: string; + licenseeSecret?: string; + [key: string]: string | undefined; +} +interface ValidationParametersInstance { + 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; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +interface ProductModuleValidation { + productModuleNumber: string; + [key: string]: string; +} +interface ValidationResultsInstance { + 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; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ILicenseeService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, productNumber: string, licensee: LicenseeEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, licensee: LicenseeEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; + validate(context: ContextInstance, number: string, parameters?: ValidationParametersInstance, config?: RequestConfig): Promise; + transfer(context: ContextInstance, number: string, sourceLicenseeNumber: string, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ILicenseService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, licenseeNumber: string | null, licenseTemplateNumber: string | null, transactionNumber: string | null, license: LicenseEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, transactionNumber: string | null, license: LicenseEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ILicenseTemplateService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, productModuleNumber: string | null, licenseTemplate: LicenseTemplateEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, licenseTemplate: LicenseTemplateEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface INotificationService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, notification: NotificationEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, notification: NotificationEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface IPaymentMethodService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + update(context: ContextInstance, number: string, paymentMethod: PaymentMethodEntity, config?: RequestConfig): Promise>>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface IProductModuleService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, productNumber: string | null, productModule: ProductModuleEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, productModule: ProductModuleEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface IProductService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, product: ProductEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, product: ProductEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ITokenService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, token: TokenEntity, config?: RequestConfig): Promise>>; + delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface ITransactionService { + get(context: ContextInstance, number: string, config?: RequestConfig): Promise>>; + list(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>[]>>; + create(context: ContextInstance, transaction: TransactionEntity, config?: RequestConfig): Promise>>; + update(context: ContextInstance, number: string, transaction: TransactionEntity, config?: RequestConfig): Promise>>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +interface IUtilityService { + listLicenseTypes(context: ContextInstance, config?: RequestConfig): Promise>; + listLicensingModels(context: ContextInstance, config?: RequestConfig): Promise>; + listCountries(context: ContextInstance, filter?: Record | string | null, config?: RequestConfig): Promise>; +} + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +type BundleProps = T & { + active?: boolean; + number?: string; + name?: string; + price?: number; + currency?: string; + licenseTemplateNumbers?: string[]; +}; +type SavedBundleProps = RequiredProps & BundleProps; +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; +} +type BundleEntity = Entity, BundleMethods>; + +declare const _default$f: (item?: Item) => BundleEntity; + +declare const _default$e: (item?: Item) => CountryEntity; + +declare const _default$d: (item?: Item) => LicenseEntity; + +declare const _default$c: (item?: Item) => LicenseeEntity; + +declare const _default$b: (item?: Item) => LicenseTemplateEntity; + +declare const _default$a: (item?: Item) => NotificationEntity; + +declare const itemToObject: >(item?: Item | List) => T; + +declare const _default$9: (item?: Item) => PaymentMethodEntity; + +declare const _default$8: (item?: Item) => ProductEntity; + +declare const _default$7: (item?: Item) => ProductModuleEntity; + +declare const _default$6: (item?: Item) => TokenEntity; + +declare const _default$5: (item?: Item) => TransactionEntity; + +/** + * @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 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. + */ +declare const Bundle: (properties?: BundleProps) => BundleEntity; + +/** + * @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. + */ +declare const Country: (properties?: CountryProps) => CountryEntity; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +declare const defineEntity:

(props: T, methods: M, proto?: P, options?: { + set?: PropSetEventListener; + get?: PropGetEventListener; +}) => Entity; + +/** + * 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. + */ +declare const License: (properties?: LicenseProps) => LicenseEntity; + +/** + * @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 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 + */ +declare const Licensee: (properties?: LicenseeProps) => LicenseeEntity; + +/** + * 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 + */ +declare const LicenseTemplate: (properties?: LicenseTemplateProps) => LicenseTemplateEntity; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare class LicenseTransactionJoin implements LicenseTransactionJoinEntity { + transaction: TransactionEntity; + license: LicenseEntity; + constructor(transaction: TransactionEntity, license: LicenseEntity); + setTransaction(transaction: TransactionEntity): void; + getTransaction(): TransactionEntity; + setLicense(license: LicenseEntity): void; + getLicense(): LicenseEntity; +} +declare const _default$4: (transaction: TransactionEntity, license: LicenseEntity) => LicenseTransactionJoin; + +/** + * 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. + */ +declare const Notification: (properties?: NotificationProps) => NotificationEntity; + +/** + * PaymentMethod entity used internally by NetLicensing. + * + * @property string number + * @property boolean active + * @property string paypal.subject + */ +declare const PaymentMethod: (properties?: PaymentMethodProps) => PaymentMethodEntity; + +/** + * 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 string 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. + */ +declare const Product: (properties?: ProductProps) => ProductEntity; + +declare const ProductDiscount: (properties?: ProductDiscountProps) => ProductDiscountEntity; + +/** + * 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 + */ +declare const ProductModule: (properties?: ProductModuleProps) => ProductModuleEntity; + +declare const Token: (properties?: TokenProps) => TokenEntity; + +/** + * 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 + */ +declare const Transaction: (properties?: TransactionProps) => TransactionEntity; + +declare class NlicError extends AxiosError { + isNlicError: boolean; + constructor(message?: string, code?: string, config?: InternalAxiosRequestConfig, request?: unknown, response?: AxiosResponse, stack?: string); +} + +declare const bundleService: IBundleService; + +declare const licenseeService: ILicenseeService; + +declare const licenseService: ILicenseService; + +declare const licenseTemplateService: ILicenseTemplateService; + +declare const notificationService: INotificationService; + +declare const paymentMethodService: IPaymentMethodService; + +declare const productModuleService: IProductModuleService; + +declare const productService: IProductService; + +declare const service: IService; + +declare const tokenService: ITokenService; + +declare const transactionService: ITransactionService; + +declare const utilityService: IUtilityService; + +declare const encode: (filter: Record) => string; +declare const decode: (filter: string) => Record; + +/** + * 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. + */ +declare const _default$3: (obj: T, options?: { + ignore?: string[]; +}) => Record; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ +declare const isDefined: (value: unknown) => boolean; +declare const isValid: (value: unknown) => boolean; +declare const ensureNotNull: (value: unknown, name: string) => void; +declare const ensureNotEmpty: (value: unknown, name: string) => void; + +declare const _default$2: (props?: ContextConfig) => ContextInstance; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +declare const Page: (content: T, pagination?: Partial) => PageInstance; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +declare const _default$1: () => ValidationParametersInstance; + +/** + * @author Labs64 + * @license Apache-2.0 + * @link https://netlicensing.io + * @copyright 2017 Labs64 NetLicensing + */ + +declare const _default: () => ValidationResultsInstance; + +export { ApiKeyRole, type ApiKeyRoleKeys, type ApiKeyRoleValues, Bundle, type BundleEntity, type BundleMethods, type BundleProps, bundleService as BundleService, _default$g as Constants, _default$2 as Context, type ContextConfig, type ContextInstance, Country, type CountryEntity, type CountryMethods, type CountryProps, type Entity, type EntityMethods, type IBundleService, type ILicenseService, type ILicenseTemplateService, type ILicenseeService, type INotificationService, type IPaymentMethodService, type IProductModuleService, type IProductService, type IService, type ITokenService, type ITransactionService, type IUtilityService, type Info, type Item, type ItemPagination, type Items, License, type LicenseEntity, type LicenseMethods, type LicenseProps, licenseService as LicenseService, LicenseTemplate, type LicenseTemplateEntity, type LicenseTemplateMethods, type LicenseTemplateProps, licenseTemplateService as LicenseTemplateService, _default$4 as LicenseTransactionJoin, type LicenseTransactionJoinEntity, type LicenseTransactionJoinMethods, type LicenseTransactionJoinProps, LicenseType, type LicenseTypeKeys, type LicenseTypeValues, Licensee, type LicenseeEntity, type LicenseeMethods, type LicenseeProperties, type LicenseeProps, LicenseeSecretMode, type LicenseeSecretModeKeys, type LicenseeSecretModeValues, licenseeService as LicenseeService, LicensingModel, type LicensingModelKeys, type LicensingModelValues, type List, NlicError, type NlicResponse, NodeSecretMode, type NodeSecretModeKeys, type NodeSecretModeValues, Notification, type NotificationEntity, NotificationEvent, type NotificationEventKeys, type NotificationEventValues, type NotificationMethods, type NotificationProps, NotificationProtocol, type NotificationProtocolKeys, type NotificationProtocolValues, notificationService as NotificationService, Page, type PageInstance, type Pagination, type PaginationMethods, type Parameter, type Parameters, PaymentMethod, type PaymentMethodEntity, PaymentMethodEnum, type PaymentMethodKeys, type PaymentMethodMethods, type PaymentMethodProps, paymentMethodService as PaymentMethodService, type PaymentMethodValues, Product, ProductDiscount, type ProductDiscountEntity, type ProductDiscountMethods, type ProductDiscountProps, type ProductEntity, type ProductMethods, ProductModule, type ProductModuleEntity, type ProductModuleMethods, type ProductModuleProps, productModuleService as ProductModuleService, type ProductModuleValidation, type ProductProps, productService as ProductService, type PropGetEventListener, type PropSetEventListener, type Proto, type RequestConfig, type RequiredProps, type SavedBundleProps, type SavedLicenseProps, type SavedLicenseTemplateProps, type SavedLicenseeProps, type SavedNotificationProps, type SavedPaymentMethodProps, type SavedProductModuleProps, type SavedProductProps, type SavedTokenProps, type SavedTransactionProps, SecurityMode, type SecurityModeKeys, type SecurityModeValues, service as Service, TimeVolumePeriod, type TimeVolumePeriodKeys, type TimeVolumePeriodValues, Token, type TokenEntity, type TokenMethods, type TokenProps, tokenService as TokenService, TokenType, type TokenTypeKeys, type TokenTypeValues, Transaction, type TransactionEntity, type TransactionMethods, type TransactionProps, transactionService as TransactionService, TransactionSource, type TransactionSourceKeys, type TransactionSourceValues, TransactionStatus, type TransactionStatusKeys, type TransactionStatusValues, utilityService as UtilityService, _default$1 as ValidationParameters, type ValidationParametersInstance, _default as ValidationResults, type ValidationResultsInstance, type WarningLevelSummary, defineEntity, ensureNotEmpty, ensureNotNull, decode as filterDecode, encode as filterEncode, isDefined, isValid, _default$f as itemToBundle, _default$e as itemToCountry, _default$d as itemToLicense, _default$b as itemToLicenseTemplate, _default$c as itemToLicensee, _default$a as itemToNotification, itemToObject, _default$9 as itemToPaymentMethod, _default$8 as itemToProduct, _default$7 as itemToProductModule, _default$6 as itemToToken, _default$5 as itemToTransaction, _default$3 as serialize }; diff --git a/dist/index.global.js b/dist/index.global.js new file mode 100644 index 0000000..d3099bb --- /dev/null +++ b/dist/index.global.js @@ -0,0 +1,7 @@ +"use strict";var NetLicensing=(()=>{var At=Object.defineProperty;var Ko=Object.getOwnPropertyDescriptor;var Jo=Object.getOwnPropertyNames;var Go=Object.prototype.hasOwnProperty;var hn=(n,e)=>{for(var o in e)At(n,o,{get:e[o],enumerable:!0})},Wo=(n,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Jo(e))!Go.call(n,r)&&r!==o&&At(n,r,{get:()=>e[r],enumerable:!(t=Ko(e,r))||t.enumerable});return n};var Xo=n=>Wo(At({},"__esModule",{value:!0}),n);var zs={};hn(zs,{ApiKeyRole:()=>Pn,Bundle:()=>qe,BundleService:()=>Mo,Constants:()=>h,Context:()=>zo,Country:()=>He,License:()=>re,LicenseService:()=>Uo,LicenseTemplate:()=>Ye,LicenseTemplateService:()=>ko,LicenseTransactionJoin:()=>ht,LicenseType:()=>Te,Licensee:()=>ze,LicenseeSecretMode:()=>Be,LicenseeService:()=>_o,LicensingModel:()=>yn,NlicError:()=>j,NodeSecretMode:()=>En,Notification:()=>Ke,NotificationEvent:()=>ge,NotificationProtocol:()=>he,NotificationService:()=>jo,Page:()=>x,PaymentMethod:()=>Je,PaymentMethodEnum:()=>Dn,PaymentMethodService:()=>Bo,Product:()=>Ge,ProductDiscount:()=>ft,ProductModule:()=>Tt,ProductModuleService:()=>Fo,ProductService:()=>Vo,SecurityMode:()=>V,Service:()=>f,TimeVolumePeriod:()=>Fe,Token:()=>gt,TokenService:()=>qo,TokenType:()=>Pe,Transaction:()=>Ae,TransactionService:()=>Ho,TransactionSource:()=>Ve,TransactionStatus:()=>ye,UtilityService:()=>$o,ValidationParameters:()=>Yo,ValidationResults:()=>Dt,defineEntity:()=>R,ensureNotEmpty:()=>E,ensureNotNull:()=>v,filterDecode:()=>wo,filterEncode:()=>S,isDefined:()=>cn,isValid:()=>we,itemToBundle:()=>G,itemToCountry:()=>$e,itemToLicense:()=>z,itemToLicenseTemplate:()=>X,itemToLicensee:()=>W,itemToNotification:()=>Q,itemToObject:()=>N,itemToPaymentMethod:()=>se,itemToProduct:()=>ee,itemToProductModule:()=>te,itemToToken:()=>pe,itemToTransaction:()=>ne,serialize:()=>L});var Qo=Object.freeze({DISABLED:"DISABLED",PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}),Be=Qo;var Zo=Object.freeze({FEATURE:"FEATURE",TIMEVOLUME:"TIMEVOLUME",FLOATING:"FLOATING",QUANTITY:"QUANTITY"}),Te=Zo;var er=Object.freeze({LICENSEE_CREATED:"LICENSEE_CREATED",LICENSE_CREATED:"LICENSE_CREATED",WARNING_LEVEL_CHANGED:"WARNING_LEVEL_CHANGED",PAYMENT_TRANSACTION_PROCESSED:"PAYMENT_TRANSACTION_PROCESSED"}),ge=er;var tr=Object.freeze({WEBHOOK:"WEBHOOK"}),he=tr;var nr=Object.freeze({BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",ANONYMOUS_IDENTIFICATION:"ANONYMOUS"}),V=nr;var or=Object.freeze({DAY:"DAY",WEEK:"WEEK",MONTH:"MONTH",YEAR:"YEAR"}),Fe=or;var rr=Object.freeze({DEFAULT:"DEFAULT",SHOP:"SHOP",APIKEY:"APIKEY",ACTION:"ACTION"}),Pe=rr;var sr=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"}),Ve=sr;var ir=Object.freeze({PENDING:"PENDING",CLOSED:"CLOSED",CANCELLED:"CANCELLED"}),ye=ir;var h={LicenseeSecretMode:Be,LicenseType:Te,NotificationEvent:ge,NotificationProtocol:he,SecurityMode:V,TimeVolumePeriod:Fe,TokenType:Pe,TransactionSource:Ve,TransactionStatus:ye,BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",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",LicenseType:Te},License:{TYPE:"License",ENDPOINT_PATH:"license"},Validation:{TYPE:"ProductModuleValidation"},Token:{TYPE:"Token",ENDPOINT_PATH:"token",Type:Pe},PaymentMethod:{TYPE:"PaymentMethod",ENDPOINT_PATH:"paymentmethod"},Bundle:{TYPE:"Bundle",ENDPOINT_PATH:"bundle",ENDPOINT_OBTAIN_PATH:"obtain"},Notification:{TYPE:"Notification",ENDPOINT_PATH:"notification",Protocol:he,Event:ge},Transaction:{TYPE:"Transaction",ENDPOINT_PATH:"transaction",Status:ye},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:"Country"}};var ar=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"}),Pn=ar;var cr=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"}),yn=cr;var ur=Object.freeze({PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}),En=ur;var dr=Object.freeze({NULL:"NULL",PAYPAL:"PAYPAL",PAYPAL_SANDBOX:"PAYPAL_SANDBOX",STRIPE:"STRIPE",STRIPE_TESTING:"STRIPE_TESTING"}),Dn=dr;var mr=n=>{try{return JSON.parse(n)}catch{return n}},pr=n=>{let e={};return n?.forEach(({name:o,value:t})=>{e[o]=mr(t)}),e},lr=n=>{let e={};return n?.forEach(o=>{let{name:t}=o;e[t]=e[t]||[],e[t].push(bn(o))}),e},bn=n=>n?{...pr(n.property),...lr(n.list)}:{},N=bn;var wt=(n,e)=>Object.hasOwn(n,e),m=(n,e,o)=>{n[e]=o},d=(n,e,o)=>wt(n,e)?n[e]:o;var L=(n,e={})=>{let o={},{ignore:t=[]}=e;return Object.entries(n).forEach(([r,s])=>{if(!t.includes(r)&&typeof s!="function")if(s===void 0)o[r]="";else if(typeof s=="string")o[r]=s;else if(s instanceof Date)o[r]=s.toISOString();else if(typeof s!="object"||s===null)o[r]=String(s);else try{o[r]=JSON.stringify(s)}catch{o[r]=String(s)}}),o};var fr=function(n,e,o={},t){let r={set:[],get:[]};t?.get&&r.get.push(t.get),t?.set&&r.set.push(t.set);let s={set(i,a){m(n,i,a)},get(i,a){return d(n,i,a)},has(i){return wt(n,i)},setProperty(i,a){this.set(i,a)},addProperty(i,a){this.set(i,a)},getProperty(i,a){return this.get(i,a)},hasProperty(i){return this.has(i)},setProperties(i){Object.entries(i).forEach(([a,p])=>{this.set(a,p)})},serialize(){return L(n)}};return new Proxy(n,{get(i,a,p){return Object.hasOwn(e,a)?e[a]:Object.hasOwn(s,a)?s[a]:(r.get.forEach(u=>{u(i,a,p)}),Reflect.get(i,a,p))},set(i,a,p,u){return r.set.forEach(l=>{l(i,a,p,u)}),Reflect.set(i,a,p,u)},getPrototypeOf(){return o.prototype||null}})},R=fr;var vn=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setPrice(t){m(e,"price",t)},getPrice(t){return d(e,"price",t)},setCurrency(t){m(e,"currency",t)},getCurrency(t){return d(e,"currency",t)},setLicenseTemplateNumbers(t){m(e,"licenseTemplateNumbers",t)},addLicenseTemplateNumber(t){e.licenseTemplateNumbers||(e.licenseTemplateNumbers=[]),e.licenseTemplateNumbers.push(t)},getLicenseTemplateNumbers(t){return d(e,"licenseTemplateNumbers",t)},removeLicenseTemplateNumber(t){let{licenseTemplateNumbers:r=[]}=e;r.splice(r.indexOf(t),1),e.licenseTemplateNumbers=r},serialize(){if(e.licenseTemplateNumbers){let t=e.licenseTemplateNumbers.join(",");return L({...e,licenseTemplateNumbers:t})}return L(e)}},vn)},qe=vn;var G=n=>{let e=N(n),{licenseTemplateNumbers:o}=e;return o&&typeof o=="string"&&(e.licenseTemplateNumbers=o.split(",")),qe(e)};var Nn=function(n={}){let o={...{code:"",name:"",vatPercent:0,isEu:!1},...n};return R(o,{getCode(){return o.code},getName(){return o.name},getVatPercent(){return o.vatPercent},getIsEu(){return o.isEu}},Nn)},He=Nn;var $e=n=>He(N(n));var Rn=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setPrice(t){m(e,"price",t)},getPrice(t){return d(e,"price",t)},setCurrency(t){m(e,"currency",t)},getCurrency(t){return d(e,"currency",t)},setHidden(t){m(e,"hidden",t)},getHidden(t){return d(e,"hidden",t)},setLicenseeNumber(t){m(e,"licenseeNumber",t)},getLicenseeNumber(t){return d(e,"licenseeNumber",t)},setLicenseTemplateNumber(t){m(e,"licenseTemplateNumber",t)},getLicenseTemplateNumber(t){return d(e,"licenseTemplateNumber",t)},setTimeVolume(t){m(e,"timeVolume",t)},getTimeVolume(t){return d(e,"timeVolume",t)},setTimeVolumePeriod(t){m(e,"timeVolumePeriod",t)},getTimeVolumePeriod(t){return d(e,"timeVolumePeriod",t)},setStartDate(t){m(e,"startDate",t)},getStartDate(t){return d(e,"startDate",t)},setParentfeature(t){m(e,"parentfeature",t)},getParentfeature(t){return d(e,"parentfeature",t)},serialize(){return L(e,{ignore:["inUse"]})}},Rn)},re=Rn;var z=n=>{let e=N(n),{startDate:o}=e;return o&&typeof o=="string"&&(e.startDate=o==="now"?o:new Date(o)),re(e)};var xn=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setProductNumber(t){m(e,"productNumber",t)},getProductNumber(t){return d(e,"productNumber",t)},setMarkedForTransfer(t){m(e,"markedForTransfer",t)},getMarkedForTransfer(t){return d(e,"markedForTransfer",t)},serialize(){return L(e,{ignore:["inUse"]})}},xn)},ze=xn;var W=n=>ze(N(n));var In=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setLicenseType(t){m(e,"licenseType",t)},getLicenseType(t){return d(e,"licenseType",t)},setPrice(t){m(e,"price",t)},getPrice(t){return d(e,"price",t)},setCurrency(t){m(e,"currency",t)},getCurrency(t){return d(e,"currency",t)},setAutomatic(t){m(e,"automatic",t)},getAutomatic(t){return d(e,"automatic",t)},setHidden(t){m(e,"hidden",t)},getHidden(t){return d(e,"hidden",t)},setHideLicenses(t){m(e,"hideLicenses",t)},getHideLicenses(t){return d(e,"hideLicenses",t)},setGracePeriod(t){m(e,"gracePeriod",t)},getGracePeriod(t){return d(e,"gracePeriod",t)},setTimeVolume(t){m(e,"timeVolume",t)},getTimeVolume(t){return d(e,"timeVolume",t)},setTimeVolumePeriod(t){m(e,"timeVolumePeriod",t)},getTimeVolumePeriod(t){return d(e,"timeVolumePeriod",t)},setMaxSessions(t){m(e,"maxSessions",t)},getMaxSessions(t){return d(e,"maxSessions",t)},setQuantity(t){m(e,"quantity",t)},getQuantity(t){return d(e,"quantity",t)},setProductModuleNumber(t){m(e,"productModuleNumber",t)},getProductModuleNumber(t){return d(e,"productModuleNumber",t)},serialize(){return L(e,{ignore:["inUse"]})}},In)},Ye=In;var X=n=>Ye(N(n));var Sn=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setProtocol(t){m(e,"protocol",t)},getProtocol(t){return d(e,"protocol",t)},setEvents(t){m(e,"events",t)},getEvents(t){return d(e,"events",t)},addEvent(t){let r=this.getEvents([]);r.push(t),this.setEvents(r)},setPayload(t){m(e,"payload",t)},getPayload(t){return d(e,"payload",t)},setEndpoint(t){m(e,"endpoint",t)},getEndpoint(t){return d(e,"endpoint",t)},serialize(){let t=L(e);return t.events&&(t.events=this.getEvents([]).join(",")),t}},Sn)},Ke=Sn;var Q=n=>{let e=N(n),{events:o}=e;return o&&typeof o=="string"&&(e.events=o.split(",")),Ke(e)};var Ln=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)}},Ln)},Je=Ln;var se=n=>Je(N(n));var Cn=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setVersion(t){m(e,"version",t)},getVersion(t){return d(e,"version",t)},setDescription(t){m(e,"description",t)},getDescription(t){return d(e,"description",t)},setLicensingInfo(t){m(e,"licensingInfo",t)},getLicensingInfo(t){return d(e,"licensingInfo",t)},setLicenseeAutoCreate(t){m(e,"licenseeAutoCreate",t)},getLicenseeAutoCreate(t){return d(e,"licenseeAutoCreate",t)},setDiscounts(t){m(e,"discounts",t)},getDiscounts(t){return d(e,"discounts",t)},addDiscount(t){let r=this.getDiscounts([]);r.push(t),this.setDiscounts(r)},removeDiscount(t){let r=this.getDiscounts();Array.isArray(r)&&r.length>0&&(r.splice(r.indexOf(t),1),this.setDiscounts(r))},setProductDiscounts(t){this.setDiscounts(t)},getProductDiscounts(t){return this.getDiscounts(t)},serialize(){let t=L(e,{ignore:["discounts","inUse"]}),r=this.getDiscounts();return r&&(t.discount=r.length>0?r.map(s=>s.toString()):""),t}},Cn)},Ge=Cn;function Ee(n,e){return function(){return n.apply(e,arguments)}}var{toString:Tr}=Object.prototype,{getPrototypeOf:Mt}=Object,{iterator:Xe,toStringTag:wn}=Symbol,Qe=(n=>e=>{let o=Tr.call(e);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),B=n=>(n=n.toLowerCase(),e=>Qe(e)===n),Ze=n=>e=>typeof e===n,{isArray:ie}=Array,De=Ze("undefined");function gr(n){return n!==null&&!De(n)&&n.constructor!==null&&!De(n.constructor)&&k(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var On=B("ArrayBuffer");function hr(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&On(n.buffer),e}var Pr=Ze("string"),k=Ze("function"),Mn=Ze("number"),et=n=>n!==null&&typeof n=="object",yr=n=>n===!0||n===!1,We=n=>{if(Qe(n)!=="object")return!1;let e=Mt(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(wn in n)&&!(Xe in n)},Er=B("Date"),Dr=B("File"),br=B("Blob"),vr=B("FileList"),Nr=n=>et(n)&&k(n.pipe),Rr=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||k(n.append)&&((e=Qe(n))==="formdata"||e==="object"&&k(n.toString)&&n.toString()==="[object FormData]"))},xr=B("URLSearchParams"),[Ir,Sr,Lr,Cr]=["ReadableStream","Request","Response","Headers"].map(B),Ar=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function be(n,e,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let t,r;if(typeof n!="object"&&(n=[n]),ie(n))for(t=0,r=n.length;t0;)if(r=o[t],e===r.toLowerCase())return r;return null}var Z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Un=n=>!De(n)&&n!==Z;function Ot(){let{caseless:n}=Un(this)&&this||{},e={},o=(t,r)=>{let s=n&&_n(e,r)||r;We(e[s])&&We(t)?e[s]=Ot(e[s],t):We(t)?e[s]=Ot({},t):ie(t)?e[s]=t.slice():e[s]=t};for(let t=0,r=arguments.length;t(be(e,(r,s)=>{o&&k(r)?n[s]=Ee(r,o):n[s]=r},{allOwnKeys:t}),n),Or=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Mr=(n,e,o,t)=>{n.prototype=Object.create(e.prototype,t),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),o&&Object.assign(n.prototype,o)},_r=(n,e,o,t)=>{let r,s,i,a={};if(e=e||{},n==null)return e;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)i=r[s],(!t||t(i,n,e))&&!a[i]&&(e[i]=n[i],a[i]=!0);n=o!==!1&&Mt(n)}while(n&&(!o||o(n,e))&&n!==Object.prototype);return e},Ur=(n,e,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=e.length;let t=n.indexOf(e,o);return t!==-1&&t===o},kr=n=>{if(!n)return null;if(ie(n))return n;let e=n.length;if(!Mn(e))return null;let o=new Array(e);for(;e-- >0;)o[e]=n[e];return o},jr=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Mt(Uint8Array)),Br=(n,e)=>{let t=(n&&n[Xe]).call(n),r;for(;(r=t.next())&&!r.done;){let s=r.value;e.call(n,s[0],s[1])}},Fr=(n,e)=>{let o,t=[];for(;(o=n.exec(e))!==null;)t.push(o);return t},Vr=B("HTMLFormElement"),qr=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,t,r){return t.toUpperCase()+r}),An=(({hasOwnProperty:n})=>(e,o)=>n.call(e,o))(Object.prototype),Hr=B("RegExp"),kn=(n,e)=>{let o=Object.getOwnPropertyDescriptors(n),t={};be(o,(r,s)=>{let i;(i=e(r,s,n))!==!1&&(t[s]=i||r)}),Object.defineProperties(n,t)},$r=n=>{kn(n,(e,o)=>{if(k(n)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;let t=n[o];if(k(t)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},zr=(n,e)=>{let o={},t=r=>{r.forEach(s=>{o[s]=!0})};return ie(n)?t(n):t(String(n).split(e)),o},Yr=()=>{},Kr=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function Jr(n){return!!(n&&k(n.append)&&n[wn]==="FormData"&&n[Xe])}var Gr=n=>{let e=new Array(10),o=(t,r)=>{if(et(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;let s=ie(t)?[]:{};return be(t,(i,a)=>{let p=o(i,r+1);!De(p)&&(s[a]=p)}),e[r]=void 0,s}}return t};return o(n,0)},Wr=B("AsyncFunction"),Xr=n=>n&&(et(n)||k(n))&&k(n.then)&&k(n.catch),jn=((n,e)=>n?setImmediate:e?((o,t)=>(Z.addEventListener("message",({source:r,data:s})=>{r===Z&&s===o&&t.length&&t.shift()()},!1),r=>{t.push(r),Z.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",k(Z.postMessage)),Qr=typeof queueMicrotask<"u"?queueMicrotask.bind(Z):typeof process<"u"&&process.nextTick||jn,Zr=n=>n!=null&&k(n[Xe]),c={isArray:ie,isArrayBuffer:On,isBuffer:gr,isFormData:Rr,isArrayBufferView:hr,isString:Pr,isNumber:Mn,isBoolean:yr,isObject:et,isPlainObject:We,isReadableStream:Ir,isRequest:Sr,isResponse:Lr,isHeaders:Cr,isUndefined:De,isDate:Er,isFile:Dr,isBlob:br,isRegExp:Hr,isFunction:k,isStream:Nr,isURLSearchParams:xr,isTypedArray:jr,isFileList:vr,forEach:be,merge:Ot,extend:wr,trim:Ar,stripBOM:Or,inherits:Mr,toFlatObject:_r,kindOf:Qe,kindOfTest:B,endsWith:Ur,toArray:kr,forEachEntry:Br,matchAll:Fr,isHTMLForm:Vr,hasOwnProperty:An,hasOwnProp:An,reduceDescriptors:kn,freezeMethods:$r,toObjectSet:zr,toCamelCase:qr,noop:Yr,toFiniteNumber:Kr,findKey:_n,global:Z,isContextDefined:Un,isSpecCompliantForm:Jr,toJSONObject:Gr,isAsyncFn:Wr,isThenable:Xr,setImmediate:jn,asap:Qr,isIterable:Zr};function ae(n,e,o,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),o&&(this.config=o),t&&(this.request=t),r&&(this.response=r,this.status=r.status?r.status:null)}c.inherits(ae,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:c.toJSONObject(this.config),code:this.code,status:this.status}}});var Bn=ae.prototype,Fn={};["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(n=>{Fn[n]={value:n}});Object.defineProperties(ae,Fn);Object.defineProperty(Bn,"isAxiosError",{value:!0});ae.from=(n,e,o,t,r,s)=>{let i=Object.create(Bn);return c.toFlatObject(n,i,function(p){return p!==Error.prototype},a=>a!=="isAxiosError"),ae.call(i,n.message,e,o,t,r),i.cause=n,i.name=n.name,s&&Object.assign(i,s),i};var y=ae;var tt=null;function _t(n){return c.isPlainObject(n)||c.isArray(n)}function qn(n){return c.endsWith(n,"[]")?n.slice(0,-2):n}function Vn(n,e,o){return n?n.concat(e).map(function(r,s){return r=qn(r),!o&&s?"["+r+"]":r}).join(o?".":""):e}function es(n){return c.isArray(n)&&!n.some(_t)}var ts=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function ns(n,e,o){if(!c.isObject(n))throw new TypeError("target must be an object");e=e||new(tt||FormData),o=c.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(D,P){return!c.isUndefined(P[D])});let t=o.metaTokens,r=o.visitor||l,s=o.dots,i=o.indexes,p=(o.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(r))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(c.isDate(g))return g.toISOString();if(!p&&c.isBlob(g))throw new y("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(g)||c.isTypedArray(g)?p&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function l(g,D,P){let A=g;if(g&&!P&&typeof g=="object"){if(c.endsWith(D,"{}"))D=t?D:D.slice(0,-2),g=JSON.stringify(g);else if(c.isArray(g)&&es(g)||(c.isFileList(g)||c.endsWith(D,"[]"))&&(A=c.toArray(g)))return D=qn(D),A.forEach(function(_,$){!(c.isUndefined(_)||_===null)&&e.append(i===!0?Vn([D],$,s):i===null?D:D+"[]",u(_))}),!1}return _t(g)?!0:(e.append(Vn(P,D,s),u(g)),!1)}let T=[],b=Object.assign(ts,{defaultVisitor:l,convertValue:u,isVisitable:_t});function I(g,D){if(!c.isUndefined(g)){if(T.indexOf(g)!==-1)throw Error("Circular reference detected in "+D.join("."));T.push(g),c.forEach(g,function(A,O){(!(c.isUndefined(A)||A===null)&&r.call(e,A,c.isString(O)?O.trim():O,D,b))===!0&&I(A,D?D.concat(O):[O])}),T.pop()}}if(!c.isObject(n))throw new TypeError("data must be an object");return I(n),e}var K=ns;function Hn(n){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function $n(n,e){this._pairs=[],n&&K(n,this,e)}var zn=$n.prototype;zn.append=function(e,o){this._pairs.push([e,o])};zn.toString=function(e){let o=e?function(t){return e.call(this,t,Hn)}:Hn;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};var nt=$n;function os(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ve(n,e,o){if(!e)return n;let t=o&&o.encode||os;c.isFunction(o)&&(o={serialize:o});let r=o&&o.serialize,s;if(r?s=r(e,o):s=c.isURLSearchParams(e)?e.toString():new nt(e,o).toString(t),s){let i=n.indexOf("#");i!==-1&&(n=n.slice(0,i)),n+=(n.indexOf("?")===-1?"?":"&")+s}return n}var Ut=class{constructor(){this.handlers=[]}use(e,o,t){return this.handlers.push({fulfilled:e,rejected:o,synchronous:t?t.synchronous:!1,runWhen:t?t.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(t){t!==null&&e(t)})}},kt=Ut;var ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Yn=typeof URLSearchParams<"u"?URLSearchParams:nt;var Kn=typeof FormData<"u"?FormData:null;var Jn=typeof Blob<"u"?Blob:null;var Gn={isBrowser:!0,classes:{URLSearchParams:Yn,FormData:Kn,Blob:Jn},protocols:["http","https","file","blob","url","data"]};var Ft={};hn(Ft,{hasBrowserEnv:()=>Bt,hasStandardBrowserEnv:()=>rs,hasStandardBrowserWebWorkerEnv:()=>ss,navigator:()=>jt,origin:()=>is});var Bt=typeof window<"u"&&typeof document<"u",jt=typeof navigator=="object"&&navigator||void 0,rs=Bt&&(!jt||["ReactNative","NativeScript","NS"].indexOf(jt.product)<0),ss=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",is=Bt&&window.location.href||"http://localhost";var C={...Ft,...Gn};function Vt(n,e){return K(n,new C.classes.URLSearchParams,Object.assign({visitor:function(o,t,r,s){return C.isNode&&c.isBuffer(o)?(this.append(t,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function as(n){return c.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function cs(n){let e={},o=Object.keys(n),t,r=o.length,s;for(t=0;t=o.length;return i=!i&&c.isArray(r)?r.length:i,p?(c.hasOwnProp(r,i)?r[i]=[r[i],t]:r[i]=t,!a):((!r[i]||!c.isObject(r[i]))&&(r[i]=[]),e(o,t,r[i],s)&&c.isArray(r[i])&&(r[i]=cs(r[i])),!a)}if(c.isFormData(n)&&c.isFunction(n.entries)){let o={};return c.forEachEntry(n,(t,r)=>{e(as(t),r,o,0)}),o}return null}var rt=us;function ds(n,e,o){if(c.isString(n))try{return(e||JSON.parse)(n),c.trim(n)}catch(t){if(t.name!=="SyntaxError")throw t}return(o||JSON.stringify)(n)}var qt={transitional:ot,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){let t=o.getContentType()||"",r=t.indexOf("application/json")>-1,s=c.isObject(e);if(s&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return r?JSON.stringify(rt(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(t.indexOf("application/x-www-form-urlencoded")>-1)return Vt(e,this.formSerializer).toString();if((a=c.isFileList(e))||t.indexOf("multipart/form-data")>-1){let p=this.env&&this.env.FormData;return K(a?{"files[]":e}:e,p&&new p,this.formSerializer)}}return s||r?(o.setContentType("application/json",!1),ds(e)):e}],transformResponse:[function(e){let o=this.transitional||qt.transitional,t=o&&o.forcedJSONParsing,r=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(t&&!this.responseType||r)){let i=!(o&&o.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(i)throw a.name==="SyntaxError"?y.from(a,y.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:C.classes.FormData,Blob:C.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],n=>{qt.headers[n]={}});var ce=qt;var ms=c.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"]),Wn=n=>{let e={},o,t,r;return n&&n.split(` +`).forEach(function(i){r=i.indexOf(":"),o=i.substring(0,r).trim().toLowerCase(),t=i.substring(r+1).trim(),!(!o||e[o]&&ms[o])&&(o==="set-cookie"?e[o]?e[o].push(t):e[o]=[t]:e[o]=e[o]?e[o]+", "+t:t)}),e};var Xn=Symbol("internals");function Ne(n){return n&&String(n).trim().toLowerCase()}function st(n){return n===!1||n==null?n:c.isArray(n)?n.map(st):String(n)}function ps(n){let e=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,t;for(;t=o.exec(n);)e[t[1]]=t[2];return e}var ls=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Ht(n,e,o,t,r){if(c.isFunction(t))return t.call(this,e,o);if(r&&(e=o),!!c.isString(e)){if(c.isString(t))return e.indexOf(t)!==-1;if(c.isRegExp(t))return t.test(e)}}function fs(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,o,t)=>o.toUpperCase()+t)}function Ts(n,e){let o=c.toCamelCase(" "+e);["get","set","has"].forEach(t=>{Object.defineProperty(n,t+o,{value:function(r,s,i){return this[t].call(this,e,r,s,i)},configurable:!0})})}var ue=class{constructor(e){e&&this.set(e)}set(e,o,t){let r=this;function s(a,p,u){let l=Ne(p);if(!l)throw new Error("header name must be a non-empty string");let T=c.findKey(r,l);(!T||r[T]===void 0||u===!0||u===void 0&&r[T]!==!1)&&(r[T||p]=st(a))}let i=(a,p)=>c.forEach(a,(u,l)=>s(u,l,p));if(c.isPlainObject(e)||e instanceof this.constructor)i(e,o);else if(c.isString(e)&&(e=e.trim())&&!ls(e))i(Wn(e),o);else if(c.isObject(e)&&c.isIterable(e)){let a={},p,u;for(let l of e){if(!c.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(p=a[u])?c.isArray(p)?[...p,l[1]]:[p,l[1]]:l[1]}i(a,o)}else e!=null&&s(o,e,t);return this}get(e,o){if(e=Ne(e),e){let t=c.findKey(this,e);if(t){let r=this[t];if(!o)return r;if(o===!0)return ps(r);if(c.isFunction(o))return o.call(this,r,t);if(c.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,o){if(e=Ne(e),e){let t=c.findKey(this,e);return!!(t&&this[t]!==void 0&&(!o||Ht(this,this[t],t,o)))}return!1}delete(e,o){let t=this,r=!1;function s(i){if(i=Ne(i),i){let a=c.findKey(t,i);a&&(!o||Ht(t,t[a],a,o))&&(delete t[a],r=!0)}}return c.isArray(e)?e.forEach(s):s(e),r}clear(e){let o=Object.keys(this),t=o.length,r=!1;for(;t--;){let s=o[t];(!e||Ht(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){let o=this,t={};return c.forEach(this,(r,s)=>{let i=c.findKey(t,s);if(i){o[i]=st(r),delete o[s];return}let a=e?fs(s):String(s).trim();a!==s&&delete o[s],o[a]=st(r),t[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let o=Object.create(null);return c.forEach(this,(t,r)=>{t!=null&&t!==!1&&(o[r]=e&&c.isArray(t)?t.join(", "):t)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,o])=>e+": "+o).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...o){let t=new this(e);return o.forEach(r=>t.set(r)),t}static accessor(e){let t=(this[Xn]=this[Xn]={accessors:{}}).accessors,r=this.prototype;function s(i){let a=Ne(i);t[a]||(Ts(r,i),t[a]=!0)}return c.isArray(e)?e.forEach(s):s(e),this}};ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(ue.prototype,({value:n},e)=>{let o=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(t){this[o]=t}}});c.freezeMethods(ue);var M=ue;function Re(n,e){let o=this||ce,t=e||o,r=M.from(t.headers),s=t.data;return c.forEach(n,function(a){s=a.call(o,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function xe(n){return!!(n&&n.__CANCEL__)}function Qn(n,e,o){y.call(this,n??"canceled",y.ERR_CANCELED,e,o),this.name="CanceledError"}c.inherits(Qn,y,{__CANCEL__:!0});var q=Qn;function Ie(n,e,o){let t=o.config.validateStatus;!o.status||!t||t(o.status)?n(o):e(new y("Request failed with status code "+o.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function $t(n){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function gs(n,e){n=n||10;let o=new Array(n),t=new Array(n),r=0,s=0,i;return e=e!==void 0?e:1e3,function(p){let u=Date.now(),l=t[s];i||(i=u),o[r]=p,t[r]=u;let T=s,b=0;for(;T!==r;)b+=o[T++],T=T%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-i{o=l,r=null,s&&(clearTimeout(s),s=null),n.apply(null,u)};return[(...u)=>{let l=Date.now(),T=l-o;T>=t?i(u,l):(r=u,s||(s=setTimeout(()=>{s=null,i(r)},t-T)))},()=>r&&i(r)]}var eo=hs;var de=(n,e,o=3)=>{let t=0,r=Zn(50,250);return eo(s=>{let i=s.loaded,a=s.lengthComputable?s.total:void 0,p=i-t,u=r(p),l=i<=a;t=i;let T={loaded:i,total:a,progress:a?i/a:void 0,bytes:p,rate:u||void 0,estimated:u&&a&&l?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};n(T)},o)},zt=(n,e)=>{let o=n!=null;return[t=>e[0]({lengthComputable:o,total:n,loaded:t}),e[1]]},Yt=n=>(...e)=>c.asap(()=>n(...e));var to=C.hasStandardBrowserEnv?((n,e)=>o=>(o=new URL(o,C.origin),n.protocol===o.protocol&&n.host===o.host&&(e||n.port===o.port)))(new URL(C.origin),C.navigator&&/(msie|trident)/i.test(C.navigator.userAgent)):()=>!0;var no=C.hasStandardBrowserEnv?{write(n,e,o,t,r,s){let i=[n+"="+encodeURIComponent(e)];c.isNumber(o)&&i.push("expires="+new Date(o).toGMTString()),c.isString(t)&&i.push("path="+t),c.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(n){let e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Kt(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Jt(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Se(n,e,o){let t=!Kt(e);return n&&(t||o==!1)?Jt(n,e):e}var oo=n=>n instanceof M?{...n}:n;function F(n,e){e=e||{};let o={};function t(u,l,T,b){return c.isPlainObject(u)&&c.isPlainObject(l)?c.merge.call({caseless:b},u,l):c.isPlainObject(l)?c.merge({},l):c.isArray(l)?l.slice():l}function r(u,l,T,b){if(c.isUndefined(l)){if(!c.isUndefined(u))return t(void 0,u,T,b)}else return t(u,l,T,b)}function s(u,l){if(!c.isUndefined(l))return t(void 0,l)}function i(u,l){if(c.isUndefined(l)){if(!c.isUndefined(u))return t(void 0,u)}else return t(void 0,l)}function a(u,l,T){if(T in e)return t(u,l);if(T in n)return t(void 0,u)}let p={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,l,T)=>r(oo(u),oo(l),T,!0)};return c.forEach(Object.keys(Object.assign({},n,e)),function(l){let T=p[l]||r,b=T(n[l],e[l],l);c.isUndefined(b)&&T!==a||(o[l]=b)}),o}var it=n=>{let e=F({},n),{data:o,withXSRFToken:t,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=e;e.headers=i=M.from(i),e.url=ve(Se(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let p;if(c.isFormData(o)){if(C.hasStandardBrowserEnv||C.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((p=i.getContentType())!==!1){let[u,...l]=p?p.split(";").map(T=>T.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...l].join("; "))}}if(C.hasStandardBrowserEnv&&(t&&c.isFunction(t)&&(t=t(e)),t||t!==!1&&to(e.url))){let u=r&&s&&no.read(s);u&&i.set(r,u)}return e};var Ps=typeof XMLHttpRequest<"u",ro=Ps&&function(n){return new Promise(function(o,t){let r=it(n),s=r.data,i=M.from(r.headers).normalize(),{responseType:a,onUploadProgress:p,onDownloadProgress:u}=r,l,T,b,I,g;function D(){I&&I(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener("abort",l)}let P=new XMLHttpRequest;P.open(r.method.toUpperCase(),r.url,!0),P.timeout=r.timeout;function A(){if(!P)return;let _=M.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),U={data:!a||a==="text"||a==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:_,config:n,request:P};Ie(function(J){o(J),D()},function(J){t(J),D()},U),P=null}"onloadend"in P?P.onloadend=A:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(A)},P.onabort=function(){P&&(t(new y("Request aborted",y.ECONNABORTED,n,P)),P=null)},P.onerror=function(){t(new y("Network Error",y.ERR_NETWORK,n,P)),P=null},P.ontimeout=function(){let $=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded",U=r.transitional||ot;r.timeoutErrorMessage&&($=r.timeoutErrorMessage),t(new y($,U.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,n,P)),P=null},s===void 0&&i.setContentType(null),"setRequestHeader"in P&&c.forEach(i.toJSON(),function($,U){P.setRequestHeader(U,$)}),c.isUndefined(r.withCredentials)||(P.withCredentials=!!r.withCredentials),a&&a!=="json"&&(P.responseType=r.responseType),u&&([b,g]=de(u,!0),P.addEventListener("progress",b)),p&&P.upload&&([T,I]=de(p),P.upload.addEventListener("progress",T),P.upload.addEventListener("loadend",I)),(r.cancelToken||r.signal)&&(l=_=>{P&&(t(!_||_.type?new q(null,n,P):_),P.abort(),P=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener("abort",l)));let O=$t(r.url);if(O&&C.protocols.indexOf(O)===-1){t(new y("Unsupported protocol "+O+":",y.ERR_BAD_REQUEST,n));return}P.send(s||null)})};var ys=(n,e)=>{let{length:o}=n=n?n.filter(Boolean):[];if(e||o){let t=new AbortController,r,s=function(u){if(!r){r=!0,a();let l=u instanceof Error?u:this.reason;t.abort(l instanceof y?l:new q(l instanceof Error?l.message:l))}},i=e&&setTimeout(()=>{i=null,s(new y(`timeout ${e} of ms exceeded`,y.ETIMEDOUT))},e),a=()=>{n&&(i&&clearTimeout(i),i=null,n.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),n=null)};n.forEach(u=>u.addEventListener("abort",s));let{signal:p}=t;return p.unsubscribe=()=>c.asap(a),p}},so=ys;var Es=function*(n,e){let o=n.byteLength;if(!e||o{let r=Ds(n,e),s=0,i,a=p=>{i||(i=!0,t&&t(p))};return new ReadableStream({async pull(p){try{let{done:u,value:l}=await r.next();if(u){a(),p.close();return}let T=l.byteLength;if(o){let b=s+=T;o(b)}p.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(p){return a(p),r.return()}},{highWaterMark:2})};var ct=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ao=ct&&typeof ReadableStream=="function",vs=ct&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),co=(n,...e)=>{try{return!!n(...e)}catch{return!1}},Ns=ao&&co(()=>{let n=!1,e=new Request(C.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),io=64*1024,Wt=ao&&co(()=>c.isReadableStream(new Response("").body)),at={stream:Wt&&(n=>n.body)};ct&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!at[e]&&(at[e]=c.isFunction(n[e])?o=>o[e]():(o,t)=>{throw new y(`Response type '${e}' is not supported`,y.ERR_NOT_SUPPORT,t)})})})(new Response);var Rs=async n=>{if(n==null)return 0;if(c.isBlob(n))return n.size;if(c.isSpecCompliantForm(n))return(await new Request(C.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(c.isArrayBufferView(n)||c.isArrayBuffer(n))return n.byteLength;if(c.isURLSearchParams(n)&&(n=n+""),c.isString(n))return(await vs(n)).byteLength},xs=async(n,e)=>{let o=c.toFiniteNumber(n.getContentLength());return o??Rs(e)},uo=ct&&(async n=>{let{url:e,method:o,data:t,signal:r,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:p,responseType:u,headers:l,withCredentials:T="same-origin",fetchOptions:b}=it(n);u=u?(u+"").toLowerCase():"text";let I=so([r,s&&s.toAbortSignal()],i),g,D=I&&I.unsubscribe&&(()=>{I.unsubscribe()}),P;try{if(p&&Ns&&o!=="get"&&o!=="head"&&(P=await xs(l,t))!==0){let U=new Request(e,{method:"POST",body:t,duplex:"half"}),Y;if(c.isFormData(t)&&(Y=U.headers.get("content-type"))&&l.setContentType(Y),U.body){let[J,je]=zt(P,de(Yt(p)));t=Gt(U.body,io,J,je)}}c.isString(T)||(T=T?"include":"omit");let A="credentials"in Request.prototype;g=new Request(e,{...b,signal:I,method:o.toUpperCase(),headers:l.normalize().toJSON(),body:t,duplex:"half",credentials:A?T:void 0});let O=await fetch(g),_=Wt&&(u==="stream"||u==="response");if(Wt&&(a||_&&D)){let U={};["status","statusText","headers"].forEach(gn=>{U[gn]=O[gn]});let Y=c.toFiniteNumber(O.headers.get("content-length")),[J,je]=a&&zt(Y,de(Yt(a),!0))||[];O=new Response(Gt(O.body,io,J,()=>{je&&je(),D&&D()}),U)}u=u||"text";let $=await at[c.findKey(at,u)||"text"](O,n);return!_&&D&&D(),await new Promise((U,Y)=>{Ie(U,Y,{data:$,headers:M.from(O.headers),status:O.status,statusText:O.statusText,config:n,request:g})})}catch(A){throw D&&D(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,n,g),{cause:A.cause||A}):y.from(A,A&&A.code,n,g)}});var Xt={http:tt,xhr:ro,fetch:uo};c.forEach(Xt,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});var mo=n=>`- ${n}`,Is=n=>c.isFunction(n)||n===null||n===!1,ut={getAdapter:n=>{n=c.isArray(n)?n:[n];let{length:e}=n,o,t,r={};for(let s=0;s`adapter ${a} `+(p===!1?"is not supported by the environment":"is not available in the build")),i=e?s.length>1?`since : +`+s.map(mo).join(` +`):" "+mo(s[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return t},adapters:Xt};function Qt(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new q(null,n)}function dt(n){return Qt(n),n.headers=M.from(n.headers),n.data=Re.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),ut.getAdapter(n.adapter||ce.adapter)(n).then(function(t){return Qt(n),t.data=Re.call(n,n.transformResponse,t),t.headers=M.from(t.headers),t},function(t){return xe(t)||(Qt(n),t&&t.response&&(t.response.data=Re.call(n,n.transformResponse,t.response),t.response.headers=M.from(t.response.headers))),Promise.reject(t)})}var mt="1.9.0";var pt={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{pt[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});var po={};pt.transitional=function(e,o,t){function r(s,i){return"[Axios v"+mt+"] Transitional option '"+s+"'"+i+(t?". "+t:"")}return(s,i,a)=>{if(e===!1)throw new y(r(i," has been removed"+(o?" in "+o:"")),y.ERR_DEPRECATED);return o&&!po[i]&&(po[i]=!0,console.warn(r(i," has been deprecated since v"+o+" and will be removed in the near future"))),e?e(s,i,a):!0}};pt.spelling=function(e){return(o,t)=>(console.warn(`${t} is likely a misspelling of ${e}`),!0)};function Ss(n,e,o){if(typeof n!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);let t=Object.keys(n),r=t.length;for(;r-- >0;){let s=t[r],i=e[s];if(i){let a=n[s],p=a===void 0||i(a,s,n);if(p!==!0)throw new y("option "+s+" must be "+p,y.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new y("Unknown option "+s,y.ERR_BAD_OPTION)}}var Le={assertOptions:Ss,validators:pt};var H=Le.validators,me=class{constructor(e){this.defaults=e||{},this.interceptors={request:new kt,response:new kt}}async request(e,o){try{return await this._request(e,o)}catch(t){if(t instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;let s=r.stack?r.stack.replace(/^.+\n/,""):"";try{t.stack?s&&!String(t.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(t.stack+=` +`+s):t.stack=s}catch{}}throw t}}_request(e,o){typeof e=="string"?(o=o||{},o.url=e):o=e||{},o=F(this.defaults,o);let{transitional:t,paramsSerializer:r,headers:s}=o;t!==void 0&&Le.assertOptions(t,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),r!=null&&(c.isFunction(r)?o.paramsSerializer={serialize:r}:Le.assertOptions(r,{encode:H.function,serialize:H.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Le.assertOptions(o,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let i=s&&c.merge(s.common,s[o.method]);s&&c.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),o.headers=M.concat(i,s);let a=[],p=!0;this.interceptors.request.forEach(function(D){typeof D.runWhen=="function"&&D.runWhen(o)===!1||(p=p&&D.synchronous,a.unshift(D.fulfilled,D.rejected))});let u=[];this.interceptors.response.forEach(function(D){u.push(D.fulfilled,D.rejected)});let l,T=0,b;if(!p){let g=[dt.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),b=g.length,l=Promise.resolve(o);T{if(!t._listeners)return;let s=t._listeners.length;for(;s-- >0;)t._listeners[s](r);t._listeners=null}),this.promise.then=r=>{let s,i=new Promise(a=>{t.subscribe(a),s=a}).then(r);return i.cancel=function(){t.unsubscribe(s)},i},e(function(s,i,a){t.reason||(t.reason=new q(s,i,a),o(t.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let o=this._listeners.indexOf(e);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){let e=new AbortController,o=t=>{e.abort(t)};return this.subscribe(o),e.signal.unsubscribe=()=>this.unsubscribe(o),e.signal}static source(){let e;return{token:new n(function(r){e=r}),cancel:e}}},lo=Zt;function en(n){return function(o){return n.apply(null,o)}}function tn(n){return c.isObject(n)&&n.isAxiosError===!0}var nn={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(nn).forEach(([n,e])=>{nn[e]=n});var fo=nn;function To(n){let e=new Ce(n),o=Ee(Ce.prototype.request,e);return c.extend(o,Ce.prototype,e,{allOwnKeys:!0}),c.extend(o,e,null,{allOwnKeys:!0}),o.create=function(r){return To(F(n,r))},o}var w=To(ce);w.Axios=Ce;w.CanceledError=q;w.CancelToken=lo;w.isCancel=xe;w.VERSION=mt;w.toFormData=K;w.AxiosError=y;w.Cancel=w.CanceledError;w.all=function(e){return Promise.all(e)};w.spread=en;w.isAxiosError=tn;w.mergeConfig=F;w.AxiosHeaders=M;w.formToJSON=n=>rt(c.isHTMLForm(n)?new FormData(n):n);w.getAdapter=ut.getAdapter;w.HttpStatusCode=fo;w.default=w;var lt=w;var{Axios:yd,AxiosError:go,CanceledError:Ed,isCancel:Dd,CancelToken:bd,VERSION:vd,all:Nd,Cancel:Rd,isAxiosError:xd,spread:Id,toFormData:Sd,AxiosHeaders:Ld,HttpStatusCode:Cd,formToJSON:Ad,getAdapter:wd,mergeConfig:Od}=lt;var j=class n extends go{constructor(o,t,r,s,i,a){super(o,t,r,s,i);this.isNlicError=!0;this.name="NlicError",a&&(this.stack=a),Object.setPrototypeOf(this,n.prototype)}};var ho=function(n={}){let e={...n};if(e.amountFix&&e.amountPercent)throw new j('Properties "amountFix" and "amountPercent" cannot be used at the same time');return R(e,{setTotalPrice(t){m(e,"totalPrice",t)},getTotalPrice(t){return d(e,"totalPrice",t)},setCurrency(t){m(e,"currency",t)},getCurrency(t){return d(e,"currency",t)},setAmountFix(t){m(e,"amountFix",t)},getAmountFix(t){return d(e,"amountFix",t)},setAmountPercent(t){m(e,"amountPercent",t)},getAmountPercent(t){return d(e,"amountPercent",t)},toString(){let t=this.getTotalPrice(),r=this.getCurrency(),s=this.getAmountPercent()?`${this.getAmountPercent()}%`:this.getAmountFix();return t&&r&&s?`${t};${r};${s}`:""}},ho,{set:(t,r)=>{r==="amountFix"&&delete t.amountPercent,r==="amountPercent"&&delete t.amountFix}})},ft=ho;var ee=n=>{let e=N(n),o=e.discount;return delete e.discount,o&&(e.discounts=o.map(t=>ft(t))),Ge(e)};var Po=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setLicensingModel(t){m(e,"licensingModel",t)},getLicensingModel(t){return d(e,"licensingModel",t)},setMaxCheckoutValidity(t){m(e,"maxCheckoutValidity",t)},getMaxCheckoutValidity(t){return d(e,"maxCheckoutValidity",t)},setYellowThreshold(t){m(e,"yellowThreshold",t)},getYellowThreshold(t){return d(e,"yellowThreshold",t)},setRedThreshold(t){m(e,"redThreshold",t)},getRedThreshold(t){return d(e,"redThreshold",t)},setProductNumber(t){m(e,"productNumber",t)},getProductNumber(t){return d(e,"productNumber",t)},serialize(){return L(e,{ignore:["inUse"]})}},Po)},Tt=Po;var te=n=>Tt(N(n));var yo=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setExpirationTime(t){m(e,"expirationTime",t)},getExpirationTime(t){return d(e,"expirationTime",t)},setTokenType(t){m(e,"tokenType",t)},getTokenType(t){return d(e,"tokenType",t)},setLicenseeNumber(t){m(e,"licenseeNumber",t)},getLicenseeNumber(t){return d(e,"licenseeNumber",t)},setAction(t){m(e,"action",t)},getAction(t){return d(e,"action",t)},setApiKeyRole(t){m(e,"apiKeyRole",t)},getApiKeyRole(t){return d(e,"apiKeyRole",t)},setBundleNumber(t){m(e,"bundleNumber",t)},getBundleNumber(t){return d(e,"bundleNumber",t)},setBundlePrice(t){m(e,"bundlePrice",t)},getBundlePrice(t){return d(e,"bundlePrice",t)},setProductNumber(t){m(e,"productNumber",t)},getProductNumber(t){return d(e,"productNumber",t)},setPredefinedShoppingItem(t){m(e,"predefinedShoppingItem",t)},getPredefinedShoppingItem(t){return d(e,"predefinedShoppingItem",t)},setSuccessURL(t){m(e,"successURL",t)},getSuccessURL(t){return d(e,"successURL",t)},setSuccessURLTitle(t){m(e,"successURLTitle",t)},getSuccessURLTitle(t){return d(e,"successURLTitle",t)},setCancelURL(t){m(e,"cancelURL",t)},getCancelURL(t){return d(e,"cancelURL",t)},setCancelURLTitle(t){m(e,"cancelURLTitle",t)},getCancelURLTitle(t){return d(e,"cancelURLTitle",t)},getShopURL(t){return d(e,"shopURL",t)},serialize(){return L(e,{ignore:["shopURL"]})}},yo)},gt=yo;var pe=n=>{let e=N(n),{expirationTime:o}=e;return o&&typeof o=="string"&&(e.expirationTime=new Date(o)),gt(e)};var on=class{constructor(e,o){this.transaction=e,this.license=o}setTransaction(e){this.transaction=e}getTransaction(){return this.transaction}setLicense(e){this.license=e}getLicense(){return this.license}},ht=(n,e)=>new on(n,e);var Eo=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setStatus(t){m(e,"status",t)},getStatus(t){return d(e,"status",t)},setSource(t){m(e,"source",t)},getSource(t){return d(e,"source",t)},setGrandTotal(t){m(e,"grandTotal",t)},getGrandTotal(t){return d(e,"grandTotal",t)},setDiscount(t){m(e,"discount",t)},getDiscount(t){return d(e,"discount",t)},setCurrency(t){m(e,"currency",t)},getCurrency(t){return d(e,"currency",t)},setDateCreated(t){m(e,"dateCreated",t)},getDateCreated(t){return d(e,"dateCreated",t)},setDateClosed(t){m(e,"dateClosed",t)},getDateClosed(t){return d(e,"dateClosed",t)},setPaymentMethod(t){m(e,"paymentMethod",t)},getPaymentMethod(t){return d(e,"paymentMethod",t)},setLicenseTransactionJoins(t){m(e,"licenseTransactionJoins",t)},getLicenseTransactionJoins(t){return d(e,"licenseTransactionJoins",t)},serialize(){return L(e,{ignore:["licenseTransactionJoins","inUse"]})}},Eo)},Ae=Eo;var ne=n=>{let e=N(n),{dateCreated:o,dateClosed:t}=e;o&&typeof o=="string"&&(e.dateCreated=new Date(o)),t&&typeof t=="string"&&(e.dateClosed=new Date(t));let r=e.licenseTransactionJoin;return delete e.licenseTransactionJoin,r&&(e.licenseTransactionJoins=r.map(({transactionNumber:s,licenseNumber:i})=>{let a=Ae({number:s}),p=re({number:i});return ht(a,p)})),Ae(e)};var Do=lt.create(),bo=null,vo=[],No=n=>{Do=n},Pt=()=>Do,rn=n=>{bo=n},Ro=()=>bo,sn=n=>{vo=n},xo=()=>vo;var an={name:"netlicensing-client",version:"2.0.0",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/index.cjs",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.mjs",require:"./dist/index.cjs"}},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"},peerDependencies:{axios:"^1.9.0"},dependencies:{},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",axios:"^1.9.0",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"]};var yt=n=>{let e=[],o=(t,r)=>{if(t!=null){if(Array.isArray(t)){t.forEach(s=>{o(s,r?`${r}`:"")});return}if(t instanceof Date){e.push(`${r}=${encodeURIComponent(t.toISOString())}`);return}if(typeof t=="object"){Object.keys(t).forEach(s=>{let i=t[s];o(i,r?`${r}[${encodeURIComponent(s)}]`:encodeURIComponent(s))});return}e.push(`${r}=${encodeURIComponent(t)}`)}};return o(n),e.join("&")};var le=async(n,e,o,t,r)=>{let s={Accept:"application/json","X-Requested-With":"XMLHttpRequest"};typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(s["User-agent"]=`NetLicensing/Javascript ${an.version}/node&${process.version}`);let i={method:e,headers:s,url:encodeURI(`${n.getBaseUrl()}/${o}`),responseType:"json",transformRequest:(p,u)=>u["Content-Type"]==="application/x-www-form-urlencoded"?yt(p):(u["NetLicensing-Origin"]||(u["NetLicensing-Origin"]=`NetLicensing/Javascript ${an.version}`),p)};switch(["put","post","patch"].indexOf(e.toLowerCase())>=0?(i.method==="post"&&(s["Content-Type"]="application/x-www-form-urlencoded"),i.data=t):i.params=t,n.getSecurityMode()){case V.BASIC_AUTHENTICATION:{if(!n.getUsername())throw new j('Missing parameter "username"');if(!n.getPassword())throw new j('Missing parameter "password"');i.auth={username:n.getUsername(),password:n.getPassword()}}break;case V.APIKEY_IDENTIFICATION:if(!n.getApiKey())throw new j('Missing parameter "apiKey"');s.Authorization=`Basic ${btoa(`apiKey:${n.getApiKey()}`)}`;break;case V.ANONYMOUS_IDENTIFICATION:break;default:throw new j("Unknown security mode")}let a=r?.axiosInstance||Pt();try{let p=await a(i),u=p.data.infos?.info||[];if(rn(p),sn(u),r?.onResponse&&r.onResponse(p),u.length>0){r?.onInfo&&r.onInfo(u);let l=u.find(({type:T})=>T==="ERROR");if(l)throw new j(l.value,l.id,p.config,p.request,p)}return p}catch(p){let u=p,l=u.response,T=l?.data?.infos?.info||[];if(rn(l||null),sn(T),p.isAxiosError){let b=p.message;if(l?.data&&T.length>0){let I=T.find(({type:g})=>g==="ERROR");I&&(b=I.value)}throw new j(b,u.code,u.config,u.request,u.response)}throw p}};var Io=(n,e,o,t)=>le(n,"get",e,o,t),So=(n,e,o,t)=>le(n,"post",e,o,t),Lo=(n,e,o,t)=>le(n,"delete",e,o,t);var Cs={setAxiosInstance(n){No(n)},getAxiosInstance(){return Pt()},getLastHttpRequestInfo(){return Ro()},getInfo(){return xo()},get(n,e,o,t){return Io(n,e,o,t)},post(n,e,o,t){return So(n,e,o,t)},delete(n,e,o,t){return Lo(n,e,o,t)},request(n,e,o,t,r){return le(n,e,o,t,r)},toQueryString(n){return yt(n)}},f=Cs;var Co=";",Ao="=",S=n=>Object.keys(n).map(e=>`${e}${Ao}${String(n[e])}`).join(Co),wo=n=>{let e={};return n.split(Co).forEach(o=>{let[t,r]=o.split(Ao);e[t]=r}),e};var cn=n=>typeof n<"u"&&typeof n!="function",we=n=>cn(n)?typeof n=="number"?!Number.isNaN(n):!0:!1,v=(n,e)=>{if(n===null)throw new TypeError(`Parameter "${e}" cannot be null.`);if(!we(n))throw new TypeError(`Parameter "${e}" has an invalid value.`)},E=(n,e)=>{if(v(n,e),!n)throw new TypeError(`Parameter "${e}" cannot be empty.`)};var Oo=function(n,e){let o=parseInt(e?.pagenumber||"0",10),t=parseInt(e?.itemsnumber||"0",10),r=parseInt(e?.totalpages||"0",10),s=parseInt(e?.totalitems||"0",10),i={getContent(){return n},getPagination(){return{pageNumber:o,itemsNumber:t,totalPages:r,totalItems:s,hasNext:r>o+1}},getPageNumber(){return o},getItemsNumber(){return t},getTotalPages(){return r},getTotalItems(){return s},hasNext(){return r>o+1}};return new Proxy(n,{get(a,p,u){return Object.hasOwn(i,p)?i[p]:Reflect.get(a,p,u)},set(a,p,u,l){return Reflect.set(a,p,u,l)},getPrototypeOf(){return Oo.prototype||null}})},x=Oo;var fe=h.Bundle.ENDPOINT_PATH,As=h.Bundle.ENDPOINT_OBTAIN_PATH,Et=h.Bundle.TYPE,ws={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${fe}/${e}`,{},o)).data.items?.item.find(s=>s.type===Et);return G(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,fe,t,o)).data.items,i=s?.item.filter(a=>a.type===Et).map(a=>G(a));return x(i||[],s)},async create(n,e,o){v(e,"bundle");let r=(await f.post(n,fe,e.serialize(),o)).data.items?.item.find(s=>s.type===Et);return G(r)},async update(n,e,o,t){E(e,"number"),v(o,"bundle");let s=(await f.post(n,`${fe}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Et);return G(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${fe}/${e}`,{forceCascade:!!o},t)},async obtain(n,e,o,t){E(e,"number"),E(o,"licenseeNumber");let r={[h.Licensee.LICENSEE_NUMBER]:o};return(await f.post(n,`${fe}/${e}/${As}`,r,t)).data.items?.item.filter(p=>p.type===h.License.TYPE)?.map(p=>z(p))||[]}},Mo=ws;var un=class{constructor(){this.validations={}}getValidators(){return this.validations}setValidation(e){return this.validations[e.productModuleNumber]=e,this}getValidation(e,o){return this.validations[e]||o}setProductModuleValidation(e){return this.setValidation(e)}getProductModuleValidation(e,o){return this.getValidation(e,o)}setTtl(e){if(!we(e))throw new TypeError(`Bad ttl:${e.toString()}`);return this.ttl=new Date(e),this}getTtl(){return this.ttl}toString(){let e="ValidationResult [";return Object.keys(this.validations).forEach(o=>{e+=`ProductModule<${o}>`,o in this.validations&&(e+=JSON.stringify(this.validations[o]))}),e+="]",e}},Dt=()=>new un;var oe=h.Licensee.ENDPOINT_PATH,Os=h.Licensee.ENDPOINT_PATH_VALIDATE,Ms=h.Licensee.ENDPOINT_PATH_TRANSFER,bt=h.Licensee.TYPE,_s={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${oe}/${e}`,{},o)).data.items?.item.find(s=>s.type===bt);return W(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,oe,t,o)).data.items,i=s?.item.filter(a=>a.type===bt).map(a=>W(a));return x(i||[],s)},async create(n,e,o,t){v(o,"licensee");let r=o.serialize();e&&(r.productNumber=e);let i=(await f.post(n,oe,r,t)).data.items?.item.find(a=>a.type===bt);return W(i)},async update(n,e,o,t){E(e,"number"),v(o,"licensee");let s=(await f.post(n,`${oe}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===bt);return W(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${oe}/${e}`,{forceCascade:!!o},t)},async validate(n,e,o,t){E(e,"number");let r={};if(o){let u=o.productNumber;u&&(r.productNumber=u);let l=o.licenseeProperties;Object.keys(l).forEach(b=>{r[b]=o.getLicenseeProperty(b)}),o.isForOfflineUse()&&(r.forOfflineUse=!0),o.isDryRun()&&(r.dryRun=!0);let T=o.getParameters();Object.keys(T).forEach((b,I)=>{r[`${h.ProductModule.PRODUCT_MODULE_NUMBER}${I}`]=b;let g=T[b];g&&Object.keys(g).forEach(D=>{r[D+I]=g[D]})})}let s=await f.post(n,`${oe}/${e}/${Os}`,r,t),i=Dt(),a=s.data.ttl;return a&&i.setTtl(a),s.data.items?.item.filter(u=>u.type===h.Validation.TYPE)?.forEach(u=>{i.setValidation(N(u))}),i},transfer(n,e,o,t){E(e,"number"),E(o,"sourceLicenseeNumber");let r={sourceLicenseeNumber:o};return f.post(n,`${oe}/${e}/${Ms}`,r,t)}},_o=_s;var Oe=h.License.ENDPOINT_PATH,vt=h.License.TYPE,Us={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${Oe}/${e}`,{},o)).data.items?.item.find(s=>s.type===vt);return z(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,Oe,t,o)).data.items,i=s?.item.filter(a=>a.type===vt).map(a=>z(a));return x(i||[],s)},async create(n,e,o,t,r,s){v(r,"license");let i=r.serialize();e&&(i.licenseeNumber=e),o&&(i.licenseTemplateNumber=o),t&&(i.transactionNumber=t);let p=(await f.post(n,Oe,i,s)).data.items?.item.find(u=>u.type===vt);return z(p)},async update(n,e,o,t,r){E(e,"number"),v(t,"license");let s=t.serialize();o&&(s.transactionNumber=o);let a=(await f.post(n,`${Oe}/${e}`,s,r)).data.items?.item.find(p=>p.type===vt);return z(a)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${Oe}/${e}`,{forceCascade:!!o},t)}},Uo=Us;var Me=h.LicenseTemplate.ENDPOINT_PATH,Nt=h.LicenseTemplate.TYPE,ks={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${Me}/${e}`,{},o)).data.items?.item.find(s=>s.type===Nt);return X(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,Me,t,o)).data.items,i=s?.item.filter(a=>a.type===Nt).map(a=>X(a));return x(i||[],s)},async create(n,e,o,t){v(o,"licenseTemplate");let r=o.serialize();e&&(r.productModuleNumber=e);let i=(await f.post(n,Me,r,t)).data.items?.item.find(a=>a.type===Nt);return X(i)},async update(n,e,o,t){E(e,"number"),v(o,"licenseTemplate");let s=(await f.post(n,`${Me}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Nt);return X(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${Me}/${e}`,{forceCascade:!!o},t)}},ko=ks;var _e=h.Notification.ENDPOINT_PATH,Rt=h.Notification.TYPE,js={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${_e}/${e}`,{},o)).data.items?.item.find(s=>s.type===Rt);return Q(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,_e,t,o)).data.items,i=s?.item.filter(a=>a.type===Rt).map(a=>Q(a));return x(i||[],s)},async create(n,e,o){v(e,"notification");let r=(await f.post(n,_e,e.serialize(),o)).data.items?.item.find(s=>s.type===Rt);return Q(r)},async update(n,e,o,t){E(e,"number"),v(o,"notification");let s=(await f.post(n,`${_e}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Rt);return Q(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${_e}/${e}`,{forceCascade:!!o},t)}},jo=js;var dn=h.PaymentMethod.ENDPOINT_PATH,mn=h.PaymentMethod.TYPE,Bs={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${dn}/${e}`,{},o)).data.items?.item.find(s=>s.type===mn);return se(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,dn,t,o)).data.items,i=s?.item.filter(a=>a.type===mn).map(a=>se(a));return x(i||[],s)},async update(n,e,o,t){E(e,"number"),v(o,"paymentMethod");let s=(await f.post(n,`${dn}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===mn);return se(s)}},Bo=Bs;var Ue=h.ProductModule.ENDPOINT_PATH,xt=h.ProductModule.TYPE,Fs={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${Ue}/${e}`,{},o)).data.items?.item.find(s=>s.type===xt);return te(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,Ue,t,o)).data.items,i=s?.item.filter(a=>a.type===xt).map(a=>te(a));return x(i||[],s)},async create(n,e,o,t){v(o,"productModule");let r=o.serialize();e&&(r.productNumber=e);let i=(await f.post(n,Ue,r,t)).data.items?.item.find(a=>a.type===xt);return te(i)},async update(n,e,o,t){E(e,"number"),v(o,"productModule");let s=(await f.post(n,`${Ue}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===xt);return te(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${Ue}/${e}`,{forceCascade:!!o},t)}},Fo=Fs;var ke=h.Product.ENDPOINT_PATH,It=h.Product.TYPE,Vs={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${ke}/${e}`,{},o)).data.items?.item.find(s=>s.type===It);return ee(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,ke,t,o)).data.items,i=s?.item.filter(a=>a.type===It).map(a=>ee(a));return x(i||[],s)},async create(n,e,o){v(e,"product");let r=(await f.post(n,ke,e.serialize(),o)).data.items?.item.find(s=>s.type===It);return ee(r)},async update(n,e,o,t){E(e,"number"),v(o,"product");let s=(await f.post(n,`${ke}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===It);return ee(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${ke}/${e}`,{forceCascade:!!o},t)}},Vo=Vs;var St=h.Token.ENDPOINT_PATH,pn=h.Token.TYPE,qs={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${St}/${e}`,{},o)).data.items?.item.find(s=>s.type===pn);return pe(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,St,t,o)).data.items,i=s?.item.filter(a=>a.type===pn).map(a=>pe(a));return x(i||[],s)},async create(n,e,o){v(e,"token");let r=(await f.post(n,St,e.serialize(),o)).data.items?.item.find(s=>s.type===pn);return pe(r)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${St}/${e}`,{forceCascade:!!o},t)}},qo=qs;var Lt=h.Transaction.ENDPOINT_PATH,Ct=h.Transaction.TYPE,Hs={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${Lt}/${e}`,{},o)).data.items?.item.find(s=>s.type===Ct);return ne(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,Lt,t,o)).data.items,i=s?.item.filter(a=>a.type===Ct).map(a=>ne(a));return x(i||[],s)},async create(n,e,o){v(e,"transaction");let r=(await f.post(n,Lt,e.serialize(),o)).data.items?.item.find(s=>s.type===Ct);return ne(r)},async update(n,e,o,t){E(e,"number"),v(o,"transaction");let s=(await f.post(n,`${Lt}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Ct);return ne(s)}},Ho=Hs;var ln=h.Utility.ENDPOINT_PATH,$s={async listLicenseTypes(n,e){let o=`${ln}/${h.Utility.ENDPOINT_PATH_LICENSE_TYPES}`,r=(await f.get(n,o,void 0,e)).data.items,s=h.Utility.LICENSE_TYPE,i=r?.item.filter(a=>a.type===s).map(a=>N(a).name);return x(i||[],r)},async listLicensingModels(n,e){let o=`${ln}/${h.Utility.ENDPOINT_PATH_LICENSING_MODELS}`,r=(await f.get(n,o,void 0,e)).data.items,s=h.Utility.LICENSING_MODEL_TYPE,i=r?.item.filter(a=>a.type===s).map(a=>N(a).name);return x(i||[],r)},async listCountries(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let r=`${ln}/${h.Utility.ENDPOINT_PATH_COUNTRIES}`,i=(await f.get(n,r,t,o)).data.items,a=h.Utility.COUNTRY_TYPE,p=i?.item.filter(u=>u.type===a).map(u=>$e(u));return x(p||[],i)}},$o=$s;var fn=class{constructor(e){this.baseUrl=e?.baseUrl||"https://go.netlicensing.io/core/v2/rest",this.securityMode=e?.securityMode||V.BASIC_AUTHENTICATION,this.username=e?.username,this.password=e?.password,this.apiKey=e?.apiKey,this.publicKey=e?.publicKey}setBaseUrl(e){return this.baseUrl=e,this}getBaseUrl(){return this.baseUrl}setSecurityMode(e){return this.securityMode=e,this}getSecurityMode(){return this.securityMode}setUsername(e){return this.username=e,this}getUsername(e){return this.username||e}setPassword(e){return this.password=e,this}getPassword(e){return this.password||e}setApiKey(e){return this.apiKey=e,this}getApiKey(e){return this.apiKey||e}setPublicKey(e){return this.publicKey=e,this}getPublicKey(e){return this.publicKey||e}},zo=n=>new fn(n);var Tn=class{constructor(){this.parameters={},this.licenseeProperties={}}setProductNumber(e){return this.productNumber=e,this}getProductNumber(){return this.productNumber}setLicenseeName(e){return this.licenseeProperties.licenseeName=e,this}getLicenseeName(){return this.licenseeProperties.licenseeName}setLicenseeSecret(e){return this.licenseeProperties.licenseeSecret=e,this}getLicenseeSecret(){return this.licenseeProperties.licenseeSecret}getLicenseeProperties(){return this.licenseeProperties}setLicenseeProperty(e,o){return this.licenseeProperties[e]=o,this}getLicenseeProperty(e,o){return this.licenseeProperties[e]||o}setForOfflineUse(e){return this.forOfflineUse=e,this}isForOfflineUse(){return!!this.forOfflineUse}setDryRun(e){return this.dryRun=e,this}isDryRun(){return!!this.dryRun}getParameters(){return this.parameters}setParameter(e,o){return this.parameters[e]=o,this}getParameter(e){return this.parameters[e]}getProductModuleValidationParameters(e){return this.getParameter(e)}setProductModuleValidationParameters(e,o){return this.setParameter(e,o)}},Yo=()=>new Tn;return Xo(zs);})(); +//# sourceMappingURL=index.global.js.map \ No newline at end of file diff --git a/dist/index.global.js.map b/dist/index.global.js.map new file mode 100644 index 0000000..cc996fc --- /dev/null +++ b/dist/index.global.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/index.ts","../src/constants/LicenseeSecretMode.ts","../src/constants/LicenseType.ts","../src/constants/NotificationEvent.ts","../src/constants/NotificationProtocol.ts","../src/constants/SecurityMode.ts","../src/constants/TimeVolumePeriod.ts","../src/constants/TokenType.ts","../src/constants/TransactionSource.ts","../src/constants/TransactionStatus.ts","../src/constants/index.ts","../src/constants/ApiKeyRole.ts","../src/constants/LicensingModel.ts","../src/constants/NodeSecretMode.ts","../src/constants/PaymentMethodEnum.ts","../src/converters/itemToObject.ts","../src/utils/helpers.ts","../src/utils/serialize.ts","../src/entities/defineEntity.ts","../src/entities/Bundle.ts","../src/converters/itemToBundle.ts","../src/entities/Country.ts","../src/converters/itemToCountry.ts","../src/entities/License.ts","../src/converters/itemToLicense.ts","../src/entities/Licensee.ts","../src/converters/itemToLicensee.ts","../src/entities/LicenseTemplate.ts","../src/converters/itemToLicenseTemplate.ts","../src/entities/Notification.ts","../src/converters/itemToNotification.ts","../src/entities/PaymentMethod.ts","../src/converters/itemToPaymentMethod.ts","../src/entities/Product.ts","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/core/AxiosError.js","../node_modules/axios/lib/helpers/null.js","../node_modules/axios/lib/helpers/toFormData.js","../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/defaults/transitional.js","../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../node_modules/axios/lib/platform/browser/classes/FormData.js","../node_modules/axios/lib/platform/browser/classes/Blob.js","../node_modules/axios/lib/platform/browser/index.js","../node_modules/axios/lib/platform/common/utils.js","../node_modules/axios/lib/platform/index.js","../node_modules/axios/lib/helpers/toURLEncodedForm.js","../node_modules/axios/lib/helpers/formDataToJSON.js","../node_modules/axios/lib/defaults/index.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/core/AxiosHeaders.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/cancel/CanceledError.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/parseProtocol.js","../node_modules/axios/lib/helpers/speedometer.js","../node_modules/axios/lib/helpers/throttle.js","../node_modules/axios/lib/helpers/progressEventReducer.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/helpers/resolveConfig.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/helpers/composeSignals.js","../node_modules/axios/lib/helpers/trackStream.js","../node_modules/axios/lib/adapters/fetch.js","../node_modules/axios/lib/adapters/adapters.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/env/data.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/axios/lib/helpers/HttpStatusCode.js","../node_modules/axios/lib/axios.js","../node_modules/axios/index.js","../src/errors/NlicError.ts","../src/entities/ProductDiscount.ts","../src/converters/itemToProduct.ts","../src/entities/ProductModule.ts","../src/converters/itemToProductModule.ts","../src/entities/Token.ts","../src/converters/itemToToken.ts","../src/entities/LicenseTransactionJoin.ts","../src/entities/Transaction.ts","../src/converters/itemToTransaction.ts","../src/services/Service/instance.ts","../package.json","../src/services/Service/toQueryString.ts","../src/services/Service/request.ts","../src/services/Service/methods.ts","../src/services/Service/index.ts","../src/utils/filter.ts","../src/utils/validation.ts","../src/vo/Page.ts","../src/services/BundleService.ts","../src/vo/ValidationResults.ts","../src/services/LicenseeService.ts","../src/services/LicenseService.ts","../src/services/LicenseTemplateService.ts","../src/services/NotificationService.ts","../src/services/PaymentMethodService.ts","../src/services/ProductModuleService.ts","../src/services/ProductService.ts","../src/services/TokenService.ts","../src/services/TransactionService.ts","../src/services/UtilityService.ts","../src/vo/Context.ts","../src/vo/ValidationParameters.ts"],"sourcesContent":["// constants\r\nimport Constants from '@/constants';\r\nimport ApiKeyRole from '@/constants/ApiKeyRole';\r\nimport LicenseeSecretMode from '@/constants/LicenseeSecretMode';\r\nimport LicenseType from '@/constants/LicenseType';\r\nimport LicensingModel from '@/constants/LicensingModel';\r\nimport NodeSecretMode from '@/constants/NodeSecretMode';\r\nimport NotificationEvent from '@/constants/NotificationEvent';\r\nimport NotificationProtocol from '@/constants/NotificationProtocol';\r\nimport PaymentMethodEnum from '@/constants/PaymentMethodEnum';\r\nimport SecurityMode from '@/constants/SecurityMode';\r\nimport TimeVolumePeriod from '@/constants/TimeVolumePeriod';\r\nimport TokenType from '@/constants/TokenType';\r\nimport TransactionSource from '@/constants/TransactionSource';\r\nimport TransactionStatus from '@/constants/TransactionStatus';\r\n\r\n// converters\r\nimport itemToBundle from '@/converters/itemToBundle';\r\nimport itemToCountry from '@/converters/itemToCountry';\r\nimport itemToLicense from '@/converters/itemToLicense';\r\nimport itemToLicensee from '@/converters/itemToLicensee';\r\nimport itemToLicenseTemplate from '@/converters/itemToLicenseTemplate';\r\nimport itemToNotification from '@/converters/itemToNotification';\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport itemToPaymentMethod from '@/converters/itemToPaymentMethod';\r\nimport itemToProduct from '@/converters/itemToProduct';\r\nimport itemToProductModule from '@/converters/itemToProductModule';\r\nimport itemToToken from '@/converters/itemToToken';\r\nimport itemToTransaction from '@/converters/itemToTransaction';\r\n\r\n// entities\r\nimport Bundle from '@/entities/Bundle';\r\nimport Country from '@/entities/Country';\r\nimport defineEntity from '@/entities/defineEntity';\r\nimport License from '@/entities/License';\r\nimport Licensee from '@/entities/Licensee';\r\nimport LicenseTemplate from '@/entities/LicenseTemplate';\r\nimport LicenseTransactionJoin from '@/entities/LicenseTransactionJoin';\r\nimport Notification from '@/entities/Notification';\r\nimport PaymentMethod from '@/entities/PaymentMethod';\r\nimport Product from '@/entities/Product';\r\nimport ProductDiscount from '@/entities/ProductDiscount';\r\nimport ProductModule from '@/entities/ProductModule';\r\nimport Token from '@/entities/Token';\r\nimport Transaction from '@/entities/Transaction';\r\n\r\n// errors\r\nimport NlicError from '@/errors/NlicError';\r\n\r\n// services\r\nimport BundleService from '@/services/BundleService';\r\nimport LicenseeService from '@/services/LicenseeService';\r\nimport LicenseService from '@/services/LicenseService';\r\nimport LicenseTemplateService from '@/services/LicenseTemplateService';\r\nimport NotificationService from '@/services/NotificationService';\r\nimport PaymentMethodService from '@/services/PaymentMethodService';\r\nimport ProductModuleService from '@/services/ProductModuleService';\r\nimport ProductService from '@/services/ProductService';\r\nimport Service from '@/services/Service';\r\nimport TokenService from '@/services/TokenService';\r\nimport TransactionService from '@/services/TransactionService';\r\nimport UtilityService from '@/services/UtilityService';\r\n\r\n// utils\r\nimport { encode as filterEncode, decode as filterDecode } from '@/utils/filter';\r\nimport serialize from '@/utils/serialize';\r\nimport { isValid, isDefined, ensureNotNull, ensureNotEmpty } from '@/utils/validation';\r\n\r\n// value object\r\nimport Context from '@/vo/Context';\r\nimport Page from '@/vo/Page';\r\nimport ValidationParameters from '@/vo/ValidationParameters';\r\nimport ValidationResults from '@/vo/ValidationResults';\r\n\r\n// types\r\nexport type * from '@/types';\r\n\r\nexport {\r\n // constants\r\n Constants,\r\n ApiKeyRole,\r\n LicenseeSecretMode,\r\n LicenseType,\r\n LicensingModel,\r\n NodeSecretMode,\r\n NotificationEvent,\r\n NotificationProtocol,\r\n PaymentMethodEnum,\r\n SecurityMode,\r\n TimeVolumePeriod,\r\n TokenType,\r\n TransactionSource,\r\n TransactionStatus,\r\n\r\n // converters\r\n itemToBundle,\r\n itemToCountry,\r\n itemToLicense,\r\n itemToLicensee,\r\n itemToLicenseTemplate,\r\n itemToNotification,\r\n itemToObject,\r\n itemToPaymentMethod,\r\n itemToProduct,\r\n itemToProductModule,\r\n itemToToken,\r\n itemToTransaction,\r\n\r\n // entities\r\n Bundle,\r\n Country,\r\n defineEntity,\r\n License,\r\n Licensee,\r\n LicenseTemplate,\r\n LicenseTransactionJoin,\r\n Notification,\r\n PaymentMethod,\r\n Product,\r\n ProductDiscount,\r\n ProductModule,\r\n Token,\r\n Transaction,\r\n\r\n // errors\r\n NlicError,\r\n\r\n // services\r\n BundleService,\r\n LicenseeService,\r\n LicenseService,\r\n LicenseTemplateService,\r\n NotificationService,\r\n PaymentMethodService,\r\n ProductModuleService,\r\n ProductService,\r\n Service,\r\n TokenService,\r\n TransactionService,\r\n UtilityService,\r\n\r\n // utils\r\n filterEncode,\r\n filterDecode,\r\n serialize,\r\n isValid,\r\n isDefined,\r\n ensureNotNull,\r\n ensureNotEmpty,\r\n\r\n // vo\r\n Context,\r\n Page,\r\n ValidationParameters,\r\n ValidationResults,\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst LicenseeSecretMode = Object.freeze({\r\n // @deprecated\r\n DISABLED: 'DISABLED',\r\n PREDEFINED: 'PREDEFINED',\r\n CLIENT: 'CLIENT',\r\n});\r\n\r\nexport default LicenseeSecretMode;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst LicenseType = Object.freeze({\r\n FEATURE: 'FEATURE',\r\n TIMEVOLUME: 'TIMEVOLUME',\r\n FLOATING: 'FLOATING',\r\n QUANTITY: 'QUANTITY',\r\n});\r\n\r\nexport default LicenseType;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst NotificationEvent = Object.freeze({\r\n LICENSEE_CREATED: 'LICENSEE_CREATED',\r\n LICENSE_CREATED: 'LICENSE_CREATED',\r\n WARNING_LEVEL_CHANGED: 'WARNING_LEVEL_CHANGED',\r\n PAYMENT_TRANSACTION_PROCESSED: 'PAYMENT_TRANSACTION_PROCESSED',\r\n});\r\n\r\nexport default NotificationEvent;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst NotificationProtocol = Object.freeze({\r\n WEBHOOK: 'WEBHOOK',\r\n});\r\n\r\nexport default NotificationProtocol;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst SecurityMode = Object.freeze({\r\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\r\n APIKEY_IDENTIFICATION: 'APIKEY',\r\n ANONYMOUS_IDENTIFICATION: 'ANONYMOUS',\r\n});\r\n\r\nexport default SecurityMode;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TimeVolumePeriod = Object.freeze({\r\n DAY: 'DAY',\r\n WEEK: 'WEEK',\r\n MONTH: 'MONTH',\r\n YEAR: 'YEAR',\r\n});\r\n\r\nexport default TimeVolumePeriod;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TokenType = Object.freeze({\r\n DEFAULT: 'DEFAULT',\r\n SHOP: 'SHOP',\r\n APIKEY: 'APIKEY',\r\n ACTION: 'ACTION',\r\n});\r\n\r\nexport default TokenType;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TransactionSource = Object.freeze({\r\n SHOP: 'SHOP',\r\n\r\n AUTO_LICENSE_CREATE: 'AUTO_LICENSE_CREATE',\r\n AUTO_LICENSE_UPDATE: 'AUTO_LICENSE_UPDATE',\r\n AUTO_LICENSE_DELETE: 'AUTO_LICENSE_DELETE',\r\n\r\n AUTO_LICENSEE_CREATE: 'AUTO_LICENSEE_CREATE',\r\n AUTO_LICENSEE_DELETE: 'AUTO_LICENSEE_DELETE',\r\n AUTO_LICENSEE_VALIDATE: 'AUTO_LICENSEE_VALIDATE',\r\n\r\n AUTO_LICENSETEMPLATE_DELETE: 'AUTO_LICENSETEMPLATE_DELETE',\r\n\r\n AUTO_PRODUCTMODULE_DELETE: 'AUTO_PRODUCTMODULE_DELETE',\r\n\r\n AUTO_PRODUCT_DELETE: 'AUTO_PRODUCT_DELETE',\r\n\r\n AUTO_LICENSES_TRANSFER: 'AUTO_LICENSES_TRANSFER',\r\n\r\n SUBSCRIPTION_UPDATE: 'SUBSCRIPTION_UPDATE',\r\n\r\n RECURRING_PAYMENT: 'RECURRING_PAYMENT',\r\n\r\n CANCEL_RECURRING_PAYMENT: 'CANCEL_RECURRING_PAYMENT',\r\n\r\n OBTAIN_BUNDLE: 'OBTAIN_BUNDLE',\r\n});\r\n\r\nexport default TransactionSource;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TransactionStatus = Object.freeze({\r\n PENDING: 'PENDING',\r\n CLOSED: 'CLOSED',\r\n CANCELLED: 'CANCELLED',\r\n});\r\n\r\nexport default TransactionStatus;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport LicenseeSecretMode from '@/constants/LicenseeSecretMode';\r\nimport LicenseType from '@/constants/LicenseType';\r\nimport NotificationEvent from '@/constants/NotificationEvent';\r\nimport NotificationProtocol from '@/constants/NotificationProtocol';\r\nimport SecurityMode from '@/constants/SecurityMode';\r\nimport TimeVolumePeriod from '@/constants/TimeVolumePeriod';\r\nimport TokenType from '@/constants/TokenType';\r\nimport TransactionSource from '@/constants/TransactionSource';\r\nimport TransactionStatus from '@/constants/TransactionStatus';\r\n\r\nexport default {\r\n LicenseeSecretMode,\r\n LicenseType,\r\n NotificationEvent,\r\n NotificationProtocol,\r\n SecurityMode,\r\n TimeVolumePeriod,\r\n TokenType,\r\n TransactionSource,\r\n TransactionStatus,\r\n\r\n // @deprecated use SecurityMode.BASIC_AUTHENTICATION instead\r\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\r\n\r\n // @deprecated use SecurityMode.APIKEY_IDENTIFICATION instead\r\n APIKEY_IDENTIFICATION: 'APIKEY',\r\n\r\n // @deprecated use SecurityMode.ANONYMOUS_IDENTIFICATION instead\r\n ANONYMOUS_IDENTIFICATION: 'ANONYMOUS',\r\n\r\n FILTER: 'filter',\r\n\r\n Product: {\r\n TYPE: 'Product',\r\n ENDPOINT_PATH: 'product',\r\n },\r\n\r\n ProductModule: {\r\n TYPE: 'ProductModule',\r\n ENDPOINT_PATH: 'productmodule',\r\n PRODUCT_MODULE_NUMBER: 'productModuleNumber',\r\n },\r\n\r\n Licensee: {\r\n TYPE: 'Licensee',\r\n ENDPOINT_PATH: 'licensee',\r\n ENDPOINT_PATH_VALIDATE: 'validate',\r\n ENDPOINT_PATH_TRANSFER: 'transfer',\r\n LICENSEE_NUMBER: 'licenseeNumber',\r\n },\r\n\r\n LicenseTemplate: {\r\n TYPE: 'LicenseTemplate',\r\n ENDPOINT_PATH: 'licensetemplate',\r\n\r\n // @deprecated use LicenseType directly instead\r\n LicenseType,\r\n },\r\n\r\n License: {\r\n TYPE: 'License',\r\n ENDPOINT_PATH: 'license',\r\n },\r\n\r\n Validation: {\r\n TYPE: 'ProductModuleValidation',\r\n },\r\n\r\n Token: {\r\n TYPE: 'Token',\r\n ENDPOINT_PATH: 'token',\r\n\r\n // @deprecated use TokenType directly instead\r\n Type: TokenType,\r\n },\r\n\r\n PaymentMethod: {\r\n TYPE: 'PaymentMethod',\r\n ENDPOINT_PATH: 'paymentmethod',\r\n },\r\n\r\n Bundle: {\r\n TYPE: 'Bundle',\r\n ENDPOINT_PATH: 'bundle',\r\n ENDPOINT_OBTAIN_PATH: 'obtain',\r\n },\r\n\r\n Notification: {\r\n TYPE: 'Notification',\r\n ENDPOINT_PATH: 'notification',\r\n\r\n // @deprecated use NotificationProtocol directly instead\r\n Protocol: NotificationProtocol,\r\n\r\n // @deprecated use NotificationEvent directly instead\r\n Event: NotificationEvent,\r\n },\r\n\r\n Transaction: {\r\n TYPE: 'Transaction',\r\n ENDPOINT_PATH: 'transaction',\r\n\r\n // @deprecated use TransactionStatus directly instead\r\n Status: TransactionStatus,\r\n },\r\n\r\n Utility: {\r\n ENDPOINT_PATH: 'utility',\r\n ENDPOINT_PATH_LICENSE_TYPES: 'licenseTypes',\r\n ENDPOINT_PATH_LICENSING_MODELS: 'licensingModels',\r\n ENDPOINT_PATH_COUNTRIES: 'countries',\r\n LICENSING_MODEL_TYPE: 'LicensingModelProperties',\r\n LICENSE_TYPE: 'LicenseType',\r\n COUNTRY_TYPE: 'Country',\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst ApiKeyRole = Object.freeze({\r\n ROLE_APIKEY_LICENSEE: 'ROLE_APIKEY_LICENSEE',\r\n ROLE_APIKEY_ANALYTICS: 'ROLE_APIKEY_ANALYTICS',\r\n ROLE_APIKEY_OPERATION: 'ROLE_APIKEY_OPERATION',\r\n ROLE_APIKEY_MAINTENANCE: 'ROLE_APIKEY_MAINTENANCE',\r\n ROLE_APIKEY_ADMIN: 'ROLE_APIKEY_ADMIN',\r\n});\r\n\r\nexport default ApiKeyRole;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst LicensingModel = Object.freeze({\r\n TRY_AND_BUY: 'TryAndBuy',\r\n SUBSCRIPTION: 'Subscription',\r\n RENTAL: 'Rental',\r\n FLOATING: 'Floating',\r\n MULTI_FEATURE: 'MultiFeature',\r\n PAY_PER_USE: 'PayPerUse',\r\n PRICING_TABLE: 'PricingTable',\r\n QUOTA: 'Quota',\r\n NODE_LOCKED: 'NodeLocked',\r\n DISCOUNT: 'Discount',\r\n});\r\n\r\nexport default LicensingModel;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst NodeSecretMode = Object.freeze({\r\n PREDEFINED: 'PREDEFINED',\r\n CLIENT: 'CLIENT',\r\n});\r\n\r\nexport default NodeSecretMode;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst PaymentMethodEnum = Object.freeze({\r\n NULL: 'NULL',\r\n PAYPAL: 'PAYPAL',\r\n PAYPAL_SANDBOX: 'PAYPAL_SANDBOX',\r\n STRIPE: 'STRIPE',\r\n STRIPE_TESTING: 'STRIPE_TESTING',\r\n});\r\n\r\nexport default PaymentMethodEnum;\r\n","import { Item, List } from '@/types/api/response';\r\n\r\nconst cast = (value: string): unknown => {\r\n try {\r\n return JSON.parse(value);\r\n } catch (e) {\r\n return value;\r\n }\r\n};\r\n\r\nconst extractProperties = (properties?: { name: string; value: string }[]) => {\r\n const result: Record = {};\r\n properties?.forEach(({ name, value }) => {\r\n result[name] = cast(value);\r\n });\r\n return result;\r\n};\r\n\r\nconst extractLists = (lists?: List[]) => {\r\n const result: Record = {};\r\n\r\n lists?.forEach((list) => {\r\n const { name } = list;\r\n result[name] = result[name] || [];\r\n result[name].push(itemToObject(list));\r\n });\r\n return result;\r\n};\r\n\r\nconst itemToObject = >(item?: Item | List): T => {\r\n return item ? ({ ...extractProperties(item.property), ...extractLists(item.list) } as T) : ({} as T);\r\n};\r\n\r\nexport default itemToObject;\r\n","export const has = (obj: T, key: K): boolean => {\r\n return Object.hasOwn(obj, key);\r\n};\r\n\r\nexport const set = (obj: T, key: K, value: T[K]): void => {\r\n obj[key] = value;\r\n};\r\n\r\nexport const get = (obj: T, key: K, def?: D): T[K] | D => {\r\n return has(obj, key) ? obj[key] : (def as D);\r\n};\r\n\r\nexport default {\r\n has,\r\n set,\r\n get,\r\n};\r\n","/**\r\n * Converts an object into a map of type Record, where the value of each object property is converted\r\n * to a string.\r\n * If the property's value is `undefined`, it will be replaced with an empty string.\r\n * If the value is already a string, it will remain unchanged.\r\n * If the value is Date instance, it wll be replaced with an ISO format date string.\r\n * For complex types (objects, arrays, etc.), the value will be serialized into a JSON string.\r\n * If serialization fails, the value will be converted to a string using `String()`.\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n *\r\n * @param obj - The object to be converted into a map.\r\n * @param options\r\n * @returns A map (Record) with converted property values from the object.\r\n */\r\nexport default (obj: T, options: { ignore?: string[] } = {}): Record => {\r\n const map: Record = {};\r\n\r\n const { ignore = [] } = options;\r\n\r\n Object.entries(obj).forEach(([k, v]) => {\r\n // ignore keys\r\n if (ignore.includes(k)) {\r\n return;\r\n }\r\n\r\n if (typeof v === 'function') {\r\n // ignore functions\r\n return;\r\n } else if (v === undefined) {\r\n map[k] = ''; // if the value is `undefined`, replace it with an empty string\r\n } else if (typeof v === 'string') {\r\n map[k] = v; // If the value is already a string, leave it unchanged\r\n } else if (v instanceof Date) {\r\n // if the value is Date, convert it to ISO string\r\n map[k] = v.toISOString();\r\n } else if (typeof v !== 'object' || v === null) {\r\n // If it's not an object (or is null), convert it to string\r\n map[k] = String(v);\r\n } else {\r\n // Try to serialize the object or array into JSON\r\n try {\r\n map[k] = JSON.stringify(v);\r\n } catch {\r\n map[k] = String(v);\r\n }\r\n }\r\n });\r\n\r\n return map;\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport type {\r\n Entity,\r\n EntityMethods,\r\n Proto,\r\n PropGetEventListener,\r\n PropSetEventListener,\r\n} from '@/types/entities/defineEntity';\r\n\r\n// utils\r\nimport { set, has, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\nconst defineEntity = function

(\r\n props: T,\r\n methods: M,\r\n proto: P = {} as P,\r\n options?: { set?: PropSetEventListener; get?: PropGetEventListener },\r\n) {\r\n const listeners: { set: PropSetEventListener[]; get: PropGetEventListener[] } = {\r\n set: [],\r\n get: [],\r\n };\r\n\r\n if (options?.get) {\r\n listeners.get.push(options.get);\r\n }\r\n\r\n if (options?.set) {\r\n listeners.set.push(options.set);\r\n }\r\n\r\n const base: EntityMethods = {\r\n set(this: void, key, value): void {\r\n set(props, key, value);\r\n },\r\n\r\n get(this: void, key, def) {\r\n return get(props, key, def);\r\n },\r\n\r\n has(this: void, key) {\r\n return has(props, key);\r\n },\r\n\r\n // Aliases\r\n setProperty(key, value) {\r\n this.set(key, value);\r\n },\r\n\r\n addProperty(key, value) {\r\n this.set(key, value);\r\n },\r\n\r\n getProperty(key, def) {\r\n return this.get(key, def);\r\n },\r\n\r\n hasProperty(key) {\r\n return this.has(key);\r\n },\r\n\r\n setProperties(properties) {\r\n Object.entries(properties).forEach(([k, v]) => {\r\n this.set(k as keyof T, v as T[keyof T]);\r\n });\r\n },\r\n\r\n serialize(this: void) {\r\n return serialize(props);\r\n },\r\n };\r\n\r\n return new Proxy(props, {\r\n get(obj: T, prop: string | symbol, receiver) {\r\n if (Object.hasOwn(methods, prop)) {\r\n return methods[prop as keyof typeof methods];\r\n }\r\n\r\n if (Object.hasOwn(base, prop)) {\r\n return base[prop as keyof typeof base];\r\n }\r\n\r\n listeners.get.forEach((l) => {\r\n l(obj, prop, receiver);\r\n });\r\n\r\n return Reflect.get(obj, prop, receiver);\r\n },\r\n\r\n set(obj, prop, value, receiver) {\r\n listeners.set.forEach((l) => {\r\n l(obj, prop, value, receiver);\r\n });\r\n\r\n return Reflect.set(obj, prop, value, receiver);\r\n },\r\n\r\n getPrototypeOf() {\r\n return proto.prototype || null;\r\n },\r\n }) as Entity;\r\n};\r\n\r\nexport default defineEntity;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\n// types\r\nimport type { BundleProps, BundleMethods, BundleEntity } from '@/types/entities/Bundle';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n// entity factory\r\nimport defineEntity from './defineEntity';\r\n\r\n/**\r\n * NetLicensing Bundle entity.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number that identifies the bundle. Vendor can assign this number when creating a bundle or\r\n * let NetLicensing generate one.\r\n * @property string number\r\n *\r\n * If set to false, the bundle is disabled.\r\n * @property boolean active\r\n *\r\n * Bundle name.\r\n * @property string name\r\n *\r\n * Price for the bundle. If >0, it must always be accompanied by the currency specification.\r\n * @property number price\r\n *\r\n * Specifies currency for the bundle price. Check data types to discover which currencies are\r\n * supported.\r\n * @property string currency\r\n *\r\n * The bundle includes a set of templates, each identified by a unique template number.\r\n * @property string[] licenseTemplateNumbers\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each bundle. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted.\r\n */\r\nconst Bundle = function (properties: BundleProps = {} as BundleProps): BundleEntity {\r\n const props: BundleProps = { ...properties };\r\n\r\n const methods: BundleMethods = {\r\n setActive(this: void, active: boolean) {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string) {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setPrice(this: void, price: number): void {\r\n set(props, 'price', price);\r\n },\r\n\r\n getPrice(this: void, def?: D): number | D {\r\n return get(props, 'price', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setLicenseTemplateNumbers(this: void, numbers: string[]): void {\r\n set(props, 'licenseTemplateNumbers', numbers);\r\n },\r\n\r\n addLicenseTemplateNumber(this: void, number: string): void {\r\n if (!props.licenseTemplateNumbers) {\r\n props.licenseTemplateNumbers = [];\r\n }\r\n\r\n props.licenseTemplateNumbers.push(number);\r\n },\r\n\r\n getLicenseTemplateNumbers(this: void, def?: D): string[] | D {\r\n return get(props, 'licenseTemplateNumbers', def) as string[] | D;\r\n },\r\n\r\n removeLicenseTemplateNumber(this: void, number: string): void {\r\n const { licenseTemplateNumbers: numbers = [] } = props;\r\n\r\n numbers.splice(numbers.indexOf(number), 1);\r\n props.licenseTemplateNumbers = numbers;\r\n },\r\n\r\n serialize(this: void): Record {\r\n if (props.licenseTemplateNumbers) {\r\n const licenseTemplateNumbers = props.licenseTemplateNumbers.join(',');\r\n return serialize({ ...props, licenseTemplateNumbers });\r\n }\r\n\r\n return serialize(props);\r\n },\r\n };\r\n\r\n return defineEntity(props as BundleProps, methods, Bundle);\r\n};\r\n\r\nexport default Bundle;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Bundle from '@/entities/Bundle';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { BundleProps } from '@/types/entities/Bundle';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { licenseTemplateNumbers } = props;\r\n\r\n if (licenseTemplateNumbers && typeof licenseTemplateNumbers === 'string') {\r\n props.licenseTemplateNumbers = licenseTemplateNumbers.split(',');\r\n }\r\n\r\n return Bundle(props as BundleProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport type { CountryProps, CountryMethods, CountryEntity } from '@/types/entities/Country';\r\n\r\n// entity factory\r\nimport defineEntity from './defineEntity';\r\n\r\n/**\r\n * Country entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * @property code - Unique code of country.\r\n * @property name - Unique name of country\r\n * @property vatPercent - Country vat.\r\n * @property isEu - is country in EU.\r\n */\r\nconst Country = function (properties: CountryProps = {} as CountryProps): CountryEntity {\r\n const defaults: CountryProps = {\r\n code: '',\r\n name: '',\r\n vatPercent: 0,\r\n isEu: false,\r\n };\r\n\r\n const props: CountryProps = { ...defaults, ...properties };\r\n\r\n const methods: CountryMethods = {\r\n getCode(this: void): string {\r\n return props.code;\r\n },\r\n\r\n getName(this: void): string {\r\n return props.name;\r\n },\r\n\r\n getVatPercent(this: void): number {\r\n return props.vatPercent as number;\r\n },\r\n\r\n getIsEu(this: void): boolean {\r\n return props.isEu;\r\n },\r\n };\r\n\r\n return defineEntity(props, methods, Country);\r\n};\r\n\r\nexport default Country;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// entities\r\nimport Country from '@/entities/Country';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { CountryProps } from '@/types/entities/Country';\r\n\r\nexport default (item?: Item) => Country(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport { TimeVolumePeriodValues } from '@/types/constants/TimeVolumePeriod';\r\nimport { LicenseMethods, LicenseProps, LicenseEntity } from '@/types/entities/License';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n// entity factory\r\nimport defineEntity from './defineEntity';\r\n\r\n/**\r\n * License entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can\r\n * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation\r\n * transaction status is set to closed.\r\n * @property string number\r\n *\r\n * Name for the licensed item. Set from license template on creation, if not specified explicitly.\r\n * @property string name\r\n *\r\n * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled,\r\n * the license is excluded from the validation process.\r\n * @property boolean active\r\n *\r\n * price for the license. If >0, it must always be accompanied by the currency specification. Read-only,\r\n * set from license template on creation.\r\n * @property number price\r\n *\r\n * specifies currency for the license price. Check data types to discover which currencies are\r\n * supported. Read-only, set from license template on creation.\r\n * @property string currency\r\n *\r\n * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license\r\n * template on creation, if not specified explicitly.\r\n * @property boolean hidden\r\n *\r\n * The unique identifier assigned to the licensee (the entity to whom the license is issued). This number is typically\r\n * associated with a specific customer or organization. It is used internally to reference the licensee and cannot be\r\n * changed after the license is created.\r\n * @property string licenseeNumber\r\n *\r\n * The unique identifier for the license template from which this license was created.\r\n * @property string licenseTemplateNumber\r\n *\r\n * A boolean flag indicating whether the license is actively being used. If true, it means the license is currently in\r\n * use. If false, the license is not currently assigned or in use.\r\n * @property boolean inUse\r\n *\r\n * This parameter is specific to TimeVolume licenses and indicates the total volume of time (e.g., in hours, days, etc.)\r\n * associated with the license. This value defines the amount of time the license covers, which may affect the usage\r\n * period and limits associated with the license.\r\n * @property number timeVolume\r\n *\r\n * Also, specific to TimeVolume licenses, this field defines the period of time for the timeVolume\r\n * (e.g., \"DAY\", \"WEEK\", \"MONTH\", \"YEAR\"). It provides the time unit for the timeVolume value, clarifying whether the\r\n * time is measured in days, weeks, or any other defined period.\r\n * @property string timeVolumePeriod\r\n *\r\n * For TimeVolume licenses, this field indicates the start date of the license’s validity period. This date marks when\r\n * the license becomes active and the associated time volume starts being consumed.\r\n * It can be represented as a string \"now\" or a Date object.\r\n * @property string|Date Date startDate\r\n *\r\n * Parent(Feature) license number\r\n * @property string parentfeature\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each license. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber,\r\n * licenseTemplateNumber.\r\n */\r\nconst License = function (properties: LicenseProps = {} as LicenseProps): LicenseEntity {\r\n const props: LicenseProps = { ...(properties as T) };\r\n\r\n const methods: LicenseMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setPrice(this: void, price: number): void {\r\n set(props, 'price', price);\r\n },\r\n\r\n getPrice(this: void, def?: D): number | D {\r\n return get(props, 'price', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setHidden(this: void, hidden: boolean): void {\r\n set(props, 'hidden', hidden);\r\n },\r\n\r\n getHidden(this: void, def?: D): boolean | D {\r\n return get(props, 'hidden', def) as boolean | D;\r\n },\r\n\r\n setLicenseeNumber(this: void, number: string): void {\r\n set(props, 'licenseeNumber', number);\r\n },\r\n\r\n getLicenseeNumber(this: void, def?: D): string | D {\r\n return get(props, 'licenseeNumber', def) as string | D;\r\n },\r\n\r\n setLicenseTemplateNumber(this: void, number: string): void {\r\n set(props, 'licenseTemplateNumber', number);\r\n },\r\n\r\n getLicenseTemplateNumber(this: void, def?: D): string | D {\r\n return get(props, 'licenseTemplateNumber', def) as string | D;\r\n },\r\n\r\n // TimeVolume\r\n setTimeVolume(this: void, timeVolume: number): void {\r\n set(props, 'timeVolume', timeVolume);\r\n },\r\n\r\n getTimeVolume(this: void, def?: D): number | D {\r\n return get(props, 'timeVolume', def) as number | D;\r\n },\r\n\r\n setTimeVolumePeriod(this: void, timeVolumePeriod: TimeVolumePeriodValues): void {\r\n set(props, 'timeVolumePeriod', timeVolumePeriod);\r\n },\r\n\r\n getTimeVolumePeriod(this: void, def?: D): TimeVolumePeriodValues | D {\r\n return get(props, 'timeVolumePeriod', def) as TimeVolumePeriodValues | D;\r\n },\r\n\r\n setStartDate(this: void, startDate: Date | 'now'): void {\r\n set(props, 'startDate', startDate);\r\n },\r\n\r\n getStartDate(this: void, def?: D): Date | 'now' | D {\r\n return get(props, 'startDate', def) as Date | 'now' | D;\r\n },\r\n\r\n // Rental\r\n setParentfeature(this: void, parentfeature?: string): void {\r\n set(props, 'parentfeature', parentfeature);\r\n },\r\n\r\n getParentfeature(this: void, def?: D): string | D {\r\n return get(props, 'parentfeature', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as LicenseProps, methods, License);\r\n};\r\n\r\nexport default License;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport License from '@/entities/License';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { LicenseProps } from '@/types/entities/License';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { startDate } = props;\r\n\r\n if (startDate && typeof startDate === 'string') {\r\n props.startDate = startDate === 'now' ? startDate : new Date(startDate);\r\n }\r\n\r\n return License(props as LicenseProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { LicenseeMethods, LicenseeProps, LicenseeEntity } from '@/types/entities/Licensee';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * Licensee entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this\r\n * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for\r\n * the licensee.\r\n * @property string number\r\n *\r\n * Licensee name.\r\n * @property string name\r\n *\r\n * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is\r\n * disabled (tbd).\r\n * @property boolean active\r\n *\r\n * Licensee Secret for licensee deprecated use Node-Locked Licensing Model instead\r\n * @property string licenseeSecret\r\n *\r\n * Mark licensee for transfer.\r\n * @property boolean markedForTransfer\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber\r\n */\r\n\r\nconst Licensee = function (properties: LicenseeProps = {} as LicenseeProps): LicenseeEntity {\r\n const props: LicenseeProps = { ...properties };\r\n\r\n const methods: LicenseeMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setProductNumber(this: void, number: string): void {\r\n set(props, 'productNumber', number);\r\n },\r\n\r\n getProductNumber(this: void, def?: D): string | D {\r\n return get(props, 'productNumber', def) as string | D;\r\n },\r\n\r\n setMarkedForTransfer(this: void, mark: boolean): void {\r\n set(props, 'markedForTransfer', mark);\r\n },\r\n\r\n getMarkedForTransfer(this: void, def?: D): boolean | D {\r\n return get(props, 'markedForTransfer', def) as boolean | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as LicenseeProps, methods, Licensee);\r\n};\r\n\r\nexport default Licensee;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Licensee from '@/entities/Licensee';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { LicenseeProps } from '@/types/entities/Licensee';\r\n\r\nexport default (item?: Item) => Licensee(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { LicenseTypeValues } from '@/types/constants/LicenseType';\r\nimport { TimeVolumePeriodValues } from '@/types/constants/TimeVolumePeriod';\r\nimport { LicenseTemplateMethods, LicenseTemplateProps, LicenseTemplateEntity } from '@/types/entities/LicenseTemplate';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * License template entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the license template. Vendor can\r\n * assign this number when creating a license template or let NetLicensing generate one.\r\n * Read-only after creation of the first license from this license template.\r\n * @property string number\r\n *\r\n * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this\r\n * license template.\r\n * @property boolean active\r\n *\r\n * Name for the licensed item.\r\n * @property string name\r\n *\r\n * Type of licenses created from this license template. Supported types: \"FEATURE\", \"TIMEVOLUME\",\r\n * \"FLOATING\", \"QUANTITY\"\r\n * @property string licenseType\r\n *\r\n * Price for the license. If >0, it must always be accompanied by the currency specification.\r\n * @property number price\r\n *\r\n * Specifies currency for the license price. Check data types to discover which currencies are\r\n * supported.\r\n * @property string currency\r\n *\r\n * If set to true, every new licensee automatically gets one license out of this license template on\r\n * creation. Automatic licenses must have their price set to 0.\r\n * @property boolean automatic\r\n *\r\n * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase.\r\n * @property boolean hidden\r\n *\r\n * If set to true, licenses from this license template are not visible to the end customer, but\r\n * participate in validation.\r\n * @property boolean hideLicenses\r\n *\r\n * If set to true, this license template defines grace period of validity granted after subscription expiration.\r\n * @property boolean gracePeriod\r\n *\r\n * Mandatory for 'TIMEVOLUME' license type.\r\n * @property number timeVolume\r\n *\r\n * Time volume period for 'TIMEVOLUME' license type. Supported types: \"DAY\", \"WEEK\", \"MONTH\", \"YEAR\"\r\n * @property string timeVolumePeriod\r\n *\r\n * Mandatory for 'FLOATING' license type.\r\n * @property number maxSessions\r\n *\r\n * Mandatory for 'QUANTITY' license type.\r\n * @property number quantity\r\n */\r\n\r\nconst LicenseTemplate = function (\r\n properties: LicenseTemplateProps = {} as LicenseTemplateProps,\r\n): LicenseTemplateEntity {\r\n const props: LicenseTemplateProps = { ...properties };\r\n\r\n const methods: LicenseTemplateMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setLicenseType(this: void, type: LicenseTypeValues): void {\r\n set(props, 'licenseType', type);\r\n },\r\n\r\n getLicenseType(this: void, def?: D): LicenseTypeValues | D {\r\n return get(props, 'licenseType', def) as LicenseTypeValues | D;\r\n },\r\n\r\n setPrice(this: void, price: number): void {\r\n set(props, 'price', price);\r\n },\r\n\r\n getPrice(this: void, def?: D): number | D {\r\n return get(props, 'price', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setAutomatic(this: void, automatic: boolean): void {\r\n set(props, 'automatic', automatic);\r\n },\r\n\r\n getAutomatic(this: void, def?: D): boolean | D {\r\n return get(props, 'automatic', def) as boolean | D;\r\n },\r\n\r\n setHidden(this: void, hidden: boolean): void {\r\n set(props, 'hidden', hidden);\r\n },\r\n\r\n getHidden(this: void, def?: D): boolean | D {\r\n return get(props, 'hidden', def) as boolean | D;\r\n },\r\n\r\n setHideLicenses(this: void, hideLicenses: boolean): void {\r\n set(props, 'hideLicenses', hideLicenses);\r\n },\r\n\r\n getHideLicenses(this: void, def?: D): boolean | D {\r\n return get(props, 'hideLicenses', def) as boolean | D;\r\n },\r\n\r\n setGracePeriod(this: void, gradePeriod: boolean): void {\r\n set(props, 'gracePeriod', gradePeriod);\r\n },\r\n\r\n getGracePeriod(this: void, def?: D): boolean | D {\r\n return get(props, 'gracePeriod', def) as boolean | D;\r\n },\r\n\r\n setTimeVolume(this: void, timeVolume: number): void {\r\n set(props, 'timeVolume', timeVolume);\r\n },\r\n\r\n getTimeVolume(this: void, def?: D): number | D {\r\n return get(props, 'timeVolume', def) as number | D;\r\n },\r\n\r\n setTimeVolumePeriod(this: void, timeVolumePeriod: TimeVolumePeriodValues): void {\r\n set(props, 'timeVolumePeriod', timeVolumePeriod);\r\n },\r\n\r\n getTimeVolumePeriod(this: void, def?: D): TimeVolumePeriodValues | D {\r\n return get(props, 'timeVolumePeriod', def) as TimeVolumePeriodValues | D;\r\n },\r\n\r\n setMaxSessions(this: void, maxSessions: number): void {\r\n set(props, 'maxSessions', maxSessions);\r\n },\r\n\r\n getMaxSessions(this: void, def?: D): number | D {\r\n return get(props, 'maxSessions', def) as number | D;\r\n },\r\n\r\n setQuantity(this: void, quantity: number): void {\r\n set(props, 'quantity', quantity);\r\n },\r\n\r\n getQuantity(this: void, def?: D): number | D {\r\n return get(props, 'quantity', def) as number | D;\r\n },\r\n\r\n setProductModuleNumber(this: void, productModuleNumber: string): void {\r\n set(props, 'productModuleNumber', productModuleNumber);\r\n },\r\n\r\n getProductModuleNumber(this: void, def?: D): string | D {\r\n return get(props, 'productModuleNumber', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as LicenseTemplateProps, methods, LicenseTemplate);\r\n};\r\n\r\nexport default LicenseTemplate;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport LicenseTemplate from '@/entities/LicenseTemplate';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { LicenseTemplateProps } from '@/types/entities/LicenseTemplate';\r\n\r\nexport default (item?: Item) => LicenseTemplate(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\nimport { NotificationEventValues } from '@/types/constants/NotificationEvent';\r\nimport { NotificationProtocolValues } from '@/types/constants/NotificationProtocol';\r\n\r\n// types\r\nimport { NotificationMethods, NotificationProps, NotificationEntity } from '@/types/entities/Notification';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * NetLicensing Notification entity.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number that identifies the notification. Vendor can assign this number when creating a notification or\r\n * let NetLicensing generate one.\r\n * @property string number\r\n *\r\n * If set to false, the notification is disabled. The notification will not be fired when the event triggered.\r\n * @property boolean active\r\n *\r\n * Notification name.\r\n * @property string name\r\n *\r\n * Notification type. Indicate the method of transmitting notification, ex: EMAIL, WEBHOOK.\r\n * @property float type\r\n *\r\n * Comma separated string of events that fire the notification when emitted.\r\n * @property string events\r\n *\r\n * Notification response payload.\r\n * @property string payload\r\n *\r\n * Notification response url. Optional. Uses only for WEBHOOK type notification.\r\n * @property string url\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each notification.\r\n * The name of user property must not be equal to any of the fixed property names listed above and must be none of id,\r\n * deleted.\r\n */\r\n\r\nconst Notification = function (\r\n properties: NotificationProps = {} as NotificationProps,\r\n): NotificationEntity {\r\n const props: NotificationProps = { ...properties };\r\n\r\n const methods: NotificationMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setProtocol(this: void, protocol: NotificationProtocolValues): void {\r\n set(props, 'protocol', protocol);\r\n },\r\n\r\n getProtocol(this: void, def?: D): NotificationProtocolValues | D {\r\n return get(props, 'protocol', def) as NotificationProtocolValues | D;\r\n },\r\n\r\n setEvents(this: void, events: NotificationEventValues[]): void {\r\n set(props, 'events', events);\r\n },\r\n\r\n getEvents(this: void, def?: D): NotificationEventValues[] | D {\r\n return get(props, 'events', def) as NotificationEventValues[] | D;\r\n },\r\n\r\n addEvent(event: NotificationEventValues): void {\r\n const events = this.getEvents([]) as NotificationEventValues[];\r\n events.push(event);\r\n\r\n this.setEvents(events);\r\n },\r\n\r\n setPayload(this: void, payload: string): void {\r\n set(props, 'payload', payload);\r\n },\r\n\r\n getPayload(this: void, def?: D): string | D {\r\n return get(props, 'payload', def) as string | D;\r\n },\r\n\r\n setEndpoint(this: void, endpoint: string): void {\r\n set(props, 'endpoint', endpoint);\r\n },\r\n\r\n getEndpoint(this: void, def?: D): string | D {\r\n return get(props, 'endpoint', def) as string | D;\r\n },\r\n\r\n serialize(): Record {\r\n const data = serialize(props);\r\n\r\n if (data.events) {\r\n data.events = this.getEvents([]).join(',');\r\n }\r\n\r\n return data;\r\n },\r\n };\r\n\r\n return defineEntity(props as NotificationProps, methods, Notification);\r\n};\r\n\r\nexport default Notification;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Notification from '@/entities/Notification';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { NotificationProps } from '@/types/entities/Notification';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { events } = props;\r\n\r\n if (events && typeof events === 'string') {\r\n props.events = events.split(',');\r\n }\r\n\r\n return Notification(props as NotificationProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { PaymentMethodMethods, PaymentMethodProps, PaymentMethodEntity } from '@/types/entities/PaymentMethod';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\n\r\n/**\r\n * PaymentMethod entity used internally by NetLicensing.\r\n *\r\n * @property string number\r\n * @property boolean active\r\n * @property string paypal.subject\r\n */\r\nconst PaymentMethod = function (\r\n properties: PaymentMethodProps = {} as PaymentMethodProps,\r\n): PaymentMethodEntity {\r\n const props: PaymentMethodProps = { ...properties };\r\n\r\n const methods: PaymentMethodMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n };\r\n\r\n return defineEntity(props as PaymentMethodProps, methods, PaymentMethod);\r\n};\r\n\r\nexport default PaymentMethod;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport PaymentMethod from '@/entities/PaymentMethod';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { PaymentMethodProps } from '@/types/entities/PaymentMethod';\r\n\r\nexport default (item?: Item) => PaymentMethod(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { ProductProps, ProductEntity, ProductMethods } from '@/types/entities/Product';\r\nimport { ProductDiscountEntity } from '@/types/entities/ProductDiscount';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * NetLicensing Product entity.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number that identifies the product. Vendor can assign this number when creating a product or\r\n * let NetLicensing generate one. Read-only after creation of the first licensee for the product.\r\n * @property string number\r\n *\r\n * If set to false, the product is disabled. No new licensees can be registered for the product,\r\n * existing licensees can not obtain new licenses.\r\n * @property boolean active\r\n *\r\n * Product name. Together with the version identifies the product for the end customer.\r\n * @property string name\r\n *\r\n * Product version. Convenience parameter, additional to the product name.\r\n * @property string version\r\n *\r\n * If set to 'true', non-existing licensees will be created at first validation attempt.\r\n * @property boolean licenseeAutoCreate\r\n *\r\n * Licensee secret mode for product.Supported types: \"DISABLED\", \"PREDEFINED\", \"CLIENT\"\r\n * @property boolean licenseeSecretMode\r\n *\r\n * Product description. Optional.\r\n * @property string description\r\n *\r\n * Licensing information. Optional.\r\n * @property string licensingInfo\r\n *\r\n * @property boolean inUse\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each product. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted.\r\n */\r\nconst Product = function (\r\n properties: ProductProps = {} as ProductProps,\r\n): ProductEntity {\r\n const props: ProductProps = { ...properties };\r\n\r\n const methods: ProductMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setVersion(this: void, version: string): void {\r\n set(props, 'version', version);\r\n },\r\n\r\n getVersion(this: void, def?: D): string | number | D {\r\n return get(props, 'version', def) as string | number | D;\r\n },\r\n\r\n setDescription(this: void, description: string): void {\r\n set(props, 'description', description);\r\n },\r\n\r\n getDescription(this: void, def?: D): string | D {\r\n return get(props, 'description', def) as string | D;\r\n },\r\n\r\n setLicensingInfo(this: void, licensingInfo: string): void {\r\n set(props, 'licensingInfo', licensingInfo);\r\n },\r\n\r\n getLicensingInfo(this: void, def?: D): string | D {\r\n return get(props, 'licensingInfo', def) as string | D;\r\n },\r\n\r\n setLicenseeAutoCreate(this: void, licenseeAutoCreate: boolean): void {\r\n set(props, 'licenseeAutoCreate', licenseeAutoCreate);\r\n },\r\n\r\n getLicenseeAutoCreate(this: void, def?: D): boolean | D {\r\n return get(props, 'licenseeAutoCreate', def) as boolean | D;\r\n },\r\n\r\n setDiscounts(this: void, discounts: ProductDiscountEntity[]): void {\r\n set(props, 'discounts', discounts);\r\n },\r\n\r\n getDiscounts(this: void, def?: D): ProductDiscountEntity[] | D {\r\n return get(props, 'discounts', def) as ProductDiscountEntity[] | D;\r\n },\r\n\r\n addDiscount(discount: ProductDiscountEntity): void {\r\n const discounts = this.getDiscounts([] as ProductDiscountEntity[]);\r\n discounts.push(discount);\r\n\r\n this.setDiscounts(discounts);\r\n },\r\n\r\n removeDiscount(discount: ProductDiscountEntity): void {\r\n const discounts = this.getDiscounts();\r\n\r\n if (Array.isArray(discounts) && discounts.length > 0) {\r\n discounts.splice(discounts.indexOf(discount), 1);\r\n this.setDiscounts(discounts);\r\n }\r\n },\r\n\r\n setProductDiscounts(productDiscounts: ProductDiscountEntity[]): void {\r\n this.setDiscounts(productDiscounts);\r\n },\r\n\r\n getProductDiscounts(def?: D): ProductDiscountEntity[] | D {\r\n return this.getDiscounts(def);\r\n },\r\n\r\n serialize(): Record {\r\n const map: Record = serialize(props, { ignore: ['discounts', 'inUse'] });\r\n const discounts = this.getDiscounts();\r\n\r\n if (discounts) {\r\n map.discount = discounts.length > 0 ? discounts.map((discount) => discount.toString()) : '';\r\n }\r\n\r\n return map;\r\n },\r\n };\r\n\r\n return defineEntity(props as ProductProps, methods, Product);\r\n};\r\n\r\nexport default Product;\r\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\nconst {iterator, toStringTag} = Symbol;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n if (utils.isFunction(options)) {\n options = {\n serialize: options\n };\n } \n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isIterable(header)) {\n let obj = {}, dest, key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw TypeError('Object iterator must return a key-value pair');\n }\n\n obj[key = entry[0]] = (dest = obj[key]) ?\n (utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];\n }\n\n setHeaders(obj, valueOrRewrite)\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n getSetCookie() {\n return this.get(\"set-cookie\") || [];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n }\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs)\n }, threshold - passed);\n }\n }\n }\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n","import speedometer from \"./speedometer.js\";\nimport throttle from \"./throttle.js\";\nimport utils from \"../utils.js\";\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n}\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n}\n\nexport const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, prop , caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop , caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop , caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport isURLSameOrigin from \"./isURLSameOrigin.js\";\nimport cookies from \"./cookies.js\";\nimport buildFullPath from \"../core/buildFullPath.js\";\nimport mergeConfig from \"../core/mergeConfig.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\n","import utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {progressEventReducer} from '../helpers/progressEventReducer.js';\nimport resolveConfig from \"../helpers/resolveConfig.js\";\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n }\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n }, timeout)\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n }\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n}\n\nexport default composeSignals;\n","\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","export const VERSION = \"1.9.0\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(config, {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken')\n }, true);\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n","import { AxiosError, AxiosResponse, InternalAxiosRequestConfig } from 'axios';\r\n\r\nexport default class NlicError extends AxiosError {\r\n isNlicError = true;\r\n\r\n constructor(\r\n message?: string,\r\n code?: string,\r\n config?: InternalAxiosRequestConfig,\r\n request?: unknown,\r\n response?: AxiosResponse,\r\n stack?: string,\r\n ) {\r\n super(message, code, config, request, response);\r\n this.name = 'NlicError';\r\n\r\n if (stack) {\r\n this.stack = stack;\r\n }\r\n\r\n Object.setPrototypeOf(this, NlicError.prototype);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// errors\r\nimport NlicError from '@/errors/NlicError';\r\n\r\n// types\r\nimport { ProductDiscountMethods, ProductDiscountProps, ProductDiscountEntity } from '@/types/entities/ProductDiscount';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\n\r\nconst ProductDiscount = function (\r\n properties: ProductDiscountProps = {} as ProductDiscountProps,\r\n): ProductDiscountEntity {\r\n const props: ProductDiscountProps = { ...properties };\r\n\r\n if (props.amountFix && props.amountPercent) {\r\n throw new NlicError('Properties \"amountFix\" and \"amountPercent\" cannot be used at the same time');\r\n }\r\n\r\n const methods: ProductDiscountMethods = {\r\n setTotalPrice(this: void, totalPrice: number): void {\r\n set(props, 'totalPrice', totalPrice);\r\n },\r\n\r\n getTotalPrice(this: void, def?: D): number | D {\r\n return get(props, 'totalPrice', def) as number | D;\r\n },\r\n\r\n setCurrency(currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setAmountFix(this: void, amountFix: number): void {\r\n set(props, 'amountFix', amountFix);\r\n },\r\n\r\n getAmountFix(this: void, def?: D): number | D {\r\n return get(props, 'amountFix', def) as number | D;\r\n },\r\n\r\n setAmountPercent(this: void, amountPercent: number): void {\r\n set(props, 'amountPercent', amountPercent);\r\n },\r\n\r\n getAmountPercent(this: void, def?: D): number | D {\r\n return get(props, 'amountPercent', def) as number | D;\r\n },\r\n\r\n toString() {\r\n const total = this.getTotalPrice();\r\n const currency = this.getCurrency();\r\n const amount = this.getAmountPercent() ? `${this.getAmountPercent()}%` : this.getAmountFix();\r\n\r\n return total && currency && amount ? `${total};${currency};${amount}` : '';\r\n },\r\n };\r\n\r\n return defineEntity(props, methods, ProductDiscount, {\r\n set: (obj, prop) => {\r\n if (prop === 'amountFix') {\r\n delete obj.amountPercent;\r\n }\r\n\r\n if (prop === 'amountPercent') {\r\n delete obj.amountFix;\r\n }\r\n },\r\n });\r\n};\r\n\r\nexport default ProductDiscount;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Product from '@/entities/Product';\r\nimport ProductDiscount from '@/entities/ProductDiscount';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { ProductProps } from '@/types/entities/Product';\r\nimport { ProductDiscountEntity } from '@/types/entities/ProductDiscount';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const discounts: ProductDiscountEntity[] | undefined = props.discount as ProductDiscountEntity[] | undefined;\r\n delete props.discount;\r\n\r\n if (discounts) {\r\n props.discounts = discounts.map((d) => ProductDiscount(d));\r\n }\r\n\r\n return Product(props as ProductProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\nimport { LicensingModelValues } from '@/types/constants/LicensingModel';\r\n\r\n// types\r\nimport { ProductModuleEntity, ProductModuleMethods, ProductModuleProps } from '@/types/entities/ProductModule';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * Product module entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign\r\n * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first\r\n * licensee for the product.\r\n * @property string number\r\n *\r\n * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this\r\n * product module.\r\n * @property boolean active\r\n *\r\n * Product module name that is visible to the end customers in NetLicensing Shop.\r\n * @property string name\r\n *\r\n * Licensing model applied to this product module. Defines what license templates can be\r\n * configured for the product module and how licenses for this product module are processed during validation.\r\n * @property string licensingModel\r\n *\r\n * Maximum checkout validity (days). Mandatory for 'Floating' licensing model.\r\n * @property number maxCheckoutValidity\r\n *\r\n * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model.\r\n * @property number yellowThreshold\r\n *\r\n * Remaining time volume for red level. Mandatory for 'Rental' licensing model.\r\n * @property number redThreshold\r\n */\r\n\r\nconst ProductModule = function (\r\n properties: ProductModuleProps = {} as ProductModuleProps,\r\n): ProductModuleEntity {\r\n const props: ProductModuleProps = { ...properties };\r\n\r\n const methods: ProductModuleMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setLicensingModel(licensingModel: LicensingModelValues): void {\r\n set(props, 'licensingModel', licensingModel);\r\n },\r\n\r\n getLicensingModel(this: void, def?: D): LicensingModelValues | D {\r\n return get(props, 'licensingModel', def) as LicensingModelValues | D;\r\n },\r\n\r\n setMaxCheckoutValidity(this: void, maxCheckoutValidity: number): void {\r\n set(props, 'maxCheckoutValidity', maxCheckoutValidity);\r\n },\r\n\r\n getMaxCheckoutValidity(this: void, def?: D): number | D {\r\n return get(props, 'maxCheckoutValidity', def) as number | D;\r\n },\r\n\r\n setYellowThreshold(this: void, yellowThreshold: number): void {\r\n set(props, 'yellowThreshold', yellowThreshold);\r\n },\r\n\r\n getYellowThreshold(this: void, def?: D): number | D {\r\n return get(props, 'yellowThreshold', def) as number | D;\r\n },\r\n\r\n setRedThreshold(this: void, redThreshold: number): void {\r\n set(props, 'redThreshold', redThreshold);\r\n },\r\n\r\n getRedThreshold(this: void, def?: D): number | D {\r\n return get(props, 'redThreshold', def) as number | D;\r\n },\r\n\r\n setProductNumber(this: void, productNumber: string): void {\r\n set(props, 'productNumber', productNumber);\r\n },\r\n\r\n getProductNumber(this: void, def?: D): string | D {\r\n return get(props, 'productNumber', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as ProductModuleProps, methods, ProductModule);\r\n};\r\n\r\nexport default ProductModule;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport ProductModule from '@/entities/ProductModule';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { ProductModuleProps } from '@/types/entities/ProductModule';\r\n\r\nexport default (item?: Item) => ProductModule(itemToObject(item));\r\n","/**\r\n * Token\r\n *\r\n * @see https://netlicensing.io/wiki/token-services#create-token\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n *\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { ApiKeyRoleValues } from '@/types/constants/ApiKeyRole';\r\nimport { TokenTypeValues } from '@/types/constants/TokenType';\r\nimport { TokenProps, TokenEntity, TokenMethods } from '@/types/entities/Token';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\nconst Token = function (properties: TokenProps = {} as TokenProps): TokenEntity {\r\n const props: TokenProps = { ...properties };\r\n\r\n const methods: TokenMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setExpirationTime(this: void, expirationTime: Date): void {\r\n set(props, 'expirationTime', expirationTime);\r\n },\r\n\r\n getExpirationTime(this: void, def?: D): Date | D {\r\n return get(props, 'expirationTime', def) as Date | D;\r\n },\r\n\r\n setTokenType(this: void, tokenType: TokenTypeValues): void {\r\n set(props, 'tokenType', tokenType);\r\n },\r\n\r\n getTokenType(this: void, def?: D): TokenTypeValues | D {\r\n return get(props, 'tokenType', def) as TokenTypeValues | D;\r\n },\r\n\r\n setLicenseeNumber(this: void, licenseeNumber: string): void {\r\n set(props, 'licenseeNumber', licenseeNumber);\r\n },\r\n\r\n getLicenseeNumber(this: void, def?: D): string | D {\r\n return get(props, 'licenseeNumber', def) as string | D;\r\n },\r\n\r\n setAction(this: void, action: string): void {\r\n set(props, 'action', action);\r\n },\r\n\r\n getAction(this: void, def?: D): string | D {\r\n return get(props, 'action', def) as string | D;\r\n },\r\n\r\n setApiKeyRole(this: void, apiKeyRole: ApiKeyRoleValues): void {\r\n set(props, 'apiKeyRole', apiKeyRole);\r\n },\r\n\r\n getApiKeyRole(this: void, def?: D): ApiKeyRoleValues | D {\r\n return get(props, 'apiKeyRole', def) as ApiKeyRoleValues | D;\r\n },\r\n\r\n setBundleNumber(this: void, bundleNumber: string): void {\r\n set(props, 'bundleNumber', bundleNumber);\r\n },\r\n\r\n getBundleNumber(this: void, def?: D): string | D {\r\n return get(props, 'bundleNumber', def) as string | D;\r\n },\r\n\r\n setBundlePrice(this: void, bundlePrice: number): void {\r\n set(props, 'bundlePrice', bundlePrice);\r\n },\r\n\r\n getBundlePrice(this: void, def?: D): number | D {\r\n return get(props, 'bundlePrice', def) as number | D;\r\n },\r\n\r\n setProductNumber(this: void, productNumber: string): void {\r\n set(props, 'productNumber', productNumber);\r\n },\r\n\r\n getProductNumber(this: void, def?: D): string | D {\r\n return get(props, 'productNumber', def) as string | D;\r\n },\r\n\r\n setPredefinedShoppingItem(this: void, predefinedShoppingItem: string): void {\r\n set(props, 'predefinedShoppingItem', predefinedShoppingItem);\r\n },\r\n\r\n getPredefinedShoppingItem(this: void, def?: D): string | D {\r\n return get(props, 'predefinedShoppingItem', def) as string | D;\r\n },\r\n\r\n setSuccessURL(this: void, successURL: string): void {\r\n set(props, 'successURL', successURL);\r\n },\r\n\r\n getSuccessURL(this: void, def?: D): string | D {\r\n return get(props, 'successURL', def) as string | D;\r\n },\r\n\r\n setSuccessURLTitle(this: void, successURLTitle: string): void {\r\n set(props, 'successURLTitle', successURLTitle);\r\n },\r\n\r\n getSuccessURLTitle(this: void, def?: D): string | D {\r\n return get(props, 'successURLTitle', def) as string | D;\r\n },\r\n\r\n setCancelURL(this: void, cancelURL: string): void {\r\n set(props, 'cancelURL', cancelURL);\r\n },\r\n\r\n getCancelURL(this: void, def?: D): string | D {\r\n return get(props, 'cancelURL', def) as string | D;\r\n },\r\n\r\n setCancelURLTitle(this: void, cancelURLTitle: string): void {\r\n set(props, 'cancelURLTitle', cancelURLTitle);\r\n },\r\n\r\n getCancelURLTitle(this: void, def?: D): string | D {\r\n return get(props, 'cancelURLTitle', def) as string | D;\r\n },\r\n\r\n getShopURL(this: void, def?: D): string | D {\r\n return get(props, 'shopURL', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['shopURL'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as TokenProps, methods, Token);\r\n};\r\n\r\nexport default Token;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Token from '@/entities/Token';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { TokenProps } from '@/types/entities/Token';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { expirationTime } = props;\r\n\r\n if (expirationTime && typeof expirationTime === 'string') {\r\n props.expirationTime = new Date(expirationTime);\r\n }\r\n\r\n return Token(props as TokenProps);\r\n};\r\n","// types\r\nimport type { LicenseEntity } from '@/types/entities/License';\r\nimport type { LicenseTransactionJoinEntity as ILicenseTransactionJoin } from '@/types/entities/LicenseTransactionJoin';\r\nimport type { TransactionEntity } from '@/types/entities/Transaction';\r\n\r\n/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nclass LicenseTransactionJoin implements ILicenseTransactionJoin {\r\n transaction: TransactionEntity;\r\n license: LicenseEntity;\r\n\r\n constructor(transaction: TransactionEntity, license: LicenseEntity) {\r\n this.transaction = transaction;\r\n this.license = license;\r\n }\r\n\r\n setTransaction(transaction: TransactionEntity): void {\r\n this.transaction = transaction;\r\n }\r\n\r\n getTransaction(): TransactionEntity {\r\n return this.transaction;\r\n }\r\n\r\n setLicense(license: LicenseEntity): void {\r\n this.license = license;\r\n }\r\n\r\n getLicense(): LicenseEntity {\r\n return this.license;\r\n }\r\n}\r\n\r\nexport default (transaction: TransactionEntity, license: LicenseEntity) =>\r\n new LicenseTransactionJoin(transaction, license);\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { PaymentMethodValues } from '@/types/constants/PaymentMethodEnum';\r\nimport { TransactionSourceValues } from '@/types/constants/TransactionSource';\r\nimport { TransactionStatusValues } from '@/types/constants/TransactionStatus';\r\nimport { LicenseTransactionJoinEntity } from '@/types/entities/LicenseTransactionJoin';\r\nimport { TransactionMethods, TransactionProps, TransactionEntity } from '@/types/entities/Transaction';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * Transaction entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the transaction. This number is\r\n * always generated by NetLicensing.\r\n * @property string number\r\n *\r\n * always true for transactions\r\n * @property boolean active\r\n *\r\n * Status of transaction. \"CANCELLED\", \"CLOSED\", \"PENDING\".\r\n * @property string status\r\n *\r\n * \"SHOP\". AUTO transaction for internal use only.\r\n * @property string source\r\n *\r\n * grand total for SHOP transaction (see source).\r\n * @property number grandTotal\r\n *\r\n * discount for SHOP transaction (see source).\r\n * @property number discount\r\n *\r\n * specifies currency for money fields (grandTotal and discount). Check data types to discover which\r\n * @property string currency\r\n *\r\n * Date created. Optional.\r\n * @property string dateCreated\r\n *\r\n * Date closed. Optional.\r\n * @property string dateClosed\r\n */\r\n\r\nconst Transaction = function (\r\n properties: TransactionProps = {} as TransactionProps,\r\n): TransactionEntity {\r\n const props: TransactionProps = { ...properties };\r\n\r\n const methods: TransactionMethods = {\r\n setActive(this: void, active: boolean) {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setStatus(this: void, status: TransactionStatusValues): void {\r\n set(props, 'status', status);\r\n },\r\n\r\n getStatus(this: void, def?: D): TransactionStatusValues | D {\r\n return get(props, 'status', def) as TransactionStatusValues | D;\r\n },\r\n\r\n setSource(this: void, source: TransactionSourceValues): void {\r\n set(props, 'source', source);\r\n },\r\n getSource(this: void, def?: D): TransactionSourceValues | D {\r\n return get(props, 'source', def) as TransactionSourceValues | D;\r\n },\r\n setGrandTotal(this: void, grandTotal: number): void {\r\n set(props, 'grandTotal', grandTotal);\r\n },\r\n getGrandTotal(this: void, def?: D): number | D {\r\n return get(props, 'grandTotal', def) as number | D;\r\n },\r\n\r\n setDiscount(this: void, discount: number): void {\r\n set(props, 'discount', discount);\r\n },\r\n\r\n getDiscount(this: void, def?: D): number | D {\r\n return get(props, 'discount', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setDateCreated(this: void, dateCreated: Date): void {\r\n set(props, 'dateCreated', dateCreated);\r\n },\r\n\r\n getDateCreated(this: void, def?: D): Date | D {\r\n return get(props, 'dateCreated', def) as Date | D;\r\n },\r\n\r\n setDateClosed(this: void, dateCreated: Date): void {\r\n set(props, 'dateClosed', dateCreated);\r\n },\r\n\r\n getDateClosed(this: void, def?: D): Date | D {\r\n return get(props, 'dateClosed', def) as Date | D;\r\n },\r\n\r\n setPaymentMethod(this: void, paymentMethod: PaymentMethodValues): void {\r\n set(props, 'paymentMethod', paymentMethod);\r\n },\r\n\r\n getPaymentMethod(this: void, def?: D): PaymentMethodValues | D {\r\n return get(props, 'paymentMethod', def) as PaymentMethodValues | D;\r\n },\r\n\r\n setLicenseTransactionJoins(this: void, joins: LicenseTransactionJoinEntity[]): void {\r\n set(props, 'licenseTransactionJoins', joins);\r\n },\r\n\r\n getLicenseTransactionJoins(this: void, def?: D): LicenseTransactionJoinEntity[] | D {\r\n return get(props, 'licenseTransactionJoins', def) as LicenseTransactionJoinEntity[] | D;\r\n },\r\n\r\n serialize(this: void) {\r\n return serialize(props, { ignore: ['licenseTransactionJoins', 'inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as TransactionProps, methods, Transaction);\r\n};\r\n\r\nexport default Transaction;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// entities\r\nimport License from '@/entities/License';\r\nimport LicenseTransactionJoin from '@/entities/LicenseTransactionJoin';\r\nimport Transaction from '@/entities/Transaction';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { TransactionProps } from '@/types/entities/Transaction';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { dateCreated, dateClosed } = props;\r\n\r\n if (dateCreated && typeof dateCreated === 'string') {\r\n props.dateCreated = new Date(dateCreated);\r\n }\r\n\r\n if (dateClosed && typeof dateClosed === 'string') {\r\n props.dateClosed = new Date(dateClosed);\r\n }\r\n\r\n const licenseTransactionJoins: { licenseNumber: string; transactionNumber: string }[] | undefined =\r\n props.licenseTransactionJoin as { licenseNumber: string; transactionNumber: string }[];\r\n\r\n delete props.licenseTransactionJoin;\r\n\r\n if (licenseTransactionJoins) {\r\n props.licenseTransactionJoins = licenseTransactionJoins.map(({ transactionNumber, licenseNumber }) => {\r\n const transaction = Transaction({ number: transactionNumber });\r\n const license = License({ number: licenseNumber });\r\n\r\n return LicenseTransactionJoin(transaction, license);\r\n });\r\n }\r\n\r\n return Transaction(props as TransactionProps);\r\n};\r\n","import axios, { AxiosInstance, AxiosResponse } from 'axios';\r\nimport { Info } from '@/types/api/response';\r\n\r\nlet axiosInstance: AxiosInstance = axios.create();\r\nlet lastResponse: AxiosResponse | null = null;\r\nlet info: Info[] = [];\r\n\r\nexport const setAxiosInstance = (instance: AxiosInstance): void => {\r\n axiosInstance = instance;\r\n};\r\n\r\nexport const getAxiosInstance = (): AxiosInstance => axiosInstance;\r\n\r\nexport const setLastResponse = (response: AxiosResponse | null): void => {\r\n lastResponse = response;\r\n};\r\n\r\nexport const getLastResponse = (): AxiosResponse | null => lastResponse;\r\n\r\nexport const setInfo = (infos: Info[]): void => {\r\n info = infos;\r\n};\r\n\r\nexport const getInfo = (): Info[] => info;\r\n","{\r\n \"name\": \"netlicensing-client\",\r\n \"version\": \"2.0.0\",\r\n \"description\": \"JavaScript Wrapper for Labs64 NetLicensing RESTful API\",\r\n \"keywords\": [\r\n \"labs64\",\r\n \"netlicensing\",\r\n \"licensing\",\r\n \"licensing-as-a-service\",\r\n \"license\",\r\n \"license-management\",\r\n \"software-license\",\r\n \"client\",\r\n \"restful\",\r\n \"restful-api\",\r\n \"javascript\",\r\n \"wrapper\",\r\n \"api\",\r\n \"client\"\r\n ],\r\n \"license\": \"Apache-2.0\",\r\n \"author\": \"Labs64 GmbH\",\r\n \"homepage\": \"https://netlicensing.io\",\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/Labs64/NetLicensingClient-javascript\"\r\n },\r\n \"bugs\": {\r\n \"url\": \"https://github.com/Labs64/NetLicensingClient-javascript/issues\"\r\n },\r\n \"contributors\": [\r\n {\r\n \"name\": \"Ready Brown\",\r\n \"email\": \"ready.brown@hotmail.de\",\r\n \"url\": \"https://github.com/r-brown\"\r\n },\r\n {\r\n \"name\": \"Viacheslav Rudkovskiy\",\r\n \"email\": \"viachaslau.rudkovski@labs64.de\",\r\n \"url\": \"https://github.com/v-rudkovskiy\"\r\n },\r\n {\r\n \"name\": \"Andrei Yushkevich\",\r\n \"email\": \"yushkevich@me.com\",\r\n \"url\": \"https://github.com/yushkevich\"\r\n }\r\n ],\r\n \"main\": \"dist/index.cjs\",\r\n \"module\": \"dist/index.mjs\",\r\n \"types\": \"dist/index.d.ts\",\r\n \"exports\": {\r\n \".\": {\r\n \"types\": \"./dist/index.d.ts\",\r\n \"import\": \"./dist/index.mjs\",\r\n \"require\": \"./dist/index.cjs\"\r\n }\r\n },\r\n \"files\": [\r\n \"dist\"\r\n ],\r\n \"scripts\": {\r\n \"build\": \"tsup\",\r\n \"release\": \"npm run lint:typecheck && npm run test && npm run build\",\r\n \"dev\": \"tsup --watch\",\r\n \"test\": \"vitest run\",\r\n \"test:dev\": \"vitest watch\",\r\n \"lint\": \"eslint --ext .js,.mjs,.ts src\",\r\n \"typecheck\": \"tsc --noEmit\",\r\n \"lint:typecheck\": \"npm run lint && npm run typecheck\"\r\n },\r\n \"peerDependencies\": {\r\n \"axios\": \"^1.9.0\"\r\n },\r\n \"dependencies\": {},\r\n \"devDependencies\": {\r\n \"@eslint/js\": \"^9.24.0\",\r\n \"@types/node\": \"^22.14.0\",\r\n \"@typescript-eslint/eslint-plugin\": \"^8.29.1\",\r\n \"@typescript-eslint/parser\": \"^8.29.1\",\r\n \"@vitest/eslint-plugin\": \"^1.1.43\",\r\n \"axios\": \"^1.9.0\",\r\n \"eslint\": \"^9.24.0\",\r\n \"eslint-plugin-import\": \"^2.31.0\",\r\n \"prettier\": \"3.5.3\",\r\n \"tsup\": \"^8.4.0\",\r\n \"typescript\": \"^5.8.3\",\r\n \"typescript-eslint\": \"^8.29.1\",\r\n \"vitest\": \"^3.1.1\"\r\n },\r\n \"engines\": {\r\n \"node\": \">= 16.9.0\",\r\n \"npm\": \">= 8.0.0\"\r\n },\r\n \"browserslist\": [\r\n \"> 1%\",\r\n \"last 2 versions\",\r\n \"not ie <= 10\"\r\n ]\r\n}\r\n","export default >(data: T): string => {\r\n const query: string[] = [];\r\n\r\n const build = (obj: unknown, keyPrefix?: string): void => {\r\n if (obj === null || obj === undefined) {\r\n return;\r\n }\r\n\r\n if (Array.isArray(obj)) {\r\n obj.forEach((item) => {\r\n build(item, keyPrefix ? `${keyPrefix}` : '');\r\n });\r\n\r\n return;\r\n }\r\n\r\n if (obj instanceof Date) {\r\n query.push(`${keyPrefix}=${encodeURIComponent(obj.toISOString())}`);\r\n return;\r\n }\r\n\r\n if (typeof obj === 'object') {\r\n Object.keys(obj).forEach((key) => {\r\n const value = obj[key as keyof typeof obj];\r\n build(value, keyPrefix ? `${keyPrefix}[${encodeURIComponent(key)}]` : encodeURIComponent(key));\r\n });\r\n\r\n return;\r\n }\r\n\r\n query.push(`${keyPrefix}=${encodeURIComponent(obj as string)}`);\r\n };\r\n\r\n build(data);\r\n\r\n return query.join('&');\r\n};\r\n","import { AxiosRequestConfig, Method, AxiosRequestHeaders, AxiosResponse, AxiosError, AxiosInstance } from 'axios';\r\n\r\n// constants\r\nimport SecurityMode from '@/constants/SecurityMode';\r\n\r\n// errors\r\nimport NlicError from '@/errors/NlicError';\r\n\r\n// types\r\nimport type { NlicResponse } from '@/types/api/response';\r\nimport type { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\n\r\n// package.json\r\nimport pkg from '../../../package.json';\r\n\r\n// service\r\nimport { getAxiosInstance, setLastResponse, setInfo } from './instance';\r\nimport toQueryString from './toQueryString';\r\n\r\nexport default async (\r\n context: ContextInstance,\r\n method: Method,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => {\r\n const headers: Record = {\r\n Accept: 'application/json',\r\n 'X-Requested-With': 'XMLHttpRequest',\r\n };\r\n\r\n // only node.js has a process variable that is of [[Class]] process\r\n if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\r\n headers['User-agent'] = `NetLicensing/Javascript ${pkg.version}/node&${process.version}`;\r\n }\r\n\r\n const req: AxiosRequestConfig = {\r\n method,\r\n headers,\r\n url: encodeURI(`${context.getBaseUrl()}/${endpoint}`),\r\n responseType: 'json',\r\n transformRequest: (d: unknown, h: AxiosRequestHeaders) => {\r\n if (h['Content-Type'] === 'application/x-www-form-urlencoded') {\r\n return toQueryString(d as Record);\r\n }\r\n\r\n if (!h['NetLicensing-Origin']) {\r\n h['NetLicensing-Origin'] = `NetLicensing/Javascript ${pkg.version}`;\r\n }\r\n\r\n return d;\r\n },\r\n };\r\n\r\n if (['put', 'post', 'patch'].indexOf(method.toLowerCase()) >= 0) {\r\n if (req.method === 'post') {\r\n headers['Content-Type'] = 'application/x-www-form-urlencoded';\r\n }\r\n req.data = data;\r\n } else {\r\n req.params = data;\r\n }\r\n\r\n switch (context.getSecurityMode()) {\r\n // Basic Auth\r\n case SecurityMode.BASIC_AUTHENTICATION:\r\n {\r\n if (!context.getUsername()) {\r\n throw new NlicError('Missing parameter \"username\"');\r\n }\r\n\r\n if (!context.getPassword()) {\r\n throw new NlicError('Missing parameter \"password\"');\r\n }\r\n\r\n req.auth = {\r\n username: context.getUsername(),\r\n password: context.getPassword(),\r\n };\r\n }\r\n break;\r\n // ApiKey Auth\r\n case SecurityMode.APIKEY_IDENTIFICATION:\r\n if (!context.getApiKey()) {\r\n throw new NlicError('Missing parameter \"apiKey\"');\r\n }\r\n\r\n headers.Authorization = `Basic ${btoa(`apiKey:${context.getApiKey()}`)}`;\r\n break;\r\n // without authorization\r\n case SecurityMode.ANONYMOUS_IDENTIFICATION:\r\n break;\r\n default:\r\n throw new NlicError('Unknown security mode');\r\n }\r\n\r\n const instance: AxiosInstance = config?.axiosInstance || getAxiosInstance();\r\n\r\n try {\r\n const response: AxiosResponse = await instance(req);\r\n const info = response.data.infos?.info || [];\r\n\r\n setLastResponse(response);\r\n setInfo(info);\r\n\r\n if (config?.onResponse) {\r\n config.onResponse(response);\r\n }\r\n\r\n if (info.length > 0) {\r\n if (config?.onInfo) {\r\n config.onInfo(info);\r\n }\r\n\r\n const eInfo = info.find(({ type }) => type === 'ERROR');\r\n\r\n if (eInfo) {\r\n throw new NlicError(eInfo.value, eInfo.id, response.config, response.request, response);\r\n }\r\n }\r\n\r\n return response;\r\n } catch (e) {\r\n const error = e as AxiosError;\r\n\r\n const response = error.response;\r\n const info = (response?.data as NlicResponse)?.infos?.info || [];\r\n\r\n setLastResponse(response || null);\r\n setInfo(info);\r\n\r\n if ((e as AxiosError).isAxiosError) {\r\n let message = (e as AxiosError).message;\r\n\r\n if (response?.data && info.length > 0) {\r\n const eInfo = info.find(({ type }) => type === 'ERROR');\r\n\r\n if (eInfo) {\r\n message = eInfo.value;\r\n }\r\n }\r\n\r\n throw new NlicError(\r\n message,\r\n error.code,\r\n error.config,\r\n error.request,\r\n error.response as AxiosResponse,\r\n );\r\n }\r\n\r\n throw e;\r\n }\r\n};\r\n","import type { AxiosResponse } from 'axios';\r\n\r\n// types\r\nimport type { NlicResponse } from '@/types/api/response';\r\nimport type { RequestConfig } from '@/types/services/Service';\r\nimport type { ContextInstance } from '@/types/vo/Context';\r\n\r\n// service\r\nimport request from './request';\r\n\r\nexport const get = (\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => request(context, 'get', endpoint, data, config);\r\n\r\nexport const post = (\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => request(context, 'post', endpoint, data, config);\r\n\r\nexport const del = (\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => request(context, 'delete', endpoint, data, config);\r\n","import { AxiosInstance, AxiosResponse, Method } from 'axios';\r\n\r\n// service\r\nimport { setAxiosInstance, getAxiosInstance, getLastResponse, getInfo } from '@/services/Service/instance';\r\nimport { get, post, del } from '@/services/Service/methods';\r\nimport request from '@/services/Service/request';\r\nimport toQueryString from '@/services/Service/toQueryString';\r\n\r\n// types\r\nimport { Info, NlicResponse } from '@/types/api/response';\r\nimport { RequestConfig, IService } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\n\r\nexport { get, post, del, request, toQueryString };\r\n\r\nconst service: IService = {\r\n setAxiosInstance(this: void, instance: AxiosInstance) {\r\n setAxiosInstance(instance);\r\n },\r\n\r\n getAxiosInstance(this: void): AxiosInstance {\r\n return getAxiosInstance();\r\n },\r\n\r\n getLastHttpRequestInfo(this: void): AxiosResponse | null {\r\n return getLastResponse();\r\n },\r\n\r\n getInfo(this: void): Info[] {\r\n return getInfo();\r\n },\r\n\r\n get(\r\n this: void,\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return get(context, endpoint, data, config);\r\n },\r\n\r\n post(\r\n this: void,\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return post(context, endpoint, data, config);\r\n },\r\n\r\n delete(\r\n this: void,\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return del(context, endpoint, data, config);\r\n },\r\n\r\n request(\r\n this: void,\r\n context: ContextInstance,\r\n method: Method,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return request(context, method, endpoint, data, config);\r\n },\r\n\r\n toQueryString>(this: void, data: T): string {\r\n return toQueryString(data);\r\n },\r\n};\r\n\r\nexport default service;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst FILTER_DELIMITER = ';';\r\nconst FILTER_PAIR_DELIMITER = '=';\r\n\r\nexport const encode = (filter: Record): string => {\r\n return Object.keys(filter)\r\n .map((key) => `${key}${FILTER_PAIR_DELIMITER}${String(filter[key])}`)\r\n .join(FILTER_DELIMITER);\r\n};\r\n\r\nexport const decode = (filter: string): Record => {\r\n const result: Record = {};\r\n\r\n filter.split(FILTER_DELIMITER).forEach((v) => {\r\n const [name, value] = v.split(FILTER_PAIR_DELIMITER);\r\n result[name] = value;\r\n });\r\n\r\n return result;\r\n};\r\n\r\nexport default { encode, decode };\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nexport const isDefined = (value: unknown): boolean => {\r\n return typeof value !== 'undefined' && typeof value !== 'function';\r\n};\r\n\r\nexport const isValid = (value: unknown): boolean => {\r\n if (!isDefined(value)) {\r\n return false;\r\n }\r\n\r\n if (typeof value === 'number') {\r\n return !Number.isNaN(value);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nexport const ensureNotNull = (value: unknown, name: string): void => {\r\n if (value === null) {\r\n throw new TypeError(`Parameter \"${name}\" cannot be null.`);\r\n }\r\n\r\n if (!isValid(value)) {\r\n throw new TypeError(`Parameter \"${name}\" has an invalid value.`);\r\n }\r\n};\r\n\r\nexport const ensureNotEmpty = (value: unknown, name: string): void => {\r\n ensureNotNull(value, name);\r\n\r\n if (!value) {\r\n throw new TypeError(`Parameter \"${name}\" cannot be empty.`);\r\n }\r\n};\r\n\r\nexport default {\r\n isDefined,\r\n isValid,\r\n ensureNotNull,\r\n ensureNotEmpty,\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { PageInstance, Pagination, PaginationMethods } from '@/types/vo/Page';\r\n\r\nconst Page = function (content: T, pagination?: Partial) {\r\n const pageNumber = parseInt(pagination?.pagenumber || '0', 10);\r\n const itemsNumber = parseInt(pagination?.itemsnumber || '0', 10);\r\n const totalPages = parseInt(pagination?.totalpages || '0', 10);\r\n const totalItems = parseInt(pagination?.totalitems || '0', 10);\r\n\r\n const page: PaginationMethods = {\r\n getContent(this: void): T {\r\n return content;\r\n },\r\n\r\n getPagination(this: void): Pagination {\r\n return {\r\n pageNumber,\r\n itemsNumber,\r\n totalPages,\r\n totalItems,\r\n hasNext: totalPages > pageNumber + 1,\r\n };\r\n },\r\n\r\n getPageNumber(this: void): number {\r\n return pageNumber;\r\n },\r\n\r\n getItemsNumber(this: void): number {\r\n return itemsNumber;\r\n },\r\n\r\n getTotalPages(this: void): number {\r\n return totalPages;\r\n },\r\n\r\n getTotalItems(this: void): number {\r\n return totalItems;\r\n },\r\n\r\n hasNext(this: void): boolean {\r\n return totalPages > pageNumber + 1;\r\n },\r\n };\r\n\r\n return new Proxy(content, {\r\n get(obj: T, prop: string | symbol, receiver) {\r\n if (Object.hasOwn(page, prop)) {\r\n return page[prop as keyof typeof page];\r\n }\r\n\r\n return Reflect.get(obj, prop, receiver);\r\n },\r\n\r\n set(obj, prop, value, receiver) {\r\n return Reflect.set(obj, prop, value, receiver);\r\n },\r\n\r\n getPrototypeOf() {\r\n return (Page.prototype as object) || null;\r\n },\r\n }) as PageInstance;\r\n};\r\n\r\nexport default Page;\r\n","/**\r\n * JS representation of the Bundle Service. See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToBundle from '@/converters/itemToBundle';\r\n\r\n// services\r\nimport itemToLicense from '@/converters/itemToLicense';\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { BundleEntity, BundleProps, SavedBundleProps } from '@/types/entities/Bundle';\r\nimport { LicenseEntity, LicenseProps, SavedLicenseProps } from '@/types/entities/License';\r\nimport { IBundleService } from '@/types/services/BundleService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Bundle.ENDPOINT_PATH;\r\nconst endpointObtain = Constants.Bundle.ENDPOINT_OBTAIN_PATH;\r\nconst type = Constants.Bundle.TYPE;\r\n\r\nconst bundleService: IBundleService = {\r\n /**\r\n * Gets a bundle by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#get-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the bundle number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the bundle object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToBundle>(item);\r\n },\r\n\r\n /**\r\n * Returns bundle of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#bundles-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of bundle entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const bundles: BundleEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToBundle>(v));\r\n\r\n return Page(bundles || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates a new bundle with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#create-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param bundle NetLicensing.Bundle\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created bundle object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n bundle: BundleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(bundle, 'bundle');\r\n\r\n const response = await Service.post(context, endpoint, bundle.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToBundle>(item);\r\n },\r\n\r\n /**\r\n * Updates bundle properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#update-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * bundle number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param bundle NetLicensing.Bundle\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated bundle in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n bundle: BundleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(bundle, 'bundle');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, bundle.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToBundle>(item);\r\n },\r\n\r\n /**\r\n * Deletes bundle.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#delete-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * bundle number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n\r\n /**\r\n * Obtain bundle.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#obtain-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * bundle number\r\n * @param number string\r\n *\r\n * licensee number\r\n * @param licenseeNumber String\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return array of licenses\r\n * @returns {Promise}\r\n */\r\n async obtain(\r\n context: ContextInstance,\r\n number: string,\r\n licenseeNumber: string,\r\n config?: RequestConfig,\r\n ): Promise>[]> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotEmpty(licenseeNumber, 'licenseeNumber');\r\n\r\n const data = { [Constants.Licensee.LICENSEE_NUMBER]: licenseeNumber };\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}/${endpointObtain}`, data, config);\r\n const items = response.data.items;\r\n\r\n const licenses = items?.item.filter((v) => v.type === Constants.License.TYPE);\r\n\r\n return licenses?.map((v) => itemToLicense>(v)) || [];\r\n },\r\n};\r\n\r\nexport default bundleService;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport { ProductModuleValidation, ValidationResultsInstance } from '@/types/vo/ValidationResults';\r\n\r\n// utils\r\nimport { isValid } from '@/utils/validation';\r\n\r\nclass ValidationResults implements ValidationResultsInstance {\r\n readonly validations: Record;\r\n ttl?: Date;\r\n\r\n constructor() {\r\n this.validations = {};\r\n }\r\n\r\n getValidators(): Record {\r\n return this.validations;\r\n }\r\n\r\n setValidation(validation: ProductModuleValidation): this {\r\n this.validations[validation.productModuleNumber] = validation;\r\n return this;\r\n }\r\n\r\n getValidation(productModuleNumber: string, def?: D): ProductModuleValidation | D {\r\n return this.validations[productModuleNumber] || def;\r\n }\r\n\r\n setProductModuleValidation(validation: ProductModuleValidation): this {\r\n return this.setValidation(validation);\r\n }\r\n\r\n getProductModuleValidation(productModuleNumber: string, def?: D): ProductModuleValidation | D {\r\n return this.getValidation(productModuleNumber, def);\r\n }\r\n\r\n setTtl(ttl: Date | string): this {\r\n if (!isValid(ttl)) {\r\n throw new TypeError(`Bad ttl:${ttl.toString()}`);\r\n }\r\n\r\n this.ttl = new Date(ttl);\r\n return this;\r\n }\r\n\r\n getTtl(): Date | undefined {\r\n return this.ttl;\r\n }\r\n\r\n toString(): string {\r\n let data = 'ValidationResult [';\r\n\r\n Object.keys(this.validations).forEach((pmNumber) => {\r\n data += `ProductModule<${pmNumber}>`;\r\n\r\n if (pmNumber in this.validations) {\r\n data += JSON.stringify(this.validations[pmNumber]);\r\n }\r\n });\r\n\r\n data += ']';\r\n\r\n return data;\r\n }\r\n}\r\n\r\nexport default (): ValidationResultsInstance => new ValidationResults();\r\n","/**\r\n * Licensee Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/licensee-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToLicensee from '@/converters/itemToLicensee';\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { LicenseeProps, LicenseeEntity, SavedLicenseeProps } from '@/types/entities/Licensee';\r\nimport { ILicenseeService } from '@/types/services/LicenseeService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\nimport { ValidationParametersInstance } from '@/types/vo/ValidationParameters';\r\nimport { ValidationResultsInstance as IValidationResults } from '@/types/vo/ValidationResults';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\nimport ValidationResults from '@/vo/ValidationResults';\r\n\r\nconst endpoint = Constants.Licensee.ENDPOINT_PATH;\r\nconst endpointValidate = Constants.Licensee.ENDPOINT_PATH_VALIDATE;\r\nconst endpointTransfer = Constants.Licensee.ENDPOINT_PATH_TRANSFER;\r\nconst type = Constants.Licensee.TYPE;\r\n\r\nconst licenseeService: ILicenseeService = {\r\n /**\r\n * Gets licensee by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#get-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the licensee number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the licensee in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicensee>(item);\r\n },\r\n\r\n /**\r\n * Returns all licensees of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#licensees-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of licensees (of all products) or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: LicenseeEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToLicensee>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new licensee object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#create-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product to which the new licensee is to be added\r\n * @param productNumber string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param licensee NetLicensing.Licensee\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created licensee object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n productNumber: string,\r\n licensee: LicenseeEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(licensee, 'licensee');\r\n\r\n const data = licensee.serialize();\r\n\r\n if (productNumber) {\r\n data.productNumber = productNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicensee>(item);\r\n },\r\n\r\n /**\r\n * Updates licensee properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#update-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param licensee NetLicensing.Licensee\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated licensee in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n licensee: LicenseeEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(licensee, 'licensee');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, licensee.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicensee>(item);\r\n },\r\n\r\n /**\r\n * Deletes licensee.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#delete-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n\r\n /**\r\n * Validates active licenses of the licensee.\r\n * In the case of multiple product modules validation,\r\n * required parameters indexes will be added automatically.\r\n * See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#validate-licensee\r\n *\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * optional validation parameters. See ValidationParameters and licensing model documentation for\r\n * details.\r\n * @param validationParameters NetLicensing.ValidationParameters.\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * @returns {ValidationResults}\r\n */\r\n async validate(\r\n context: ContextInstance,\r\n number: string,\r\n validationParameters?: ValidationParametersInstance,\r\n config?: RequestConfig,\r\n ): Promise {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const data: Record = {};\r\n\r\n if (validationParameters) {\r\n const productNumber: string | undefined = validationParameters.productNumber;\r\n\r\n if (productNumber) {\r\n data.productNumber = productNumber;\r\n }\r\n\r\n const licenseeProperties = validationParameters.licenseeProperties;\r\n\r\n Object.keys(licenseeProperties).forEach((key: string) => {\r\n data[key] = validationParameters.getLicenseeProperty(key);\r\n });\r\n\r\n if (validationParameters.isForOfflineUse()) {\r\n data.forOfflineUse = true;\r\n }\r\n\r\n if (validationParameters.isDryRun()) {\r\n data.dryRun = true;\r\n }\r\n\r\n const parameters = validationParameters.getParameters();\r\n\r\n Object.keys(parameters).forEach((pmNumber, i) => {\r\n data[`${Constants.ProductModule.PRODUCT_MODULE_NUMBER}${i}`] = pmNumber;\r\n\r\n const parameter = parameters[pmNumber];\r\n\r\n if (parameter) {\r\n Object.keys(parameter).forEach((key: string) => {\r\n data[key + i] = parameter[key];\r\n });\r\n }\r\n });\r\n }\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}/${endpointValidate}`, data, config);\r\n\r\n const validationResults = ValidationResults();\r\n\r\n const ttl = response.data.ttl;\r\n\r\n if (ttl) {\r\n validationResults.setTtl(ttl);\r\n }\r\n\r\n const items = response.data.items?.item.filter((v) => v.type === Constants.Validation.TYPE);\r\n\r\n items?.forEach((v) => {\r\n validationResults.setValidation(itemToObject(v));\r\n });\r\n\r\n return validationResults;\r\n },\r\n\r\n /**\r\n * Transfer licenses between licensees.\r\n * @see https://netlicensing.io/wiki/licensee-services#transfer-licenses\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the number of the licensee receiving licenses\r\n * @param number string\r\n *\r\n * the number of the licensee delivering licenses\r\n * @param sourceLicenseeNumber string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * @returns {Promise}\r\n */\r\n transfer(\r\n context: ContextInstance,\r\n number: string,\r\n sourceLicenseeNumber: string,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotEmpty(sourceLicenseeNumber, 'sourceLicenseeNumber');\r\n\r\n const data = { sourceLicenseeNumber };\r\n\r\n return Service.post(context, `${endpoint}/${number}/${endpointTransfer}`, data, config);\r\n },\r\n};\r\n\r\nexport default licenseeService;\r\n","/**\r\n * JS representation of the License Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/license-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToLicense from '@/converters/itemToLicense';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { LicenseProps, LicenseEntity, SavedLicenseProps } from '@/types/entities/License';\r\nimport { ILicenseService } from '@/types/services/LicenseService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.License.ENDPOINT_PATH;\r\nconst type = Constants.License.TYPE;\r\n\r\nconst licenseService: ILicenseService = {\r\n /**\r\n * Gets license by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#get-license\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the license number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the license in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicense>(item);\r\n },\r\n\r\n /**\r\n * Returns licenses of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#licenses-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|undefined\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return array of licenses (of all products) or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: LicenseEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToLicense>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new license object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#create-license\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent licensee to which the new license is to be added\r\n * @param licenseeNumber string\r\n *\r\n * license template that the license is created from\r\n * @param licenseTemplateNumber string\r\n *\r\n * For privileged logins specifies transaction for the license creation. For regular logins new\r\n * transaction always created implicitly, and the operation will be in a separate transaction.\r\n * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with\r\n * auto-generated number.\r\n * @param transactionNumber null|string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param license NetLicensing.License\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created license object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n licenseeNumber: string | null,\r\n licenseTemplateNumber: string | null,\r\n transactionNumber: string | null,\r\n license: LicenseEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(license, 'license');\r\n\r\n const data = license.serialize();\r\n\r\n if (licenseeNumber) {\r\n data.licenseeNumber = licenseeNumber;\r\n }\r\n\r\n if (licenseTemplateNumber) {\r\n data.licenseTemplateNumber = licenseTemplateNumber;\r\n }\r\n\r\n if (transactionNumber) {\r\n data.transactionNumber = transactionNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicense>(item);\r\n },\r\n\r\n /**\r\n * Updates license properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#update-license\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license number\r\n * @param number string\r\n *\r\n * transaction for the license update. Created implicitly if transactionNumber is null. In this case the\r\n * operation will be in a separate transaction.\r\n * @param transactionNumber string|null\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param license NetLicensing.License\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated license in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n transactionNumber: string | null,\r\n license: LicenseEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(license, 'license');\r\n\r\n const data = license.serialize();\r\n\r\n if (transactionNumber) {\r\n data.transactionNumber = transactionNumber;\r\n }\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicense>(item);\r\n },\r\n\r\n /**\r\n * Deletes license.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#delete-license\r\n *\r\n * When any license is deleted, corresponding transaction is created automatically.\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default licenseService;\r\n","/**\r\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/license-template-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToLicenseTemplate from '@/converters/itemToLicenseTemplate';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport {\r\n LicenseTemplateProps,\r\n LicenseTemplateEntity,\r\n SavedLicenseTemplateProps,\r\n} from '@/types/entities/LicenseTemplate';\r\nimport { ILicenseTemplateService } from '@/types/services/LicenseTemplateService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.LicenseTemplate.ENDPOINT_PATH;\r\nconst type = Constants.LicenseTemplate.TYPE;\r\n\r\nconst licenseTemplateService: ILicenseTemplateService = {\r\n /**\r\n * Gets license template by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#get-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the license template number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the license template object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicenseTemplate>(item);\r\n },\r\n\r\n /**\r\n * Returns all license templates of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#license-templates-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of license templates (of all products/modules) or null/empty list if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: LicenseTemplateEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToLicenseTemplate>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new license template object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#create-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product module to which the new license template is to be added\r\n * @param productModuleNumber\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param licenseTemplate NetLicensing.LicenseTemplate\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * the newly created license template object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n productModuleNumber: string | null,\r\n licenseTemplate: LicenseTemplateEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(licenseTemplate, 'licenseTemplate');\r\n\r\n const data = licenseTemplate.serialize();\r\n\r\n if (productModuleNumber) {\r\n data.productModuleNumber = productModuleNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicenseTemplate>(item);\r\n },\r\n\r\n /**\r\n * Updates license template properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#update-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license template number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param licenseTemplate NetLicensing.LicenseTemplate\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated license template in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n licenseTemplate: LicenseTemplateEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(licenseTemplate, 'licenseTemplate');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, licenseTemplate.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicenseTemplate>(item);\r\n },\r\n\r\n /**\r\n * Deletes license template.See NetLicensingAPI JavaDoc for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#delete-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license template number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default licenseTemplateService;\r\n","/**\r\n * JS representation of the Notification Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/notification-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToNotification from '@/converters/itemToNotification';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { NotificationProps, NotificationEntity, SavedNotificationProps } from '@/types/entities/Notification';\r\nimport { INotificationService } from '@/types/services/NotificationService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Notification.ENDPOINT_PATH;\r\nconst type = Constants.Notification.TYPE;\r\n\r\nconst notificationService: INotificationService = {\r\n /**\r\n * Gets notification by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#get-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the notification number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the notification object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToNotification>(item);\r\n },\r\n\r\n /**\r\n * Returns notifications of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#notifications-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of notification entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: NotificationEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToNotification>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new notification with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#create-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param notification NetLicensing.Notification\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created notification object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n notification: NotificationEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(notification, 'notification');\r\n\r\n const response = await Service.post(context, endpoint, notification.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToNotification>(item);\r\n },\r\n\r\n /**\r\n * Updates notification properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#update-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * notification number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param notification NetLicensing.Notification\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated notification in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n notification: NotificationEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(notification, 'notification');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, notification.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToNotification>(item);\r\n },\r\n\r\n /**\r\n * Deletes notification.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#delete-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * notification number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default notificationService;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToPaymentMethod from '@/converters/itemToPaymentMethod';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { PaymentMethodProps, PaymentMethodEntity, SavedPaymentMethodProps } from '@/types/entities/PaymentMethod';\r\nimport { IPaymentMethodService } from '@/types/services/PaymentMethodService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.PaymentMethod.ENDPOINT_PATH;\r\nconst type = Constants.PaymentMethod.TYPE;\r\n\r\nconst paymentMethodService: IPaymentMethodService = {\r\n /**\r\n * Gets payment method by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/payment-method-services#get-payment-method\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the payment method number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the payment method in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToPaymentMethod>(item);\r\n },\r\n\r\n /**\r\n * Returns payment methods of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/payment-method-services#payment-methods-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of payment method entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: PaymentMethodEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToPaymentMethod>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Updates payment method properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/payment-method-services#update-payment-method\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the payment method number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param paymentMethod NetLicensing.PaymentMethod\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated payment method in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n paymentMethod: PaymentMethodEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(paymentMethod, 'paymentMethod');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, paymentMethod.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToPaymentMethod>(item);\r\n },\r\n};\r\n\r\nexport default paymentMethodService;\r\n","/**\r\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/product-module-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToProductModule from '@/converters/itemToProductModule';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { ProductModuleProps, ProductModuleEntity, SavedProductModuleProps } from '@/types/entities/ProductModule';\r\nimport { IProductModuleService } from '@/types/services/ProductModuleService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.ProductModule.ENDPOINT_PATH;\r\nconst type = Constants.ProductModule.TYPE;\r\n\r\nconst productModuleService: IProductModuleService = {\r\n /**\r\n * Gets product module by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#get-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the product module number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the product module object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProductModule>(item);\r\n },\r\n\r\n /**\r\n * Returns products of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#product-modules-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of product modules entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: ProductModuleEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToProductModule>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new product module object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#create-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product to which the new product module is to be added\r\n * @param productNumber string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param productModule NetLicensing.ProductModule\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * the newly created product module object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n productNumber: string | null,\r\n productModule: ProductModuleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(productModule, 'productModule');\r\n\r\n const data = productModule.serialize();\r\n\r\n if (productNumber) {\r\n data.productNumber = productNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProductModule>(item);\r\n },\r\n\r\n /**\r\n * Updates product module properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#update-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product module number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param productModule NetLicensing.ProductModule\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated product module in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n productModule: ProductModuleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(productModule, 'productModule');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, productModule.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProductModule>(item);\r\n },\r\n\r\n /**\r\n * Deletes product module.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#delete-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product module number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default productModuleService;\r\n","/**\r\n * JS representation of the Product Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/product-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToProduct from '@/converters/itemToProduct';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { ProductProps, ProductEntity, SavedProductProps } from '@/types/entities/Product';\r\nimport { IProductService } from '@/types/services/ProductService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Product.ENDPOINT_PATH;\r\nconst type = Constants.Product.TYPE;\r\n\r\nconst productService: IProductService = {\r\n /**\r\n * Gets product by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#get-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the product number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the product object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProduct>(item);\r\n },\r\n\r\n /**\r\n * Returns products of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#products-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of product entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: ProductEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToProduct>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new product with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#create-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param product NetLicensing.Product\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created product object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n product: ProductEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(product, 'product');\r\n\r\n const response = await Service.post(context, endpoint, product.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProduct>(item);\r\n },\r\n\r\n /**\r\n * Updates product properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#update-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param product NetLicensing.Product\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated product in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n product: ProductEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(product, 'product');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, product.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProduct>(item);\r\n },\r\n\r\n /**\r\n * Deletes product.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#delete-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default productService;\r\n","/**\r\n * JS representation of the Token Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/token-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToToken from '@/converters/itemToToken';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { TokenProps, TokenEntity, SavedTokenProps } from '@/types/entities/Token';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ITokenService } from '@/types/services/TokenService';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Token.ENDPOINT_PATH;\r\nconst type = Constants.Token.TYPE;\r\n\r\nconst tokenService: ITokenService = {\r\n /**\r\n * Gets token by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#get-token\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the token number\r\n * @param number\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the token in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToToken>(item);\r\n },\r\n\r\n /**\r\n * Returns tokens of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#tokens-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|undefined|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of token entities or empty array if nothing found.\r\n * @return array\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: TokenEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToToken>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new token.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#create-token\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context Context\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param token Token\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return created token in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n token: TokenEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(token, 'token');\r\n\r\n const response = await Service.post(context, endpoint, token.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToToken>(item);\r\n },\r\n\r\n /**\r\n * Delete token by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#delete-token\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the token number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default tokenService;\r\n","/**\r\n * JS representation of the Transaction Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/transaction-services\r\n *\r\n * Transaction is created each time change to LicenseService licenses happens. For instance licenses are\r\n * obtained by a licensee, licenses disabled by vendor, licenses deleted, etc. Transaction is created no matter what\r\n * source has initiated the change to licenses: it can be either a direct purchase of licenses by a licensee via\r\n * NetLicensing Shop, or licenses can be given to a licensee by a vendor. Licenses can also be assigned implicitly by\r\n * NetLicensing if it is defined so by a license model (e.g. evaluation license may be given automatically). All these\r\n * events are reflected in transactions. Of all the transaction handling routines only read-only routines are exposed to\r\n * the public API, as transactions are only allowed to be created and modified by NetLicensing internally.\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToTransaction from '@/converters/itemToTransaction';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport type { ItemPagination } from '@/types/api/response';\r\nimport { TransactionProps, TransactionEntity, SavedTransactionProps } from '@/types/entities/Transaction';\r\nimport type { RequestConfig } from '@/types/services/Service';\r\nimport type { ITransactionService } from '@/types/services/TransactionService';\r\nimport type { ContextInstance } from '@/types/vo/Context';\r\nimport type { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Transaction.ENDPOINT_PATH;\r\nconst type = Constants.Transaction.TYPE;\r\n\r\nconst transactionService: ITransactionService = {\r\n /**\r\n * Gets transaction by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#get-transaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the transaction number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the transaction in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToTransaction>(item);\r\n },\r\n\r\n /**\r\n * Returns all transactions of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#transactions-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of transaction entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: TransactionEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToTransaction>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new transaction object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#create-transaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param transaction NetLicensing.Transaction\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created transaction object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n transaction: TransactionEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(transaction, 'transaction');\r\n\r\n const response = await Service.post(context, endpoint, transaction.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToTransaction>(item);\r\n },\r\n\r\n /**\r\n * Updates transaction properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#update-transaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * transaction number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param transaction NetLicensing.Transaction\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated transaction in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n transaction: TransactionEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(transaction, 'transaction');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, transaction.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToTransaction>(item);\r\n },\r\n};\r\n\r\nexport default transactionService;\r\n","/**\r\n * JS representation of the Utility Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/utility-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToCountry from '@/converters/itemToCountry';\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { LicenseTypeValues } from '@/types/constants/LicenseType';\r\nimport { LicensingModelValues } from '@/types/constants/LicensingModel';\r\nimport { CountryEntity } from '@/types/entities/Country';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { IUtilityService } from '@/types/services/UtilityService';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst baseEndpoint = Constants.Utility.ENDPOINT_PATH;\r\n\r\nconst utilityService: IUtilityService = {\r\n /**\r\n * Returns all license types. See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/utility-services#license-types-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of available license types or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async listLicenseTypes(context: ContextInstance, config?: RequestConfig): Promise> {\r\n const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_LICENSE_TYPES}`;\r\n\r\n const response = await Service.get(context, endpoint, undefined, config);\r\n const items = response.data.items;\r\n\r\n const type = Constants.Utility.LICENSE_TYPE;\r\n\r\n const licenseTypes: string[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToObject<{ name: string }>(v).name);\r\n\r\n return Page((licenseTypes as LicenseTypeValues[]) || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Returns all license models. See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/utility-services#licensing-models-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of available license models or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async listLicensingModels(\r\n context: ContextInstance,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_LICENSING_MODELS}`;\r\n\r\n const response = await Service.get(context, endpoint, undefined, config);\r\n const items = response.data.items;\r\n\r\n const type = Constants.Utility.LICENSING_MODEL_TYPE;\r\n\r\n const licensingModels: string[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToObject<{ name: string }>(v).name);\r\n\r\n return Page((licensingModels as LicensingModelValues[]) || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Returns all countries.\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * collection of available countries or null/empty list if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async listCountries(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_COUNTRIES}`;\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const type = Constants.Utility.COUNTRY_TYPE;\r\n\r\n const countries: CountryEntity[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToCountry(v));\r\n\r\n return Page(countries || [], items as ItemPagination);\r\n },\r\n};\r\n\r\nexport default utilityService;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport SecurityModeEnum from '@/constants/SecurityMode';\r\n\r\n// types\r\nimport type { SecurityModeValues } from '@/types/constants/SecurityMode';\r\nimport type { ContextConfig, ContextInstance } from '@/types/vo/Context';\r\n\r\nclass Context implements ContextInstance {\r\n baseUrl: string;\r\n securityMode: SecurityModeValues;\r\n username?: string;\r\n password?: string;\r\n apiKey?: string;\r\n publicKey?: string;\r\n\r\n constructor(props?: ContextConfig) {\r\n this.baseUrl = props?.baseUrl || 'https://go.netlicensing.io/core/v2/rest';\r\n this.securityMode = props?.securityMode || SecurityModeEnum.BASIC_AUTHENTICATION;\r\n this.username = props?.username;\r\n this.password = props?.password;\r\n this.apiKey = props?.apiKey;\r\n this.publicKey = props?.publicKey;\r\n }\r\n\r\n setBaseUrl(baseUrl: string): this {\r\n this.baseUrl = baseUrl;\r\n return this;\r\n }\r\n\r\n getBaseUrl(): string {\r\n return this.baseUrl;\r\n }\r\n\r\n setSecurityMode(securityMode: SecurityModeValues): this {\r\n this.securityMode = securityMode;\r\n return this;\r\n }\r\n\r\n getSecurityMode(): SecurityModeValues {\r\n return this.securityMode;\r\n }\r\n\r\n setUsername(username: string): this {\r\n this.username = username;\r\n return this;\r\n }\r\n\r\n getUsername(def?: D): string | D {\r\n return (this.username || def) as string | D;\r\n }\r\n\r\n setPassword(password: string): this {\r\n this.password = password;\r\n return this;\r\n }\r\n\r\n getPassword(def?: D): string | D {\r\n return (this.password || def) as string | D;\r\n }\r\n\r\n setApiKey(apiKey: string): this {\r\n this.apiKey = apiKey;\r\n return this;\r\n }\r\n\r\n getApiKey(def?: D): string | D {\r\n return (this.apiKey || def) as string | D;\r\n }\r\n\r\n setPublicKey(publicKey: string): this {\r\n this.publicKey = publicKey;\r\n return this;\r\n }\r\n\r\n getPublicKey(def?: D): string | D {\r\n return (this.publicKey || def) as string | D;\r\n }\r\n}\r\n\r\nexport default (props?: ContextConfig): ContextInstance => new Context(props);\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport {\r\n ValidationParametersInstance,\r\n Parameter,\r\n Parameters,\r\n LicenseeProperties,\r\n} from '@/types/vo/ValidationParameters';\r\n\r\nclass ValidationParameters implements ValidationParametersInstance {\r\n productNumber?: string;\r\n dryRun?: boolean;\r\n forOfflineUse?: boolean;\r\n licenseeProperties: LicenseeProperties;\r\n parameters: Parameters;\r\n\r\n constructor() {\r\n this.parameters = {};\r\n this.licenseeProperties = {};\r\n }\r\n\r\n setProductNumber(productNumber: string): this {\r\n this.productNumber = productNumber;\r\n return this;\r\n }\r\n\r\n getProductNumber(): string | undefined {\r\n return this.productNumber;\r\n }\r\n\r\n setLicenseeName(licenseeName: string): this {\r\n this.licenseeProperties.licenseeName = licenseeName;\r\n return this;\r\n }\r\n\r\n getLicenseeName(): string | undefined {\r\n return this.licenseeProperties.licenseeName;\r\n }\r\n\r\n setLicenseeSecret(licenseeSecret: string): this {\r\n this.licenseeProperties.licenseeSecret = licenseeSecret;\r\n return this;\r\n }\r\n\r\n getLicenseeSecret(): string | undefined {\r\n return this.licenseeProperties.licenseeSecret;\r\n }\r\n\r\n getLicenseeProperties(): LicenseeProperties {\r\n return this.licenseeProperties;\r\n }\r\n\r\n setLicenseeProperty(key: string, value: string): this {\r\n this.licenseeProperties[key] = value;\r\n return this;\r\n }\r\n\r\n getLicenseeProperty(key: string, def?: D): string | D {\r\n return (this.licenseeProperties[key] || def) as string | D;\r\n }\r\n\r\n setForOfflineUse(forOfflineUse: boolean): this {\r\n this.forOfflineUse = forOfflineUse;\r\n return this;\r\n }\r\n\r\n isForOfflineUse() {\r\n return !!this.forOfflineUse;\r\n }\r\n\r\n setDryRun(dryRun: boolean): this {\r\n this.dryRun = dryRun;\r\n return this;\r\n }\r\n\r\n isDryRun(): boolean {\r\n return !!this.dryRun;\r\n }\r\n\r\n getParameters(): Parameters {\r\n return this.parameters;\r\n }\r\n\r\n setParameter(productModuleNumber: string, parameter: Parameter): this {\r\n this.parameters[productModuleNumber] = parameter;\r\n return this;\r\n }\r\n\r\n getParameter(productModuleNumber: string): Parameter | undefined {\r\n return this.parameters[productModuleNumber];\r\n }\r\n\r\n getProductModuleValidationParameters(productModuleNumber: string): Parameter | undefined {\r\n return this.getParameter(productModuleNumber);\r\n }\r\n\r\n setProductModuleValidationParameters(productModuleNumber: string, productModuleParameters: Parameter): this {\r\n return this.setParameter(productModuleNumber, productModuleParameters);\r\n }\r\n}\r\n\r\nexport default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A0C,CAC1G,OAAO,KAAK,aAAaF,EAAqBE,CAAuB,CACvE,CACF,EAEOC,GAAQ,IAAoC,IAAIZ","names":["index_exports","__export","ApiKeyRole_default","Bundle_default","BundleService_default","constants_default","Context_default","Country_default","License_default","LicenseService_default","LicenseTemplate_default","LicenseTemplateService_default","LicenseTransactionJoin_default","LicenseType_default","Licensee_default","LicenseeSecretMode_default","LicenseeService_default","LicensingModel_default","NlicError","NodeSecretMode_default","Notification_default","NotificationEvent_default","NotificationProtocol_default","NotificationService_default","Page_default","PaymentMethod_default","PaymentMethodEnum_default","PaymentMethodService_default","Product_default","ProductDiscount_default","ProductModule_default","ProductModuleService_default","ProductService_default","SecurityMode_default","Service_default","TimeVolumePeriod_default","Token_default","TokenService_default","TokenType_default","Transaction_default","TransactionService_default","TransactionSource_default","TransactionStatus_default","UtilityService_default","ValidationParameters_default","ValidationResults_default","defineEntity_default","ensureNotEmpty","ensureNotNull","decode","encode","isDefined","isValid","itemToBundle_default","itemToCountry_default","itemToLicense_default","itemToLicenseTemplate_default","itemToLicensee_default","itemToNotification_default","itemToObject_default","itemToPaymentMethod_default","itemToProduct_default","itemToProductModule_default","itemToToken_default","itemToTransaction_default","serialize_default","LicenseeSecretMode","LicenseeSecretMode_default","LicenseType","LicenseType_default","NotificationEvent","NotificationEvent_default","NotificationProtocol","NotificationProtocol_default","SecurityMode","SecurityMode_default","TimeVolumePeriod","TimeVolumePeriod_default","TokenType","TokenType_default","TransactionSource","TransactionSource_default","TransactionStatus","TransactionStatus_default","constants_default","LicenseeSecretMode_default","LicenseType_default","NotificationEvent_default","NotificationProtocol_default","SecurityMode_default","TimeVolumePeriod_default","TokenType_default","TransactionSource_default","TransactionStatus_default","ApiKeyRole","ApiKeyRole_default","LicensingModel","LicensingModel_default","NodeSecretMode","NodeSecretMode_default","PaymentMethodEnum","PaymentMethodEnum_default","cast","value","extractProperties","properties","result","name","extractLists","lists","list","itemToObject","item","itemToObject_default","has","obj","key","set","value","get","def","serialize_default","obj","options","map","ignore","k","v","defineEntity","props","methods","proto","options","listeners","base","key","value","set","def","get","has","properties","k","v","serialize_default","obj","prop","receiver","l","defineEntity_default","Bundle","properties","props","defineEntity_default","active","set","def","get","number","name","price","currency","numbers","licenseTemplateNumbers","serialize_default","Bundle_default","itemToBundle_default","item","props","itemToObject_default","licenseTemplateNumbers","Bundle_default","Country","properties","props","defineEntity_default","Country_default","itemToCountry_default","item","Country_default","itemToObject_default","License","properties","props","defineEntity_default","active","set","def","get","number","name","price","currency","hidden","timeVolume","timeVolumePeriod","startDate","parentfeature","serialize_default","License_default","itemToLicense_default","item","props","itemToObject_default","startDate","License_default","Licensee","properties","props","defineEntity_default","active","set","def","get","number","name","mark","serialize_default","Licensee_default","itemToLicensee_default","item","Licensee_default","itemToObject_default","LicenseTemplate","properties","props","defineEntity_default","active","set","def","get","number","name","type","price","currency","automatic","hidden","hideLicenses","gradePeriod","timeVolume","timeVolumePeriod","maxSessions","quantity","productModuleNumber","serialize_default","LicenseTemplate_default","itemToLicenseTemplate_default","item","LicenseTemplate_default","itemToObject_default","Notification","properties","props","defineEntity_default","active","set","def","get","number","name","protocol","events","event","payload","endpoint","data","serialize_default","Notification_default","itemToNotification_default","item","props","itemToObject_default","events","Notification_default","PaymentMethod","properties","props","defineEntity_default","active","set","def","get","number","PaymentMethod_default","itemToPaymentMethod_default","item","PaymentMethod_default","itemToObject_default","Product","properties","props","defineEntity_default","active","set","def","get","number","name","version","description","licensingInfo","licenseeAutoCreate","discounts","discount","productDiscounts","map","serialize_default","Product_default","bind","fn","thisArg","toString","getPrototypeOf","iterator","toStringTag","kindOf","cache","thing","str","kindOfTest","type","typeOfTest","isArray","isUndefined","isBuffer","val","isFunction","isArrayBuffer","isArrayBufferView","result","isString","isNumber","isObject","isBoolean","isPlainObject","prototype","isDate","isFile","isBlob","isFileList","isStream","isFormData","kind","isURLSearchParams","isReadableStream","isRequest","isResponse","isHeaders","trim","forEach","obj","fn","allOwnKeys","i","l","keys","len","key","findKey","_key","_global","isContextDefined","context","merge","caseless","assignValue","targetKey","extend","a","b","thisArg","bind","stripBOM","content","inherits","constructor","superConstructor","props","descriptors","toFlatObject","sourceObj","destObj","filter","propFilter","prop","merged","endsWith","searchString","position","lastIndex","toArray","arr","isTypedArray","TypedArray","forEachEntry","_iterator","pair","matchAll","regExp","matches","isHTMLForm","toCamelCase","m","p1","p2","hasOwnProperty","isRegExp","reduceDescriptors","reducer","reducedDescriptors","descriptor","name","ret","freezeMethods","value","toObjectSet","arrayOrString","delimiter","define","noop","toFiniteNumber","defaultValue","isSpecCompliantForm","toJSONObject","stack","visit","source","target","reducedValue","isAsyncFn","isThenable","_setImmediate","setImmediateSupported","postMessageSupported","token","callbacks","data","cb","asap","isIterable","utils_default","AxiosError","message","code","config","request","response","utils_default","prototype","descriptors","error","customProps","axiosError","obj","prop","AxiosError_default","null_default","isVisitable","thing","utils_default","removeBrackets","key","renderKey","path","dots","token","i","isFlatArray","arr","predicates","prop","toFormData","obj","formData","options","null_default","option","source","metaTokens","visitor","defaultVisitor","indexes","useBlob","convertValue","value","AxiosError_default","el","index","stack","exposedHelpers","build","toFormData_default","encode","str","charMap","match","AxiosURLSearchParams","params","options","toFormData_default","prototype","name","value","encoder","_encode","pair","AxiosURLSearchParams_default","encode","val","buildURL","url","params","options","_encode","utils_default","serializeFn","serializedParams","AxiosURLSearchParams_default","hashmarkIndex","InterceptorManager","fulfilled","rejected","options","id","fn","utils_default","h","InterceptorManager_default","transitional_default","URLSearchParams_default","AxiosURLSearchParams_default","FormData_default","Blob_default","browser_default","URLSearchParams_default","FormData_default","Blob_default","utils_exports","__export","hasBrowserEnv","hasStandardBrowserEnv","hasStandardBrowserWebWorkerEnv","_navigator","origin","platform_default","utils_exports","browser_default","toURLEncodedForm","data","options","toFormData_default","platform_default","value","key","path","helpers","utils_default","parsePropPath","name","utils_default","match","arrayToObject","arr","obj","keys","i","len","key","formDataToJSON","formData","buildPath","path","value","target","index","isNumericKey","isLast","formDataToJSON_default","stringifySafely","rawValue","parser","encoder","utils_default","e","defaults","transitional_default","data","headers","contentType","hasJSONContentType","isObjectPayload","formDataToJSON_default","isFileList","toURLEncodedForm","_FormData","toFormData_default","transitional","forcedJSONParsing","JSONRequested","strictJSONParsing","AxiosError_default","platform_default","status","method","defaults_default","ignoreDuplicateOf","utils_default","parseHeaders_default","rawHeaders","parsed","key","val","i","line","$internals","normalizeHeader","header","normalizeValue","value","utils_default","parseTokens","str","tokens","tokensRE","match","isValidHeaderName","matchHeaderValue","context","filter","isHeaderNameFilter","formatHeader","w","char","buildAccessors","obj","accessorName","methodName","arg1","arg2","arg3","AxiosHeaders","headers","valueOrRewrite","rewrite","self","setHeader","_value","_header","_rewrite","lHeader","key","setHeaders","parseHeaders_default","dest","entry","parser","matcher","deleted","deleteHeader","keys","i","format","normalized","targets","asStrings","thing","first","computed","target","accessors","prototype","defineAccessor","mapped","headerValue","AxiosHeaders_default","transformData","fns","response","config","defaults_default","context","headers","AxiosHeaders_default","data","utils_default","fn","isCancel","value","CanceledError","message","config","request","AxiosError_default","utils_default","CanceledError_default","settle","resolve","reject","response","validateStatus","AxiosError_default","parseProtocol","url","match","speedometer","samplesCount","min","bytes","timestamps","head","tail","firstSampleTS","chunkLength","now","startedAt","i","bytesCount","passed","speedometer_default","throttle","fn","freq","timestamp","threshold","lastArgs","timer","invoke","args","now","passed","throttle_default","progressEventReducer","listener","isDownloadStream","freq","bytesNotified","_speedometer","speedometer_default","throttle_default","e","loaded","total","progressBytes","rate","inRange","data","progressEventDecorator","throttled","lengthComputable","asyncDecorator","fn","args","utils_default","isURLSameOrigin_default","platform_default","origin","isMSIE","url","cookies_default","platform_default","name","value","expires","path","domain","secure","cookie","utils_default","match","isAbsoluteURL","url","combineURLs","baseURL","relativeURL","buildFullPath","baseURL","requestedURL","allowAbsoluteUrls","isRelativeUrl","isAbsoluteURL","combineURLs","headersToObject","thing","AxiosHeaders_default","mergeConfig","config1","config2","config","getMergedValue","target","source","prop","caseless","utils_default","mergeDeepProperties","a","b","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","merge","configValue","resolveConfig_default","config","newConfig","mergeConfig","data","withXSRFToken","xsrfHeaderName","xsrfCookieName","headers","auth","AxiosHeaders_default","buildURL","buildFullPath","contentType","utils_default","platform_default","type","tokens","token","isURLSameOrigin_default","xsrfValue","cookies_default","isXHRAdapterSupported","xhr_default","config","resolve","reject","_config","resolveConfig_default","requestData","requestHeaders","AxiosHeaders_default","responseType","onUploadProgress","onDownloadProgress","onCanceled","uploadThrottled","downloadThrottled","flushUpload","flushDownload","done","request","onloadend","responseHeaders","response","settle","value","err","AxiosError_default","timeoutErrorMessage","transitional","transitional_default","utils_default","val","key","progressEventReducer","cancel","CanceledError_default","protocol","parseProtocol","platform_default","composeSignals","signals","timeout","length","controller","aborted","onabort","reason","unsubscribe","err","AxiosError_default","CanceledError_default","timer","signal","utils_default","composeSignals_default","streamChunk","chunk","chunkSize","len","pos","end","readBytes","iterable","readStream","stream","reader","done","value","trackStream","onProgress","onFinish","iterator","bytes","_onFinish","e","controller","loadedBytes","err","reason","isFetchSupported","isReadableStreamSupported","encodeText","encoder","str","test","fn","args","supportsRequestStream","duplexAccessed","hasContentType","platform_default","DEFAULT_CHUNK_SIZE","supportsResponseStream","utils_default","resolvers","res","type","_","config","AxiosError_default","getBodyLength","body","resolveBodyLength","headers","length","fetch_default","url","method","data","signal","cancelToken","timeout","onDownloadProgress","onUploadProgress","responseType","withCredentials","fetchOptions","resolveConfig_default","composedSignal","composeSignals_default","request","unsubscribe","requestContentLength","_request","contentTypeHeader","onProgress","flush","progressEventDecorator","progressEventReducer","asyncDecorator","trackStream","isCredentialsSupported","response","isStreamResponse","options","prop","responseContentLength","responseData","resolve","reject","settle","AxiosHeaders_default","err","knownAdapters","null_default","xhr_default","fetch_default","utils_default","fn","value","renderReason","reason","isResolvedHandle","adapter","adapters_default","adapters","length","nameOrAdapter","rejectedReasons","i","id","AxiosError_default","reasons","state","s","throwIfCancellationRequested","config","CanceledError_default","dispatchRequest","AxiosHeaders_default","transformData","adapters_default","defaults_default","response","reason","isCancel","VERSION","validators","type","i","thing","deprecatedWarnings","validator","version","message","formatMessage","opt","desc","VERSION","value","opts","AxiosError_default","correctSpelling","assertOptions","options","schema","allowUnknown","keys","result","validator_default","validators","validator_default","Axios","instanceConfig","InterceptorManager_default","configOrUrl","config","err","dummy","stack","mergeConfig","transitional","paramsSerializer","headers","utils_default","contextHeaders","method","AxiosHeaders_default","requestInterceptorChain","synchronousRequestInterceptors","interceptor","responseInterceptorChain","promise","i","len","chain","dispatchRequest","newConfig","onFulfilled","onRejected","error","fullPath","buildFullPath","buildURL","url","generateHTTPMethod","isForm","data","Axios_default","CancelToken","_CancelToken","executor","resolvePromise","resolve","token","cancel","i","onfulfilled","_resolve","promise","message","config","request","CanceledError_default","listener","index","controller","abort","err","c","CancelToken_default","spread","callback","arr","isAxiosError","payload","utils_default","HttpStatusCode","key","value","HttpStatusCode_default","createInstance","defaultConfig","context","Axios_default","instance","bind","utils_default","instanceConfig","mergeConfig","axios","defaults_default","CanceledError_default","CancelToken_default","isCancel","VERSION","toFormData_default","AxiosError_default","promises","spread","isAxiosError","AxiosHeaders_default","thing","formDataToJSON_default","adapters_default","HttpStatusCode_default","axios_default","Axios","AxiosError","CanceledError","isCancel","CancelToken","VERSION","all","Cancel","isAxiosError","spread","toFormData","AxiosHeaders","HttpStatusCode","formToJSON","getAdapter","mergeConfig","axios_default","NlicError","_NlicError","AxiosError","message","code","config","request","response","stack","ProductDiscount","properties","props","NlicError","defineEntity_default","totalPrice","set","def","get","currency","amountFix","amountPercent","total","amount","obj","prop","ProductDiscount_default","itemToProduct_default","item","props","itemToObject_default","discounts","d","ProductDiscount_default","Product_default","ProductModule","properties","props","defineEntity_default","active","set","def","get","number","name","licensingModel","maxCheckoutValidity","yellowThreshold","redThreshold","productNumber","serialize_default","ProductModule_default","itemToProductModule_default","item","ProductModule_default","itemToObject_default","Token","properties","props","defineEntity_default","active","set","def","get","number","expirationTime","tokenType","licenseeNumber","action","apiKeyRole","bundleNumber","bundlePrice","productNumber","predefinedShoppingItem","successURL","successURLTitle","cancelURL","cancelURLTitle","serialize_default","Token_default","itemToToken_default","item","props","itemToObject_default","expirationTime","Token_default","LicenseTransactionJoin","transaction","license","LicenseTransactionJoin_default","Transaction","properties","props","defineEntity_default","active","set","def","get","number","status","source","grandTotal","discount","currency","dateCreated","paymentMethod","joins","serialize_default","Transaction_default","itemToTransaction_default","item","props","itemToObject_default","dateCreated","dateClosed","licenseTransactionJoins","transactionNumber","licenseNumber","transaction","Transaction_default","license","License_default","LicenseTransactionJoin_default","axiosInstance","axios_default","lastResponse","info","setAxiosInstance","instance","getAxiosInstance","setLastResponse","response","getLastResponse","setInfo","infos","getInfo","package_default","toQueryString_default","data","query","build","obj","keyPrefix","item","key","value","request_default","context","method","endpoint","data","config","headers","package_default","req","d","h","toQueryString_default","SecurityMode_default","NlicError","instance","getAxiosInstance","response","info","setLastResponse","setInfo","eInfo","type","e","error","message","get","context","endpoint","data","config","request_default","post","del","service","instance","setAxiosInstance","getAxiosInstance","getLastResponse","getInfo","context","endpoint","data","config","get","post","del","method","request_default","toQueryString_default","Service_default","FILTER_DELIMITER","FILTER_PAIR_DELIMITER","encode","filter","key","decode","result","v","name","value","isDefined","value","isValid","ensureNotNull","name","ensureNotEmpty","Page","content","pagination","pageNumber","itemsNumber","totalPages","totalItems","page","obj","prop","receiver","value","Page_default","endpoint","constants_default","endpointObtain","type","bundleService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToBundle_default","filter","data","encode","items","bundles","Page_default","bundle","ensureNotNull","forceCascade","licenseeNumber","itemToLicense_default","BundleService_default","ValidationResults","validation","productModuleNumber","def","ttl","isValid","data","pmNumber","ValidationResults_default","endpoint","constants_default","endpointValidate","endpointTransfer","type","licenseeService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToLicensee_default","filter","data","encode","items","list","Page_default","productNumber","licensee","ensureNotNull","forceCascade","validationParameters","licenseeProperties","key","parameters","pmNumber","i","parameter","response","validationResults","ValidationResults_default","ttl","itemToObject_default","sourceLicenseeNumber","LicenseeService_default","endpoint","constants_default","type","licenseService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToLicense_default","filter","data","encode","items","list","Page_default","licenseeNumber","licenseTemplateNumber","transactionNumber","license","ensureNotNull","forceCascade","LicenseService_default","endpoint","constants_default","type","licenseTemplateService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToLicenseTemplate_default","filter","data","encode","items","list","Page_default","productModuleNumber","licenseTemplate","ensureNotNull","forceCascade","LicenseTemplateService_default","endpoint","constants_default","type","notificationService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToNotification_default","filter","data","encode","items","list","Page_default","notification","ensureNotNull","forceCascade","NotificationService_default","endpoint","constants_default","type","paymentMethodService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToPaymentMethod_default","filter","data","encode","items","list","Page_default","paymentMethod","ensureNotNull","PaymentMethodService_default","endpoint","constants_default","type","productModuleService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToProductModule_default","filter","data","encode","items","list","Page_default","productNumber","productModule","ensureNotNull","forceCascade","ProductModuleService_default","endpoint","constants_default","type","productService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToProduct_default","filter","data","encode","items","list","Page_default","product","ensureNotNull","forceCascade","ProductService_default","endpoint","constants_default","type","tokenService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToToken_default","filter","data","encode","items","list","Page_default","token","ensureNotNull","forceCascade","TokenService_default","endpoint","constants_default","type","transactionService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToTransaction_default","filter","data","encode","items","list","Page_default","transaction","ensureNotNull","TransactionService_default","baseEndpoint","constants_default","utilityService","context","config","endpoint","items","Service_default","type","licenseTypes","v","itemToObject_default","Page_default","licensingModels","filter","data","encode","countries","itemToCountry_default","UtilityService_default","Context","props","SecurityMode_default","baseUrl","securityMode","username","def","password","apiKey","publicKey","Context_default","ValidationParameters","productNumber","licenseeName","licenseeSecret","key","value","def","forOfflineUse","dryRun","productModuleNumber","parameter","productModuleParameters","ValidationParameters_default"]} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..541b7d0 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,2 @@ +"use strict";var wt=Object.create;var ee=Object.defineProperty;var Ut=Object.getOwnPropertyDescriptor;var Vt=Object.getOwnPropertyNames;var jt=Object.getPrototypeOf,kt=Object.prototype.hasOwnProperty;var $t=(n,e)=>{for(var o in e)ee(n,o,{get:e[o],enumerable:!0})},Ye=(n,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Vt(e))!kt.call(n,i)&&i!==o&&ee(n,i,{get:()=>e[i],enumerable:!(t=Ut(e,i))||t.enumerable});return n};var Bt=(n,e,o)=>(o=n!=null?wt(jt(n)):{},Ye(e||!n||!n.__esModule?ee(o,"default",{value:n,enumerable:!0}):o,n)),qt=n=>Ye(ee({},"__esModule",{value:!0}),n);var Nn={};$t(Nn,{ApiKeyRole:()=>Fe,Bundle:()=>ie,BundleService:()=>ht,Constants:()=>u,Context:()=>Ot,Country:()=>se,License:()=>w,LicenseService:()=>It,LicenseTemplate:()=>ce,LicenseTemplateService:()=>bt,LicenseTransactionJoin:()=>Te,LicenseType:()=>q,Licensee:()=>ae,LicenseeSecretMode:()=>te,LicenseeService:()=>Nt,LicensingModel:()=>He,NlicError:()=>v,NodeSecretMode:()=>Ke,Notification:()=>de,NotificationEvent:()=>Y,NotificationProtocol:()=>F,NotificationService:()=>Lt,Page:()=>y,PaymentMethod:()=>me,PaymentMethodEnum:()=>ze,PaymentMethodService:()=>Rt,Product:()=>ue,ProductDiscount:()=>pe,ProductModule:()=>le,ProductModuleService:()=>Ct,ProductService:()=>xt,SecurityMode:()=>N,Service:()=>m,TimeVolumePeriod:()=>ne,Token:()=>fe,TokenService:()=>St,TokenType:()=>H,Transaction:()=>z,TransactionService:()=>At,TransactionSource:()=>oe,TransactionStatus:()=>K,UtilityService:()=>Mt,ValidationParameters:()=>_t,ValidationResults:()=>De,defineEntity:()=>g,ensureNotEmpty:()=>p,ensureNotNull:()=>T,filterDecode:()=>Et,filterEncode:()=>D,isDefined:()=>_e,isValid:()=>G,itemToBundle:()=>R,itemToCountry:()=>re,itemToLicense:()=>I,itemToLicenseTemplate:()=>x,itemToLicensee:()=>C,itemToNotification:()=>S,itemToObject:()=>P,itemToPaymentMethod:()=>U,itemToProduct:()=>A,itemToProductModule:()=>M,itemToToken:()=>V,itemToTransaction:()=>O,serialize:()=>E});module.exports=qt(Nn);var Yt=Object.freeze({DISABLED:"DISABLED",PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}),te=Yt;var Ft=Object.freeze({FEATURE:"FEATURE",TIMEVOLUME:"TIMEVOLUME",FLOATING:"FLOATING",QUANTITY:"QUANTITY"}),q=Ft;var Ht=Object.freeze({LICENSEE_CREATED:"LICENSEE_CREATED",LICENSE_CREATED:"LICENSE_CREATED",WARNING_LEVEL_CHANGED:"WARNING_LEVEL_CHANGED",PAYMENT_TRANSACTION_PROCESSED:"PAYMENT_TRANSACTION_PROCESSED"}),Y=Ht;var Kt=Object.freeze({WEBHOOK:"WEBHOOK"}),F=Kt;var zt=Object.freeze({BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",ANONYMOUS_IDENTIFICATION:"ANONYMOUS"}),N=zt;var Gt=Object.freeze({DAY:"DAY",WEEK:"WEEK",MONTH:"MONTH",YEAR:"YEAR"}),ne=Gt;var Jt=Object.freeze({DEFAULT:"DEFAULT",SHOP:"SHOP",APIKEY:"APIKEY",ACTION:"ACTION"}),H=Jt;var Qt=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"}),oe=Qt;var Wt=Object.freeze({PENDING:"PENDING",CLOSED:"CLOSED",CANCELLED:"CANCELLED"}),K=Wt;var u={LicenseeSecretMode:te,LicenseType:q,NotificationEvent:Y,NotificationProtocol:F,SecurityMode:N,TimeVolumePeriod:ne,TokenType:H,TransactionSource:oe,TransactionStatus:K,BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",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",LicenseType:q},License:{TYPE:"License",ENDPOINT_PATH:"license"},Validation:{TYPE:"ProductModuleValidation"},Token:{TYPE:"Token",ENDPOINT_PATH:"token",Type:H},PaymentMethod:{TYPE:"PaymentMethod",ENDPOINT_PATH:"paymentmethod"},Bundle:{TYPE:"Bundle",ENDPOINT_PATH:"bundle",ENDPOINT_OBTAIN_PATH:"obtain"},Notification:{TYPE:"Notification",ENDPOINT_PATH:"notification",Protocol:F,Event:Y},Transaction:{TYPE:"Transaction",ENDPOINT_PATH:"transaction",Status:K},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:"Country"}};var Xt=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"}),Fe=Xt;var Zt=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"}),He=Zt;var en=Object.freeze({PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}),Ke=en;var tn=Object.freeze({NULL:"NULL",PAYPAL:"PAYPAL",PAYPAL_SANDBOX:"PAYPAL_SANDBOX",STRIPE:"STRIPE",STRIPE_TESTING:"STRIPE_TESTING"}),ze=tn;var nn=n=>{try{return JSON.parse(n)}catch{return n}},on=n=>{let e={};return n?.forEach(({name:o,value:t})=>{e[o]=nn(t)}),e},sn=n=>{let e={};return n?.forEach(o=>{let{name:t}=o;e[t]=e[t]||[],e[t].push(Ge(o))}),e},Ge=n=>n?{...on(n.property),...sn(n.list)}:{},P=Ge;var xe=(n,e)=>Object.hasOwn(n,e),a=(n,e,o)=>{n[e]=o},r=(n,e,o)=>xe(n,e)?n[e]:o;var E=(n,e={})=>{let o={},{ignore:t=[]}=e;return Object.entries(n).forEach(([i,s])=>{if(!t.includes(i)&&typeof s!="function")if(s===void 0)o[i]="";else if(typeof s=="string")o[i]=s;else if(s instanceof Date)o[i]=s.toISOString();else if(typeof s!="object"||s===null)o[i]=String(s);else try{o[i]=JSON.stringify(s)}catch{o[i]=String(s)}}),o};var rn=function(n,e,o={},t){let i={set:[],get:[]};t?.get&&i.get.push(t.get),t?.set&&i.set.push(t.set);let s={set(c,d){a(n,c,d)},get(c,d){return r(n,c,d)},has(c){return xe(n,c)},setProperty(c,d){this.set(c,d)},addProperty(c,d){this.set(c,d)},getProperty(c,d){return this.get(c,d)},hasProperty(c){return this.has(c)},setProperties(c){Object.entries(c).forEach(([d,l])=>{this.set(d,l)})},serialize(){return E(n)}};return new Proxy(n,{get(c,d,l){return Object.hasOwn(e,d)?e[d]:Object.hasOwn(s,d)?s[d]:(i.get.forEach(f=>{f(c,d,l)}),Reflect.get(c,d,l))},set(c,d,l,f){return i.set.forEach(h=>{h(c,d,l,f)}),Reflect.set(c,d,l,f)},getPrototypeOf(){return o.prototype||null}})},g=rn;var Je=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setPrice(t){a(e,"price",t)},getPrice(t){return r(e,"price",t)},setCurrency(t){a(e,"currency",t)},getCurrency(t){return r(e,"currency",t)},setLicenseTemplateNumbers(t){a(e,"licenseTemplateNumbers",t)},addLicenseTemplateNumber(t){e.licenseTemplateNumbers||(e.licenseTemplateNumbers=[]),e.licenseTemplateNumbers.push(t)},getLicenseTemplateNumbers(t){return r(e,"licenseTemplateNumbers",t)},removeLicenseTemplateNumber(t){let{licenseTemplateNumbers:i=[]}=e;i.splice(i.indexOf(t),1),e.licenseTemplateNumbers=i},serialize(){if(e.licenseTemplateNumbers){let t=e.licenseTemplateNumbers.join(",");return E({...e,licenseTemplateNumbers:t})}return E(e)}},Je)},ie=Je;var R=n=>{let e=P(n),{licenseTemplateNumbers:o}=e;return o&&typeof o=="string"&&(e.licenseTemplateNumbers=o.split(",")),ie(e)};var Qe=function(n={}){let o={...{code:"",name:"",vatPercent:0,isEu:!1},...n};return g(o,{getCode(){return o.code},getName(){return o.name},getVatPercent(){return o.vatPercent},getIsEu(){return o.isEu}},Qe)},se=Qe;var re=n=>se(P(n));var We=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setPrice(t){a(e,"price",t)},getPrice(t){return r(e,"price",t)},setCurrency(t){a(e,"currency",t)},getCurrency(t){return r(e,"currency",t)},setHidden(t){a(e,"hidden",t)},getHidden(t){return r(e,"hidden",t)},setLicenseeNumber(t){a(e,"licenseeNumber",t)},getLicenseeNumber(t){return r(e,"licenseeNumber",t)},setLicenseTemplateNumber(t){a(e,"licenseTemplateNumber",t)},getLicenseTemplateNumber(t){return r(e,"licenseTemplateNumber",t)},setTimeVolume(t){a(e,"timeVolume",t)},getTimeVolume(t){return r(e,"timeVolume",t)},setTimeVolumePeriod(t){a(e,"timeVolumePeriod",t)},getTimeVolumePeriod(t){return r(e,"timeVolumePeriod",t)},setStartDate(t){a(e,"startDate",t)},getStartDate(t){return r(e,"startDate",t)},setParentfeature(t){a(e,"parentfeature",t)},getParentfeature(t){return r(e,"parentfeature",t)},serialize(){return E(e,{ignore:["inUse"]})}},We)},w=We;var I=n=>{let e=P(n),{startDate:o}=e;return o&&typeof o=="string"&&(e.startDate=o==="now"?o:new Date(o)),w(e)};var Xe=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setProductNumber(t){a(e,"productNumber",t)},getProductNumber(t){return r(e,"productNumber",t)},setMarkedForTransfer(t){a(e,"markedForTransfer",t)},getMarkedForTransfer(t){return r(e,"markedForTransfer",t)},serialize(){return E(e,{ignore:["inUse"]})}},Xe)},ae=Xe;var C=n=>ae(P(n));var Ze=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setLicenseType(t){a(e,"licenseType",t)},getLicenseType(t){return r(e,"licenseType",t)},setPrice(t){a(e,"price",t)},getPrice(t){return r(e,"price",t)},setCurrency(t){a(e,"currency",t)},getCurrency(t){return r(e,"currency",t)},setAutomatic(t){a(e,"automatic",t)},getAutomatic(t){return r(e,"automatic",t)},setHidden(t){a(e,"hidden",t)},getHidden(t){return r(e,"hidden",t)},setHideLicenses(t){a(e,"hideLicenses",t)},getHideLicenses(t){return r(e,"hideLicenses",t)},setGracePeriod(t){a(e,"gracePeriod",t)},getGracePeriod(t){return r(e,"gracePeriod",t)},setTimeVolume(t){a(e,"timeVolume",t)},getTimeVolume(t){return r(e,"timeVolume",t)},setTimeVolumePeriod(t){a(e,"timeVolumePeriod",t)},getTimeVolumePeriod(t){return r(e,"timeVolumePeriod",t)},setMaxSessions(t){a(e,"maxSessions",t)},getMaxSessions(t){return r(e,"maxSessions",t)},setQuantity(t){a(e,"quantity",t)},getQuantity(t){return r(e,"quantity",t)},setProductModuleNumber(t){a(e,"productModuleNumber",t)},getProductModuleNumber(t){return r(e,"productModuleNumber",t)},serialize(){return E(e,{ignore:["inUse"]})}},Ze)},ce=Ze;var x=n=>ce(P(n));var et=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setProtocol(t){a(e,"protocol",t)},getProtocol(t){return r(e,"protocol",t)},setEvents(t){a(e,"events",t)},getEvents(t){return r(e,"events",t)},addEvent(t){let i=this.getEvents([]);i.push(t),this.setEvents(i)},setPayload(t){a(e,"payload",t)},getPayload(t){return r(e,"payload",t)},setEndpoint(t){a(e,"endpoint",t)},getEndpoint(t){return r(e,"endpoint",t)},serialize(){let t=E(e);return t.events&&(t.events=this.getEvents([]).join(",")),t}},et)},de=et;var S=n=>{let e=P(n),{events:o}=e;return o&&typeof o=="string"&&(e.events=o.split(",")),de(e)};var tt=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)}},tt)},me=tt;var U=n=>me(P(n));var nt=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setVersion(t){a(e,"version",t)},getVersion(t){return r(e,"version",t)},setDescription(t){a(e,"description",t)},getDescription(t){return r(e,"description",t)},setLicensingInfo(t){a(e,"licensingInfo",t)},getLicensingInfo(t){return r(e,"licensingInfo",t)},setLicenseeAutoCreate(t){a(e,"licenseeAutoCreate",t)},getLicenseeAutoCreate(t){return r(e,"licenseeAutoCreate",t)},setDiscounts(t){a(e,"discounts",t)},getDiscounts(t){return r(e,"discounts",t)},addDiscount(t){let i=this.getDiscounts([]);i.push(t),this.setDiscounts(i)},removeDiscount(t){let i=this.getDiscounts();Array.isArray(i)&&i.length>0&&(i.splice(i.indexOf(t),1),this.setDiscounts(i))},setProductDiscounts(t){this.setDiscounts(t)},getProductDiscounts(t){return this.getDiscounts(t)},serialize(){let t=E(e,{ignore:["discounts","inUse"]}),i=this.getDiscounts();return i&&(t.discount=i.length>0?i.map(s=>s.toString()):""),t}},nt)},ue=nt;var ot=require("axios"),v=class n extends ot.AxiosError{constructor(o,t,i,s,c,d){super(o,t,i,s,c);this.isNlicError=!0;this.name="NlicError",d&&(this.stack=d),Object.setPrototypeOf(this,n.prototype)}};var it=function(n={}){let e={...n};if(e.amountFix&&e.amountPercent)throw new v('Properties "amountFix" and "amountPercent" cannot be used at the same time');return g(e,{setTotalPrice(t){a(e,"totalPrice",t)},getTotalPrice(t){return r(e,"totalPrice",t)},setCurrency(t){a(e,"currency",t)},getCurrency(t){return r(e,"currency",t)},setAmountFix(t){a(e,"amountFix",t)},getAmountFix(t){return r(e,"amountFix",t)},setAmountPercent(t){a(e,"amountPercent",t)},getAmountPercent(t){return r(e,"amountPercent",t)},toString(){let t=this.getTotalPrice(),i=this.getCurrency(),s=this.getAmountPercent()?`${this.getAmountPercent()}%`:this.getAmountFix();return t&&i&&s?`${t};${i};${s}`:""}},it,{set:(t,i)=>{i==="amountFix"&&delete t.amountPercent,i==="amountPercent"&&delete t.amountFix}})},pe=it;var A=n=>{let e=P(n),o=e.discount;return delete e.discount,o&&(e.discounts=o.map(t=>pe(t))),ue(e)};var st=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setLicensingModel(t){a(e,"licensingModel",t)},getLicensingModel(t){return r(e,"licensingModel",t)},setMaxCheckoutValidity(t){a(e,"maxCheckoutValidity",t)},getMaxCheckoutValidity(t){return r(e,"maxCheckoutValidity",t)},setYellowThreshold(t){a(e,"yellowThreshold",t)},getYellowThreshold(t){return r(e,"yellowThreshold",t)},setRedThreshold(t){a(e,"redThreshold",t)},getRedThreshold(t){return r(e,"redThreshold",t)},setProductNumber(t){a(e,"productNumber",t)},getProductNumber(t){return r(e,"productNumber",t)},serialize(){return E(e,{ignore:["inUse"]})}},st)},le=st;var M=n=>le(P(n));var rt=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setExpirationTime(t){a(e,"expirationTime",t)},getExpirationTime(t){return r(e,"expirationTime",t)},setTokenType(t){a(e,"tokenType",t)},getTokenType(t){return r(e,"tokenType",t)},setLicenseeNumber(t){a(e,"licenseeNumber",t)},getLicenseeNumber(t){return r(e,"licenseeNumber",t)},setAction(t){a(e,"action",t)},getAction(t){return r(e,"action",t)},setApiKeyRole(t){a(e,"apiKeyRole",t)},getApiKeyRole(t){return r(e,"apiKeyRole",t)},setBundleNumber(t){a(e,"bundleNumber",t)},getBundleNumber(t){return r(e,"bundleNumber",t)},setBundlePrice(t){a(e,"bundlePrice",t)},getBundlePrice(t){return r(e,"bundlePrice",t)},setProductNumber(t){a(e,"productNumber",t)},getProductNumber(t){return r(e,"productNumber",t)},setPredefinedShoppingItem(t){a(e,"predefinedShoppingItem",t)},getPredefinedShoppingItem(t){return r(e,"predefinedShoppingItem",t)},setSuccessURL(t){a(e,"successURL",t)},getSuccessURL(t){return r(e,"successURL",t)},setSuccessURLTitle(t){a(e,"successURLTitle",t)},getSuccessURLTitle(t){return r(e,"successURLTitle",t)},setCancelURL(t){a(e,"cancelURL",t)},getCancelURL(t){return r(e,"cancelURL",t)},setCancelURLTitle(t){a(e,"cancelURLTitle",t)},getCancelURLTitle(t){return r(e,"cancelURLTitle",t)},getShopURL(t){return r(e,"shopURL",t)},serialize(){return E(e,{ignore:["shopURL"]})}},rt)},fe=rt;var V=n=>{let e=P(n),{expirationTime:o}=e;return o&&typeof o=="string"&&(e.expirationTime=new Date(o)),fe(e)};var Se=class{constructor(e,o){this.transaction=e,this.license=o}setTransaction(e){this.transaction=e}getTransaction(){return this.transaction}setLicense(e){this.license=e}getLicense(){return this.license}},Te=(n,e)=>new Se(n,e);var at=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setStatus(t){a(e,"status",t)},getStatus(t){return r(e,"status",t)},setSource(t){a(e,"source",t)},getSource(t){return r(e,"source",t)},setGrandTotal(t){a(e,"grandTotal",t)},getGrandTotal(t){return r(e,"grandTotal",t)},setDiscount(t){a(e,"discount",t)},getDiscount(t){return r(e,"discount",t)},setCurrency(t){a(e,"currency",t)},getCurrency(t){return r(e,"currency",t)},setDateCreated(t){a(e,"dateCreated",t)},getDateCreated(t){return r(e,"dateCreated",t)},setDateClosed(t){a(e,"dateClosed",t)},getDateClosed(t){return r(e,"dateClosed",t)},setPaymentMethod(t){a(e,"paymentMethod",t)},getPaymentMethod(t){return r(e,"paymentMethod",t)},setLicenseTransactionJoins(t){a(e,"licenseTransactionJoins",t)},getLicenseTransactionJoins(t){return r(e,"licenseTransactionJoins",t)},serialize(){return E(e,{ignore:["licenseTransactionJoins","inUse"]})}},at)},z=at;var O=n=>{let e=P(n),{dateCreated:o,dateClosed:t}=e;o&&typeof o=="string"&&(e.dateCreated=new Date(o)),t&&typeof t=="string"&&(e.dateClosed=new Date(t));let i=e.licenseTransactionJoin;return delete e.licenseTransactionJoin,i&&(e.licenseTransactionJoins=i.map(({transactionNumber:s,licenseNumber:c})=>{let d=z({number:s}),l=w({number:c});return Te(d,l)})),z(e)};var ct=Bt(require("axios")),dt=ct.default.create(),mt=null,ut=[],pt=n=>{dt=n},Pe=()=>dt,Ae=n=>{mt=n},lt=()=>mt,Me=n=>{ut=n},ft=()=>ut;var Oe={name:"netlicensing-client",version:"2.0.0",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/index.cjs",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.mjs",require:"./dist/index.cjs"}},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"},peerDependencies:{axios:"^1.9.0"},dependencies:{},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",axios:"^1.9.0",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"]};var ge=n=>{let e=[],o=(t,i)=>{if(t!=null){if(Array.isArray(t)){t.forEach(s=>{o(s,i?`${i}`:"")});return}if(t instanceof Date){e.push(`${i}=${encodeURIComponent(t.toISOString())}`);return}if(typeof t=="object"){Object.keys(t).forEach(s=>{let c=t[s];o(c,i?`${i}[${encodeURIComponent(s)}]`:encodeURIComponent(s))});return}e.push(`${i}=${encodeURIComponent(t)}`)}};return o(n),e.join("&")};var j=async(n,e,o,t,i)=>{let s={Accept:"application/json","X-Requested-With":"XMLHttpRequest"};typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(s["User-agent"]=`NetLicensing/Javascript ${Oe.version}/node&${process.version}`);let c={method:e,headers:s,url:encodeURI(`${n.getBaseUrl()}/${o}`),responseType:"json",transformRequest:(l,f)=>f["Content-Type"]==="application/x-www-form-urlencoded"?ge(l):(f["NetLicensing-Origin"]||(f["NetLicensing-Origin"]=`NetLicensing/Javascript ${Oe.version}`),l)};switch(["put","post","patch"].indexOf(e.toLowerCase())>=0?(c.method==="post"&&(s["Content-Type"]="application/x-www-form-urlencoded"),c.data=t):c.params=t,n.getSecurityMode()){case N.BASIC_AUTHENTICATION:{if(!n.getUsername())throw new v('Missing parameter "username"');if(!n.getPassword())throw new v('Missing parameter "password"');c.auth={username:n.getUsername(),password:n.getPassword()}}break;case N.APIKEY_IDENTIFICATION:if(!n.getApiKey())throw new v('Missing parameter "apiKey"');s.Authorization=`Basic ${btoa(`apiKey:${n.getApiKey()}`)}`;break;case N.ANONYMOUS_IDENTIFICATION:break;default:throw new v("Unknown security mode")}let d=i?.axiosInstance||Pe();try{let l=await d(c),f=l.data.infos?.info||[];if(Ae(l),Me(f),i?.onResponse&&i.onResponse(l),f.length>0){i?.onInfo&&i.onInfo(f);let h=f.find(({type:b})=>b==="ERROR");if(h)throw new v(h.value,h.id,l.config,l.request,l)}return l}catch(l){let f=l,h=f.response,b=h?.data?.infos?.info||[];if(Ae(h||null),Me(b),l.isAxiosError){let L=l.message;if(h?.data&&b.length>0){let $=b.find(({type:B})=>B==="ERROR");$&&(L=$.value)}throw new v(L,f.code,f.config,f.request,f.response)}throw l}};var Tt=(n,e,o,t)=>j(n,"get",e,o,t),Pt=(n,e,o,t)=>j(n,"post",e,o,t),gt=(n,e,o,t)=>j(n,"delete",e,o,t);var cn={setAxiosInstance(n){pt(n)},getAxiosInstance(){return Pe()},getLastHttpRequestInfo(){return lt()},getInfo(){return ft()},get(n,e,o,t){return Tt(n,e,o,t)},post(n,e,o,t){return Pt(n,e,o,t)},delete(n,e,o,t){return gt(n,e,o,t)},request(n,e,o,t,i){return j(n,e,o,t,i)},toQueryString(n){return ge(n)}},m=cn;var yt=";",Dt="=",D=n=>Object.keys(n).map(e=>`${e}${Dt}${String(n[e])}`).join(yt),Et=n=>{let e={};return n.split(yt).forEach(o=>{let[t,i]=o.split(Dt);e[t]=i}),e};var _e=n=>typeof n<"u"&&typeof n!="function",G=n=>_e(n)?typeof n=="number"?!Number.isNaN(n):!0:!1,T=(n,e)=>{if(n===null)throw new TypeError(`Parameter "${e}" cannot be null.`);if(!G(n))throw new TypeError(`Parameter "${e}" has an invalid value.`)},p=(n,e)=>{if(T(n,e),!n)throw new TypeError(`Parameter "${e}" cannot be empty.`)};var vt=function(n,e){let o=parseInt(e?.pagenumber||"0",10),t=parseInt(e?.itemsnumber||"0",10),i=parseInt(e?.totalpages||"0",10),s=parseInt(e?.totalitems||"0",10),c={getContent(){return n},getPagination(){return{pageNumber:o,itemsNumber:t,totalPages:i,totalItems:s,hasNext:i>o+1}},getPageNumber(){return o},getItemsNumber(){return t},getTotalPages(){return i},getTotalItems(){return s},hasNext(){return i>o+1}};return new Proxy(n,{get(d,l,f){return Object.hasOwn(c,l)?c[l]:Reflect.get(d,l,f)},set(d,l,f,h){return Reflect.set(d,l,f,h)},getPrototypeOf(){return vt.prototype||null}})},y=vt;var k=u.Bundle.ENDPOINT_PATH,dn=u.Bundle.ENDPOINT_OBTAIN_PATH,ye=u.Bundle.TYPE,mn={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${k}/${e}`,{},o)).data.items?.item.find(s=>s.type===ye);return R(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,k,t,o)).data.items,c=s?.item.filter(d=>d.type===ye).map(d=>R(d));return y(c||[],s)},async create(n,e,o){T(e,"bundle");let i=(await m.post(n,k,e.serialize(),o)).data.items?.item.find(s=>s.type===ye);return R(i)},async update(n,e,o,t){p(e,"number"),T(o,"bundle");let s=(await m.post(n,`${k}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===ye);return R(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${k}/${e}`,{forceCascade:!!o},t)},async obtain(n,e,o,t){p(e,"number"),p(o,"licenseeNumber");let i={[u.Licensee.LICENSEE_NUMBER]:o};return(await m.post(n,`${k}/${e}/${dn}`,i,t)).data.items?.item.filter(l=>l.type===u.License.TYPE)?.map(l=>I(l))||[]}},ht=mn;var we=class{constructor(){this.validations={}}getValidators(){return this.validations}setValidation(e){return this.validations[e.productModuleNumber]=e,this}getValidation(e,o){return this.validations[e]||o}setProductModuleValidation(e){return this.setValidation(e)}getProductModuleValidation(e,o){return this.getValidation(e,o)}setTtl(e){if(!G(e))throw new TypeError(`Bad ttl:${e.toString()}`);return this.ttl=new Date(e),this}getTtl(){return this.ttl}toString(){let e="ValidationResult [";return Object.keys(this.validations).forEach(o=>{e+=`ProductModule<${o}>`,o in this.validations&&(e+=JSON.stringify(this.validations[o]))}),e+="]",e}},De=()=>new we;var _=u.Licensee.ENDPOINT_PATH,un=u.Licensee.ENDPOINT_PATH_VALIDATE,pn=u.Licensee.ENDPOINT_PATH_TRANSFER,Ee=u.Licensee.TYPE,ln={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${_}/${e}`,{},o)).data.items?.item.find(s=>s.type===Ee);return C(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,_,t,o)).data.items,c=s?.item.filter(d=>d.type===Ee).map(d=>C(d));return y(c||[],s)},async create(n,e,o,t){T(o,"licensee");let i=o.serialize();e&&(i.productNumber=e);let c=(await m.post(n,_,i,t)).data.items?.item.find(d=>d.type===Ee);return C(c)},async update(n,e,o,t){p(e,"number"),T(o,"licensee");let s=(await m.post(n,`${_}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===Ee);return C(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${_}/${e}`,{forceCascade:!!o},t)},async validate(n,e,o,t){p(e,"number");let i={};if(o){let f=o.productNumber;f&&(i.productNumber=f);let h=o.licenseeProperties;Object.keys(h).forEach(L=>{i[L]=o.getLicenseeProperty(L)}),o.isForOfflineUse()&&(i.forOfflineUse=!0),o.isDryRun()&&(i.dryRun=!0);let b=o.getParameters();Object.keys(b).forEach((L,$)=>{i[`${u.ProductModule.PRODUCT_MODULE_NUMBER}${$}`]=L;let B=b[L];B&&Object.keys(B).forEach(qe=>{i[qe+$]=B[qe]})})}let s=await m.post(n,`${_}/${e}/${un}`,i,t),c=De(),d=s.data.ttl;return d&&c.setTtl(d),s.data.items?.item.filter(f=>f.type===u.Validation.TYPE)?.forEach(f=>{c.setValidation(P(f))}),c},transfer(n,e,o,t){p(e,"number"),p(o,"sourceLicenseeNumber");let i={sourceLicenseeNumber:o};return m.post(n,`${_}/${e}/${pn}`,i,t)}},Nt=ln;var J=u.License.ENDPOINT_PATH,ve=u.License.TYPE,fn={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${J}/${e}`,{},o)).data.items?.item.find(s=>s.type===ve);return I(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,J,t,o)).data.items,c=s?.item.filter(d=>d.type===ve).map(d=>I(d));return y(c||[],s)},async create(n,e,o,t,i,s){T(i,"license");let c=i.serialize();e&&(c.licenseeNumber=e),o&&(c.licenseTemplateNumber=o),t&&(c.transactionNumber=t);let l=(await m.post(n,J,c,s)).data.items?.item.find(f=>f.type===ve);return I(l)},async update(n,e,o,t,i){p(e,"number"),T(t,"license");let s=t.serialize();o&&(s.transactionNumber=o);let d=(await m.post(n,`${J}/${e}`,s,i)).data.items?.item.find(l=>l.type===ve);return I(d)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${J}/${e}`,{forceCascade:!!o},t)}},It=fn;var Q=u.LicenseTemplate.ENDPOINT_PATH,he=u.LicenseTemplate.TYPE,Tn={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${Q}/${e}`,{},o)).data.items?.item.find(s=>s.type===he);return x(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,Q,t,o)).data.items,c=s?.item.filter(d=>d.type===he).map(d=>x(d));return y(c||[],s)},async create(n,e,o,t){T(o,"licenseTemplate");let i=o.serialize();e&&(i.productModuleNumber=e);let c=(await m.post(n,Q,i,t)).data.items?.item.find(d=>d.type===he);return x(c)},async update(n,e,o,t){p(e,"number"),T(o,"licenseTemplate");let s=(await m.post(n,`${Q}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===he);return x(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${Q}/${e}`,{forceCascade:!!o},t)}},bt=Tn;var W=u.Notification.ENDPOINT_PATH,Ne=u.Notification.TYPE,Pn={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${W}/${e}`,{},o)).data.items?.item.find(s=>s.type===Ne);return S(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,W,t,o)).data.items,c=s?.item.filter(d=>d.type===Ne).map(d=>S(d));return y(c||[],s)},async create(n,e,o){T(e,"notification");let i=(await m.post(n,W,e.serialize(),o)).data.items?.item.find(s=>s.type===Ne);return S(i)},async update(n,e,o,t){p(e,"number"),T(o,"notification");let s=(await m.post(n,`${W}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===Ne);return S(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${W}/${e}`,{forceCascade:!!o},t)}},Lt=Pn;var Ue=u.PaymentMethod.ENDPOINT_PATH,Ve=u.PaymentMethod.TYPE,gn={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${Ue}/${e}`,{},o)).data.items?.item.find(s=>s.type===Ve);return U(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,Ue,t,o)).data.items,c=s?.item.filter(d=>d.type===Ve).map(d=>U(d));return y(c||[],s)},async update(n,e,o,t){p(e,"number"),T(o,"paymentMethod");let s=(await m.post(n,`${Ue}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===Ve);return U(s)}},Rt=gn;var X=u.ProductModule.ENDPOINT_PATH,Ie=u.ProductModule.TYPE,yn={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${X}/${e}`,{},o)).data.items?.item.find(s=>s.type===Ie);return M(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,X,t,o)).data.items,c=s?.item.filter(d=>d.type===Ie).map(d=>M(d));return y(c||[],s)},async create(n,e,o,t){T(o,"productModule");let i=o.serialize();e&&(i.productNumber=e);let c=(await m.post(n,X,i,t)).data.items?.item.find(d=>d.type===Ie);return M(c)},async update(n,e,o,t){p(e,"number"),T(o,"productModule");let s=(await m.post(n,`${X}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===Ie);return M(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${X}/${e}`,{forceCascade:!!o},t)}},Ct=yn;var Z=u.Product.ENDPOINT_PATH,be=u.Product.TYPE,Dn={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${Z}/${e}`,{},o)).data.items?.item.find(s=>s.type===be);return A(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,Z,t,o)).data.items,c=s?.item.filter(d=>d.type===be).map(d=>A(d));return y(c||[],s)},async create(n,e,o){T(e,"product");let i=(await m.post(n,Z,e.serialize(),o)).data.items?.item.find(s=>s.type===be);return A(i)},async update(n,e,o,t){p(e,"number"),T(o,"product");let s=(await m.post(n,`${Z}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===be);return A(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${Z}/${e}`,{forceCascade:!!o},t)}},xt=Dn;var Le=u.Token.ENDPOINT_PATH,je=u.Token.TYPE,En={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${Le}/${e}`,{},o)).data.items?.item.find(s=>s.type===je);return V(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,Le,t,o)).data.items,c=s?.item.filter(d=>d.type===je).map(d=>V(d));return y(c||[],s)},async create(n,e,o){T(e,"token");let i=(await m.post(n,Le,e.serialize(),o)).data.items?.item.find(s=>s.type===je);return V(i)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${Le}/${e}`,{forceCascade:!!o},t)}},St=En;var Re=u.Transaction.ENDPOINT_PATH,Ce=u.Transaction.TYPE,vn={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${Re}/${e}`,{},o)).data.items?.item.find(s=>s.type===Ce);return O(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,Re,t,o)).data.items,c=s?.item.filter(d=>d.type===Ce).map(d=>O(d));return y(c||[],s)},async create(n,e,o){T(e,"transaction");let i=(await m.post(n,Re,e.serialize(),o)).data.items?.item.find(s=>s.type===Ce);return O(i)},async update(n,e,o,t){p(e,"number"),T(o,"transaction");let s=(await m.post(n,`${Re}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===Ce);return O(s)}},At=vn;var ke=u.Utility.ENDPOINT_PATH,hn={async listLicenseTypes(n,e){let o=`${ke}/${u.Utility.ENDPOINT_PATH_LICENSE_TYPES}`,i=(await m.get(n,o,void 0,e)).data.items,s=u.Utility.LICENSE_TYPE,c=i?.item.filter(d=>d.type===s).map(d=>P(d).name);return y(c||[],i)},async listLicensingModels(n,e){let o=`${ke}/${u.Utility.ENDPOINT_PATH_LICENSING_MODELS}`,i=(await m.get(n,o,void 0,e)).data.items,s=u.Utility.LICENSING_MODEL_TYPE,c=i?.item.filter(d=>d.type===s).map(d=>P(d).name);return y(c||[],i)},async listCountries(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let i=`${ke}/${u.Utility.ENDPOINT_PATH_COUNTRIES}`,c=(await m.get(n,i,t,o)).data.items,d=u.Utility.COUNTRY_TYPE,l=c?.item.filter(f=>f.type===d).map(f=>re(f));return y(l||[],c)}},Mt=hn;var $e=class{constructor(e){this.baseUrl=e?.baseUrl||"https://go.netlicensing.io/core/v2/rest",this.securityMode=e?.securityMode||N.BASIC_AUTHENTICATION,this.username=e?.username,this.password=e?.password,this.apiKey=e?.apiKey,this.publicKey=e?.publicKey}setBaseUrl(e){return this.baseUrl=e,this}getBaseUrl(){return this.baseUrl}setSecurityMode(e){return this.securityMode=e,this}getSecurityMode(){return this.securityMode}setUsername(e){return this.username=e,this}getUsername(e){return this.username||e}setPassword(e){return this.password=e,this}getPassword(e){return this.password||e}setApiKey(e){return this.apiKey=e,this}getApiKey(e){return this.apiKey||e}setPublicKey(e){return this.publicKey=e,this}getPublicKey(e){return this.publicKey||e}},Ot=n=>new $e(n);var Be=class{constructor(){this.parameters={},this.licenseeProperties={}}setProductNumber(e){return this.productNumber=e,this}getProductNumber(){return this.productNumber}setLicenseeName(e){return this.licenseeProperties.licenseeName=e,this}getLicenseeName(){return this.licenseeProperties.licenseeName}setLicenseeSecret(e){return this.licenseeProperties.licenseeSecret=e,this}getLicenseeSecret(){return this.licenseeProperties.licenseeSecret}getLicenseeProperties(){return this.licenseeProperties}setLicenseeProperty(e,o){return this.licenseeProperties[e]=o,this}getLicenseeProperty(e,o){return this.licenseeProperties[e]||o}setForOfflineUse(e){return this.forOfflineUse=e,this}isForOfflineUse(){return!!this.forOfflineUse}setDryRun(e){return this.dryRun=e,this}isDryRun(){return!!this.dryRun}getParameters(){return this.parameters}setParameter(e,o){return this.parameters[e]=o,this}getParameter(e){return this.parameters[e]}getProductModuleValidationParameters(e){return this.getParameter(e)}setProductModuleValidationParameters(e,o){return this.setParameter(e,o)}},_t=()=>new Be; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 0000000..e77b065 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/index.ts","../src/constants/LicenseeSecretMode.ts","../src/constants/LicenseType.ts","../src/constants/NotificationEvent.ts","../src/constants/NotificationProtocol.ts","../src/constants/SecurityMode.ts","../src/constants/TimeVolumePeriod.ts","../src/constants/TokenType.ts","../src/constants/TransactionSource.ts","../src/constants/TransactionStatus.ts","../src/constants/index.ts","../src/constants/ApiKeyRole.ts","../src/constants/LicensingModel.ts","../src/constants/NodeSecretMode.ts","../src/constants/PaymentMethodEnum.ts","../src/converters/itemToObject.ts","../src/utils/helpers.ts","../src/utils/serialize.ts","../src/entities/defineEntity.ts","../src/entities/Bundle.ts","../src/converters/itemToBundle.ts","../src/entities/Country.ts","../src/converters/itemToCountry.ts","../src/entities/License.ts","../src/converters/itemToLicense.ts","../src/entities/Licensee.ts","../src/converters/itemToLicensee.ts","../src/entities/LicenseTemplate.ts","../src/converters/itemToLicenseTemplate.ts","../src/entities/Notification.ts","../src/converters/itemToNotification.ts","../src/entities/PaymentMethod.ts","../src/converters/itemToPaymentMethod.ts","../src/entities/Product.ts","../src/errors/NlicError.ts","../src/entities/ProductDiscount.ts","../src/converters/itemToProduct.ts","../src/entities/ProductModule.ts","../src/converters/itemToProductModule.ts","../src/entities/Token.ts","../src/converters/itemToToken.ts","../src/entities/LicenseTransactionJoin.ts","../src/entities/Transaction.ts","../src/converters/itemToTransaction.ts","../src/services/Service/instance.ts","../package.json","../src/services/Service/toQueryString.ts","../src/services/Service/request.ts","../src/services/Service/methods.ts","../src/services/Service/index.ts","../src/utils/filter.ts","../src/utils/validation.ts","../src/vo/Page.ts","../src/services/BundleService.ts","../src/vo/ValidationResults.ts","../src/services/LicenseeService.ts","../src/services/LicenseService.ts","../src/services/LicenseTemplateService.ts","../src/services/NotificationService.ts","../src/services/PaymentMethodService.ts","../src/services/ProductModuleService.ts","../src/services/ProductService.ts","../src/services/TokenService.ts","../src/services/TransactionService.ts","../src/services/UtilityService.ts","../src/vo/Context.ts","../src/vo/ValidationParameters.ts"],"sourcesContent":["// constants\r\nimport Constants from '@/constants';\r\nimport ApiKeyRole from '@/constants/ApiKeyRole';\r\nimport LicenseeSecretMode from '@/constants/LicenseeSecretMode';\r\nimport LicenseType from '@/constants/LicenseType';\r\nimport LicensingModel from '@/constants/LicensingModel';\r\nimport NodeSecretMode from '@/constants/NodeSecretMode';\r\nimport NotificationEvent from '@/constants/NotificationEvent';\r\nimport NotificationProtocol from '@/constants/NotificationProtocol';\r\nimport PaymentMethodEnum from '@/constants/PaymentMethodEnum';\r\nimport SecurityMode from '@/constants/SecurityMode';\r\nimport TimeVolumePeriod from '@/constants/TimeVolumePeriod';\r\nimport TokenType from '@/constants/TokenType';\r\nimport TransactionSource from '@/constants/TransactionSource';\r\nimport TransactionStatus from '@/constants/TransactionStatus';\r\n\r\n// converters\r\nimport itemToBundle from '@/converters/itemToBundle';\r\nimport itemToCountry from '@/converters/itemToCountry';\r\nimport itemToLicense from '@/converters/itemToLicense';\r\nimport itemToLicensee from '@/converters/itemToLicensee';\r\nimport itemToLicenseTemplate from '@/converters/itemToLicenseTemplate';\r\nimport itemToNotification from '@/converters/itemToNotification';\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport itemToPaymentMethod from '@/converters/itemToPaymentMethod';\r\nimport itemToProduct from '@/converters/itemToProduct';\r\nimport itemToProductModule from '@/converters/itemToProductModule';\r\nimport itemToToken from '@/converters/itemToToken';\r\nimport itemToTransaction from '@/converters/itemToTransaction';\r\n\r\n// entities\r\nimport Bundle from '@/entities/Bundle';\r\nimport Country from '@/entities/Country';\r\nimport defineEntity from '@/entities/defineEntity';\r\nimport License from '@/entities/License';\r\nimport Licensee from '@/entities/Licensee';\r\nimport LicenseTemplate from '@/entities/LicenseTemplate';\r\nimport LicenseTransactionJoin from '@/entities/LicenseTransactionJoin';\r\nimport Notification from '@/entities/Notification';\r\nimport PaymentMethod from '@/entities/PaymentMethod';\r\nimport Product from '@/entities/Product';\r\nimport ProductDiscount from '@/entities/ProductDiscount';\r\nimport ProductModule from '@/entities/ProductModule';\r\nimport Token from '@/entities/Token';\r\nimport Transaction from '@/entities/Transaction';\r\n\r\n// errors\r\nimport NlicError from '@/errors/NlicError';\r\n\r\n// services\r\nimport BundleService from '@/services/BundleService';\r\nimport LicenseeService from '@/services/LicenseeService';\r\nimport LicenseService from '@/services/LicenseService';\r\nimport LicenseTemplateService from '@/services/LicenseTemplateService';\r\nimport NotificationService from '@/services/NotificationService';\r\nimport PaymentMethodService from '@/services/PaymentMethodService';\r\nimport ProductModuleService from '@/services/ProductModuleService';\r\nimport ProductService from '@/services/ProductService';\r\nimport Service from '@/services/Service';\r\nimport TokenService from '@/services/TokenService';\r\nimport TransactionService from '@/services/TransactionService';\r\nimport UtilityService from '@/services/UtilityService';\r\n\r\n// utils\r\nimport { encode as filterEncode, decode as filterDecode } from '@/utils/filter';\r\nimport serialize from '@/utils/serialize';\r\nimport { isValid, isDefined, ensureNotNull, ensureNotEmpty } from '@/utils/validation';\r\n\r\n// value object\r\nimport Context from '@/vo/Context';\r\nimport Page from '@/vo/Page';\r\nimport ValidationParameters from '@/vo/ValidationParameters';\r\nimport ValidationResults from '@/vo/ValidationResults';\r\n\r\n// types\r\nexport type * from '@/types';\r\n\r\nexport {\r\n // constants\r\n Constants,\r\n ApiKeyRole,\r\n LicenseeSecretMode,\r\n LicenseType,\r\n LicensingModel,\r\n NodeSecretMode,\r\n NotificationEvent,\r\n NotificationProtocol,\r\n PaymentMethodEnum,\r\n SecurityMode,\r\n TimeVolumePeriod,\r\n TokenType,\r\n TransactionSource,\r\n TransactionStatus,\r\n\r\n // converters\r\n itemToBundle,\r\n itemToCountry,\r\n itemToLicense,\r\n itemToLicensee,\r\n itemToLicenseTemplate,\r\n itemToNotification,\r\n itemToObject,\r\n itemToPaymentMethod,\r\n itemToProduct,\r\n itemToProductModule,\r\n itemToToken,\r\n itemToTransaction,\r\n\r\n // entities\r\n Bundle,\r\n Country,\r\n defineEntity,\r\n License,\r\n Licensee,\r\n LicenseTemplate,\r\n LicenseTransactionJoin,\r\n Notification,\r\n PaymentMethod,\r\n Product,\r\n ProductDiscount,\r\n ProductModule,\r\n Token,\r\n Transaction,\r\n\r\n // errors\r\n NlicError,\r\n\r\n // services\r\n BundleService,\r\n LicenseeService,\r\n LicenseService,\r\n LicenseTemplateService,\r\n NotificationService,\r\n PaymentMethodService,\r\n ProductModuleService,\r\n ProductService,\r\n Service,\r\n TokenService,\r\n TransactionService,\r\n UtilityService,\r\n\r\n // utils\r\n filterEncode,\r\n filterDecode,\r\n serialize,\r\n isValid,\r\n isDefined,\r\n ensureNotNull,\r\n ensureNotEmpty,\r\n\r\n // vo\r\n Context,\r\n Page,\r\n ValidationParameters,\r\n ValidationResults,\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst LicenseeSecretMode = Object.freeze({\r\n // @deprecated\r\n DISABLED: 'DISABLED',\r\n PREDEFINED: 'PREDEFINED',\r\n CLIENT: 'CLIENT',\r\n});\r\n\r\nexport default LicenseeSecretMode;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst LicenseType = Object.freeze({\r\n FEATURE: 'FEATURE',\r\n TIMEVOLUME: 'TIMEVOLUME',\r\n FLOATING: 'FLOATING',\r\n QUANTITY: 'QUANTITY',\r\n});\r\n\r\nexport default LicenseType;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst NotificationEvent = Object.freeze({\r\n LICENSEE_CREATED: 'LICENSEE_CREATED',\r\n LICENSE_CREATED: 'LICENSE_CREATED',\r\n WARNING_LEVEL_CHANGED: 'WARNING_LEVEL_CHANGED',\r\n PAYMENT_TRANSACTION_PROCESSED: 'PAYMENT_TRANSACTION_PROCESSED',\r\n});\r\n\r\nexport default NotificationEvent;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst NotificationProtocol = Object.freeze({\r\n WEBHOOK: 'WEBHOOK',\r\n});\r\n\r\nexport default NotificationProtocol;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst SecurityMode = Object.freeze({\r\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\r\n APIKEY_IDENTIFICATION: 'APIKEY',\r\n ANONYMOUS_IDENTIFICATION: 'ANONYMOUS',\r\n});\r\n\r\nexport default SecurityMode;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TimeVolumePeriod = Object.freeze({\r\n DAY: 'DAY',\r\n WEEK: 'WEEK',\r\n MONTH: 'MONTH',\r\n YEAR: 'YEAR',\r\n});\r\n\r\nexport default TimeVolumePeriod;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TokenType = Object.freeze({\r\n DEFAULT: 'DEFAULT',\r\n SHOP: 'SHOP',\r\n APIKEY: 'APIKEY',\r\n ACTION: 'ACTION',\r\n});\r\n\r\nexport default TokenType;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TransactionSource = Object.freeze({\r\n SHOP: 'SHOP',\r\n\r\n AUTO_LICENSE_CREATE: 'AUTO_LICENSE_CREATE',\r\n AUTO_LICENSE_UPDATE: 'AUTO_LICENSE_UPDATE',\r\n AUTO_LICENSE_DELETE: 'AUTO_LICENSE_DELETE',\r\n\r\n AUTO_LICENSEE_CREATE: 'AUTO_LICENSEE_CREATE',\r\n AUTO_LICENSEE_DELETE: 'AUTO_LICENSEE_DELETE',\r\n AUTO_LICENSEE_VALIDATE: 'AUTO_LICENSEE_VALIDATE',\r\n\r\n AUTO_LICENSETEMPLATE_DELETE: 'AUTO_LICENSETEMPLATE_DELETE',\r\n\r\n AUTO_PRODUCTMODULE_DELETE: 'AUTO_PRODUCTMODULE_DELETE',\r\n\r\n AUTO_PRODUCT_DELETE: 'AUTO_PRODUCT_DELETE',\r\n\r\n AUTO_LICENSES_TRANSFER: 'AUTO_LICENSES_TRANSFER',\r\n\r\n SUBSCRIPTION_UPDATE: 'SUBSCRIPTION_UPDATE',\r\n\r\n RECURRING_PAYMENT: 'RECURRING_PAYMENT',\r\n\r\n CANCEL_RECURRING_PAYMENT: 'CANCEL_RECURRING_PAYMENT',\r\n\r\n OBTAIN_BUNDLE: 'OBTAIN_BUNDLE',\r\n});\r\n\r\nexport default TransactionSource;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TransactionStatus = Object.freeze({\r\n PENDING: 'PENDING',\r\n CLOSED: 'CLOSED',\r\n CANCELLED: 'CANCELLED',\r\n});\r\n\r\nexport default TransactionStatus;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport LicenseeSecretMode from '@/constants/LicenseeSecretMode';\r\nimport LicenseType from '@/constants/LicenseType';\r\nimport NotificationEvent from '@/constants/NotificationEvent';\r\nimport NotificationProtocol from '@/constants/NotificationProtocol';\r\nimport SecurityMode from '@/constants/SecurityMode';\r\nimport TimeVolumePeriod from '@/constants/TimeVolumePeriod';\r\nimport TokenType from '@/constants/TokenType';\r\nimport TransactionSource from '@/constants/TransactionSource';\r\nimport TransactionStatus from '@/constants/TransactionStatus';\r\n\r\nexport default {\r\n LicenseeSecretMode,\r\n LicenseType,\r\n NotificationEvent,\r\n NotificationProtocol,\r\n SecurityMode,\r\n TimeVolumePeriod,\r\n TokenType,\r\n TransactionSource,\r\n TransactionStatus,\r\n\r\n // @deprecated use SecurityMode.BASIC_AUTHENTICATION instead\r\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\r\n\r\n // @deprecated use SecurityMode.APIKEY_IDENTIFICATION instead\r\n APIKEY_IDENTIFICATION: 'APIKEY',\r\n\r\n // @deprecated use SecurityMode.ANONYMOUS_IDENTIFICATION instead\r\n ANONYMOUS_IDENTIFICATION: 'ANONYMOUS',\r\n\r\n FILTER: 'filter',\r\n\r\n Product: {\r\n TYPE: 'Product',\r\n ENDPOINT_PATH: 'product',\r\n },\r\n\r\n ProductModule: {\r\n TYPE: 'ProductModule',\r\n ENDPOINT_PATH: 'productmodule',\r\n PRODUCT_MODULE_NUMBER: 'productModuleNumber',\r\n },\r\n\r\n Licensee: {\r\n TYPE: 'Licensee',\r\n ENDPOINT_PATH: 'licensee',\r\n ENDPOINT_PATH_VALIDATE: 'validate',\r\n ENDPOINT_PATH_TRANSFER: 'transfer',\r\n LICENSEE_NUMBER: 'licenseeNumber',\r\n },\r\n\r\n LicenseTemplate: {\r\n TYPE: 'LicenseTemplate',\r\n ENDPOINT_PATH: 'licensetemplate',\r\n\r\n // @deprecated use LicenseType directly instead\r\n LicenseType,\r\n },\r\n\r\n License: {\r\n TYPE: 'License',\r\n ENDPOINT_PATH: 'license',\r\n },\r\n\r\n Validation: {\r\n TYPE: 'ProductModuleValidation',\r\n },\r\n\r\n Token: {\r\n TYPE: 'Token',\r\n ENDPOINT_PATH: 'token',\r\n\r\n // @deprecated use TokenType directly instead\r\n Type: TokenType,\r\n },\r\n\r\n PaymentMethod: {\r\n TYPE: 'PaymentMethod',\r\n ENDPOINT_PATH: 'paymentmethod',\r\n },\r\n\r\n Bundle: {\r\n TYPE: 'Bundle',\r\n ENDPOINT_PATH: 'bundle',\r\n ENDPOINT_OBTAIN_PATH: 'obtain',\r\n },\r\n\r\n Notification: {\r\n TYPE: 'Notification',\r\n ENDPOINT_PATH: 'notification',\r\n\r\n // @deprecated use NotificationProtocol directly instead\r\n Protocol: NotificationProtocol,\r\n\r\n // @deprecated use NotificationEvent directly instead\r\n Event: NotificationEvent,\r\n },\r\n\r\n Transaction: {\r\n TYPE: 'Transaction',\r\n ENDPOINT_PATH: 'transaction',\r\n\r\n // @deprecated use TransactionStatus directly instead\r\n Status: TransactionStatus,\r\n },\r\n\r\n Utility: {\r\n ENDPOINT_PATH: 'utility',\r\n ENDPOINT_PATH_LICENSE_TYPES: 'licenseTypes',\r\n ENDPOINT_PATH_LICENSING_MODELS: 'licensingModels',\r\n ENDPOINT_PATH_COUNTRIES: 'countries',\r\n LICENSING_MODEL_TYPE: 'LicensingModelProperties',\r\n LICENSE_TYPE: 'LicenseType',\r\n COUNTRY_TYPE: 'Country',\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst ApiKeyRole = Object.freeze({\r\n ROLE_APIKEY_LICENSEE: 'ROLE_APIKEY_LICENSEE',\r\n ROLE_APIKEY_ANALYTICS: 'ROLE_APIKEY_ANALYTICS',\r\n ROLE_APIKEY_OPERATION: 'ROLE_APIKEY_OPERATION',\r\n ROLE_APIKEY_MAINTENANCE: 'ROLE_APIKEY_MAINTENANCE',\r\n ROLE_APIKEY_ADMIN: 'ROLE_APIKEY_ADMIN',\r\n});\r\n\r\nexport default ApiKeyRole;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst LicensingModel = Object.freeze({\r\n TRY_AND_BUY: 'TryAndBuy',\r\n SUBSCRIPTION: 'Subscription',\r\n RENTAL: 'Rental',\r\n FLOATING: 'Floating',\r\n MULTI_FEATURE: 'MultiFeature',\r\n PAY_PER_USE: 'PayPerUse',\r\n PRICING_TABLE: 'PricingTable',\r\n QUOTA: 'Quota',\r\n NODE_LOCKED: 'NodeLocked',\r\n DISCOUNT: 'Discount',\r\n});\r\n\r\nexport default LicensingModel;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst NodeSecretMode = Object.freeze({\r\n PREDEFINED: 'PREDEFINED',\r\n CLIENT: 'CLIENT',\r\n});\r\n\r\nexport default NodeSecretMode;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst PaymentMethodEnum = Object.freeze({\r\n NULL: 'NULL',\r\n PAYPAL: 'PAYPAL',\r\n PAYPAL_SANDBOX: 'PAYPAL_SANDBOX',\r\n STRIPE: 'STRIPE',\r\n STRIPE_TESTING: 'STRIPE_TESTING',\r\n});\r\n\r\nexport default PaymentMethodEnum;\r\n","import { Item, List } from '@/types/api/response';\r\n\r\nconst cast = (value: string): unknown => {\r\n try {\r\n return JSON.parse(value);\r\n } catch (e) {\r\n return value;\r\n }\r\n};\r\n\r\nconst extractProperties = (properties?: { name: string; value: string }[]) => {\r\n const result: Record = {};\r\n properties?.forEach(({ name, value }) => {\r\n result[name] = cast(value);\r\n });\r\n return result;\r\n};\r\n\r\nconst extractLists = (lists?: List[]) => {\r\n const result: Record = {};\r\n\r\n lists?.forEach((list) => {\r\n const { name } = list;\r\n result[name] = result[name] || [];\r\n result[name].push(itemToObject(list));\r\n });\r\n return result;\r\n};\r\n\r\nconst itemToObject = >(item?: Item | List): T => {\r\n return item ? ({ ...extractProperties(item.property), ...extractLists(item.list) } as T) : ({} as T);\r\n};\r\n\r\nexport default itemToObject;\r\n","export const has = (obj: T, key: K): boolean => {\r\n return Object.hasOwn(obj, key);\r\n};\r\n\r\nexport const set = (obj: T, key: K, value: T[K]): void => {\r\n obj[key] = value;\r\n};\r\n\r\nexport const get = (obj: T, key: K, def?: D): T[K] | D => {\r\n return has(obj, key) ? obj[key] : (def as D);\r\n};\r\n\r\nexport default {\r\n has,\r\n set,\r\n get,\r\n};\r\n","/**\r\n * Converts an object into a map of type Record, where the value of each object property is converted\r\n * to a string.\r\n * If the property's value is `undefined`, it will be replaced with an empty string.\r\n * If the value is already a string, it will remain unchanged.\r\n * If the value is Date instance, it wll be replaced with an ISO format date string.\r\n * For complex types (objects, arrays, etc.), the value will be serialized into a JSON string.\r\n * If serialization fails, the value will be converted to a string using `String()`.\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n *\r\n * @param obj - The object to be converted into a map.\r\n * @param options\r\n * @returns A map (Record) with converted property values from the object.\r\n */\r\nexport default (obj: T, options: { ignore?: string[] } = {}): Record => {\r\n const map: Record = {};\r\n\r\n const { ignore = [] } = options;\r\n\r\n Object.entries(obj).forEach(([k, v]) => {\r\n // ignore keys\r\n if (ignore.includes(k)) {\r\n return;\r\n }\r\n\r\n if (typeof v === 'function') {\r\n // ignore functions\r\n return;\r\n } else if (v === undefined) {\r\n map[k] = ''; // if the value is `undefined`, replace it with an empty string\r\n } else if (typeof v === 'string') {\r\n map[k] = v; // If the value is already a string, leave it unchanged\r\n } else if (v instanceof Date) {\r\n // if the value is Date, convert it to ISO string\r\n map[k] = v.toISOString();\r\n } else if (typeof v !== 'object' || v === null) {\r\n // If it's not an object (or is null), convert it to string\r\n map[k] = String(v);\r\n } else {\r\n // Try to serialize the object or array into JSON\r\n try {\r\n map[k] = JSON.stringify(v);\r\n } catch {\r\n map[k] = String(v);\r\n }\r\n }\r\n });\r\n\r\n return map;\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport type {\r\n Entity,\r\n EntityMethods,\r\n Proto,\r\n PropGetEventListener,\r\n PropSetEventListener,\r\n} from '@/types/entities/defineEntity';\r\n\r\n// utils\r\nimport { set, has, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\nconst defineEntity = function

(\r\n props: T,\r\n methods: M,\r\n proto: P = {} as P,\r\n options?: { set?: PropSetEventListener; get?: PropGetEventListener },\r\n) {\r\n const listeners: { set: PropSetEventListener[]; get: PropGetEventListener[] } = {\r\n set: [],\r\n get: [],\r\n };\r\n\r\n if (options?.get) {\r\n listeners.get.push(options.get);\r\n }\r\n\r\n if (options?.set) {\r\n listeners.set.push(options.set);\r\n }\r\n\r\n const base: EntityMethods = {\r\n set(this: void, key, value): void {\r\n set(props, key, value);\r\n },\r\n\r\n get(this: void, key, def) {\r\n return get(props, key, def);\r\n },\r\n\r\n has(this: void, key) {\r\n return has(props, key);\r\n },\r\n\r\n // Aliases\r\n setProperty(key, value) {\r\n this.set(key, value);\r\n },\r\n\r\n addProperty(key, value) {\r\n this.set(key, value);\r\n },\r\n\r\n getProperty(key, def) {\r\n return this.get(key, def);\r\n },\r\n\r\n hasProperty(key) {\r\n return this.has(key);\r\n },\r\n\r\n setProperties(properties) {\r\n Object.entries(properties).forEach(([k, v]) => {\r\n this.set(k as keyof T, v as T[keyof T]);\r\n });\r\n },\r\n\r\n serialize(this: void) {\r\n return serialize(props);\r\n },\r\n };\r\n\r\n return new Proxy(props, {\r\n get(obj: T, prop: string | symbol, receiver) {\r\n if (Object.hasOwn(methods, prop)) {\r\n return methods[prop as keyof typeof methods];\r\n }\r\n\r\n if (Object.hasOwn(base, prop)) {\r\n return base[prop as keyof typeof base];\r\n }\r\n\r\n listeners.get.forEach((l) => {\r\n l(obj, prop, receiver);\r\n });\r\n\r\n return Reflect.get(obj, prop, receiver);\r\n },\r\n\r\n set(obj, prop, value, receiver) {\r\n listeners.set.forEach((l) => {\r\n l(obj, prop, value, receiver);\r\n });\r\n\r\n return Reflect.set(obj, prop, value, receiver);\r\n },\r\n\r\n getPrototypeOf() {\r\n return proto.prototype || null;\r\n },\r\n }) as Entity;\r\n};\r\n\r\nexport default defineEntity;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\n// types\r\nimport type { BundleProps, BundleMethods, BundleEntity } from '@/types/entities/Bundle';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n// entity factory\r\nimport defineEntity from './defineEntity';\r\n\r\n/**\r\n * NetLicensing Bundle entity.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number that identifies the bundle. Vendor can assign this number when creating a bundle or\r\n * let NetLicensing generate one.\r\n * @property string number\r\n *\r\n * If set to false, the bundle is disabled.\r\n * @property boolean active\r\n *\r\n * Bundle name.\r\n * @property string name\r\n *\r\n * Price for the bundle. If >0, it must always be accompanied by the currency specification.\r\n * @property number price\r\n *\r\n * Specifies currency for the bundle price. Check data types to discover which currencies are\r\n * supported.\r\n * @property string currency\r\n *\r\n * The bundle includes a set of templates, each identified by a unique template number.\r\n * @property string[] licenseTemplateNumbers\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each bundle. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted.\r\n */\r\nconst Bundle = function (properties: BundleProps = {} as BundleProps): BundleEntity {\r\n const props: BundleProps = { ...properties };\r\n\r\n const methods: BundleMethods = {\r\n setActive(this: void, active: boolean) {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string) {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setPrice(this: void, price: number): void {\r\n set(props, 'price', price);\r\n },\r\n\r\n getPrice(this: void, def?: D): number | D {\r\n return get(props, 'price', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setLicenseTemplateNumbers(this: void, numbers: string[]): void {\r\n set(props, 'licenseTemplateNumbers', numbers);\r\n },\r\n\r\n addLicenseTemplateNumber(this: void, number: string): void {\r\n if (!props.licenseTemplateNumbers) {\r\n props.licenseTemplateNumbers = [];\r\n }\r\n\r\n props.licenseTemplateNumbers.push(number);\r\n },\r\n\r\n getLicenseTemplateNumbers(this: void, def?: D): string[] | D {\r\n return get(props, 'licenseTemplateNumbers', def) as string[] | D;\r\n },\r\n\r\n removeLicenseTemplateNumber(this: void, number: string): void {\r\n const { licenseTemplateNumbers: numbers = [] } = props;\r\n\r\n numbers.splice(numbers.indexOf(number), 1);\r\n props.licenseTemplateNumbers = numbers;\r\n },\r\n\r\n serialize(this: void): Record {\r\n if (props.licenseTemplateNumbers) {\r\n const licenseTemplateNumbers = props.licenseTemplateNumbers.join(',');\r\n return serialize({ ...props, licenseTemplateNumbers });\r\n }\r\n\r\n return serialize(props);\r\n },\r\n };\r\n\r\n return defineEntity(props as BundleProps, methods, Bundle);\r\n};\r\n\r\nexport default Bundle;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Bundle from '@/entities/Bundle';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { BundleProps } from '@/types/entities/Bundle';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { licenseTemplateNumbers } = props;\r\n\r\n if (licenseTemplateNumbers && typeof licenseTemplateNumbers === 'string') {\r\n props.licenseTemplateNumbers = licenseTemplateNumbers.split(',');\r\n }\r\n\r\n return Bundle(props as BundleProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport type { CountryProps, CountryMethods, CountryEntity } from '@/types/entities/Country';\r\n\r\n// entity factory\r\nimport defineEntity from './defineEntity';\r\n\r\n/**\r\n * Country entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * @property code - Unique code of country.\r\n * @property name - Unique name of country\r\n * @property vatPercent - Country vat.\r\n * @property isEu - is country in EU.\r\n */\r\nconst Country = function (properties: CountryProps = {} as CountryProps): CountryEntity {\r\n const defaults: CountryProps = {\r\n code: '',\r\n name: '',\r\n vatPercent: 0,\r\n isEu: false,\r\n };\r\n\r\n const props: CountryProps = { ...defaults, ...properties };\r\n\r\n const methods: CountryMethods = {\r\n getCode(this: void): string {\r\n return props.code;\r\n },\r\n\r\n getName(this: void): string {\r\n return props.name;\r\n },\r\n\r\n getVatPercent(this: void): number {\r\n return props.vatPercent as number;\r\n },\r\n\r\n getIsEu(this: void): boolean {\r\n return props.isEu;\r\n },\r\n };\r\n\r\n return defineEntity(props, methods, Country);\r\n};\r\n\r\nexport default Country;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// entities\r\nimport Country from '@/entities/Country';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { CountryProps } from '@/types/entities/Country';\r\n\r\nexport default (item?: Item) => Country(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport { TimeVolumePeriodValues } from '@/types/constants/TimeVolumePeriod';\r\nimport { LicenseMethods, LicenseProps, LicenseEntity } from '@/types/entities/License';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n// entity factory\r\nimport defineEntity from './defineEntity';\r\n\r\n/**\r\n * License entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can\r\n * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation\r\n * transaction status is set to closed.\r\n * @property string number\r\n *\r\n * Name for the licensed item. Set from license template on creation, if not specified explicitly.\r\n * @property string name\r\n *\r\n * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled,\r\n * the license is excluded from the validation process.\r\n * @property boolean active\r\n *\r\n * price for the license. If >0, it must always be accompanied by the currency specification. Read-only,\r\n * set from license template on creation.\r\n * @property number price\r\n *\r\n * specifies currency for the license price. Check data types to discover which currencies are\r\n * supported. Read-only, set from license template on creation.\r\n * @property string currency\r\n *\r\n * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license\r\n * template on creation, if not specified explicitly.\r\n * @property boolean hidden\r\n *\r\n * The unique identifier assigned to the licensee (the entity to whom the license is issued). This number is typically\r\n * associated with a specific customer or organization. It is used internally to reference the licensee and cannot be\r\n * changed after the license is created.\r\n * @property string licenseeNumber\r\n *\r\n * The unique identifier for the license template from which this license was created.\r\n * @property string licenseTemplateNumber\r\n *\r\n * A boolean flag indicating whether the license is actively being used. If true, it means the license is currently in\r\n * use. If false, the license is not currently assigned or in use.\r\n * @property boolean inUse\r\n *\r\n * This parameter is specific to TimeVolume licenses and indicates the total volume of time (e.g., in hours, days, etc.)\r\n * associated with the license. This value defines the amount of time the license covers, which may affect the usage\r\n * period and limits associated with the license.\r\n * @property number timeVolume\r\n *\r\n * Also, specific to TimeVolume licenses, this field defines the period of time for the timeVolume\r\n * (e.g., \"DAY\", \"WEEK\", \"MONTH\", \"YEAR\"). It provides the time unit for the timeVolume value, clarifying whether the\r\n * time is measured in days, weeks, or any other defined period.\r\n * @property string timeVolumePeriod\r\n *\r\n * For TimeVolume licenses, this field indicates the start date of the license’s validity period. This date marks when\r\n * the license becomes active and the associated time volume starts being consumed.\r\n * It can be represented as a string \"now\" or a Date object.\r\n * @property string|Date Date startDate\r\n *\r\n * Parent(Feature) license number\r\n * @property string parentfeature\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each license. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber,\r\n * licenseTemplateNumber.\r\n */\r\nconst License = function (properties: LicenseProps = {} as LicenseProps): LicenseEntity {\r\n const props: LicenseProps = { ...(properties as T) };\r\n\r\n const methods: LicenseMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setPrice(this: void, price: number): void {\r\n set(props, 'price', price);\r\n },\r\n\r\n getPrice(this: void, def?: D): number | D {\r\n return get(props, 'price', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setHidden(this: void, hidden: boolean): void {\r\n set(props, 'hidden', hidden);\r\n },\r\n\r\n getHidden(this: void, def?: D): boolean | D {\r\n return get(props, 'hidden', def) as boolean | D;\r\n },\r\n\r\n setLicenseeNumber(this: void, number: string): void {\r\n set(props, 'licenseeNumber', number);\r\n },\r\n\r\n getLicenseeNumber(this: void, def?: D): string | D {\r\n return get(props, 'licenseeNumber', def) as string | D;\r\n },\r\n\r\n setLicenseTemplateNumber(this: void, number: string): void {\r\n set(props, 'licenseTemplateNumber', number);\r\n },\r\n\r\n getLicenseTemplateNumber(this: void, def?: D): string | D {\r\n return get(props, 'licenseTemplateNumber', def) as string | D;\r\n },\r\n\r\n // TimeVolume\r\n setTimeVolume(this: void, timeVolume: number): void {\r\n set(props, 'timeVolume', timeVolume);\r\n },\r\n\r\n getTimeVolume(this: void, def?: D): number | D {\r\n return get(props, 'timeVolume', def) as number | D;\r\n },\r\n\r\n setTimeVolumePeriod(this: void, timeVolumePeriod: TimeVolumePeriodValues): void {\r\n set(props, 'timeVolumePeriod', timeVolumePeriod);\r\n },\r\n\r\n getTimeVolumePeriod(this: void, def?: D): TimeVolumePeriodValues | D {\r\n return get(props, 'timeVolumePeriod', def) as TimeVolumePeriodValues | D;\r\n },\r\n\r\n setStartDate(this: void, startDate: Date | 'now'): void {\r\n set(props, 'startDate', startDate);\r\n },\r\n\r\n getStartDate(this: void, def?: D): Date | 'now' | D {\r\n return get(props, 'startDate', def) as Date | 'now' | D;\r\n },\r\n\r\n // Rental\r\n setParentfeature(this: void, parentfeature?: string): void {\r\n set(props, 'parentfeature', parentfeature);\r\n },\r\n\r\n getParentfeature(this: void, def?: D): string | D {\r\n return get(props, 'parentfeature', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as LicenseProps, methods, License);\r\n};\r\n\r\nexport default License;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport License from '@/entities/License';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { LicenseProps } from '@/types/entities/License';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { startDate } = props;\r\n\r\n if (startDate && typeof startDate === 'string') {\r\n props.startDate = startDate === 'now' ? startDate : new Date(startDate);\r\n }\r\n\r\n return License(props as LicenseProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { LicenseeMethods, LicenseeProps, LicenseeEntity } from '@/types/entities/Licensee';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * Licensee entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this\r\n * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for\r\n * the licensee.\r\n * @property string number\r\n *\r\n * Licensee name.\r\n * @property string name\r\n *\r\n * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is\r\n * disabled (tbd).\r\n * @property boolean active\r\n *\r\n * Licensee Secret for licensee deprecated use Node-Locked Licensing Model instead\r\n * @property string licenseeSecret\r\n *\r\n * Mark licensee for transfer.\r\n * @property boolean markedForTransfer\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber\r\n */\r\n\r\nconst Licensee = function (properties: LicenseeProps = {} as LicenseeProps): LicenseeEntity {\r\n const props: LicenseeProps = { ...properties };\r\n\r\n const methods: LicenseeMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setProductNumber(this: void, number: string): void {\r\n set(props, 'productNumber', number);\r\n },\r\n\r\n getProductNumber(this: void, def?: D): string | D {\r\n return get(props, 'productNumber', def) as string | D;\r\n },\r\n\r\n setMarkedForTransfer(this: void, mark: boolean): void {\r\n set(props, 'markedForTransfer', mark);\r\n },\r\n\r\n getMarkedForTransfer(this: void, def?: D): boolean | D {\r\n return get(props, 'markedForTransfer', def) as boolean | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as LicenseeProps, methods, Licensee);\r\n};\r\n\r\nexport default Licensee;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Licensee from '@/entities/Licensee';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { LicenseeProps } from '@/types/entities/Licensee';\r\n\r\nexport default (item?: Item) => Licensee(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { LicenseTypeValues } from '@/types/constants/LicenseType';\r\nimport { TimeVolumePeriodValues } from '@/types/constants/TimeVolumePeriod';\r\nimport { LicenseTemplateMethods, LicenseTemplateProps, LicenseTemplateEntity } from '@/types/entities/LicenseTemplate';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * License template entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the license template. Vendor can\r\n * assign this number when creating a license template or let NetLicensing generate one.\r\n * Read-only after creation of the first license from this license template.\r\n * @property string number\r\n *\r\n * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this\r\n * license template.\r\n * @property boolean active\r\n *\r\n * Name for the licensed item.\r\n * @property string name\r\n *\r\n * Type of licenses created from this license template. Supported types: \"FEATURE\", \"TIMEVOLUME\",\r\n * \"FLOATING\", \"QUANTITY\"\r\n * @property string licenseType\r\n *\r\n * Price for the license. If >0, it must always be accompanied by the currency specification.\r\n * @property number price\r\n *\r\n * Specifies currency for the license price. Check data types to discover which currencies are\r\n * supported.\r\n * @property string currency\r\n *\r\n * If set to true, every new licensee automatically gets one license out of this license template on\r\n * creation. Automatic licenses must have their price set to 0.\r\n * @property boolean automatic\r\n *\r\n * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase.\r\n * @property boolean hidden\r\n *\r\n * If set to true, licenses from this license template are not visible to the end customer, but\r\n * participate in validation.\r\n * @property boolean hideLicenses\r\n *\r\n * If set to true, this license template defines grace period of validity granted after subscription expiration.\r\n * @property boolean gracePeriod\r\n *\r\n * Mandatory for 'TIMEVOLUME' license type.\r\n * @property number timeVolume\r\n *\r\n * Time volume period for 'TIMEVOLUME' license type. Supported types: \"DAY\", \"WEEK\", \"MONTH\", \"YEAR\"\r\n * @property string timeVolumePeriod\r\n *\r\n * Mandatory for 'FLOATING' license type.\r\n * @property number maxSessions\r\n *\r\n * Mandatory for 'QUANTITY' license type.\r\n * @property number quantity\r\n */\r\n\r\nconst LicenseTemplate = function (\r\n properties: LicenseTemplateProps = {} as LicenseTemplateProps,\r\n): LicenseTemplateEntity {\r\n const props: LicenseTemplateProps = { ...properties };\r\n\r\n const methods: LicenseTemplateMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setLicenseType(this: void, type: LicenseTypeValues): void {\r\n set(props, 'licenseType', type);\r\n },\r\n\r\n getLicenseType(this: void, def?: D): LicenseTypeValues | D {\r\n return get(props, 'licenseType', def) as LicenseTypeValues | D;\r\n },\r\n\r\n setPrice(this: void, price: number): void {\r\n set(props, 'price', price);\r\n },\r\n\r\n getPrice(this: void, def?: D): number | D {\r\n return get(props, 'price', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setAutomatic(this: void, automatic: boolean): void {\r\n set(props, 'automatic', automatic);\r\n },\r\n\r\n getAutomatic(this: void, def?: D): boolean | D {\r\n return get(props, 'automatic', def) as boolean | D;\r\n },\r\n\r\n setHidden(this: void, hidden: boolean): void {\r\n set(props, 'hidden', hidden);\r\n },\r\n\r\n getHidden(this: void, def?: D): boolean | D {\r\n return get(props, 'hidden', def) as boolean | D;\r\n },\r\n\r\n setHideLicenses(this: void, hideLicenses: boolean): void {\r\n set(props, 'hideLicenses', hideLicenses);\r\n },\r\n\r\n getHideLicenses(this: void, def?: D): boolean | D {\r\n return get(props, 'hideLicenses', def) as boolean | D;\r\n },\r\n\r\n setGracePeriod(this: void, gradePeriod: boolean): void {\r\n set(props, 'gracePeriod', gradePeriod);\r\n },\r\n\r\n getGracePeriod(this: void, def?: D): boolean | D {\r\n return get(props, 'gracePeriod', def) as boolean | D;\r\n },\r\n\r\n setTimeVolume(this: void, timeVolume: number): void {\r\n set(props, 'timeVolume', timeVolume);\r\n },\r\n\r\n getTimeVolume(this: void, def?: D): number | D {\r\n return get(props, 'timeVolume', def) as number | D;\r\n },\r\n\r\n setTimeVolumePeriod(this: void, timeVolumePeriod: TimeVolumePeriodValues): void {\r\n set(props, 'timeVolumePeriod', timeVolumePeriod);\r\n },\r\n\r\n getTimeVolumePeriod(this: void, def?: D): TimeVolumePeriodValues | D {\r\n return get(props, 'timeVolumePeriod', def) as TimeVolumePeriodValues | D;\r\n },\r\n\r\n setMaxSessions(this: void, maxSessions: number): void {\r\n set(props, 'maxSessions', maxSessions);\r\n },\r\n\r\n getMaxSessions(this: void, def?: D): number | D {\r\n return get(props, 'maxSessions', def) as number | D;\r\n },\r\n\r\n setQuantity(this: void, quantity: number): void {\r\n set(props, 'quantity', quantity);\r\n },\r\n\r\n getQuantity(this: void, def?: D): number | D {\r\n return get(props, 'quantity', def) as number | D;\r\n },\r\n\r\n setProductModuleNumber(this: void, productModuleNumber: string): void {\r\n set(props, 'productModuleNumber', productModuleNumber);\r\n },\r\n\r\n getProductModuleNumber(this: void, def?: D): string | D {\r\n return get(props, 'productModuleNumber', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as LicenseTemplateProps, methods, LicenseTemplate);\r\n};\r\n\r\nexport default LicenseTemplate;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport LicenseTemplate from '@/entities/LicenseTemplate';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { LicenseTemplateProps } from '@/types/entities/LicenseTemplate';\r\n\r\nexport default (item?: Item) => LicenseTemplate(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\nimport { NotificationEventValues } from '@/types/constants/NotificationEvent';\r\nimport { NotificationProtocolValues } from '@/types/constants/NotificationProtocol';\r\n\r\n// types\r\nimport { NotificationMethods, NotificationProps, NotificationEntity } from '@/types/entities/Notification';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * NetLicensing Notification entity.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number that identifies the notification. Vendor can assign this number when creating a notification or\r\n * let NetLicensing generate one.\r\n * @property string number\r\n *\r\n * If set to false, the notification is disabled. The notification will not be fired when the event triggered.\r\n * @property boolean active\r\n *\r\n * Notification name.\r\n * @property string name\r\n *\r\n * Notification type. Indicate the method of transmitting notification, ex: EMAIL, WEBHOOK.\r\n * @property float type\r\n *\r\n * Comma separated string of events that fire the notification when emitted.\r\n * @property string events\r\n *\r\n * Notification response payload.\r\n * @property string payload\r\n *\r\n * Notification response url. Optional. Uses only for WEBHOOK type notification.\r\n * @property string url\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each notification.\r\n * The name of user property must not be equal to any of the fixed property names listed above and must be none of id,\r\n * deleted.\r\n */\r\n\r\nconst Notification = function (\r\n properties: NotificationProps = {} as NotificationProps,\r\n): NotificationEntity {\r\n const props: NotificationProps = { ...properties };\r\n\r\n const methods: NotificationMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setProtocol(this: void, protocol: NotificationProtocolValues): void {\r\n set(props, 'protocol', protocol);\r\n },\r\n\r\n getProtocol(this: void, def?: D): NotificationProtocolValues | D {\r\n return get(props, 'protocol', def) as NotificationProtocolValues | D;\r\n },\r\n\r\n setEvents(this: void, events: NotificationEventValues[]): void {\r\n set(props, 'events', events);\r\n },\r\n\r\n getEvents(this: void, def?: D): NotificationEventValues[] | D {\r\n return get(props, 'events', def) as NotificationEventValues[] | D;\r\n },\r\n\r\n addEvent(event: NotificationEventValues): void {\r\n const events = this.getEvents([]) as NotificationEventValues[];\r\n events.push(event);\r\n\r\n this.setEvents(events);\r\n },\r\n\r\n setPayload(this: void, payload: string): void {\r\n set(props, 'payload', payload);\r\n },\r\n\r\n getPayload(this: void, def?: D): string | D {\r\n return get(props, 'payload', def) as string | D;\r\n },\r\n\r\n setEndpoint(this: void, endpoint: string): void {\r\n set(props, 'endpoint', endpoint);\r\n },\r\n\r\n getEndpoint(this: void, def?: D): string | D {\r\n return get(props, 'endpoint', def) as string | D;\r\n },\r\n\r\n serialize(): Record {\r\n const data = serialize(props);\r\n\r\n if (data.events) {\r\n data.events = this.getEvents([]).join(',');\r\n }\r\n\r\n return data;\r\n },\r\n };\r\n\r\n return defineEntity(props as NotificationProps, methods, Notification);\r\n};\r\n\r\nexport default Notification;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Notification from '@/entities/Notification';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { NotificationProps } from '@/types/entities/Notification';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { events } = props;\r\n\r\n if (events && typeof events === 'string') {\r\n props.events = events.split(',');\r\n }\r\n\r\n return Notification(props as NotificationProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { PaymentMethodMethods, PaymentMethodProps, PaymentMethodEntity } from '@/types/entities/PaymentMethod';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\n\r\n/**\r\n * PaymentMethod entity used internally by NetLicensing.\r\n *\r\n * @property string number\r\n * @property boolean active\r\n * @property string paypal.subject\r\n */\r\nconst PaymentMethod = function (\r\n properties: PaymentMethodProps = {} as PaymentMethodProps,\r\n): PaymentMethodEntity {\r\n const props: PaymentMethodProps = { ...properties };\r\n\r\n const methods: PaymentMethodMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n };\r\n\r\n return defineEntity(props as PaymentMethodProps, methods, PaymentMethod);\r\n};\r\n\r\nexport default PaymentMethod;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport PaymentMethod from '@/entities/PaymentMethod';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { PaymentMethodProps } from '@/types/entities/PaymentMethod';\r\n\r\nexport default (item?: Item) => PaymentMethod(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { ProductProps, ProductEntity, ProductMethods } from '@/types/entities/Product';\r\nimport { ProductDiscountEntity } from '@/types/entities/ProductDiscount';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * NetLicensing Product entity.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number that identifies the product. Vendor can assign this number when creating a product or\r\n * let NetLicensing generate one. Read-only after creation of the first licensee for the product.\r\n * @property string number\r\n *\r\n * If set to false, the product is disabled. No new licensees can be registered for the product,\r\n * existing licensees can not obtain new licenses.\r\n * @property boolean active\r\n *\r\n * Product name. Together with the version identifies the product for the end customer.\r\n * @property string name\r\n *\r\n * Product version. Convenience parameter, additional to the product name.\r\n * @property string version\r\n *\r\n * If set to 'true', non-existing licensees will be created at first validation attempt.\r\n * @property boolean licenseeAutoCreate\r\n *\r\n * Licensee secret mode for product.Supported types: \"DISABLED\", \"PREDEFINED\", \"CLIENT\"\r\n * @property boolean licenseeSecretMode\r\n *\r\n * Product description. Optional.\r\n * @property string description\r\n *\r\n * Licensing information. Optional.\r\n * @property string licensingInfo\r\n *\r\n * @property boolean inUse\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each product. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted.\r\n */\r\nconst Product = function (\r\n properties: ProductProps = {} as ProductProps,\r\n): ProductEntity {\r\n const props: ProductProps = { ...properties };\r\n\r\n const methods: ProductMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setVersion(this: void, version: string): void {\r\n set(props, 'version', version);\r\n },\r\n\r\n getVersion(this: void, def?: D): string | number | D {\r\n return get(props, 'version', def) as string | number | D;\r\n },\r\n\r\n setDescription(this: void, description: string): void {\r\n set(props, 'description', description);\r\n },\r\n\r\n getDescription(this: void, def?: D): string | D {\r\n return get(props, 'description', def) as string | D;\r\n },\r\n\r\n setLicensingInfo(this: void, licensingInfo: string): void {\r\n set(props, 'licensingInfo', licensingInfo);\r\n },\r\n\r\n getLicensingInfo(this: void, def?: D): string | D {\r\n return get(props, 'licensingInfo', def) as string | D;\r\n },\r\n\r\n setLicenseeAutoCreate(this: void, licenseeAutoCreate: boolean): void {\r\n set(props, 'licenseeAutoCreate', licenseeAutoCreate);\r\n },\r\n\r\n getLicenseeAutoCreate(this: void, def?: D): boolean | D {\r\n return get(props, 'licenseeAutoCreate', def) as boolean | D;\r\n },\r\n\r\n setDiscounts(this: void, discounts: ProductDiscountEntity[]): void {\r\n set(props, 'discounts', discounts);\r\n },\r\n\r\n getDiscounts(this: void, def?: D): ProductDiscountEntity[] | D {\r\n return get(props, 'discounts', def) as ProductDiscountEntity[] | D;\r\n },\r\n\r\n addDiscount(discount: ProductDiscountEntity): void {\r\n const discounts = this.getDiscounts([] as ProductDiscountEntity[]);\r\n discounts.push(discount);\r\n\r\n this.setDiscounts(discounts);\r\n },\r\n\r\n removeDiscount(discount: ProductDiscountEntity): void {\r\n const discounts = this.getDiscounts();\r\n\r\n if (Array.isArray(discounts) && discounts.length > 0) {\r\n discounts.splice(discounts.indexOf(discount), 1);\r\n this.setDiscounts(discounts);\r\n }\r\n },\r\n\r\n setProductDiscounts(productDiscounts: ProductDiscountEntity[]): void {\r\n this.setDiscounts(productDiscounts);\r\n },\r\n\r\n getProductDiscounts(def?: D): ProductDiscountEntity[] | D {\r\n return this.getDiscounts(def);\r\n },\r\n\r\n serialize(): Record {\r\n const map: Record = serialize(props, { ignore: ['discounts', 'inUse'] });\r\n const discounts = this.getDiscounts();\r\n\r\n if (discounts) {\r\n map.discount = discounts.length > 0 ? discounts.map((discount) => discount.toString()) : '';\r\n }\r\n\r\n return map;\r\n },\r\n };\r\n\r\n return defineEntity(props as ProductProps, methods, Product);\r\n};\r\n\r\nexport default Product;\r\n","import { AxiosError, AxiosResponse, InternalAxiosRequestConfig } from 'axios';\r\n\r\nexport default class NlicError extends AxiosError {\r\n isNlicError = true;\r\n\r\n constructor(\r\n message?: string,\r\n code?: string,\r\n config?: InternalAxiosRequestConfig,\r\n request?: unknown,\r\n response?: AxiosResponse,\r\n stack?: string,\r\n ) {\r\n super(message, code, config, request, response);\r\n this.name = 'NlicError';\r\n\r\n if (stack) {\r\n this.stack = stack;\r\n }\r\n\r\n Object.setPrototypeOf(this, NlicError.prototype);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// errors\r\nimport NlicError from '@/errors/NlicError';\r\n\r\n// types\r\nimport { ProductDiscountMethods, ProductDiscountProps, ProductDiscountEntity } from '@/types/entities/ProductDiscount';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\n\r\nconst ProductDiscount = function (\r\n properties: ProductDiscountProps = {} as ProductDiscountProps,\r\n): ProductDiscountEntity {\r\n const props: ProductDiscountProps = { ...properties };\r\n\r\n if (props.amountFix && props.amountPercent) {\r\n throw new NlicError('Properties \"amountFix\" and \"amountPercent\" cannot be used at the same time');\r\n }\r\n\r\n const methods: ProductDiscountMethods = {\r\n setTotalPrice(this: void, totalPrice: number): void {\r\n set(props, 'totalPrice', totalPrice);\r\n },\r\n\r\n getTotalPrice(this: void, def?: D): number | D {\r\n return get(props, 'totalPrice', def) as number | D;\r\n },\r\n\r\n setCurrency(currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setAmountFix(this: void, amountFix: number): void {\r\n set(props, 'amountFix', amountFix);\r\n },\r\n\r\n getAmountFix(this: void, def?: D): number | D {\r\n return get(props, 'amountFix', def) as number | D;\r\n },\r\n\r\n setAmountPercent(this: void, amountPercent: number): void {\r\n set(props, 'amountPercent', amountPercent);\r\n },\r\n\r\n getAmountPercent(this: void, def?: D): number | D {\r\n return get(props, 'amountPercent', def) as number | D;\r\n },\r\n\r\n toString() {\r\n const total = this.getTotalPrice();\r\n const currency = this.getCurrency();\r\n const amount = this.getAmountPercent() ? `${this.getAmountPercent()}%` : this.getAmountFix();\r\n\r\n return total && currency && amount ? `${total};${currency};${amount}` : '';\r\n },\r\n };\r\n\r\n return defineEntity(props, methods, ProductDiscount, {\r\n set: (obj, prop) => {\r\n if (prop === 'amountFix') {\r\n delete obj.amountPercent;\r\n }\r\n\r\n if (prop === 'amountPercent') {\r\n delete obj.amountFix;\r\n }\r\n },\r\n });\r\n};\r\n\r\nexport default ProductDiscount;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Product from '@/entities/Product';\r\nimport ProductDiscount from '@/entities/ProductDiscount';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { ProductProps } from '@/types/entities/Product';\r\nimport { ProductDiscountEntity } from '@/types/entities/ProductDiscount';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const discounts: ProductDiscountEntity[] | undefined = props.discount as ProductDiscountEntity[] | undefined;\r\n delete props.discount;\r\n\r\n if (discounts) {\r\n props.discounts = discounts.map((d) => ProductDiscount(d));\r\n }\r\n\r\n return Product(props as ProductProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\nimport { LicensingModelValues } from '@/types/constants/LicensingModel';\r\n\r\n// types\r\nimport { ProductModuleEntity, ProductModuleMethods, ProductModuleProps } from '@/types/entities/ProductModule';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * Product module entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign\r\n * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first\r\n * licensee for the product.\r\n * @property string number\r\n *\r\n * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this\r\n * product module.\r\n * @property boolean active\r\n *\r\n * Product module name that is visible to the end customers in NetLicensing Shop.\r\n * @property string name\r\n *\r\n * Licensing model applied to this product module. Defines what license templates can be\r\n * configured for the product module and how licenses for this product module are processed during validation.\r\n * @property string licensingModel\r\n *\r\n * Maximum checkout validity (days). Mandatory for 'Floating' licensing model.\r\n * @property number maxCheckoutValidity\r\n *\r\n * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model.\r\n * @property number yellowThreshold\r\n *\r\n * Remaining time volume for red level. Mandatory for 'Rental' licensing model.\r\n * @property number redThreshold\r\n */\r\n\r\nconst ProductModule = function (\r\n properties: ProductModuleProps = {} as ProductModuleProps,\r\n): ProductModuleEntity {\r\n const props: ProductModuleProps = { ...properties };\r\n\r\n const methods: ProductModuleMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setLicensingModel(licensingModel: LicensingModelValues): void {\r\n set(props, 'licensingModel', licensingModel);\r\n },\r\n\r\n getLicensingModel(this: void, def?: D): LicensingModelValues | D {\r\n return get(props, 'licensingModel', def) as LicensingModelValues | D;\r\n },\r\n\r\n setMaxCheckoutValidity(this: void, maxCheckoutValidity: number): void {\r\n set(props, 'maxCheckoutValidity', maxCheckoutValidity);\r\n },\r\n\r\n getMaxCheckoutValidity(this: void, def?: D): number | D {\r\n return get(props, 'maxCheckoutValidity', def) as number | D;\r\n },\r\n\r\n setYellowThreshold(this: void, yellowThreshold: number): void {\r\n set(props, 'yellowThreshold', yellowThreshold);\r\n },\r\n\r\n getYellowThreshold(this: void, def?: D): number | D {\r\n return get(props, 'yellowThreshold', def) as number | D;\r\n },\r\n\r\n setRedThreshold(this: void, redThreshold: number): void {\r\n set(props, 'redThreshold', redThreshold);\r\n },\r\n\r\n getRedThreshold(this: void, def?: D): number | D {\r\n return get(props, 'redThreshold', def) as number | D;\r\n },\r\n\r\n setProductNumber(this: void, productNumber: string): void {\r\n set(props, 'productNumber', productNumber);\r\n },\r\n\r\n getProductNumber(this: void, def?: D): string | D {\r\n return get(props, 'productNumber', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as ProductModuleProps, methods, ProductModule);\r\n};\r\n\r\nexport default ProductModule;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport ProductModule from '@/entities/ProductModule';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { ProductModuleProps } from '@/types/entities/ProductModule';\r\n\r\nexport default (item?: Item) => ProductModule(itemToObject(item));\r\n","/**\r\n * Token\r\n *\r\n * @see https://netlicensing.io/wiki/token-services#create-token\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n *\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { ApiKeyRoleValues } from '@/types/constants/ApiKeyRole';\r\nimport { TokenTypeValues } from '@/types/constants/TokenType';\r\nimport { TokenProps, TokenEntity, TokenMethods } from '@/types/entities/Token';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\nconst Token = function (properties: TokenProps = {} as TokenProps): TokenEntity {\r\n const props: TokenProps = { ...properties };\r\n\r\n const methods: TokenMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setExpirationTime(this: void, expirationTime: Date): void {\r\n set(props, 'expirationTime', expirationTime);\r\n },\r\n\r\n getExpirationTime(this: void, def?: D): Date | D {\r\n return get(props, 'expirationTime', def) as Date | D;\r\n },\r\n\r\n setTokenType(this: void, tokenType: TokenTypeValues): void {\r\n set(props, 'tokenType', tokenType);\r\n },\r\n\r\n getTokenType(this: void, def?: D): TokenTypeValues | D {\r\n return get(props, 'tokenType', def) as TokenTypeValues | D;\r\n },\r\n\r\n setLicenseeNumber(this: void, licenseeNumber: string): void {\r\n set(props, 'licenseeNumber', licenseeNumber);\r\n },\r\n\r\n getLicenseeNumber(this: void, def?: D): string | D {\r\n return get(props, 'licenseeNumber', def) as string | D;\r\n },\r\n\r\n setAction(this: void, action: string): void {\r\n set(props, 'action', action);\r\n },\r\n\r\n getAction(this: void, def?: D): string | D {\r\n return get(props, 'action', def) as string | D;\r\n },\r\n\r\n setApiKeyRole(this: void, apiKeyRole: ApiKeyRoleValues): void {\r\n set(props, 'apiKeyRole', apiKeyRole);\r\n },\r\n\r\n getApiKeyRole(this: void, def?: D): ApiKeyRoleValues | D {\r\n return get(props, 'apiKeyRole', def) as ApiKeyRoleValues | D;\r\n },\r\n\r\n setBundleNumber(this: void, bundleNumber: string): void {\r\n set(props, 'bundleNumber', bundleNumber);\r\n },\r\n\r\n getBundleNumber(this: void, def?: D): string | D {\r\n return get(props, 'bundleNumber', def) as string | D;\r\n },\r\n\r\n setBundlePrice(this: void, bundlePrice: number): void {\r\n set(props, 'bundlePrice', bundlePrice);\r\n },\r\n\r\n getBundlePrice(this: void, def?: D): number | D {\r\n return get(props, 'bundlePrice', def) as number | D;\r\n },\r\n\r\n setProductNumber(this: void, productNumber: string): void {\r\n set(props, 'productNumber', productNumber);\r\n },\r\n\r\n getProductNumber(this: void, def?: D): string | D {\r\n return get(props, 'productNumber', def) as string | D;\r\n },\r\n\r\n setPredefinedShoppingItem(this: void, predefinedShoppingItem: string): void {\r\n set(props, 'predefinedShoppingItem', predefinedShoppingItem);\r\n },\r\n\r\n getPredefinedShoppingItem(this: void, def?: D): string | D {\r\n return get(props, 'predefinedShoppingItem', def) as string | D;\r\n },\r\n\r\n setSuccessURL(this: void, successURL: string): void {\r\n set(props, 'successURL', successURL);\r\n },\r\n\r\n getSuccessURL(this: void, def?: D): string | D {\r\n return get(props, 'successURL', def) as string | D;\r\n },\r\n\r\n setSuccessURLTitle(this: void, successURLTitle: string): void {\r\n set(props, 'successURLTitle', successURLTitle);\r\n },\r\n\r\n getSuccessURLTitle(this: void, def?: D): string | D {\r\n return get(props, 'successURLTitle', def) as string | D;\r\n },\r\n\r\n setCancelURL(this: void, cancelURL: string): void {\r\n set(props, 'cancelURL', cancelURL);\r\n },\r\n\r\n getCancelURL(this: void, def?: D): string | D {\r\n return get(props, 'cancelURL', def) as string | D;\r\n },\r\n\r\n setCancelURLTitle(this: void, cancelURLTitle: string): void {\r\n set(props, 'cancelURLTitle', cancelURLTitle);\r\n },\r\n\r\n getCancelURLTitle(this: void, def?: D): string | D {\r\n return get(props, 'cancelURLTitle', def) as string | D;\r\n },\r\n\r\n getShopURL(this: void, def?: D): string | D {\r\n return get(props, 'shopURL', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['shopURL'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as TokenProps, methods, Token);\r\n};\r\n\r\nexport default Token;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Token from '@/entities/Token';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { TokenProps } from '@/types/entities/Token';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { expirationTime } = props;\r\n\r\n if (expirationTime && typeof expirationTime === 'string') {\r\n props.expirationTime = new Date(expirationTime);\r\n }\r\n\r\n return Token(props as TokenProps);\r\n};\r\n","// types\r\nimport type { LicenseEntity } from '@/types/entities/License';\r\nimport type { LicenseTransactionJoinEntity as ILicenseTransactionJoin } from '@/types/entities/LicenseTransactionJoin';\r\nimport type { TransactionEntity } from '@/types/entities/Transaction';\r\n\r\n/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nclass LicenseTransactionJoin implements ILicenseTransactionJoin {\r\n transaction: TransactionEntity;\r\n license: LicenseEntity;\r\n\r\n constructor(transaction: TransactionEntity, license: LicenseEntity) {\r\n this.transaction = transaction;\r\n this.license = license;\r\n }\r\n\r\n setTransaction(transaction: TransactionEntity): void {\r\n this.transaction = transaction;\r\n }\r\n\r\n getTransaction(): TransactionEntity {\r\n return this.transaction;\r\n }\r\n\r\n setLicense(license: LicenseEntity): void {\r\n this.license = license;\r\n }\r\n\r\n getLicense(): LicenseEntity {\r\n return this.license;\r\n }\r\n}\r\n\r\nexport default (transaction: TransactionEntity, license: LicenseEntity) =>\r\n new LicenseTransactionJoin(transaction, license);\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { PaymentMethodValues } from '@/types/constants/PaymentMethodEnum';\r\nimport { TransactionSourceValues } from '@/types/constants/TransactionSource';\r\nimport { TransactionStatusValues } from '@/types/constants/TransactionStatus';\r\nimport { LicenseTransactionJoinEntity } from '@/types/entities/LicenseTransactionJoin';\r\nimport { TransactionMethods, TransactionProps, TransactionEntity } from '@/types/entities/Transaction';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * Transaction entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the transaction. This number is\r\n * always generated by NetLicensing.\r\n * @property string number\r\n *\r\n * always true for transactions\r\n * @property boolean active\r\n *\r\n * Status of transaction. \"CANCELLED\", \"CLOSED\", \"PENDING\".\r\n * @property string status\r\n *\r\n * \"SHOP\". AUTO transaction for internal use only.\r\n * @property string source\r\n *\r\n * grand total for SHOP transaction (see source).\r\n * @property number grandTotal\r\n *\r\n * discount for SHOP transaction (see source).\r\n * @property number discount\r\n *\r\n * specifies currency for money fields (grandTotal and discount). Check data types to discover which\r\n * @property string currency\r\n *\r\n * Date created. Optional.\r\n * @property string dateCreated\r\n *\r\n * Date closed. Optional.\r\n * @property string dateClosed\r\n */\r\n\r\nconst Transaction = function (\r\n properties: TransactionProps = {} as TransactionProps,\r\n): TransactionEntity {\r\n const props: TransactionProps = { ...properties };\r\n\r\n const methods: TransactionMethods = {\r\n setActive(this: void, active: boolean) {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setStatus(this: void, status: TransactionStatusValues): void {\r\n set(props, 'status', status);\r\n },\r\n\r\n getStatus(this: void, def?: D): TransactionStatusValues | D {\r\n return get(props, 'status', def) as TransactionStatusValues | D;\r\n },\r\n\r\n setSource(this: void, source: TransactionSourceValues): void {\r\n set(props, 'source', source);\r\n },\r\n getSource(this: void, def?: D): TransactionSourceValues | D {\r\n return get(props, 'source', def) as TransactionSourceValues | D;\r\n },\r\n setGrandTotal(this: void, grandTotal: number): void {\r\n set(props, 'grandTotal', grandTotal);\r\n },\r\n getGrandTotal(this: void, def?: D): number | D {\r\n return get(props, 'grandTotal', def) as number | D;\r\n },\r\n\r\n setDiscount(this: void, discount: number): void {\r\n set(props, 'discount', discount);\r\n },\r\n\r\n getDiscount(this: void, def?: D): number | D {\r\n return get(props, 'discount', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setDateCreated(this: void, dateCreated: Date): void {\r\n set(props, 'dateCreated', dateCreated);\r\n },\r\n\r\n getDateCreated(this: void, def?: D): Date | D {\r\n return get(props, 'dateCreated', def) as Date | D;\r\n },\r\n\r\n setDateClosed(this: void, dateCreated: Date): void {\r\n set(props, 'dateClosed', dateCreated);\r\n },\r\n\r\n getDateClosed(this: void, def?: D): Date | D {\r\n return get(props, 'dateClosed', def) as Date | D;\r\n },\r\n\r\n setPaymentMethod(this: void, paymentMethod: PaymentMethodValues): void {\r\n set(props, 'paymentMethod', paymentMethod);\r\n },\r\n\r\n getPaymentMethod(this: void, def?: D): PaymentMethodValues | D {\r\n return get(props, 'paymentMethod', def) as PaymentMethodValues | D;\r\n },\r\n\r\n setLicenseTransactionJoins(this: void, joins: LicenseTransactionJoinEntity[]): void {\r\n set(props, 'licenseTransactionJoins', joins);\r\n },\r\n\r\n getLicenseTransactionJoins(this: void, def?: D): LicenseTransactionJoinEntity[] | D {\r\n return get(props, 'licenseTransactionJoins', def) as LicenseTransactionJoinEntity[] | D;\r\n },\r\n\r\n serialize(this: void) {\r\n return serialize(props, { ignore: ['licenseTransactionJoins', 'inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as TransactionProps, methods, Transaction);\r\n};\r\n\r\nexport default Transaction;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// entities\r\nimport License from '@/entities/License';\r\nimport LicenseTransactionJoin from '@/entities/LicenseTransactionJoin';\r\nimport Transaction from '@/entities/Transaction';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { TransactionProps } from '@/types/entities/Transaction';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { dateCreated, dateClosed } = props;\r\n\r\n if (dateCreated && typeof dateCreated === 'string') {\r\n props.dateCreated = new Date(dateCreated);\r\n }\r\n\r\n if (dateClosed && typeof dateClosed === 'string') {\r\n props.dateClosed = new Date(dateClosed);\r\n }\r\n\r\n const licenseTransactionJoins: { licenseNumber: string; transactionNumber: string }[] | undefined =\r\n props.licenseTransactionJoin as { licenseNumber: string; transactionNumber: string }[];\r\n\r\n delete props.licenseTransactionJoin;\r\n\r\n if (licenseTransactionJoins) {\r\n props.licenseTransactionJoins = licenseTransactionJoins.map(({ transactionNumber, licenseNumber }) => {\r\n const transaction = Transaction({ number: transactionNumber });\r\n const license = License({ number: licenseNumber });\r\n\r\n return LicenseTransactionJoin(transaction, license);\r\n });\r\n }\r\n\r\n return Transaction(props as TransactionProps);\r\n};\r\n","import axios, { AxiosInstance, AxiosResponse } from 'axios';\r\nimport { Info } from '@/types/api/response';\r\n\r\nlet axiosInstance: AxiosInstance = axios.create();\r\nlet lastResponse: AxiosResponse | null = null;\r\nlet info: Info[] = [];\r\n\r\nexport const setAxiosInstance = (instance: AxiosInstance): void => {\r\n axiosInstance = instance;\r\n};\r\n\r\nexport const getAxiosInstance = (): AxiosInstance => axiosInstance;\r\n\r\nexport const setLastResponse = (response: AxiosResponse | null): void => {\r\n lastResponse = response;\r\n};\r\n\r\nexport const getLastResponse = (): AxiosResponse | null => lastResponse;\r\n\r\nexport const setInfo = (infos: Info[]): void => {\r\n info = infos;\r\n};\r\n\r\nexport const getInfo = (): Info[] => info;\r\n","{\r\n \"name\": \"netlicensing-client\",\r\n \"version\": \"2.0.0\",\r\n \"description\": \"JavaScript Wrapper for Labs64 NetLicensing RESTful API\",\r\n \"keywords\": [\r\n \"labs64\",\r\n \"netlicensing\",\r\n \"licensing\",\r\n \"licensing-as-a-service\",\r\n \"license\",\r\n \"license-management\",\r\n \"software-license\",\r\n \"client\",\r\n \"restful\",\r\n \"restful-api\",\r\n \"javascript\",\r\n \"wrapper\",\r\n \"api\",\r\n \"client\"\r\n ],\r\n \"license\": \"Apache-2.0\",\r\n \"author\": \"Labs64 GmbH\",\r\n \"homepage\": \"https://netlicensing.io\",\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/Labs64/NetLicensingClient-javascript\"\r\n },\r\n \"bugs\": {\r\n \"url\": \"https://github.com/Labs64/NetLicensingClient-javascript/issues\"\r\n },\r\n \"contributors\": [\r\n {\r\n \"name\": \"Ready Brown\",\r\n \"email\": \"ready.brown@hotmail.de\",\r\n \"url\": \"https://github.com/r-brown\"\r\n },\r\n {\r\n \"name\": \"Viacheslav Rudkovskiy\",\r\n \"email\": \"viachaslau.rudkovski@labs64.de\",\r\n \"url\": \"https://github.com/v-rudkovskiy\"\r\n },\r\n {\r\n \"name\": \"Andrei Yushkevich\",\r\n \"email\": \"yushkevich@me.com\",\r\n \"url\": \"https://github.com/yushkevich\"\r\n }\r\n ],\r\n \"main\": \"dist/index.cjs\",\r\n \"module\": \"dist/index.mjs\",\r\n \"types\": \"dist/index.d.ts\",\r\n \"exports\": {\r\n \".\": {\r\n \"types\": \"./dist/index.d.ts\",\r\n \"import\": \"./dist/index.mjs\",\r\n \"require\": \"./dist/index.cjs\"\r\n }\r\n },\r\n \"files\": [\r\n \"dist\"\r\n ],\r\n \"scripts\": {\r\n \"build\": \"tsup\",\r\n \"release\": \"npm run lint:typecheck && npm run test && npm run build\",\r\n \"dev\": \"tsup --watch\",\r\n \"test\": \"vitest run\",\r\n \"test:dev\": \"vitest watch\",\r\n \"lint\": \"eslint --ext .js,.mjs,.ts src\",\r\n \"typecheck\": \"tsc --noEmit\",\r\n \"lint:typecheck\": \"npm run lint && npm run typecheck\"\r\n },\r\n \"peerDependencies\": {\r\n \"axios\": \"^1.9.0\"\r\n },\r\n \"dependencies\": {},\r\n \"devDependencies\": {\r\n \"@eslint/js\": \"^9.24.0\",\r\n \"@types/node\": \"^22.14.0\",\r\n \"@typescript-eslint/eslint-plugin\": \"^8.29.1\",\r\n \"@typescript-eslint/parser\": \"^8.29.1\",\r\n \"@vitest/eslint-plugin\": \"^1.1.43\",\r\n \"axios\": \"^1.9.0\",\r\n \"eslint\": \"^9.24.0\",\r\n \"eslint-plugin-import\": \"^2.31.0\",\r\n \"prettier\": \"3.5.3\",\r\n \"tsup\": \"^8.4.0\",\r\n \"typescript\": \"^5.8.3\",\r\n \"typescript-eslint\": \"^8.29.1\",\r\n \"vitest\": \"^3.1.1\"\r\n },\r\n \"engines\": {\r\n \"node\": \">= 16.9.0\",\r\n \"npm\": \">= 8.0.0\"\r\n },\r\n \"browserslist\": [\r\n \"> 1%\",\r\n \"last 2 versions\",\r\n \"not ie <= 10\"\r\n ]\r\n}\r\n","export default >(data: T): string => {\r\n const query: string[] = [];\r\n\r\n const build = (obj: unknown, keyPrefix?: string): void => {\r\n if (obj === null || obj === undefined) {\r\n return;\r\n }\r\n\r\n if (Array.isArray(obj)) {\r\n obj.forEach((item) => {\r\n build(item, keyPrefix ? `${keyPrefix}` : '');\r\n });\r\n\r\n return;\r\n }\r\n\r\n if (obj instanceof Date) {\r\n query.push(`${keyPrefix}=${encodeURIComponent(obj.toISOString())}`);\r\n return;\r\n }\r\n\r\n if (typeof obj === 'object') {\r\n Object.keys(obj).forEach((key) => {\r\n const value = obj[key as keyof typeof obj];\r\n build(value, keyPrefix ? `${keyPrefix}[${encodeURIComponent(key)}]` : encodeURIComponent(key));\r\n });\r\n\r\n return;\r\n }\r\n\r\n query.push(`${keyPrefix}=${encodeURIComponent(obj as string)}`);\r\n };\r\n\r\n build(data);\r\n\r\n return query.join('&');\r\n};\r\n","import { AxiosRequestConfig, Method, AxiosRequestHeaders, AxiosResponse, AxiosError, AxiosInstance } from 'axios';\r\n\r\n// constants\r\nimport SecurityMode from '@/constants/SecurityMode';\r\n\r\n// errors\r\nimport NlicError from '@/errors/NlicError';\r\n\r\n// types\r\nimport type { NlicResponse } from '@/types/api/response';\r\nimport type { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\n\r\n// package.json\r\nimport pkg from '../../../package.json';\r\n\r\n// service\r\nimport { getAxiosInstance, setLastResponse, setInfo } from './instance';\r\nimport toQueryString from './toQueryString';\r\n\r\nexport default async (\r\n context: ContextInstance,\r\n method: Method,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => {\r\n const headers: Record = {\r\n Accept: 'application/json',\r\n 'X-Requested-With': 'XMLHttpRequest',\r\n };\r\n\r\n // only node.js has a process variable that is of [[Class]] process\r\n if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\r\n headers['User-agent'] = `NetLicensing/Javascript ${pkg.version}/node&${process.version}`;\r\n }\r\n\r\n const req: AxiosRequestConfig = {\r\n method,\r\n headers,\r\n url: encodeURI(`${context.getBaseUrl()}/${endpoint}`),\r\n responseType: 'json',\r\n transformRequest: (d: unknown, h: AxiosRequestHeaders) => {\r\n if (h['Content-Type'] === 'application/x-www-form-urlencoded') {\r\n return toQueryString(d as Record);\r\n }\r\n\r\n if (!h['NetLicensing-Origin']) {\r\n h['NetLicensing-Origin'] = `NetLicensing/Javascript ${pkg.version}`;\r\n }\r\n\r\n return d;\r\n },\r\n };\r\n\r\n if (['put', 'post', 'patch'].indexOf(method.toLowerCase()) >= 0) {\r\n if (req.method === 'post') {\r\n headers['Content-Type'] = 'application/x-www-form-urlencoded';\r\n }\r\n req.data = data;\r\n } else {\r\n req.params = data;\r\n }\r\n\r\n switch (context.getSecurityMode()) {\r\n // Basic Auth\r\n case SecurityMode.BASIC_AUTHENTICATION:\r\n {\r\n if (!context.getUsername()) {\r\n throw new NlicError('Missing parameter \"username\"');\r\n }\r\n\r\n if (!context.getPassword()) {\r\n throw new NlicError('Missing parameter \"password\"');\r\n }\r\n\r\n req.auth = {\r\n username: context.getUsername(),\r\n password: context.getPassword(),\r\n };\r\n }\r\n break;\r\n // ApiKey Auth\r\n case SecurityMode.APIKEY_IDENTIFICATION:\r\n if (!context.getApiKey()) {\r\n throw new NlicError('Missing parameter \"apiKey\"');\r\n }\r\n\r\n headers.Authorization = `Basic ${btoa(`apiKey:${context.getApiKey()}`)}`;\r\n break;\r\n // without authorization\r\n case SecurityMode.ANONYMOUS_IDENTIFICATION:\r\n break;\r\n default:\r\n throw new NlicError('Unknown security mode');\r\n }\r\n\r\n const instance: AxiosInstance = config?.axiosInstance || getAxiosInstance();\r\n\r\n try {\r\n const response: AxiosResponse = await instance(req);\r\n const info = response.data.infos?.info || [];\r\n\r\n setLastResponse(response);\r\n setInfo(info);\r\n\r\n if (config?.onResponse) {\r\n config.onResponse(response);\r\n }\r\n\r\n if (info.length > 0) {\r\n if (config?.onInfo) {\r\n config.onInfo(info);\r\n }\r\n\r\n const eInfo = info.find(({ type }) => type === 'ERROR');\r\n\r\n if (eInfo) {\r\n throw new NlicError(eInfo.value, eInfo.id, response.config, response.request, response);\r\n }\r\n }\r\n\r\n return response;\r\n } catch (e) {\r\n const error = e as AxiosError;\r\n\r\n const response = error.response;\r\n const info = (response?.data as NlicResponse)?.infos?.info || [];\r\n\r\n setLastResponse(response || null);\r\n setInfo(info);\r\n\r\n if ((e as AxiosError).isAxiosError) {\r\n let message = (e as AxiosError).message;\r\n\r\n if (response?.data && info.length > 0) {\r\n const eInfo = info.find(({ type }) => type === 'ERROR');\r\n\r\n if (eInfo) {\r\n message = eInfo.value;\r\n }\r\n }\r\n\r\n throw new NlicError(\r\n message,\r\n error.code,\r\n error.config,\r\n error.request,\r\n error.response as AxiosResponse,\r\n );\r\n }\r\n\r\n throw e;\r\n }\r\n};\r\n","import type { AxiosResponse } from 'axios';\r\n\r\n// types\r\nimport type { NlicResponse } from '@/types/api/response';\r\nimport type { RequestConfig } from '@/types/services/Service';\r\nimport type { ContextInstance } from '@/types/vo/Context';\r\n\r\n// service\r\nimport request from './request';\r\n\r\nexport const get = (\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => request(context, 'get', endpoint, data, config);\r\n\r\nexport const post = (\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => request(context, 'post', endpoint, data, config);\r\n\r\nexport const del = (\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => request(context, 'delete', endpoint, data, config);\r\n","import { AxiosInstance, AxiosResponse, Method } from 'axios';\r\n\r\n// service\r\nimport { setAxiosInstance, getAxiosInstance, getLastResponse, getInfo } from '@/services/Service/instance';\r\nimport { get, post, del } from '@/services/Service/methods';\r\nimport request from '@/services/Service/request';\r\nimport toQueryString from '@/services/Service/toQueryString';\r\n\r\n// types\r\nimport { Info, NlicResponse } from '@/types/api/response';\r\nimport { RequestConfig, IService } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\n\r\nexport { get, post, del, request, toQueryString };\r\n\r\nconst service: IService = {\r\n setAxiosInstance(this: void, instance: AxiosInstance) {\r\n setAxiosInstance(instance);\r\n },\r\n\r\n getAxiosInstance(this: void): AxiosInstance {\r\n return getAxiosInstance();\r\n },\r\n\r\n getLastHttpRequestInfo(this: void): AxiosResponse | null {\r\n return getLastResponse();\r\n },\r\n\r\n getInfo(this: void): Info[] {\r\n return getInfo();\r\n },\r\n\r\n get(\r\n this: void,\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return get(context, endpoint, data, config);\r\n },\r\n\r\n post(\r\n this: void,\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return post(context, endpoint, data, config);\r\n },\r\n\r\n delete(\r\n this: void,\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return del(context, endpoint, data, config);\r\n },\r\n\r\n request(\r\n this: void,\r\n context: ContextInstance,\r\n method: Method,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return request(context, method, endpoint, data, config);\r\n },\r\n\r\n toQueryString>(this: void, data: T): string {\r\n return toQueryString(data);\r\n },\r\n};\r\n\r\nexport default service;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst FILTER_DELIMITER = ';';\r\nconst FILTER_PAIR_DELIMITER = '=';\r\n\r\nexport const encode = (filter: Record): string => {\r\n return Object.keys(filter)\r\n .map((key) => `${key}${FILTER_PAIR_DELIMITER}${String(filter[key])}`)\r\n .join(FILTER_DELIMITER);\r\n};\r\n\r\nexport const decode = (filter: string): Record => {\r\n const result: Record = {};\r\n\r\n filter.split(FILTER_DELIMITER).forEach((v) => {\r\n const [name, value] = v.split(FILTER_PAIR_DELIMITER);\r\n result[name] = value;\r\n });\r\n\r\n return result;\r\n};\r\n\r\nexport default { encode, decode };\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nexport const isDefined = (value: unknown): boolean => {\r\n return typeof value !== 'undefined' && typeof value !== 'function';\r\n};\r\n\r\nexport const isValid = (value: unknown): boolean => {\r\n if (!isDefined(value)) {\r\n return false;\r\n }\r\n\r\n if (typeof value === 'number') {\r\n return !Number.isNaN(value);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nexport const ensureNotNull = (value: unknown, name: string): void => {\r\n if (value === null) {\r\n throw new TypeError(`Parameter \"${name}\" cannot be null.`);\r\n }\r\n\r\n if (!isValid(value)) {\r\n throw new TypeError(`Parameter \"${name}\" has an invalid value.`);\r\n }\r\n};\r\n\r\nexport const ensureNotEmpty = (value: unknown, name: string): void => {\r\n ensureNotNull(value, name);\r\n\r\n if (!value) {\r\n throw new TypeError(`Parameter \"${name}\" cannot be empty.`);\r\n }\r\n};\r\n\r\nexport default {\r\n isDefined,\r\n isValid,\r\n ensureNotNull,\r\n ensureNotEmpty,\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { PageInstance, Pagination, PaginationMethods } from '@/types/vo/Page';\r\n\r\nconst Page = function (content: T, pagination?: Partial) {\r\n const pageNumber = parseInt(pagination?.pagenumber || '0', 10);\r\n const itemsNumber = parseInt(pagination?.itemsnumber || '0', 10);\r\n const totalPages = parseInt(pagination?.totalpages || '0', 10);\r\n const totalItems = parseInt(pagination?.totalitems || '0', 10);\r\n\r\n const page: PaginationMethods = {\r\n getContent(this: void): T {\r\n return content;\r\n },\r\n\r\n getPagination(this: void): Pagination {\r\n return {\r\n pageNumber,\r\n itemsNumber,\r\n totalPages,\r\n totalItems,\r\n hasNext: totalPages > pageNumber + 1,\r\n };\r\n },\r\n\r\n getPageNumber(this: void): number {\r\n return pageNumber;\r\n },\r\n\r\n getItemsNumber(this: void): number {\r\n return itemsNumber;\r\n },\r\n\r\n getTotalPages(this: void): number {\r\n return totalPages;\r\n },\r\n\r\n getTotalItems(this: void): number {\r\n return totalItems;\r\n },\r\n\r\n hasNext(this: void): boolean {\r\n return totalPages > pageNumber + 1;\r\n },\r\n };\r\n\r\n return new Proxy(content, {\r\n get(obj: T, prop: string | symbol, receiver) {\r\n if (Object.hasOwn(page, prop)) {\r\n return page[prop as keyof typeof page];\r\n }\r\n\r\n return Reflect.get(obj, prop, receiver);\r\n },\r\n\r\n set(obj, prop, value, receiver) {\r\n return Reflect.set(obj, prop, value, receiver);\r\n },\r\n\r\n getPrototypeOf() {\r\n return (Page.prototype as object) || null;\r\n },\r\n }) as PageInstance;\r\n};\r\n\r\nexport default Page;\r\n","/**\r\n * JS representation of the Bundle Service. See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToBundle from '@/converters/itemToBundle';\r\n\r\n// services\r\nimport itemToLicense from '@/converters/itemToLicense';\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { BundleEntity, BundleProps, SavedBundleProps } from '@/types/entities/Bundle';\r\nimport { LicenseEntity, LicenseProps, SavedLicenseProps } from '@/types/entities/License';\r\nimport { IBundleService } from '@/types/services/BundleService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Bundle.ENDPOINT_PATH;\r\nconst endpointObtain = Constants.Bundle.ENDPOINT_OBTAIN_PATH;\r\nconst type = Constants.Bundle.TYPE;\r\n\r\nconst bundleService: IBundleService = {\r\n /**\r\n * Gets a bundle by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#get-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the bundle number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the bundle object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToBundle>(item);\r\n },\r\n\r\n /**\r\n * Returns bundle of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#bundles-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of bundle entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const bundles: BundleEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToBundle>(v));\r\n\r\n return Page(bundles || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates a new bundle with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#create-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param bundle NetLicensing.Bundle\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created bundle object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n bundle: BundleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(bundle, 'bundle');\r\n\r\n const response = await Service.post(context, endpoint, bundle.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToBundle>(item);\r\n },\r\n\r\n /**\r\n * Updates bundle properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#update-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * bundle number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param bundle NetLicensing.Bundle\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated bundle in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n bundle: BundleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(bundle, 'bundle');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, bundle.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToBundle>(item);\r\n },\r\n\r\n /**\r\n * Deletes bundle.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#delete-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * bundle number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n\r\n /**\r\n * Obtain bundle.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#obtain-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * bundle number\r\n * @param number string\r\n *\r\n * licensee number\r\n * @param licenseeNumber String\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return array of licenses\r\n * @returns {Promise}\r\n */\r\n async obtain(\r\n context: ContextInstance,\r\n number: string,\r\n licenseeNumber: string,\r\n config?: RequestConfig,\r\n ): Promise>[]> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotEmpty(licenseeNumber, 'licenseeNumber');\r\n\r\n const data = { [Constants.Licensee.LICENSEE_NUMBER]: licenseeNumber };\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}/${endpointObtain}`, data, config);\r\n const items = response.data.items;\r\n\r\n const licenses = items?.item.filter((v) => v.type === Constants.License.TYPE);\r\n\r\n return licenses?.map((v) => itemToLicense>(v)) || [];\r\n },\r\n};\r\n\r\nexport default bundleService;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport { ProductModuleValidation, ValidationResultsInstance } from '@/types/vo/ValidationResults';\r\n\r\n// utils\r\nimport { isValid } from '@/utils/validation';\r\n\r\nclass ValidationResults implements ValidationResultsInstance {\r\n readonly validations: Record;\r\n ttl?: Date;\r\n\r\n constructor() {\r\n this.validations = {};\r\n }\r\n\r\n getValidators(): Record {\r\n return this.validations;\r\n }\r\n\r\n setValidation(validation: ProductModuleValidation): this {\r\n this.validations[validation.productModuleNumber] = validation;\r\n return this;\r\n }\r\n\r\n getValidation(productModuleNumber: string, def?: D): ProductModuleValidation | D {\r\n return this.validations[productModuleNumber] || def;\r\n }\r\n\r\n setProductModuleValidation(validation: ProductModuleValidation): this {\r\n return this.setValidation(validation);\r\n }\r\n\r\n getProductModuleValidation(productModuleNumber: string, def?: D): ProductModuleValidation | D {\r\n return this.getValidation(productModuleNumber, def);\r\n }\r\n\r\n setTtl(ttl: Date | string): this {\r\n if (!isValid(ttl)) {\r\n throw new TypeError(`Bad ttl:${ttl.toString()}`);\r\n }\r\n\r\n this.ttl = new Date(ttl);\r\n return this;\r\n }\r\n\r\n getTtl(): Date | undefined {\r\n return this.ttl;\r\n }\r\n\r\n toString(): string {\r\n let data = 'ValidationResult [';\r\n\r\n Object.keys(this.validations).forEach((pmNumber) => {\r\n data += `ProductModule<${pmNumber}>`;\r\n\r\n if (pmNumber in this.validations) {\r\n data += JSON.stringify(this.validations[pmNumber]);\r\n }\r\n });\r\n\r\n data += ']';\r\n\r\n return data;\r\n }\r\n}\r\n\r\nexport default (): ValidationResultsInstance => new ValidationResults();\r\n","/**\r\n * Licensee Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/licensee-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToLicensee from '@/converters/itemToLicensee';\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { LicenseeProps, LicenseeEntity, SavedLicenseeProps } from '@/types/entities/Licensee';\r\nimport { ILicenseeService } from '@/types/services/LicenseeService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\nimport { ValidationParametersInstance } from '@/types/vo/ValidationParameters';\r\nimport { ValidationResultsInstance as IValidationResults } from '@/types/vo/ValidationResults';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\nimport ValidationResults from '@/vo/ValidationResults';\r\n\r\nconst endpoint = Constants.Licensee.ENDPOINT_PATH;\r\nconst endpointValidate = Constants.Licensee.ENDPOINT_PATH_VALIDATE;\r\nconst endpointTransfer = Constants.Licensee.ENDPOINT_PATH_TRANSFER;\r\nconst type = Constants.Licensee.TYPE;\r\n\r\nconst licenseeService: ILicenseeService = {\r\n /**\r\n * Gets licensee by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#get-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the licensee number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the licensee in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicensee>(item);\r\n },\r\n\r\n /**\r\n * Returns all licensees of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#licensees-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of licensees (of all products) or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: LicenseeEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToLicensee>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new licensee object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#create-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product to which the new licensee is to be added\r\n * @param productNumber string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param licensee NetLicensing.Licensee\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created licensee object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n productNumber: string,\r\n licensee: LicenseeEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(licensee, 'licensee');\r\n\r\n const data = licensee.serialize();\r\n\r\n if (productNumber) {\r\n data.productNumber = productNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicensee>(item);\r\n },\r\n\r\n /**\r\n * Updates licensee properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#update-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param licensee NetLicensing.Licensee\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated licensee in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n licensee: LicenseeEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(licensee, 'licensee');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, licensee.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicensee>(item);\r\n },\r\n\r\n /**\r\n * Deletes licensee.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#delete-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n\r\n /**\r\n * Validates active licenses of the licensee.\r\n * In the case of multiple product modules validation,\r\n * required parameters indexes will be added automatically.\r\n * See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#validate-licensee\r\n *\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * optional validation parameters. See ValidationParameters and licensing model documentation for\r\n * details.\r\n * @param validationParameters NetLicensing.ValidationParameters.\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * @returns {ValidationResults}\r\n */\r\n async validate(\r\n context: ContextInstance,\r\n number: string,\r\n validationParameters?: ValidationParametersInstance,\r\n config?: RequestConfig,\r\n ): Promise {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const data: Record = {};\r\n\r\n if (validationParameters) {\r\n const productNumber: string | undefined = validationParameters.productNumber;\r\n\r\n if (productNumber) {\r\n data.productNumber = productNumber;\r\n }\r\n\r\n const licenseeProperties = validationParameters.licenseeProperties;\r\n\r\n Object.keys(licenseeProperties).forEach((key: string) => {\r\n data[key] = validationParameters.getLicenseeProperty(key);\r\n });\r\n\r\n if (validationParameters.isForOfflineUse()) {\r\n data.forOfflineUse = true;\r\n }\r\n\r\n if (validationParameters.isDryRun()) {\r\n data.dryRun = true;\r\n }\r\n\r\n const parameters = validationParameters.getParameters();\r\n\r\n Object.keys(parameters).forEach((pmNumber, i) => {\r\n data[`${Constants.ProductModule.PRODUCT_MODULE_NUMBER}${i}`] = pmNumber;\r\n\r\n const parameter = parameters[pmNumber];\r\n\r\n if (parameter) {\r\n Object.keys(parameter).forEach((key: string) => {\r\n data[key + i] = parameter[key];\r\n });\r\n }\r\n });\r\n }\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}/${endpointValidate}`, data, config);\r\n\r\n const validationResults = ValidationResults();\r\n\r\n const ttl = response.data.ttl;\r\n\r\n if (ttl) {\r\n validationResults.setTtl(ttl);\r\n }\r\n\r\n const items = response.data.items?.item.filter((v) => v.type === Constants.Validation.TYPE);\r\n\r\n items?.forEach((v) => {\r\n validationResults.setValidation(itemToObject(v));\r\n });\r\n\r\n return validationResults;\r\n },\r\n\r\n /**\r\n * Transfer licenses between licensees.\r\n * @see https://netlicensing.io/wiki/licensee-services#transfer-licenses\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the number of the licensee receiving licenses\r\n * @param number string\r\n *\r\n * the number of the licensee delivering licenses\r\n * @param sourceLicenseeNumber string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * @returns {Promise}\r\n */\r\n transfer(\r\n context: ContextInstance,\r\n number: string,\r\n sourceLicenseeNumber: string,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotEmpty(sourceLicenseeNumber, 'sourceLicenseeNumber');\r\n\r\n const data = { sourceLicenseeNumber };\r\n\r\n return Service.post(context, `${endpoint}/${number}/${endpointTransfer}`, data, config);\r\n },\r\n};\r\n\r\nexport default licenseeService;\r\n","/**\r\n * JS representation of the License Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/license-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToLicense from '@/converters/itemToLicense';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { LicenseProps, LicenseEntity, SavedLicenseProps } from '@/types/entities/License';\r\nimport { ILicenseService } from '@/types/services/LicenseService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.License.ENDPOINT_PATH;\r\nconst type = Constants.License.TYPE;\r\n\r\nconst licenseService: ILicenseService = {\r\n /**\r\n * Gets license by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#get-license\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the license number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the license in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicense>(item);\r\n },\r\n\r\n /**\r\n * Returns licenses of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#licenses-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|undefined\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return array of licenses (of all products) or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: LicenseEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToLicense>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new license object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#create-license\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent licensee to which the new license is to be added\r\n * @param licenseeNumber string\r\n *\r\n * license template that the license is created from\r\n * @param licenseTemplateNumber string\r\n *\r\n * For privileged logins specifies transaction for the license creation. For regular logins new\r\n * transaction always created implicitly, and the operation will be in a separate transaction.\r\n * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with\r\n * auto-generated number.\r\n * @param transactionNumber null|string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param license NetLicensing.License\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created license object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n licenseeNumber: string | null,\r\n licenseTemplateNumber: string | null,\r\n transactionNumber: string | null,\r\n license: LicenseEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(license, 'license');\r\n\r\n const data = license.serialize();\r\n\r\n if (licenseeNumber) {\r\n data.licenseeNumber = licenseeNumber;\r\n }\r\n\r\n if (licenseTemplateNumber) {\r\n data.licenseTemplateNumber = licenseTemplateNumber;\r\n }\r\n\r\n if (transactionNumber) {\r\n data.transactionNumber = transactionNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicense>(item);\r\n },\r\n\r\n /**\r\n * Updates license properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#update-license\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license number\r\n * @param number string\r\n *\r\n * transaction for the license update. Created implicitly if transactionNumber is null. In this case the\r\n * operation will be in a separate transaction.\r\n * @param transactionNumber string|null\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param license NetLicensing.License\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated license in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n transactionNumber: string | null,\r\n license: LicenseEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(license, 'license');\r\n\r\n const data = license.serialize();\r\n\r\n if (transactionNumber) {\r\n data.transactionNumber = transactionNumber;\r\n }\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicense>(item);\r\n },\r\n\r\n /**\r\n * Deletes license.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#delete-license\r\n *\r\n * When any license is deleted, corresponding transaction is created automatically.\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default licenseService;\r\n","/**\r\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/license-template-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToLicenseTemplate from '@/converters/itemToLicenseTemplate';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport {\r\n LicenseTemplateProps,\r\n LicenseTemplateEntity,\r\n SavedLicenseTemplateProps,\r\n} from '@/types/entities/LicenseTemplate';\r\nimport { ILicenseTemplateService } from '@/types/services/LicenseTemplateService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.LicenseTemplate.ENDPOINT_PATH;\r\nconst type = Constants.LicenseTemplate.TYPE;\r\n\r\nconst licenseTemplateService: ILicenseTemplateService = {\r\n /**\r\n * Gets license template by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#get-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the license template number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the license template object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicenseTemplate>(item);\r\n },\r\n\r\n /**\r\n * Returns all license templates of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#license-templates-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of license templates (of all products/modules) or null/empty list if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: LicenseTemplateEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToLicenseTemplate>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new license template object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#create-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product module to which the new license template is to be added\r\n * @param productModuleNumber\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param licenseTemplate NetLicensing.LicenseTemplate\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * the newly created license template object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n productModuleNumber: string | null,\r\n licenseTemplate: LicenseTemplateEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(licenseTemplate, 'licenseTemplate');\r\n\r\n const data = licenseTemplate.serialize();\r\n\r\n if (productModuleNumber) {\r\n data.productModuleNumber = productModuleNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicenseTemplate>(item);\r\n },\r\n\r\n /**\r\n * Updates license template properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#update-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license template number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param licenseTemplate NetLicensing.LicenseTemplate\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated license template in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n licenseTemplate: LicenseTemplateEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(licenseTemplate, 'licenseTemplate');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, licenseTemplate.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicenseTemplate>(item);\r\n },\r\n\r\n /**\r\n * Deletes license template.See NetLicensingAPI JavaDoc for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#delete-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license template number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default licenseTemplateService;\r\n","/**\r\n * JS representation of the Notification Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/notification-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToNotification from '@/converters/itemToNotification';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { NotificationProps, NotificationEntity, SavedNotificationProps } from '@/types/entities/Notification';\r\nimport { INotificationService } from '@/types/services/NotificationService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Notification.ENDPOINT_PATH;\r\nconst type = Constants.Notification.TYPE;\r\n\r\nconst notificationService: INotificationService = {\r\n /**\r\n * Gets notification by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#get-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the notification number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the notification object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToNotification>(item);\r\n },\r\n\r\n /**\r\n * Returns notifications of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#notifications-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of notification entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: NotificationEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToNotification>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new notification with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#create-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param notification NetLicensing.Notification\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created notification object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n notification: NotificationEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(notification, 'notification');\r\n\r\n const response = await Service.post(context, endpoint, notification.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToNotification>(item);\r\n },\r\n\r\n /**\r\n * Updates notification properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#update-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * notification number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param notification NetLicensing.Notification\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated notification in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n notification: NotificationEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(notification, 'notification');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, notification.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToNotification>(item);\r\n },\r\n\r\n /**\r\n * Deletes notification.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#delete-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * notification number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default notificationService;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToPaymentMethod from '@/converters/itemToPaymentMethod';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { PaymentMethodProps, PaymentMethodEntity, SavedPaymentMethodProps } from '@/types/entities/PaymentMethod';\r\nimport { IPaymentMethodService } from '@/types/services/PaymentMethodService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.PaymentMethod.ENDPOINT_PATH;\r\nconst type = Constants.PaymentMethod.TYPE;\r\n\r\nconst paymentMethodService: IPaymentMethodService = {\r\n /**\r\n * Gets payment method by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/payment-method-services#get-payment-method\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the payment method number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the payment method in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToPaymentMethod>(item);\r\n },\r\n\r\n /**\r\n * Returns payment methods of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/payment-method-services#payment-methods-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of payment method entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: PaymentMethodEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToPaymentMethod>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Updates payment method properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/payment-method-services#update-payment-method\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the payment method number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param paymentMethod NetLicensing.PaymentMethod\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated payment method in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n paymentMethod: PaymentMethodEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(paymentMethod, 'paymentMethod');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, paymentMethod.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToPaymentMethod>(item);\r\n },\r\n};\r\n\r\nexport default paymentMethodService;\r\n","/**\r\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/product-module-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToProductModule from '@/converters/itemToProductModule';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { ProductModuleProps, ProductModuleEntity, SavedProductModuleProps } from '@/types/entities/ProductModule';\r\nimport { IProductModuleService } from '@/types/services/ProductModuleService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.ProductModule.ENDPOINT_PATH;\r\nconst type = Constants.ProductModule.TYPE;\r\n\r\nconst productModuleService: IProductModuleService = {\r\n /**\r\n * Gets product module by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#get-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the product module number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the product module object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProductModule>(item);\r\n },\r\n\r\n /**\r\n * Returns products of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#product-modules-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of product modules entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: ProductModuleEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToProductModule>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new product module object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#create-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product to which the new product module is to be added\r\n * @param productNumber string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param productModule NetLicensing.ProductModule\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * the newly created product module object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n productNumber: string | null,\r\n productModule: ProductModuleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(productModule, 'productModule');\r\n\r\n const data = productModule.serialize();\r\n\r\n if (productNumber) {\r\n data.productNumber = productNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProductModule>(item);\r\n },\r\n\r\n /**\r\n * Updates product module properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#update-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product module number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param productModule NetLicensing.ProductModule\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated product module in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n productModule: ProductModuleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(productModule, 'productModule');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, productModule.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProductModule>(item);\r\n },\r\n\r\n /**\r\n * Deletes product module.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#delete-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product module number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default productModuleService;\r\n","/**\r\n * JS representation of the Product Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/product-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToProduct from '@/converters/itemToProduct';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { ProductProps, ProductEntity, SavedProductProps } from '@/types/entities/Product';\r\nimport { IProductService } from '@/types/services/ProductService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Product.ENDPOINT_PATH;\r\nconst type = Constants.Product.TYPE;\r\n\r\nconst productService: IProductService = {\r\n /**\r\n * Gets product by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#get-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the product number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the product object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProduct>(item);\r\n },\r\n\r\n /**\r\n * Returns products of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#products-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of product entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: ProductEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToProduct>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new product with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#create-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param product NetLicensing.Product\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created product object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n product: ProductEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(product, 'product');\r\n\r\n const response = await Service.post(context, endpoint, product.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProduct>(item);\r\n },\r\n\r\n /**\r\n * Updates product properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#update-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param product NetLicensing.Product\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated product in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n product: ProductEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(product, 'product');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, product.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProduct>(item);\r\n },\r\n\r\n /**\r\n * Deletes product.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#delete-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default productService;\r\n","/**\r\n * JS representation of the Token Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/token-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToToken from '@/converters/itemToToken';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { TokenProps, TokenEntity, SavedTokenProps } from '@/types/entities/Token';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ITokenService } from '@/types/services/TokenService';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Token.ENDPOINT_PATH;\r\nconst type = Constants.Token.TYPE;\r\n\r\nconst tokenService: ITokenService = {\r\n /**\r\n * Gets token by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#get-token\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the token number\r\n * @param number\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the token in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToToken>(item);\r\n },\r\n\r\n /**\r\n * Returns tokens of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#tokens-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|undefined|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of token entities or empty array if nothing found.\r\n * @return array\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: TokenEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToToken>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new token.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#create-token\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context Context\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param token Token\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return created token in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n token: TokenEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(token, 'token');\r\n\r\n const response = await Service.post(context, endpoint, token.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToToken>(item);\r\n },\r\n\r\n /**\r\n * Delete token by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#delete-token\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the token number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default tokenService;\r\n","/**\r\n * JS representation of the Transaction Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/transaction-services\r\n *\r\n * Transaction is created each time change to LicenseService licenses happens. For instance licenses are\r\n * obtained by a licensee, licenses disabled by vendor, licenses deleted, etc. Transaction is created no matter what\r\n * source has initiated the change to licenses: it can be either a direct purchase of licenses by a licensee via\r\n * NetLicensing Shop, or licenses can be given to a licensee by a vendor. Licenses can also be assigned implicitly by\r\n * NetLicensing if it is defined so by a license model (e.g. evaluation license may be given automatically). All these\r\n * events are reflected in transactions. Of all the transaction handling routines only read-only routines are exposed to\r\n * the public API, as transactions are only allowed to be created and modified by NetLicensing internally.\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToTransaction from '@/converters/itemToTransaction';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport type { ItemPagination } from '@/types/api/response';\r\nimport { TransactionProps, TransactionEntity, SavedTransactionProps } from '@/types/entities/Transaction';\r\nimport type { RequestConfig } from '@/types/services/Service';\r\nimport type { ITransactionService } from '@/types/services/TransactionService';\r\nimport type { ContextInstance } from '@/types/vo/Context';\r\nimport type { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Transaction.ENDPOINT_PATH;\r\nconst type = Constants.Transaction.TYPE;\r\n\r\nconst transactionService: ITransactionService = {\r\n /**\r\n * Gets transaction by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#get-transaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the transaction number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the transaction in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToTransaction>(item);\r\n },\r\n\r\n /**\r\n * Returns all transactions of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#transactions-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of transaction entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: TransactionEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToTransaction>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new transaction object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#create-transaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param transaction NetLicensing.Transaction\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created transaction object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n transaction: TransactionEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(transaction, 'transaction');\r\n\r\n const response = await Service.post(context, endpoint, transaction.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToTransaction>(item);\r\n },\r\n\r\n /**\r\n * Updates transaction properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#update-transaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * transaction number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param transaction NetLicensing.Transaction\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated transaction in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n transaction: TransactionEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(transaction, 'transaction');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, transaction.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToTransaction>(item);\r\n },\r\n};\r\n\r\nexport default transactionService;\r\n","/**\r\n * JS representation of the Utility Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/utility-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToCountry from '@/converters/itemToCountry';\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { LicenseTypeValues } from '@/types/constants/LicenseType';\r\nimport { LicensingModelValues } from '@/types/constants/LicensingModel';\r\nimport { CountryEntity } from '@/types/entities/Country';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { IUtilityService } from '@/types/services/UtilityService';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst baseEndpoint = Constants.Utility.ENDPOINT_PATH;\r\n\r\nconst utilityService: IUtilityService = {\r\n /**\r\n * Returns all license types. See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/utility-services#license-types-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of available license types or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async listLicenseTypes(context: ContextInstance, config?: RequestConfig): Promise> {\r\n const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_LICENSE_TYPES}`;\r\n\r\n const response = await Service.get(context, endpoint, undefined, config);\r\n const items = response.data.items;\r\n\r\n const type = Constants.Utility.LICENSE_TYPE;\r\n\r\n const licenseTypes: string[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToObject<{ name: string }>(v).name);\r\n\r\n return Page((licenseTypes as LicenseTypeValues[]) || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Returns all license models. See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/utility-services#licensing-models-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of available license models or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async listLicensingModels(\r\n context: ContextInstance,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_LICENSING_MODELS}`;\r\n\r\n const response = await Service.get(context, endpoint, undefined, config);\r\n const items = response.data.items;\r\n\r\n const type = Constants.Utility.LICENSING_MODEL_TYPE;\r\n\r\n const licensingModels: string[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToObject<{ name: string }>(v).name);\r\n\r\n return Page((licensingModels as LicensingModelValues[]) || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Returns all countries.\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * collection of available countries or null/empty list if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async listCountries(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_COUNTRIES}`;\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const type = Constants.Utility.COUNTRY_TYPE;\r\n\r\n const countries: CountryEntity[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToCountry(v));\r\n\r\n return Page(countries || [], items as ItemPagination);\r\n },\r\n};\r\n\r\nexport default utilityService;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport SecurityModeEnum from '@/constants/SecurityMode';\r\n\r\n// types\r\nimport type { SecurityModeValues } from '@/types/constants/SecurityMode';\r\nimport type { ContextConfig, ContextInstance } from '@/types/vo/Context';\r\n\r\nclass Context implements ContextInstance {\r\n baseUrl: string;\r\n securityMode: SecurityModeValues;\r\n username?: string;\r\n password?: string;\r\n apiKey?: string;\r\n publicKey?: string;\r\n\r\n constructor(props?: ContextConfig) {\r\n this.baseUrl = props?.baseUrl || 'https://go.netlicensing.io/core/v2/rest';\r\n this.securityMode = props?.securityMode || SecurityModeEnum.BASIC_AUTHENTICATION;\r\n this.username = props?.username;\r\n this.password = props?.password;\r\n this.apiKey = props?.apiKey;\r\n this.publicKey = props?.publicKey;\r\n }\r\n\r\n setBaseUrl(baseUrl: string): this {\r\n this.baseUrl = baseUrl;\r\n return this;\r\n }\r\n\r\n getBaseUrl(): string {\r\n return this.baseUrl;\r\n }\r\n\r\n setSecurityMode(securityMode: SecurityModeValues): this {\r\n this.securityMode = securityMode;\r\n return this;\r\n }\r\n\r\n getSecurityMode(): SecurityModeValues {\r\n return this.securityMode;\r\n }\r\n\r\n setUsername(username: string): this {\r\n this.username = username;\r\n return this;\r\n }\r\n\r\n getUsername(def?: D): string | D {\r\n return (this.username || def) as string | D;\r\n }\r\n\r\n setPassword(password: string): this {\r\n this.password = password;\r\n return this;\r\n }\r\n\r\n getPassword(def?: D): string | D {\r\n return (this.password || def) as string | D;\r\n }\r\n\r\n setApiKey(apiKey: string): this {\r\n this.apiKey = apiKey;\r\n return this;\r\n }\r\n\r\n getApiKey(def?: D): string | D {\r\n return (this.apiKey || def) as string | D;\r\n }\r\n\r\n setPublicKey(publicKey: string): this {\r\n this.publicKey = publicKey;\r\n return this;\r\n }\r\n\r\n getPublicKey(def?: D): string | D {\r\n return (this.publicKey || def) as string | D;\r\n }\r\n}\r\n\r\nexport default (props?: ContextConfig): ContextInstance => new Context(props);\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport {\r\n ValidationParametersInstance,\r\n Parameter,\r\n Parameters,\r\n LicenseeProperties,\r\n} from '@/types/vo/ValidationParameters';\r\n\r\nclass ValidationParameters implements ValidationParametersInstance {\r\n productNumber?: string;\r\n dryRun?: boolean;\r\n forOfflineUse?: boolean;\r\n licenseeProperties: LicenseeProperties;\r\n parameters: Parameters;\r\n\r\n constructor() {\r\n this.parameters = {};\r\n this.licenseeProperties = {};\r\n }\r\n\r\n setProductNumber(productNumber: string): this {\r\n this.productNumber = productNumber;\r\n return this;\r\n }\r\n\r\n getProductNumber(): string | undefined {\r\n return this.productNumber;\r\n }\r\n\r\n setLicenseeName(licenseeName: string): this {\r\n this.licenseeProperties.licenseeName = licenseeName;\r\n return this;\r\n }\r\n\r\n getLicenseeName(): string | undefined {\r\n return this.licenseeProperties.licenseeName;\r\n }\r\n\r\n setLicenseeSecret(licenseeSecret: string): this {\r\n this.licenseeProperties.licenseeSecret = licenseeSecret;\r\n return this;\r\n }\r\n\r\n getLicenseeSecret(): string | undefined {\r\n return this.licenseeProperties.licenseeSecret;\r\n }\r\n\r\n getLicenseeProperties(): LicenseeProperties {\r\n return this.licenseeProperties;\r\n }\r\n\r\n setLicenseeProperty(key: string, value: string): this {\r\n this.licenseeProperties[key] = value;\r\n return this;\r\n }\r\n\r\n getLicenseeProperty(key: string, def?: D): string | D {\r\n return (this.licenseeProperties[key] || def) as string | D;\r\n }\r\n\r\n setForOfflineUse(forOfflineUse: boolean): this {\r\n this.forOfflineUse = forOfflineUse;\r\n return this;\r\n }\r\n\r\n isForOfflineUse() {\r\n return !!this.forOfflineUse;\r\n }\r\n\r\n setDryRun(dryRun: boolean): this {\r\n this.dryRun = dryRun;\r\n return this;\r\n }\r\n\r\n isDryRun(): boolean {\r\n return !!this.dryRun;\r\n }\r\n\r\n getParameters(): Parameters {\r\n return this.parameters;\r\n }\r\n\r\n setParameter(productModuleNumber: string, parameter: Parameter): this {\r\n this.parameters[productModuleNumber] = parameter;\r\n return this;\r\n }\r\n\r\n getParameter(productModuleNumber: string): Parameter | undefined {\r\n return this.parameters[productModuleNumber];\r\n }\r\n\r\n getProductModuleValidationParameters(productModuleNumber: string): Parameter | undefined {\r\n return this.getParameter(productModuleNumber);\r\n }\r\n\r\n setProductModuleValidationParameters(productModuleNumber: string, productModuleParameters: Parameter): this {\r\n return this.setParameter(productModuleNumber, productModuleParameters);\r\n }\r\n}\r\n\r\nexport default (): ValidationParametersInstance => new ValidationParameters();\r\n"],"mappings":"+kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,gBAAAE,GAAA,WAAAC,GAAA,kBAAAC,GAAA,cAAAC,EAAA,YAAAC,GAAA,YAAAC,GAAA,YAAAC,EAAA,mBAAAC,GAAA,oBAAAC,GAAA,2BAAAC,GAAA,2BAAAC,GAAA,gBAAAC,EAAA,aAAAC,GAAA,uBAAAC,GAAA,oBAAAC,GAAA,mBAAAC,GAAA,cAAAC,EAAA,mBAAAC,GAAA,iBAAAC,GAAA,sBAAAC,EAAA,yBAAAC,EAAA,wBAAAC,GAAA,SAAAC,EAAA,kBAAAC,GAAA,sBAAAC,GAAA,yBAAAC,GAAA,YAAAC,GAAA,oBAAAC,GAAA,kBAAAC,GAAA,yBAAAC,GAAA,mBAAAC,GAAA,iBAAAC,EAAA,YAAAC,EAAA,qBAAAC,GAAA,UAAAC,GAAA,iBAAAC,GAAA,cAAAC,EAAA,gBAAAC,EAAA,uBAAAC,GAAA,sBAAAC,GAAA,sBAAAC,EAAA,mBAAAC,GAAA,yBAAAC,GAAA,sBAAAC,GAAA,iBAAAC,EAAA,mBAAAC,EAAA,kBAAAC,EAAA,iBAAAC,GAAA,iBAAAC,EAAA,cAAAC,GAAA,YAAAC,EAAA,iBAAAC,EAAA,kBAAAC,GAAA,kBAAAC,EAAA,0BAAAC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AUC,EAAuB,CAC/B,YAAK,OAASA,EACP,IACT,CAEA,UAAoB,CAClB,MAAO,CAAC,CAAC,KAAK,MAChB,CAEA,eAA4B,CAC1B,OAAO,KAAK,UACd,CAEA,aAAaC,EAA6BC,EAA4B,CACpE,YAAK,WAAWD,CAAmB,EAAIC,EAChC,IACT,CAEA,aAAaD,EAAoD,CAC/D,OAAO,KAAK,WAAWA,CAAmB,CAC5C,CAEA,qCAAqCA,EAAoD,CACvF,OAAO,KAAK,aAAaA,CAAmB,CAC9C,CAEA,qCAAqCA,EAA6BE,EAA0C,CAC1G,OAAO,KAAK,aAAaF,EAAqBE,CAAuB,CACvE,CACF,EAEOC,GAAQ,IAAoC,IAAIZ","names":["index_exports","__export","ApiKeyRole_default","Bundle_default","BundleService_default","constants_default","Context_default","Country_default","License_default","LicenseService_default","LicenseTemplate_default","LicenseTemplateService_default","LicenseTransactionJoin_default","LicenseType_default","Licensee_default","LicenseeSecretMode_default","LicenseeService_default","LicensingModel_default","NlicError","NodeSecretMode_default","Notification_default","NotificationEvent_default","NotificationProtocol_default","NotificationService_default","Page_default","PaymentMethod_default","PaymentMethodEnum_default","PaymentMethodService_default","Product_default","ProductDiscount_default","ProductModule_default","ProductModuleService_default","ProductService_default","SecurityMode_default","Service_default","TimeVolumePeriod_default","Token_default","TokenService_default","TokenType_default","Transaction_default","TransactionService_default","TransactionSource_default","TransactionStatus_default","UtilityService_default","ValidationParameters_default","ValidationResults_default","defineEntity_default","ensureNotEmpty","ensureNotNull","decode","encode","isDefined","isValid","itemToBundle_default","itemToCountry_default","itemToLicense_default","itemToLicenseTemplate_default","itemToLicensee_default","itemToNotification_default","itemToObject_default","itemToPaymentMethod_default","itemToProduct_default","itemToProductModule_default","itemToToken_default","itemToTransaction_default","serialize_default","__toCommonJS","LicenseeSecretMode","LicenseeSecretMode_default","LicenseType","LicenseType_default","NotificationEvent","NotificationEvent_default","NotificationProtocol","NotificationProtocol_default","SecurityMode","SecurityMode_default","TimeVolumePeriod","TimeVolumePeriod_default","TokenType","TokenType_default","TransactionSource","TransactionSource_default","TransactionStatus","TransactionStatus_default","constants_default","LicenseeSecretMode_default","LicenseType_default","NotificationEvent_default","NotificationProtocol_default","SecurityMode_default","TimeVolumePeriod_default","TokenType_default","TransactionSource_default","TransactionStatus_default","ApiKeyRole","ApiKeyRole_default","LicensingModel","LicensingModel_default","NodeSecretMode","NodeSecretMode_default","PaymentMethodEnum","PaymentMethodEnum_default","cast","value","extractProperties","properties","result","name","extractLists","lists","list","itemToObject","item","itemToObject_default","has","obj","key","set","value","get","def","serialize_default","obj","options","map","ignore","k","v","defineEntity","props","methods","proto","options","listeners","base","key","value","set","def","get","has","properties","k","v","serialize_default","obj","prop","receiver","l","defineEntity_default","Bundle","properties","props","defineEntity_default","active","set","def","get","number","name","price","currency","numbers","licenseTemplateNumbers","serialize_default","Bundle_default","itemToBundle_default","item","props","itemToObject_default","licenseTemplateNumbers","Bundle_default","Country","properties","props","defineEntity_default","Country_default","itemToCountry_default","item","Country_default","itemToObject_default","License","properties","props","defineEntity_default","active","set","def","get","number","name","price","currency","hidden","timeVolume","timeVolumePeriod","startDate","parentfeature","serialize_default","License_default","itemToLicense_default","item","props","itemToObject_default","startDate","License_default","Licensee","properties","props","defineEntity_default","active","set","def","get","number","name","mark","serialize_default","Licensee_default","itemToLicensee_default","item","Licensee_default","itemToObject_default","LicenseTemplate","properties","props","defineEntity_default","active","set","def","get","number","name","type","price","currency","automatic","hidden","hideLicenses","gradePeriod","timeVolume","timeVolumePeriod","maxSessions","quantity","productModuleNumber","serialize_default","LicenseTemplate_default","itemToLicenseTemplate_default","item","LicenseTemplate_default","itemToObject_default","Notification","properties","props","defineEntity_default","active","set","def","get","number","name","protocol","events","event","payload","endpoint","data","serialize_default","Notification_default","itemToNotification_default","item","props","itemToObject_default","events","Notification_default","PaymentMethod","properties","props","defineEntity_default","active","set","def","get","number","PaymentMethod_default","itemToPaymentMethod_default","item","PaymentMethod_default","itemToObject_default","Product","properties","props","defineEntity_default","active","set","def","get","number","name","version","description","licensingInfo","licenseeAutoCreate","discounts","discount","productDiscounts","map","serialize_default","Product_default","import_axios","NlicError","_NlicError","message","code","config","request","response","stack","ProductDiscount","properties","props","NlicError","defineEntity_default","totalPrice","set","def","get","currency","amountFix","amountPercent","total","amount","obj","prop","ProductDiscount_default","itemToProduct_default","item","props","itemToObject_default","discounts","d","ProductDiscount_default","Product_default","ProductModule","properties","props","defineEntity_default","active","set","def","get","number","name","licensingModel","maxCheckoutValidity","yellowThreshold","redThreshold","productNumber","serialize_default","ProductModule_default","itemToProductModule_default","item","ProductModule_default","itemToObject_default","Token","properties","props","defineEntity_default","active","set","def","get","number","expirationTime","tokenType","licenseeNumber","action","apiKeyRole","bundleNumber","bundlePrice","productNumber","predefinedShoppingItem","successURL","successURLTitle","cancelURL","cancelURLTitle","serialize_default","Token_default","itemToToken_default","item","props","itemToObject_default","expirationTime","Token_default","LicenseTransactionJoin","transaction","license","LicenseTransactionJoin_default","Transaction","properties","props","defineEntity_default","active","set","def","get","number","status","source","grandTotal","discount","currency","dateCreated","paymentMethod","joins","serialize_default","Transaction_default","itemToTransaction_default","item","props","itemToObject_default","dateCreated","dateClosed","licenseTransactionJoins","transactionNumber","licenseNumber","transaction","Transaction_default","license","License_default","LicenseTransactionJoin_default","import_axios","axiosInstance","axios","lastResponse","info","setAxiosInstance","instance","getAxiosInstance","setLastResponse","response","getLastResponse","setInfo","infos","getInfo","package_default","toQueryString_default","data","query","build","obj","keyPrefix","item","key","value","request_default","context","method","endpoint","data","config","headers","package_default","req","d","h","toQueryString_default","SecurityMode_default","NlicError","instance","getAxiosInstance","response","info","setLastResponse","setInfo","eInfo","type","e","error","message","get","context","endpoint","data","config","request_default","post","del","service","instance","setAxiosInstance","getAxiosInstance","getLastResponse","getInfo","context","endpoint","data","config","get","post","del","method","request_default","toQueryString_default","Service_default","FILTER_DELIMITER","FILTER_PAIR_DELIMITER","encode","filter","key","decode","result","v","name","value","isDefined","value","isValid","ensureNotNull","name","ensureNotEmpty","Page","content","pagination","pageNumber","itemsNumber","totalPages","totalItems","page","obj","prop","receiver","value","Page_default","endpoint","constants_default","endpointObtain","type","bundleService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToBundle_default","filter","data","encode","items","bundles","Page_default","bundle","ensureNotNull","forceCascade","licenseeNumber","itemToLicense_default","BundleService_default","ValidationResults","validation","productModuleNumber","def","ttl","isValid","data","pmNumber","ValidationResults_default","endpoint","constants_default","endpointValidate","endpointTransfer","type","licenseeService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToLicensee_default","filter","data","encode","items","list","Page_default","productNumber","licensee","ensureNotNull","forceCascade","validationParameters","licenseeProperties","key","parameters","pmNumber","i","parameter","response","validationResults","ValidationResults_default","ttl","itemToObject_default","sourceLicenseeNumber","LicenseeService_default","endpoint","constants_default","type","licenseService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToLicense_default","filter","data","encode","items","list","Page_default","licenseeNumber","licenseTemplateNumber","transactionNumber","license","ensureNotNull","forceCascade","LicenseService_default","endpoint","constants_default","type","licenseTemplateService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToLicenseTemplate_default","filter","data","encode","items","list","Page_default","productModuleNumber","licenseTemplate","ensureNotNull","forceCascade","LicenseTemplateService_default","endpoint","constants_default","type","notificationService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToNotification_default","filter","data","encode","items","list","Page_default","notification","ensureNotNull","forceCascade","NotificationService_default","endpoint","constants_default","type","paymentMethodService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToPaymentMethod_default","filter","data","encode","items","list","Page_default","paymentMethod","ensureNotNull","PaymentMethodService_default","endpoint","constants_default","type","productModuleService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToProductModule_default","filter","data","encode","items","list","Page_default","productNumber","productModule","ensureNotNull","forceCascade","ProductModuleService_default","endpoint","constants_default","type","productService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToProduct_default","filter","data","encode","items","list","Page_default","product","ensureNotNull","forceCascade","ProductService_default","endpoint","constants_default","type","tokenService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToToken_default","filter","data","encode","items","list","Page_default","token","ensureNotNull","forceCascade","TokenService_default","endpoint","constants_default","type","transactionService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToTransaction_default","filter","data","encode","items","list","Page_default","transaction","ensureNotNull","TransactionService_default","baseEndpoint","constants_default","utilityService","context","config","endpoint","items","Service_default","type","licenseTypes","v","itemToObject_default","Page_default","licensingModels","filter","data","encode","countries","itemToCountry_default","UtilityService_default","Context","props","SecurityMode_default","baseUrl","securityMode","username","def","password","apiKey","publicKey","Context_default","ValidationParameters","productNumber","licenseeName","licenseeSecret","key","value","def","forOfflineUse","dryRun","productModuleNumber","parameter","productModuleParameters","ValidationParameters_default"]} \ No newline at end of file diff --git a/dist/index.mjs b/dist/index.mjs new file mode 100644 index 0000000..d2203aa --- /dev/null +++ b/dist/index.mjs @@ -0,0 +1,2 @@ +var lt=Object.freeze({DISABLED:"DISABLED",PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}),pe=lt;var ft=Object.freeze({FEATURE:"FEATURE",TIMEVOLUME:"TIMEVOLUME",FLOATING:"FLOATING",QUANTITY:"QUANTITY"}),z=ft;var Tt=Object.freeze({LICENSEE_CREATED:"LICENSEE_CREATED",LICENSE_CREATED:"LICENSE_CREATED",WARNING_LEVEL_CHANGED:"WARNING_LEVEL_CHANGED",PAYMENT_TRANSACTION_PROCESSED:"PAYMENT_TRANSACTION_PROCESSED"}),G=Tt;var Pt=Object.freeze({WEBHOOK:"WEBHOOK"}),J=Pt;var gt=Object.freeze({BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",ANONYMOUS_IDENTIFICATION:"ANONYMOUS"}),N=gt;var yt=Object.freeze({DAY:"DAY",WEEK:"WEEK",MONTH:"MONTH",YEAR:"YEAR"}),le=yt;var Dt=Object.freeze({DEFAULT:"DEFAULT",SHOP:"SHOP",APIKEY:"APIKEY",ACTION:"ACTION"}),Q=Dt;var Et=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"}),fe=Et;var vt=Object.freeze({PENDING:"PENDING",CLOSED:"CLOSED",CANCELLED:"CANCELLED"}),W=vt;var u={LicenseeSecretMode:pe,LicenseType:z,NotificationEvent:G,NotificationProtocol:J,SecurityMode:N,TimeVolumePeriod:le,TokenType:Q,TransactionSource:fe,TransactionStatus:W,BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",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",LicenseType:z},License:{TYPE:"License",ENDPOINT_PATH:"license"},Validation:{TYPE:"ProductModuleValidation"},Token:{TYPE:"Token",ENDPOINT_PATH:"token",Type:Q},PaymentMethod:{TYPE:"PaymentMethod",ENDPOINT_PATH:"paymentmethod"},Bundle:{TYPE:"Bundle",ENDPOINT_PATH:"bundle",ENDPOINT_OBTAIN_PATH:"obtain"},Notification:{TYPE:"Notification",ENDPOINT_PATH:"notification",Protocol:J,Event:G},Transaction:{TYPE:"Transaction",ENDPOINT_PATH:"transaction",Status:W},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:"Country"}};var ht=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"}),Nt=ht;var It=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"}),bt=It;var Lt=Object.freeze({PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}),Rt=Lt;var Ct=Object.freeze({NULL:"NULL",PAYPAL:"PAYPAL",PAYPAL_SANDBOX:"PAYPAL_SANDBOX",STRIPE:"STRIPE",STRIPE_TESTING:"STRIPE_TESTING"}),xt=Ct;var St=n=>{try{return JSON.parse(n)}catch{return n}},At=n=>{let e={};return n?.forEach(({name:o,value:t})=>{e[o]=St(t)}),e},Mt=n=>{let e={};return n?.forEach(o=>{let{name:t}=o;e[t]=e[t]||[],e[t].push(Be(o))}),e},Be=n=>n?{...At(n.property),...Mt(n.list)}:{},P=Be;var Te=(n,e)=>Object.hasOwn(n,e),a=(n,e,o)=>{n[e]=o},r=(n,e,o)=>Te(n,e)?n[e]:o;var E=(n,e={})=>{let o={},{ignore:t=[]}=e;return Object.entries(n).forEach(([i,s])=>{if(!t.includes(i)&&typeof s!="function")if(s===void 0)o[i]="";else if(typeof s=="string")o[i]=s;else if(s instanceof Date)o[i]=s.toISOString();else if(typeof s!="object"||s===null)o[i]=String(s);else try{o[i]=JSON.stringify(s)}catch{o[i]=String(s)}}),o};var Ot=function(n,e,o={},t){let i={set:[],get:[]};t?.get&&i.get.push(t.get),t?.set&&i.set.push(t.set);let s={set(c,d){a(n,c,d)},get(c,d){return r(n,c,d)},has(c){return Te(n,c)},setProperty(c,d){this.set(c,d)},addProperty(c,d){this.set(c,d)},getProperty(c,d){return this.get(c,d)},hasProperty(c){return this.has(c)},setProperties(c){Object.entries(c).forEach(([d,l])=>{this.set(d,l)})},serialize(){return E(n)}};return new Proxy(n,{get(c,d,l){return Object.hasOwn(e,d)?e[d]:Object.hasOwn(s,d)?s[d]:(i.get.forEach(f=>{f(c,d,l)}),Reflect.get(c,d,l))},set(c,d,l,f){return i.set.forEach(v=>{v(c,d,l,f)}),Reflect.set(c,d,l,f)},getPrototypeOf(){return o.prototype||null}})},g=Ot;var qe=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setPrice(t){a(e,"price",t)},getPrice(t){return r(e,"price",t)},setCurrency(t){a(e,"currency",t)},getCurrency(t){return r(e,"currency",t)},setLicenseTemplateNumbers(t){a(e,"licenseTemplateNumbers",t)},addLicenseTemplateNumber(t){e.licenseTemplateNumbers||(e.licenseTemplateNumbers=[]),e.licenseTemplateNumbers.push(t)},getLicenseTemplateNumbers(t){return r(e,"licenseTemplateNumbers",t)},removeLicenseTemplateNumber(t){let{licenseTemplateNumbers:i=[]}=e;i.splice(i.indexOf(t),1),e.licenseTemplateNumbers=i},serialize(){if(e.licenseTemplateNumbers){let t=e.licenseTemplateNumbers.join(",");return E({...e,licenseTemplateNumbers:t})}return E(e)}},qe)},Pe=qe;var C=n=>{let e=P(n),{licenseTemplateNumbers:o}=e;return o&&typeof o=="string"&&(e.licenseTemplateNumbers=o.split(",")),Pe(e)};var Ye=function(n={}){let o={...{code:"",name:"",vatPercent:0,isEu:!1},...n};return g(o,{getCode(){return o.code},getName(){return o.name},getVatPercent(){return o.vatPercent},getIsEu(){return o.isEu}},Ye)},ge=Ye;var ye=n=>ge(P(n));var Fe=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setPrice(t){a(e,"price",t)},getPrice(t){return r(e,"price",t)},setCurrency(t){a(e,"currency",t)},getCurrency(t){return r(e,"currency",t)},setHidden(t){a(e,"hidden",t)},getHidden(t){return r(e,"hidden",t)},setLicenseeNumber(t){a(e,"licenseeNumber",t)},getLicenseeNumber(t){return r(e,"licenseeNumber",t)},setLicenseTemplateNumber(t){a(e,"licenseTemplateNumber",t)},getLicenseTemplateNumber(t){return r(e,"licenseTemplateNumber",t)},setTimeVolume(t){a(e,"timeVolume",t)},getTimeVolume(t){return r(e,"timeVolume",t)},setTimeVolumePeriod(t){a(e,"timeVolumePeriod",t)},getTimeVolumePeriod(t){return r(e,"timeVolumePeriod",t)},setStartDate(t){a(e,"startDate",t)},getStartDate(t){return r(e,"startDate",t)},setParentfeature(t){a(e,"parentfeature",t)},getParentfeature(t){return r(e,"parentfeature",t)},serialize(){return E(e,{ignore:["inUse"]})}},Fe)},k=Fe;var L=n=>{let e=P(n),{startDate:o}=e;return o&&typeof o=="string"&&(e.startDate=o==="now"?o:new Date(o)),k(e)};var He=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setProductNumber(t){a(e,"productNumber",t)},getProductNumber(t){return r(e,"productNumber",t)},setMarkedForTransfer(t){a(e,"markedForTransfer",t)},getMarkedForTransfer(t){return r(e,"markedForTransfer",t)},serialize(){return E(e,{ignore:["inUse"]})}},He)},De=He;var x=n=>De(P(n));var Ke=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setLicenseType(t){a(e,"licenseType",t)},getLicenseType(t){return r(e,"licenseType",t)},setPrice(t){a(e,"price",t)},getPrice(t){return r(e,"price",t)},setCurrency(t){a(e,"currency",t)},getCurrency(t){return r(e,"currency",t)},setAutomatic(t){a(e,"automatic",t)},getAutomatic(t){return r(e,"automatic",t)},setHidden(t){a(e,"hidden",t)},getHidden(t){return r(e,"hidden",t)},setHideLicenses(t){a(e,"hideLicenses",t)},getHideLicenses(t){return r(e,"hideLicenses",t)},setGracePeriod(t){a(e,"gracePeriod",t)},getGracePeriod(t){return r(e,"gracePeriod",t)},setTimeVolume(t){a(e,"timeVolume",t)},getTimeVolume(t){return r(e,"timeVolume",t)},setTimeVolumePeriod(t){a(e,"timeVolumePeriod",t)},getTimeVolumePeriod(t){return r(e,"timeVolumePeriod",t)},setMaxSessions(t){a(e,"maxSessions",t)},getMaxSessions(t){return r(e,"maxSessions",t)},setQuantity(t){a(e,"quantity",t)},getQuantity(t){return r(e,"quantity",t)},setProductModuleNumber(t){a(e,"productModuleNumber",t)},getProductModuleNumber(t){return r(e,"productModuleNumber",t)},serialize(){return E(e,{ignore:["inUse"]})}},Ke)},Ee=Ke;var S=n=>Ee(P(n));var ze=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setProtocol(t){a(e,"protocol",t)},getProtocol(t){return r(e,"protocol",t)},setEvents(t){a(e,"events",t)},getEvents(t){return r(e,"events",t)},addEvent(t){let i=this.getEvents([]);i.push(t),this.setEvents(i)},setPayload(t){a(e,"payload",t)},getPayload(t){return r(e,"payload",t)},setEndpoint(t){a(e,"endpoint",t)},getEndpoint(t){return r(e,"endpoint",t)},serialize(){let t=E(e);return t.events&&(t.events=this.getEvents([]).join(",")),t}},ze)},ve=ze;var A=n=>{let e=P(n),{events:o}=e;return o&&typeof o=="string"&&(e.events=o.split(",")),ve(e)};var Ge=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)}},Ge)},he=Ge;var $=n=>he(P(n));var Je=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setVersion(t){a(e,"version",t)},getVersion(t){return r(e,"version",t)},setDescription(t){a(e,"description",t)},getDescription(t){return r(e,"description",t)},setLicensingInfo(t){a(e,"licensingInfo",t)},getLicensingInfo(t){return r(e,"licensingInfo",t)},setLicenseeAutoCreate(t){a(e,"licenseeAutoCreate",t)},getLicenseeAutoCreate(t){return r(e,"licenseeAutoCreate",t)},setDiscounts(t){a(e,"discounts",t)},getDiscounts(t){return r(e,"discounts",t)},addDiscount(t){let i=this.getDiscounts([]);i.push(t),this.setDiscounts(i)},removeDiscount(t){let i=this.getDiscounts();Array.isArray(i)&&i.length>0&&(i.splice(i.indexOf(t),1),this.setDiscounts(i))},setProductDiscounts(t){this.setDiscounts(t)},getProductDiscounts(t){return this.getDiscounts(t)},serialize(){let t=E(e,{ignore:["discounts","inUse"]}),i=this.getDiscounts();return i&&(t.discount=i.length>0?i.map(s=>s.toString()):""),t}},Je)},Ne=Je;import{AxiosError as _t}from"axios";var h=class n extends _t{constructor(o,t,i,s,c,d){super(o,t,i,s,c);this.isNlicError=!0;this.name="NlicError",d&&(this.stack=d),Object.setPrototypeOf(this,n.prototype)}};var Qe=function(n={}){let e={...n};if(e.amountFix&&e.amountPercent)throw new h('Properties "amountFix" and "amountPercent" cannot be used at the same time');return g(e,{setTotalPrice(t){a(e,"totalPrice",t)},getTotalPrice(t){return r(e,"totalPrice",t)},setCurrency(t){a(e,"currency",t)},getCurrency(t){return r(e,"currency",t)},setAmountFix(t){a(e,"amountFix",t)},getAmountFix(t){return r(e,"amountFix",t)},setAmountPercent(t){a(e,"amountPercent",t)},getAmountPercent(t){return r(e,"amountPercent",t)},toString(){let t=this.getTotalPrice(),i=this.getCurrency(),s=this.getAmountPercent()?`${this.getAmountPercent()}%`:this.getAmountFix();return t&&i&&s?`${t};${i};${s}`:""}},Qe,{set:(t,i)=>{i==="amountFix"&&delete t.amountPercent,i==="amountPercent"&&delete t.amountFix}})},Ie=Qe;var M=n=>{let e=P(n),o=e.discount;return delete e.discount,o&&(e.discounts=o.map(t=>Ie(t))),Ne(e)};var We=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setName(t){a(e,"name",t)},getName(t){return r(e,"name",t)},setLicensingModel(t){a(e,"licensingModel",t)},getLicensingModel(t){return r(e,"licensingModel",t)},setMaxCheckoutValidity(t){a(e,"maxCheckoutValidity",t)},getMaxCheckoutValidity(t){return r(e,"maxCheckoutValidity",t)},setYellowThreshold(t){a(e,"yellowThreshold",t)},getYellowThreshold(t){return r(e,"yellowThreshold",t)},setRedThreshold(t){a(e,"redThreshold",t)},getRedThreshold(t){return r(e,"redThreshold",t)},setProductNumber(t){a(e,"productNumber",t)},getProductNumber(t){return r(e,"productNumber",t)},serialize(){return E(e,{ignore:["inUse"]})}},We)},be=We;var O=n=>be(P(n));var Xe=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setExpirationTime(t){a(e,"expirationTime",t)},getExpirationTime(t){return r(e,"expirationTime",t)},setTokenType(t){a(e,"tokenType",t)},getTokenType(t){return r(e,"tokenType",t)},setLicenseeNumber(t){a(e,"licenseeNumber",t)},getLicenseeNumber(t){return r(e,"licenseeNumber",t)},setAction(t){a(e,"action",t)},getAction(t){return r(e,"action",t)},setApiKeyRole(t){a(e,"apiKeyRole",t)},getApiKeyRole(t){return r(e,"apiKeyRole",t)},setBundleNumber(t){a(e,"bundleNumber",t)},getBundleNumber(t){return r(e,"bundleNumber",t)},setBundlePrice(t){a(e,"bundlePrice",t)},getBundlePrice(t){return r(e,"bundlePrice",t)},setProductNumber(t){a(e,"productNumber",t)},getProductNumber(t){return r(e,"productNumber",t)},setPredefinedShoppingItem(t){a(e,"predefinedShoppingItem",t)},getPredefinedShoppingItem(t){return r(e,"predefinedShoppingItem",t)},setSuccessURL(t){a(e,"successURL",t)},getSuccessURL(t){return r(e,"successURL",t)},setSuccessURLTitle(t){a(e,"successURLTitle",t)},getSuccessURLTitle(t){return r(e,"successURLTitle",t)},setCancelURL(t){a(e,"cancelURL",t)},getCancelURL(t){return r(e,"cancelURL",t)},setCancelURLTitle(t){a(e,"cancelURLTitle",t)},getCancelURLTitle(t){return r(e,"cancelURLTitle",t)},getShopURL(t){return r(e,"shopURL",t)},serialize(){return E(e,{ignore:["shopURL"]})}},Xe)},Le=Xe;var B=n=>{let e=P(n),{expirationTime:o}=e;return o&&typeof o=="string"&&(e.expirationTime=new Date(o)),Le(e)};var Re=class{constructor(e,o){this.transaction=e,this.license=o}setTransaction(e){this.transaction=e}getTransaction(){return this.transaction}setLicense(e){this.license=e}getLicense(){return this.license}},Ce=(n,e)=>new Re(n,e);var Ze=function(n={}){let e={...n};return g(e,{setActive(t){a(e,"active",t)},getActive(t){return r(e,"active",t)},setNumber(t){a(e,"number",t)},getNumber(t){return r(e,"number",t)},setStatus(t){a(e,"status",t)},getStatus(t){return r(e,"status",t)},setSource(t){a(e,"source",t)},getSource(t){return r(e,"source",t)},setGrandTotal(t){a(e,"grandTotal",t)},getGrandTotal(t){return r(e,"grandTotal",t)},setDiscount(t){a(e,"discount",t)},getDiscount(t){return r(e,"discount",t)},setCurrency(t){a(e,"currency",t)},getCurrency(t){return r(e,"currency",t)},setDateCreated(t){a(e,"dateCreated",t)},getDateCreated(t){return r(e,"dateCreated",t)},setDateClosed(t){a(e,"dateClosed",t)},getDateClosed(t){return r(e,"dateClosed",t)},setPaymentMethod(t){a(e,"paymentMethod",t)},getPaymentMethod(t){return r(e,"paymentMethod",t)},setLicenseTransactionJoins(t){a(e,"licenseTransactionJoins",t)},getLicenseTransactionJoins(t){return r(e,"licenseTransactionJoins",t)},serialize(){return E(e,{ignore:["licenseTransactionJoins","inUse"]})}},Ze)},X=Ze;var _=n=>{let e=P(n),{dateCreated:o,dateClosed:t}=e;o&&typeof o=="string"&&(e.dateCreated=new Date(o)),t&&typeof t=="string"&&(e.dateClosed=new Date(t));let i=e.licenseTransactionJoin;return delete e.licenseTransactionJoin,i&&(e.licenseTransactionJoins=i.map(({transactionNumber:s,licenseNumber:c})=>{let d=X({number:s}),l=k({number:c});return Ce(d,l)})),X(e)};import wt from"axios";var et=wt.create(),tt=null,nt=[],ot=n=>{et=n},Z=()=>et,xe=n=>{tt=n},it=()=>tt,Se=n=>{nt=n},st=()=>nt;var Ae={name:"netlicensing-client",version:"2.0.0",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/index.cjs",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.mjs",require:"./dist/index.cjs"}},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"},peerDependencies:{axios:"^1.9.0"},dependencies:{},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",axios:"^1.9.0",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"]};var ee=n=>{let e=[],o=(t,i)=>{if(t!=null){if(Array.isArray(t)){t.forEach(s=>{o(s,i?`${i}`:"")});return}if(t instanceof Date){e.push(`${i}=${encodeURIComponent(t.toISOString())}`);return}if(typeof t=="object"){Object.keys(t).forEach(s=>{let c=t[s];o(c,i?`${i}[${encodeURIComponent(s)}]`:encodeURIComponent(s))});return}e.push(`${i}=${encodeURIComponent(t)}`)}};return o(n),e.join("&")};var w=async(n,e,o,t,i)=>{let s={Accept:"application/json","X-Requested-With":"XMLHttpRequest"};typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(s["User-agent"]=`NetLicensing/Javascript ${Ae.version}/node&${process.version}`);let c={method:e,headers:s,url:encodeURI(`${n.getBaseUrl()}/${o}`),responseType:"json",transformRequest:(l,f)=>f["Content-Type"]==="application/x-www-form-urlencoded"?ee(l):(f["NetLicensing-Origin"]||(f["NetLicensing-Origin"]=`NetLicensing/Javascript ${Ae.version}`),l)};switch(["put","post","patch"].indexOf(e.toLowerCase())>=0?(c.method==="post"&&(s["Content-Type"]="application/x-www-form-urlencoded"),c.data=t):c.params=t,n.getSecurityMode()){case N.BASIC_AUTHENTICATION:{if(!n.getUsername())throw new h('Missing parameter "username"');if(!n.getPassword())throw new h('Missing parameter "password"');c.auth={username:n.getUsername(),password:n.getPassword()}}break;case N.APIKEY_IDENTIFICATION:if(!n.getApiKey())throw new h('Missing parameter "apiKey"');s.Authorization=`Basic ${btoa(`apiKey:${n.getApiKey()}`)}`;break;case N.ANONYMOUS_IDENTIFICATION:break;default:throw new h("Unknown security mode")}let d=i?.axiosInstance||Z();try{let l=await d(c),f=l.data.infos?.info||[];if(xe(l),Se(f),i?.onResponse&&i.onResponse(l),f.length>0){i?.onInfo&&i.onInfo(f);let v=f.find(({type:I})=>I==="ERROR");if(v)throw new h(v.value,v.id,l.config,l.request,l)}return l}catch(l){let f=l,v=f.response,I=v?.data?.infos?.info||[];if(xe(v||null),Se(I),l.isAxiosError){let b=l.message;if(v?.data&&I.length>0){let V=I.find(({type:j})=>j==="ERROR");V&&(b=V.value)}throw new h(b,f.code,f.config,f.request,f.response)}throw l}};var rt=(n,e,o,t)=>w(n,"get",e,o,t),at=(n,e,o,t)=>w(n,"post",e,o,t),ct=(n,e,o,t)=>w(n,"delete",e,o,t);var Vt={setAxiosInstance(n){ot(n)},getAxiosInstance(){return Z()},getLastHttpRequestInfo(){return it()},getInfo(){return st()},get(n,e,o,t){return rt(n,e,o,t)},post(n,e,o,t){return at(n,e,o,t)},delete(n,e,o,t){return ct(n,e,o,t)},request(n,e,o,t,i){return w(n,e,o,t,i)},toQueryString(n){return ee(n)}},m=Vt;var dt=";",mt="=",D=n=>Object.keys(n).map(e=>`${e}${mt}${String(n[e])}`).join(dt),jt=n=>{let e={};return n.split(dt).forEach(o=>{let[t,i]=o.split(mt);e[t]=i}),e};var ut=n=>typeof n<"u"&&typeof n!="function",te=n=>ut(n)?typeof n=="number"?!Number.isNaN(n):!0:!1,T=(n,e)=>{if(n===null)throw new TypeError(`Parameter "${e}" cannot be null.`);if(!te(n))throw new TypeError(`Parameter "${e}" has an invalid value.`)},p=(n,e)=>{if(T(n,e),!n)throw new TypeError(`Parameter "${e}" cannot be empty.`)};var pt=function(n,e){let o=parseInt(e?.pagenumber||"0",10),t=parseInt(e?.itemsnumber||"0",10),i=parseInt(e?.totalpages||"0",10),s=parseInt(e?.totalitems||"0",10),c={getContent(){return n},getPagination(){return{pageNumber:o,itemsNumber:t,totalPages:i,totalItems:s,hasNext:i>o+1}},getPageNumber(){return o},getItemsNumber(){return t},getTotalPages(){return i},getTotalItems(){return s},hasNext(){return i>o+1}};return new Proxy(n,{get(d,l,f){return Object.hasOwn(c,l)?c[l]:Reflect.get(d,l,f)},set(d,l,f,v){return Reflect.set(d,l,f,v)},getPrototypeOf(){return pt.prototype||null}})},y=pt;var U=u.Bundle.ENDPOINT_PATH,kt=u.Bundle.ENDPOINT_OBTAIN_PATH,ne=u.Bundle.TYPE,$t={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${U}/${e}`,{},o)).data.items?.item.find(s=>s.type===ne);return C(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,U,t,o)).data.items,c=s?.item.filter(d=>d.type===ne).map(d=>C(d));return y(c||[],s)},async create(n,e,o){T(e,"bundle");let i=(await m.post(n,U,e.serialize(),o)).data.items?.item.find(s=>s.type===ne);return C(i)},async update(n,e,o,t){p(e,"number"),T(o,"bundle");let s=(await m.post(n,`${U}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===ne);return C(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${U}/${e}`,{forceCascade:!!o},t)},async obtain(n,e,o,t){p(e,"number"),p(o,"licenseeNumber");let i={[u.Licensee.LICENSEE_NUMBER]:o};return(await m.post(n,`${U}/${e}/${kt}`,i,t)).data.items?.item.filter(l=>l.type===u.License.TYPE)?.map(l=>L(l))||[]}},Bt=$t;var Me=class{constructor(){this.validations={}}getValidators(){return this.validations}setValidation(e){return this.validations[e.productModuleNumber]=e,this}getValidation(e,o){return this.validations[e]||o}setProductModuleValidation(e){return this.setValidation(e)}getProductModuleValidation(e,o){return this.getValidation(e,o)}setTtl(e){if(!te(e))throw new TypeError(`Bad ttl:${e.toString()}`);return this.ttl=new Date(e),this}getTtl(){return this.ttl}toString(){let e="ValidationResult [";return Object.keys(this.validations).forEach(o=>{e+=`ProductModule<${o}>`,o in this.validations&&(e+=JSON.stringify(this.validations[o]))}),e+="]",e}},Oe=()=>new Me;var R=u.Licensee.ENDPOINT_PATH,qt=u.Licensee.ENDPOINT_PATH_VALIDATE,Yt=u.Licensee.ENDPOINT_PATH_TRANSFER,oe=u.Licensee.TYPE,Ft={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${R}/${e}`,{},o)).data.items?.item.find(s=>s.type===oe);return x(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,R,t,o)).data.items,c=s?.item.filter(d=>d.type===oe).map(d=>x(d));return y(c||[],s)},async create(n,e,o,t){T(o,"licensee");let i=o.serialize();e&&(i.productNumber=e);let c=(await m.post(n,R,i,t)).data.items?.item.find(d=>d.type===oe);return x(c)},async update(n,e,o,t){p(e,"number"),T(o,"licensee");let s=(await m.post(n,`${R}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===oe);return x(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${R}/${e}`,{forceCascade:!!o},t)},async validate(n,e,o,t){p(e,"number");let i={};if(o){let f=o.productNumber;f&&(i.productNumber=f);let v=o.licenseeProperties;Object.keys(v).forEach(b=>{i[b]=o.getLicenseeProperty(b)}),o.isForOfflineUse()&&(i.forOfflineUse=!0),o.isDryRun()&&(i.dryRun=!0);let I=o.getParameters();Object.keys(I).forEach((b,V)=>{i[`${u.ProductModule.PRODUCT_MODULE_NUMBER}${V}`]=b;let j=I[b];j&&Object.keys(j).forEach($e=>{i[$e+V]=j[$e]})})}let s=await m.post(n,`${R}/${e}/${qt}`,i,t),c=Oe(),d=s.data.ttl;return d&&c.setTtl(d),s.data.items?.item.filter(f=>f.type===u.Validation.TYPE)?.forEach(f=>{c.setValidation(P(f))}),c},transfer(n,e,o,t){p(e,"number"),p(o,"sourceLicenseeNumber");let i={sourceLicenseeNumber:o};return m.post(n,`${R}/${e}/${Yt}`,i,t)}},Ht=Ft;var q=u.License.ENDPOINT_PATH,ie=u.License.TYPE,Kt={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${q}/${e}`,{},o)).data.items?.item.find(s=>s.type===ie);return L(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,q,t,o)).data.items,c=s?.item.filter(d=>d.type===ie).map(d=>L(d));return y(c||[],s)},async create(n,e,o,t,i,s){T(i,"license");let c=i.serialize();e&&(c.licenseeNumber=e),o&&(c.licenseTemplateNumber=o),t&&(c.transactionNumber=t);let l=(await m.post(n,q,c,s)).data.items?.item.find(f=>f.type===ie);return L(l)},async update(n,e,o,t,i){p(e,"number"),T(t,"license");let s=t.serialize();o&&(s.transactionNumber=o);let d=(await m.post(n,`${q}/${e}`,s,i)).data.items?.item.find(l=>l.type===ie);return L(d)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${q}/${e}`,{forceCascade:!!o},t)}},zt=Kt;var Y=u.LicenseTemplate.ENDPOINT_PATH,se=u.LicenseTemplate.TYPE,Gt={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${Y}/${e}`,{},o)).data.items?.item.find(s=>s.type===se);return S(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,Y,t,o)).data.items,c=s?.item.filter(d=>d.type===se).map(d=>S(d));return y(c||[],s)},async create(n,e,o,t){T(o,"licenseTemplate");let i=o.serialize();e&&(i.productModuleNumber=e);let c=(await m.post(n,Y,i,t)).data.items?.item.find(d=>d.type===se);return S(c)},async update(n,e,o,t){p(e,"number"),T(o,"licenseTemplate");let s=(await m.post(n,`${Y}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===se);return S(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${Y}/${e}`,{forceCascade:!!o},t)}},Jt=Gt;var F=u.Notification.ENDPOINT_PATH,re=u.Notification.TYPE,Qt={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${F}/${e}`,{},o)).data.items?.item.find(s=>s.type===re);return A(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,F,t,o)).data.items,c=s?.item.filter(d=>d.type===re).map(d=>A(d));return y(c||[],s)},async create(n,e,o){T(e,"notification");let i=(await m.post(n,F,e.serialize(),o)).data.items?.item.find(s=>s.type===re);return A(i)},async update(n,e,o,t){p(e,"number"),T(o,"notification");let s=(await m.post(n,`${F}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===re);return A(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${F}/${e}`,{forceCascade:!!o},t)}},Wt=Qt;var _e=u.PaymentMethod.ENDPOINT_PATH,we=u.PaymentMethod.TYPE,Xt={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${_e}/${e}`,{},o)).data.items?.item.find(s=>s.type===we);return $(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,_e,t,o)).data.items,c=s?.item.filter(d=>d.type===we).map(d=>$(d));return y(c||[],s)},async update(n,e,o,t){p(e,"number"),T(o,"paymentMethod");let s=(await m.post(n,`${_e}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===we);return $(s)}},Zt=Xt;var H=u.ProductModule.ENDPOINT_PATH,ae=u.ProductModule.TYPE,en={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${H}/${e}`,{},o)).data.items?.item.find(s=>s.type===ae);return O(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,H,t,o)).data.items,c=s?.item.filter(d=>d.type===ae).map(d=>O(d));return y(c||[],s)},async create(n,e,o,t){T(o,"productModule");let i=o.serialize();e&&(i.productNumber=e);let c=(await m.post(n,H,i,t)).data.items?.item.find(d=>d.type===ae);return O(c)},async update(n,e,o,t){p(e,"number"),T(o,"productModule");let s=(await m.post(n,`${H}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===ae);return O(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${H}/${e}`,{forceCascade:!!o},t)}},tn=en;var K=u.Product.ENDPOINT_PATH,ce=u.Product.TYPE,nn={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${K}/${e}`,{},o)).data.items?.item.find(s=>s.type===ce);return M(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,K,t,o)).data.items,c=s?.item.filter(d=>d.type===ce).map(d=>M(d));return y(c||[],s)},async create(n,e,o){T(e,"product");let i=(await m.post(n,K,e.serialize(),o)).data.items?.item.find(s=>s.type===ce);return M(i)},async update(n,e,o,t){p(e,"number"),T(o,"product");let s=(await m.post(n,`${K}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===ce);return M(s)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${K}/${e}`,{forceCascade:!!o},t)}},on=nn;var de=u.Token.ENDPOINT_PATH,Ue=u.Token.TYPE,sn={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${de}/${e}`,{},o)).data.items?.item.find(s=>s.type===Ue);return B(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,de,t,o)).data.items,c=s?.item.filter(d=>d.type===Ue).map(d=>B(d));return y(c||[],s)},async create(n,e,o){T(e,"token");let i=(await m.post(n,de,e.serialize(),o)).data.items?.item.find(s=>s.type===Ue);return B(i)},delete(n,e,o,t){return p(e,"number"),m.delete(n,`${de}/${e}`,{forceCascade:!!o},t)}},rn=sn;var me=u.Transaction.ENDPOINT_PATH,ue=u.Transaction.TYPE,an={async get(n,e,o){p(e,"number");let i=(await m.get(n,`${me}/${e}`,{},o)).data.items?.item.find(s=>s.type===ue);return _(i)},async list(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let s=(await m.get(n,me,t,o)).data.items,c=s?.item.filter(d=>d.type===ue).map(d=>_(d));return y(c||[],s)},async create(n,e,o){T(e,"transaction");let i=(await m.post(n,me,e.serialize(),o)).data.items?.item.find(s=>s.type===ue);return _(i)},async update(n,e,o,t){p(e,"number"),T(o,"transaction");let s=(await m.post(n,`${me}/${e}`,o.serialize(),t)).data.items?.item.find(c=>c.type===ue);return _(s)}},cn=an;var Ve=u.Utility.ENDPOINT_PATH,dn={async listLicenseTypes(n,e){let o=`${Ve}/${u.Utility.ENDPOINT_PATH_LICENSE_TYPES}`,i=(await m.get(n,o,void 0,e)).data.items,s=u.Utility.LICENSE_TYPE,c=i?.item.filter(d=>d.type===s).map(d=>P(d).name);return y(c||[],i)},async listLicensingModels(n,e){let o=`${Ve}/${u.Utility.ENDPOINT_PATH_LICENSING_MODELS}`,i=(await m.get(n,o,void 0,e)).data.items,s=u.Utility.LICENSING_MODEL_TYPE,c=i?.item.filter(d=>d.type===s).map(d=>P(d).name);return y(c||[],i)},async listCountries(n,e,o){let t={};e&&(t[u.FILTER]=typeof e=="string"?e:D(e));let i=`${Ve}/${u.Utility.ENDPOINT_PATH_COUNTRIES}`,c=(await m.get(n,i,t,o)).data.items,d=u.Utility.COUNTRY_TYPE,l=c?.item.filter(f=>f.type===d).map(f=>ye(f));return y(l||[],c)}},mn=dn;var je=class{constructor(e){this.baseUrl=e?.baseUrl||"https://go.netlicensing.io/core/v2/rest",this.securityMode=e?.securityMode||N.BASIC_AUTHENTICATION,this.username=e?.username,this.password=e?.password,this.apiKey=e?.apiKey,this.publicKey=e?.publicKey}setBaseUrl(e){return this.baseUrl=e,this}getBaseUrl(){return this.baseUrl}setSecurityMode(e){return this.securityMode=e,this}getSecurityMode(){return this.securityMode}setUsername(e){return this.username=e,this}getUsername(e){return this.username||e}setPassword(e){return this.password=e,this}getPassword(e){return this.password||e}setApiKey(e){return this.apiKey=e,this}getApiKey(e){return this.apiKey||e}setPublicKey(e){return this.publicKey=e,this}getPublicKey(e){return this.publicKey||e}},un=n=>new je(n);var ke=class{constructor(){this.parameters={},this.licenseeProperties={}}setProductNumber(e){return this.productNumber=e,this}getProductNumber(){return this.productNumber}setLicenseeName(e){return this.licenseeProperties.licenseeName=e,this}getLicenseeName(){return this.licenseeProperties.licenseeName}setLicenseeSecret(e){return this.licenseeProperties.licenseeSecret=e,this}getLicenseeSecret(){return this.licenseeProperties.licenseeSecret}getLicenseeProperties(){return this.licenseeProperties}setLicenseeProperty(e,o){return this.licenseeProperties[e]=o,this}getLicenseeProperty(e,o){return this.licenseeProperties[e]||o}setForOfflineUse(e){return this.forOfflineUse=e,this}isForOfflineUse(){return!!this.forOfflineUse}setDryRun(e){return this.dryRun=e,this}isDryRun(){return!!this.dryRun}getParameters(){return this.parameters}setParameter(e,o){return this.parameters[e]=o,this}getParameter(e){return this.parameters[e]}getProductModuleValidationParameters(e){return this.getParameter(e)}setProductModuleValidationParameters(e,o){return this.setParameter(e,o)}},pn=()=>new ke;export{Nt as ApiKeyRole,Pe as Bundle,Bt as BundleService,u as Constants,un as Context,ge as Country,k as License,zt as LicenseService,Ee as LicenseTemplate,Jt as LicenseTemplateService,Ce as LicenseTransactionJoin,z as LicenseType,De as Licensee,pe as LicenseeSecretMode,Ht as LicenseeService,bt as LicensingModel,h as NlicError,Rt as NodeSecretMode,ve as Notification,G as NotificationEvent,J as NotificationProtocol,Wt as NotificationService,y as Page,he as PaymentMethod,xt as PaymentMethodEnum,Zt as PaymentMethodService,Ne as Product,Ie as ProductDiscount,be as ProductModule,tn as ProductModuleService,on as ProductService,N as SecurityMode,m as Service,le as TimeVolumePeriod,Le as Token,rn as TokenService,Q as TokenType,X as Transaction,cn as TransactionService,fe as TransactionSource,W as TransactionStatus,mn as UtilityService,pn as ValidationParameters,Oe as ValidationResults,g as defineEntity,p as ensureNotEmpty,T as ensureNotNull,jt as filterDecode,D as filterEncode,ut as isDefined,te as isValid,C as itemToBundle,ye as itemToCountry,L as itemToLicense,S as itemToLicenseTemplate,x as itemToLicensee,A as itemToNotification,P as itemToObject,$ as itemToPaymentMethod,M as itemToProduct,O as itemToProductModule,B as itemToToken,_ as itemToTransaction,E as serialize}; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/dist/index.mjs.map b/dist/index.mjs.map new file mode 100644 index 0000000..b384e24 --- /dev/null +++ b/dist/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/constants/LicenseeSecretMode.ts","../src/constants/LicenseType.ts","../src/constants/NotificationEvent.ts","../src/constants/NotificationProtocol.ts","../src/constants/SecurityMode.ts","../src/constants/TimeVolumePeriod.ts","../src/constants/TokenType.ts","../src/constants/TransactionSource.ts","../src/constants/TransactionStatus.ts","../src/constants/index.ts","../src/constants/ApiKeyRole.ts","../src/constants/LicensingModel.ts","../src/constants/NodeSecretMode.ts","../src/constants/PaymentMethodEnum.ts","../src/converters/itemToObject.ts","../src/utils/helpers.ts","../src/utils/serialize.ts","../src/entities/defineEntity.ts","../src/entities/Bundle.ts","../src/converters/itemToBundle.ts","../src/entities/Country.ts","../src/converters/itemToCountry.ts","../src/entities/License.ts","../src/converters/itemToLicense.ts","../src/entities/Licensee.ts","../src/converters/itemToLicensee.ts","../src/entities/LicenseTemplate.ts","../src/converters/itemToLicenseTemplate.ts","../src/entities/Notification.ts","../src/converters/itemToNotification.ts","../src/entities/PaymentMethod.ts","../src/converters/itemToPaymentMethod.ts","../src/entities/Product.ts","../src/errors/NlicError.ts","../src/entities/ProductDiscount.ts","../src/converters/itemToProduct.ts","../src/entities/ProductModule.ts","../src/converters/itemToProductModule.ts","../src/entities/Token.ts","../src/converters/itemToToken.ts","../src/entities/LicenseTransactionJoin.ts","../src/entities/Transaction.ts","../src/converters/itemToTransaction.ts","../src/services/Service/instance.ts","../package.json","../src/services/Service/toQueryString.ts","../src/services/Service/request.ts","../src/services/Service/methods.ts","../src/services/Service/index.ts","../src/utils/filter.ts","../src/utils/validation.ts","../src/vo/Page.ts","../src/services/BundleService.ts","../src/vo/ValidationResults.ts","../src/services/LicenseeService.ts","../src/services/LicenseService.ts","../src/services/LicenseTemplateService.ts","../src/services/NotificationService.ts","../src/services/PaymentMethodService.ts","../src/services/ProductModuleService.ts","../src/services/ProductService.ts","../src/services/TokenService.ts","../src/services/TransactionService.ts","../src/services/UtilityService.ts","../src/vo/Context.ts","../src/vo/ValidationParameters.ts"],"sourcesContent":["/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst LicenseeSecretMode = Object.freeze({\r\n // @deprecated\r\n DISABLED: 'DISABLED',\r\n PREDEFINED: 'PREDEFINED',\r\n CLIENT: 'CLIENT',\r\n});\r\n\r\nexport default LicenseeSecretMode;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst LicenseType = Object.freeze({\r\n FEATURE: 'FEATURE',\r\n TIMEVOLUME: 'TIMEVOLUME',\r\n FLOATING: 'FLOATING',\r\n QUANTITY: 'QUANTITY',\r\n});\r\n\r\nexport default LicenseType;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst NotificationEvent = Object.freeze({\r\n LICENSEE_CREATED: 'LICENSEE_CREATED',\r\n LICENSE_CREATED: 'LICENSE_CREATED',\r\n WARNING_LEVEL_CHANGED: 'WARNING_LEVEL_CHANGED',\r\n PAYMENT_TRANSACTION_PROCESSED: 'PAYMENT_TRANSACTION_PROCESSED',\r\n});\r\n\r\nexport default NotificationEvent;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst NotificationProtocol = Object.freeze({\r\n WEBHOOK: 'WEBHOOK',\r\n});\r\n\r\nexport default NotificationProtocol;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst SecurityMode = Object.freeze({\r\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\r\n APIKEY_IDENTIFICATION: 'APIKEY',\r\n ANONYMOUS_IDENTIFICATION: 'ANONYMOUS',\r\n});\r\n\r\nexport default SecurityMode;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TimeVolumePeriod = Object.freeze({\r\n DAY: 'DAY',\r\n WEEK: 'WEEK',\r\n MONTH: 'MONTH',\r\n YEAR: 'YEAR',\r\n});\r\n\r\nexport default TimeVolumePeriod;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TokenType = Object.freeze({\r\n DEFAULT: 'DEFAULT',\r\n SHOP: 'SHOP',\r\n APIKEY: 'APIKEY',\r\n ACTION: 'ACTION',\r\n});\r\n\r\nexport default TokenType;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TransactionSource = Object.freeze({\r\n SHOP: 'SHOP',\r\n\r\n AUTO_LICENSE_CREATE: 'AUTO_LICENSE_CREATE',\r\n AUTO_LICENSE_UPDATE: 'AUTO_LICENSE_UPDATE',\r\n AUTO_LICENSE_DELETE: 'AUTO_LICENSE_DELETE',\r\n\r\n AUTO_LICENSEE_CREATE: 'AUTO_LICENSEE_CREATE',\r\n AUTO_LICENSEE_DELETE: 'AUTO_LICENSEE_DELETE',\r\n AUTO_LICENSEE_VALIDATE: 'AUTO_LICENSEE_VALIDATE',\r\n\r\n AUTO_LICENSETEMPLATE_DELETE: 'AUTO_LICENSETEMPLATE_DELETE',\r\n\r\n AUTO_PRODUCTMODULE_DELETE: 'AUTO_PRODUCTMODULE_DELETE',\r\n\r\n AUTO_PRODUCT_DELETE: 'AUTO_PRODUCT_DELETE',\r\n\r\n AUTO_LICENSES_TRANSFER: 'AUTO_LICENSES_TRANSFER',\r\n\r\n SUBSCRIPTION_UPDATE: 'SUBSCRIPTION_UPDATE',\r\n\r\n RECURRING_PAYMENT: 'RECURRING_PAYMENT',\r\n\r\n CANCEL_RECURRING_PAYMENT: 'CANCEL_RECURRING_PAYMENT',\r\n\r\n OBTAIN_BUNDLE: 'OBTAIN_BUNDLE',\r\n});\r\n\r\nexport default TransactionSource;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst TransactionStatus = Object.freeze({\r\n PENDING: 'PENDING',\r\n CLOSED: 'CLOSED',\r\n CANCELLED: 'CANCELLED',\r\n});\r\n\r\nexport default TransactionStatus;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport LicenseeSecretMode from '@/constants/LicenseeSecretMode';\r\nimport LicenseType from '@/constants/LicenseType';\r\nimport NotificationEvent from '@/constants/NotificationEvent';\r\nimport NotificationProtocol from '@/constants/NotificationProtocol';\r\nimport SecurityMode from '@/constants/SecurityMode';\r\nimport TimeVolumePeriod from '@/constants/TimeVolumePeriod';\r\nimport TokenType from '@/constants/TokenType';\r\nimport TransactionSource from '@/constants/TransactionSource';\r\nimport TransactionStatus from '@/constants/TransactionStatus';\r\n\r\nexport default {\r\n LicenseeSecretMode,\r\n LicenseType,\r\n NotificationEvent,\r\n NotificationProtocol,\r\n SecurityMode,\r\n TimeVolumePeriod,\r\n TokenType,\r\n TransactionSource,\r\n TransactionStatus,\r\n\r\n // @deprecated use SecurityMode.BASIC_AUTHENTICATION instead\r\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\r\n\r\n // @deprecated use SecurityMode.APIKEY_IDENTIFICATION instead\r\n APIKEY_IDENTIFICATION: 'APIKEY',\r\n\r\n // @deprecated use SecurityMode.ANONYMOUS_IDENTIFICATION instead\r\n ANONYMOUS_IDENTIFICATION: 'ANONYMOUS',\r\n\r\n FILTER: 'filter',\r\n\r\n Product: {\r\n TYPE: 'Product',\r\n ENDPOINT_PATH: 'product',\r\n },\r\n\r\n ProductModule: {\r\n TYPE: 'ProductModule',\r\n ENDPOINT_PATH: 'productmodule',\r\n PRODUCT_MODULE_NUMBER: 'productModuleNumber',\r\n },\r\n\r\n Licensee: {\r\n TYPE: 'Licensee',\r\n ENDPOINT_PATH: 'licensee',\r\n ENDPOINT_PATH_VALIDATE: 'validate',\r\n ENDPOINT_PATH_TRANSFER: 'transfer',\r\n LICENSEE_NUMBER: 'licenseeNumber',\r\n },\r\n\r\n LicenseTemplate: {\r\n TYPE: 'LicenseTemplate',\r\n ENDPOINT_PATH: 'licensetemplate',\r\n\r\n // @deprecated use LicenseType directly instead\r\n LicenseType,\r\n },\r\n\r\n License: {\r\n TYPE: 'License',\r\n ENDPOINT_PATH: 'license',\r\n },\r\n\r\n Validation: {\r\n TYPE: 'ProductModuleValidation',\r\n },\r\n\r\n Token: {\r\n TYPE: 'Token',\r\n ENDPOINT_PATH: 'token',\r\n\r\n // @deprecated use TokenType directly instead\r\n Type: TokenType,\r\n },\r\n\r\n PaymentMethod: {\r\n TYPE: 'PaymentMethod',\r\n ENDPOINT_PATH: 'paymentmethod',\r\n },\r\n\r\n Bundle: {\r\n TYPE: 'Bundle',\r\n ENDPOINT_PATH: 'bundle',\r\n ENDPOINT_OBTAIN_PATH: 'obtain',\r\n },\r\n\r\n Notification: {\r\n TYPE: 'Notification',\r\n ENDPOINT_PATH: 'notification',\r\n\r\n // @deprecated use NotificationProtocol directly instead\r\n Protocol: NotificationProtocol,\r\n\r\n // @deprecated use NotificationEvent directly instead\r\n Event: NotificationEvent,\r\n },\r\n\r\n Transaction: {\r\n TYPE: 'Transaction',\r\n ENDPOINT_PATH: 'transaction',\r\n\r\n // @deprecated use TransactionStatus directly instead\r\n Status: TransactionStatus,\r\n },\r\n\r\n Utility: {\r\n ENDPOINT_PATH: 'utility',\r\n ENDPOINT_PATH_LICENSE_TYPES: 'licenseTypes',\r\n ENDPOINT_PATH_LICENSING_MODELS: 'licensingModels',\r\n ENDPOINT_PATH_COUNTRIES: 'countries',\r\n LICENSING_MODEL_TYPE: 'LicensingModelProperties',\r\n LICENSE_TYPE: 'LicenseType',\r\n COUNTRY_TYPE: 'Country',\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst ApiKeyRole = Object.freeze({\r\n ROLE_APIKEY_LICENSEE: 'ROLE_APIKEY_LICENSEE',\r\n ROLE_APIKEY_ANALYTICS: 'ROLE_APIKEY_ANALYTICS',\r\n ROLE_APIKEY_OPERATION: 'ROLE_APIKEY_OPERATION',\r\n ROLE_APIKEY_MAINTENANCE: 'ROLE_APIKEY_MAINTENANCE',\r\n ROLE_APIKEY_ADMIN: 'ROLE_APIKEY_ADMIN',\r\n});\r\n\r\nexport default ApiKeyRole;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst LicensingModel = Object.freeze({\r\n TRY_AND_BUY: 'TryAndBuy',\r\n SUBSCRIPTION: 'Subscription',\r\n RENTAL: 'Rental',\r\n FLOATING: 'Floating',\r\n MULTI_FEATURE: 'MultiFeature',\r\n PAY_PER_USE: 'PayPerUse',\r\n PRICING_TABLE: 'PricingTable',\r\n QUOTA: 'Quota',\r\n NODE_LOCKED: 'NodeLocked',\r\n DISCOUNT: 'Discount',\r\n});\r\n\r\nexport default LicensingModel;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst NodeSecretMode = Object.freeze({\r\n PREDEFINED: 'PREDEFINED',\r\n CLIENT: 'CLIENT',\r\n});\r\n\r\nexport default NodeSecretMode;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst PaymentMethodEnum = Object.freeze({\r\n NULL: 'NULL',\r\n PAYPAL: 'PAYPAL',\r\n PAYPAL_SANDBOX: 'PAYPAL_SANDBOX',\r\n STRIPE: 'STRIPE',\r\n STRIPE_TESTING: 'STRIPE_TESTING',\r\n});\r\n\r\nexport default PaymentMethodEnum;\r\n","import { Item, List } from '@/types/api/response';\r\n\r\nconst cast = (value: string): unknown => {\r\n try {\r\n return JSON.parse(value);\r\n } catch (e) {\r\n return value;\r\n }\r\n};\r\n\r\nconst extractProperties = (properties?: { name: string; value: string }[]) => {\r\n const result: Record = {};\r\n properties?.forEach(({ name, value }) => {\r\n result[name] = cast(value);\r\n });\r\n return result;\r\n};\r\n\r\nconst extractLists = (lists?: List[]) => {\r\n const result: Record = {};\r\n\r\n lists?.forEach((list) => {\r\n const { name } = list;\r\n result[name] = result[name] || [];\r\n result[name].push(itemToObject(list));\r\n });\r\n return result;\r\n};\r\n\r\nconst itemToObject = >(item?: Item | List): T => {\r\n return item ? ({ ...extractProperties(item.property), ...extractLists(item.list) } as T) : ({} as T);\r\n};\r\n\r\nexport default itemToObject;\r\n","export const has = (obj: T, key: K): boolean => {\r\n return Object.hasOwn(obj, key);\r\n};\r\n\r\nexport const set = (obj: T, key: K, value: T[K]): void => {\r\n obj[key] = value;\r\n};\r\n\r\nexport const get = (obj: T, key: K, def?: D): T[K] | D => {\r\n return has(obj, key) ? obj[key] : (def as D);\r\n};\r\n\r\nexport default {\r\n has,\r\n set,\r\n get,\r\n};\r\n","/**\r\n * Converts an object into a map of type Record, where the value of each object property is converted\r\n * to a string.\r\n * If the property's value is `undefined`, it will be replaced with an empty string.\r\n * If the value is already a string, it will remain unchanged.\r\n * If the value is Date instance, it wll be replaced with an ISO format date string.\r\n * For complex types (objects, arrays, etc.), the value will be serialized into a JSON string.\r\n * If serialization fails, the value will be converted to a string using `String()`.\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n *\r\n * @param obj - The object to be converted into a map.\r\n * @param options\r\n * @returns A map (Record) with converted property values from the object.\r\n */\r\nexport default (obj: T, options: { ignore?: string[] } = {}): Record => {\r\n const map: Record = {};\r\n\r\n const { ignore = [] } = options;\r\n\r\n Object.entries(obj).forEach(([k, v]) => {\r\n // ignore keys\r\n if (ignore.includes(k)) {\r\n return;\r\n }\r\n\r\n if (typeof v === 'function') {\r\n // ignore functions\r\n return;\r\n } else if (v === undefined) {\r\n map[k] = ''; // if the value is `undefined`, replace it with an empty string\r\n } else if (typeof v === 'string') {\r\n map[k] = v; // If the value is already a string, leave it unchanged\r\n } else if (v instanceof Date) {\r\n // if the value is Date, convert it to ISO string\r\n map[k] = v.toISOString();\r\n } else if (typeof v !== 'object' || v === null) {\r\n // If it's not an object (or is null), convert it to string\r\n map[k] = String(v);\r\n } else {\r\n // Try to serialize the object or array into JSON\r\n try {\r\n map[k] = JSON.stringify(v);\r\n } catch {\r\n map[k] = String(v);\r\n }\r\n }\r\n });\r\n\r\n return map;\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport type {\r\n Entity,\r\n EntityMethods,\r\n Proto,\r\n PropGetEventListener,\r\n PropSetEventListener,\r\n} from '@/types/entities/defineEntity';\r\n\r\n// utils\r\nimport { set, has, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\nconst defineEntity = function

(\r\n props: T,\r\n methods: M,\r\n proto: P = {} as P,\r\n options?: { set?: PropSetEventListener; get?: PropGetEventListener },\r\n) {\r\n const listeners: { set: PropSetEventListener[]; get: PropGetEventListener[] } = {\r\n set: [],\r\n get: [],\r\n };\r\n\r\n if (options?.get) {\r\n listeners.get.push(options.get);\r\n }\r\n\r\n if (options?.set) {\r\n listeners.set.push(options.set);\r\n }\r\n\r\n const base: EntityMethods = {\r\n set(this: void, key, value): void {\r\n set(props, key, value);\r\n },\r\n\r\n get(this: void, key, def) {\r\n return get(props, key, def);\r\n },\r\n\r\n has(this: void, key) {\r\n return has(props, key);\r\n },\r\n\r\n // Aliases\r\n setProperty(key, value) {\r\n this.set(key, value);\r\n },\r\n\r\n addProperty(key, value) {\r\n this.set(key, value);\r\n },\r\n\r\n getProperty(key, def) {\r\n return this.get(key, def);\r\n },\r\n\r\n hasProperty(key) {\r\n return this.has(key);\r\n },\r\n\r\n setProperties(properties) {\r\n Object.entries(properties).forEach(([k, v]) => {\r\n this.set(k as keyof T, v as T[keyof T]);\r\n });\r\n },\r\n\r\n serialize(this: void) {\r\n return serialize(props);\r\n },\r\n };\r\n\r\n return new Proxy(props, {\r\n get(obj: T, prop: string | symbol, receiver) {\r\n if (Object.hasOwn(methods, prop)) {\r\n return methods[prop as keyof typeof methods];\r\n }\r\n\r\n if (Object.hasOwn(base, prop)) {\r\n return base[prop as keyof typeof base];\r\n }\r\n\r\n listeners.get.forEach((l) => {\r\n l(obj, prop, receiver);\r\n });\r\n\r\n return Reflect.get(obj, prop, receiver);\r\n },\r\n\r\n set(obj, prop, value, receiver) {\r\n listeners.set.forEach((l) => {\r\n l(obj, prop, value, receiver);\r\n });\r\n\r\n return Reflect.set(obj, prop, value, receiver);\r\n },\r\n\r\n getPrototypeOf() {\r\n return proto.prototype || null;\r\n },\r\n }) as Entity;\r\n};\r\n\r\nexport default defineEntity;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\n// types\r\nimport type { BundleProps, BundleMethods, BundleEntity } from '@/types/entities/Bundle';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n// entity factory\r\nimport defineEntity from './defineEntity';\r\n\r\n/**\r\n * NetLicensing Bundle entity.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number that identifies the bundle. Vendor can assign this number when creating a bundle or\r\n * let NetLicensing generate one.\r\n * @property string number\r\n *\r\n * If set to false, the bundle is disabled.\r\n * @property boolean active\r\n *\r\n * Bundle name.\r\n * @property string name\r\n *\r\n * Price for the bundle. If >0, it must always be accompanied by the currency specification.\r\n * @property number price\r\n *\r\n * Specifies currency for the bundle price. Check data types to discover which currencies are\r\n * supported.\r\n * @property string currency\r\n *\r\n * The bundle includes a set of templates, each identified by a unique template number.\r\n * @property string[] licenseTemplateNumbers\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each bundle. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted.\r\n */\r\nconst Bundle = function (properties: BundleProps = {} as BundleProps): BundleEntity {\r\n const props: BundleProps = { ...properties };\r\n\r\n const methods: BundleMethods = {\r\n setActive(this: void, active: boolean) {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string) {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setPrice(this: void, price: number): void {\r\n set(props, 'price', price);\r\n },\r\n\r\n getPrice(this: void, def?: D): number | D {\r\n return get(props, 'price', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setLicenseTemplateNumbers(this: void, numbers: string[]): void {\r\n set(props, 'licenseTemplateNumbers', numbers);\r\n },\r\n\r\n addLicenseTemplateNumber(this: void, number: string): void {\r\n if (!props.licenseTemplateNumbers) {\r\n props.licenseTemplateNumbers = [];\r\n }\r\n\r\n props.licenseTemplateNumbers.push(number);\r\n },\r\n\r\n getLicenseTemplateNumbers(this: void, def?: D): string[] | D {\r\n return get(props, 'licenseTemplateNumbers', def) as string[] | D;\r\n },\r\n\r\n removeLicenseTemplateNumber(this: void, number: string): void {\r\n const { licenseTemplateNumbers: numbers = [] } = props;\r\n\r\n numbers.splice(numbers.indexOf(number), 1);\r\n props.licenseTemplateNumbers = numbers;\r\n },\r\n\r\n serialize(this: void): Record {\r\n if (props.licenseTemplateNumbers) {\r\n const licenseTemplateNumbers = props.licenseTemplateNumbers.join(',');\r\n return serialize({ ...props, licenseTemplateNumbers });\r\n }\r\n\r\n return serialize(props);\r\n },\r\n };\r\n\r\n return defineEntity(props as BundleProps, methods, Bundle);\r\n};\r\n\r\nexport default Bundle;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Bundle from '@/entities/Bundle';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { BundleProps } from '@/types/entities/Bundle';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { licenseTemplateNumbers } = props;\r\n\r\n if (licenseTemplateNumbers && typeof licenseTemplateNumbers === 'string') {\r\n props.licenseTemplateNumbers = licenseTemplateNumbers.split(',');\r\n }\r\n\r\n return Bundle(props as BundleProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport type { CountryProps, CountryMethods, CountryEntity } from '@/types/entities/Country';\r\n\r\n// entity factory\r\nimport defineEntity from './defineEntity';\r\n\r\n/**\r\n * Country entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * @property code - Unique code of country.\r\n * @property name - Unique name of country\r\n * @property vatPercent - Country vat.\r\n * @property isEu - is country in EU.\r\n */\r\nconst Country = function (properties: CountryProps = {} as CountryProps): CountryEntity {\r\n const defaults: CountryProps = {\r\n code: '',\r\n name: '',\r\n vatPercent: 0,\r\n isEu: false,\r\n };\r\n\r\n const props: CountryProps = { ...defaults, ...properties };\r\n\r\n const methods: CountryMethods = {\r\n getCode(this: void): string {\r\n return props.code;\r\n },\r\n\r\n getName(this: void): string {\r\n return props.name;\r\n },\r\n\r\n getVatPercent(this: void): number {\r\n return props.vatPercent as number;\r\n },\r\n\r\n getIsEu(this: void): boolean {\r\n return props.isEu;\r\n },\r\n };\r\n\r\n return defineEntity(props, methods, Country);\r\n};\r\n\r\nexport default Country;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// entities\r\nimport Country from '@/entities/Country';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { CountryProps } from '@/types/entities/Country';\r\n\r\nexport default (item?: Item) => Country(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport { TimeVolumePeriodValues } from '@/types/constants/TimeVolumePeriod';\r\nimport { LicenseMethods, LicenseProps, LicenseEntity } from '@/types/entities/License';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n// entity factory\r\nimport defineEntity from './defineEntity';\r\n\r\n/**\r\n * License entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can\r\n * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation\r\n * transaction status is set to closed.\r\n * @property string number\r\n *\r\n * Name for the licensed item. Set from license template on creation, if not specified explicitly.\r\n * @property string name\r\n *\r\n * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled,\r\n * the license is excluded from the validation process.\r\n * @property boolean active\r\n *\r\n * price for the license. If >0, it must always be accompanied by the currency specification. Read-only,\r\n * set from license template on creation.\r\n * @property number price\r\n *\r\n * specifies currency for the license price. Check data types to discover which currencies are\r\n * supported. Read-only, set from license template on creation.\r\n * @property string currency\r\n *\r\n * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license\r\n * template on creation, if not specified explicitly.\r\n * @property boolean hidden\r\n *\r\n * The unique identifier assigned to the licensee (the entity to whom the license is issued). This number is typically\r\n * associated with a specific customer or organization. It is used internally to reference the licensee and cannot be\r\n * changed after the license is created.\r\n * @property string licenseeNumber\r\n *\r\n * The unique identifier for the license template from which this license was created.\r\n * @property string licenseTemplateNumber\r\n *\r\n * A boolean flag indicating whether the license is actively being used. If true, it means the license is currently in\r\n * use. If false, the license is not currently assigned or in use.\r\n * @property boolean inUse\r\n *\r\n * This parameter is specific to TimeVolume licenses and indicates the total volume of time (e.g., in hours, days, etc.)\r\n * associated with the license. This value defines the amount of time the license covers, which may affect the usage\r\n * period and limits associated with the license.\r\n * @property number timeVolume\r\n *\r\n * Also, specific to TimeVolume licenses, this field defines the period of time for the timeVolume\r\n * (e.g., \"DAY\", \"WEEK\", \"MONTH\", \"YEAR\"). It provides the time unit for the timeVolume value, clarifying whether the\r\n * time is measured in days, weeks, or any other defined period.\r\n * @property string timeVolumePeriod\r\n *\r\n * For TimeVolume licenses, this field indicates the start date of the license’s validity period. This date marks when\r\n * the license becomes active and the associated time volume starts being consumed.\r\n * It can be represented as a string \"now\" or a Date object.\r\n * @property string|Date Date startDate\r\n *\r\n * Parent(Feature) license number\r\n * @property string parentfeature\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each license. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber,\r\n * licenseTemplateNumber.\r\n */\r\nconst License = function (properties: LicenseProps = {} as LicenseProps): LicenseEntity {\r\n const props: LicenseProps = { ...(properties as T) };\r\n\r\n const methods: LicenseMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setPrice(this: void, price: number): void {\r\n set(props, 'price', price);\r\n },\r\n\r\n getPrice(this: void, def?: D): number | D {\r\n return get(props, 'price', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setHidden(this: void, hidden: boolean): void {\r\n set(props, 'hidden', hidden);\r\n },\r\n\r\n getHidden(this: void, def?: D): boolean | D {\r\n return get(props, 'hidden', def) as boolean | D;\r\n },\r\n\r\n setLicenseeNumber(this: void, number: string): void {\r\n set(props, 'licenseeNumber', number);\r\n },\r\n\r\n getLicenseeNumber(this: void, def?: D): string | D {\r\n return get(props, 'licenseeNumber', def) as string | D;\r\n },\r\n\r\n setLicenseTemplateNumber(this: void, number: string): void {\r\n set(props, 'licenseTemplateNumber', number);\r\n },\r\n\r\n getLicenseTemplateNumber(this: void, def?: D): string | D {\r\n return get(props, 'licenseTemplateNumber', def) as string | D;\r\n },\r\n\r\n // TimeVolume\r\n setTimeVolume(this: void, timeVolume: number): void {\r\n set(props, 'timeVolume', timeVolume);\r\n },\r\n\r\n getTimeVolume(this: void, def?: D): number | D {\r\n return get(props, 'timeVolume', def) as number | D;\r\n },\r\n\r\n setTimeVolumePeriod(this: void, timeVolumePeriod: TimeVolumePeriodValues): void {\r\n set(props, 'timeVolumePeriod', timeVolumePeriod);\r\n },\r\n\r\n getTimeVolumePeriod(this: void, def?: D): TimeVolumePeriodValues | D {\r\n return get(props, 'timeVolumePeriod', def) as TimeVolumePeriodValues | D;\r\n },\r\n\r\n setStartDate(this: void, startDate: Date | 'now'): void {\r\n set(props, 'startDate', startDate);\r\n },\r\n\r\n getStartDate(this: void, def?: D): Date | 'now' | D {\r\n return get(props, 'startDate', def) as Date | 'now' | D;\r\n },\r\n\r\n // Rental\r\n setParentfeature(this: void, parentfeature?: string): void {\r\n set(props, 'parentfeature', parentfeature);\r\n },\r\n\r\n getParentfeature(this: void, def?: D): string | D {\r\n return get(props, 'parentfeature', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as LicenseProps, methods, License);\r\n};\r\n\r\nexport default License;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport License from '@/entities/License';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { LicenseProps } from '@/types/entities/License';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { startDate } = props;\r\n\r\n if (startDate && typeof startDate === 'string') {\r\n props.startDate = startDate === 'now' ? startDate : new Date(startDate);\r\n }\r\n\r\n return License(props as LicenseProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { LicenseeMethods, LicenseeProps, LicenseeEntity } from '@/types/entities/Licensee';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * Licensee entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this\r\n * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for\r\n * the licensee.\r\n * @property string number\r\n *\r\n * Licensee name.\r\n * @property string name\r\n *\r\n * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is\r\n * disabled (tbd).\r\n * @property boolean active\r\n *\r\n * Licensee Secret for licensee deprecated use Node-Locked Licensing Model instead\r\n * @property string licenseeSecret\r\n *\r\n * Mark licensee for transfer.\r\n * @property boolean markedForTransfer\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber\r\n */\r\n\r\nconst Licensee = function (properties: LicenseeProps = {} as LicenseeProps): LicenseeEntity {\r\n const props: LicenseeProps = { ...properties };\r\n\r\n const methods: LicenseeMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setProductNumber(this: void, number: string): void {\r\n set(props, 'productNumber', number);\r\n },\r\n\r\n getProductNumber(this: void, def?: D): string | D {\r\n return get(props, 'productNumber', def) as string | D;\r\n },\r\n\r\n setMarkedForTransfer(this: void, mark: boolean): void {\r\n set(props, 'markedForTransfer', mark);\r\n },\r\n\r\n getMarkedForTransfer(this: void, def?: D): boolean | D {\r\n return get(props, 'markedForTransfer', def) as boolean | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as LicenseeProps, methods, Licensee);\r\n};\r\n\r\nexport default Licensee;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Licensee from '@/entities/Licensee';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { LicenseeProps } from '@/types/entities/Licensee';\r\n\r\nexport default (item?: Item) => Licensee(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { LicenseTypeValues } from '@/types/constants/LicenseType';\r\nimport { TimeVolumePeriodValues } from '@/types/constants/TimeVolumePeriod';\r\nimport { LicenseTemplateMethods, LicenseTemplateProps, LicenseTemplateEntity } from '@/types/entities/LicenseTemplate';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * License template entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the license template. Vendor can\r\n * assign this number when creating a license template or let NetLicensing generate one.\r\n * Read-only after creation of the first license from this license template.\r\n * @property string number\r\n *\r\n * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this\r\n * license template.\r\n * @property boolean active\r\n *\r\n * Name for the licensed item.\r\n * @property string name\r\n *\r\n * Type of licenses created from this license template. Supported types: \"FEATURE\", \"TIMEVOLUME\",\r\n * \"FLOATING\", \"QUANTITY\"\r\n * @property string licenseType\r\n *\r\n * Price for the license. If >0, it must always be accompanied by the currency specification.\r\n * @property number price\r\n *\r\n * Specifies currency for the license price. Check data types to discover which currencies are\r\n * supported.\r\n * @property string currency\r\n *\r\n * If set to true, every new licensee automatically gets one license out of this license template on\r\n * creation. Automatic licenses must have their price set to 0.\r\n * @property boolean automatic\r\n *\r\n * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase.\r\n * @property boolean hidden\r\n *\r\n * If set to true, licenses from this license template are not visible to the end customer, but\r\n * participate in validation.\r\n * @property boolean hideLicenses\r\n *\r\n * If set to true, this license template defines grace period of validity granted after subscription expiration.\r\n * @property boolean gracePeriod\r\n *\r\n * Mandatory for 'TIMEVOLUME' license type.\r\n * @property number timeVolume\r\n *\r\n * Time volume period for 'TIMEVOLUME' license type. Supported types: \"DAY\", \"WEEK\", \"MONTH\", \"YEAR\"\r\n * @property string timeVolumePeriod\r\n *\r\n * Mandatory for 'FLOATING' license type.\r\n * @property number maxSessions\r\n *\r\n * Mandatory for 'QUANTITY' license type.\r\n * @property number quantity\r\n */\r\n\r\nconst LicenseTemplate = function (\r\n properties: LicenseTemplateProps = {} as LicenseTemplateProps,\r\n): LicenseTemplateEntity {\r\n const props: LicenseTemplateProps = { ...properties };\r\n\r\n const methods: LicenseTemplateMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setLicenseType(this: void, type: LicenseTypeValues): void {\r\n set(props, 'licenseType', type);\r\n },\r\n\r\n getLicenseType(this: void, def?: D): LicenseTypeValues | D {\r\n return get(props, 'licenseType', def) as LicenseTypeValues | D;\r\n },\r\n\r\n setPrice(this: void, price: number): void {\r\n set(props, 'price', price);\r\n },\r\n\r\n getPrice(this: void, def?: D): number | D {\r\n return get(props, 'price', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setAutomatic(this: void, automatic: boolean): void {\r\n set(props, 'automatic', automatic);\r\n },\r\n\r\n getAutomatic(this: void, def?: D): boolean | D {\r\n return get(props, 'automatic', def) as boolean | D;\r\n },\r\n\r\n setHidden(this: void, hidden: boolean): void {\r\n set(props, 'hidden', hidden);\r\n },\r\n\r\n getHidden(this: void, def?: D): boolean | D {\r\n return get(props, 'hidden', def) as boolean | D;\r\n },\r\n\r\n setHideLicenses(this: void, hideLicenses: boolean): void {\r\n set(props, 'hideLicenses', hideLicenses);\r\n },\r\n\r\n getHideLicenses(this: void, def?: D): boolean | D {\r\n return get(props, 'hideLicenses', def) as boolean | D;\r\n },\r\n\r\n setGracePeriod(this: void, gradePeriod: boolean): void {\r\n set(props, 'gracePeriod', gradePeriod);\r\n },\r\n\r\n getGracePeriod(this: void, def?: D): boolean | D {\r\n return get(props, 'gracePeriod', def) as boolean | D;\r\n },\r\n\r\n setTimeVolume(this: void, timeVolume: number): void {\r\n set(props, 'timeVolume', timeVolume);\r\n },\r\n\r\n getTimeVolume(this: void, def?: D): number | D {\r\n return get(props, 'timeVolume', def) as number | D;\r\n },\r\n\r\n setTimeVolumePeriod(this: void, timeVolumePeriod: TimeVolumePeriodValues): void {\r\n set(props, 'timeVolumePeriod', timeVolumePeriod);\r\n },\r\n\r\n getTimeVolumePeriod(this: void, def?: D): TimeVolumePeriodValues | D {\r\n return get(props, 'timeVolumePeriod', def) as TimeVolumePeriodValues | D;\r\n },\r\n\r\n setMaxSessions(this: void, maxSessions: number): void {\r\n set(props, 'maxSessions', maxSessions);\r\n },\r\n\r\n getMaxSessions(this: void, def?: D): number | D {\r\n return get(props, 'maxSessions', def) as number | D;\r\n },\r\n\r\n setQuantity(this: void, quantity: number): void {\r\n set(props, 'quantity', quantity);\r\n },\r\n\r\n getQuantity(this: void, def?: D): number | D {\r\n return get(props, 'quantity', def) as number | D;\r\n },\r\n\r\n setProductModuleNumber(this: void, productModuleNumber: string): void {\r\n set(props, 'productModuleNumber', productModuleNumber);\r\n },\r\n\r\n getProductModuleNumber(this: void, def?: D): string | D {\r\n return get(props, 'productModuleNumber', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as LicenseTemplateProps, methods, LicenseTemplate);\r\n};\r\n\r\nexport default LicenseTemplate;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport LicenseTemplate from '@/entities/LicenseTemplate';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { LicenseTemplateProps } from '@/types/entities/LicenseTemplate';\r\n\r\nexport default (item?: Item) => LicenseTemplate(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\nimport { NotificationEventValues } from '@/types/constants/NotificationEvent';\r\nimport { NotificationProtocolValues } from '@/types/constants/NotificationProtocol';\r\n\r\n// types\r\nimport { NotificationMethods, NotificationProps, NotificationEntity } from '@/types/entities/Notification';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * NetLicensing Notification entity.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number that identifies the notification. Vendor can assign this number when creating a notification or\r\n * let NetLicensing generate one.\r\n * @property string number\r\n *\r\n * If set to false, the notification is disabled. The notification will not be fired when the event triggered.\r\n * @property boolean active\r\n *\r\n * Notification name.\r\n * @property string name\r\n *\r\n * Notification type. Indicate the method of transmitting notification, ex: EMAIL, WEBHOOK.\r\n * @property float type\r\n *\r\n * Comma separated string of events that fire the notification when emitted.\r\n * @property string events\r\n *\r\n * Notification response payload.\r\n * @property string payload\r\n *\r\n * Notification response url. Optional. Uses only for WEBHOOK type notification.\r\n * @property string url\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each notification.\r\n * The name of user property must not be equal to any of the fixed property names listed above and must be none of id,\r\n * deleted.\r\n */\r\n\r\nconst Notification = function (\r\n properties: NotificationProps = {} as NotificationProps,\r\n): NotificationEntity {\r\n const props: NotificationProps = { ...properties };\r\n\r\n const methods: NotificationMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setProtocol(this: void, protocol: NotificationProtocolValues): void {\r\n set(props, 'protocol', protocol);\r\n },\r\n\r\n getProtocol(this: void, def?: D): NotificationProtocolValues | D {\r\n return get(props, 'protocol', def) as NotificationProtocolValues | D;\r\n },\r\n\r\n setEvents(this: void, events: NotificationEventValues[]): void {\r\n set(props, 'events', events);\r\n },\r\n\r\n getEvents(this: void, def?: D): NotificationEventValues[] | D {\r\n return get(props, 'events', def) as NotificationEventValues[] | D;\r\n },\r\n\r\n addEvent(event: NotificationEventValues): void {\r\n const events = this.getEvents([]) as NotificationEventValues[];\r\n events.push(event);\r\n\r\n this.setEvents(events);\r\n },\r\n\r\n setPayload(this: void, payload: string): void {\r\n set(props, 'payload', payload);\r\n },\r\n\r\n getPayload(this: void, def?: D): string | D {\r\n return get(props, 'payload', def) as string | D;\r\n },\r\n\r\n setEndpoint(this: void, endpoint: string): void {\r\n set(props, 'endpoint', endpoint);\r\n },\r\n\r\n getEndpoint(this: void, def?: D): string | D {\r\n return get(props, 'endpoint', def) as string | D;\r\n },\r\n\r\n serialize(): Record {\r\n const data = serialize(props);\r\n\r\n if (data.events) {\r\n data.events = this.getEvents([]).join(',');\r\n }\r\n\r\n return data;\r\n },\r\n };\r\n\r\n return defineEntity(props as NotificationProps, methods, Notification);\r\n};\r\n\r\nexport default Notification;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Notification from '@/entities/Notification';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { NotificationProps } from '@/types/entities/Notification';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { events } = props;\r\n\r\n if (events && typeof events === 'string') {\r\n props.events = events.split(',');\r\n }\r\n\r\n return Notification(props as NotificationProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { PaymentMethodMethods, PaymentMethodProps, PaymentMethodEntity } from '@/types/entities/PaymentMethod';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\n\r\n/**\r\n * PaymentMethod entity used internally by NetLicensing.\r\n *\r\n * @property string number\r\n * @property boolean active\r\n * @property string paypal.subject\r\n */\r\nconst PaymentMethod = function (\r\n properties: PaymentMethodProps = {} as PaymentMethodProps,\r\n): PaymentMethodEntity {\r\n const props: PaymentMethodProps = { ...properties };\r\n\r\n const methods: PaymentMethodMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n };\r\n\r\n return defineEntity(props as PaymentMethodProps, methods, PaymentMethod);\r\n};\r\n\r\nexport default PaymentMethod;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport PaymentMethod from '@/entities/PaymentMethod';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { PaymentMethodProps } from '@/types/entities/PaymentMethod';\r\n\r\nexport default (item?: Item) => PaymentMethod(itemToObject(item));\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { ProductProps, ProductEntity, ProductMethods } from '@/types/entities/Product';\r\nimport { ProductDiscountEntity } from '@/types/entities/ProductDiscount';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * NetLicensing Product entity.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number that identifies the product. Vendor can assign this number when creating a product or\r\n * let NetLicensing generate one. Read-only after creation of the first licensee for the product.\r\n * @property string number\r\n *\r\n * If set to false, the product is disabled. No new licensees can be registered for the product,\r\n * existing licensees can not obtain new licenses.\r\n * @property boolean active\r\n *\r\n * Product name. Together with the version identifies the product for the end customer.\r\n * @property string name\r\n *\r\n * Product version. Convenience parameter, additional to the product name.\r\n * @property string version\r\n *\r\n * If set to 'true', non-existing licensees will be created at first validation attempt.\r\n * @property boolean licenseeAutoCreate\r\n *\r\n * Licensee secret mode for product.Supported types: \"DISABLED\", \"PREDEFINED\", \"CLIENT\"\r\n * @property boolean licenseeSecretMode\r\n *\r\n * Product description. Optional.\r\n * @property string description\r\n *\r\n * Licensing information. Optional.\r\n * @property string licensingInfo\r\n *\r\n * @property boolean inUse\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each product. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted.\r\n */\r\nconst Product = function (\r\n properties: ProductProps = {} as ProductProps,\r\n): ProductEntity {\r\n const props: ProductProps = { ...properties };\r\n\r\n const methods: ProductMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setVersion(this: void, version: string): void {\r\n set(props, 'version', version);\r\n },\r\n\r\n getVersion(this: void, def?: D): string | number | D {\r\n return get(props, 'version', def) as string | number | D;\r\n },\r\n\r\n setDescription(this: void, description: string): void {\r\n set(props, 'description', description);\r\n },\r\n\r\n getDescription(this: void, def?: D): string | D {\r\n return get(props, 'description', def) as string | D;\r\n },\r\n\r\n setLicensingInfo(this: void, licensingInfo: string): void {\r\n set(props, 'licensingInfo', licensingInfo);\r\n },\r\n\r\n getLicensingInfo(this: void, def?: D): string | D {\r\n return get(props, 'licensingInfo', def) as string | D;\r\n },\r\n\r\n setLicenseeAutoCreate(this: void, licenseeAutoCreate: boolean): void {\r\n set(props, 'licenseeAutoCreate', licenseeAutoCreate);\r\n },\r\n\r\n getLicenseeAutoCreate(this: void, def?: D): boolean | D {\r\n return get(props, 'licenseeAutoCreate', def) as boolean | D;\r\n },\r\n\r\n setDiscounts(this: void, discounts: ProductDiscountEntity[]): void {\r\n set(props, 'discounts', discounts);\r\n },\r\n\r\n getDiscounts(this: void, def?: D): ProductDiscountEntity[] | D {\r\n return get(props, 'discounts', def) as ProductDiscountEntity[] | D;\r\n },\r\n\r\n addDiscount(discount: ProductDiscountEntity): void {\r\n const discounts = this.getDiscounts([] as ProductDiscountEntity[]);\r\n discounts.push(discount);\r\n\r\n this.setDiscounts(discounts);\r\n },\r\n\r\n removeDiscount(discount: ProductDiscountEntity): void {\r\n const discounts = this.getDiscounts();\r\n\r\n if (Array.isArray(discounts) && discounts.length > 0) {\r\n discounts.splice(discounts.indexOf(discount), 1);\r\n this.setDiscounts(discounts);\r\n }\r\n },\r\n\r\n setProductDiscounts(productDiscounts: ProductDiscountEntity[]): void {\r\n this.setDiscounts(productDiscounts);\r\n },\r\n\r\n getProductDiscounts(def?: D): ProductDiscountEntity[] | D {\r\n return this.getDiscounts(def);\r\n },\r\n\r\n serialize(): Record {\r\n const map: Record = serialize(props, { ignore: ['discounts', 'inUse'] });\r\n const discounts = this.getDiscounts();\r\n\r\n if (discounts) {\r\n map.discount = discounts.length > 0 ? discounts.map((discount) => discount.toString()) : '';\r\n }\r\n\r\n return map;\r\n },\r\n };\r\n\r\n return defineEntity(props as ProductProps, methods, Product);\r\n};\r\n\r\nexport default Product;\r\n","import { AxiosError, AxiosResponse, InternalAxiosRequestConfig } from 'axios';\r\n\r\nexport default class NlicError extends AxiosError {\r\n isNlicError = true;\r\n\r\n constructor(\r\n message?: string,\r\n code?: string,\r\n config?: InternalAxiosRequestConfig,\r\n request?: unknown,\r\n response?: AxiosResponse,\r\n stack?: string,\r\n ) {\r\n super(message, code, config, request, response);\r\n this.name = 'NlicError';\r\n\r\n if (stack) {\r\n this.stack = stack;\r\n }\r\n\r\n Object.setPrototypeOf(this, NlicError.prototype);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// errors\r\nimport NlicError from '@/errors/NlicError';\r\n\r\n// types\r\nimport { ProductDiscountMethods, ProductDiscountProps, ProductDiscountEntity } from '@/types/entities/ProductDiscount';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\n\r\nconst ProductDiscount = function (\r\n properties: ProductDiscountProps = {} as ProductDiscountProps,\r\n): ProductDiscountEntity {\r\n const props: ProductDiscountProps = { ...properties };\r\n\r\n if (props.amountFix && props.amountPercent) {\r\n throw new NlicError('Properties \"amountFix\" and \"amountPercent\" cannot be used at the same time');\r\n }\r\n\r\n const methods: ProductDiscountMethods = {\r\n setTotalPrice(this: void, totalPrice: number): void {\r\n set(props, 'totalPrice', totalPrice);\r\n },\r\n\r\n getTotalPrice(this: void, def?: D): number | D {\r\n return get(props, 'totalPrice', def) as number | D;\r\n },\r\n\r\n setCurrency(currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setAmountFix(this: void, amountFix: number): void {\r\n set(props, 'amountFix', amountFix);\r\n },\r\n\r\n getAmountFix(this: void, def?: D): number | D {\r\n return get(props, 'amountFix', def) as number | D;\r\n },\r\n\r\n setAmountPercent(this: void, amountPercent: number): void {\r\n set(props, 'amountPercent', amountPercent);\r\n },\r\n\r\n getAmountPercent(this: void, def?: D): number | D {\r\n return get(props, 'amountPercent', def) as number | D;\r\n },\r\n\r\n toString() {\r\n const total = this.getTotalPrice();\r\n const currency = this.getCurrency();\r\n const amount = this.getAmountPercent() ? `${this.getAmountPercent()}%` : this.getAmountFix();\r\n\r\n return total && currency && amount ? `${total};${currency};${amount}` : '';\r\n },\r\n };\r\n\r\n return defineEntity(props, methods, ProductDiscount, {\r\n set: (obj, prop) => {\r\n if (prop === 'amountFix') {\r\n delete obj.amountPercent;\r\n }\r\n\r\n if (prop === 'amountPercent') {\r\n delete obj.amountFix;\r\n }\r\n },\r\n });\r\n};\r\n\r\nexport default ProductDiscount;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Product from '@/entities/Product';\r\nimport ProductDiscount from '@/entities/ProductDiscount';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { ProductProps } from '@/types/entities/Product';\r\nimport { ProductDiscountEntity } from '@/types/entities/ProductDiscount';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const discounts: ProductDiscountEntity[] | undefined = props.discount as ProductDiscountEntity[] | undefined;\r\n delete props.discount;\r\n\r\n if (discounts) {\r\n props.discounts = discounts.map((d) => ProductDiscount(d));\r\n }\r\n\r\n return Product(props as ProductProps);\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\nimport { LicensingModelValues } from '@/types/constants/LicensingModel';\r\n\r\n// types\r\nimport { ProductModuleEntity, ProductModuleMethods, ProductModuleProps } from '@/types/entities/ProductModule';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * Product module entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign\r\n * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first\r\n * licensee for the product.\r\n * @property string number\r\n *\r\n * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this\r\n * product module.\r\n * @property boolean active\r\n *\r\n * Product module name that is visible to the end customers in NetLicensing Shop.\r\n * @property string name\r\n *\r\n * Licensing model applied to this product module. Defines what license templates can be\r\n * configured for the product module and how licenses for this product module are processed during validation.\r\n * @property string licensingModel\r\n *\r\n * Maximum checkout validity (days). Mandatory for 'Floating' licensing model.\r\n * @property number maxCheckoutValidity\r\n *\r\n * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model.\r\n * @property number yellowThreshold\r\n *\r\n * Remaining time volume for red level. Mandatory for 'Rental' licensing model.\r\n * @property number redThreshold\r\n */\r\n\r\nconst ProductModule = function (\r\n properties: ProductModuleProps = {} as ProductModuleProps,\r\n): ProductModuleEntity {\r\n const props: ProductModuleProps = { ...properties };\r\n\r\n const methods: ProductModuleMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setName(this: void, name: string): void {\r\n set(props, 'name', name);\r\n },\r\n\r\n getName(this: void, def?: D): string | D {\r\n return get(props, 'name', def) as string | D;\r\n },\r\n\r\n setLicensingModel(licensingModel: LicensingModelValues): void {\r\n set(props, 'licensingModel', licensingModel);\r\n },\r\n\r\n getLicensingModel(this: void, def?: D): LicensingModelValues | D {\r\n return get(props, 'licensingModel', def) as LicensingModelValues | D;\r\n },\r\n\r\n setMaxCheckoutValidity(this: void, maxCheckoutValidity: number): void {\r\n set(props, 'maxCheckoutValidity', maxCheckoutValidity);\r\n },\r\n\r\n getMaxCheckoutValidity(this: void, def?: D): number | D {\r\n return get(props, 'maxCheckoutValidity', def) as number | D;\r\n },\r\n\r\n setYellowThreshold(this: void, yellowThreshold: number): void {\r\n set(props, 'yellowThreshold', yellowThreshold);\r\n },\r\n\r\n getYellowThreshold(this: void, def?: D): number | D {\r\n return get(props, 'yellowThreshold', def) as number | D;\r\n },\r\n\r\n setRedThreshold(this: void, redThreshold: number): void {\r\n set(props, 'redThreshold', redThreshold);\r\n },\r\n\r\n getRedThreshold(this: void, def?: D): number | D {\r\n return get(props, 'redThreshold', def) as number | D;\r\n },\r\n\r\n setProductNumber(this: void, productNumber: string): void {\r\n set(props, 'productNumber', productNumber);\r\n },\r\n\r\n getProductNumber(this: void, def?: D): string | D {\r\n return get(props, 'productNumber', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as ProductModuleProps, methods, ProductModule);\r\n};\r\n\r\nexport default ProductModule;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport ProductModule from '@/entities/ProductModule';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { ProductModuleProps } from '@/types/entities/ProductModule';\r\n\r\nexport default (item?: Item) => ProductModule(itemToObject(item));\r\n","/**\r\n * Token\r\n *\r\n * @see https://netlicensing.io/wiki/token-services#create-token\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n *\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { ApiKeyRoleValues } from '@/types/constants/ApiKeyRole';\r\nimport { TokenTypeValues } from '@/types/constants/TokenType';\r\nimport { TokenProps, TokenEntity, TokenMethods } from '@/types/entities/Token';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\nconst Token = function (properties: TokenProps = {} as TokenProps): TokenEntity {\r\n const props: TokenProps = { ...properties };\r\n\r\n const methods: TokenMethods = {\r\n setActive(this: void, active: boolean): void {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setExpirationTime(this: void, expirationTime: Date): void {\r\n set(props, 'expirationTime', expirationTime);\r\n },\r\n\r\n getExpirationTime(this: void, def?: D): Date | D {\r\n return get(props, 'expirationTime', def) as Date | D;\r\n },\r\n\r\n setTokenType(this: void, tokenType: TokenTypeValues): void {\r\n set(props, 'tokenType', tokenType);\r\n },\r\n\r\n getTokenType(this: void, def?: D): TokenTypeValues | D {\r\n return get(props, 'tokenType', def) as TokenTypeValues | D;\r\n },\r\n\r\n setLicenseeNumber(this: void, licenseeNumber: string): void {\r\n set(props, 'licenseeNumber', licenseeNumber);\r\n },\r\n\r\n getLicenseeNumber(this: void, def?: D): string | D {\r\n return get(props, 'licenseeNumber', def) as string | D;\r\n },\r\n\r\n setAction(this: void, action: string): void {\r\n set(props, 'action', action);\r\n },\r\n\r\n getAction(this: void, def?: D): string | D {\r\n return get(props, 'action', def) as string | D;\r\n },\r\n\r\n setApiKeyRole(this: void, apiKeyRole: ApiKeyRoleValues): void {\r\n set(props, 'apiKeyRole', apiKeyRole);\r\n },\r\n\r\n getApiKeyRole(this: void, def?: D): ApiKeyRoleValues | D {\r\n return get(props, 'apiKeyRole', def) as ApiKeyRoleValues | D;\r\n },\r\n\r\n setBundleNumber(this: void, bundleNumber: string): void {\r\n set(props, 'bundleNumber', bundleNumber);\r\n },\r\n\r\n getBundleNumber(this: void, def?: D): string | D {\r\n return get(props, 'bundleNumber', def) as string | D;\r\n },\r\n\r\n setBundlePrice(this: void, bundlePrice: number): void {\r\n set(props, 'bundlePrice', bundlePrice);\r\n },\r\n\r\n getBundlePrice(this: void, def?: D): number | D {\r\n return get(props, 'bundlePrice', def) as number | D;\r\n },\r\n\r\n setProductNumber(this: void, productNumber: string): void {\r\n set(props, 'productNumber', productNumber);\r\n },\r\n\r\n getProductNumber(this: void, def?: D): string | D {\r\n return get(props, 'productNumber', def) as string | D;\r\n },\r\n\r\n setPredefinedShoppingItem(this: void, predefinedShoppingItem: string): void {\r\n set(props, 'predefinedShoppingItem', predefinedShoppingItem);\r\n },\r\n\r\n getPredefinedShoppingItem(this: void, def?: D): string | D {\r\n return get(props, 'predefinedShoppingItem', def) as string | D;\r\n },\r\n\r\n setSuccessURL(this: void, successURL: string): void {\r\n set(props, 'successURL', successURL);\r\n },\r\n\r\n getSuccessURL(this: void, def?: D): string | D {\r\n return get(props, 'successURL', def) as string | D;\r\n },\r\n\r\n setSuccessURLTitle(this: void, successURLTitle: string): void {\r\n set(props, 'successURLTitle', successURLTitle);\r\n },\r\n\r\n getSuccessURLTitle(this: void, def?: D): string | D {\r\n return get(props, 'successURLTitle', def) as string | D;\r\n },\r\n\r\n setCancelURL(this: void, cancelURL: string): void {\r\n set(props, 'cancelURL', cancelURL);\r\n },\r\n\r\n getCancelURL(this: void, def?: D): string | D {\r\n return get(props, 'cancelURL', def) as string | D;\r\n },\r\n\r\n setCancelURLTitle(this: void, cancelURLTitle: string): void {\r\n set(props, 'cancelURLTitle', cancelURLTitle);\r\n },\r\n\r\n getCancelURLTitle(this: void, def?: D): string | D {\r\n return get(props, 'cancelURLTitle', def) as string | D;\r\n },\r\n\r\n getShopURL(this: void, def?: D): string | D {\r\n return get(props, 'shopURL', def) as string | D;\r\n },\r\n\r\n serialize(this: void): Record {\r\n return serialize(props, { ignore: ['shopURL'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as TokenProps, methods, Token);\r\n};\r\n\r\nexport default Token;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\nimport Token from '@/entities/Token';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { TokenProps } from '@/types/entities/Token';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { expirationTime } = props;\r\n\r\n if (expirationTime && typeof expirationTime === 'string') {\r\n props.expirationTime = new Date(expirationTime);\r\n }\r\n\r\n return Token(props as TokenProps);\r\n};\r\n","// types\r\nimport type { LicenseEntity } from '@/types/entities/License';\r\nimport type { LicenseTransactionJoinEntity as ILicenseTransactionJoin } from '@/types/entities/LicenseTransactionJoin';\r\nimport type { TransactionEntity } from '@/types/entities/Transaction';\r\n\r\n/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nclass LicenseTransactionJoin implements ILicenseTransactionJoin {\r\n transaction: TransactionEntity;\r\n license: LicenseEntity;\r\n\r\n constructor(transaction: TransactionEntity, license: LicenseEntity) {\r\n this.transaction = transaction;\r\n this.license = license;\r\n }\r\n\r\n setTransaction(transaction: TransactionEntity): void {\r\n this.transaction = transaction;\r\n }\r\n\r\n getTransaction(): TransactionEntity {\r\n return this.transaction;\r\n }\r\n\r\n setLicense(license: LicenseEntity): void {\r\n this.license = license;\r\n }\r\n\r\n getLicense(): LicenseEntity {\r\n return this.license;\r\n }\r\n}\r\n\r\nexport default (transaction: TransactionEntity, license: LicenseEntity) =>\r\n new LicenseTransactionJoin(transaction, license);\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// entity factory\r\nimport defineEntity from '@/entities/defineEntity';\r\n\r\n// types\r\nimport { PaymentMethodValues } from '@/types/constants/PaymentMethodEnum';\r\nimport { TransactionSourceValues } from '@/types/constants/TransactionSource';\r\nimport { TransactionStatusValues } from '@/types/constants/TransactionStatus';\r\nimport { LicenseTransactionJoinEntity } from '@/types/entities/LicenseTransactionJoin';\r\nimport { TransactionMethods, TransactionProps, TransactionEntity } from '@/types/entities/Transaction';\r\n\r\n// utils\r\nimport { set, get } from '@/utils/helpers';\r\nimport serialize from '@/utils/serialize';\r\n\r\n/**\r\n * Transaction entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the transaction. This number is\r\n * always generated by NetLicensing.\r\n * @property string number\r\n *\r\n * always true for transactions\r\n * @property boolean active\r\n *\r\n * Status of transaction. \"CANCELLED\", \"CLOSED\", \"PENDING\".\r\n * @property string status\r\n *\r\n * \"SHOP\". AUTO transaction for internal use only.\r\n * @property string source\r\n *\r\n * grand total for SHOP transaction (see source).\r\n * @property number grandTotal\r\n *\r\n * discount for SHOP transaction (see source).\r\n * @property number discount\r\n *\r\n * specifies currency for money fields (grandTotal and discount). Check data types to discover which\r\n * @property string currency\r\n *\r\n * Date created. Optional.\r\n * @property string dateCreated\r\n *\r\n * Date closed. Optional.\r\n * @property string dateClosed\r\n */\r\n\r\nconst Transaction = function (\r\n properties: TransactionProps = {} as TransactionProps,\r\n): TransactionEntity {\r\n const props: TransactionProps = { ...properties };\r\n\r\n const methods: TransactionMethods = {\r\n setActive(this: void, active: boolean) {\r\n set(props, 'active', active);\r\n },\r\n\r\n getActive(this: void, def?: D): boolean | D {\r\n return get(props, 'active', def) as boolean | D;\r\n },\r\n\r\n setNumber(this: void, number: string): void {\r\n set(props, 'number', number);\r\n },\r\n\r\n getNumber(this: void, def?: D): string | D {\r\n return get(props, 'number', def) as string | D;\r\n },\r\n\r\n setStatus(this: void, status: TransactionStatusValues): void {\r\n set(props, 'status', status);\r\n },\r\n\r\n getStatus(this: void, def?: D): TransactionStatusValues | D {\r\n return get(props, 'status', def) as TransactionStatusValues | D;\r\n },\r\n\r\n setSource(this: void, source: TransactionSourceValues): void {\r\n set(props, 'source', source);\r\n },\r\n getSource(this: void, def?: D): TransactionSourceValues | D {\r\n return get(props, 'source', def) as TransactionSourceValues | D;\r\n },\r\n setGrandTotal(this: void, grandTotal: number): void {\r\n set(props, 'grandTotal', grandTotal);\r\n },\r\n getGrandTotal(this: void, def?: D): number | D {\r\n return get(props, 'grandTotal', def) as number | D;\r\n },\r\n\r\n setDiscount(this: void, discount: number): void {\r\n set(props, 'discount', discount);\r\n },\r\n\r\n getDiscount(this: void, def?: D): number | D {\r\n return get(props, 'discount', def) as number | D;\r\n },\r\n\r\n setCurrency(this: void, currency: string): void {\r\n set(props, 'currency', currency);\r\n },\r\n\r\n getCurrency(this: void, def?: D): string | D {\r\n return get(props, 'currency', def) as string | D;\r\n },\r\n\r\n setDateCreated(this: void, dateCreated: Date): void {\r\n set(props, 'dateCreated', dateCreated);\r\n },\r\n\r\n getDateCreated(this: void, def?: D): Date | D {\r\n return get(props, 'dateCreated', def) as Date | D;\r\n },\r\n\r\n setDateClosed(this: void, dateCreated: Date): void {\r\n set(props, 'dateClosed', dateCreated);\r\n },\r\n\r\n getDateClosed(this: void, def?: D): Date | D {\r\n return get(props, 'dateClosed', def) as Date | D;\r\n },\r\n\r\n setPaymentMethod(this: void, paymentMethod: PaymentMethodValues): void {\r\n set(props, 'paymentMethod', paymentMethod);\r\n },\r\n\r\n getPaymentMethod(this: void, def?: D): PaymentMethodValues | D {\r\n return get(props, 'paymentMethod', def) as PaymentMethodValues | D;\r\n },\r\n\r\n setLicenseTransactionJoins(this: void, joins: LicenseTransactionJoinEntity[]): void {\r\n set(props, 'licenseTransactionJoins', joins);\r\n },\r\n\r\n getLicenseTransactionJoins(this: void, def?: D): LicenseTransactionJoinEntity[] | D {\r\n return get(props, 'licenseTransactionJoins', def) as LicenseTransactionJoinEntity[] | D;\r\n },\r\n\r\n serialize(this: void) {\r\n return serialize(props, { ignore: ['licenseTransactionJoins', 'inUse'] });\r\n },\r\n };\r\n\r\n return defineEntity(props as TransactionProps, methods, Transaction);\r\n};\r\n\r\nexport default Transaction;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// entities\r\nimport License from '@/entities/License';\r\nimport LicenseTransactionJoin from '@/entities/LicenseTransactionJoin';\r\nimport Transaction from '@/entities/Transaction';\r\n\r\n// types\r\nimport { Item } from '@/types/api/response';\r\nimport { TransactionProps } from '@/types/entities/Transaction';\r\n\r\nexport default (item?: Item) => {\r\n const props = itemToObject>(item);\r\n\r\n const { dateCreated, dateClosed } = props;\r\n\r\n if (dateCreated && typeof dateCreated === 'string') {\r\n props.dateCreated = new Date(dateCreated);\r\n }\r\n\r\n if (dateClosed && typeof dateClosed === 'string') {\r\n props.dateClosed = new Date(dateClosed);\r\n }\r\n\r\n const licenseTransactionJoins: { licenseNumber: string; transactionNumber: string }[] | undefined =\r\n props.licenseTransactionJoin as { licenseNumber: string; transactionNumber: string }[];\r\n\r\n delete props.licenseTransactionJoin;\r\n\r\n if (licenseTransactionJoins) {\r\n props.licenseTransactionJoins = licenseTransactionJoins.map(({ transactionNumber, licenseNumber }) => {\r\n const transaction = Transaction({ number: transactionNumber });\r\n const license = License({ number: licenseNumber });\r\n\r\n return LicenseTransactionJoin(transaction, license);\r\n });\r\n }\r\n\r\n return Transaction(props as TransactionProps);\r\n};\r\n","import axios, { AxiosInstance, AxiosResponse } from 'axios';\r\nimport { Info } from '@/types/api/response';\r\n\r\nlet axiosInstance: AxiosInstance = axios.create();\r\nlet lastResponse: AxiosResponse | null = null;\r\nlet info: Info[] = [];\r\n\r\nexport const setAxiosInstance = (instance: AxiosInstance): void => {\r\n axiosInstance = instance;\r\n};\r\n\r\nexport const getAxiosInstance = (): AxiosInstance => axiosInstance;\r\n\r\nexport const setLastResponse = (response: AxiosResponse | null): void => {\r\n lastResponse = response;\r\n};\r\n\r\nexport const getLastResponse = (): AxiosResponse | null => lastResponse;\r\n\r\nexport const setInfo = (infos: Info[]): void => {\r\n info = infos;\r\n};\r\n\r\nexport const getInfo = (): Info[] => info;\r\n","{\r\n \"name\": \"netlicensing-client\",\r\n \"version\": \"2.0.0\",\r\n \"description\": \"JavaScript Wrapper for Labs64 NetLicensing RESTful API\",\r\n \"keywords\": [\r\n \"labs64\",\r\n \"netlicensing\",\r\n \"licensing\",\r\n \"licensing-as-a-service\",\r\n \"license\",\r\n \"license-management\",\r\n \"software-license\",\r\n \"client\",\r\n \"restful\",\r\n \"restful-api\",\r\n \"javascript\",\r\n \"wrapper\",\r\n \"api\",\r\n \"client\"\r\n ],\r\n \"license\": \"Apache-2.0\",\r\n \"author\": \"Labs64 GmbH\",\r\n \"homepage\": \"https://netlicensing.io\",\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/Labs64/NetLicensingClient-javascript\"\r\n },\r\n \"bugs\": {\r\n \"url\": \"https://github.com/Labs64/NetLicensingClient-javascript/issues\"\r\n },\r\n \"contributors\": [\r\n {\r\n \"name\": \"Ready Brown\",\r\n \"email\": \"ready.brown@hotmail.de\",\r\n \"url\": \"https://github.com/r-brown\"\r\n },\r\n {\r\n \"name\": \"Viacheslav Rudkovskiy\",\r\n \"email\": \"viachaslau.rudkovski@labs64.de\",\r\n \"url\": \"https://github.com/v-rudkovskiy\"\r\n },\r\n {\r\n \"name\": \"Andrei Yushkevich\",\r\n \"email\": \"yushkevich@me.com\",\r\n \"url\": \"https://github.com/yushkevich\"\r\n }\r\n ],\r\n \"main\": \"dist/index.cjs\",\r\n \"module\": \"dist/index.mjs\",\r\n \"types\": \"dist/index.d.ts\",\r\n \"exports\": {\r\n \".\": {\r\n \"types\": \"./dist/index.d.ts\",\r\n \"import\": \"./dist/index.mjs\",\r\n \"require\": \"./dist/index.cjs\"\r\n }\r\n },\r\n \"files\": [\r\n \"dist\"\r\n ],\r\n \"scripts\": {\r\n \"build\": \"tsup\",\r\n \"release\": \"npm run lint:typecheck && npm run test && npm run build\",\r\n \"dev\": \"tsup --watch\",\r\n \"test\": \"vitest run\",\r\n \"test:dev\": \"vitest watch\",\r\n \"lint\": \"eslint --ext .js,.mjs,.ts src\",\r\n \"typecheck\": \"tsc --noEmit\",\r\n \"lint:typecheck\": \"npm run lint && npm run typecheck\"\r\n },\r\n \"peerDependencies\": {\r\n \"axios\": \"^1.9.0\"\r\n },\r\n \"dependencies\": {},\r\n \"devDependencies\": {\r\n \"@eslint/js\": \"^9.24.0\",\r\n \"@types/node\": \"^22.14.0\",\r\n \"@typescript-eslint/eslint-plugin\": \"^8.29.1\",\r\n \"@typescript-eslint/parser\": \"^8.29.1\",\r\n \"@vitest/eslint-plugin\": \"^1.1.43\",\r\n \"axios\": \"^1.9.0\",\r\n \"eslint\": \"^9.24.0\",\r\n \"eslint-plugin-import\": \"^2.31.0\",\r\n \"prettier\": \"3.5.3\",\r\n \"tsup\": \"^8.4.0\",\r\n \"typescript\": \"^5.8.3\",\r\n \"typescript-eslint\": \"^8.29.1\",\r\n \"vitest\": \"^3.1.1\"\r\n },\r\n \"engines\": {\r\n \"node\": \">= 16.9.0\",\r\n \"npm\": \">= 8.0.0\"\r\n },\r\n \"browserslist\": [\r\n \"> 1%\",\r\n \"last 2 versions\",\r\n \"not ie <= 10\"\r\n ]\r\n}\r\n","export default >(data: T): string => {\r\n const query: string[] = [];\r\n\r\n const build = (obj: unknown, keyPrefix?: string): void => {\r\n if (obj === null || obj === undefined) {\r\n return;\r\n }\r\n\r\n if (Array.isArray(obj)) {\r\n obj.forEach((item) => {\r\n build(item, keyPrefix ? `${keyPrefix}` : '');\r\n });\r\n\r\n return;\r\n }\r\n\r\n if (obj instanceof Date) {\r\n query.push(`${keyPrefix}=${encodeURIComponent(obj.toISOString())}`);\r\n return;\r\n }\r\n\r\n if (typeof obj === 'object') {\r\n Object.keys(obj).forEach((key) => {\r\n const value = obj[key as keyof typeof obj];\r\n build(value, keyPrefix ? `${keyPrefix}[${encodeURIComponent(key)}]` : encodeURIComponent(key));\r\n });\r\n\r\n return;\r\n }\r\n\r\n query.push(`${keyPrefix}=${encodeURIComponent(obj as string)}`);\r\n };\r\n\r\n build(data);\r\n\r\n return query.join('&');\r\n};\r\n","import { AxiosRequestConfig, Method, AxiosRequestHeaders, AxiosResponse, AxiosError, AxiosInstance } from 'axios';\r\n\r\n// constants\r\nimport SecurityMode from '@/constants/SecurityMode';\r\n\r\n// errors\r\nimport NlicError from '@/errors/NlicError';\r\n\r\n// types\r\nimport type { NlicResponse } from '@/types/api/response';\r\nimport type { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\n\r\n// package.json\r\nimport pkg from '../../../package.json';\r\n\r\n// service\r\nimport { getAxiosInstance, setLastResponse, setInfo } from './instance';\r\nimport toQueryString from './toQueryString';\r\n\r\nexport default async (\r\n context: ContextInstance,\r\n method: Method,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => {\r\n const headers: Record = {\r\n Accept: 'application/json',\r\n 'X-Requested-With': 'XMLHttpRequest',\r\n };\r\n\r\n // only node.js has a process variable that is of [[Class]] process\r\n if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\r\n headers['User-agent'] = `NetLicensing/Javascript ${pkg.version}/node&${process.version}`;\r\n }\r\n\r\n const req: AxiosRequestConfig = {\r\n method,\r\n headers,\r\n url: encodeURI(`${context.getBaseUrl()}/${endpoint}`),\r\n responseType: 'json',\r\n transformRequest: (d: unknown, h: AxiosRequestHeaders) => {\r\n if (h['Content-Type'] === 'application/x-www-form-urlencoded') {\r\n return toQueryString(d as Record);\r\n }\r\n\r\n if (!h['NetLicensing-Origin']) {\r\n h['NetLicensing-Origin'] = `NetLicensing/Javascript ${pkg.version}`;\r\n }\r\n\r\n return d;\r\n },\r\n };\r\n\r\n if (['put', 'post', 'patch'].indexOf(method.toLowerCase()) >= 0) {\r\n if (req.method === 'post') {\r\n headers['Content-Type'] = 'application/x-www-form-urlencoded';\r\n }\r\n req.data = data;\r\n } else {\r\n req.params = data;\r\n }\r\n\r\n switch (context.getSecurityMode()) {\r\n // Basic Auth\r\n case SecurityMode.BASIC_AUTHENTICATION:\r\n {\r\n if (!context.getUsername()) {\r\n throw new NlicError('Missing parameter \"username\"');\r\n }\r\n\r\n if (!context.getPassword()) {\r\n throw new NlicError('Missing parameter \"password\"');\r\n }\r\n\r\n req.auth = {\r\n username: context.getUsername(),\r\n password: context.getPassword(),\r\n };\r\n }\r\n break;\r\n // ApiKey Auth\r\n case SecurityMode.APIKEY_IDENTIFICATION:\r\n if (!context.getApiKey()) {\r\n throw new NlicError('Missing parameter \"apiKey\"');\r\n }\r\n\r\n headers.Authorization = `Basic ${btoa(`apiKey:${context.getApiKey()}`)}`;\r\n break;\r\n // without authorization\r\n case SecurityMode.ANONYMOUS_IDENTIFICATION:\r\n break;\r\n default:\r\n throw new NlicError('Unknown security mode');\r\n }\r\n\r\n const instance: AxiosInstance = config?.axiosInstance || getAxiosInstance();\r\n\r\n try {\r\n const response: AxiosResponse = await instance(req);\r\n const info = response.data.infos?.info || [];\r\n\r\n setLastResponse(response);\r\n setInfo(info);\r\n\r\n if (config?.onResponse) {\r\n config.onResponse(response);\r\n }\r\n\r\n if (info.length > 0) {\r\n if (config?.onInfo) {\r\n config.onInfo(info);\r\n }\r\n\r\n const eInfo = info.find(({ type }) => type === 'ERROR');\r\n\r\n if (eInfo) {\r\n throw new NlicError(eInfo.value, eInfo.id, response.config, response.request, response);\r\n }\r\n }\r\n\r\n return response;\r\n } catch (e) {\r\n const error = e as AxiosError;\r\n\r\n const response = error.response;\r\n const info = (response?.data as NlicResponse)?.infos?.info || [];\r\n\r\n setLastResponse(response || null);\r\n setInfo(info);\r\n\r\n if ((e as AxiosError).isAxiosError) {\r\n let message = (e as AxiosError).message;\r\n\r\n if (response?.data && info.length > 0) {\r\n const eInfo = info.find(({ type }) => type === 'ERROR');\r\n\r\n if (eInfo) {\r\n message = eInfo.value;\r\n }\r\n }\r\n\r\n throw new NlicError(\r\n message,\r\n error.code,\r\n error.config,\r\n error.request,\r\n error.response as AxiosResponse,\r\n );\r\n }\r\n\r\n throw e;\r\n }\r\n};\r\n","import type { AxiosResponse } from 'axios';\r\n\r\n// types\r\nimport type { NlicResponse } from '@/types/api/response';\r\nimport type { RequestConfig } from '@/types/services/Service';\r\nimport type { ContextInstance } from '@/types/vo/Context';\r\n\r\n// service\r\nimport request from './request';\r\n\r\nexport const get = (\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => request(context, 'get', endpoint, data, config);\r\n\r\nexport const post = (\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => request(context, 'post', endpoint, data, config);\r\n\r\nexport const del = (\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n): Promise> => request(context, 'delete', endpoint, data, config);\r\n","import { AxiosInstance, AxiosResponse, Method } from 'axios';\r\n\r\n// service\r\nimport { setAxiosInstance, getAxiosInstance, getLastResponse, getInfo } from '@/services/Service/instance';\r\nimport { get, post, del } from '@/services/Service/methods';\r\nimport request from '@/services/Service/request';\r\nimport toQueryString from '@/services/Service/toQueryString';\r\n\r\n// types\r\nimport { Info, NlicResponse } from '@/types/api/response';\r\nimport { RequestConfig, IService } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\n\r\nexport { get, post, del, request, toQueryString };\r\n\r\nconst service: IService = {\r\n setAxiosInstance(this: void, instance: AxiosInstance) {\r\n setAxiosInstance(instance);\r\n },\r\n\r\n getAxiosInstance(this: void): AxiosInstance {\r\n return getAxiosInstance();\r\n },\r\n\r\n getLastHttpRequestInfo(this: void): AxiosResponse | null {\r\n return getLastResponse();\r\n },\r\n\r\n getInfo(this: void): Info[] {\r\n return getInfo();\r\n },\r\n\r\n get(\r\n this: void,\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return get(context, endpoint, data, config);\r\n },\r\n\r\n post(\r\n this: void,\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return post(context, endpoint, data, config);\r\n },\r\n\r\n delete(\r\n this: void,\r\n context: ContextInstance,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return del(context, endpoint, data, config);\r\n },\r\n\r\n request(\r\n this: void,\r\n context: ContextInstance,\r\n method: Method,\r\n endpoint: string,\r\n data?: Record,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n return request(context, method, endpoint, data, config);\r\n },\r\n\r\n toQueryString>(this: void, data: T): string {\r\n return toQueryString(data);\r\n },\r\n};\r\n\r\nexport default service;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nconst FILTER_DELIMITER = ';';\r\nconst FILTER_PAIR_DELIMITER = '=';\r\n\r\nexport const encode = (filter: Record): string => {\r\n return Object.keys(filter)\r\n .map((key) => `${key}${FILTER_PAIR_DELIMITER}${String(filter[key])}`)\r\n .join(FILTER_DELIMITER);\r\n};\r\n\r\nexport const decode = (filter: string): Record => {\r\n const result: Record = {};\r\n\r\n filter.split(FILTER_DELIMITER).forEach((v) => {\r\n const [name, value] = v.split(FILTER_PAIR_DELIMITER);\r\n result[name] = value;\r\n });\r\n\r\n return result;\r\n};\r\n\r\nexport default { encode, decode };\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nexport const isDefined = (value: unknown): boolean => {\r\n return typeof value !== 'undefined' && typeof value !== 'function';\r\n};\r\n\r\nexport const isValid = (value: unknown): boolean => {\r\n if (!isDefined(value)) {\r\n return false;\r\n }\r\n\r\n if (typeof value === 'number') {\r\n return !Number.isNaN(value);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nexport const ensureNotNull = (value: unknown, name: string): void => {\r\n if (value === null) {\r\n throw new TypeError(`Parameter \"${name}\" cannot be null.`);\r\n }\r\n\r\n if (!isValid(value)) {\r\n throw new TypeError(`Parameter \"${name}\" has an invalid value.`);\r\n }\r\n};\r\n\r\nexport const ensureNotEmpty = (value: unknown, name: string): void => {\r\n ensureNotNull(value, name);\r\n\r\n if (!value) {\r\n throw new TypeError(`Parameter \"${name}\" cannot be empty.`);\r\n }\r\n};\r\n\r\nexport default {\r\n isDefined,\r\n isValid,\r\n ensureNotNull,\r\n ensureNotEmpty,\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { PageInstance, Pagination, PaginationMethods } from '@/types/vo/Page';\r\n\r\nconst Page = function (content: T, pagination?: Partial) {\r\n const pageNumber = parseInt(pagination?.pagenumber || '0', 10);\r\n const itemsNumber = parseInt(pagination?.itemsnumber || '0', 10);\r\n const totalPages = parseInt(pagination?.totalpages || '0', 10);\r\n const totalItems = parseInt(pagination?.totalitems || '0', 10);\r\n\r\n const page: PaginationMethods = {\r\n getContent(this: void): T {\r\n return content;\r\n },\r\n\r\n getPagination(this: void): Pagination {\r\n return {\r\n pageNumber,\r\n itemsNumber,\r\n totalPages,\r\n totalItems,\r\n hasNext: totalPages > pageNumber + 1,\r\n };\r\n },\r\n\r\n getPageNumber(this: void): number {\r\n return pageNumber;\r\n },\r\n\r\n getItemsNumber(this: void): number {\r\n return itemsNumber;\r\n },\r\n\r\n getTotalPages(this: void): number {\r\n return totalPages;\r\n },\r\n\r\n getTotalItems(this: void): number {\r\n return totalItems;\r\n },\r\n\r\n hasNext(this: void): boolean {\r\n return totalPages > pageNumber + 1;\r\n },\r\n };\r\n\r\n return new Proxy(content, {\r\n get(obj: T, prop: string | symbol, receiver) {\r\n if (Object.hasOwn(page, prop)) {\r\n return page[prop as keyof typeof page];\r\n }\r\n\r\n return Reflect.get(obj, prop, receiver);\r\n },\r\n\r\n set(obj, prop, value, receiver) {\r\n return Reflect.set(obj, prop, value, receiver);\r\n },\r\n\r\n getPrototypeOf() {\r\n return (Page.prototype as object) || null;\r\n },\r\n }) as PageInstance;\r\n};\r\n\r\nexport default Page;\r\n","/**\r\n * JS representation of the Bundle Service. See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToBundle from '@/converters/itemToBundle';\r\n\r\n// services\r\nimport itemToLicense from '@/converters/itemToLicense';\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { BundleEntity, BundleProps, SavedBundleProps } from '@/types/entities/Bundle';\r\nimport { LicenseEntity, LicenseProps, SavedLicenseProps } from '@/types/entities/License';\r\nimport { IBundleService } from '@/types/services/BundleService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Bundle.ENDPOINT_PATH;\r\nconst endpointObtain = Constants.Bundle.ENDPOINT_OBTAIN_PATH;\r\nconst type = Constants.Bundle.TYPE;\r\n\r\nconst bundleService: IBundleService = {\r\n /**\r\n * Gets a bundle by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#get-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the bundle number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the bundle object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToBundle>(item);\r\n },\r\n\r\n /**\r\n * Returns bundle of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#bundles-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of bundle entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const bundles: BundleEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToBundle>(v));\r\n\r\n return Page(bundles || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates a new bundle with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#create-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param bundle NetLicensing.Bundle\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created bundle object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n bundle: BundleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(bundle, 'bundle');\r\n\r\n const response = await Service.post(context, endpoint, bundle.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToBundle>(item);\r\n },\r\n\r\n /**\r\n * Updates bundle properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#update-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * bundle number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param bundle NetLicensing.Bundle\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated bundle in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n bundle: BundleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(bundle, 'bundle');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, bundle.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToBundle>(item);\r\n },\r\n\r\n /**\r\n * Deletes bundle.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#delete-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * bundle number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n\r\n /**\r\n * Obtain bundle.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/bundle-services#obtain-bundle\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * bundle number\r\n * @param number string\r\n *\r\n * licensee number\r\n * @param licenseeNumber String\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return array of licenses\r\n * @returns {Promise}\r\n */\r\n async obtain(\r\n context: ContextInstance,\r\n number: string,\r\n licenseeNumber: string,\r\n config?: RequestConfig,\r\n ): Promise>[]> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotEmpty(licenseeNumber, 'licenseeNumber');\r\n\r\n const data = { [Constants.Licensee.LICENSEE_NUMBER]: licenseeNumber };\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}/${endpointObtain}`, data, config);\r\n const items = response.data.items;\r\n\r\n const licenses = items?.item.filter((v) => v.type === Constants.License.TYPE);\r\n\r\n return licenses?.map((v) => itemToLicense>(v)) || [];\r\n },\r\n};\r\n\r\nexport default bundleService;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport { ProductModuleValidation, ValidationResultsInstance } from '@/types/vo/ValidationResults';\r\n\r\n// utils\r\nimport { isValid } from '@/utils/validation';\r\n\r\nclass ValidationResults implements ValidationResultsInstance {\r\n readonly validations: Record;\r\n ttl?: Date;\r\n\r\n constructor() {\r\n this.validations = {};\r\n }\r\n\r\n getValidators(): Record {\r\n return this.validations;\r\n }\r\n\r\n setValidation(validation: ProductModuleValidation): this {\r\n this.validations[validation.productModuleNumber] = validation;\r\n return this;\r\n }\r\n\r\n getValidation(productModuleNumber: string, def?: D): ProductModuleValidation | D {\r\n return this.validations[productModuleNumber] || def;\r\n }\r\n\r\n setProductModuleValidation(validation: ProductModuleValidation): this {\r\n return this.setValidation(validation);\r\n }\r\n\r\n getProductModuleValidation(productModuleNumber: string, def?: D): ProductModuleValidation | D {\r\n return this.getValidation(productModuleNumber, def);\r\n }\r\n\r\n setTtl(ttl: Date | string): this {\r\n if (!isValid(ttl)) {\r\n throw new TypeError(`Bad ttl:${ttl.toString()}`);\r\n }\r\n\r\n this.ttl = new Date(ttl);\r\n return this;\r\n }\r\n\r\n getTtl(): Date | undefined {\r\n return this.ttl;\r\n }\r\n\r\n toString(): string {\r\n let data = 'ValidationResult [';\r\n\r\n Object.keys(this.validations).forEach((pmNumber) => {\r\n data += `ProductModule<${pmNumber}>`;\r\n\r\n if (pmNumber in this.validations) {\r\n data += JSON.stringify(this.validations[pmNumber]);\r\n }\r\n });\r\n\r\n data += ']';\r\n\r\n return data;\r\n }\r\n}\r\n\r\nexport default (): ValidationResultsInstance => new ValidationResults();\r\n","/**\r\n * Licensee Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/licensee-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToLicensee from '@/converters/itemToLicensee';\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { LicenseeProps, LicenseeEntity, SavedLicenseeProps } from '@/types/entities/Licensee';\r\nimport { ILicenseeService } from '@/types/services/LicenseeService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\nimport { ValidationParametersInstance } from '@/types/vo/ValidationParameters';\r\nimport { ValidationResultsInstance as IValidationResults } from '@/types/vo/ValidationResults';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\nimport ValidationResults from '@/vo/ValidationResults';\r\n\r\nconst endpoint = Constants.Licensee.ENDPOINT_PATH;\r\nconst endpointValidate = Constants.Licensee.ENDPOINT_PATH_VALIDATE;\r\nconst endpointTransfer = Constants.Licensee.ENDPOINT_PATH_TRANSFER;\r\nconst type = Constants.Licensee.TYPE;\r\n\r\nconst licenseeService: ILicenseeService = {\r\n /**\r\n * Gets licensee by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#get-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the licensee number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the licensee in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicensee>(item);\r\n },\r\n\r\n /**\r\n * Returns all licensees of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#licensees-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of licensees (of all products) or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: LicenseeEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToLicensee>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new licensee object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#create-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product to which the new licensee is to be added\r\n * @param productNumber string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param licensee NetLicensing.Licensee\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created licensee object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n productNumber: string,\r\n licensee: LicenseeEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(licensee, 'licensee');\r\n\r\n const data = licensee.serialize();\r\n\r\n if (productNumber) {\r\n data.productNumber = productNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicensee>(item);\r\n },\r\n\r\n /**\r\n * Updates licensee properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#update-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param licensee NetLicensing.Licensee\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated licensee in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n licensee: LicenseeEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(licensee, 'licensee');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, licensee.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicensee>(item);\r\n },\r\n\r\n /**\r\n * Deletes licensee.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#delete-licensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n\r\n /**\r\n * Validates active licenses of the licensee.\r\n * In the case of multiple product modules validation,\r\n * required parameters indexes will be added automatically.\r\n * See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/licensee-services#validate-licensee\r\n *\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * optional validation parameters. See ValidationParameters and licensing model documentation for\r\n * details.\r\n * @param validationParameters NetLicensing.ValidationParameters.\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * @returns {ValidationResults}\r\n */\r\n async validate(\r\n context: ContextInstance,\r\n number: string,\r\n validationParameters?: ValidationParametersInstance,\r\n config?: RequestConfig,\r\n ): Promise {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const data: Record = {};\r\n\r\n if (validationParameters) {\r\n const productNumber: string | undefined = validationParameters.productNumber;\r\n\r\n if (productNumber) {\r\n data.productNumber = productNumber;\r\n }\r\n\r\n const licenseeProperties = validationParameters.licenseeProperties;\r\n\r\n Object.keys(licenseeProperties).forEach((key: string) => {\r\n data[key] = validationParameters.getLicenseeProperty(key);\r\n });\r\n\r\n if (validationParameters.isForOfflineUse()) {\r\n data.forOfflineUse = true;\r\n }\r\n\r\n if (validationParameters.isDryRun()) {\r\n data.dryRun = true;\r\n }\r\n\r\n const parameters = validationParameters.getParameters();\r\n\r\n Object.keys(parameters).forEach((pmNumber, i) => {\r\n data[`${Constants.ProductModule.PRODUCT_MODULE_NUMBER}${i}`] = pmNumber;\r\n\r\n const parameter = parameters[pmNumber];\r\n\r\n if (parameter) {\r\n Object.keys(parameter).forEach((key: string) => {\r\n data[key + i] = parameter[key];\r\n });\r\n }\r\n });\r\n }\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}/${endpointValidate}`, data, config);\r\n\r\n const validationResults = ValidationResults();\r\n\r\n const ttl = response.data.ttl;\r\n\r\n if (ttl) {\r\n validationResults.setTtl(ttl);\r\n }\r\n\r\n const items = response.data.items?.item.filter((v) => v.type === Constants.Validation.TYPE);\r\n\r\n items?.forEach((v) => {\r\n validationResults.setValidation(itemToObject(v));\r\n });\r\n\r\n return validationResults;\r\n },\r\n\r\n /**\r\n * Transfer licenses between licensees.\r\n * @see https://netlicensing.io/wiki/licensee-services#transfer-licenses\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the number of the licensee receiving licenses\r\n * @param number string\r\n *\r\n * the number of the licensee delivering licenses\r\n * @param sourceLicenseeNumber string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * @returns {Promise}\r\n */\r\n transfer(\r\n context: ContextInstance,\r\n number: string,\r\n sourceLicenseeNumber: string,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotEmpty(sourceLicenseeNumber, 'sourceLicenseeNumber');\r\n\r\n const data = { sourceLicenseeNumber };\r\n\r\n return Service.post(context, `${endpoint}/${number}/${endpointTransfer}`, data, config);\r\n },\r\n};\r\n\r\nexport default licenseeService;\r\n","/**\r\n * JS representation of the License Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/license-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToLicense from '@/converters/itemToLicense';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { LicenseProps, LicenseEntity, SavedLicenseProps } from '@/types/entities/License';\r\nimport { ILicenseService } from '@/types/services/LicenseService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.License.ENDPOINT_PATH;\r\nconst type = Constants.License.TYPE;\r\n\r\nconst licenseService: ILicenseService = {\r\n /**\r\n * Gets license by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#get-license\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the license number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the license in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicense>(item);\r\n },\r\n\r\n /**\r\n * Returns licenses of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#licenses-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|undefined\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return array of licenses (of all products) or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: LicenseEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToLicense>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new license object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#create-license\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent licensee to which the new license is to be added\r\n * @param licenseeNumber string\r\n *\r\n * license template that the license is created from\r\n * @param licenseTemplateNumber string\r\n *\r\n * For privileged logins specifies transaction for the license creation. For regular logins new\r\n * transaction always created implicitly, and the operation will be in a separate transaction.\r\n * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with\r\n * auto-generated number.\r\n * @param transactionNumber null|string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param license NetLicensing.License\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created license object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n licenseeNumber: string | null,\r\n licenseTemplateNumber: string | null,\r\n transactionNumber: string | null,\r\n license: LicenseEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(license, 'license');\r\n\r\n const data = license.serialize();\r\n\r\n if (licenseeNumber) {\r\n data.licenseeNumber = licenseeNumber;\r\n }\r\n\r\n if (licenseTemplateNumber) {\r\n data.licenseTemplateNumber = licenseTemplateNumber;\r\n }\r\n\r\n if (transactionNumber) {\r\n data.transactionNumber = transactionNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicense>(item);\r\n },\r\n\r\n /**\r\n * Updates license properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#update-license\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license number\r\n * @param number string\r\n *\r\n * transaction for the license update. Created implicitly if transactionNumber is null. In this case the\r\n * operation will be in a separate transaction.\r\n * @param transactionNumber string|null\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param license NetLicensing.License\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated license in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n transactionNumber: string | null,\r\n license: LicenseEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(license, 'license');\r\n\r\n const data = license.serialize();\r\n\r\n if (transactionNumber) {\r\n data.transactionNumber = transactionNumber;\r\n }\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicense>(item);\r\n },\r\n\r\n /**\r\n * Deletes license.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-services#delete-license\r\n *\r\n * When any license is deleted, corresponding transaction is created automatically.\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default licenseService;\r\n","/**\r\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/license-template-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToLicenseTemplate from '@/converters/itemToLicenseTemplate';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport {\r\n LicenseTemplateProps,\r\n LicenseTemplateEntity,\r\n SavedLicenseTemplateProps,\r\n} from '@/types/entities/LicenseTemplate';\r\nimport { ILicenseTemplateService } from '@/types/services/LicenseTemplateService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.LicenseTemplate.ENDPOINT_PATH;\r\nconst type = Constants.LicenseTemplate.TYPE;\r\n\r\nconst licenseTemplateService: ILicenseTemplateService = {\r\n /**\r\n * Gets license template by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#get-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the license template number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the license template object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicenseTemplate>(item);\r\n },\r\n\r\n /**\r\n * Returns all license templates of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#license-templates-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of license templates (of all products/modules) or null/empty list if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: LicenseTemplateEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToLicenseTemplate>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new license template object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#create-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product module to which the new license template is to be added\r\n * @param productModuleNumber\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param licenseTemplate NetLicensing.LicenseTemplate\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * the newly created license template object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n productModuleNumber: string | null,\r\n licenseTemplate: LicenseTemplateEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(licenseTemplate, 'licenseTemplate');\r\n\r\n const data = licenseTemplate.serialize();\r\n\r\n if (productModuleNumber) {\r\n data.productModuleNumber = productModuleNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicenseTemplate>(item);\r\n },\r\n\r\n /**\r\n * Updates license template properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#update-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license template number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param licenseTemplate NetLicensing.LicenseTemplate\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated license template in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n licenseTemplate: LicenseTemplateEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(licenseTemplate, 'licenseTemplate');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, licenseTemplate.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToLicenseTemplate>(item);\r\n },\r\n\r\n /**\r\n * Deletes license template.See NetLicensingAPI JavaDoc for details:\r\n * @see https://netlicensing.io/wiki/license-template-services#delete-license-template\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license template number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default licenseTemplateService;\r\n","/**\r\n * JS representation of the Notification Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/notification-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToNotification from '@/converters/itemToNotification';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { NotificationProps, NotificationEntity, SavedNotificationProps } from '@/types/entities/Notification';\r\nimport { INotificationService } from '@/types/services/NotificationService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Notification.ENDPOINT_PATH;\r\nconst type = Constants.Notification.TYPE;\r\n\r\nconst notificationService: INotificationService = {\r\n /**\r\n * Gets notification by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#get-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the notification number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the notification object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToNotification>(item);\r\n },\r\n\r\n /**\r\n * Returns notifications of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#notifications-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of notification entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: NotificationEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToNotification>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new notification with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#create-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param notification NetLicensing.Notification\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created notification object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n notification: NotificationEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(notification, 'notification');\r\n\r\n const response = await Service.post(context, endpoint, notification.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToNotification>(item);\r\n },\r\n\r\n /**\r\n * Updates notification properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#update-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * notification number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param notification NetLicensing.Notification\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated notification in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n notification: NotificationEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(notification, 'notification');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, notification.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToNotification>(item);\r\n },\r\n\r\n /**\r\n * Deletes notification.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/notification-services#delete-notification\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * notification number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default notificationService;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToPaymentMethod from '@/converters/itemToPaymentMethod';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { PaymentMethodProps, PaymentMethodEntity, SavedPaymentMethodProps } from '@/types/entities/PaymentMethod';\r\nimport { IPaymentMethodService } from '@/types/services/PaymentMethodService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.PaymentMethod.ENDPOINT_PATH;\r\nconst type = Constants.PaymentMethod.TYPE;\r\n\r\nconst paymentMethodService: IPaymentMethodService = {\r\n /**\r\n * Gets payment method by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/payment-method-services#get-payment-method\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the payment method number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the payment method in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToPaymentMethod>(item);\r\n },\r\n\r\n /**\r\n * Returns payment methods of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/payment-method-services#payment-methods-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of payment method entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: PaymentMethodEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToPaymentMethod>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Updates payment method properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/payment-method-services#update-payment-method\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the payment method number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param paymentMethod NetLicensing.PaymentMethod\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated payment method in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n paymentMethod: PaymentMethodEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(paymentMethod, 'paymentMethod');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, paymentMethod.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToPaymentMethod>(item);\r\n },\r\n};\r\n\r\nexport default paymentMethodService;\r\n","/**\r\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/product-module-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToProductModule from '@/converters/itemToProductModule';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { ProductModuleProps, ProductModuleEntity, SavedProductModuleProps } from '@/types/entities/ProductModule';\r\nimport { IProductModuleService } from '@/types/services/ProductModuleService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.ProductModule.ENDPOINT_PATH;\r\nconst type = Constants.ProductModule.TYPE;\r\n\r\nconst productModuleService: IProductModuleService = {\r\n /**\r\n * Gets product module by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#get-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the product module number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the product module object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProductModule>(item);\r\n },\r\n\r\n /**\r\n * Returns products of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#product-modules-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of product modules entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: ProductModuleEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToProductModule>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new product module object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#create-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product to which the new product module is to be added\r\n * @param productNumber string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param productModule NetLicensing.ProductModule\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * the newly created product module object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n productNumber: string | null,\r\n productModule: ProductModuleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(productModule, 'productModule');\r\n\r\n const data = productModule.serialize();\r\n\r\n if (productNumber) {\r\n data.productNumber = productNumber;\r\n }\r\n\r\n const response = await Service.post(context, endpoint, data, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProductModule>(item);\r\n },\r\n\r\n /**\r\n * Updates product module properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#update-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product module number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param productModule NetLicensing.ProductModule\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated product module in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n productModule: ProductModuleEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(productModule, 'productModule');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, productModule.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProductModule>(item);\r\n },\r\n\r\n /**\r\n * Deletes product module.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-module-services#delete-product-module\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product module number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default productModuleService;\r\n","/**\r\n * JS representation of the Product Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/product-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToProduct from '@/converters/itemToProduct';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { ProductProps, ProductEntity, SavedProductProps } from '@/types/entities/Product';\r\nimport { IProductService } from '@/types/services/ProductService';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Product.ENDPOINT_PATH;\r\nconst type = Constants.Product.TYPE;\r\n\r\nconst productService: IProductService = {\r\n /**\r\n * Gets product by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#get-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the product number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the product object in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProduct>(item);\r\n },\r\n\r\n /**\r\n * Returns products of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#products-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of product entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: ProductEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToProduct>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new product with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#create-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param product NetLicensing.Product\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created product object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n product: ProductEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(product, 'product');\r\n\r\n const response = await Service.post(context, endpoint, product.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProduct>(item);\r\n },\r\n\r\n /**\r\n * Updates product properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#update-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param product NetLicensing.Product\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * updated product in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n product: ProductEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(product, 'product');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, product.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToProduct>(item);\r\n },\r\n\r\n /**\r\n * Deletes product.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/product-services#delete-product\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default productService;\r\n","/**\r\n * JS representation of the Token Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/token-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport { AxiosResponse } from 'axios';\r\n\r\n// constants\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToToken from '@/converters/itemToToken';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination, NlicResponse } from '@/types/api/response';\r\nimport { TokenProps, TokenEntity, SavedTokenProps } from '@/types/entities/Token';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { ITokenService } from '@/types/services/TokenService';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Token.ENDPOINT_PATH;\r\nconst type = Constants.Token.TYPE;\r\n\r\nconst tokenService: ITokenService = {\r\n /**\r\n * Gets token by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#get-token\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the token number\r\n * @param number\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the token in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToToken>(item);\r\n },\r\n\r\n /**\r\n * Returns tokens of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#tokens-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|undefined|null\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of token entities or empty array if nothing found.\r\n * @return array\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: TokenEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToToken>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new token.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#create-token\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context Context\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param token Token\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return created token in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n token: TokenEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(token, 'token');\r\n\r\n const response = await Service.post(context, endpoint, token.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToToken>(item);\r\n },\r\n\r\n /**\r\n * Delete token by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/token-services#delete-token\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the token number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(\r\n context: ContextInstance,\r\n number: string,\r\n forceCascade?: boolean,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n return Service.delete(context, `${endpoint}/${number}`, { forceCascade: Boolean(forceCascade) }, config);\r\n },\r\n};\r\n\r\nexport default tokenService;\r\n","/**\r\n * JS representation of the Transaction Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/transaction-services\r\n *\r\n * Transaction is created each time change to LicenseService licenses happens. For instance licenses are\r\n * obtained by a licensee, licenses disabled by vendor, licenses deleted, etc. Transaction is created no matter what\r\n * source has initiated the change to licenses: it can be either a direct purchase of licenses by a licensee via\r\n * NetLicensing Shop, or licenses can be given to a licensee by a vendor. Licenses can also be assigned implicitly by\r\n * NetLicensing if it is defined so by a license model (e.g. evaluation license may be given automatically). All these\r\n * events are reflected in transactions. Of all the transaction handling routines only read-only routines are exposed to\r\n * the public API, as transactions are only allowed to be created and modified by NetLicensing internally.\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToTransaction from '@/converters/itemToTransaction';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport type { ItemPagination } from '@/types/api/response';\r\nimport { TransactionProps, TransactionEntity, SavedTransactionProps } from '@/types/entities/Transaction';\r\nimport type { RequestConfig } from '@/types/services/Service';\r\nimport type { ITransactionService } from '@/types/services/TransactionService';\r\nimport type { ContextInstance } from '@/types/vo/Context';\r\nimport type { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\nimport { ensureNotEmpty, ensureNotNull } from '@/utils/validation';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst endpoint = Constants.Transaction.ENDPOINT_PATH;\r\nconst type = Constants.Transaction.TYPE;\r\n\r\nconst transactionService: ITransactionService = {\r\n /**\r\n * Gets transaction by its number.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#get-transaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the transaction number\r\n * @param number string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the transaction in promise\r\n * @returns {Promise}\r\n */\r\n async get(\r\n context: ContextInstance,\r\n number: string,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n\r\n const response = await Service.get(context, `${endpoint}/${number}`, {}, config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToTransaction>(item);\r\n },\r\n\r\n /**\r\n * Returns all transactions of a vendor.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#transactions-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of transaction entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async list(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise>[]>> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const list: TransactionEntity>[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToTransaction>(v));\r\n\r\n return Page(list || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Creates new transaction object with given properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#create-transaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param transaction NetLicensing.Transaction\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return the newly created transaction object in promise\r\n * @returns {Promise}\r\n */\r\n async create(\r\n context: ContextInstance,\r\n transaction: TransactionEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotNull(transaction, 'transaction');\r\n\r\n const response = await Service.post(context, endpoint, transaction.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToTransaction>(item);\r\n },\r\n\r\n /**\r\n * Updates transaction properties.See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/transaction-services#update-transaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * transaction number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param transaction NetLicensing.Transaction\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * return updated transaction in promise.\r\n * @returns {Promise}\r\n */\r\n async update(\r\n context: ContextInstance,\r\n number: string,\r\n transaction: TransactionEntity,\r\n config?: RequestConfig,\r\n ): Promise>> {\r\n ensureNotEmpty(number, 'number');\r\n ensureNotNull(transaction, 'transaction');\r\n\r\n const response = await Service.post(context, `${endpoint}/${number}`, transaction.serialize(), config);\r\n const item = response.data.items?.item.find((v) => v.type === type);\r\n\r\n return itemToTransaction>(item);\r\n },\r\n};\r\n\r\nexport default transactionService;\r\n","/**\r\n * JS representation of the Utility Service. See NetLicensingAPI for details:\r\n * https://netlicensing.io/wiki/utility-services\r\n *\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport Constants from '@/constants';\r\n\r\n// converters\r\nimport itemToCountry from '@/converters/itemToCountry';\r\nimport itemToObject from '@/converters/itemToObject';\r\n\r\n// services\r\nimport Service from '@/services/Service';\r\n\r\n// types\r\nimport { ItemPagination } from '@/types/api/response';\r\nimport { LicenseTypeValues } from '@/types/constants/LicenseType';\r\nimport { LicensingModelValues } from '@/types/constants/LicensingModel';\r\nimport { CountryEntity } from '@/types/entities/Country';\r\nimport { RequestConfig } from '@/types/services/Service';\r\nimport { IUtilityService } from '@/types/services/UtilityService';\r\nimport { ContextInstance } from '@/types/vo/Context';\r\nimport { PageInstance } from '@/types/vo/Page';\r\n\r\n// utils\r\nimport { encode } from '@/utils/filter';\r\n\r\n// vo\r\nimport Page from '@/vo/Page';\r\n\r\nconst baseEndpoint = Constants.Utility.ENDPOINT_PATH;\r\n\r\nconst utilityService: IUtilityService = {\r\n /**\r\n * Returns all license types. See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/utility-services#license-types-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of available license types or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async listLicenseTypes(context: ContextInstance, config?: RequestConfig): Promise> {\r\n const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_LICENSE_TYPES}`;\r\n\r\n const response = await Service.get(context, endpoint, undefined, config);\r\n const items = response.data.items;\r\n\r\n const type = Constants.Utility.LICENSE_TYPE;\r\n\r\n const licenseTypes: string[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToObject<{ name: string }>(v).name);\r\n\r\n return Page((licenseTypes as LicenseTypeValues[]) || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Returns all license models. See NetLicensingAPI for details:\r\n * @see https://netlicensing.io/wiki/utility-services#licensing-models-list\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * array of available license models or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async listLicensingModels(\r\n context: ContextInstance,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_LICENSING_MODELS}`;\r\n\r\n const response = await Service.get(context, endpoint, undefined, config);\r\n const items = response.data.items;\r\n\r\n const type = Constants.Utility.LICENSING_MODEL_TYPE;\r\n\r\n const licensingModels: string[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToObject<{ name: string }>(v).name);\r\n\r\n return Page((licensingModels as LicensingModelValues[]) || [], items as ItemPagination);\r\n },\r\n\r\n /**\r\n * Returns all countries.\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter\r\n *\r\n * (optional) service request config\r\n * @param config\r\n *\r\n * collection of available countries or null/empty list if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n async listCountries(\r\n context: ContextInstance,\r\n filter?: Record | string | null,\r\n config?: RequestConfig,\r\n ): Promise> {\r\n const data: { [Constants.FILTER]: string } = {};\r\n\r\n if (filter) {\r\n data[Constants.FILTER] = typeof filter === 'string' ? filter : encode(filter);\r\n }\r\n\r\n const endpoint = `${baseEndpoint}/${Constants.Utility.ENDPOINT_PATH_COUNTRIES}`;\r\n\r\n const response = await Service.get(context, endpoint, data, config);\r\n const items = response.data.items;\r\n\r\n const type = Constants.Utility.COUNTRY_TYPE;\r\n\r\n const countries: CountryEntity[] | undefined = items?.item\r\n .filter((v) => v.type === type)\r\n .map((v) => itemToCountry(v));\r\n\r\n return Page(countries || [], items as ItemPagination);\r\n },\r\n};\r\n\r\nexport default utilityService;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport SecurityModeEnum from '@/constants/SecurityMode';\r\n\r\n// types\r\nimport type { SecurityModeValues } from '@/types/constants/SecurityMode';\r\nimport type { ContextConfig, ContextInstance } from '@/types/vo/Context';\r\n\r\nclass Context implements ContextInstance {\r\n baseUrl: string;\r\n securityMode: SecurityModeValues;\r\n username?: string;\r\n password?: string;\r\n apiKey?: string;\r\n publicKey?: string;\r\n\r\n constructor(props?: ContextConfig) {\r\n this.baseUrl = props?.baseUrl || 'https://go.netlicensing.io/core/v2/rest';\r\n this.securityMode = props?.securityMode || SecurityModeEnum.BASIC_AUTHENTICATION;\r\n this.username = props?.username;\r\n this.password = props?.password;\r\n this.apiKey = props?.apiKey;\r\n this.publicKey = props?.publicKey;\r\n }\r\n\r\n setBaseUrl(baseUrl: string): this {\r\n this.baseUrl = baseUrl;\r\n return this;\r\n }\r\n\r\n getBaseUrl(): string {\r\n return this.baseUrl;\r\n }\r\n\r\n setSecurityMode(securityMode: SecurityModeValues): this {\r\n this.securityMode = securityMode;\r\n return this;\r\n }\r\n\r\n getSecurityMode(): SecurityModeValues {\r\n return this.securityMode;\r\n }\r\n\r\n setUsername(username: string): this {\r\n this.username = username;\r\n return this;\r\n }\r\n\r\n getUsername(def?: D): string | D {\r\n return (this.username || def) as string | D;\r\n }\r\n\r\n setPassword(password: string): this {\r\n this.password = password;\r\n return this;\r\n }\r\n\r\n getPassword(def?: D): string | D {\r\n return (this.password || def) as string | D;\r\n }\r\n\r\n setApiKey(apiKey: string): this {\r\n this.apiKey = apiKey;\r\n return this;\r\n }\r\n\r\n getApiKey(def?: D): string | D {\r\n return (this.apiKey || def) as string | D;\r\n }\r\n\r\n setPublicKey(publicKey: string): this {\r\n this.publicKey = publicKey;\r\n return this;\r\n }\r\n\r\n getPublicKey(def?: D): string | D {\r\n return (this.publicKey || def) as string | D;\r\n }\r\n}\r\n\r\nexport default (props?: ContextConfig): ContextInstance => new Context(props);\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link https://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n// types\r\nimport {\r\n ValidationParametersInstance,\r\n Parameter,\r\n Parameters,\r\n LicenseeProperties,\r\n} from '@/types/vo/ValidationParameters';\r\n\r\nclass ValidationParameters implements ValidationParametersInstance {\r\n productNumber?: string;\r\n dryRun?: boolean;\r\n forOfflineUse?: boolean;\r\n licenseeProperties: LicenseeProperties;\r\n parameters: Parameters;\r\n\r\n constructor() {\r\n this.parameters = {};\r\n this.licenseeProperties = {};\r\n }\r\n\r\n setProductNumber(productNumber: string): this {\r\n this.productNumber = productNumber;\r\n return this;\r\n }\r\n\r\n getProductNumber(): string | undefined {\r\n return this.productNumber;\r\n }\r\n\r\n setLicenseeName(licenseeName: string): this {\r\n this.licenseeProperties.licenseeName = licenseeName;\r\n return this;\r\n }\r\n\r\n getLicenseeName(): string | undefined {\r\n return this.licenseeProperties.licenseeName;\r\n }\r\n\r\n setLicenseeSecret(licenseeSecret: string): this {\r\n this.licenseeProperties.licenseeSecret = licenseeSecret;\r\n return this;\r\n }\r\n\r\n getLicenseeSecret(): string | undefined {\r\n return this.licenseeProperties.licenseeSecret;\r\n }\r\n\r\n getLicenseeProperties(): LicenseeProperties {\r\n return this.licenseeProperties;\r\n }\r\n\r\n setLicenseeProperty(key: string, value: string): this {\r\n this.licenseeProperties[key] = value;\r\n return this;\r\n }\r\n\r\n getLicenseeProperty(key: string, def?: D): string | D {\r\n return (this.licenseeProperties[key] || def) as string | D;\r\n }\r\n\r\n setForOfflineUse(forOfflineUse: boolean): this {\r\n this.forOfflineUse = forOfflineUse;\r\n return this;\r\n }\r\n\r\n isForOfflineUse() {\r\n return !!this.forOfflineUse;\r\n }\r\n\r\n setDryRun(dryRun: boolean): this {\r\n this.dryRun = dryRun;\r\n return this;\r\n }\r\n\r\n isDryRun(): boolean {\r\n return !!this.dryRun;\r\n }\r\n\r\n getParameters(): Parameters {\r\n return this.parameters;\r\n }\r\n\r\n setParameter(productModuleNumber: string, parameter: Parameter): this {\r\n this.parameters[productModuleNumber] = parameter;\r\n return this;\r\n }\r\n\r\n getParameter(productModuleNumber: string): Parameter | undefined {\r\n return this.parameters[productModuleNumber];\r\n }\r\n\r\n getProductModuleValidationParameters(productModuleNumber: string): Parameter | undefined {\r\n return this.getParameter(productModuleNumber);\r\n }\r\n\r\n setProductModuleValidationParameters(productModuleNumber: string, productModuleParameters: Parameter): this {\r\n return this.setParameter(productModuleNumber, productModuleParameters);\r\n }\r\n}\r\n\r\nexport default (): ValidationParametersInstance => new ValidationParameters();\r\n"],"mappings":"AAMA,IAAMA,GAAqB,OAAO,OAAO,CAEvC,SAAU,WACV,WAAY,aACZ,OAAQ,QACV,CAAC,EAEMC,GAAQD,GCPf,IAAME,GAAc,OAAO,OAAO,CAChC,QAAS,UACT,WAAY,aACZ,SAAU,WACV,SAAU,UACZ,CAAC,EAEMC,EAAQD,GCPf,IAAME,GAAoB,OAAO,OAAO,CACtC,iBAAkB,mBAClB,gBAAiB,kBACjB,sBAAuB,wBACvB,8BAA+B,+BACjC,CAAC,EAE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seeSecretMode","LicenseeSecretMode_default","LicenseType","LicenseType_default","NotificationEvent","NotificationEvent_default","NotificationProtocol","NotificationProtocol_default","SecurityMode","SecurityMode_default","TimeVolumePeriod","TimeVolumePeriod_default","TokenType","TokenType_default","TransactionSource","TransactionSource_default","TransactionStatus","TransactionStatus_default","constants_default","LicenseeSecretMode_default","LicenseType_default","NotificationEvent_default","NotificationProtocol_default","SecurityMode_default","TimeVolumePeriod_default","TokenType_default","TransactionSource_default","TransactionStatus_default","ApiKeyRole","ApiKeyRole_default","LicensingModel","LicensingModel_default","NodeSecretMode","NodeSecretMode_default","PaymentMethodEnum","PaymentMethodEnum_default","cast","value","extractProperties","properties","result","name","extractLists","lists","list","itemToObject","item","itemToObject_default","has","obj","key","set","value","get","def","serialize_default","obj","options","map","ignore","k","v","defineEntity","props","methods","proto","options","listeners","base","key","value","set","def","get","has","properties","k","v","serialize_default","obj","prop","receiver","l","defineEntity_default","Bundle","properties","props","defineEntity_default","active","set","def","get","number","name","price","currency","numbers","licenseTemplateNumbers","serialize_default","Bundle_default","itemToBundle_default","item","props","itemToObject_default","licenseTemplateNumbers","Bundle_default","Country","properties","props","defineEntity_default","Country_default","itemToCountry_default","item","Country_default","itemToObject_default","License","properties","props","defineEntity_default","active","set","def","get","number","name","price","currency","hidden","timeVolume","timeVolumePeriod","startDate","parentfeature","serialize_default","License_default","itemToLicense_default","item","props","itemToObject_default","startDate","License_default","Licensee","properties","props","defineEntity_default","active","set","def","get","number","name","mark","serialize_default","Licensee_default","itemToLicensee_default","item","Licensee_default","itemToObject_default","LicenseTemplate","properties","props","defineEntity_default","active","set","def","get","number","name","type","price","currency","automatic","hidden","hideLicenses","gradePeriod","timeVolume","timeVolumePeriod","maxSessions","quantity","productModuleNumber","serialize_default","LicenseTemplate_default","itemToLicenseTemplate_default","item","LicenseTemplate_default","itemToObject_default","Notification","properties","props","defineEntity_default","active","set","def","get","number","name","protocol","events","event","payload","endpoint","data","serialize_default","Notification_default","itemToNotification_default","item","props","itemToObject_default","events","Notification_default","PaymentMethod","properties","props","defineEntity_default","active","set","def","get","number","PaymentMethod_default","itemToPaymentMethod_default","item","PaymentMethod_default","itemToObject_default","Product","properties","props","defineEntity_default","active","set","def","get","number","name","version","description","licensingInfo","licenseeAutoCreate","discounts","discount","productDiscounts","map","serialize_default","Product_default","AxiosError","NlicError","_NlicError","message","code","config","request","response","stack","ProductDiscount","properties","props","NlicError","defineEntity_default","totalPrice","set","def","get","currency","amountFix","amountPercent","total","amount","obj","prop","ProductDiscount_default","itemToProduct_default","item","props","itemToObject_default","discounts","d","ProductDiscount_default","Product_default","ProductModule","properties","props","defineEntity_default","active","set","def","get","number","name","licensingModel","maxCheckoutValidity","yellowThreshold","redThreshold","productNumber","serialize_default","ProductModule_default","itemToProductModule_default","item","ProductModule_default","itemToObject_default","Token","properties","props","defineEntity_default","active","set","def","get","number","expirationTime","tokenType","licenseeNumber","action","apiKeyRole","bundleNumber","bundlePrice","productNumber","predefinedShoppingItem","successURL","successURLTitle","cancelURL","cancelURLTitle","serialize_default","Token_default","itemToToken_default","item","props","itemToObject_default","expirationTime","Token_default","LicenseTransactionJoin","transaction","license","LicenseTransactionJoin_default","Transaction","properties","props","defineEntity_default","active","set","def","get","number","status","source","grandTotal","discount","currency","dateCreated","paymentMethod","joins","serialize_default","Transaction_default","itemToTransaction_default","item","props","itemToObject_default","dateCreated","dateClosed","licenseTransactionJoins","transactionNumber","licenseNumber","transaction","Transaction_default","license","License_default","LicenseTransactionJoin_default","axios","axiosInstance","lastResponse","info","setAxiosInstance","instance","getAxiosInstance","setLastResponse","response","getLastResponse","setInfo","infos","getInfo","package_default","toQueryString_default","data","query","build","obj","keyPrefix","item","key","value","request_default","context","method","endpoint","data","config","headers","package_default","req","d","h","toQueryString_default","SecurityMode_default","NlicError","instance","getAxiosInstance","response","info","setLastResponse","setInfo","eInfo","type","e","error","message","get","context","endpoint","data","config","request_default","post","del","service","instance","setAxiosInstance","getAxiosInstance","getLastResponse","getInfo","context","endpoint","data","config","get","post","del","method","request_default","toQueryString_default","Service_default","FILTER_DELIMITER","FILTER_PAIR_DELIMITER","encode","filter","key","decode","result","v","name","value","isDefined","value","isValid","ensureNotNull","name","ensureNotEmpty","Page","content","pagination","pageNumber","itemsNumber","totalPages","totalItems","page","obj","prop","receiver","value","Page_default","endpoint","constants_default","endpointObtain","type","bundleService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToBundle_default","filter","data","encode","items","bundles","Page_default","bundle","ensureNotNull","forceCascade","licenseeNumber","itemToLicense_default","BundleService_default","ValidationResults","validation","productModuleNumber","def","ttl","isValid","data","pmNumber","ValidationResults_default","endpoint","constants_default","endpointValidate","endpointTransfer","type","licenseeService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToLicensee_default","filter","data","encode","items","list","Page_default","productNumber","licensee","ensureNotNull","forceCascade","validationParameters","licenseeProperties","key","parameters","pmNumber","i","parameter","response","validationResults","ValidationResults_default","ttl","itemToObject_default","sourceLicenseeNumber","LicenseeService_default","endpoint","constants_default","type","licenseService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToLicense_default","filter","data","encode","items","list","Page_default","licenseeNumber","licenseTemplateNumber","transactionNumber","license","ensureNotNull","forceCascade","LicenseService_default","endpoint","constants_default","type","licenseTemplateService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToLicenseTemplate_default","filter","data","encode","items","list","Page_default","productModuleNumber","licenseTemplate","ensureNotNull","forceCascade","LicenseTemplateService_default","endpoint","constants_default","type","notificationService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToNotification_default","filter","data","encode","items","list","Page_default","notification","ensureNotNull","forceCascade","NotificationService_default","endpoint","constants_default","type","paymentMethodService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToPaymentMethod_default","filter","data","encode","items","list","Page_default","paymentMethod","ensureNotNull","PaymentMethodService_default","endpoint","constants_default","type","productModuleService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToProductModule_default","filter","data","encode","items","list","Page_default","productNumber","productModule","ensureNotNull","forceCascade","ProductModuleService_default","endpoint","constants_default","type","productService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToProduct_default","filter","data","encode","items","list","Page_default","product","ensureNotNull","forceCascade","ProductService_default","endpoint","constants_default","type","tokenService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToToken_default","filter","data","encode","items","list","Page_default","token","ensureNotNull","forceCascade","TokenService_default","endpoint","constants_default","type","transactionService","context","number","config","ensureNotEmpty","item","Service_default","v","itemToTransaction_default","filter","data","encode","items","list","Page_default","transaction","ensureNotNull","TransactionService_default","baseEndpoint","constants_default","utilityService","context","config","endpoint","items","Service_default","type","licenseTypes","v","itemToObject_default","Page_default","licensingModels","filter","data","encode","countries","itemToCountry_default","UtilityService_default","Context","props","SecurityMode_default","baseUrl","securityMode","username","def","password","apiKey","publicKey","Context_default","ValidationParameters","productNumber","licenseeName","licenseeSecret","key","value","def","forOfflineUse","dryRun","productModuleNumber","parameter","productModuleParameters","ValidationParameters_default"]} \ No newline at end of file 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 index b1d99b3..c0c5a58 100644 --- a/docs/client-demo.html +++ b/docs/client-demo.html @@ -3,7 +3,7 @@ Labs64 NetLicensing JavaScript Client Demo - +