[0-9]+)/.exec(cacheControl)?.groups
+ ?.maxAge;
+ if (maxAge) {
+ // Cache results with max-age (in seconds)
+ cacheAge = Number(maxAge) * 1000; // milliseconds
+ }
+ }
+ let certificates = {};
+ switch (format) {
+ case CertificateFormat.PEM:
+ certificates = res.data;
+ break;
+ case CertificateFormat.JWK:
+ for (const key of res.data.keys) {
+ certificates[key.kid] = key;
+ }
+ break;
+ default:
+ throw new Error(`Unsupported certificate format ${format}`);
+ }
+ const now = new Date();
+ this.certificateExpiry =
+ cacheAge === -1 ? null : new Date(now.getTime() + cacheAge);
+ this.certificateCache = certificates;
+ this.certificateCacheFormat = format;
+ return { certs: certificates, format, res };
+ }
+ getIapPublicKeys(callback) {
+ if (callback) {
+ this.getIapPublicKeysAsync().then(r => callback(null, r.pubkeys, r.res), callback);
+ }
+ else {
+ return this.getIapPublicKeysAsync();
+ }
+ }
+ async getIapPublicKeysAsync() {
+ let res;
+ const url = this.endpoints.oauth2IapPublicKeyUrl.toString();
+ try {
+ const opts = {
+ ...OAuth2Client.RETRY_CONFIG,
+ url,
+ };
+ authclient_1.AuthClient.setMethodName(opts, 'getIapPublicKeysAsync');
+ res = await this.transporter.request(opts);
+ }
+ catch (e) {
+ if (e instanceof Error) {
+ e.message = `Failed to retrieve verification certificates: ${e.message}`;
+ }
+ throw e;
+ }
+ return { pubkeys: res.data, res };
+ }
+ verifySignedJwtWithCerts() {
+ // To make the code compatible with browser SubtleCrypto we need to make
+ // this method async.
+ throw new Error('verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.');
+ }
+ /**
+ * Verify the id token is signed with the correct certificate
+ * and is from the correct audience.
+ * @param jwt The jwt to verify (The ID Token in this case).
+ * @param certs The array of certs to test the jwt against.
+ * @param requiredAudience The audience to test the jwt against.
+ * @param issuers The allowed issuers of the jwt (Optional).
+ * @param maxExpiry The max expiry the certificate can be (Optional).
+ * @return Returns a promise resolving to LoginTicket on verification.
+ */
+ async verifySignedJwtWithCertsAsync(jwt, certs, requiredAudience, issuers, maxExpiry) {
+ const crypto = (0, crypto_1.createCrypto)();
+ if (!maxExpiry) {
+ maxExpiry = OAuth2Client.DEFAULT_MAX_TOKEN_LIFETIME_SECS_;
+ }
+ const segments = jwt.split('.');
+ if (segments.length !== 3) {
+ throw new Error('Wrong number of segments in token: ' + jwt);
+ }
+ const signed = segments[0] + '.' + segments[1];
+ let signature = segments[2];
+ let envelope;
+ let payload;
+ try {
+ envelope = JSON.parse(crypto.decodeBase64StringUtf8(segments[0]));
+ }
+ catch (err) {
+ if (err instanceof Error) {
+ err.message = `Can't parse token envelope: ${segments[0]}': ${err.message}`;
+ }
+ throw err;
+ }
+ if (!envelope) {
+ throw new Error("Can't parse token envelope: " + segments[0]);
+ }
+ try {
+ payload = JSON.parse(crypto.decodeBase64StringUtf8(segments[1]));
+ }
+ catch (err) {
+ if (err instanceof Error) {
+ err.message = `Can't parse token payload '${segments[0]}`;
+ }
+ throw err;
+ }
+ if (!payload) {
+ throw new Error("Can't parse token payload: " + segments[1]);
+ }
+ if (!Object.prototype.hasOwnProperty.call(certs, envelope.kid)) {
+ // If this is not present, then there's no reason to attempt verification
+ throw new Error('No pem found for envelope: ' + JSON.stringify(envelope));
+ }
+ const cert = certs[envelope.kid];
+ if (envelope.alg === 'ES256') {
+ signature = formatEcdsa.joseToDer(signature, 'ES256').toString('base64');
+ }
+ const verified = await crypto.verify(cert, signed, signature);
+ if (!verified) {
+ throw new Error('Invalid token signature: ' + jwt);
+ }
+ if (!payload.iat) {
+ throw new Error('No issue time in token: ' + JSON.stringify(payload));
+ }
+ if (!payload.exp) {
+ throw new Error('No expiration time in token: ' + JSON.stringify(payload));
+ }
+ const iat = Number(payload.iat);
+ if (isNaN(iat))
+ throw new Error('iat field using invalid format');
+ const exp = Number(payload.exp);
+ if (isNaN(exp))
+ throw new Error('exp field using invalid format');
+ const now = new Date().getTime() / 1000;
+ if (exp >= now + maxExpiry) {
+ throw new Error('Expiration time too far in future: ' + JSON.stringify(payload));
+ }
+ const earliest = iat - OAuth2Client.CLOCK_SKEW_SECS_;
+ const latest = exp + OAuth2Client.CLOCK_SKEW_SECS_;
+ if (now < earliest) {
+ throw new Error('Token used too early, ' +
+ now +
+ ' < ' +
+ earliest +
+ ': ' +
+ JSON.stringify(payload));
+ }
+ if (now > latest) {
+ throw new Error('Token used too late, ' +
+ now +
+ ' > ' +
+ latest +
+ ': ' +
+ JSON.stringify(payload));
+ }
+ if (issuers && issuers.indexOf(payload.iss) < 0) {
+ throw new Error('Invalid issuer, expected one of [' +
+ issuers +
+ '], but got ' +
+ payload.iss);
+ }
+ // Check the audience matches if we have one
+ if (typeof requiredAudience !== 'undefined' && requiredAudience !== null) {
+ const aud = payload.aud;
+ let audVerified = false;
+ // If the requiredAudience is an array, check if it contains token
+ // audience
+ if (requiredAudience.constructor === Array) {
+ audVerified = requiredAudience.indexOf(aud) > -1;
+ }
+ else {
+ audVerified = aud === requiredAudience;
+ }
+ if (!audVerified) {
+ throw new Error('Wrong recipient, payload audience != requiredAudience');
+ }
+ }
+ return new loginticket_1.LoginTicket(envelope, payload);
+ }
+ /**
+ * Returns a promise that resolves with AccessTokenResponse type if
+ * refreshHandler is defined.
+ * If not, nothing is returned.
+ */
+ async processAndValidateRefreshHandler() {
+ if (this.refreshHandler) {
+ const accessTokenResponse = await this.refreshHandler();
+ if (!accessTokenResponse.access_token) {
+ throw new Error('No access token is returned by the refreshHandler callback.');
+ }
+ return accessTokenResponse;
+ }
+ return;
+ }
+ /**
+ * Returns true if a token is expired or will expire within
+ * eagerRefreshThresholdMillismilliseconds.
+ * If there is no expiry time, assumes the token is not expired or expiring.
+ */
+ isTokenExpiring() {
+ const expiryDate = this.credentials.expiry_date;
+ return expiryDate
+ ? expiryDate <= new Date().getTime() + this.eagerRefreshThresholdMillis
+ : false;
+ }
+}
+exports.OAuth2Client = OAuth2Client;
+//# sourceMappingURL=oauth2client.js.map
+
+/***/ }),
+
+/***/ 30069:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2021 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.OAuthClientAuthHandler = void 0;
+exports.getErrorFromOAuthErrorResponse = getErrorFromOAuthErrorResponse;
+const gaxios_1 = __webpack_require__(10627);
+const crypto_1 = __webpack_require__(6123);
+/** List of HTTP methods that accept request bodies. */
+const METHODS_SUPPORTING_REQUEST_BODY = ['PUT', 'POST', 'PATCH'];
+/**
+ * Abstract class for handling client authentication in OAuth-based
+ * operations.
+ * When request-body client authentication is used, only application/json and
+ * application/x-www-form-urlencoded content types for HTTP methods that support
+ * request bodies are supported.
+ */
+class OAuthClientAuthHandler {
+ #crypto = (0, crypto_1.createCrypto)();
+ #clientAuthentication;
+ transporter;
+ /**
+ * Instantiates an OAuth client authentication handler.
+ * @param options The OAuth Client Auth Handler instance options. Passing an `ClientAuthentication` directly is **@DEPRECATED**.
+ */
+ constructor(options) {
+ if (options && 'clientId' in options) {
+ this.#clientAuthentication = options;
+ this.transporter = new gaxios_1.Gaxios();
+ }
+ else {
+ this.#clientAuthentication = options?.clientAuthentication;
+ this.transporter = options?.transporter || new gaxios_1.Gaxios();
+ }
+ }
+ /**
+ * Applies client authentication on the OAuth request's headers or POST
+ * body but does not process the request.
+ * @param opts The GaxiosOptions whose headers or data are to be modified
+ * depending on the client authentication mechanism to be used.
+ * @param bearerToken The optional bearer token to use for authentication.
+ * When this is used, no client authentication credentials are needed.
+ */
+ applyClientAuthenticationOptions(opts, bearerToken) {
+ opts.headers = gaxios_1.Gaxios.mergeHeaders(opts.headers);
+ // Inject authenticated header.
+ this.injectAuthenticatedHeaders(opts, bearerToken);
+ // Inject authenticated request body.
+ if (!bearerToken) {
+ this.injectAuthenticatedRequestBody(opts);
+ }
+ }
+ /**
+ * Applies client authentication on the request's header if either
+ * basic authentication or bearer token authentication is selected.
+ *
+ * @param opts The GaxiosOptions whose headers or data are to be modified
+ * depending on the client authentication mechanism to be used.
+ * @param bearerToken The optional bearer token to use for authentication.
+ * When this is used, no client authentication credentials are needed.
+ */
+ injectAuthenticatedHeaders(opts, bearerToken) {
+ // Bearer token prioritized higher than basic Auth.
+ if (bearerToken) {
+ opts.headers = gaxios_1.Gaxios.mergeHeaders(opts.headers, {
+ authorization: `Bearer ${bearerToken}`,
+ });
+ }
+ else if (this.#clientAuthentication?.confidentialClientType === 'basic') {
+ opts.headers = gaxios_1.Gaxios.mergeHeaders(opts.headers);
+ const clientId = this.#clientAuthentication.clientId;
+ const clientSecret = this.#clientAuthentication.clientSecret || '';
+ const base64EncodedCreds = this.#crypto.encodeBase64StringUtf8(`${clientId}:${clientSecret}`);
+ gaxios_1.Gaxios.mergeHeaders(opts.headers, {
+ authorization: `Basic ${base64EncodedCreds}`,
+ });
+ }
+ }
+ /**
+ * Applies client authentication on the request's body if request-body
+ * client authentication is selected.
+ *
+ * @param opts The GaxiosOptions whose headers or data are to be modified
+ * depending on the client authentication mechanism to be used.
+ */
+ injectAuthenticatedRequestBody(opts) {
+ if (this.#clientAuthentication?.confidentialClientType === 'request-body') {
+ const method = (opts.method || 'GET').toUpperCase();
+ if (!METHODS_SUPPORTING_REQUEST_BODY.includes(method)) {
+ throw new Error(`${method} HTTP method does not support ` +
+ `${this.#clientAuthentication.confidentialClientType} ` +
+ 'client authentication');
+ }
+ // Get content-type
+ const headers = new Headers(opts.headers);
+ const contentType = headers.get('content-type');
+ // Inject authenticated request body
+ if (contentType?.startsWith('application/x-www-form-urlencoded') ||
+ opts.data instanceof URLSearchParams) {
+ const data = new URLSearchParams(opts.data ?? '');
+ data.append('client_id', this.#clientAuthentication.clientId);
+ data.append('client_secret', this.#clientAuthentication.clientSecret || '');
+ opts.data = data;
+ }
+ else if (contentType?.startsWith('application/json')) {
+ opts.data = opts.data || {};
+ Object.assign(opts.data, {
+ client_id: this.#clientAuthentication.clientId,
+ client_secret: this.#clientAuthentication.clientSecret || '',
+ });
+ }
+ else {
+ throw new Error(`${contentType} content-types are not supported with ` +
+ `${this.#clientAuthentication.confidentialClientType} ` +
+ 'client authentication');
+ }
+ }
+ }
+ /**
+ * Retry config for Auth-related requests.
+ *
+ * @remarks
+ *
+ * This is not a part of the default {@link AuthClient.transporter transporter/gaxios}
+ * config as some downstream APIs would prefer if customers explicitly enable retries,
+ * such as GCS.
+ */
+ static get RETRY_CONFIG() {
+ return {
+ retry: true,
+ retryConfig: {
+ httpMethodsToRetry: ['GET', 'PUT', 'POST', 'HEAD', 'OPTIONS', 'DELETE'],
+ },
+ };
+ }
+}
+exports.OAuthClientAuthHandler = OAuthClientAuthHandler;
+/**
+ * Converts an OAuth error response to a native JavaScript Error.
+ * @param resp The OAuth error response to convert to a native Error object.
+ * @param err The optional original error. If provided, the error properties
+ * will be copied to the new error.
+ * @return The converted native Error object.
+ */
+function getErrorFromOAuthErrorResponse(resp, err) {
+ // Error response.
+ const errorCode = resp.error;
+ const errorDescription = resp.error_description;
+ const errorUri = resp.error_uri;
+ let message = `Error code ${errorCode}`;
+ if (typeof errorDescription !== 'undefined') {
+ message += `: ${errorDescription}`;
+ }
+ if (typeof errorUri !== 'undefined') {
+ message += ` - ${errorUri}`;
+ }
+ const newError = new Error(message);
+ // Copy properties from original error to newly generated error.
+ if (err) {
+ const keys = Object.keys(err);
+ if (err.stack) {
+ // Copy error.stack if available.
+ keys.push('stack');
+ }
+ keys.forEach(key => {
+ // Do not overwrite the message field.
+ if (key !== 'message') {
+ Object.defineProperty(newError, key, {
+ value: err[key],
+ writable: false,
+ enumerable: true,
+ });
+ }
+ });
+ }
+ return newError;
+}
+//# sourceMappingURL=oauth2common.js.map
+
+/***/ }),
+
+/***/ 54949:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2024 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.PassThroughClient = void 0;
+const authclient_1 = __webpack_require__(82594);
+/**
+ * An AuthClient without any Authentication information. Useful for:
+ * - Anonymous access
+ * - Local Emulators
+ * - Testing Environments
+ *
+ */
+class PassThroughClient extends authclient_1.AuthClient {
+ /**
+ * Creates a request without any authentication headers or checks.
+ *
+ * @remarks
+ *
+ * In testing environments it may be useful to change the provided
+ * {@link AuthClient.transporter} for any desired request overrides/handling.
+ *
+ * @param opts
+ * @returns The response of the request.
+ */
+ async request(opts) {
+ return this.transporter.request(opts);
+ }
+ /**
+ * A required method of the base class.
+ * Always will return an empty object.
+ *
+ * @returns {}
+ */
+ async getAccessToken() {
+ return {};
+ }
+ /**
+ * A required method of the base class.
+ * Always will return an empty object.
+ *
+ * @returns {}
+ */
+ async getRequestHeaders() {
+ return new Headers();
+ }
+}
+exports.PassThroughClient = PassThroughClient;
+//# sourceMappingURL=passthrough.js.map
+
+/***/ }),
+
+/***/ 35189:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.PluggableAuthClient = exports.ExecutableError = void 0;
+const baseexternalclient_1 = __webpack_require__(89046);
+const executable_response_1 = __webpack_require__(69079);
+const pluggable_auth_handler_1 = __webpack_require__(80212);
+var pluggable_auth_handler_2 = __webpack_require__(80212);
+Object.defineProperty(exports, "ExecutableError", ({ enumerable: true, get: function () { return pluggable_auth_handler_2.ExecutableError; } }));
+/**
+ * The default executable timeout when none is provided, in milliseconds.
+ */
+const DEFAULT_EXECUTABLE_TIMEOUT_MILLIS = 30 * 1000;
+/**
+ * The minimum allowed executable timeout in milliseconds.
+ */
+const MINIMUM_EXECUTABLE_TIMEOUT_MILLIS = 5 * 1000;
+/**
+ * The maximum allowed executable timeout in milliseconds.
+ */
+const MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS = 120 * 1000;
+/**
+ * The environment variable to check to see if executable can be run.
+ * Value must be set to '1' for the executable to run.
+ */
+const GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES = 'GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES';
+/**
+ * The maximum currently supported executable version.
+ */
+const MAXIMUM_EXECUTABLE_VERSION = 1;
+/**
+ * PluggableAuthClient enables the exchange of workload identity pool external credentials for
+ * Google access tokens by retrieving 3rd party tokens through a user supplied executable. These
+ * scripts/executables are completely independent of the Google Cloud Auth libraries. These
+ * credentials plug into ADC and will call the specified executable to retrieve the 3rd party token
+ * to be exchanged for a Google access token.
+ *
+ * To use these credentials, the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment variable
+ * must be set to '1'. This is for security reasons.
+ *
+ *
Both OIDC and SAML are supported. The executable must adhere to a specific response format
+ * defined below.
+ *
+ *
The executable must print out the 3rd party token to STDOUT in JSON format. When an
+ * output_file is specified in the credential configuration, the executable must also handle writing the
+ * JSON response to this file.
+ *
+ *
+ * OIDC response sample:
+ * {
+ * "version": 1,
+ * "success": true,
+ * "token_type": "urn:ietf:params:oauth:token-type:id_token",
+ * "id_token": "HEADER.PAYLOAD.SIGNATURE",
+ * "expiration_time": 1620433341
+ * }
+ *
+ * SAML2 response sample:
+ * {
+ * "version": 1,
+ * "success": true,
+ * "token_type": "urn:ietf:params:oauth:token-type:saml2",
+ * "saml_response": "...",
+ * "expiration_time": 1620433341
+ * }
+ *
+ * Error response sample:
+ * {
+ * "version": 1,
+ * "success": false,
+ * "code": "401",
+ * "message": "Error message."
+ * }
+ *
+ *
+ * The "expiration_time" field in the JSON response is only required for successful
+ * responses when an output file was specified in the credential configuration
+ *
+ *
The auth libraries will populate certain environment variables that will be accessible by the
+ * executable, such as: GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE, GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE,
+ * GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE, GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL, and
+ * GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE.
+ *
+ *
Please see this repositories README for a complete executable request/response specification.
+ */
+class PluggableAuthClient extends baseexternalclient_1.BaseExternalAccountClient {
+ /**
+ * The command used to retrieve the third party token.
+ */
+ command;
+ /**
+ * The timeout in milliseconds for running executable,
+ * set to default if none provided.
+ */
+ timeoutMillis;
+ /**
+ * The path to file to check for cached executable response.
+ */
+ outputFile;
+ /**
+ * Executable and output file handler.
+ */
+ handler;
+ /**
+ * Instantiates a PluggableAuthClient instance using the provided JSON
+ * object loaded from an external account credentials file.
+ * An error is thrown if the credential is not a valid pluggable auth credential.
+ * @param options The external account options object typically loaded from
+ * the external account JSON credential file.
+ */
+ constructor(options) {
+ super(options);
+ if (!options.credential_source.executable) {
+ throw new Error('No valid Pluggable Auth "credential_source" provided.');
+ }
+ this.command = options.credential_source.executable.command;
+ if (!this.command) {
+ throw new Error('No valid Pluggable Auth "credential_source" provided.');
+ }
+ // Check if the provided timeout exists and if it is valid.
+ if (options.credential_source.executable.timeout_millis === undefined) {
+ this.timeoutMillis = DEFAULT_EXECUTABLE_TIMEOUT_MILLIS;
+ }
+ else {
+ this.timeoutMillis = options.credential_source.executable.timeout_millis;
+ if (this.timeoutMillis < MINIMUM_EXECUTABLE_TIMEOUT_MILLIS ||
+ this.timeoutMillis > MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS) {
+ throw new Error(`Timeout must be between ${MINIMUM_EXECUTABLE_TIMEOUT_MILLIS} and ` +
+ `${MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS} milliseconds.`);
+ }
+ }
+ this.outputFile = options.credential_source.executable.output_file;
+ this.handler = new pluggable_auth_handler_1.PluggableAuthHandler({
+ command: this.command,
+ timeoutMillis: this.timeoutMillis,
+ outputFile: this.outputFile,
+ });
+ this.credentialSourceType = 'executable';
+ }
+ /**
+ * Triggered when an external subject token is needed to be exchanged for a
+ * GCP access token via GCP STS endpoint.
+ * This uses the `options.credential_source` object to figure out how
+ * to retrieve the token using the current environment. In this case,
+ * this calls a user provided executable which returns the subject token.
+ * The logic is summarized as:
+ * 1. Validated that the executable is allowed to run. The
+ * GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment must be set to
+ * 1 for security reasons.
+ * 2. If an output file is specified by the user, check the file location
+ * for a response. If the file exists and contains a valid response,
+ * return the subject token from the file.
+ * 3. Call the provided executable and return response.
+ * @return A promise that resolves with the external subject token.
+ */
+ async retrieveSubjectToken() {
+ // Check if the executable is allowed to run.
+ if (process.env[GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES] !== '1') {
+ throw new Error('Pluggable Auth executables need to be explicitly allowed to run by ' +
+ 'setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment ' +
+ 'Variable to 1.');
+ }
+ let executableResponse = undefined;
+ // Try to get cached executable response from output file.
+ if (this.outputFile) {
+ executableResponse = await this.handler.retrieveCachedResponse();
+ }
+ // If no response from output file, call the executable.
+ if (!executableResponse) {
+ // Set up environment map with required values for the executable.
+ const envMap = new Map();
+ envMap.set('GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE', this.audience);
+ envMap.set('GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE', this.subjectTokenType);
+ // Always set to 0 because interactive mode is not supported.
+ envMap.set('GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE', '0');
+ if (this.outputFile) {
+ envMap.set('GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE', this.outputFile);
+ }
+ const serviceAccountEmail = this.getServiceAccountEmail();
+ if (serviceAccountEmail) {
+ envMap.set('GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL', serviceAccountEmail);
+ }
+ executableResponse =
+ await this.handler.retrieveResponseFromExecutable(envMap);
+ }
+ if (executableResponse.version > MAXIMUM_EXECUTABLE_VERSION) {
+ throw new Error(`Version of executable is not currently supported, maximum supported version is ${MAXIMUM_EXECUTABLE_VERSION}.`);
+ }
+ // Check that response was successful.
+ if (!executableResponse.success) {
+ throw new pluggable_auth_handler_1.ExecutableError(executableResponse.errorMessage, executableResponse.errorCode);
+ }
+ // Check that response contains expiration time if output file was specified.
+ if (this.outputFile) {
+ if (!executableResponse.expirationTime) {
+ throw new executable_response_1.InvalidExpirationTimeFieldError('The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.');
+ }
+ }
+ // Check that response is not expired.
+ if (executableResponse.isExpired()) {
+ throw new Error('Executable response is expired.');
+ }
+ // Return subject token from response.
+ return executableResponse.subjectToken;
+ }
+}
+exports.PluggableAuthClient = PluggableAuthClient;
+//# sourceMappingURL=pluggable-auth-client.js.map
+
+/***/ }),
+
+/***/ 80212:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.PluggableAuthHandler = exports.ExecutableError = void 0;
+const executable_response_1 = __webpack_require__(69079);
+const childProcess = __webpack_require__(35317);
+const fs = __webpack_require__(79896);
+/**
+ * Error thrown from the executable run by PluggableAuthClient.
+ */
+class ExecutableError extends Error {
+ /**
+ * The exit code returned by the executable.
+ */
+ code;
+ constructor(message, code) {
+ super(`The executable failed with exit code: ${code} and error message: ${message}.`);
+ this.code = code;
+ Object.setPrototypeOf(this, new.target.prototype);
+ }
+}
+exports.ExecutableError = ExecutableError;
+/**
+ * A handler used to retrieve 3rd party token responses from user defined
+ * executables and cached file output for the PluggableAuthClient class.
+ */
+class PluggableAuthHandler {
+ commandComponents;
+ timeoutMillis;
+ outputFile;
+ /**
+ * Instantiates a PluggableAuthHandler instance using the provided
+ * PluggableAuthHandlerOptions object.
+ */
+ constructor(options) {
+ if (!options.command) {
+ throw new Error('No command provided.');
+ }
+ this.commandComponents = PluggableAuthHandler.parseCommand(options.command);
+ this.timeoutMillis = options.timeoutMillis;
+ if (!this.timeoutMillis) {
+ throw new Error('No timeoutMillis provided.');
+ }
+ this.outputFile = options.outputFile;
+ }
+ /**
+ * Calls user provided executable to get a 3rd party subject token and
+ * returns the response.
+ * @param envMap a Map of additional Environment Variables required for
+ * the executable.
+ * @return A promise that resolves with the executable response.
+ */
+ retrieveResponseFromExecutable(envMap) {
+ return new Promise((resolve, reject) => {
+ // Spawn process to run executable using added environment variables.
+ const child = childProcess.spawn(this.commandComponents[0], this.commandComponents.slice(1), {
+ env: { ...process.env, ...Object.fromEntries(envMap) },
+ });
+ let output = '';
+ // Append stdout to output as executable runs.
+ child.stdout.on('data', (data) => {
+ output += data;
+ });
+ // Append stderr as executable runs.
+ child.stderr.on('data', (err) => {
+ output += err;
+ });
+ // Set up a timeout to end the child process and throw an error.
+ const timeout = setTimeout(() => {
+ // Kill child process and remove listeners so 'close' event doesn't get
+ // read after child process is killed.
+ child.removeAllListeners();
+ child.kill();
+ return reject(new Error('The executable failed to finish within the timeout specified.'));
+ }, this.timeoutMillis);
+ child.on('close', (code) => {
+ // Cancel timeout if executable closes before timeout is reached.
+ clearTimeout(timeout);
+ if (code === 0) {
+ // If the executable completed successfully, try to return the parsed response.
+ try {
+ const responseJson = JSON.parse(output);
+ const response = new executable_response_1.ExecutableResponse(responseJson);
+ return resolve(response);
+ }
+ catch (error) {
+ if (error instanceof executable_response_1.ExecutableResponseError) {
+ return reject(error);
+ }
+ return reject(new executable_response_1.ExecutableResponseError(`The executable returned an invalid response: ${output}`));
+ }
+ }
+ else {
+ return reject(new ExecutableError(output, code.toString()));
+ }
+ });
+ });
+ }
+ /**
+ * Checks user provided output file for response from previous run of
+ * executable and return the response if it exists, is formatted correctly, and is not expired.
+ */
+ async retrieveCachedResponse() {
+ if (!this.outputFile || this.outputFile.length === 0) {
+ return undefined;
+ }
+ let filePath;
+ try {
+ filePath = await fs.promises.realpath(this.outputFile);
+ }
+ catch {
+ // If file path cannot be resolved, return undefined.
+ return undefined;
+ }
+ if (!(await fs.promises.lstat(filePath)).isFile()) {
+ // If path does not lead to file, return undefined.
+ return undefined;
+ }
+ const responseString = await fs.promises.readFile(filePath, {
+ encoding: 'utf8',
+ });
+ if (responseString === '') {
+ return undefined;
+ }
+ try {
+ const responseJson = JSON.parse(responseString);
+ const response = new executable_response_1.ExecutableResponse(responseJson);
+ // Check if response is successful and unexpired.
+ if (response.isValid()) {
+ return new executable_response_1.ExecutableResponse(responseJson);
+ }
+ return undefined;
+ }
+ catch (error) {
+ if (error instanceof executable_response_1.ExecutableResponseError) {
+ throw error;
+ }
+ throw new executable_response_1.ExecutableResponseError(`The output file contained an invalid response: ${responseString}`);
+ }
+ }
+ /**
+ * Parses given command string into component array, splitting on spaces unless
+ * spaces are between quotation marks.
+ */
+ static parseCommand(command) {
+ // Split the command into components by splitting on spaces,
+ // unless spaces are contained in quotation marks.
+ const components = command.match(/(?:[^\s"]+|"[^"]*")+/g);
+ if (!components) {
+ throw new Error(`Provided command: "${command}" could not be parsed.`);
+ }
+ // Remove quotation marks from the beginning and end of each component if they are present.
+ for (let i = 0; i < components.length; i++) {
+ if (components[i][0] === '"' && components[i].slice(-1) === '"') {
+ components[i] = components[i].slice(1, -1);
+ }
+ }
+ return components;
+ }
+}
+exports.PluggableAuthHandler = PluggableAuthHandler;
+//# sourceMappingURL=pluggable-auth-handler.js.map
+
+/***/ }),
+
+/***/ 16983:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2015 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.UserRefreshClient = exports.USER_REFRESH_ACCOUNT_TYPE = void 0;
+const oauth2client_1 = __webpack_require__(64739);
+const authclient_1 = __webpack_require__(82594);
+exports.USER_REFRESH_ACCOUNT_TYPE = 'authorized_user';
+class UserRefreshClient extends oauth2client_1.OAuth2Client {
+ // TODO: refactor tests to make this private
+ // In a future gts release, the _propertyName rule will be lifted.
+ // This is also a hard one because `this.refreshToken` is a function.
+ _refreshToken;
+ /**
+ * The User Refresh Token client.
+ *
+ * @param optionsOrClientId The User Refresh Token client options. Passing an `clientId` directly is **@DEPRECATED**.
+ * @param clientSecret **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead.
+ * @param refreshToken **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead.
+ * @param eagerRefreshThresholdMillis **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead.
+ * @param forceRefreshOnFailure **@DEPRECATED**. Provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead.
+ */
+ constructor(optionsOrClientId,
+ /**
+ * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead
+ */
+ clientSecret,
+ /**
+ * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead
+ */
+ refreshToken,
+ /**
+ * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead
+ */
+ eagerRefreshThresholdMillis,
+ /**
+ * @deprecated - provide a {@link UserRefreshClientOptions `UserRefreshClientOptions`} object in the first parameter instead
+ */
+ forceRefreshOnFailure) {
+ const opts = optionsOrClientId && typeof optionsOrClientId === 'object'
+ ? optionsOrClientId
+ : {
+ clientId: optionsOrClientId,
+ clientSecret,
+ refreshToken,
+ eagerRefreshThresholdMillis,
+ forceRefreshOnFailure,
+ };
+ super(opts);
+ this._refreshToken = opts.refreshToken;
+ this.credentials.refresh_token = opts.refreshToken;
+ }
+ /**
+ * Refreshes the access token.
+ * @param refreshToken An ignored refreshToken..
+ * @param callback Optional callback.
+ */
+ async refreshTokenNoCache() {
+ return super.refreshTokenNoCache(this._refreshToken);
+ }
+ async fetchIdToken(targetAudience) {
+ const opts = {
+ ...UserRefreshClient.RETRY_CONFIG,
+ url: this.endpoints.oauth2TokenUrl,
+ method: 'POST',
+ data: new URLSearchParams({
+ client_id: this._clientId,
+ client_secret: this._clientSecret,
+ grant_type: 'refresh_token',
+ refresh_token: this._refreshToken,
+ target_audience: targetAudience,
+ }),
+ responseType: 'json',
+ };
+ authclient_1.AuthClient.setMethodName(opts, 'fetchIdToken');
+ const res = await this.transporter.request(opts);
+ return res.data.id_token;
+ }
+ /**
+ * Create a UserRefreshClient credentials instance using the given input
+ * options.
+ * @param json The input object.
+ */
+ fromJSON(json) {
+ if (!json) {
+ throw new Error('Must pass in a JSON object containing the user refresh token');
+ }
+ if (json.type !== 'authorized_user') {
+ throw new Error('The incoming JSON object does not have the "authorized_user" type');
+ }
+ if (!json.client_id) {
+ throw new Error('The incoming JSON object does not contain a client_id field');
+ }
+ if (!json.client_secret) {
+ throw new Error('The incoming JSON object does not contain a client_secret field');
+ }
+ if (!json.refresh_token) {
+ throw new Error('The incoming JSON object does not contain a refresh_token field');
+ }
+ this._clientId = json.client_id;
+ this._clientSecret = json.client_secret;
+ this._refreshToken = json.refresh_token;
+ this.credentials.refresh_token = json.refresh_token;
+ this.quotaProjectId = json.quota_project_id;
+ this.universeDomain = json.universe_domain || this.universeDomain;
+ }
+ fromStream(inputStream, callback) {
+ if (callback) {
+ this.fromStreamAsync(inputStream).then(() => callback(), callback);
+ }
+ else {
+ return this.fromStreamAsync(inputStream);
+ }
+ }
+ async fromStreamAsync(inputStream) {
+ return new Promise((resolve, reject) => {
+ if (!inputStream) {
+ return reject(new Error('Must pass in a stream containing the user refresh token.'));
+ }
+ let s = '';
+ inputStream
+ .setEncoding('utf8')
+ .on('error', reject)
+ .on('data', chunk => (s += chunk))
+ .on('end', () => {
+ try {
+ const data = JSON.parse(s);
+ this.fromJSON(data);
+ return resolve();
+ }
+ catch (err) {
+ return reject(err);
+ }
+ });
+ });
+ }
+ /**
+ * Create a UserRefreshClient credentials instance using the given input
+ * options.
+ * @param json The input object.
+ */
+ static fromJSON(json) {
+ const client = new UserRefreshClient();
+ client.fromJSON(json);
+ return client;
+ }
+}
+exports.UserRefreshClient = UserRefreshClient;
+//# sourceMappingURL=refreshclient.js.map
+
+/***/ }),
+
+/***/ 51537:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2021 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.StsCredentials = void 0;
+const gaxios_1 = __webpack_require__(10627);
+const authclient_1 = __webpack_require__(82594);
+const oauth2common_1 = __webpack_require__(30069);
+const util_1 = __webpack_require__(84358);
+/**
+ * Implements the OAuth 2.0 token exchange based on
+ * https://tools.ietf.org/html/rfc8693
+ */
+class StsCredentials extends oauth2common_1.OAuthClientAuthHandler {
+ #tokenExchangeEndpoint;
+ /**
+ * Initializes an STS credentials instance.
+ *
+ * @param options The STS credentials instance options. Passing an `tokenExchangeEndpoint` directly is **@DEPRECATED**.
+ * @param clientAuthentication **@DEPRECATED**. Provide a {@link StsCredentialsConstructionOptions `StsCredentialsConstructionOptions`} object in the first parameter instead.
+ */
+ constructor(options = {
+ tokenExchangeEndpoint: '',
+ },
+ /**
+ * @deprecated - provide a {@link StsCredentialsConstructionOptions `StsCredentialsConstructionOptions`} object in the first parameter instead
+ */
+ clientAuthentication) {
+ if (typeof options !== 'object' || options instanceof URL) {
+ options = {
+ tokenExchangeEndpoint: options,
+ clientAuthentication,
+ };
+ }
+ super(options);
+ this.#tokenExchangeEndpoint = options.tokenExchangeEndpoint;
+ }
+ /**
+ * Exchanges the provided token for another type of token based on the
+ * rfc8693 spec.
+ * @param stsCredentialsOptions The token exchange options used to populate
+ * the token exchange request.
+ * @param additionalHeaders Optional additional headers to pass along the
+ * request.
+ * @param options Optional additional GCP-specific non-spec defined options
+ * to send with the request.
+ * Example: `&options=${encodeUriComponent(JSON.stringified(options))}`
+ * @return A promise that resolves with the token exchange response containing
+ * the requested token and its expiration time.
+ */
+ async exchangeToken(stsCredentialsOptions, headers, options) {
+ const values = {
+ grant_type: stsCredentialsOptions.grantType,
+ resource: stsCredentialsOptions.resource,
+ audience: stsCredentialsOptions.audience,
+ scope: stsCredentialsOptions.scope?.join(' '),
+ requested_token_type: stsCredentialsOptions.requestedTokenType,
+ subject_token: stsCredentialsOptions.subjectToken,
+ subject_token_type: stsCredentialsOptions.subjectTokenType,
+ actor_token: stsCredentialsOptions.actingParty?.actorToken,
+ actor_token_type: stsCredentialsOptions.actingParty?.actorTokenType,
+ // Non-standard GCP-specific options.
+ options: options && JSON.stringify(options),
+ };
+ const opts = {
+ ...StsCredentials.RETRY_CONFIG,
+ url: this.#tokenExchangeEndpoint.toString(),
+ method: 'POST',
+ headers,
+ data: new URLSearchParams((0, util_1.removeUndefinedValuesInObject)(values)),
+ responseType: 'json',
+ };
+ authclient_1.AuthClient.setMethodName(opts, 'exchangeToken');
+ // Apply OAuth client authentication.
+ this.applyClientAuthenticationOptions(opts);
+ try {
+ const response = await this.transporter.request(opts);
+ // Successful response.
+ const stsSuccessfulResponse = response.data;
+ stsSuccessfulResponse.res = response;
+ return stsSuccessfulResponse;
+ }
+ catch (error) {
+ // Translate error to OAuthError.
+ if (error instanceof gaxios_1.GaxiosError && error.response) {
+ throw (0, oauth2common_1.getErrorFromOAuthErrorResponse)(error.response.data,
+ // Preserve other fields from the original error.
+ error);
+ }
+ // Request could fail before the server responds.
+ throw error;
+ }
+ }
+}
+exports.StsCredentials = StsCredentials;
+//# sourceMappingURL=stscredentials.js.map
+
+/***/ }),
+
+/***/ 44571:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2024 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.UrlSubjectTokenSupplier = void 0;
+const authclient_1 = __webpack_require__(82594);
+/**
+ * Internal subject token supplier implementation used when a URL
+ * is configured in the credential configuration used to build an {@link IdentityPoolClient}
+ */
+class UrlSubjectTokenSupplier {
+ url;
+ headers;
+ formatType;
+ subjectTokenFieldName;
+ additionalGaxiosOptions;
+ /**
+ * Instantiates a URL subject token supplier.
+ * @param opts The URL subject token supplier options to build the supplier with.
+ */
+ constructor(opts) {
+ this.url = opts.url;
+ this.formatType = opts.formatType;
+ this.subjectTokenFieldName = opts.subjectTokenFieldName;
+ this.headers = opts.headers;
+ this.additionalGaxiosOptions = opts.additionalGaxiosOptions;
+ }
+ /**
+ * Sends a GET request to the URL provided in the constructor and resolves
+ * with the returned external subject token.
+ * @param context {@link ExternalAccountSupplierContext} from the calling
+ * {@link IdentityPoolClient}, contains the requested audience and subject
+ * token type for the external account identity. Not used.
+ */
+ async getSubjectToken(context) {
+ const opts = {
+ ...this.additionalGaxiosOptions,
+ url: this.url,
+ method: 'GET',
+ headers: this.headers,
+ responseType: this.formatType,
+ };
+ authclient_1.AuthClient.setMethodName(opts, 'getSubjectToken');
+ let subjectToken;
+ if (this.formatType === 'text') {
+ const response = await context.transporter.request(opts);
+ subjectToken = response.data;
+ }
+ else if (this.formatType === 'json' && this.subjectTokenFieldName) {
+ const response = await context.transporter.request(opts);
+ subjectToken = response.data[this.subjectTokenFieldName];
+ }
+ if (!subjectToken) {
+ throw new Error('Unable to parse the subject_token from the credential_source URL');
+ }
+ return subjectToken;
+ }
+}
+exports.UrlSubjectTokenSupplier = UrlSubjectTokenSupplier;
+//# sourceMappingURL=urlsubjecttokensupplier.js.map
+
+/***/ }),
+
+/***/ 72278:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2019 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+/* global window */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.BrowserCrypto = void 0;
+// This file implements crypto functions we need using in-browser
+// SubtleCrypto interface `window.crypto.subtle`.
+const base64js = __webpack_require__(29872);
+const shared_1 = __webpack_require__(61927);
+class BrowserCrypto {
+ constructor() {
+ if (typeof window === 'undefined' ||
+ window.crypto === undefined ||
+ window.crypto.subtle === undefined) {
+ throw new Error("SubtleCrypto not found. Make sure it's an https:// website.");
+ }
+ }
+ async sha256DigestBase64(str) {
+ // SubtleCrypto digest() method is async, so we must make
+ // this method async as well.
+ // To calculate SHA256 digest using SubtleCrypto, we first
+ // need to convert an input string to an ArrayBuffer:
+ const inputBuffer = new TextEncoder().encode(str);
+ // Result is ArrayBuffer as well.
+ const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer);
+ return base64js.fromByteArray(new Uint8Array(outputBuffer));
+ }
+ randomBytesBase64(count) {
+ const array = new Uint8Array(count);
+ window.crypto.getRandomValues(array);
+ return base64js.fromByteArray(array);
+ }
+ static padBase64(base64) {
+ // base64js requires padding, so let's add some '='
+ while (base64.length % 4 !== 0) {
+ base64 += '=';
+ }
+ return base64;
+ }
+ async verify(pubkey, data, signature) {
+ const algo = {
+ name: 'RSASSA-PKCS1-v1_5',
+ hash: { name: 'SHA-256' },
+ };
+ const dataArray = new TextEncoder().encode(data);
+ const signatureArray = base64js.toByteArray(BrowserCrypto.padBase64(signature));
+ const cryptoKey = await window.crypto.subtle.importKey('jwk', pubkey, algo, true, ['verify']);
+ // SubtleCrypto's verify method is async so we must make
+ // this method async as well.
+ const result = await window.crypto.subtle.verify(algo, cryptoKey, Buffer.from(signatureArray), dataArray);
+ return result;
+ }
+ async sign(privateKey, data) {
+ const algo = {
+ name: 'RSASSA-PKCS1-v1_5',
+ hash: { name: 'SHA-256' },
+ };
+ const dataArray = new TextEncoder().encode(data);
+ const cryptoKey = await window.crypto.subtle.importKey('jwk', privateKey, algo, true, ['sign']);
+ // SubtleCrypto's sign method is async so we must make
+ // this method async as well.
+ const result = await window.crypto.subtle.sign(algo, cryptoKey, dataArray);
+ return base64js.fromByteArray(new Uint8Array(result));
+ }
+ decodeBase64StringUtf8(base64) {
+ const uint8array = base64js.toByteArray(BrowserCrypto.padBase64(base64));
+ const result = new TextDecoder().decode(uint8array);
+ return result;
+ }
+ encodeBase64StringUtf8(text) {
+ const uint8array = new TextEncoder().encode(text);
+ const result = base64js.fromByteArray(uint8array);
+ return result;
+ }
+ /**
+ * Computes the SHA-256 hash of the provided string.
+ * @param str The plain text string to hash.
+ * @return A promise that resolves with the SHA-256 hash of the provided
+ * string in hexadecimal encoding.
+ */
+ async sha256DigestHex(str) {
+ // SubtleCrypto digest() method is async, so we must make
+ // this method async as well.
+ // To calculate SHA256 digest using SubtleCrypto, we first
+ // need to convert an input string to an ArrayBuffer:
+ const inputBuffer = new TextEncoder().encode(str);
+ // Result is ArrayBuffer as well.
+ const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer);
+ return (0, shared_1.fromArrayBufferToHex)(outputBuffer);
+ }
+ /**
+ * Computes the HMAC hash of a message using the provided crypto key and the
+ * SHA-256 algorithm.
+ * @param key The secret crypto key in utf-8 or ArrayBuffer format.
+ * @param msg The plain text message.
+ * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer
+ * format.
+ */
+ async signWithHmacSha256(key, msg) {
+ // Convert key, if provided in ArrayBuffer format, to string.
+ const rawKey = typeof key === 'string'
+ ? key
+ : String.fromCharCode(...new Uint16Array(key));
+ const enc = new TextEncoder();
+ const cryptoKey = await window.crypto.subtle.importKey('raw', enc.encode(rawKey), {
+ name: 'HMAC',
+ hash: {
+ name: 'SHA-256',
+ },
+ }, false, ['sign']);
+ return window.crypto.subtle.sign('HMAC', cryptoKey, enc.encode(msg));
+ }
+}
+exports.BrowserCrypto = BrowserCrypto;
+//# sourceMappingURL=crypto.js.map
+
+/***/ }),
+
+/***/ 6123:
+/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
+
+
+// Copyright 2019 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+/* global window */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.createCrypto = createCrypto;
+exports.hasBrowserCrypto = hasBrowserCrypto;
+const crypto_1 = __webpack_require__(72278);
+const crypto_2 = __webpack_require__(89396);
+__exportStar(__webpack_require__(61927), exports);
+// Crypto interface will provide required crypto functions.
+// Use `createCrypto()` factory function to create an instance
+// of Crypto. It will either use Node.js `crypto` module, or
+// use browser's SubtleCrypto interface. Since most of the
+// SubtleCrypto methods return promises, we must make those
+// methods return promises here as well, even though in Node.js
+// they are synchronous.
+function createCrypto() {
+ if (hasBrowserCrypto()) {
+ return new crypto_1.BrowserCrypto();
+ }
+ return new crypto_2.NodeCrypto();
+}
+function hasBrowserCrypto() {
+ return (typeof window !== 'undefined' &&
+ typeof window.crypto !== 'undefined' &&
+ typeof window.crypto.subtle !== 'undefined');
+}
+//# sourceMappingURL=crypto.js.map
+
+/***/ }),
+
+/***/ 89396:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2019 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.NodeCrypto = void 0;
+const crypto = __webpack_require__(76982);
+class NodeCrypto {
+ async sha256DigestBase64(str) {
+ return crypto.createHash('sha256').update(str).digest('base64');
+ }
+ randomBytesBase64(count) {
+ return crypto.randomBytes(count).toString('base64');
+ }
+ async verify(pubkey, data, signature) {
+ const verifier = crypto.createVerify('RSA-SHA256');
+ verifier.update(data);
+ verifier.end();
+ return verifier.verify(pubkey, signature, 'base64');
+ }
+ async sign(privateKey, data) {
+ const signer = crypto.createSign('RSA-SHA256');
+ signer.update(data);
+ signer.end();
+ return signer.sign(privateKey, 'base64');
+ }
+ decodeBase64StringUtf8(base64) {
+ return Buffer.from(base64, 'base64').toString('utf-8');
+ }
+ encodeBase64StringUtf8(text) {
+ return Buffer.from(text, 'utf-8').toString('base64');
+ }
+ /**
+ * Computes the SHA-256 hash of the provided string.
+ * @param str The plain text string to hash.
+ * @return A promise that resolves with the SHA-256 hash of the provided
+ * string in hexadecimal encoding.
+ */
+ async sha256DigestHex(str) {
+ return crypto.createHash('sha256').update(str).digest('hex');
+ }
+ /**
+ * Computes the HMAC hash of a message using the provided crypto key and the
+ * SHA-256 algorithm.
+ * @param key The secret crypto key in utf-8 or ArrayBuffer format.
+ * @param msg The plain text message.
+ * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer
+ * format.
+ */
+ async signWithHmacSha256(key, msg) {
+ const cryptoKey = typeof key === 'string' ? key : toBuffer(key);
+ return toArrayBuffer(crypto.createHmac('sha256', cryptoKey).update(msg).digest());
+ }
+}
+exports.NodeCrypto = NodeCrypto;
+/**
+ * Converts a Node.js Buffer to an ArrayBuffer.
+ * https://stackoverflow.com/questions/8609289/convert-a-binary-nodejs-buffer-to-javascript-arraybuffer
+ * @param buffer The Buffer input to covert.
+ * @return The ArrayBuffer representation of the input.
+ */
+function toArrayBuffer(buffer) {
+ const ab = new ArrayBuffer(buffer.length);
+ const view = new Uint8Array(ab);
+ for (let i = 0; i < buffer.length; ++i) {
+ view[i] = buffer[i];
+ }
+ return ab;
+}
+/**
+ * Converts an ArrayBuffer to a Node.js Buffer.
+ * @param arrayBuffer The ArrayBuffer input to covert.
+ * @return The Buffer representation of the input.
+ */
+function toBuffer(arrayBuffer) {
+ return Buffer.from(arrayBuffer);
+}
+//# sourceMappingURL=crypto.js.map
+
+/***/ }),
+
+/***/ 61927:
+/***/ ((__unused_webpack_module, exports) => {
+
+
+// Copyright 2025 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.fromArrayBufferToHex = fromArrayBufferToHex;
+/**
+ * Converts an ArrayBuffer to a hexadecimal string.
+ * @param arrayBuffer The ArrayBuffer to convert to hexadecimal string.
+ * @return The hexadecimal encoding of the ArrayBuffer.
+ */
+function fromArrayBufferToHex(arrayBuffer) {
+ // Convert buffer to byte array.
+ const byteArray = Array.from(new Uint8Array(arrayBuffer));
+ // Convert bytes to hex string.
+ return byteArray
+ .map(byte => {
+ return byte.toString(16).padStart(2, '0');
+ })
+ .join('');
+}
+//# sourceMappingURL=shared.js.map
+
+/***/ }),
+
+/***/ 12876:
+/***/ ((__unused_webpack_module, exports) => {
+
+
+// Copyright 2025 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ErrorWithCode = void 0;
+class ErrorWithCode extends Error {
+ code;
+ constructor(message, code) {
+ super(message);
+ this.code = code;
+ }
+}
+exports.ErrorWithCode = ErrorWithCode;
+//# sourceMappingURL=errorWithCode.js.map
+
+/***/ }),
+
+/***/ 22629:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2025 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.getCredentials = getCredentials;
+const path = __webpack_require__(16928);
+const fs = __webpack_require__(79896);
+const util_1 = __webpack_require__(39023);
+const errorWithCode_1 = __webpack_require__(12876);
+const readFile = fs.readFile
+ ? (0, util_1.promisify)(fs.readFile)
+ : async () => {
+ // if running in the web-browser, fs.readFile may not have been shimmed.
+ throw new errorWithCode_1.ErrorWithCode('use key rather than keyFile.', 'MISSING_CREDENTIALS');
+ };
+var ExtensionFiles;
+(function (ExtensionFiles) {
+ ExtensionFiles["JSON"] = ".json";
+ ExtensionFiles["DER"] = ".der";
+ ExtensionFiles["CRT"] = ".crt";
+ ExtensionFiles["PEM"] = ".pem";
+ ExtensionFiles["P12"] = ".p12";
+ ExtensionFiles["PFX"] = ".pfx";
+})(ExtensionFiles || (ExtensionFiles = {}));
+/**
+ * Provides credentials from a JSON key file.
+ */
+class JsonCredentialsProvider {
+ keyFilePath;
+ constructor(keyFilePath) {
+ this.keyFilePath = keyFilePath;
+ }
+ /**
+ * Reads a JSON key file and extracts the private key and client email.
+ * @returns A promise that resolves with the credentials.
+ */
+ async getCredentials() {
+ const key = await readFile(this.keyFilePath, 'utf8');
+ let body;
+ try {
+ body = JSON.parse(key);
+ }
+ catch (error) {
+ const err = error;
+ throw new Error(`Invalid JSON key file: ${err.message}`);
+ }
+ const privateKey = body.private_key;
+ const clientEmail = body.client_email;
+ if (!privateKey || !clientEmail) {
+ throw new errorWithCode_1.ErrorWithCode('private_key and client_email are required.', 'MISSING_CREDENTIALS');
+ }
+ return { privateKey, clientEmail };
+ }
+}
+/**
+ * Provides credentials from a PEM-like key file.
+ */
+class PemCredentialsProvider {
+ keyFilePath;
+ constructor(keyFilePath) {
+ this.keyFilePath = keyFilePath;
+ }
+ /**
+ * Reads a PEM-like key file.
+ * @returns A promise that resolves with the private key.
+ */
+ async getCredentials() {
+ const privateKey = await readFile(this.keyFilePath, 'utf8');
+ return { privateKey };
+ }
+}
+/**
+ * Handles unsupported P12/PFX certificate types.
+ */
+class P12CredentialsProvider {
+ /**
+ * Throws an error as P12/PFX certificates are not supported.
+ * @returns A promise that rejects with an error.
+ */
+ async getCredentials() {
+ throw new errorWithCode_1.ErrorWithCode('*.p12 certificates are not supported after v6.1.2. ' +
+ 'Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.', 'UNKNOWN_CERTIFICATE_TYPE');
+ }
+}
+/**
+ * Factory class to create the appropriate credentials provider.
+ */
+class CredentialsProviderFactory {
+ /**
+ * Creates a credential provider based on the key file extension.
+ * @param keyFilePath The path to the key file.
+ * @returns An instance of a class that implements ICredentialsProvider.
+ */
+ static create(keyFilePath) {
+ const keyFileExtension = path.extname(keyFilePath);
+ switch (keyFileExtension) {
+ case ExtensionFiles.JSON:
+ return new JsonCredentialsProvider(keyFilePath);
+ case ExtensionFiles.DER:
+ case ExtensionFiles.CRT:
+ case ExtensionFiles.PEM:
+ return new PemCredentialsProvider(keyFilePath);
+ case ExtensionFiles.P12:
+ case ExtensionFiles.PFX:
+ return new P12CredentialsProvider();
+ default:
+ throw new errorWithCode_1.ErrorWithCode('Unknown certificate type. Type is determined based on file extension. ' +
+ 'Current supported extensions are *.json, and *.pem.', 'UNKNOWN_CERTIFICATE_TYPE');
+ }
+ }
+}
+/**
+ * Given a keyFile, extract the key and client email if available
+ * @param keyFile Path to a json, pem, or p12 file that contains the key.
+ * @returns an object with privateKey and clientEmail properties
+ */
+async function getCredentials(keyFilePath) {
+ const provider = CredentialsProviderFactory.create(keyFilePath);
+ return provider.getCredentials();
+}
+//# sourceMappingURL=getCredentials.js.map
+
+/***/ }),
+
+/***/ 66122:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2025 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.getToken = getToken;
+const jwsSign_1 = __webpack_require__(47970);
+/** The URL for Google's OAuth 2.0 token endpoint. */
+const GOOGLE_TOKEN_URL = 'https://oauth2.googleapis.com/token';
+/** The grant type for JWT-based authorization. */
+const GOOGLE_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:jwt-bearer';
+/**
+ * Generates the request options for fetching a token.
+ * @param tokenOptions The options for the token.
+ * @returns The Gaxios options for the request.
+ */
+const generateRequestOptions = (tokenOptions) => {
+ return {
+ method: 'POST',
+ url: GOOGLE_TOKEN_URL,
+ data: new URLSearchParams({
+ grant_type: GOOGLE_GRANT_TYPE, // Grant type for JWT
+ assertion: (0, jwsSign_1.getJwsSign)(tokenOptions),
+ }),
+ responseType: 'json',
+ retryConfig: {
+ httpMethodsToRetry: ['POST'],
+ },
+ };
+};
+/**
+ * Fetches an access token.
+ * @param tokenOptions The options for the token.
+ * @returns A promise that resolves with the token data.
+ */
+async function getToken(tokenOptions) {
+ if (!tokenOptions.transporter) {
+ throw new Error('No transporter set.');
+ }
+ try {
+ const gaxiosOptions = generateRequestOptions(tokenOptions);
+ const response = await tokenOptions.transporter.request(gaxiosOptions);
+ return response.data;
+ }
+ catch (e) {
+ // The error is re-thrown, but we want to format it to be more
+ // informative.
+ const err = e;
+ const errorData = err.response?.data;
+ if (errorData?.error) {
+ err.message = `${errorData.error}: ${errorData.error_description}`;
+ }
+ throw err;
+ }
+}
+//# sourceMappingURL=getToken.js.map
+
+/***/ }),
+
+/***/ 20451:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2025 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.GoogleToken = void 0;
+const gaxios_1 = __webpack_require__(10627);
+const tokenHandler_1 = __webpack_require__(16840);
+const revokeToken_1 = __webpack_require__(40464);
+/**
+ * The GoogleToken class is used to manage authentication with Google's OAuth 2.0 authorization server.
+ * It handles fetching, caching, and refreshing of access tokens.
+ */
+class GoogleToken {
+ /** The configuration options for this token instance. */
+ tokenOptions;
+ /** The handler for token fetching and caching logic. */
+ tokenHandler;
+ /**
+ * Create a GoogleToken.
+ *
+ * @param options Configuration object.
+ */
+ constructor(options) {
+ this.tokenOptions = options || {};
+ // If a transporter is not set, by default set it to use gaxios.
+ this.tokenOptions.transporter = this.tokenOptions.transporter || {
+ request: opts => (0, gaxios_1.request)(opts),
+ };
+ if (!this.tokenOptions.iss) {
+ this.tokenOptions.iss = this.tokenOptions.email;
+ }
+ if (typeof this.tokenOptions.scope === 'object') {
+ this.tokenOptions.scope = this.tokenOptions.scope.join(' ');
+ }
+ this.tokenHandler = new tokenHandler_1.TokenHandler(this.tokenOptions);
+ }
+ get expiresAt() {
+ return this.tokenHandler.tokenExpiresAt;
+ }
+ /**
+ * The most recent access token obtained by this client.
+ */
+ get accessToken() {
+ return this.tokenHandler.token?.access_token;
+ }
+ /**
+ * The most recent ID token obtained by this client.
+ */
+ get idToken() {
+ return this.tokenHandler.token?.id_token;
+ }
+ /**
+ * The token type of the most recent access token.
+ */
+ get tokenType() {
+ return this.tokenHandler.token?.token_type;
+ }
+ /**
+ * The refresh token for the current credentials.
+ */
+ get refreshToken() {
+ return this.tokenHandler.token?.refresh_token;
+ }
+ /**
+ * A boolean indicating if the current token has expired.
+ */
+ hasExpired() {
+ return this.tokenHandler.hasExpired();
+ }
+ /**
+ * A boolean indicating if the current token is expiring soon,
+ * based on the `eagerRefreshThresholdMillis` option.
+ */
+ isTokenExpiring() {
+ return this.tokenHandler.isTokenExpiring();
+ }
+ getToken(callbackOrOptions, opts = { forceRefresh: false }) {
+ // Handle the various method overloads.
+ let callback;
+ if (typeof callbackOrOptions === 'function') {
+ callback = callbackOrOptions;
+ }
+ else if (typeof callbackOrOptions === 'object') {
+ opts = callbackOrOptions;
+ }
+ // Delegate the token fetching to the token handler.
+ const promise = this.tokenHandler.getToken(opts.forceRefresh ?? false);
+ // If a callback is provided, use it, otherwise return the promise.
+ if (callback) {
+ promise.then(token => callback(null, token), callback);
+ }
+ return promise;
+ }
+ revokeToken(callback) {
+ if (!this.accessToken) {
+ return Promise.reject(new Error('No token to revoke.'));
+ }
+ const promise = (0, revokeToken_1.revokeToken)(this.accessToken, this.tokenOptions.transporter);
+ // If a callback is provided, use it.
+ if (callback) {
+ promise.then(() => callback(), callback);
+ }
+ // After revoking, reset the token handler to clear the cached token.
+ this.tokenHandler = new tokenHandler_1.TokenHandler(this.tokenOptions);
+ }
+ /**
+ * Returns the configuration options for this token instance.
+ */
+ get googleTokenOptions() {
+ return this.tokenOptions;
+ }
+}
+exports.GoogleToken = GoogleToken;
+//# sourceMappingURL=googleToken.js.map
+
+/***/ }),
+
+/***/ 47970:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2025 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.buildPayloadForJwsSign = buildPayloadForJwsSign;
+exports.getJwsSign = getJwsSign;
+const jws_1 = __webpack_require__(16798);
+/** The default algorithm for signing JWTs. */
+const ALG_RS256 = 'RS256';
+/** The URL for Google's OAuth 2.0 token endpoint. */
+const GOOGLE_TOKEN_URL = 'https://oauth2.googleapis.com/token';
+/**
+ * Builds the JWT payload for signing.
+ * @param tokenOptions The options for the token.
+ * @returns The JWT payload.
+ */
+function buildPayloadForJwsSign(tokenOptions) {
+ const iat = Math.floor(new Date().getTime() / 1000);
+ const payload = {
+ iss: tokenOptions.iss,
+ scope: tokenOptions.scope,
+ aud: GOOGLE_TOKEN_URL,
+ exp: iat + 3600,
+ iat,
+ sub: tokenOptions.sub,
+ ...tokenOptions.additionalClaims,
+ };
+ return payload;
+}
+/**
+ * Creates a signed JWS (JSON Web Signature).
+ * @param tokenOptions The options for the token.
+ * @returns The signed JWS.
+ */
+function getJwsSign(tokenOptions) {
+ const payload = buildPayloadForJwsSign(tokenOptions);
+ return (0, jws_1.sign)({
+ header: { alg: ALG_RS256 },
+ payload,
+ secret: tokenOptions.key,
+ });
+}
+//# sourceMappingURL=jwsSign.js.map
+
+/***/ }),
+
+/***/ 40464:
+/***/ ((__unused_webpack_module, exports) => {
+
+
+// Copyright 2025 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.revokeToken = revokeToken;
+/** The URL for Google's OAuth 2.0 token revocation endpoint. */
+const GOOGLE_REVOKE_TOKEN_URL = 'https://oauth2.googleapis.com/revoke?token=';
+/** The default retry behavior for the revoke token request. */
+const DEFAULT_RETRY_VALUE = true;
+/**
+ * Revokes a given access token.
+ * @param accessToken The access token to revoke.
+ * @param transporter The transporter to make the request with.
+ * @returns A promise that resolves with the revocation response.
+ */
+async function revokeToken(accessToken, transporter) {
+ const url = GOOGLE_REVOKE_TOKEN_URL + accessToken;
+ return await transporter.request({
+ url,
+ retry: DEFAULT_RETRY_VALUE,
+ });
+}
+//# sourceMappingURL=revokeToken.js.map
+
+/***/ }),
+
+/***/ 16840:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.TokenHandler = void 0;
+const getToken_1 = __webpack_require__(66122);
+const getCredentials_1 = __webpack_require__(22629);
+/**
+ * Manages the fetching and caching of access tokens.
+ */
+class TokenHandler {
+ /** The cached access token. */
+ token;
+ /** The expiration time of the cached access token. */
+ tokenExpiresAt;
+ /** A promise for an in-flight token request. */
+ inFlightRequest;
+ tokenOptions;
+ /**
+ * Creates an instance of TokenHandler.
+ * @param tokenOptions The options for fetching tokens.
+ * @param transporter The transporter to use for making requests.
+ */
+ constructor(tokenOptions) {
+ this.tokenOptions = tokenOptions;
+ }
+ /**
+ * Processes the credentials, loading them from a key file if necessary.
+ * This method is called before any token request.
+ */
+ async processCredentials() {
+ if (!this.tokenOptions.key && !this.tokenOptions.keyFile) {
+ throw new Error('No key or keyFile set.');
+ }
+ if (!this.tokenOptions.key && this.tokenOptions.keyFile) {
+ const credentials = await (0, getCredentials_1.getCredentials)(this.tokenOptions.keyFile);
+ this.tokenOptions.key = credentials.privateKey;
+ this.tokenOptions.email = credentials.clientEmail;
+ }
+ }
+ /**
+ * Checks if the cached token is expired or close to expiring.
+ * @returns True if the token is expiring, false otherwise.
+ */
+ isTokenExpiring() {
+ if (!this.token || !this.tokenExpiresAt) {
+ return true;
+ }
+ const now = new Date().getTime();
+ const eagerRefreshThresholdMillis = this.tokenOptions.eagerRefreshThresholdMillis ?? 0;
+ return this.tokenExpiresAt <= now + eagerRefreshThresholdMillis;
+ }
+ /**
+ * Returns whether the token has completely expired.
+ *
+ * @returns true if the token has expired, false otherwise.
+ */
+ hasExpired() {
+ const now = new Date().getTime();
+ if (this.token && this.tokenExpiresAt) {
+ const now = new Date().getTime();
+ return now >= this.tokenExpiresAt;
+ }
+ return true;
+ }
+ /**
+ * Fetches an access token, using a cached one if available and not expired.
+ * @param forceRefresh If true, forces a new token to be fetched.
+ * @returns A promise that resolves with the token data.
+ */
+ async getToken(forceRefresh) {
+ // Ensure credentials are processed before proceeding.
+ await this.processCredentials();
+ // If there's an in-flight request, return it.
+ if (this.inFlightRequest && !forceRefresh) {
+ return this.inFlightRequest;
+ }
+ // If we have a valid, non-expiring token, return it.
+ if (this.token && !this.isTokenExpiring() && !forceRefresh) {
+ return this.token;
+ }
+ // Otherwise, fetch a new token.
+ try {
+ this.inFlightRequest = (0, getToken_1.getToken)(this.tokenOptions);
+ const token = await this.inFlightRequest;
+ // Cache the new token and its expiration time.
+ this.token = token;
+ this.tokenExpiresAt =
+ new Date().getTime() + (token.expires_in ?? 0) * 1000;
+ return token;
+ }
+ finally {
+ // Clear the in-flight request promise once it's settled.
+ this.inFlightRequest = undefined;
+ }
+ }
+}
+exports.TokenHandler = TokenHandler;
+//# sourceMappingURL=tokenHandler.js.map
+
+/***/ }),
+
+/***/ 17220:
+/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
+
+
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.GoogleAuth = exports.auth = exports.GDCH_SERVICE_ACCOUNT_TYPE = exports.GdchClient = exports.PassThroughClient = exports.ExternalAccountAuthorizedUserClient = exports.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = exports.ExecutableError = exports.PluggableAuthClient = exports.DownscopedClient = exports.BaseExternalAccountClient = exports.ExternalAccountClient = exports.IdentityPoolClient = exports.AwsRequestSigner = exports.AwsClient = exports.UserRefreshClient = exports.LoginTicket = exports.ClientAuthentication = exports.OAuth2Client = exports.CodeChallengeMethod = exports.Impersonated = exports.JWT = exports.JWTAccess = exports.IdTokenClient = exports.IAMAuth = exports.GCPEnv = exports.Compute = exports.DEFAULT_UNIVERSE = exports.AuthClient = exports.gaxios = exports.gcpMetadata = void 0;
+// Copyright 2017 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+const googleauth_1 = __webpack_require__(2662);
+Object.defineProperty(exports, "GoogleAuth", ({ enumerable: true, get: function () { return googleauth_1.GoogleAuth; } }));
+// Export common deps to ensure types/instances are the exact match. Useful
+// for consistently configuring the library across versions.
+exports.gcpMetadata = __webpack_require__(4381);
+exports.gaxios = __webpack_require__(10627);
+var authclient_1 = __webpack_require__(82594);
+Object.defineProperty(exports, "AuthClient", ({ enumerable: true, get: function () { return authclient_1.AuthClient; } }));
+Object.defineProperty(exports, "DEFAULT_UNIVERSE", ({ enumerable: true, get: function () { return authclient_1.DEFAULT_UNIVERSE; } }));
+var computeclient_1 = __webpack_require__(81945);
+Object.defineProperty(exports, "Compute", ({ enumerable: true, get: function () { return computeclient_1.Compute; } }));
+var envDetect_1 = __webpack_require__(40747);
+Object.defineProperty(exports, "GCPEnv", ({ enumerable: true, get: function () { return envDetect_1.GCPEnv; } }));
+var iam_1 = __webpack_require__(30310);
+Object.defineProperty(exports, "IAMAuth", ({ enumerable: true, get: function () { return iam_1.IAMAuth; } }));
+var idtokenclient_1 = __webpack_require__(20630);
+Object.defineProperty(exports, "IdTokenClient", ({ enumerable: true, get: function () { return idtokenclient_1.IdTokenClient; } }));
+var jwtaccess_1 = __webpack_require__(15900);
+Object.defineProperty(exports, "JWTAccess", ({ enumerable: true, get: function () { return jwtaccess_1.JWTAccess; } }));
+var jwtclient_1 = __webpack_require__(27397);
+Object.defineProperty(exports, "JWT", ({ enumerable: true, get: function () { return jwtclient_1.JWT; } }));
+var impersonated_1 = __webpack_require__(19588);
+Object.defineProperty(exports, "Impersonated", ({ enumerable: true, get: function () { return impersonated_1.Impersonated; } }));
+var oauth2client_1 = __webpack_require__(64739);
+Object.defineProperty(exports, "CodeChallengeMethod", ({ enumerable: true, get: function () { return oauth2client_1.CodeChallengeMethod; } }));
+Object.defineProperty(exports, "OAuth2Client", ({ enumerable: true, get: function () { return oauth2client_1.OAuth2Client; } }));
+Object.defineProperty(exports, "ClientAuthentication", ({ enumerable: true, get: function () { return oauth2client_1.ClientAuthentication; } }));
+var loginticket_1 = __webpack_require__(27186);
+Object.defineProperty(exports, "LoginTicket", ({ enumerable: true, get: function () { return loginticket_1.LoginTicket; } }));
+var refreshclient_1 = __webpack_require__(16983);
+Object.defineProperty(exports, "UserRefreshClient", ({ enumerable: true, get: function () { return refreshclient_1.UserRefreshClient; } }));
+var awsclient_1 = __webpack_require__(25845);
+Object.defineProperty(exports, "AwsClient", ({ enumerable: true, get: function () { return awsclient_1.AwsClient; } }));
+var awsrequestsigner_1 = __webpack_require__(84199);
+Object.defineProperty(exports, "AwsRequestSigner", ({ enumerable: true, get: function () { return awsrequestsigner_1.AwsRequestSigner; } }));
+var identitypoolclient_1 = __webpack_require__(14032);
+Object.defineProperty(exports, "IdentityPoolClient", ({ enumerable: true, get: function () { return identitypoolclient_1.IdentityPoolClient; } }));
+var externalclient_1 = __webpack_require__(28939);
+Object.defineProperty(exports, "ExternalAccountClient", ({ enumerable: true, get: function () { return externalclient_1.ExternalAccountClient; } }));
+var baseexternalclient_1 = __webpack_require__(89046);
+Object.defineProperty(exports, "BaseExternalAccountClient", ({ enumerable: true, get: function () { return baseexternalclient_1.BaseExternalAccountClient; } }));
+var downscopedclient_1 = __webpack_require__(44412);
+Object.defineProperty(exports, "DownscopedClient", ({ enumerable: true, get: function () { return downscopedclient_1.DownscopedClient; } }));
+var pluggable_auth_client_1 = __webpack_require__(35189);
+Object.defineProperty(exports, "PluggableAuthClient", ({ enumerable: true, get: function () { return pluggable_auth_client_1.PluggableAuthClient; } }));
+Object.defineProperty(exports, "ExecutableError", ({ enumerable: true, get: function () { return pluggable_auth_client_1.ExecutableError; } }));
+var externalAccountAuthorizedUserClient_1 = __webpack_require__(69112);
+Object.defineProperty(exports, "EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE", ({ enumerable: true, get: function () { return externalAccountAuthorizedUserClient_1.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE; } }));
+Object.defineProperty(exports, "ExternalAccountAuthorizedUserClient", ({ enumerable: true, get: function () { return externalAccountAuthorizedUserClient_1.ExternalAccountAuthorizedUserClient; } }));
+var passthrough_1 = __webpack_require__(54949);
+Object.defineProperty(exports, "PassThroughClient", ({ enumerable: true, get: function () { return passthrough_1.PassThroughClient; } }));
+var gdchclient_1 = __webpack_require__(56568);
+Object.defineProperty(exports, "GdchClient", ({ enumerable: true, get: function () { return gdchclient_1.GdchClient; } }));
+Object.defineProperty(exports, "GDCH_SERVICE_ACCOUNT_TYPE", ({ enumerable: true, get: function () { return gdchclient_1.GDCH_SERVICE_ACCOUNT_TYPE; } }));
+__exportStar(__webpack_require__(20451), exports);
+const auth = new googleauth_1.GoogleAuth();
+exports.auth = auth;
+//# sourceMappingURL=index.js.map
+
+/***/ }),
+
+/***/ 84358:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2023 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.LRUCache = void 0;
+exports.snakeToCamel = snakeToCamel;
+exports.originalOrCamelOptions = originalOrCamelOptions;
+exports.removeUndefinedValuesInObject = removeUndefinedValuesInObject;
+exports.isValidFile = isValidFile;
+exports.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
+const fs = __webpack_require__(79896);
+const os = __webpack_require__(70857);
+const path = __webpack_require__(16928);
+const WELL_KNOWN_CERTIFICATE_CONFIG_FILE = 'certificate_config.json';
+const CLOUDSDK_CONFIG_DIRECTORY = 'gcloud';
+/**
+ * Returns the camel case of a provided string.
+ *
+ * @remarks
+ *
+ * Match any `_` and not `_` pair, then return the uppercase of the not `_`
+ * character.
+ *
+ * @param str the string to convert
+ * @returns the camelCase'd string
+ */
+function snakeToCamel(str) {
+ return str.replace(/([_][^_])/g, match => match.slice(1).toUpperCase());
+}
+/**
+ * Get the value of `obj[key]` or `obj[camelCaseKey]`, with a preference
+ * for original, non-camelCase key.
+ *
+ * @param obj object to lookup a value in
+ * @returns a `get` function for getting `obj[key || snakeKey]`, if available
+ */
+function originalOrCamelOptions(obj) {
+ /**
+ *
+ * @param key an index of object, preferably snake_case
+ * @returns the value `obj[key || snakeKey]`, if available
+ */
+ function get(key) {
+ const o = (obj || {});
+ return o[key] ?? o[snakeToCamel(key)];
+ }
+ return { get };
+}
+/**
+ * A simple LRU cache utility.
+ * Not meant for external usage.
+ *
+ * @experimental
+ */
+class LRUCache {
+ capacity;
+ /**
+ * Maps are in order. Thus, the older item is the first item.
+ *
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map}
+ */
+ #cache = new Map();
+ maxAge;
+ constructor(options) {
+ this.capacity = options.capacity;
+ this.maxAge = options.maxAge;
+ }
+ /**
+ * Moves the key to the end of the cache.
+ *
+ * @param key the key to move
+ * @param value the value of the key
+ */
+ #moveToEnd(key, value) {
+ this.#cache.delete(key);
+ this.#cache.set(key, {
+ value,
+ lastAccessed: Date.now(),
+ });
+ }
+ /**
+ * Add an item to the cache.
+ *
+ * @param key the key to upsert
+ * @param value the value of the key
+ */
+ set(key, value) {
+ this.#moveToEnd(key, value);
+ this.#evict();
+ }
+ /**
+ * Get an item from the cache.
+ *
+ * @param key the key to retrieve
+ */
+ get(key) {
+ const item = this.#cache.get(key);
+ if (!item)
+ return;
+ this.#moveToEnd(key, item.value);
+ this.#evict();
+ return item.value;
+ }
+ /**
+ * Maintain the cache based on capacity and TTL.
+ */
+ #evict() {
+ const cutoffDate = this.maxAge ? Date.now() - this.maxAge : 0;
+ /**
+ * Because we know Maps are in order, this item is both the
+ * last item in the list (capacity) and oldest (maxAge).
+ */
+ let oldestItem = this.#cache.entries().next();
+ while (!oldestItem.done &&
+ (this.#cache.size > this.capacity || // too many
+ oldestItem.value[1].lastAccessed < cutoffDate) // too old
+ ) {
+ this.#cache.delete(oldestItem.value[0]);
+ oldestItem = this.#cache.entries().next();
+ }
+ }
+}
+exports.LRUCache = LRUCache;
+// Given and object remove fields where value is undefined.
+function removeUndefinedValuesInObject(object) {
+ Object.entries(object).forEach(([key, value]) => {
+ if (value === undefined || value === 'undefined') {
+ delete object[key];
+ }
+ });
+ return object;
+}
+/**
+ * Helper to check if a path points to a valid file.
+ */
+async function isValidFile(filePath) {
+ try {
+ const stats = await fs.promises.lstat(filePath);
+ return stats.isFile();
+ }
+ catch (e) {
+ return false;
+ }
+}
+/**
+ * Determines the well-known gcloud location for the certificate config file.
+ * @returns The platform-specific path to the configuration file.
+ * @internal
+ */
+function getWellKnownCertificateConfigFileLocation() {
+ const configDir = process.env.CLOUDSDK_CONFIG ||
+ (_isWindows()
+ ? path.join(process.env.APPDATA || '', CLOUDSDK_CONFIG_DIRECTORY)
+ : path.join(process.env.HOME || '', '.config', CLOUDSDK_CONFIG_DIRECTORY));
+ return path.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
+}
+/**
+ * Checks if the current operating system is Windows.
+ * @returns True if the OS is Windows, false otherwise.
+ * @internal
+ */
+function _isWindows() {
+ return os.platform().startsWith('win');
+}
+//# sourceMappingURL=util.js.map
+
+/***/ }),
+
+/***/ 42149:
+/***/ ((__unused_webpack_module, exports) => {
+
+
+// Copyright 2024 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.Colours = void 0;
+/**
+ * Handles figuring out if we can use ANSI colours and handing out the escape codes.
+ *
+ * This is for package-internal use only, and may change at any time.
+ *
+ * @private
+ * @internal
+ */
+class Colours {
+ /**
+ * @param stream The stream (e.g. process.stderr)
+ * @returns true if the stream should have colourization enabled
+ */
+ static isEnabled(stream) {
+ return (stream && // May happen in browsers.
+ stream.isTTY &&
+ (typeof stream.getColorDepth === 'function'
+ ? stream.getColorDepth() > 2
+ : true));
+ }
+ static refresh() {
+ Colours.enabled = Colours.isEnabled(process === null || process === void 0 ? void 0 : process.stderr);
+ if (!this.enabled) {
+ Colours.reset = '';
+ Colours.bright = '';
+ Colours.dim = '';
+ Colours.red = '';
+ Colours.green = '';
+ Colours.yellow = '';
+ Colours.blue = '';
+ Colours.magenta = '';
+ Colours.cyan = '';
+ Colours.white = '';
+ Colours.grey = '';
+ }
+ else {
+ Colours.reset = '\u001b[0m';
+ Colours.bright = '\u001b[1m';
+ Colours.dim = '\u001b[2m';
+ Colours.red = '\u001b[31m';
+ Colours.green = '\u001b[32m';
+ Colours.yellow = '\u001b[33m';
+ Colours.blue = '\u001b[34m';
+ Colours.magenta = '\u001b[35m';
+ Colours.cyan = '\u001b[36m';
+ Colours.white = '\u001b[37m';
+ Colours.grey = '\u001b[90m';
+ }
+ }
+}
+exports.Colours = Colours;
+Colours.enabled = false;
+Colours.reset = '';
+Colours.bright = '';
+Colours.dim = '';
+Colours.red = '';
+Colours.green = '';
+Colours.yellow = '';
+Colours.blue = '';
+Colours.magenta = '';
+Colours.cyan = '';
+Colours.white = '';
+Colours.grey = '';
+Colours.refresh();
+//# sourceMappingURL=colours.js.map
+
+/***/ }),
+
+/***/ 23760:
+/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
+
+
+// Copyright 2024 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+__exportStar(__webpack_require__(33181), exports);
+//# sourceMappingURL=index.js.map
+
+/***/ }),
+
+/***/ 33181:
+/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
+
+
+// Copyright 2021-2024 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+ var ownKeys = function(o) {
+ ownKeys = Object.getOwnPropertyNames || function (o) {
+ var ar = [];
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+ return ar;
+ };
+ return ownKeys(o);
+ };
+ return function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+ __setModuleDefault(result, mod);
+ return result;
+ };
+})();
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.env = exports.DebugLogBackendBase = exports.placeholder = exports.AdhocDebugLogger = exports.LogSeverity = void 0;
+exports.getNodeBackend = getNodeBackend;
+exports.getDebugBackend = getDebugBackend;
+exports.getStructuredBackend = getStructuredBackend;
+exports.setBackend = setBackend;
+exports.log = log;
+const events_1 = __webpack_require__(24434);
+const process = __importStar(__webpack_require__(932));
+const util = __importStar(__webpack_require__(39023));
+const colours_1 = __webpack_require__(42149);
+// Some functions (as noted) are based on the Node standard library, from
+// the following file:
+//
+// https://github.com/nodejs/node/blob/main/lib/internal/util/debuglog.js
+/**
+ * This module defines an ad-hoc debug logger for Google Cloud Platform
+ * client libraries in Node. An ad-hoc debug logger is a tool which lets
+ * users use an external, unified interface (in this case, environment
+ * variables) to determine what logging they want to see at runtime. This
+ * isn't necessarily fed into the console, but is meant to be under the
+ * control of the user. The kind of logging that will be produced by this
+ * is more like "call retry happened", not "events you'd want to record
+ * in Cloud Logger".
+ *
+ * More for Googlers implementing libraries with it:
+ * go/cloud-client-logging-design
+ */
+/**
+ * Possible log levels. These are a subset of Cloud Observability levels.
+ * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity
+ */
+var LogSeverity;
+(function (LogSeverity) {
+ LogSeverity["DEFAULT"] = "DEFAULT";
+ LogSeverity["DEBUG"] = "DEBUG";
+ LogSeverity["INFO"] = "INFO";
+ LogSeverity["WARNING"] = "WARNING";
+ LogSeverity["ERROR"] = "ERROR";
+})(LogSeverity || (exports.LogSeverity = LogSeverity = {}));
+/**
+ * Our logger instance. This actually contains the meat of dealing
+ * with log lines, including EventEmitter. This contains the function
+ * that will be passed back to users of the package.
+ */
+class AdhocDebugLogger extends events_1.EventEmitter {
+ /**
+ * @param upstream The backend will pass a function that will be
+ * called whenever our logger function is invoked.
+ */
+ constructor(namespace, upstream) {
+ super();
+ this.namespace = namespace;
+ this.upstream = upstream;
+ this.func = Object.assign(this.invoke.bind(this), {
+ // Also add an instance pointer back to us.
+ instance: this,
+ // And pull over the EventEmitter functionality.
+ on: (event, listener) => this.on(event, listener),
+ });
+ // Convenience methods for log levels.
+ this.func.debug = (...args) => this.invokeSeverity(LogSeverity.DEBUG, ...args);
+ this.func.info = (...args) => this.invokeSeverity(LogSeverity.INFO, ...args);
+ this.func.warn = (...args) => this.invokeSeverity(LogSeverity.WARNING, ...args);
+ this.func.error = (...args) => this.invokeSeverity(LogSeverity.ERROR, ...args);
+ this.func.sublog = (namespace) => log(namespace, this.func);
+ }
+ invoke(fields, ...args) {
+ // Push out any upstream logger first.
+ if (this.upstream) {
+ try {
+ this.upstream(fields, ...args);
+ }
+ catch (e) {
+ // Swallow exceptions to avoid interfering with other logging.
+ }
+ }
+ // Emit sink events.
+ try {
+ this.emit('log', fields, args);
+ }
+ catch (e) {
+ // Swallow exceptions to avoid interfering with other logging.
+ }
+ }
+ invokeSeverity(severity, ...args) {
+ this.invoke({ severity }, ...args);
+ }
+}
+exports.AdhocDebugLogger = AdhocDebugLogger;
+/**
+ * This can be used in place of a real logger while waiting for Promises or disabling logging.
+ */
+exports.placeholder = new AdhocDebugLogger('', () => { }).func;
+/**
+ * The base class for debug logging backends. It's possible to use this, but the
+ * same non-guarantees above still apply (unstable interface, etc).
+ *
+ * @private
+ * @internal
+ */
+class DebugLogBackendBase {
+ constructor() {
+ var _a;
+ this.cached = new Map();
+ this.filters = [];
+ this.filtersSet = false;
+ // Look for the Node config variable for what systems to enable. We'll store
+ // these for the log method below, which will call setFilters() once.
+ let nodeFlag = (_a = process.env[exports.env.nodeEnables]) !== null && _a !== void 0 ? _a : '*';
+ if (nodeFlag === 'all') {
+ nodeFlag = '*';
+ }
+ this.filters = nodeFlag.split(',');
+ }
+ log(namespace, fields, ...args) {
+ try {
+ if (!this.filtersSet) {
+ this.setFilters();
+ this.filtersSet = true;
+ }
+ let logger = this.cached.get(namespace);
+ if (!logger) {
+ logger = this.makeLogger(namespace);
+ this.cached.set(namespace, logger);
+ }
+ logger(fields, ...args);
+ }
+ catch (e) {
+ // Silently ignore all errors; we don't want them to interfere with
+ // the user's running app.
+ // e;
+ console.error(e);
+ }
+ }
+}
+exports.DebugLogBackendBase = DebugLogBackendBase;
+// The basic backend. This one definitely works, but it's less feature-filled.
+//
+// Rather than using util.debuglog, this implements the same basic logic directly.
+// The reason for this decision is that debuglog checks the value of the
+// NODE_DEBUG environment variable before any user code runs; we therefore
+// can't pipe our own enables into it (and util.debuglog will never print unless
+// the user duplicates it into NODE_DEBUG, which isn't reasonable).
+//
+class NodeBackend extends DebugLogBackendBase {
+ constructor() {
+ super(...arguments);
+ // Default to allowing all systems, since we gate earlier based on whether the
+ // variable is empty.
+ this.enabledRegexp = /.*/g;
+ }
+ isEnabled(namespace) {
+ return this.enabledRegexp.test(namespace);
+ }
+ makeLogger(namespace) {
+ if (!this.enabledRegexp.test(namespace)) {
+ return () => { };
+ }
+ return (fields, ...args) => {
+ var _a;
+ // TODO: `fields` needs to be turned into a string here, one way or another.
+ const nscolour = `${colours_1.Colours.green}${namespace}${colours_1.Colours.reset}`;
+ const pid = `${colours_1.Colours.yellow}${process.pid}${colours_1.Colours.reset}`;
+ let level;
+ switch (fields.severity) {
+ case LogSeverity.ERROR:
+ level = `${colours_1.Colours.red}${fields.severity}${colours_1.Colours.reset}`;
+ break;
+ case LogSeverity.INFO:
+ level = `${colours_1.Colours.magenta}${fields.severity}${colours_1.Colours.reset}`;
+ break;
+ case LogSeverity.WARNING:
+ level = `${colours_1.Colours.yellow}${fields.severity}${colours_1.Colours.reset}`;
+ break;
+ default:
+ level = (_a = fields.severity) !== null && _a !== void 0 ? _a : LogSeverity.DEFAULT;
+ break;
+ }
+ const msg = util.formatWithOptions({ colors: colours_1.Colours.enabled }, ...args);
+ const filteredFields = Object.assign({}, fields);
+ delete filteredFields.severity;
+ const fieldsJson = Object.getOwnPropertyNames(filteredFields).length
+ ? JSON.stringify(filteredFields)
+ : '';
+ const fieldsColour = fieldsJson
+ ? `${colours_1.Colours.grey}${fieldsJson}${colours_1.Colours.reset}`
+ : '';
+ console.error('%s [%s|%s] %s%s', pid, nscolour, level, msg, fieldsJson ? ` ${fieldsColour}` : '');
+ };
+ }
+ // Regexp patterns below are from here:
+ // https://github.com/nodejs/node/blob/c0aebed4b3395bd65d54b18d1fd00f071002ac20/lib/internal/util/debuglog.js#L36
+ setFilters() {
+ const totalFilters = this.filters.join(',');
+ const regexp = totalFilters
+ .replace(/[|\\{}()[\]^$+?.]/g, '\\$&')
+ .replace(/\*/g, '.*')
+ .replace(/,/g, '$|^');
+ this.enabledRegexp = new RegExp(`^${regexp}$`, 'i');
+ }
+}
+/**
+ * @returns A backend based on Node util.debuglog; this is the default.
+ */
+function getNodeBackend() {
+ return new NodeBackend();
+}
+class DebugBackend extends DebugLogBackendBase {
+ constructor(pkg) {
+ super();
+ this.debugPkg = pkg;
+ }
+ makeLogger(namespace) {
+ const debugLogger = this.debugPkg(namespace);
+ return (fields, ...args) => {
+ // TODO: `fields` needs to be turned into a string here.
+ debugLogger(args[0], ...args.slice(1));
+ };
+ }
+ setFilters() {
+ var _a;
+ const existingFilters = (_a = process.env['NODE_DEBUG']) !== null && _a !== void 0 ? _a : '';
+ process.env['NODE_DEBUG'] = `${existingFilters}${existingFilters ? ',' : ''}${this.filters.join(',')}`;
+ }
+}
+/**
+ * Creates a "debug" package backend. The user must call require('debug') and pass
+ * the resulting object to this function.
+ *
+ * ```
+ * setBackend(getDebugBackend(require('debug')))
+ * ```
+ *
+ * https://www.npmjs.com/package/debug
+ *
+ * Note: Google does not explicitly endorse or recommend this package; it's just
+ * being provided as an option.
+ *
+ * @returns A backend based on the npm "debug" package.
+ */
+function getDebugBackend(debugPkg) {
+ return new DebugBackend(debugPkg);
+}
+/**
+ * This pretty much works like the Node logger, but it outputs structured
+ * logging JSON matching Google Cloud's ingestion specs. Rather than handling
+ * its own output, it wraps another backend. The passed backend must be a subclass
+ * of `DebugLogBackendBase` (any of the backends exposed by this package will work).
+ */
+class StructuredBackend extends DebugLogBackendBase {
+ constructor(upstream) {
+ var _a;
+ super();
+ this.upstream = (_a = upstream) !== null && _a !== void 0 ? _a : undefined;
+ }
+ makeLogger(namespace) {
+ var _a;
+ const debugLogger = (_a = this.upstream) === null || _a === void 0 ? void 0 : _a.makeLogger(namespace);
+ return (fields, ...args) => {
+ var _a;
+ const severity = (_a = fields.severity) !== null && _a !== void 0 ? _a : LogSeverity.INFO;
+ const json = Object.assign({
+ severity,
+ message: util.format(...args),
+ }, fields);
+ const jsonString = JSON.stringify(json);
+ if (debugLogger) {
+ debugLogger(fields, jsonString);
+ }
+ else {
+ console.log('%s', jsonString);
+ }
+ };
+ }
+ setFilters() {
+ var _a;
+ (_a = this.upstream) === null || _a === void 0 ? void 0 : _a.setFilters();
+ }
+}
+/**
+ * Creates a "structured logging" backend. This pretty much works like the
+ * Node logger, but it outputs structured logging JSON matching Google
+ * Cloud's ingestion specs instead of plain text.
+ *
+ * ```
+ * setBackend(getStructuredBackend())
+ * ```
+ *
+ * @param upstream If you want to use something besides the Node backend to
+ * write the actual log lines into, pass that here.
+ * @returns A backend based on Google Cloud structured logging.
+ */
+function getStructuredBackend(upstream) {
+ return new StructuredBackend(upstream);
+}
+/**
+ * The environment variables that we standardized on, for all ad-hoc logging.
+ */
+exports.env = {
+ /**
+ * Filter wildcards specific to the Node syntax, and similar to the built-in
+ * utils.debuglog() environment variable. If missing, disables logging.
+ */
+ nodeEnables: 'GOOGLE_SDK_NODE_LOGGING',
+};
+// Keep a copy of all namespaced loggers so users can reliably .on() them.
+// Note that these cached functions will need to deal with changes in the backend.
+const loggerCache = new Map();
+// Our current global backend. This might be:
+let cachedBackend = undefined;
+/**
+ * Set the backend to use for our log output.
+ * - A backend object
+ * - null to disable logging
+ * - undefined for "nothing yet", defaults to the Node backend
+ *
+ * @param backend Results from one of the get*Backend() functions.
+ */
+function setBackend(backend) {
+ cachedBackend = backend;
+ loggerCache.clear();
+}
+/**
+ * Creates a logging function. Multiple calls to this with the same namespace
+ * will produce the same logger, with the same event emitter hooks.
+ *
+ * Namespaces can be a simple string ("system" name), or a qualified string
+ * (system:subsystem), which can be used for filtering, or for "system:*".
+ *
+ * @param namespace The namespace, a descriptive text string.
+ * @returns A function you can call that works similar to console.log().
+ */
+function log(namespace, parent) {
+ // If the enable environment variable isn't set, do nothing. The user
+ // can still choose to set a backend of their choice using the manual
+ // `setBackend()`.
+ if (!cachedBackend) {
+ const enablesFlag = process.env[exports.env.nodeEnables];
+ if (!enablesFlag) {
+ return exports.placeholder;
+ }
+ }
+ // This might happen mostly if the typings are dropped in a user's code,
+ // or if they're calling from JavaScript.
+ if (!namespace) {
+ return exports.placeholder;
+ }
+ // Handle sub-loggers.
+ if (parent) {
+ namespace = `${parent.instance.namespace}:${namespace}`;
+ }
+ // Reuse loggers so things like event sinks are persistent.
+ const existing = loggerCache.get(namespace);
+ if (existing) {
+ return existing.func;
+ }
+ // Do we have a backend yet?
+ if (cachedBackend === null) {
+ // Explicitly disabled.
+ return exports.placeholder;
+ }
+ else if (cachedBackend === undefined) {
+ // One hasn't been made yet, so default to Node.
+ cachedBackend = getNodeBackend();
+ }
+ // The logger is further wrapped so we can handle the backend changing out.
+ const logger = (() => {
+ let previousBackend = undefined;
+ const newLogger = new AdhocDebugLogger(namespace, (fields, ...args) => {
+ if (previousBackend !== cachedBackend) {
+ // Did the user pass a custom backend?
+ if (cachedBackend === null) {
+ // Explicitly disabled.
+ return;
+ }
+ else if (cachedBackend === undefined) {
+ // One hasn't been made yet, so default to Node.
+ cachedBackend = getNodeBackend();
+ }
+ previousBackend = cachedBackend;
+ }
+ cachedBackend === null || cachedBackend === void 0 ? void 0 : cachedBackend.log(namespace, fields, ...args);
+ });
+ return newLogger;
+ })();
+ loggerCache.set(namespace, logger);
+ return logger.func;
+}
+//# sourceMappingURL=logging-utils.js.map
+
+/***/ }),
+
+/***/ 97222:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var json_stringify = (__webpack_require__(44455).stringify);
+var json_parse = __webpack_require__(17161);
+
+module.exports = function(options) {
+ return {
+ parse: json_parse(options),
+ stringify: json_stringify
+ }
+};
+//create the default method members with no options applied for backwards compatibility
+module.exports.parse = json_parse();
+module.exports.stringify = json_stringify;
+
+
+/***/ }),
+
+/***/ 17161:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var BigNumber = null;
+
+// regexpxs extracted from
+// (c) BSD-3-Clause
+// https://github.com/fastify/secure-json-parse/graphs/contributors and https://github.com/hapijs/bourne/graphs/contributors
+
+const suspectProtoRx = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/;
+const suspectConstructorRx = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;
+
+/*
+ json_parse.js
+ 2012-06-20
+
+ Public Domain.
+
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+ This file creates a json_parse function.
+ During create you can (optionally) specify some behavioural switches
+
+ require('json-bigint')(options)
+
+ The optional options parameter holds switches that drive certain
+ aspects of the parsing process:
+ * options.strict = true will warn about duplicate-key usage in the json.
+ The default (strict = false) will silently ignore those and overwrite
+ values for keys that are in duplicate use.
+
+ The resulting function follows this signature:
+ json_parse(text, reviver)
+ This method parses a JSON text to produce an object or array.
+ It can throw a SyntaxError exception.
+
+ The optional reviver parameter is a function that can filter and
+ transform the results. It receives each of the keys and values,
+ and its return value is used instead of the original value.
+ If it returns what it received, then the structure is not modified.
+ If it returns undefined then the member is deleted.
+
+ Example:
+
+ // Parse the text. Values that look like ISO date strings will
+ // be converted to Date objects.
+
+ myData = json_parse(text, function (key, value) {
+ var a;
+ if (typeof value === 'string') {
+ a =
+/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
+ if (a) {
+ return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+ +a[5], +a[6]));
+ }
+ }
+ return value;
+ });
+
+ This is a reference implementation. You are free to copy, modify, or
+ redistribute.
+
+ This code should be minified before deployment.
+ See http://javascript.crockford.com/jsmin.html
+
+ USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+ NOT CONTROL.
+*/
+
+/*members "", "\"", "\/", "\\", at, b, call, charAt, f, fromCharCode,
+ hasOwnProperty, message, n, name, prototype, push, r, t, text
+*/
+
+var json_parse = function (options) {
+ 'use strict';
+
+ // This is a function that can parse a JSON text, producing a JavaScript
+ // data structure. It is a simple, recursive descent parser. It does not use
+ // eval or regular expressions, so it can be used as a model for implementing
+ // a JSON parser in other languages.
+
+ // We are defining the function inside of another function to avoid creating
+ // global variables.
+
+ // Default options one can override by passing options to the parse()
+ var _options = {
+ strict: false, // not being strict means do not generate syntax errors for "duplicate key"
+ storeAsString: false, // toggles whether the values should be stored as BigNumber (default) or a string
+ alwaysParseAsBig: false, // toggles whether all numbers should be Big
+ useNativeBigInt: false, // toggles whether to use native BigInt instead of bignumber.js
+ protoAction: 'error',
+ constructorAction: 'error',
+ };
+
+ // If there are options, then use them to override the default _options
+ if (options !== undefined && options !== null) {
+ if (options.strict === true) {
+ _options.strict = true;
+ }
+ if (options.storeAsString === true) {
+ _options.storeAsString = true;
+ }
+ _options.alwaysParseAsBig =
+ options.alwaysParseAsBig === true ? options.alwaysParseAsBig : false;
+ _options.useNativeBigInt =
+ options.useNativeBigInt === true ? options.useNativeBigInt : false;
+
+ if (typeof options.constructorAction !== 'undefined') {
+ if (
+ options.constructorAction === 'error' ||
+ options.constructorAction === 'ignore' ||
+ options.constructorAction === 'preserve'
+ ) {
+ _options.constructorAction = options.constructorAction;
+ } else {
+ throw new Error(
+ `Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${options.constructorAction}`
+ );
+ }
+ }
+
+ if (typeof options.protoAction !== 'undefined') {
+ if (
+ options.protoAction === 'error' ||
+ options.protoAction === 'ignore' ||
+ options.protoAction === 'preserve'
+ ) {
+ _options.protoAction = options.protoAction;
+ } else {
+ throw new Error(
+ `Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${options.protoAction}`
+ );
+ }
+ }
+ }
+
+ var at, // The index of the current character
+ ch, // The current character
+ escapee = {
+ '"': '"',
+ '\\': '\\',
+ '/': '/',
+ b: '\b',
+ f: '\f',
+ n: '\n',
+ r: '\r',
+ t: '\t',
+ },
+ text,
+ error = function (m) {
+ // Call error when something is wrong.
+
+ throw {
+ name: 'SyntaxError',
+ message: m,
+ at: at,
+ text: text,
+ };
+ },
+ next = function (c) {
+ // If a c parameter is provided, verify that it matches the current character.
+
+ if (c && c !== ch) {
+ error("Expected '" + c + "' instead of '" + ch + "'");
+ }
+
+ // Get the next character. When there are no more characters,
+ // return the empty string.
+
+ ch = text.charAt(at);
+ at += 1;
+ return ch;
+ },
+ number = function () {
+ // Parse a number value.
+
+ var number,
+ string = '';
+
+ if (ch === '-') {
+ string = '-';
+ next('-');
+ }
+ while (ch >= '0' && ch <= '9') {
+ string += ch;
+ next();
+ }
+ if (ch === '.') {
+ string += '.';
+ while (next() && ch >= '0' && ch <= '9') {
+ string += ch;
+ }
+ }
+ if (ch === 'e' || ch === 'E') {
+ string += ch;
+ next();
+ if (ch === '-' || ch === '+') {
+ string += ch;
+ next();
+ }
+ while (ch >= '0' && ch <= '9') {
+ string += ch;
+ next();
+ }
+ }
+ number = +string;
+ if (!isFinite(number)) {
+ error('Bad number');
+ } else {
+ if (BigNumber == null) BigNumber = __webpack_require__(49017);
+ //if (number > 9007199254740992 || number < -9007199254740992)
+ // Bignumber has stricter check: everything with length > 15 digits disallowed
+ if (string.length > 15)
+ return _options.storeAsString
+ ? string
+ : _options.useNativeBigInt
+ ? BigInt(string)
+ : new BigNumber(string);
+ else
+ return !_options.alwaysParseAsBig
+ ? number
+ : _options.useNativeBigInt
+ ? BigInt(number)
+ : new BigNumber(number);
+ }
+ },
+ string = function () {
+ // Parse a string value.
+
+ var hex,
+ i,
+ string = '',
+ uffff;
+
+ // When parsing for string values, we must look for " and \ characters.
+
+ if (ch === '"') {
+ var startAt = at;
+ while (next()) {
+ if (ch === '"') {
+ if (at - 1 > startAt) string += text.substring(startAt, at - 1);
+ next();
+ return string;
+ }
+ if (ch === '\\') {
+ if (at - 1 > startAt) string += text.substring(startAt, at - 1);
+ next();
+ if (ch === 'u') {
+ uffff = 0;
+ for (i = 0; i < 4; i += 1) {
+ hex = parseInt(next(), 16);
+ if (!isFinite(hex)) {
+ break;
+ }
+ uffff = uffff * 16 + hex;
+ }
+ string += String.fromCharCode(uffff);
+ } else if (typeof escapee[ch] === 'string') {
+ string += escapee[ch];
+ } else {
+ break;
+ }
+ startAt = at;
+ }
+ }
+ }
+ error('Bad string');
+ },
+ white = function () {
+ // Skip whitespace.
+
+ while (ch && ch <= ' ') {
+ next();
+ }
+ },
+ word = function () {
+ // true, false, or null.
+
+ switch (ch) {
+ case 't':
+ next('t');
+ next('r');
+ next('u');
+ next('e');
+ return true;
+ case 'f':
+ next('f');
+ next('a');
+ next('l');
+ next('s');
+ next('e');
+ return false;
+ case 'n':
+ next('n');
+ next('u');
+ next('l');
+ next('l');
+ return null;
+ }
+ error("Unexpected '" + ch + "'");
+ },
+ value, // Place holder for the value function.
+ array = function () {
+ // Parse an array value.
+
+ var array = [];
+
+ if (ch === '[') {
+ next('[');
+ white();
+ if (ch === ']') {
+ next(']');
+ return array; // empty array
+ }
+ while (ch) {
+ array.push(value());
+ white();
+ if (ch === ']') {
+ next(']');
+ return array;
+ }
+ next(',');
+ white();
+ }
+ }
+ error('Bad array');
+ },
+ object = function () {
+ // Parse an object value.
+
+ var key,
+ object = Object.create(null);
+
+ if (ch === '{') {
+ next('{');
+ white();
+ if (ch === '}') {
+ next('}');
+ return object; // empty object
+ }
+ while (ch) {
+ key = string();
+ white();
+ next(':');
+ if (
+ _options.strict === true &&
+ Object.hasOwnProperty.call(object, key)
+ ) {
+ error('Duplicate key "' + key + '"');
+ }
+
+ if (suspectProtoRx.test(key) === true) {
+ if (_options.protoAction === 'error') {
+ error('Object contains forbidden prototype property');
+ } else if (_options.protoAction === 'ignore') {
+ value();
+ } else {
+ object[key] = value();
+ }
+ } else if (suspectConstructorRx.test(key) === true) {
+ if (_options.constructorAction === 'error') {
+ error('Object contains forbidden constructor property');
+ } else if (_options.constructorAction === 'ignore') {
+ value();
+ } else {
+ object[key] = value();
+ }
+ } else {
+ object[key] = value();
+ }
+
+ white();
+ if (ch === '}') {
+ next('}');
+ return object;
+ }
+ next(',');
+ white();
+ }
+ }
+ error('Bad object');
+ };
+
+ value = function () {
+ // Parse a JSON value. It could be an object, an array, a string, a number,
+ // or a word.
+
+ white();
+ switch (ch) {
+ case '{':
+ return object();
+ case '[':
+ return array();
+ case '"':
+ return string();
+ case '-':
+ return number();
+ default:
+ return ch >= '0' && ch <= '9' ? number() : word();
+ }
+ };
+
+ // Return the json_parse function. It will have access to all of the above
+ // functions and variables.
+
+ return function (source, reviver) {
+ var result;
+
+ text = source + '';
+ at = 0;
+ ch = ' ';
+ result = value();
+ white();
+ if (ch) {
+ error('Syntax error');
+ }
+
+ // If there is a reviver function, we recursively walk the new structure,
+ // passing each name/value pair to the reviver function for possible
+ // transformation, starting with a temporary root object that holds the result
+ // in an empty key. If there is not a reviver function, we simply return the
+ // result.
+
+ return typeof reviver === 'function'
+ ? (function walk(holder, key) {
+ var k,
+ v,
+ value = holder[key];
+ if (value && typeof value === 'object') {
+ Object.keys(value).forEach(function (k) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ });
+ }
+ return reviver.call(holder, key, value);
+ })({ '': result }, '')
+ : result;
+ };
+};
+
+module.exports = json_parse;
+
+
+/***/ }),
+
+/***/ 44455:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var BigNumber = __webpack_require__(49017);
+
+/*
+ json2.js
+ 2013-05-26
+
+ Public Domain.
+
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+ See http://www.JSON.org/js.html
+
+
+ This code should be minified before deployment.
+ See http://javascript.crockford.com/jsmin.html
+
+ USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+ NOT CONTROL.
+
+
+ This file creates a global JSON object containing two methods: stringify
+ and parse.
+
+ JSON.stringify(value, replacer, space)
+ value any JavaScript value, usually an object or array.
+
+ replacer an optional parameter that determines how object
+ values are stringified for objects. It can be a
+ function or an array of strings.
+
+ space an optional parameter that specifies the indentation
+ of nested structures. If it is omitted, the text will
+ be packed without extra whitespace. If it is a number,
+ it will specify the number of spaces to indent at each
+ level. If it is a string (such as '\t' or ' '),
+ it contains the characters used to indent at each level.
+
+ This method produces a JSON text from a JavaScript value.
+
+ When an object value is found, if the object contains a toJSON
+ method, its toJSON method will be called and the result will be
+ stringified. A toJSON method does not serialize: it returns the
+ value represented by the name/value pair that should be serialized,
+ or undefined if nothing should be serialized. The toJSON method
+ will be passed the key associated with the value, and this will be
+ bound to the value
+
+ For example, this would serialize Dates as ISO strings.
+
+ Date.prototype.toJSON = function (key) {
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ return this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z';
+ };
+
+ You can provide an optional replacer method. It will be passed the
+ key and value of each member, with this bound to the containing
+ object. The value that is returned from your method will be
+ serialized. If your method returns undefined, then the member will
+ be excluded from the serialization.
+
+ If the replacer parameter is an array of strings, then it will be
+ used to select the members to be serialized. It filters the results
+ such that only members with keys listed in the replacer array are
+ stringified.
+
+ Values that do not have JSON representations, such as undefined or
+ functions, will not be serialized. Such values in objects will be
+ dropped; in arrays they will be replaced with null. You can use
+ a replacer function to replace those with JSON values.
+ JSON.stringify(undefined) returns undefined.
+
+ The optional space parameter produces a stringification of the
+ value that is filled with line breaks and indentation to make it
+ easier to read.
+
+ If the space parameter is a non-empty string, then that string will
+ be used for indentation. If the space parameter is a number, then
+ the indentation will be that many spaces.
+
+ Example:
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}]);
+ // text is '["e",{"pluribus":"unum"}]'
+
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
+ // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
+
+ text = JSON.stringify([new Date()], function (key, value) {
+ return this[key] instanceof Date ?
+ 'Date(' + this[key] + ')' : value;
+ });
+ // text is '["Date(---current time---)"]'
+
+
+ JSON.parse(text, reviver)
+ This method parses a JSON text to produce an object or array.
+ It can throw a SyntaxError exception.
+
+ The optional reviver parameter is a function that can filter and
+ transform the results. It receives each of the keys and values,
+ and its return value is used instead of the original value.
+ If it returns what it received, then the structure is not modified.
+ If it returns undefined then the member is deleted.
+
+ Example:
+
+ // Parse the text. Values that look like ISO date strings will
+ // be converted to Date objects.
+
+ myData = JSON.parse(text, function (key, value) {
+ var a;
+ if (typeof value === 'string') {
+ a =
+/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
+ if (a) {
+ return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+ +a[5], +a[6]));
+ }
+ }
+ return value;
+ });
+
+ myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
+ var d;
+ if (typeof value === 'string' &&
+ value.slice(0, 5) === 'Date(' &&
+ value.slice(-1) === ')') {
+ d = new Date(value.slice(5, -1));
+ if (d) {
+ return d;
+ }
+ }
+ return value;
+ });
+
+
+ This is a reference implementation. You are free to copy, modify, or
+ redistribute.
+*/
+
+/*jslint evil: true, regexp: true */
+
+/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
+ call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
+ getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
+ lastIndex, length, parse, prototype, push, replace, slice, stringify,
+ test, toJSON, toString, valueOf
+*/
+
+
+// Create a JSON object only if one does not already exist. We create the
+// methods in a closure to avoid creating global variables.
+
+var JSON = module.exports;
+
+(function () {
+ 'use strict';
+
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ gap,
+ indent,
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ },
+ rep;
+
+
+ function quote(string) {
+
+// If the string contains no control characters, no quote characters, and no
+// backslash characters, then we can safely slap some quotes around it.
+// Otherwise we must also replace the offending characters with safe escape
+// sequences.
+
+ escapable.lastIndex = 0;
+ return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
+ var c = meta[a];
+ return typeof c === 'string'
+ ? c
+ : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + '"' : '"' + string + '"';
+ }
+
+
+ function str(key, holder) {
+
+// Produce a string from holder[key].
+
+ var i, // The loop counter.
+ k, // The member key.
+ v, // The member value.
+ length,
+ mind = gap,
+ partial,
+ value = holder[key],
+ isBigNumber = value != null && (value instanceof BigNumber || BigNumber.isBigNumber(value));
+
+// If the value has a toJSON method, call it to obtain a replacement value.
+
+ if (value && typeof value === 'object' &&
+ typeof value.toJSON === 'function') {
+ value = value.toJSON(key);
+ }
+
+// If we were called with a replacer function, then call the replacer to
+// obtain a replacement value.
+
+ if (typeof rep === 'function') {
+ value = rep.call(holder, key, value);
+ }
+
+// What happens next depends on the value's type.
+
+ switch (typeof value) {
+ case 'string':
+ if (isBigNumber) {
+ return value;
+ } else {
+ return quote(value);
+ }
+
+ case 'number':
+
+// JSON numbers must be finite. Encode non-finite numbers as null.
+
+ return isFinite(value) ? String(value) : 'null';
+
+ case 'boolean':
+ case 'null':
+ case 'bigint':
+
+// If the value is a boolean or null, convert it to a string. Note:
+// typeof null does not produce 'null'. The case is included here in
+// the remote chance that this gets fixed someday.
+
+ return String(value);
+
+// If the type is 'object', we might be dealing with an object or an array or
+// null.
+
+ case 'object':
+
+// Due to a specification blunder in ECMAScript, typeof null is 'object',
+// so watch out for that case.
+
+ if (!value) {
+ return 'null';
+ }
+
+// Make an array to hold the partial results of stringifying this object value.
+
+ gap += indent;
+ partial = [];
+
+// Is the value an array?
+
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+
+// The value is an array. Stringify every element. Use null as a placeholder
+// for non-JSON values.
+
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || 'null';
+ }
+
+// Join all of the elements together, separated with commas, and wrap them in
+// brackets.
+
+ v = partial.length === 0
+ ? '[]'
+ : gap
+ ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
+ : '[' + partial.join(',') + ']';
+ gap = mind;
+ return v;
+ }
+
+// If the replacer is an array, use it to select the members to be stringified.
+
+ if (rep && typeof rep === 'object') {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ if (typeof rep[i] === 'string') {
+ k = rep[i];
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ } else {
+
+// Otherwise, iterate through all of the keys in the object.
+
+ Object.keys(value).forEach(function(k) {
+ var v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ });
+ }
+
+// Join all of the member texts together, separated with commas,
+// and wrap them in braces.
+
+ v = partial.length === 0
+ ? '{}'
+ : gap
+ ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
+ : '{' + partial.join(',') + '}';
+ gap = mind;
+ return v;
+ }
+ }
+
+// If the JSON object does not yet have a stringify method, give it one.
+
+ if (typeof JSON.stringify !== 'function') {
+ JSON.stringify = function (value, replacer, space) {
+
+// The stringify method takes a value and an optional replacer, and an optional
+// space parameter, and returns a JSON text. The replacer can be a function
+// that can replace values, or an array of strings that will select the keys.
+// A default replacer method can be provided. Use of the space parameter can
+// produce text that is more easily readable.
+
+ var i;
+ gap = '';
+ indent = '';
+
+// If the space parameter is a number, make an indent string containing that
+// many spaces.
+
+ if (typeof space === 'number') {
+ for (i = 0; i < space; i += 1) {
+ indent += ' ';
+ }
+
+// If the space parameter is a string, it will be used as the indent string.
+
+ } else if (typeof space === 'string') {
+ indent = space;
+ }
+
+// If there is a replacer, it must be a function or an array.
+// Otherwise, throw an error.
+
+ rep = replacer;
+ if (replacer && typeof replacer !== 'function' &&
+ (typeof replacer !== 'object' ||
+ typeof replacer.length !== 'number')) {
+ throw new Error('JSON.stringify');
+ }
+
+// Make a fake root object containing our value under the key of ''.
+// Return the result of stringifying the value.
+
+ return str('', {'': value});
+ };
+ }
+}());
+
+
+/***/ }),
+
+/***/ 62104:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Buffer = (__webpack_require__(5725).Buffer);
+var crypto = __webpack_require__(76982);
+var formatEcdsa = __webpack_require__(58210);
+var util = __webpack_require__(39023);
+
+var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".'
+var MSG_INVALID_SECRET = 'secret must be a string or buffer';
+var MSG_INVALID_VERIFIER_KEY = 'key must be a string or a buffer';
+var MSG_INVALID_SIGNER_KEY = 'key must be a string, a buffer or an object';
+
+var supportsKeyObjects = typeof crypto.createPublicKey === 'function';
+if (supportsKeyObjects) {
+ MSG_INVALID_VERIFIER_KEY += ' or a KeyObject';
+ MSG_INVALID_SECRET += 'or a KeyObject';
+}
+
+function checkIsPublicKey(key) {
+ if (Buffer.isBuffer(key)) {
+ return;
+ }
+
+ if (typeof key === 'string') {
+ return;
+ }
+
+ if (!supportsKeyObjects) {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key !== 'object') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key.type !== 'string') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key.asymmetricKeyType !== 'string') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key.export !== 'function') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+};
+
+function checkIsPrivateKey(key) {
+ if (Buffer.isBuffer(key)) {
+ return;
+ }
+
+ if (typeof key === 'string') {
+ return;
+ }
+
+ if (typeof key === 'object') {
+ return;
+ }
+
+ throw typeError(MSG_INVALID_SIGNER_KEY);
+};
+
+function checkIsSecretKey(key) {
+ if (Buffer.isBuffer(key)) {
+ return;
+ }
+
+ if (typeof key === 'string') {
+ return key;
+ }
+
+ if (!supportsKeyObjects) {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+
+ if (typeof key !== 'object') {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+
+ if (key.type !== 'secret') {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+
+ if (typeof key.export !== 'function') {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+}
+
+function fromBase64(base64) {
+ return base64
+ .replace(/=/g, '')
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_');
+}
+
+function toBase64(base64url) {
+ base64url = base64url.toString();
+
+ var padding = 4 - base64url.length % 4;
+ if (padding !== 4) {
+ for (var i = 0; i < padding; ++i) {
+ base64url += '=';
+ }
+ }
+
+ return base64url
+ .replace(/\-/g, '+')
+ .replace(/_/g, '/');
+}
+
+function typeError(template) {
+ var args = [].slice.call(arguments, 1);
+ var errMsg = util.format.bind(util, template).apply(null, args);
+ return new TypeError(errMsg);
+}
+
+function bufferOrString(obj) {
+ return Buffer.isBuffer(obj) || typeof obj === 'string';
+}
+
+function normalizeInput(thing) {
+ if (!bufferOrString(thing))
+ thing = JSON.stringify(thing);
+ return thing;
+}
+
+function createHmacSigner(bits) {
+ return function sign(thing, secret) {
+ checkIsSecretKey(secret);
+ thing = normalizeInput(thing);
+ var hmac = crypto.createHmac('sha' + bits, secret);
+ var sig = (hmac.update(thing), hmac.digest('base64'))
+ return fromBase64(sig);
+ }
+}
+
+var bufferEqual;
+var timingSafeEqual = 'timingSafeEqual' in crypto ? function timingSafeEqual(a, b) {
+ if (a.byteLength !== b.byteLength) {
+ return false;
+ }
+
+ return crypto.timingSafeEqual(a, b)
+} : function timingSafeEqual(a, b) {
+ if (!bufferEqual) {
+ bufferEqual = __webpack_require__(53775);
+ }
+
+ return bufferEqual(a, b)
+}
+
+function createHmacVerifier(bits) {
+ return function verify(thing, signature, secret) {
+ var computedSig = createHmacSigner(bits)(thing, secret);
+ return timingSafeEqual(Buffer.from(signature), Buffer.from(computedSig));
+ }
+}
+
+function createKeySigner(bits) {
+ return function sign(thing, privateKey) {
+ checkIsPrivateKey(privateKey);
+ thing = normalizeInput(thing);
+ // Even though we are specifying "RSA" here, this works with ECDSA
+ // keys as well.
+ var signer = crypto.createSign('RSA-SHA' + bits);
+ var sig = (signer.update(thing), signer.sign(privateKey, 'base64'));
+ return fromBase64(sig);
+ }
+}
+
+function createKeyVerifier(bits) {
+ return function verify(thing, signature, publicKey) {
+ checkIsPublicKey(publicKey);
+ thing = normalizeInput(thing);
+ signature = toBase64(signature);
+ var verifier = crypto.createVerify('RSA-SHA' + bits);
+ verifier.update(thing);
+ return verifier.verify(publicKey, signature, 'base64');
+ }
+}
+
+function createPSSKeySigner(bits) {
+ return function sign(thing, privateKey) {
+ checkIsPrivateKey(privateKey);
+ thing = normalizeInput(thing);
+ var signer = crypto.createSign('RSA-SHA' + bits);
+ var sig = (signer.update(thing), signer.sign({
+ key: privateKey,
+ padding: crypto.constants.RSA_PKCS1_PSS_PADDING,
+ saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST
+ }, 'base64'));
+ return fromBase64(sig);
+ }
+}
+
+function createPSSKeyVerifier(bits) {
+ return function verify(thing, signature, publicKey) {
+ checkIsPublicKey(publicKey);
+ thing = normalizeInput(thing);
+ signature = toBase64(signature);
+ var verifier = crypto.createVerify('RSA-SHA' + bits);
+ verifier.update(thing);
+ return verifier.verify({
+ key: publicKey,
+ padding: crypto.constants.RSA_PKCS1_PSS_PADDING,
+ saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST
+ }, signature, 'base64');
+ }
+}
+
+function createECDSASigner(bits) {
+ var inner = createKeySigner(bits);
+ return function sign() {
+ var signature = inner.apply(null, arguments);
+ signature = formatEcdsa.derToJose(signature, 'ES' + bits);
+ return signature;
+ };
+}
+
+function createECDSAVerifer(bits) {
+ var inner = createKeyVerifier(bits);
+ return function verify(thing, signature, publicKey) {
+ signature = formatEcdsa.joseToDer(signature, 'ES' + bits).toString('base64');
+ var result = inner(thing, signature, publicKey);
+ return result;
+ };
+}
+
+function createNoneSigner() {
+ return function sign() {
+ return '';
+ }
+}
+
+function createNoneVerifier() {
+ return function verify(thing, signature) {
+ return signature === '';
+ }
+}
+
+module.exports = function jwa(algorithm) {
+ var signerFactories = {
+ hs: createHmacSigner,
+ rs: createKeySigner,
+ ps: createPSSKeySigner,
+ es: createECDSASigner,
+ none: createNoneSigner,
+ }
+ var verifierFactories = {
+ hs: createHmacVerifier,
+ rs: createKeyVerifier,
+ ps: createPSSKeyVerifier,
+ es: createECDSAVerifer,
+ none: createNoneVerifier,
+ }
+ var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);
+ if (!match)
+ throw typeError(MSG_INVALID_ALGORITHM, algorithm);
+ var algo = (match[1] || match[3]).toLowerCase();
+ var bits = match[2];
+
+ return {
+ sign: signerFactories[algo](bits),
+ verify: verifierFactories[algo](bits),
+ }
+};
+
+
+/***/ }),
+
+/***/ 16798:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+/*global exports*/
+var SignStream = __webpack_require__(36690);
+var VerifyStream = __webpack_require__(76682);
+
+var ALGORITHMS = [
+ 'HS256', 'HS384', 'HS512',
+ 'RS256', 'RS384', 'RS512',
+ 'PS256', 'PS384', 'PS512',
+ 'ES256', 'ES384', 'ES512'
+];
+
+exports.ALGORITHMS = ALGORITHMS;
+exports.sign = SignStream.sign;
+exports.verify = VerifyStream.verify;
+exports.decode = VerifyStream.decode;
+exports.isValid = VerifyStream.isValid;
+exports.createSign = function createSign(opts) {
+ return new SignStream(opts);
+};
+exports.createVerify = function createVerify(opts) {
+ return new VerifyStream(opts);
+};
+
+
+/***/ }),
+
+/***/ 61189:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/*global module, process*/
+var Buffer = (__webpack_require__(5725).Buffer);
+var Stream = __webpack_require__(2203);
+var util = __webpack_require__(39023);
+
+function DataStream(data) {
+ this.buffer = null;
+ this.writable = true;
+ this.readable = true;
+
+ // No input
+ if (!data) {
+ this.buffer = Buffer.alloc(0);
+ return this;
+ }
+
+ // Stream
+ if (typeof data.pipe === 'function') {
+ this.buffer = Buffer.alloc(0);
+ data.pipe(this);
+ return this;
+ }
+
+ // Buffer or String
+ // or Object (assumedly a passworded key)
+ if (data.length || typeof data === 'object') {
+ this.buffer = data;
+ this.writable = false;
+ process.nextTick(function () {
+ this.emit('end', data);
+ this.readable = false;
+ this.emit('close');
+ }.bind(this));
+ return this;
+ }
+
+ throw new TypeError('Unexpected data type ('+ typeof data + ')');
+}
+util.inherits(DataStream, Stream);
+
+DataStream.prototype.write = function write(data) {
+ this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]);
+ this.emit('data', data);
+};
+
+DataStream.prototype.end = function end(data) {
+ if (data)
+ this.write(data);
+ this.emit('end', data);
+ this.emit('close');
+ this.writable = false;
+ this.readable = false;
+};
+
+module.exports = DataStream;
+
+
+/***/ }),
+
+/***/ 36690:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/*global module*/
+var Buffer = (__webpack_require__(5725).Buffer);
+var DataStream = __webpack_require__(61189);
+var jwa = __webpack_require__(62104);
+var Stream = __webpack_require__(2203);
+var toString = __webpack_require__(65540);
+var util = __webpack_require__(39023);
+
+function base64url(string, encoding) {
+ return Buffer
+ .from(string, encoding)
+ .toString('base64')
+ .replace(/=/g, '')
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_');
+}
+
+function jwsSecuredInput(header, payload, encoding) {
+ encoding = encoding || 'utf8';
+ var encodedHeader = base64url(toString(header), 'binary');
+ var encodedPayload = base64url(toString(payload), encoding);
+ return util.format('%s.%s', encodedHeader, encodedPayload);
+}
+
+function jwsSign(opts) {
+ var header = opts.header;
+ var payload = opts.payload;
+ var secretOrKey = opts.secret || opts.privateKey;
+ var encoding = opts.encoding;
+ var algo = jwa(header.alg);
+ var securedInput = jwsSecuredInput(header, payload, encoding);
+ var signature = algo.sign(securedInput, secretOrKey);
+ return util.format('%s.%s', securedInput, signature);
+}
+
+function SignStream(opts) {
+ var secret = opts.secret;
+ secret = secret == null ? opts.privateKey : secret;
+ secret = secret == null ? opts.key : secret;
+ if (/^hs/i.test(opts.header.alg) === true && secret == null) {
+ throw new TypeError('secret must be a string or buffer or a KeyObject')
+ }
+ var secretStream = new DataStream(secret);
+ this.readable = true;
+ this.header = opts.header;
+ this.encoding = opts.encoding;
+ this.secret = this.privateKey = this.key = secretStream;
+ this.payload = new DataStream(opts.payload);
+ this.secret.once('close', function () {
+ if (!this.payload.writable && this.readable)
+ this.sign();
+ }.bind(this));
+
+ this.payload.once('close', function () {
+ if (!this.secret.writable && this.readable)
+ this.sign();
+ }.bind(this));
+}
+util.inherits(SignStream, Stream);
+
+SignStream.prototype.sign = function sign() {
+ try {
+ var signature = jwsSign({
+ header: this.header,
+ payload: this.payload.buffer,
+ secret: this.secret.buffer,
+ encoding: this.encoding
+ });
+ this.emit('done', signature);
+ this.emit('data', signature);
+ this.emit('end');
+ this.readable = false;
+ return signature;
+ } catch (e) {
+ this.readable = false;
+ this.emit('error', e);
+ this.emit('close');
+ }
+};
+
+SignStream.sign = jwsSign;
+
+module.exports = SignStream;
+
+
+/***/ }),
+
+/***/ 65540:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/*global module*/
+var Buffer = (__webpack_require__(20181).Buffer);
+
+module.exports = function toString(obj) {
+ if (typeof obj === 'string')
+ return obj;
+ if (typeof obj === 'number' || Buffer.isBuffer(obj))
+ return obj.toString();
+ return JSON.stringify(obj);
+};
+
+
+/***/ }),
+
+/***/ 76682:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/*global module*/
+var Buffer = (__webpack_require__(5725).Buffer);
+var DataStream = __webpack_require__(61189);
+var jwa = __webpack_require__(62104);
+var Stream = __webpack_require__(2203);
+var toString = __webpack_require__(65540);
+var util = __webpack_require__(39023);
+var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;
+
+function isObject(thing) {
+ return Object.prototype.toString.call(thing) === '[object Object]';
+}
+
+function safeJsonParse(thing) {
+ if (isObject(thing))
+ return thing;
+ try { return JSON.parse(thing); }
+ catch (e) { return undefined; }
+}
+
+function headerFromJWS(jwsSig) {
+ var encodedHeader = jwsSig.split('.', 1)[0];
+ return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary'));
+}
+
+function securedInputFromJWS(jwsSig) {
+ return jwsSig.split('.', 2).join('.');
+}
+
+function signatureFromJWS(jwsSig) {
+ return jwsSig.split('.')[2];
+}
+
+function payloadFromJWS(jwsSig, encoding) {
+ encoding = encoding || 'utf8';
+ var payload = jwsSig.split('.')[1];
+ return Buffer.from(payload, 'base64').toString(encoding);
+}
+
+function isValidJws(string) {
+ return JWS_REGEX.test(string) && !!headerFromJWS(string);
+}
+
+function jwsVerify(jwsSig, algorithm, secretOrKey) {
+ if (!algorithm) {
+ var err = new Error("Missing algorithm parameter for jws.verify");
+ err.code = "MISSING_ALGORITHM";
+ throw err;
+ }
+ jwsSig = toString(jwsSig);
+ var signature = signatureFromJWS(jwsSig);
+ var securedInput = securedInputFromJWS(jwsSig);
+ var algo = jwa(algorithm);
+ return algo.verify(securedInput, signature, secretOrKey);
+}
+
+function jwsDecode(jwsSig, opts) {
+ opts = opts || {};
+ jwsSig = toString(jwsSig);
+
+ if (!isValidJws(jwsSig))
+ return null;
+
+ var header = headerFromJWS(jwsSig);
+
+ if (!header)
+ return null;
+
+ var payload = payloadFromJWS(jwsSig);
+ if (header.typ === 'JWT' || opts.json)
+ payload = JSON.parse(payload, opts.encoding);
+
+ return {
+ header: header,
+ payload: payload,
+ signature: signatureFromJWS(jwsSig)
+ };
+}
+
+function VerifyStream(opts) {
+ opts = opts || {};
+ var secretOrKey = opts.secret;
+ secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey;
+ secretOrKey = secretOrKey == null ? opts.key : secretOrKey;
+ if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) {
+ throw new TypeError('secret must be a string or buffer or a KeyObject')
+ }
+ var secretStream = new DataStream(secretOrKey);
+ this.readable = true;
+ this.algorithm = opts.algorithm;
+ this.encoding = opts.encoding;
+ this.secret = this.publicKey = this.key = secretStream;
+ this.signature = new DataStream(opts.signature);
+ this.secret.once('close', function () {
+ if (!this.signature.writable && this.readable)
+ this.verify();
+ }.bind(this));
+
+ this.signature.once('close', function () {
+ if (!this.secret.writable && this.readable)
+ this.verify();
+ }.bind(this));
+}
+util.inherits(VerifyStream, Stream);
+VerifyStream.prototype.verify = function verify() {
+ try {
+ var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer);
+ var obj = jwsDecode(this.signature.buffer, this.encoding);
+ this.emit('done', valid, obj);
+ this.emit('data', valid);
+ this.emit('end');
+ this.readable = false;
+ return valid;
+ } catch (e) {
+ this.readable = false;
+ this.emit('error', e);
+ this.emit('close');
+ }
+};
+
+VerifyStream.decode = jwsDecode;
+VerifyStream.isValid = isValidJws;
+VerifyStream.verify = jwsVerify;
+
+module.exports = VerifyStream;
+
+
+/***/ }),
+
+/***/ 37301:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+const retry = __webpack_require__(27956);
+
+const networkErrorMsgs = [
+ 'Failed to fetch', // Chrome
+ 'NetworkError when attempting to fetch resource.', // Firefox
+ 'The Internet connection appears to be offline.', // Safari
+ 'Network request failed' // `cross-fetch`
+];
+
+class AbortError extends Error {
+ constructor(message) {
+ super();
+
+ if (message instanceof Error) {
+ this.originalError = message;
+ ({message} = message);
+ } else {
+ this.originalError = new Error(message);
+ this.originalError.stack = this.stack;
+ }
+
+ this.name = 'AbortError';
+ this.message = message;
+ }
+}
+
+const decorateErrorWithCounts = (error, attemptNumber, options) => {
+ // Minus 1 from attemptNumber because the first attempt does not count as a retry
+ const retriesLeft = options.retries - (attemptNumber - 1);
+
+ error.attemptNumber = attemptNumber;
+ error.retriesLeft = retriesLeft;
+ return error;
+};
+
+const isNetworkError = errorMessage => networkErrorMsgs.includes(errorMessage);
+
+const pRetry = (input, options) => new Promise((resolve, reject) => {
+ options = {
+ onFailedAttempt: () => {},
+ retries: 10,
+ ...options
+ };
+
+ const operation = retry.operation(options);
+
+ operation.attempt(async attemptNumber => {
+ try {
+ resolve(await input(attemptNumber));
+ } catch (error) {
+ if (!(error instanceof Error)) {
+ reject(new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`));
+ return;
+ }
+
+ if (error instanceof AbortError) {
+ operation.stop();
+ reject(error.originalError);
+ } else if (error instanceof TypeError && !isNetworkError(error.message)) {
+ operation.stop();
+ reject(error);
+ } else {
+ decorateErrorWithCounts(error, attemptNumber, options);
+
+ try {
+ await options.onFailedAttempt(error);
+ } catch (error) {
+ reject(error);
+ return;
+ }
+
+ if (!operation.retry(error)) {
+ reject(operation.mainError());
+ }
+ }
+ }
+ });
+});
+
+module.exports = pRetry;
+// TODO: remove this in the next major version
+module.exports["default"] = pRetry;
+
+module.exports.AbortError = AbortError;
+
+
+/***/ }),
+
+/***/ 27956:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+module.exports = __webpack_require__(94026);
+
+/***/ }),
+
+/***/ 94026:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+var RetryOperation = __webpack_require__(78060);
+
+exports.operation = function(options) {
+ var timeouts = exports.timeouts(options);
+ return new RetryOperation(timeouts, {
+ forever: options && (options.forever || options.retries === Infinity),
+ unref: options && options.unref,
+ maxRetryTime: options && options.maxRetryTime
+ });
+};
+
+exports.timeouts = function(options) {
+ if (options instanceof Array) {
+ return [].concat(options);
+ }
+
+ var opts = {
+ retries: 10,
+ factor: 2,
+ minTimeout: 1 * 1000,
+ maxTimeout: Infinity,
+ randomize: false
+ };
+ for (var key in options) {
+ opts[key] = options[key];
+ }
+
+ if (opts.minTimeout > opts.maxTimeout) {
+ throw new Error('minTimeout is greater than maxTimeout');
+ }
+
+ var timeouts = [];
+ for (var i = 0; i < opts.retries; i++) {
+ timeouts.push(this.createTimeout(i, opts));
+ }
+
+ if (options && options.forever && !timeouts.length) {
+ timeouts.push(this.createTimeout(i, opts));
+ }
+
+ // sort the array numerically ascending
+ timeouts.sort(function(a,b) {
+ return a - b;
+ });
+
+ return timeouts;
+};
+
+exports.createTimeout = function(attempt, opts) {
+ var random = (opts.randomize)
+ ? (Math.random() + 1)
+ : 1;
+
+ var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));
+ timeout = Math.min(timeout, opts.maxTimeout);
+
+ return timeout;
+};
+
+exports.wrap = function(obj, options, methods) {
+ if (options instanceof Array) {
+ methods = options;
+ options = null;
+ }
+
+ if (!methods) {
+ methods = [];
+ for (var key in obj) {
+ if (typeof obj[key] === 'function') {
+ methods.push(key);
+ }
+ }
+ }
+
+ for (var i = 0; i < methods.length; i++) {
+ var method = methods[i];
+ var original = obj[method];
+
+ obj[method] = function retryWrapper(original) {
+ var op = exports.operation(options);
+ var args = Array.prototype.slice.call(arguments, 1);
+ var callback = args.pop();
+
+ args.push(function(err) {
+ if (op.retry(err)) {
+ return;
+ }
+ if (err) {
+ arguments[0] = op.mainError();
+ }
+ callback.apply(this, arguments);
+ });
+
+ op.attempt(function() {
+ original.apply(obj, args);
+ });
+ }.bind(obj, original);
+ obj[method].options = options;
+ }
+};
+
+
+/***/ }),
+
+/***/ 78060:
+/***/ ((module) => {
+
+function RetryOperation(timeouts, options) {
+ // Compatibility for the old (timeouts, retryForever) signature
+ if (typeof options === 'boolean') {
+ options = { forever: options };
+ }
+
+ this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
+ this._timeouts = timeouts;
+ this._options = options || {};
+ this._maxRetryTime = options && options.maxRetryTime || Infinity;
+ this._fn = null;
+ this._errors = [];
+ this._attempts = 1;
+ this._operationTimeout = null;
+ this._operationTimeoutCb = null;
+ this._timeout = null;
+ this._operationStart = null;
+ this._timer = null;
+
+ if (this._options.forever) {
+ this._cachedTimeouts = this._timeouts.slice(0);
+ }
+}
+module.exports = RetryOperation;
+
+RetryOperation.prototype.reset = function() {
+ this._attempts = 1;
+ this._timeouts = this._originalTimeouts.slice(0);
+}
+
+RetryOperation.prototype.stop = function() {
+ if (this._timeout) {
+ clearTimeout(this._timeout);
+ }
+ if (this._timer) {
+ clearTimeout(this._timer);
+ }
+
+ this._timeouts = [];
+ this._cachedTimeouts = null;
+};
+
+RetryOperation.prototype.retry = function(err) {
+ if (this._timeout) {
+ clearTimeout(this._timeout);
+ }
+
+ if (!err) {
+ return false;
+ }
+ var currentTime = new Date().getTime();
+ if (err && currentTime - this._operationStart >= this._maxRetryTime) {
+ this._errors.push(err);
+ this._errors.unshift(new Error('RetryOperation timeout occurred'));
+ return false;
+ }
+
+ this._errors.push(err);
+
+ var timeout = this._timeouts.shift();
+ if (timeout === undefined) {
+ if (this._cachedTimeouts) {
+ // retry forever, only keep last error
+ this._errors.splice(0, this._errors.length - 1);
+ timeout = this._cachedTimeouts.slice(-1);
+ } else {
+ return false;
+ }
+ }
+
+ var self = this;
+ this._timer = setTimeout(function() {
+ self._attempts++;
+
+ if (self._operationTimeoutCb) {
+ self._timeout = setTimeout(function() {
+ self._operationTimeoutCb(self._attempts);
+ }, self._operationTimeout);
+
+ if (self._options.unref) {
+ self._timeout.unref();
+ }
+ }
+
+ self._fn(self._attempts);
+ }, timeout);
+
+ if (this._options.unref) {
+ this._timer.unref();
+ }
+
+ return true;
+};
+
+RetryOperation.prototype.attempt = function(fn, timeoutOps) {
+ this._fn = fn;
+
+ if (timeoutOps) {
+ if (timeoutOps.timeout) {
+ this._operationTimeout = timeoutOps.timeout;
+ }
+ if (timeoutOps.cb) {
+ this._operationTimeoutCb = timeoutOps.cb;
+ }
+ }
+
+ var self = this;
+ if (this._operationTimeoutCb) {
+ this._timeout = setTimeout(function() {
+ self._operationTimeoutCb();
+ }, self._operationTimeout);
+ }
+
+ this._operationStart = new Date().getTime();
+
+ this._fn(this._attempts);
+};
+
+RetryOperation.prototype.try = function(fn) {
+ console.log('Using RetryOperation.try() is deprecated');
+ this.attempt(fn);
+};
+
+RetryOperation.prototype.start = function(fn) {
+ console.log('Using RetryOperation.start() is deprecated');
+ this.attempt(fn);
+};
+
+RetryOperation.prototype.start = RetryOperation.prototype.try;
+
+RetryOperation.prototype.errors = function() {
+ return this._errors;
+};
+
+RetryOperation.prototype.attempts = function() {
+ return this._attempts;
+};
+
+RetryOperation.prototype.mainError = function() {
+ if (this._errors.length === 0) {
+ return null;
+ }
+
+ var counts = {};
+ var mainError = null;
+ var mainErrorCount = 0;
+
+ for (var i = 0; i < this._errors.length; i++) {
+ var error = this._errors[i];
+ var message = error.message;
+ var count = (counts[message] || 0) + 1;
+
+ counts[message] = count;
+
+ if (count >= mainErrorCount) {
+ mainError = error;
+ mainErrorCount = count;
+ }
+ }
+
+ return mainError;
+};
+
+
+/***/ }),
+
+/***/ 5725:
+/***/ ((module, exports, __webpack_require__) => {
+
+/*! safe-buffer. MIT License. Feross Aboukhadijeh */
+/* eslint-disable node/no-deprecated-api */
+var buffer = __webpack_require__(20181)
+var Buffer = buffer.Buffer
+
+// alternative to using Object.keys for old browsers
+function copyProps (src, dst) {
+ for (var key in src) {
+ dst[key] = src[key]
+ }
+}
+if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
+ module.exports = buffer
+} else {
+ // Copy properties from require('buffer')
+ copyProps(buffer, exports)
+ exports.Buffer = SafeBuffer
+}
+
+function SafeBuffer (arg, encodingOrOffset, length) {
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.prototype = Object.create(Buffer.prototype)
+
+// Copy static methods from Buffer
+copyProps(Buffer, SafeBuffer)
+
+SafeBuffer.from = function (arg, encodingOrOffset, length) {
+ if (typeof arg === 'number') {
+ throw new TypeError('Argument must not be a number')
+ }
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ var buf = Buffer(size)
+ if (fill !== undefined) {
+ if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ } else {
+ buf.fill(0)
+ }
+ return buf
+}
+
+SafeBuffer.allocUnsafe = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return Buffer(size)
+}
+
+SafeBuffer.allocUnsafeSlow = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return buffer.SlowBuffer(size)
+}
+
+
+/***/ }),
+
+/***/ 65348:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+const { EMPTY_BUFFER } = __webpack_require__(93920);
+
+const FastBuffer = Buffer[Symbol.species];
+
+/**
+ * Merges an array of buffers into a new buffer.
+ *
+ * @param {Buffer[]} list The array of buffers to concat
+ * @param {Number} totalLength The total length of buffers in the list
+ * @return {Buffer} The resulting buffer
+ * @public
+ */
+function concat(list, totalLength) {
+ if (list.length === 0) return EMPTY_BUFFER;
+ if (list.length === 1) return list[0];
+
+ const target = Buffer.allocUnsafe(totalLength);
+ let offset = 0;
+
+ for (let i = 0; i < list.length; i++) {
+ const buf = list[i];
+ target.set(buf, offset);
+ offset += buf.length;
+ }
+
+ if (offset < totalLength) {
+ return new FastBuffer(target.buffer, target.byteOffset, offset);
+ }
+
+ return target;
+}
+
+/**
+ * Masks a buffer using the given mask.
+ *
+ * @param {Buffer} source The buffer to mask
+ * @param {Buffer} mask The mask to use
+ * @param {Buffer} output The buffer where to store the result
+ * @param {Number} offset The offset at which to start writing
+ * @param {Number} length The number of bytes to mask.
+ * @public
+ */
+function _mask(source, mask, output, offset, length) {
+ for (let i = 0; i < length; i++) {
+ output[offset + i] = source[i] ^ mask[i & 3];
+ }
+}
+
+/**
+ * Unmasks a buffer using the given mask.
+ *
+ * @param {Buffer} buffer The buffer to unmask
+ * @param {Buffer} mask The mask to use
+ * @public
+ */
+function _unmask(buffer, mask) {
+ for (let i = 0; i < buffer.length; i++) {
+ buffer[i] ^= mask[i & 3];
+ }
+}
+
+/**
+ * Converts a buffer to an `ArrayBuffer`.
+ *
+ * @param {Buffer} buf The buffer to convert
+ * @return {ArrayBuffer} Converted buffer
+ * @public
+ */
+function toArrayBuffer(buf) {
+ if (buf.length === buf.buffer.byteLength) {
+ return buf.buffer;
+ }
+
+ return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
+}
+
+/**
+ * Converts `data` to a `Buffer`.
+ *
+ * @param {*} data The data to convert
+ * @return {Buffer} The buffer
+ * @throws {TypeError}
+ * @public
+ */
+function toBuffer(data) {
+ toBuffer.readOnly = true;
+
+ if (Buffer.isBuffer(data)) return data;
+
+ let buf;
+
+ if (data instanceof ArrayBuffer) {
+ buf = new FastBuffer(data);
+ } else if (ArrayBuffer.isView(data)) {
+ buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength);
+ } else {
+ buf = Buffer.from(data);
+ toBuffer.readOnly = false;
+ }
+
+ return buf;
+}
+
+module.exports = {
+ concat,
+ mask: _mask,
+ toArrayBuffer,
+ toBuffer,
+ unmask: _unmask
+};
+
+/* istanbul ignore else */
+if (!process.env.WS_NO_BUFFER_UTIL) {
+ try {
+ const bufferUtil = __webpack_require__(48812);
+
+ module.exports.mask = function (source, mask, output, offset, length) {
+ if (length < 48) _mask(source, mask, output, offset, length);
+ else bufferUtil.mask(source, mask, output, offset, length);
+ };
+
+ module.exports.unmask = function (buffer, mask) {
+ if (buffer.length < 32) _unmask(buffer, mask);
+ else bufferUtil.unmask(buffer, mask);
+ };
+ } catch (e) {
+ // Continue regardless of the error.
+ }
+}
+
+
+/***/ }),
+
+/***/ 93920:
+/***/ ((module) => {
+
+
+
+const BINARY_TYPES = ['nodebuffer', 'arraybuffer', 'fragments'];
+const hasBlob = typeof Blob !== 'undefined';
+
+if (hasBlob) BINARY_TYPES.push('blob');
+
+module.exports = {
+ BINARY_TYPES,
+ CLOSE_TIMEOUT: 30000,
+ EMPTY_BUFFER: Buffer.alloc(0),
+ GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11',
+ hasBlob,
+ kForOnEventAttribute: Symbol('kIsForOnEventAttribute'),
+ kListener: Symbol('kListener'),
+ kStatusCode: Symbol('status-code'),
+ kWebSocket: Symbol('websocket'),
+ NOOP: () => {}
+};
+
+
+/***/ }),
+
+/***/ 79947:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+const { kForOnEventAttribute, kListener } = __webpack_require__(93920);
+
+const kCode = Symbol('kCode');
+const kData = Symbol('kData');
+const kError = Symbol('kError');
+const kMessage = Symbol('kMessage');
+const kReason = Symbol('kReason');
+const kTarget = Symbol('kTarget');
+const kType = Symbol('kType');
+const kWasClean = Symbol('kWasClean');
+
+/**
+ * Class representing an event.
+ */
+class Event {
+ /**
+ * Create a new `Event`.
+ *
+ * @param {String} type The name of the event
+ * @throws {TypeError} If the `type` argument is not specified
+ */
+ constructor(type) {
+ this[kTarget] = null;
+ this[kType] = type;
+ }
+
+ /**
+ * @type {*}
+ */
+ get target() {
+ return this[kTarget];
+ }
+
+ /**
+ * @type {String}
+ */
+ get type() {
+ return this[kType];
+ }
+}
+
+Object.defineProperty(Event.prototype, 'target', { enumerable: true });
+Object.defineProperty(Event.prototype, 'type', { enumerable: true });
+
+/**
+ * Class representing a close event.
+ *
+ * @extends Event
+ */
+class CloseEvent extends Event {
+ /**
+ * Create a new `CloseEvent`.
+ *
+ * @param {String} type The name of the event
+ * @param {Object} [options] A dictionary object that allows for setting
+ * attributes via object members of the same name
+ * @param {Number} [options.code=0] The status code explaining why the
+ * connection was closed
+ * @param {String} [options.reason=''] A human-readable string explaining why
+ * the connection was closed
+ * @param {Boolean} [options.wasClean=false] Indicates whether or not the
+ * connection was cleanly closed
+ */
+ constructor(type, options = {}) {
+ super(type);
+
+ this[kCode] = options.code === undefined ? 0 : options.code;
+ this[kReason] = options.reason === undefined ? '' : options.reason;
+ this[kWasClean] = options.wasClean === undefined ? false : options.wasClean;
+ }
+
+ /**
+ * @type {Number}
+ */
+ get code() {
+ return this[kCode];
+ }
+
+ /**
+ * @type {String}
+ */
+ get reason() {
+ return this[kReason];
+ }
+
+ /**
+ * @type {Boolean}
+ */
+ get wasClean() {
+ return this[kWasClean];
+ }
+}
+
+Object.defineProperty(CloseEvent.prototype, 'code', { enumerable: true });
+Object.defineProperty(CloseEvent.prototype, 'reason', { enumerable: true });
+Object.defineProperty(CloseEvent.prototype, 'wasClean', { enumerable: true });
+
+/**
+ * Class representing an error event.
+ *
+ * @extends Event
+ */
+class ErrorEvent extends Event {
+ /**
+ * Create a new `ErrorEvent`.
+ *
+ * @param {String} type The name of the event
+ * @param {Object} [options] A dictionary object that allows for setting
+ * attributes via object members of the same name
+ * @param {*} [options.error=null] The error that generated this event
+ * @param {String} [options.message=''] The error message
+ */
+ constructor(type, options = {}) {
+ super(type);
+
+ this[kError] = options.error === undefined ? null : options.error;
+ this[kMessage] = options.message === undefined ? '' : options.message;
+ }
+
+ /**
+ * @type {*}
+ */
+ get error() {
+ return this[kError];
+ }
+
+ /**
+ * @type {String}
+ */
+ get message() {
+ return this[kMessage];
+ }
+}
+
+Object.defineProperty(ErrorEvent.prototype, 'error', { enumerable: true });
+Object.defineProperty(ErrorEvent.prototype, 'message', { enumerable: true });
+
+/**
+ * Class representing a message event.
+ *
+ * @extends Event
+ */
+class MessageEvent extends Event {
+ /**
+ * Create a new `MessageEvent`.
+ *
+ * @param {String} type The name of the event
+ * @param {Object} [options] A dictionary object that allows for setting
+ * attributes via object members of the same name
+ * @param {*} [options.data=null] The message content
+ */
+ constructor(type, options = {}) {
+ super(type);
+
+ this[kData] = options.data === undefined ? null : options.data;
+ }
+
+ /**
+ * @type {*}
+ */
+ get data() {
+ return this[kData];
+ }
+}
+
+Object.defineProperty(MessageEvent.prototype, 'data', { enumerable: true });
+
+/**
+ * This provides methods for emulating the `EventTarget` interface. It's not
+ * meant to be used directly.
+ *
+ * @mixin
+ */
+const EventTarget = {
+ /**
+ * Register an event listener.
+ *
+ * @param {String} type A string representing the event type to listen for
+ * @param {(Function|Object)} handler The listener to add
+ * @param {Object} [options] An options object specifies characteristics about
+ * the event listener
+ * @param {Boolean} [options.once=false] A `Boolean` indicating that the
+ * listener should be invoked at most once after being added. If `true`,
+ * the listener would be automatically removed when invoked.
+ * @public
+ */
+ addEventListener(type, handler, options = {}) {
+ for (const listener of this.listeners(type)) {
+ if (
+ !options[kForOnEventAttribute] &&
+ listener[kListener] === handler &&
+ !listener[kForOnEventAttribute]
+ ) {
+ return;
+ }
+ }
+
+ let wrapper;
+
+ if (type === 'message') {
+ wrapper = function onMessage(data, isBinary) {
+ const event = new MessageEvent('message', {
+ data: isBinary ? data : data.toString()
+ });
+
+ event[kTarget] = this;
+ callListener(handler, this, event);
+ };
+ } else if (type === 'close') {
+ wrapper = function onClose(code, message) {
+ const event = new CloseEvent('close', {
+ code,
+ reason: message.toString(),
+ wasClean: this._closeFrameReceived && this._closeFrameSent
+ });
+
+ event[kTarget] = this;
+ callListener(handler, this, event);
+ };
+ } else if (type === 'error') {
+ wrapper = function onError(error) {
+ const event = new ErrorEvent('error', {
+ error,
+ message: error.message
+ });
+
+ event[kTarget] = this;
+ callListener(handler, this, event);
+ };
+ } else if (type === 'open') {
+ wrapper = function onOpen() {
+ const event = new Event('open');
+
+ event[kTarget] = this;
+ callListener(handler, this, event);
+ };
+ } else {
+ return;
+ }
+
+ wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute];
+ wrapper[kListener] = handler;
+
+ if (options.once) {
+ this.once(type, wrapper);
+ } else {
+ this.on(type, wrapper);
+ }
+ },
+
+ /**
+ * Remove an event listener.
+ *
+ * @param {String} type A string representing the event type to remove
+ * @param {(Function|Object)} handler The listener to remove
+ * @public
+ */
+ removeEventListener(type, handler) {
+ for (const listener of this.listeners(type)) {
+ if (listener[kListener] === handler && !listener[kForOnEventAttribute]) {
+ this.removeListener(type, listener);
+ break;
+ }
+ }
+ }
+};
+
+module.exports = {
+ CloseEvent,
+ ErrorEvent,
+ Event,
+ EventTarget,
+ MessageEvent
+};
+
+/**
+ * Call an event listener
+ *
+ * @param {(Function|Object)} listener The listener to call
+ * @param {*} thisArg The value to use as `this`` when calling the listener
+ * @param {Event} event The event to pass to the listener
+ * @private
+ */
+function callListener(listener, thisArg, event) {
+ if (typeof listener === 'object' && listener.handleEvent) {
+ listener.handleEvent.call(listener, event);
+ } else {
+ listener.call(thisArg, event);
+ }
+}
+
+
+/***/ }),
+
+/***/ 98904:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+const { tokenChars } = __webpack_require__(72002);
+
+/**
+ * Adds an offer to the map of extension offers or a parameter to the map of
+ * parameters.
+ *
+ * @param {Object} dest The map of extension offers or parameters
+ * @param {String} name The extension or parameter name
+ * @param {(Object|Boolean|String)} elem The extension parameters or the
+ * parameter value
+ * @private
+ */
+function push(dest, name, elem) {
+ if (dest[name] === undefined) dest[name] = [elem];
+ else dest[name].push(elem);
+}
+
+/**
+ * Parses the `Sec-WebSocket-Extensions` header into an object.
+ *
+ * @param {String} header The field value of the header
+ * @return {Object} The parsed object
+ * @public
+ */
+function parse(header) {
+ const offers = Object.create(null);
+ let params = Object.create(null);
+ let mustUnescape = false;
+ let isEscaping = false;
+ let inQuotes = false;
+ let extensionName;
+ let paramName;
+ let start = -1;
+ let code = -1;
+ let end = -1;
+ let i = 0;
+
+ for (; i < header.length; i++) {
+ code = header.charCodeAt(i);
+
+ if (extensionName === undefined) {
+ if (end === -1 && tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (
+ i !== 0 &&
+ (code === 0x20 /* ' ' */ || code === 0x09) /* '\t' */
+ ) {
+ if (end === -1 && start !== -1) end = i;
+ } else if (code === 0x3b /* ';' */ || code === 0x2c /* ',' */) {
+ if (start === -1) {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+
+ if (end === -1) end = i;
+ const name = header.slice(start, end);
+ if (code === 0x2c) {
+ push(offers, name, params);
+ params = Object.create(null);
+ } else {
+ extensionName = name;
+ }
+
+ start = end = -1;
+ } else {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ } else if (paramName === undefined) {
+ if (end === -1 && tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (code === 0x20 || code === 0x09) {
+ if (end === -1 && start !== -1) end = i;
+ } else if (code === 0x3b || code === 0x2c) {
+ if (start === -1) {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+
+ if (end === -1) end = i;
+ push(params, header.slice(start, end), true);
+ if (code === 0x2c) {
+ push(offers, extensionName, params);
+ params = Object.create(null);
+ extensionName = undefined;
+ }
+
+ start = end = -1;
+ } else if (code === 0x3d /* '=' */ && start !== -1 && end === -1) {
+ paramName = header.slice(start, i);
+ start = end = -1;
+ } else {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ } else {
+ //
+ // The value of a quoted-string after unescaping must conform to the
+ // token ABNF, so only token characters are valid.
+ // Ref: https://tools.ietf.org/html/rfc6455#section-9.1
+ //
+ if (isEscaping) {
+ if (tokenChars[code] !== 1) {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ if (start === -1) start = i;
+ else if (!mustUnescape) mustUnescape = true;
+ isEscaping = false;
+ } else if (inQuotes) {
+ if (tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (code === 0x22 /* '"' */ && start !== -1) {
+ inQuotes = false;
+ end = i;
+ } else if (code === 0x5c /* '\' */) {
+ isEscaping = true;
+ } else {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) {
+ inQuotes = true;
+ } else if (end === -1 && tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (start !== -1 && (code === 0x20 || code === 0x09)) {
+ if (end === -1) end = i;
+ } else if (code === 0x3b || code === 0x2c) {
+ if (start === -1) {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+
+ if (end === -1) end = i;
+ let value = header.slice(start, end);
+ if (mustUnescape) {
+ value = value.replace(/\\/g, '');
+ mustUnescape = false;
+ }
+ push(params, paramName, value);
+ if (code === 0x2c) {
+ push(offers, extensionName, params);
+ params = Object.create(null);
+ extensionName = undefined;
+ }
+
+ paramName = undefined;
+ start = end = -1;
+ } else {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ }
+ }
+
+ if (start === -1 || inQuotes || code === 0x20 || code === 0x09) {
+ throw new SyntaxError('Unexpected end of input');
+ }
+
+ if (end === -1) end = i;
+ const token = header.slice(start, end);
+ if (extensionName === undefined) {
+ push(offers, token, params);
+ } else {
+ if (paramName === undefined) {
+ push(params, token, true);
+ } else if (mustUnescape) {
+ push(params, paramName, token.replace(/\\/g, ''));
+ } else {
+ push(params, paramName, token);
+ }
+ push(offers, extensionName, params);
+ }
+
+ return offers;
+}
+
+/**
+ * Builds the `Sec-WebSocket-Extensions` header field value.
+ *
+ * @param {Object} extensions The map of extensions and parameters to format
+ * @return {String} A string representing the given object
+ * @public
+ */
+function format(extensions) {
+ return Object.keys(extensions)
+ .map((extension) => {
+ let configurations = extensions[extension];
+ if (!Array.isArray(configurations)) configurations = [configurations];
+ return configurations
+ .map((params) => {
+ return [extension]
+ .concat(
+ Object.keys(params).map((k) => {
+ let values = params[k];
+ if (!Array.isArray(values)) values = [values];
+ return values
+ .map((v) => (v === true ? k : `${k}=${v}`))
+ .join('; ');
+ })
+ )
+ .join('; ');
+ })
+ .join(', ');
+ })
+ .join(', ');
+}
+
+module.exports = { format, parse };
+
+
+/***/ }),
+
+/***/ 5933:
+/***/ ((module) => {
+
+
+
+const kDone = Symbol('kDone');
+const kRun = Symbol('kRun');
+
+/**
+ * A very simple job queue with adjustable concurrency. Adapted from
+ * https://github.com/STRML/async-limiter
+ */
+class Limiter {
+ /**
+ * Creates a new `Limiter`.
+ *
+ * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed
+ * to run concurrently
+ */
+ constructor(concurrency) {
+ this[kDone] = () => {
+ this.pending--;
+ this[kRun]();
+ };
+ this.concurrency = concurrency || Infinity;
+ this.jobs = [];
+ this.pending = 0;
+ }
+
+ /**
+ * Adds a job to the queue.
+ *
+ * @param {Function} job The job to run
+ * @public
+ */
+ add(job) {
+ this.jobs.push(job);
+ this[kRun]();
+ }
+
+ /**
+ * Removes a job from the queue and runs it if possible.
+ *
+ * @private
+ */
+ [kRun]() {
+ if (this.pending === this.concurrency) return;
+
+ if (this.jobs.length) {
+ const job = this.jobs.shift();
+
+ this.pending++;
+ job(this[kDone]);
+ }
+ }
+}
+
+module.exports = Limiter;
+
+
+/***/ }),
+
+/***/ 61613:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+const zlib = __webpack_require__(43106);
+
+const bufferUtil = __webpack_require__(65348);
+const Limiter = __webpack_require__(5933);
+const { kStatusCode } = __webpack_require__(93920);
+
+const FastBuffer = Buffer[Symbol.species];
+const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]);
+const kPerMessageDeflate = Symbol('permessage-deflate');
+const kTotalLength = Symbol('total-length');
+const kCallback = Symbol('callback');
+const kBuffers = Symbol('buffers');
+const kError = Symbol('error');
+
+//
+// We limit zlib concurrency, which prevents severe memory fragmentation
+// as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913
+// and https://github.com/websockets/ws/issues/1202
+//
+// Intentionally global; it's the global thread pool that's an issue.
+//
+let zlibLimiter;
+
+/**
+ * permessage-deflate implementation.
+ */
+class PerMessageDeflate {
+ /**
+ * Creates a PerMessageDeflate instance.
+ *
+ * @param {Object} [options] Configuration options
+ * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support
+ * for, or request, a custom client window size
+ * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/
+ * acknowledge disabling of client context takeover
+ * @param {Number} [options.concurrencyLimit=10] The number of concurrent
+ * calls to zlib
+ * @param {Boolean} [options.isServer=false] Create the instance in either
+ * server or client mode
+ * @param {Number} [options.maxPayload=0] The maximum allowed message length
+ * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
+ * use of a custom server window size
+ * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
+ * disabling of server context takeover
+ * @param {Number} [options.threshold=1024] Size (in bytes) below which
+ * messages should not be compressed if context takeover is disabled
+ * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on
+ * deflate
+ * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
+ * inflate
+ */
+ constructor(options) {
+ this._options = options || {};
+ this._threshold =
+ this._options.threshold !== undefined ? this._options.threshold : 1024;
+ this._maxPayload = this._options.maxPayload | 0;
+ this._isServer = !!this._options.isServer;
+ this._deflate = null;
+ this._inflate = null;
+
+ this.params = null;
+
+ if (!zlibLimiter) {
+ const concurrency =
+ this._options.concurrencyLimit !== undefined
+ ? this._options.concurrencyLimit
+ : 10;
+ zlibLimiter = new Limiter(concurrency);
+ }
+ }
+
+ /**
+ * @type {String}
+ */
+ static get extensionName() {
+ return 'permessage-deflate';
+ }
+
+ /**
+ * Create an extension negotiation offer.
+ *
+ * @return {Object} Extension parameters
+ * @public
+ */
+ offer() {
+ const params = {};
+
+ if (this._options.serverNoContextTakeover) {
+ params.server_no_context_takeover = true;
+ }
+ if (this._options.clientNoContextTakeover) {
+ params.client_no_context_takeover = true;
+ }
+ if (this._options.serverMaxWindowBits) {
+ params.server_max_window_bits = this._options.serverMaxWindowBits;
+ }
+ if (this._options.clientMaxWindowBits) {
+ params.client_max_window_bits = this._options.clientMaxWindowBits;
+ } else if (this._options.clientMaxWindowBits == null) {
+ params.client_max_window_bits = true;
+ }
+
+ return params;
+ }
+
+ /**
+ * Accept an extension negotiation offer/response.
+ *
+ * @param {Array} configurations The extension negotiation offers/reponse
+ * @return {Object} Accepted configuration
+ * @public
+ */
+ accept(configurations) {
+ configurations = this.normalizeParams(configurations);
+
+ this.params = this._isServer
+ ? this.acceptAsServer(configurations)
+ : this.acceptAsClient(configurations);
+
+ return this.params;
+ }
+
+ /**
+ * Releases all resources used by the extension.
+ *
+ * @public
+ */
+ cleanup() {
+ if (this._inflate) {
+ this._inflate.close();
+ this._inflate = null;
+ }
+
+ if (this._deflate) {
+ const callback = this._deflate[kCallback];
+
+ this._deflate.close();
+ this._deflate = null;
+
+ if (callback) {
+ callback(
+ new Error(
+ 'The deflate stream was closed while data was being processed'
+ )
+ );
+ }
+ }
+ }
+
+ /**
+ * Accept an extension negotiation offer.
+ *
+ * @param {Array} offers The extension negotiation offers
+ * @return {Object} Accepted configuration
+ * @private
+ */
+ acceptAsServer(offers) {
+ const opts = this._options;
+ const accepted = offers.find((params) => {
+ if (
+ (opts.serverNoContextTakeover === false &&
+ params.server_no_context_takeover) ||
+ (params.server_max_window_bits &&
+ (opts.serverMaxWindowBits === false ||
+ (typeof opts.serverMaxWindowBits === 'number' &&
+ opts.serverMaxWindowBits > params.server_max_window_bits))) ||
+ (typeof opts.clientMaxWindowBits === 'number' &&
+ (typeof params.client_max_window_bits === 'number'
+ ? opts.clientMaxWindowBits > params.client_max_window_bits
+ : !params.client_max_window_bits))
+ ) {
+ return false;
+ }
+
+ return true;
+ });
+
+ if (!accepted) {
+ throw new Error('None of the extension offers can be accepted');
+ }
+
+ if (opts.serverNoContextTakeover) {
+ accepted.server_no_context_takeover = true;
+ }
+ if (opts.clientNoContextTakeover) {
+ accepted.client_no_context_takeover = true;
+ }
+ if (typeof opts.serverMaxWindowBits === 'number') {
+ accepted.server_max_window_bits = opts.serverMaxWindowBits;
+ }
+ if (typeof opts.clientMaxWindowBits === 'number') {
+ accepted.client_max_window_bits = opts.clientMaxWindowBits;
+ } else if (
+ accepted.client_max_window_bits === true ||
+ opts.clientMaxWindowBits === false
+ ) {
+ delete accepted.client_max_window_bits;
+ }
+
+ return accepted;
+ }
+
+ /**
+ * Accept the extension negotiation response.
+ *
+ * @param {Array} response The extension negotiation response
+ * @return {Object} Accepted configuration
+ * @private
+ */
+ acceptAsClient(response) {
+ const params = response[0];
+
+ if (
+ this._options.clientNoContextTakeover === false &&
+ params.client_no_context_takeover
+ ) {
+ throw new Error('Unexpected parameter "client_no_context_takeover"');
+ }
+
+ if (!params.client_max_window_bits) {
+ if (typeof this._options.clientMaxWindowBits === 'number') {
+ params.client_max_window_bits = this._options.clientMaxWindowBits;
+ }
+ } else if (
+ this._options.clientMaxWindowBits === false ||
+ (typeof this._options.clientMaxWindowBits === 'number' &&
+ params.client_max_window_bits > this._options.clientMaxWindowBits)
+ ) {
+ throw new Error(
+ 'Unexpected or invalid parameter "client_max_window_bits"'
+ );
+ }
+
+ return params;
+ }
+
+ /**
+ * Normalize parameters.
+ *
+ * @param {Array} configurations The extension negotiation offers/reponse
+ * @return {Array} The offers/response with normalized parameters
+ * @private
+ */
+ normalizeParams(configurations) {
+ configurations.forEach((params) => {
+ Object.keys(params).forEach((key) => {
+ let value = params[key];
+
+ if (value.length > 1) {
+ throw new Error(`Parameter "${key}" must have only a single value`);
+ }
+
+ value = value[0];
+
+ if (key === 'client_max_window_bits') {
+ if (value !== true) {
+ const num = +value;
+ if (!Number.isInteger(num) || num < 8 || num > 15) {
+ throw new TypeError(
+ `Invalid value for parameter "${key}": ${value}`
+ );
+ }
+ value = num;
+ } else if (!this._isServer) {
+ throw new TypeError(
+ `Invalid value for parameter "${key}": ${value}`
+ );
+ }
+ } else if (key === 'server_max_window_bits') {
+ const num = +value;
+ if (!Number.isInteger(num) || num < 8 || num > 15) {
+ throw new TypeError(
+ `Invalid value for parameter "${key}": ${value}`
+ );
+ }
+ value = num;
+ } else if (
+ key === 'client_no_context_takeover' ||
+ key === 'server_no_context_takeover'
+ ) {
+ if (value !== true) {
+ throw new TypeError(
+ `Invalid value for parameter "${key}": ${value}`
+ );
+ }
+ } else {
+ throw new Error(`Unknown parameter "${key}"`);
+ }
+
+ params[key] = value;
+ });
+ });
+
+ return configurations;
+ }
+
+ /**
+ * Decompress data. Concurrency limited.
+ *
+ * @param {Buffer} data Compressed data
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
+ * @param {Function} callback Callback
+ * @public
+ */
+ decompress(data, fin, callback) {
+ zlibLimiter.add((done) => {
+ this._decompress(data, fin, (err, result) => {
+ done();
+ callback(err, result);
+ });
+ });
+ }
+
+ /**
+ * Compress data. Concurrency limited.
+ *
+ * @param {(Buffer|String)} data Data to compress
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
+ * @param {Function} callback Callback
+ * @public
+ */
+ compress(data, fin, callback) {
+ zlibLimiter.add((done) => {
+ this._compress(data, fin, (err, result) => {
+ done();
+ callback(err, result);
+ });
+ });
+ }
+
+ /**
+ * Decompress data.
+ *
+ * @param {Buffer} data Compressed data
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
+ * @param {Function} callback Callback
+ * @private
+ */
+ _decompress(data, fin, callback) {
+ const endpoint = this._isServer ? 'client' : 'server';
+
+ if (!this._inflate) {
+ const key = `${endpoint}_max_window_bits`;
+ const windowBits =
+ typeof this.params[key] !== 'number'
+ ? zlib.Z_DEFAULT_WINDOWBITS
+ : this.params[key];
+
+ this._inflate = zlib.createInflateRaw({
+ ...this._options.zlibInflateOptions,
+ windowBits
+ });
+ this._inflate[kPerMessageDeflate] = this;
+ this._inflate[kTotalLength] = 0;
+ this._inflate[kBuffers] = [];
+ this._inflate.on('error', inflateOnError);
+ this._inflate.on('data', inflateOnData);
+ }
+
+ this._inflate[kCallback] = callback;
+
+ this._inflate.write(data);
+ if (fin) this._inflate.write(TRAILER);
+
+ this._inflate.flush(() => {
+ const err = this._inflate[kError];
+
+ if (err) {
+ this._inflate.close();
+ this._inflate = null;
+ callback(err);
+ return;
+ }
+
+ const data = bufferUtil.concat(
+ this._inflate[kBuffers],
+ this._inflate[kTotalLength]
+ );
+
+ if (this._inflate._readableState.endEmitted) {
+ this._inflate.close();
+ this._inflate = null;
+ } else {
+ this._inflate[kTotalLength] = 0;
+ this._inflate[kBuffers] = [];
+
+ if (fin && this.params[`${endpoint}_no_context_takeover`]) {
+ this._inflate.reset();
+ }
+ }
+
+ callback(null, data);
+ });
+ }
+
+ /**
+ * Compress data.
+ *
+ * @param {(Buffer|String)} data Data to compress
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
+ * @param {Function} callback Callback
+ * @private
+ */
+ _compress(data, fin, callback) {
+ const endpoint = this._isServer ? 'server' : 'client';
+
+ if (!this._deflate) {
+ const key = `${endpoint}_max_window_bits`;
+ const windowBits =
+ typeof this.params[key] !== 'number'
+ ? zlib.Z_DEFAULT_WINDOWBITS
+ : this.params[key];
+
+ this._deflate = zlib.createDeflateRaw({
+ ...this._options.zlibDeflateOptions,
+ windowBits
+ });
+
+ this._deflate[kTotalLength] = 0;
+ this._deflate[kBuffers] = [];
+
+ this._deflate.on('data', deflateOnData);
+ }
+
+ this._deflate[kCallback] = callback;
+
+ this._deflate.write(data);
+ this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {
+ if (!this._deflate) {
+ //
+ // The deflate stream was closed while data was being processed.
+ //
+ return;
+ }
+
+ let data = bufferUtil.concat(
+ this._deflate[kBuffers],
+ this._deflate[kTotalLength]
+ );
+
+ if (fin) {
+ data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4);
+ }
+
+ //
+ // Ensure that the callback will not be called again in
+ // `PerMessageDeflate#cleanup()`.
+ //
+ this._deflate[kCallback] = null;
+
+ this._deflate[kTotalLength] = 0;
+ this._deflate[kBuffers] = [];
+
+ if (fin && this.params[`${endpoint}_no_context_takeover`]) {
+ this._deflate.reset();
+ }
+
+ callback(null, data);
+ });
+ }
+}
+
+module.exports = PerMessageDeflate;
+
+/**
+ * The listener of the `zlib.DeflateRaw` stream `'data'` event.
+ *
+ * @param {Buffer} chunk A chunk of data
+ * @private
+ */
+function deflateOnData(chunk) {
+ this[kBuffers].push(chunk);
+ this[kTotalLength] += chunk.length;
+}
+
+/**
+ * The listener of the `zlib.InflateRaw` stream `'data'` event.
+ *
+ * @param {Buffer} chunk A chunk of data
+ * @private
+ */
+function inflateOnData(chunk) {
+ this[kTotalLength] += chunk.length;
+
+ if (
+ this[kPerMessageDeflate]._maxPayload < 1 ||
+ this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload
+ ) {
+ this[kBuffers].push(chunk);
+ return;
+ }
+
+ this[kError] = new RangeError('Max payload size exceeded');
+ this[kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH';
+ this[kError][kStatusCode] = 1009;
+ this.removeListener('data', inflateOnData);
+
+ //
+ // The choice to employ `zlib.reset()` over `zlib.close()` is dictated by the
+ // fact that in Node.js versions prior to 13.10.0, the callback for
+ // `zlib.flush()` is not called if `zlib.close()` is used. Utilizing
+ // `zlib.reset()` ensures that either the callback is invoked or an error is
+ // emitted.
+ //
+ this.reset();
+}
+
+/**
+ * The listener of the `zlib.InflateRaw` stream `'error'` event.
+ *
+ * @param {Error} err The emitted error
+ * @private
+ */
+function inflateOnError(err) {
+ //
+ // There is no need to call `Zlib#close()` as the handle is automatically
+ // closed when an error is emitted.
+ //
+ this[kPerMessageDeflate]._inflate = null;
+
+ if (this[kError]) {
+ this[kCallback](this[kError]);
+ return;
+ }
+
+ err[kStatusCode] = 1007;
+ this[kCallback](err);
+}
+
+
+/***/ }),
+
+/***/ 37620:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+const { Writable } = __webpack_require__(2203);
+
+const PerMessageDeflate = __webpack_require__(61613);
+const {
+ BINARY_TYPES,
+ EMPTY_BUFFER,
+ kStatusCode,
+ kWebSocket
+} = __webpack_require__(93920);
+const { concat, toArrayBuffer, unmask } = __webpack_require__(65348);
+const { isValidStatusCode, isValidUTF8 } = __webpack_require__(72002);
+
+const FastBuffer = Buffer[Symbol.species];
+
+const GET_INFO = 0;
+const GET_PAYLOAD_LENGTH_16 = 1;
+const GET_PAYLOAD_LENGTH_64 = 2;
+const GET_MASK = 3;
+const GET_DATA = 4;
+const INFLATING = 5;
+const DEFER_EVENT = 6;
+
+/**
+ * HyBi Receiver implementation.
+ *
+ * @extends Writable
+ */
+class Receiver extends Writable {
+ /**
+ * Creates a Receiver instance.
+ *
+ * @param {Object} [options] Options object
+ * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
+ * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
+ * multiple times in the same tick
+ * @param {String} [options.binaryType=nodebuffer] The type for binary data
+ * @param {Object} [options.extensions] An object containing the negotiated
+ * extensions
+ * @param {Boolean} [options.isServer=false] Specifies whether to operate in
+ * client or server mode
+ * @param {Number} [options.maxBufferedChunks=0] The maximum number of
+ * buffered data chunks
+ * @param {Number} [options.maxFragments=0] The maximum number of message
+ * fragments
+ * @param {Number} [options.maxPayload=0] The maximum allowed message length
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
+ * not to skip UTF-8 validation for text and close messages
+ */
+ constructor(options = {}) {
+ super();
+
+ this._allowSynchronousEvents =
+ options.allowSynchronousEvents !== undefined
+ ? options.allowSynchronousEvents
+ : true;
+ this._binaryType = options.binaryType || BINARY_TYPES[0];
+ this._extensions = options.extensions || {};
+ this._isServer = !!options.isServer;
+ this._maxBufferedChunks = options.maxBufferedChunks | 0;
+ this._maxFragments = options.maxFragments | 0;
+ this._maxPayload = options.maxPayload | 0;
+ this._skipUTF8Validation = !!options.skipUTF8Validation;
+ this[kWebSocket] = undefined;
+
+ this._bufferedBytes = 0;
+ this._buffers = [];
+
+ this._compressed = false;
+ this._payloadLength = 0;
+ this._mask = undefined;
+ this._fragmented = 0;
+ this._masked = false;
+ this._fin = false;
+ this._opcode = 0;
+
+ this._totalPayloadLength = 0;
+ this._messageLength = 0;
+ this._numFragments = 0;
+ this._fragments = [];
+
+ this._errored = false;
+ this._loop = false;
+ this._state = GET_INFO;
+ }
+
+ /**
+ * Implements `Writable.prototype._write()`.
+ *
+ * @param {Buffer} chunk The chunk of data to write
+ * @param {String} encoding The character encoding of `chunk`
+ * @param {Function} cb Callback
+ * @private
+ */
+ _write(chunk, encoding, cb) {
+ if (this._opcode === 0x08 && this._state == GET_INFO) return cb();
+
+ if (
+ this._maxBufferedChunks > 0 &&
+ this._buffers.length >= this._maxBufferedChunks
+ ) {
+ cb(
+ this.createError(
+ RangeError,
+ 'Too many buffered chunks',
+ false,
+ 1008,
+ 'WS_ERR_TOO_MANY_BUFFERED_PARTS'
+ )
+ );
+ return;
+ }
+
+ this._bufferedBytes += chunk.length;
+ this._buffers.push(chunk);
+ this.startLoop(cb);
+ }
+
+ /**
+ * Consumes `n` bytes from the buffered data.
+ *
+ * @param {Number} n The number of bytes to consume
+ * @return {Buffer} The consumed bytes
+ * @private
+ */
+ consume(n) {
+ this._bufferedBytes -= n;
+
+ if (n === this._buffers[0].length) return this._buffers.shift();
+
+ if (n < this._buffers[0].length) {
+ const buf = this._buffers[0];
+ this._buffers[0] = new FastBuffer(
+ buf.buffer,
+ buf.byteOffset + n,
+ buf.length - n
+ );
+
+ return new FastBuffer(buf.buffer, buf.byteOffset, n);
+ }
+
+ const dst = Buffer.allocUnsafe(n);
+
+ do {
+ const buf = this._buffers[0];
+ const offset = dst.length - n;
+
+ if (n >= buf.length) {
+ dst.set(this._buffers.shift(), offset);
+ } else {
+ dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
+ this._buffers[0] = new FastBuffer(
+ buf.buffer,
+ buf.byteOffset + n,
+ buf.length - n
+ );
+ }
+
+ n -= buf.length;
+ } while (n > 0);
+
+ return dst;
+ }
+
+ /**
+ * Starts the parsing loop.
+ *
+ * @param {Function} cb Callback
+ * @private
+ */
+ startLoop(cb) {
+ this._loop = true;
+
+ do {
+ switch (this._state) {
+ case GET_INFO:
+ this.getInfo(cb);
+ break;
+ case GET_PAYLOAD_LENGTH_16:
+ this.getPayloadLength16(cb);
+ break;
+ case GET_PAYLOAD_LENGTH_64:
+ this.getPayloadLength64(cb);
+ break;
+ case GET_MASK:
+ this.getMask();
+ break;
+ case GET_DATA:
+ this.getData(cb);
+ break;
+ case INFLATING:
+ case DEFER_EVENT:
+ this._loop = false;
+ return;
+ }
+ } while (this._loop);
+
+ if (!this._errored) cb();
+ }
+
+ /**
+ * Reads the first two bytes of a frame.
+ *
+ * @param {Function} cb Callback
+ * @private
+ */
+ getInfo(cb) {
+ if (this._bufferedBytes < 2) {
+ this._loop = false;
+ return;
+ }
+
+ const buf = this.consume(2);
+
+ if ((buf[0] & 0x30) !== 0x00) {
+ const error = this.createError(
+ RangeError,
+ 'RSV2 and RSV3 must be clear',
+ true,
+ 1002,
+ 'WS_ERR_UNEXPECTED_RSV_2_3'
+ );
+
+ cb(error);
+ return;
+ }
+
+ const compressed = (buf[0] & 0x40) === 0x40;
+
+ if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
+ const error = this.createError(
+ RangeError,
+ 'RSV1 must be clear',
+ true,
+ 1002,
+ 'WS_ERR_UNEXPECTED_RSV_1'
+ );
+
+ cb(error);
+ return;
+ }
+
+ this._fin = (buf[0] & 0x80) === 0x80;
+ this._opcode = buf[0] & 0x0f;
+ this._payloadLength = buf[1] & 0x7f;
+
+ if (this._opcode === 0x00) {
+ if (compressed) {
+ const error = this.createError(
+ RangeError,
+ 'RSV1 must be clear',
+ true,
+ 1002,
+ 'WS_ERR_UNEXPECTED_RSV_1'
+ );
+
+ cb(error);
+ return;
+ }
+
+ if (!this._fragmented) {
+ const error = this.createError(
+ RangeError,
+ 'invalid opcode 0',
+ true,
+ 1002,
+ 'WS_ERR_INVALID_OPCODE'
+ );
+
+ cb(error);
+ return;
+ }
+
+ this._opcode = this._fragmented;
+ } else if (this._opcode === 0x01 || this._opcode === 0x02) {
+ if (this._fragmented) {
+ const error = this.createError(
+ RangeError,
+ `invalid opcode ${this._opcode}`,
+ true,
+ 1002,
+ 'WS_ERR_INVALID_OPCODE'
+ );
+
+ cb(error);
+ return;
+ }
+
+ this._compressed = compressed;
+ } else if (this._opcode > 0x07 && this._opcode < 0x0b) {
+ if (!this._fin) {
+ const error = this.createError(
+ RangeError,
+ 'FIN must be set',
+ true,
+ 1002,
+ 'WS_ERR_EXPECTED_FIN'
+ );
+
+ cb(error);
+ return;
+ }
+
+ if (compressed) {
+ const error = this.createError(
+ RangeError,
+ 'RSV1 must be clear',
+ true,
+ 1002,
+ 'WS_ERR_UNEXPECTED_RSV_1'
+ );
+
+ cb(error);
+ return;
+ }
+
+ if (
+ this._payloadLength > 0x7d ||
+ (this._opcode === 0x08 && this._payloadLength === 1)
+ ) {
+ const error = this.createError(
+ RangeError,
+ `invalid payload length ${this._payloadLength}`,
+ true,
+ 1002,
+ 'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH'
+ );
+
+ cb(error);
+ return;
+ }
+ } else {
+ const error = this.createError(
+ RangeError,
+ `invalid opcode ${this._opcode}`,
+ true,
+ 1002,
+ 'WS_ERR_INVALID_OPCODE'
+ );
+
+ cb(error);
+ return;
+ }
+
+ if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
+ this._masked = (buf[1] & 0x80) === 0x80;
+
+ if (this._isServer) {
+ if (!this._masked) {
+ const error = this.createError(
+ RangeError,
+ 'MASK must be set',
+ true,
+ 1002,
+ 'WS_ERR_EXPECTED_MASK'
+ );
+
+ cb(error);
+ return;
+ }
+ } else if (this._masked) {
+ const error = this.createError(
+ RangeError,
+ 'MASK must be clear',
+ true,
+ 1002,
+ 'WS_ERR_UNEXPECTED_MASK'
+ );
+
+ cb(error);
+ return;
+ }
+
+ if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
+ else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
+ else this.haveLength(cb);
+ }
+
+ /**
+ * Gets extended payload length (7+16).
+ *
+ * @param {Function} cb Callback
+ * @private
+ */
+ getPayloadLength16(cb) {
+ if (this._bufferedBytes < 2) {
+ this._loop = false;
+ return;
+ }
+
+ this._payloadLength = this.consume(2).readUInt16BE(0);
+ this.haveLength(cb);
+ }
+
+ /**
+ * Gets extended payload length (7+64).
+ *
+ * @param {Function} cb Callback
+ * @private
+ */
+ getPayloadLength64(cb) {
+ if (this._bufferedBytes < 8) {
+ this._loop = false;
+ return;
+ }
+
+ const buf = this.consume(8);
+ const num = buf.readUInt32BE(0);
+
+ //
+ // The maximum safe integer in JavaScript is 2^53 - 1. An error is returned
+ // if payload length is greater than this number.
+ //
+ if (num > Math.pow(2, 53 - 32) - 1) {
+ const error = this.createError(
+ RangeError,
+ 'Unsupported WebSocket frame: payload length > 2^53 - 1',
+ false,
+ 1009,
+ 'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH'
+ );
+
+ cb(error);
+ return;
+ }
+
+ this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
+ this.haveLength(cb);
+ }
+
+ /**
+ * Payload length has been read.
+ *
+ * @param {Function} cb Callback
+ * @private
+ */
+ haveLength(cb) {
+ if (this._payloadLength && this._opcode < 0x08) {
+ this._totalPayloadLength += this._payloadLength;
+ if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
+ const error = this.createError(
+ RangeError,
+ 'Max payload size exceeded',
+ false,
+ 1009,
+ 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
+ );
+
+ cb(error);
+ return;
+ }
+ }
+
+ if (this._masked) this._state = GET_MASK;
+ else this._state = GET_DATA;
+ }
+
+ /**
+ * Reads mask bytes.
+ *
+ * @private
+ */
+ getMask() {
+ if (this._bufferedBytes < 4) {
+ this._loop = false;
+ return;
+ }
+
+ this._mask = this.consume(4);
+ this._state = GET_DATA;
+ }
+
+ /**
+ * Reads data bytes.
+ *
+ * @param {Function} cb Callback
+ * @private
+ */
+ getData(cb) {
+ let data = EMPTY_BUFFER;
+
+ if (this._payloadLength) {
+ if (this._bufferedBytes < this._payloadLength) {
+ this._loop = false;
+ return;
+ }
+
+ data = this.consume(this._payloadLength);
+
+ if (
+ this._masked &&
+ (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0
+ ) {
+ unmask(data, this._mask);
+ }
+ }
+
+ if (this._opcode > 0x07) {
+ this.controlMessage(data, cb);
+ return;
+ }
+
+ if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
+ const error = this.createError(
+ RangeError,
+ 'Too many message fragments',
+ false,
+ 1008,
+ 'WS_ERR_TOO_MANY_BUFFERED_PARTS'
+ );
+
+ cb(error);
+ return;
+ }
+
+ if (this._compressed) {
+ this._state = INFLATING;
+ this.decompress(data, cb);
+ return;
+ }
+
+ if (data.length) {
+ //
+ // This message is not compressed so its length is the sum of the payload
+ // length of all fragments.
+ //
+ this._messageLength = this._totalPayloadLength;
+ this._fragments.push(data);
+ }
+
+ this.dataMessage(cb);
+ }
+
+ /**
+ * Decompresses data.
+ *
+ * @param {Buffer} data Compressed data
+ * @param {Function} cb Callback
+ * @private
+ */
+ decompress(data, cb) {
+ const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
+
+ perMessageDeflate.decompress(data, this._fin, (err, buf) => {
+ if (err) return cb(err);
+
+ if (buf.length) {
+ this._messageLength += buf.length;
+ if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
+ const error = this.createError(
+ RangeError,
+ 'Max payload size exceeded',
+ false,
+ 1009,
+ 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
+ );
+
+ cb(error);
+ return;
+ }
+
+ this._fragments.push(buf);
+ }
+
+ this.dataMessage(cb);
+ if (this._state === GET_INFO) this.startLoop(cb);
+ });
+ }
+
+ /**
+ * Handles a data message.
+ *
+ * @param {Function} cb Callback
+ * @private
+ */
+ dataMessage(cb) {
+ if (!this._fin) {
+ this._state = GET_INFO;
+ return;
+ }
+
+ const messageLength = this._messageLength;
+ const fragments = this._fragments;
+
+ this._totalPayloadLength = 0;
+ this._messageLength = 0;
+ this._fragmented = 0;
+ this._numFragments = 0;
+ this._fragments = [];
+
+ if (this._opcode === 2) {
+ let data;
+
+ if (this._binaryType === 'nodebuffer') {
+ data = concat(fragments, messageLength);
+ } else if (this._binaryType === 'arraybuffer') {
+ data = toArrayBuffer(concat(fragments, messageLength));
+ } else if (this._binaryType === 'blob') {
+ data = new Blob(fragments);
+ } else {
+ data = fragments;
+ }
+
+ if (this._allowSynchronousEvents) {
+ this.emit('message', data, true);
+ this._state = GET_INFO;
+ } else {
+ this._state = DEFER_EVENT;
+ setImmediate(() => {
+ this.emit('message', data, true);
+ this._state = GET_INFO;
+ this.startLoop(cb);
+ });
+ }
+ } else {
+ const buf = concat(fragments, messageLength);
+
+ if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
+ const error = this.createError(
+ Error,
+ 'invalid UTF-8 sequence',
+ true,
+ 1007,
+ 'WS_ERR_INVALID_UTF8'
+ );
+
+ cb(error);
+ return;
+ }
+
+ if (this._state === INFLATING || this._allowSynchronousEvents) {
+ this.emit('message', buf, false);
+ this._state = GET_INFO;
+ } else {
+ this._state = DEFER_EVENT;
+ setImmediate(() => {
+ this.emit('message', buf, false);
+ this._state = GET_INFO;
+ this.startLoop(cb);
+ });
+ }
+ }
+ }
+
+ /**
+ * Handles a control message.
+ *
+ * @param {Buffer} data Data to handle
+ * @return {(Error|RangeError|undefined)} A possible error
+ * @private
+ */
+ controlMessage(data, cb) {
+ if (this._opcode === 0x08) {
+ if (data.length === 0) {
+ this._loop = false;
+ this.emit('conclude', 1005, EMPTY_BUFFER);
+ this.end();
+ } else {
+ const code = data.readUInt16BE(0);
+
+ if (!isValidStatusCode(code)) {
+ const error = this.createError(
+ RangeError,
+ `invalid status code ${code}`,
+ true,
+ 1002,
+ 'WS_ERR_INVALID_CLOSE_CODE'
+ );
+
+ cb(error);
+ return;
+ }
+
+ const buf = new FastBuffer(
+ data.buffer,
+ data.byteOffset + 2,
+ data.length - 2
+ );
+
+ if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
+ const error = this.createError(
+ Error,
+ 'invalid UTF-8 sequence',
+ true,
+ 1007,
+ 'WS_ERR_INVALID_UTF8'
+ );
+
+ cb(error);
+ return;
+ }
+
+ this._loop = false;
+ this.emit('conclude', code, buf);
+ this.end();
+ }
+
+ this._state = GET_INFO;
+ return;
+ }
+
+ if (this._allowSynchronousEvents) {
+ this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
+ this._state = GET_INFO;
+ } else {
+ this._state = DEFER_EVENT;
+ setImmediate(() => {
+ this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
+ this._state = GET_INFO;
+ this.startLoop(cb);
+ });
+ }
+ }
+
+ /**
+ * Builds an error object.
+ *
+ * @param {function(new:Error|RangeError)} ErrorCtor The error constructor
+ * @param {String} message The error message
+ * @param {Boolean} prefix Specifies whether or not to add a default prefix to
+ * `message`
+ * @param {Number} statusCode The status code
+ * @param {String} errorCode The exposed error code
+ * @return {(Error|RangeError)} The error
+ * @private
+ */
+ createError(ErrorCtor, message, prefix, statusCode, errorCode) {
+ this._loop = false;
+ this._errored = true;
+
+ const err = new ErrorCtor(
+ prefix ? `Invalid WebSocket frame: ${message}` : message
+ );
+
+ Error.captureStackTrace(err, this.createError);
+ err.code = errorCode;
+ err[kStatusCode] = statusCode;
+ return err;
+ }
+}
+
+module.exports = Receiver;
+
+
+/***/ }),
+
+/***/ 18604:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex" }] */
+
+
+
+const { Duplex } = __webpack_require__(2203);
+const { randomFillSync } = __webpack_require__(76982);
+const {
+ types: { isUint8Array }
+} = __webpack_require__(39023);
+
+const PerMessageDeflate = __webpack_require__(61613);
+const { EMPTY_BUFFER, kWebSocket, NOOP } = __webpack_require__(93920);
+const { isBlob, isValidStatusCode } = __webpack_require__(72002);
+const { mask: applyMask, toBuffer } = __webpack_require__(65348);
+
+const kByteLength = Symbol('kByteLength');
+const maskBuffer = Buffer.alloc(4);
+const RANDOM_POOL_SIZE = 8 * 1024;
+let randomPool;
+let randomPoolPointer = RANDOM_POOL_SIZE;
+
+const DEFAULT = 0;
+const DEFLATING = 1;
+const GET_BLOB_DATA = 2;
+
+/**
+ * HyBi Sender implementation.
+ */
+class Sender {
+ /**
+ * Creates a Sender instance.
+ *
+ * @param {Duplex} socket The connection socket
+ * @param {Object} [extensions] An object containing the negotiated extensions
+ * @param {Function} [generateMask] The function used to generate the masking
+ * key
+ */
+ constructor(socket, extensions, generateMask) {
+ this._extensions = extensions || {};
+
+ if (generateMask) {
+ this._generateMask = generateMask;
+ this._maskBuffer = Buffer.alloc(4);
+ }
+
+ this._socket = socket;
+
+ this._firstFragment = true;
+ this._compress = false;
+
+ this._bufferedBytes = 0;
+ this._queue = [];
+ this._state = DEFAULT;
+ this.onerror = NOOP;
+ this[kWebSocket] = undefined;
+ }
+
+ /**
+ * Frames a piece of data according to the HyBi WebSocket protocol.
+ *
+ * @param {(Buffer|String)} data The data to frame
+ * @param {Object} options Options object
+ * @param {Boolean} [options.fin=false] Specifies whether or not to set the
+ * FIN bit
+ * @param {Function} [options.generateMask] The function used to generate the
+ * masking key
+ * @param {Boolean} [options.mask=false] Specifies whether or not to mask
+ * `data`
+ * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
+ * key
+ * @param {Number} options.opcode The opcode
+ * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
+ * modified
+ * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
+ * RSV1 bit
+ * @return {(Buffer|String)[]} The framed data
+ * @public
+ */
+ static frame(data, options) {
+ let mask;
+ let merge = false;
+ let offset = 2;
+ let skipMasking = false;
+
+ if (options.mask) {
+ mask = options.maskBuffer || maskBuffer;
+
+ if (options.generateMask) {
+ options.generateMask(mask);
+ } else {
+ if (randomPoolPointer === RANDOM_POOL_SIZE) {
+ /* istanbul ignore else */
+ if (randomPool === undefined) {
+ //
+ // This is lazily initialized because server-sent frames must not
+ // be masked so it may never be used.
+ //
+ randomPool = Buffer.alloc(RANDOM_POOL_SIZE);
+ }
+
+ randomFillSync(randomPool, 0, RANDOM_POOL_SIZE);
+ randomPoolPointer = 0;
+ }
+
+ mask[0] = randomPool[randomPoolPointer++];
+ mask[1] = randomPool[randomPoolPointer++];
+ mask[2] = randomPool[randomPoolPointer++];
+ mask[3] = randomPool[randomPoolPointer++];
+ }
+
+ skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0;
+ offset = 6;
+ }
+
+ let dataLength;
+
+ if (typeof data === 'string') {
+ if (
+ (!options.mask || skipMasking) &&
+ options[kByteLength] !== undefined
+ ) {
+ dataLength = options[kByteLength];
+ } else {
+ data = Buffer.from(data);
+ dataLength = data.length;
+ }
+ } else {
+ dataLength = data.length;
+ merge = options.mask && options.readOnly && !skipMasking;
+ }
+
+ let payloadLength = dataLength;
+
+ if (dataLength >= 65536) {
+ offset += 8;
+ payloadLength = 127;
+ } else if (dataLength > 125) {
+ offset += 2;
+ payloadLength = 126;
+ }
+
+ const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset);
+
+ target[0] = options.fin ? options.opcode | 0x80 : options.opcode;
+ if (options.rsv1) target[0] |= 0x40;
+
+ target[1] = payloadLength;
+
+ if (payloadLength === 126) {
+ target.writeUInt16BE(dataLength, 2);
+ } else if (payloadLength === 127) {
+ target[2] = target[3] = 0;
+ target.writeUIntBE(dataLength, 4, 6);
+ }
+
+ if (!options.mask) return [target, data];
+
+ target[1] |= 0x80;
+ target[offset - 4] = mask[0];
+ target[offset - 3] = mask[1];
+ target[offset - 2] = mask[2];
+ target[offset - 1] = mask[3];
+
+ if (skipMasking) return [target, data];
+
+ if (merge) {
+ applyMask(data, mask, target, offset, dataLength);
+ return [target];
+ }
+
+ applyMask(data, mask, data, 0, dataLength);
+ return [target, data];
+ }
+
+ /**
+ * Sends a close message to the other peer.
+ *
+ * @param {Number} [code] The status code component of the body
+ * @param {(String|Buffer)} [data] The message component of the body
+ * @param {Boolean} [mask=false] Specifies whether or not to mask the message
+ * @param {Function} [cb] Callback
+ * @public
+ */
+ close(code, data, mask, cb) {
+ let buf;
+
+ if (code === undefined) {
+ buf = EMPTY_BUFFER;
+ } else if (typeof code !== 'number' || !isValidStatusCode(code)) {
+ throw new TypeError('First argument must be a valid error code number');
+ } else if (data === undefined || !data.length) {
+ buf = Buffer.allocUnsafe(2);
+ buf.writeUInt16BE(code, 0);
+ } else {
+ const length = Buffer.byteLength(data);
+
+ if (length > 123) {
+ throw new RangeError('The message must not be greater than 123 bytes');
+ }
+
+ buf = Buffer.allocUnsafe(2 + length);
+ buf.writeUInt16BE(code, 0);
+
+ if (typeof data === 'string') {
+ buf.write(data, 2);
+ } else if (isUint8Array(data)) {
+ buf.set(data, 2);
+ } else {
+ throw new TypeError('Second argument must be a string or a Uint8Array');
+ }
+ }
+
+ const options = {
+ [kByteLength]: buf.length,
+ fin: true,
+ generateMask: this._generateMask,
+ mask,
+ maskBuffer: this._maskBuffer,
+ opcode: 0x08,
+ readOnly: false,
+ rsv1: false
+ };
+
+ if (this._state !== DEFAULT) {
+ this.enqueue([this.dispatch, buf, false, options, cb]);
+ } else {
+ this.sendFrame(Sender.frame(buf, options), cb);
+ }
+ }
+
+ /**
+ * Sends a ping message to the other peer.
+ *
+ * @param {*} data The message to send
+ * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
+ * @param {Function} [cb] Callback
+ * @public
+ */
+ ping(data, mask, cb) {
+ let byteLength;
+ let readOnly;
+
+ if (typeof data === 'string') {
+ byteLength = Buffer.byteLength(data);
+ readOnly = false;
+ } else if (isBlob(data)) {
+ byteLength = data.size;
+ readOnly = false;
+ } else {
+ data = toBuffer(data);
+ byteLength = data.length;
+ readOnly = toBuffer.readOnly;
+ }
+
+ if (byteLength > 125) {
+ throw new RangeError('The data size must not be greater than 125 bytes');
+ }
+
+ const options = {
+ [kByteLength]: byteLength,
+ fin: true,
+ generateMask: this._generateMask,
+ mask,
+ maskBuffer: this._maskBuffer,
+ opcode: 0x09,
+ readOnly,
+ rsv1: false
+ };
+
+ if (isBlob(data)) {
+ if (this._state !== DEFAULT) {
+ this.enqueue([this.getBlobData, data, false, options, cb]);
+ } else {
+ this.getBlobData(data, false, options, cb);
+ }
+ } else if (this._state !== DEFAULT) {
+ this.enqueue([this.dispatch, data, false, options, cb]);
+ } else {
+ this.sendFrame(Sender.frame(data, options), cb);
+ }
+ }
+
+ /**
+ * Sends a pong message to the other peer.
+ *
+ * @param {*} data The message to send
+ * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
+ * @param {Function} [cb] Callback
+ * @public
+ */
+ pong(data, mask, cb) {
+ let byteLength;
+ let readOnly;
+
+ if (typeof data === 'string') {
+ byteLength = Buffer.byteLength(data);
+ readOnly = false;
+ } else if (isBlob(data)) {
+ byteLength = data.size;
+ readOnly = false;
+ } else {
+ data = toBuffer(data);
+ byteLength = data.length;
+ readOnly = toBuffer.readOnly;
+ }
+
+ if (byteLength > 125) {
+ throw new RangeError('The data size must not be greater than 125 bytes');
+ }
+
+ const options = {
+ [kByteLength]: byteLength,
+ fin: true,
+ generateMask: this._generateMask,
+ mask,
+ maskBuffer: this._maskBuffer,
+ opcode: 0x0a,
+ readOnly,
+ rsv1: false
+ };
+
+ if (isBlob(data)) {
+ if (this._state !== DEFAULT) {
+ this.enqueue([this.getBlobData, data, false, options, cb]);
+ } else {
+ this.getBlobData(data, false, options, cb);
+ }
+ } else if (this._state !== DEFAULT) {
+ this.enqueue([this.dispatch, data, false, options, cb]);
+ } else {
+ this.sendFrame(Sender.frame(data, options), cb);
+ }
+ }
+
+ /**
+ * Sends a data message to the other peer.
+ *
+ * @param {*} data The message to send
+ * @param {Object} options Options object
+ * @param {Boolean} [options.binary=false] Specifies whether `data` is binary
+ * or text
+ * @param {Boolean} [options.compress=false] Specifies whether or not to
+ * compress `data`
+ * @param {Boolean} [options.fin=false] Specifies whether the fragment is the
+ * last one
+ * @param {Boolean} [options.mask=false] Specifies whether or not to mask
+ * `data`
+ * @param {Function} [cb] Callback
+ * @public
+ */
+ send(data, options, cb) {
+ const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
+ let opcode = options.binary ? 2 : 1;
+ let rsv1 = options.compress;
+
+ let byteLength;
+ let readOnly;
+
+ if (typeof data === 'string') {
+ byteLength = Buffer.byteLength(data);
+ readOnly = false;
+ } else if (isBlob(data)) {
+ byteLength = data.size;
+ readOnly = false;
+ } else {
+ data = toBuffer(data);
+ byteLength = data.length;
+ readOnly = toBuffer.readOnly;
+ }
+
+ if (this._firstFragment) {
+ this._firstFragment = false;
+ if (
+ rsv1 &&
+ perMessageDeflate &&
+ perMessageDeflate.params[
+ perMessageDeflate._isServer
+ ? 'server_no_context_takeover'
+ : 'client_no_context_takeover'
+ ]
+ ) {
+ rsv1 = byteLength >= perMessageDeflate._threshold;
+ }
+ this._compress = rsv1;
+ } else {
+ rsv1 = false;
+ opcode = 0;
+ }
+
+ if (options.fin) this._firstFragment = true;
+
+ const opts = {
+ [kByteLength]: byteLength,
+ fin: options.fin,
+ generateMask: this._generateMask,
+ mask: options.mask,
+ maskBuffer: this._maskBuffer,
+ opcode,
+ readOnly,
+ rsv1
+ };
+
+ if (isBlob(data)) {
+ if (this._state !== DEFAULT) {
+ this.enqueue([this.getBlobData, data, this._compress, opts, cb]);
+ } else {
+ this.getBlobData(data, this._compress, opts, cb);
+ }
+ } else if (this._state !== DEFAULT) {
+ this.enqueue([this.dispatch, data, this._compress, opts, cb]);
+ } else {
+ this.dispatch(data, this._compress, opts, cb);
+ }
+ }
+
+ /**
+ * Gets the contents of a blob as binary data.
+ *
+ * @param {Blob} blob The blob
+ * @param {Boolean} [compress=false] Specifies whether or not to compress
+ * the data
+ * @param {Object} options Options object
+ * @param {Boolean} [options.fin=false] Specifies whether or not to set the
+ * FIN bit
+ * @param {Function} [options.generateMask] The function used to generate the
+ * masking key
+ * @param {Boolean} [options.mask=false] Specifies whether or not to mask
+ * `data`
+ * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
+ * key
+ * @param {Number} options.opcode The opcode
+ * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
+ * modified
+ * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
+ * RSV1 bit
+ * @param {Function} [cb] Callback
+ * @private
+ */
+ getBlobData(blob, compress, options, cb) {
+ this._bufferedBytes += options[kByteLength];
+ this._state = GET_BLOB_DATA;
+
+ blob
+ .arrayBuffer()
+ .then((arrayBuffer) => {
+ if (this._socket.destroyed) {
+ const err = new Error(
+ 'The socket was closed while the blob was being read'
+ );
+
+ //
+ // `callCallbacks` is called in the next tick to ensure that errors
+ // that might be thrown in the callbacks behave like errors thrown
+ // outside the promise chain.
+ //
+ process.nextTick(callCallbacks, this, err, cb);
+ return;
+ }
+
+ this._bufferedBytes -= options[kByteLength];
+ const data = toBuffer(arrayBuffer);
+
+ if (!compress) {
+ this._state = DEFAULT;
+ this.sendFrame(Sender.frame(data, options), cb);
+ this.dequeue();
+ } else {
+ this.dispatch(data, compress, options, cb);
+ }
+ })
+ .catch((err) => {
+ //
+ // `onError` is called in the next tick for the same reason that
+ // `callCallbacks` above is.
+ //
+ process.nextTick(onError, this, err, cb);
+ });
+ }
+
+ /**
+ * Dispatches a message.
+ *
+ * @param {(Buffer|String)} data The message to send
+ * @param {Boolean} [compress=false] Specifies whether or not to compress
+ * `data`
+ * @param {Object} options Options object
+ * @param {Boolean} [options.fin=false] Specifies whether or not to set the
+ * FIN bit
+ * @param {Function} [options.generateMask] The function used to generate the
+ * masking key
+ * @param {Boolean} [options.mask=false] Specifies whether or not to mask
+ * `data`
+ * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
+ * key
+ * @param {Number} options.opcode The opcode
+ * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
+ * modified
+ * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
+ * RSV1 bit
+ * @param {Function} [cb] Callback
+ * @private
+ */
+ dispatch(data, compress, options, cb) {
+ if (!compress) {
+ this.sendFrame(Sender.frame(data, options), cb);
+ return;
+ }
+
+ const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
+
+ this._bufferedBytes += options[kByteLength];
+ this._state = DEFLATING;
+ perMessageDeflate.compress(data, options.fin, (_, buf) => {
+ if (this._socket.destroyed) {
+ const err = new Error(
+ 'The socket was closed while data was being compressed'
+ );
+
+ callCallbacks(this, err, cb);
+ return;
+ }
+
+ this._bufferedBytes -= options[kByteLength];
+ this._state = DEFAULT;
+ options.readOnly = false;
+ this.sendFrame(Sender.frame(buf, options), cb);
+ this.dequeue();
+ });
+ }
+
+ /**
+ * Executes queued send operations.
+ *
+ * @private
+ */
+ dequeue() {
+ while (this._state === DEFAULT && this._queue.length) {
+ const params = this._queue.shift();
+
+ this._bufferedBytes -= params[3][kByteLength];
+ Reflect.apply(params[0], this, params.slice(1));
+ }
+ }
+
+ /**
+ * Enqueues a send operation.
+ *
+ * @param {Array} params Send operation parameters.
+ * @private
+ */
+ enqueue(params) {
+ this._bufferedBytes += params[3][kByteLength];
+ this._queue.push(params);
+ }
+
+ /**
+ * Sends a frame.
+ *
+ * @param {(Buffer | String)[]} list The frame to send
+ * @param {Function} [cb] Callback
+ * @private
+ */
+ sendFrame(list, cb) {
+ if (list.length === 2) {
+ this._socket.cork();
+ this._socket.write(list[0]);
+ this._socket.write(list[1], cb);
+ this._socket.uncork();
+ } else {
+ this._socket.write(list[0], cb);
+ }
+ }
+}
+
+module.exports = Sender;
+
+/**
+ * Calls queued callbacks with an error.
+ *
+ * @param {Sender} sender The `Sender` instance
+ * @param {Error} err The error to call the callbacks with
+ * @param {Function} [cb] The first callback
+ * @private
+ */
+function callCallbacks(sender, err, cb) {
+ if (typeof cb === 'function') cb(err);
+
+ for (let i = 0; i < sender._queue.length; i++) {
+ const params = sender._queue[i];
+ const callback = params[params.length - 1];
+
+ if (typeof callback === 'function') callback(err);
+ }
+}
+
+/**
+ * Handles a `Sender` error.
+ *
+ * @param {Sender} sender The `Sender` instance
+ * @param {Error} err The error
+ * @param {Function} [cb] The first pending callback
+ * @private
+ */
+function onError(sender, err, cb) {
+ callCallbacks(sender, err, cb);
+ sender.onerror(err);
+}
+
+
+/***/ }),
+
+/***/ 62509:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^WebSocket$" }] */
+
+
+const WebSocket = __webpack_require__(16126);
+const { Duplex } = __webpack_require__(2203);
+
+/**
+ * Emits the `'close'` event on a stream.
+ *
+ * @param {Duplex} stream The stream.
+ * @private
+ */
+function emitClose(stream) {
+ stream.emit('close');
+}
+
+/**
+ * The listener of the `'end'` event.
+ *
+ * @private
+ */
+function duplexOnEnd() {
+ if (!this.destroyed && this._writableState.finished) {
+ this.destroy();
+ }
+}
+
+/**
+ * The listener of the `'error'` event.
+ *
+ * @param {Error} err The error
+ * @private
+ */
+function duplexOnError(err) {
+ this.removeListener('error', duplexOnError);
+ this.destroy();
+ if (this.listenerCount('error') === 0) {
+ // Do not suppress the throwing behavior.
+ this.emit('error', err);
+ }
+}
+
+/**
+ * Wraps a `WebSocket` in a duplex stream.
+ *
+ * @param {WebSocket} ws The `WebSocket` to wrap
+ * @param {Object} [options] The options for the `Duplex` constructor
+ * @return {Duplex} The duplex stream
+ * @public
+ */
+function createWebSocketStream(ws, options) {
+ let terminateOnDestroy = true;
+
+ const duplex = new Duplex({
+ ...options,
+ autoDestroy: false,
+ emitClose: false,
+ objectMode: false,
+ writableObjectMode: false
+ });
+
+ ws.on('message', function message(msg, isBinary) {
+ const data =
+ !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
+
+ if (!duplex.push(data)) ws.pause();
+ });
+
+ ws.once('error', function error(err) {
+ if (duplex.destroyed) return;
+
+ // Prevent `ws.terminate()` from being called by `duplex._destroy()`.
+ //
+ // - If the `'error'` event is emitted before the `'open'` event, then
+ // `ws.terminate()` is a noop as no socket is assigned.
+ // - Otherwise, the error is re-emitted by the listener of the `'error'`
+ // event of the `Receiver` object. The listener already closes the
+ // connection by calling `ws.close()`. This allows a close frame to be
+ // sent to the other peer. If `ws.terminate()` is called right after this,
+ // then the close frame might not be sent.
+ terminateOnDestroy = false;
+ duplex.destroy(err);
+ });
+
+ ws.once('close', function close() {
+ if (duplex.destroyed) return;
+
+ duplex.push(null);
+ });
+
+ duplex._destroy = function (err, callback) {
+ if (ws.readyState === ws.CLOSED) {
+ callback(err);
+ process.nextTick(emitClose, duplex);
+ return;
+ }
+
+ let called = false;
+
+ ws.once('error', function error(err) {
+ called = true;
+ callback(err);
+ });
+
+ ws.once('close', function close() {
+ if (!called) callback(err);
+ process.nextTick(emitClose, duplex);
+ });
+
+ if (terminateOnDestroy) ws.terminate();
+ };
+
+ duplex._final = function (callback) {
+ if (ws.readyState === ws.CONNECTING) {
+ ws.once('open', function open() {
+ duplex._final(callback);
+ });
+ return;
+ }
+
+ // If the value of the `_socket` property is `null` it means that `ws` is a
+ // client websocket and the handshake failed. In fact, when this happens, a
+ // socket is never assigned to the websocket. Wait for the `'error'` event
+ // that will be emitted by the websocket.
+ if (ws._socket === null) return;
+
+ if (ws._socket._writableState.finished) {
+ callback();
+ if (duplex._readableState.endEmitted) duplex.destroy();
+ } else {
+ ws._socket.once('finish', function finish() {
+ // `duplex` is not destroyed here because the `'end'` event will be
+ // emitted on `duplex` after this `'finish'` event. The EOF signaling
+ // `null` chunk is, in fact, pushed when the websocket emits `'close'`.
+ callback();
+ });
+ ws.close();
+ }
+ };
+
+ duplex._read = function () {
+ if (ws.isPaused) ws.resume();
+ };
+
+ duplex._write = function (chunk, encoding, callback) {
+ if (ws.readyState === ws.CONNECTING) {
+ ws.once('open', function open() {
+ duplex._write(chunk, encoding, callback);
+ });
+ return;
+ }
+
+ ws.send(chunk, callback);
+ };
+
+ duplex.on('end', duplexOnEnd);
+ duplex.on('error', duplexOnError);
+ return duplex;
+}
+
+module.exports = createWebSocketStream;
+
+
+/***/ }),
+
+/***/ 1643:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+const { tokenChars } = __webpack_require__(72002);
+
+/**
+ * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.
+ *
+ * @param {String} header The field value of the header
+ * @return {Set} The subprotocol names
+ * @public
+ */
+function parse(header) {
+ const protocols = new Set();
+ let start = -1;
+ let end = -1;
+ let i = 0;
+
+ for (i; i < header.length; i++) {
+ const code = header.charCodeAt(i);
+
+ if (end === -1 && tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (
+ i !== 0 &&
+ (code === 0x20 /* ' ' */ || code === 0x09) /* '\t' */
+ ) {
+ if (end === -1 && start !== -1) end = i;
+ } else if (code === 0x2c /* ',' */) {
+ if (start === -1) {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+
+ if (end === -1) end = i;
+
+ const protocol = header.slice(start, end);
+
+ if (protocols.has(protocol)) {
+ throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
+ }
+
+ protocols.add(protocol);
+ start = end = -1;
+ } else {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ }
+
+ if (start === -1 || end !== -1) {
+ throw new SyntaxError('Unexpected end of input');
+ }
+
+ const protocol = header.slice(start, i);
+
+ if (protocols.has(protocol)) {
+ throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
+ }
+
+ protocols.add(protocol);
+ return protocols;
+}
+
+module.exports = { parse };
+
+
+/***/ }),
+
+/***/ 72002:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+
+const { isUtf8 } = __webpack_require__(20181);
+
+const { hasBlob } = __webpack_require__(93920);
+
+//
+// Allowed token characters:
+//
+// '!', '#', '$', '%', '&', ''', '*', '+', '-',
+// '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~'
+//
+// tokenChars[32] === 0 // ' '
+// tokenChars[33] === 1 // '!'
+// tokenChars[34] === 0 // '"'
+// ...
+//
+// prettier-ignore
+const tokenChars = [
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31
+ 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32 - 47
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64 - 79
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80 - 95
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 // 112 - 127
+];
+
+/**
+ * Checks if a status code is allowed in a close frame.
+ *
+ * @param {Number} code The status code
+ * @return {Boolean} `true` if the status code is valid, else `false`
+ * @public
+ */
+function isValidStatusCode(code) {
+ return (
+ (code >= 1000 &&
+ code <= 1014 &&
+ code !== 1004 &&
+ code !== 1005 &&
+ code !== 1006) ||
+ (code >= 3000 && code <= 4999)
+ );
+}
+
+/**
+ * Checks if a given buffer contains only correct UTF-8.
+ * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by
+ * Markus Kuhn.
+ *
+ * @param {Buffer} buf The buffer to check
+ * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false`
+ * @public
+ */
+function _isValidUTF8(buf) {
+ const len = buf.length;
+ let i = 0;
+
+ while (i < len) {
+ if ((buf[i] & 0x80) === 0) {
+ // 0xxxxxxx
+ i++;
+ } else if ((buf[i] & 0xe0) === 0xc0) {
+ // 110xxxxx 10xxxxxx
+ if (
+ i + 1 === len ||
+ (buf[i + 1] & 0xc0) !== 0x80 ||
+ (buf[i] & 0xfe) === 0xc0 // Overlong
+ ) {
+ return false;
+ }
+
+ i += 2;
+ } else if ((buf[i] & 0xf0) === 0xe0) {
+ // 1110xxxx 10xxxxxx 10xxxxxx
+ if (
+ i + 2 >= len ||
+ (buf[i + 1] & 0xc0) !== 0x80 ||
+ (buf[i + 2] & 0xc0) !== 0x80 ||
+ (buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80) || // Overlong
+ (buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0) // Surrogate (U+D800 - U+DFFF)
+ ) {
+ return false;
+ }
+
+ i += 3;
+ } else if ((buf[i] & 0xf8) === 0xf0) {
+ // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+ if (
+ i + 3 >= len ||
+ (buf[i + 1] & 0xc0) !== 0x80 ||
+ (buf[i + 2] & 0xc0) !== 0x80 ||
+ (buf[i + 3] & 0xc0) !== 0x80 ||
+ (buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80) || // Overlong
+ (buf[i] === 0xf4 && buf[i + 1] > 0x8f) ||
+ buf[i] > 0xf4 // > U+10FFFF
+ ) {
+ return false;
+ }
+
+ i += 4;
+ } else {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Determines whether a value is a `Blob`.
+ *
+ * @param {*} value The value to be tested
+ * @return {Boolean} `true` if `value` is a `Blob`, else `false`
+ * @private
+ */
+function isBlob(value) {
+ return (
+ hasBlob &&
+ typeof value === 'object' &&
+ typeof value.arrayBuffer === 'function' &&
+ typeof value.type === 'string' &&
+ typeof value.stream === 'function' &&
+ (value[Symbol.toStringTag] === 'Blob' ||
+ value[Symbol.toStringTag] === 'File')
+ );
+}
+
+module.exports = {
+ isBlob,
+ isValidStatusCode,
+ isValidUTF8: _isValidUTF8,
+ tokenChars
+};
+
+if (isUtf8) {
+ module.exports.isValidUTF8 = function (buf) {
+ return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
+ };
+} /* istanbul ignore else */ else if (!process.env.WS_NO_UTF_8_VALIDATE) {
+ try {
+ const isValidUTF8 = __webpack_require__(60710);
+
+ module.exports.isValidUTF8 = function (buf) {
+ return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
+ };
+ } catch (e) {
+ // Continue regardless of the error.
+ }
+}
+
+
+/***/ }),
+
+/***/ 96264:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$", "caughtErrors": "none" }] */
+
+
+
+const EventEmitter = __webpack_require__(24434);
+const http = __webpack_require__(58611);
+const { Duplex } = __webpack_require__(2203);
+const { createHash } = __webpack_require__(76982);
+
+const extension = __webpack_require__(98904);
+const PerMessageDeflate = __webpack_require__(61613);
+const subprotocol = __webpack_require__(1643);
+const WebSocket = __webpack_require__(16126);
+const { CLOSE_TIMEOUT, GUID, kWebSocket } = __webpack_require__(93920);
+
+const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
+
+const RUNNING = 0;
+const CLOSING = 1;
+const CLOSED = 2;
+
+/**
+ * Class representing a WebSocket server.
+ *
+ * @extends EventEmitter
+ */
+class WebSocketServer extends EventEmitter {
+ /**
+ * Create a `WebSocketServer` instance.
+ *
+ * @param {Object} options Configuration options
+ * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
+ * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
+ * multiple times in the same tick
+ * @param {Boolean} [options.autoPong=true] Specifies whether or not to
+ * automatically send a pong in response to a ping
+ * @param {Number} [options.backlog=511] The maximum length of the queue of
+ * pending connections
+ * @param {Boolean} [options.clientTracking=true] Specifies whether or not to
+ * track clients
+ * @param {Number} [options.closeTimeout=30000] Duration in milliseconds to
+ * wait for the closing handshake to finish after `websocket.close()` is
+ * called
+ * @param {Function} [options.handleProtocols] A hook to handle protocols
+ * @param {String} [options.host] The hostname where to bind the server
+ * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
+ * buffered data chunks
+ * @param {Number} [options.maxFragments=16384] The maximum number of message
+ * fragments
+ * @param {Number} [options.maxPayload=104857600] The maximum allowed message
+ * size
+ * @param {Boolean} [options.noServer=false] Enable no server mode
+ * @param {String} [options.path] Accept only connections matching this path
+ * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
+ * permessage-deflate
+ * @param {Number} [options.port] The port where to bind the server
+ * @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S
+ * server to use
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
+ * not to skip UTF-8 validation for text and close messages
+ * @param {Function} [options.verifyClient] A hook to reject connections
+ * @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket`
+ * class to use. It must be the `WebSocket` class or class that extends it
+ * @param {Function} [callback] A listener for the `listening` event
+ */
+ constructor(options, callback) {
+ super();
+
+ options = {
+ allowSynchronousEvents: true,
+ autoPong: true,
+ maxBufferedChunks: 256 * 1024,
+ maxFragments: 16 * 1024,
+ maxPayload: 100 * 1024 * 1024,
+ skipUTF8Validation: false,
+ perMessageDeflate: false,
+ handleProtocols: null,
+ clientTracking: true,
+ closeTimeout: CLOSE_TIMEOUT,
+ verifyClient: null,
+ noServer: false,
+ backlog: null, // use default (511 as implemented in net.js)
+ server: null,
+ host: null,
+ path: null,
+ port: null,
+ WebSocket,
+ ...options
+ };
+
+ if (
+ (options.port == null && !options.server && !options.noServer) ||
+ (options.port != null && (options.server || options.noServer)) ||
+ (options.server && options.noServer)
+ ) {
+ throw new TypeError(
+ 'One and only one of the "port", "server", or "noServer" options ' +
+ 'must be specified'
+ );
+ }
+
+ if (options.port != null) {
+ this._server = http.createServer((req, res) => {
+ const body = http.STATUS_CODES[426];
+
+ res.writeHead(426, {
+ 'Content-Length': body.length,
+ 'Content-Type': 'text/plain'
+ });
+ res.end(body);
+ });
+ this._server.listen(
+ options.port,
+ options.host,
+ options.backlog,
+ callback
+ );
+ } else if (options.server) {
+ this._server = options.server;
+ }
+
+ if (this._server) {
+ const emitConnection = this.emit.bind(this, 'connection');
+
+ this._removeListeners = addListeners(this._server, {
+ listening: this.emit.bind(this, 'listening'),
+ error: this.emit.bind(this, 'error'),
+ upgrade: (req, socket, head) => {
+ this.handleUpgrade(req, socket, head, emitConnection);
+ }
+ });
+ }
+
+ if (options.perMessageDeflate === true) options.perMessageDeflate = {};
+ if (options.clientTracking) {
+ this.clients = new Set();
+ this._shouldEmitClose = false;
+ }
+
+ this.options = options;
+ this._state = RUNNING;
+ }
+
+ /**
+ * Returns the bound address, the address family name, and port of the server
+ * as reported by the operating system if listening on an IP socket.
+ * If the server is listening on a pipe or UNIX domain socket, the name is
+ * returned as a string.
+ *
+ * @return {(Object|String|null)} The address of the server
+ * @public
+ */
+ address() {
+ if (this.options.noServer) {
+ throw new Error('The server is operating in "noServer" mode');
+ }
+
+ if (!this._server) return null;
+ return this._server.address();
+ }
+
+ /**
+ * Stop the server from accepting new connections and emit the `'close'` event
+ * when all existing connections are closed.
+ *
+ * @param {Function} [cb] A one-time listener for the `'close'` event
+ * @public
+ */
+ close(cb) {
+ if (this._state === CLOSED) {
+ if (cb) {
+ this.once('close', () => {
+ cb(new Error('The server is not running'));
+ });
+ }
+
+ process.nextTick(emitClose, this);
+ return;
+ }
+
+ if (cb) this.once('close', cb);
+
+ if (this._state === CLOSING) return;
+ this._state = CLOSING;
+
+ if (this.options.noServer || this.options.server) {
+ if (this._server) {
+ this._removeListeners();
+ this._removeListeners = this._server = null;
+ }
+
+ if (this.clients) {
+ if (!this.clients.size) {
+ process.nextTick(emitClose, this);
+ } else {
+ this._shouldEmitClose = true;
+ }
+ } else {
+ process.nextTick(emitClose, this);
+ }
+ } else {
+ const server = this._server;
+
+ this._removeListeners();
+ this._removeListeners = this._server = null;
+
+ //
+ // The HTTP/S server was created internally. Close it, and rely on its
+ // `'close'` event.
+ //
+ server.close(() => {
+ emitClose(this);
+ });
+ }
+ }
+
+ /**
+ * See if a given request should be handled by this server instance.
+ *
+ * @param {http.IncomingMessage} req Request object to inspect
+ * @return {Boolean} `true` if the request is valid, else `false`
+ * @public
+ */
+ shouldHandle(req) {
+ if (this.options.path) {
+ const index = req.url.indexOf('?');
+ const pathname = index !== -1 ? req.url.slice(0, index) : req.url;
+
+ if (pathname !== this.options.path) return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Handle a HTTP Upgrade request.
+ *
+ * @param {http.IncomingMessage} req The request object
+ * @param {Duplex} socket The network socket between the server and client
+ * @param {Buffer} head The first packet of the upgraded stream
+ * @param {Function} cb Callback
+ * @public
+ */
+ handleUpgrade(req, socket, head, cb) {
+ socket.on('error', socketOnError);
+
+ const key = req.headers['sec-websocket-key'];
+ const upgrade = req.headers.upgrade;
+ const version = +req.headers['sec-websocket-version'];
+
+ if (req.method !== 'GET') {
+ const message = 'Invalid HTTP method';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);
+ return;
+ }
+
+ if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') {
+ const message = 'Invalid Upgrade header';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ return;
+ }
+
+ if (key === undefined || !keyRegex.test(key)) {
+ const message = 'Missing or invalid Sec-WebSocket-Key header';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ return;
+ }
+
+ if (version !== 13 && version !== 8) {
+ const message = 'Missing or invalid Sec-WebSocket-Version header';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, {
+ 'Sec-WebSocket-Version': '13, 8'
+ });
+ return;
+ }
+
+ if (!this.shouldHandle(req)) {
+ abortHandshake(socket, 400);
+ return;
+ }
+
+ const secWebSocketProtocol = req.headers['sec-websocket-protocol'];
+ let protocols = new Set();
+
+ if (secWebSocketProtocol !== undefined) {
+ try {
+ protocols = subprotocol.parse(secWebSocketProtocol);
+ } catch (err) {
+ const message = 'Invalid Sec-WebSocket-Protocol header';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ return;
+ }
+ }
+
+ const secWebSocketExtensions = req.headers['sec-websocket-extensions'];
+ const extensions = {};
+
+ if (
+ this.options.perMessageDeflate &&
+ secWebSocketExtensions !== undefined
+ ) {
+ const perMessageDeflate = new PerMessageDeflate({
+ ...this.options.perMessageDeflate,
+ isServer: true,
+ maxPayload: this.options.maxPayload
+ });
+
+ try {
+ const offers = extension.parse(secWebSocketExtensions);
+
+ if (offers[PerMessageDeflate.extensionName]) {
+ perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]);
+ extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
+ }
+ } catch (err) {
+ const message =
+ 'Invalid or unacceptable Sec-WebSocket-Extensions header';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ return;
+ }
+ }
+
+ //
+ // Optionally call external client verification handler.
+ //
+ if (this.options.verifyClient) {
+ const info = {
+ origin:
+ req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`],
+ secure: !!(req.socket.authorized || req.socket.encrypted),
+ req
+ };
+
+ if (this.options.verifyClient.length === 2) {
+ this.options.verifyClient(info, (verified, code, message, headers) => {
+ if (!verified) {
+ return abortHandshake(socket, code || 401, message, headers);
+ }
+
+ this.completeUpgrade(
+ extensions,
+ key,
+ protocols,
+ req,
+ socket,
+ head,
+ cb
+ );
+ });
+ return;
+ }
+
+ if (!this.options.verifyClient(info)) return abortHandshake(socket, 401);
+ }
+
+ this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
+ }
+
+ /**
+ * Upgrade the connection to WebSocket.
+ *
+ * @param {Object} extensions The accepted extensions
+ * @param {String} key The value of the `Sec-WebSocket-Key` header
+ * @param {Set} protocols The subprotocols
+ * @param {http.IncomingMessage} req The request object
+ * @param {Duplex} socket The network socket between the server and client
+ * @param {Buffer} head The first packet of the upgraded stream
+ * @param {Function} cb Callback
+ * @throws {Error} If called more than once with the same socket
+ * @private
+ */
+ completeUpgrade(extensions, key, protocols, req, socket, head, cb) {
+ //
+ // Destroy the socket if the client has already sent a FIN packet.
+ //
+ if (!socket.readable || !socket.writable) return socket.destroy();
+
+ if (socket[kWebSocket]) {
+ throw new Error(
+ 'server.handleUpgrade() was called more than once with the same ' +
+ 'socket, possibly due to a misconfiguration'
+ );
+ }
+
+ if (this._state > RUNNING) return abortHandshake(socket, 503);
+
+ const digest = createHash('sha1')
+ .update(key + GUID)
+ .digest('base64');
+
+ const headers = [
+ 'HTTP/1.1 101 Switching Protocols',
+ 'Upgrade: websocket',
+ 'Connection: Upgrade',
+ `Sec-WebSocket-Accept: ${digest}`
+ ];
+
+ const ws = new this.options.WebSocket(null, undefined, this.options);
+
+ if (protocols.size) {
+ //
+ // Optionally call external protocol selection handler.
+ //
+ const protocol = this.options.handleProtocols
+ ? this.options.handleProtocols(protocols, req)
+ : protocols.values().next().value;
+
+ if (protocol) {
+ headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
+ ws._protocol = protocol;
+ }
+ }
+
+ if (extensions[PerMessageDeflate.extensionName]) {
+ const params = extensions[PerMessageDeflate.extensionName].params;
+ const value = extension.format({
+ [PerMessageDeflate.extensionName]: [params]
+ });
+ headers.push(`Sec-WebSocket-Extensions: ${value}`);
+ ws._extensions = extensions;
+ }
+
+ //
+ // Allow external modification/inspection of handshake headers.
+ //
+ this.emit('headers', headers, req);
+
+ socket.write(headers.concat('\r\n').join('\r\n'));
+ socket.removeListener('error', socketOnError);
+
+ ws.setSocket(socket, head, {
+ allowSynchronousEvents: this.options.allowSynchronousEvents,
+ maxBufferedChunks: this.options.maxBufferedChunks,
+ maxFragments: this.options.maxFragments,
+ maxPayload: this.options.maxPayload,
+ skipUTF8Validation: this.options.skipUTF8Validation
+ });
+
+ if (this.clients) {
+ this.clients.add(ws);
+ ws.on('close', () => {
+ this.clients.delete(ws);
+
+ if (this._shouldEmitClose && !this.clients.size) {
+ process.nextTick(emitClose, this);
+ }
+ });
+ }
+
+ cb(ws, req);
+ }
+}
+
+module.exports = WebSocketServer;
+
+/**
+ * Add event listeners on an `EventEmitter` using a map of
+ * pairs.
+ *
+ * @param {EventEmitter} server The event emitter
+ * @param {Object.} map The listeners to add
+ * @return {Function} A function that will remove the added listeners when
+ * called
+ * @private
+ */
+function addListeners(server, map) {
+ for (const event of Object.keys(map)) server.on(event, map[event]);
+
+ return function removeListeners() {
+ for (const event of Object.keys(map)) {
+ server.removeListener(event, map[event]);
+ }
+ };
+}
+
+/**
+ * Emit a `'close'` event on an `EventEmitter`.
+ *
+ * @param {EventEmitter} server The event emitter
+ * @private
+ */
+function emitClose(server) {
+ server._state = CLOSED;
+ server.emit('close');
+}
+
+/**
+ * Handle socket errors.
+ *
+ * @private
+ */
+function socketOnError() {
+ this.destroy();
+}
+
+/**
+ * Close the connection when preconditions are not fulfilled.
+ *
+ * @param {Duplex} socket The socket of the upgrade request
+ * @param {Number} code The HTTP response status code
+ * @param {String} [message] The HTTP response body
+ * @param {Object} [headers] Additional HTTP response headers
+ * @private
+ */
+function abortHandshake(socket, code, message, headers) {
+ //
+ // The socket is writable unless the user destroyed or ended it before calling
+ // `server.handleUpgrade()` or in the `verifyClient` function, which is a user
+ // error. Handling this does not make much sense as the worst that can happen
+ // is that some of the data written by the user might be discarded due to the
+ // call to `socket.end()` below, which triggers an `'error'` event that in
+ // turn causes the socket to be destroyed.
+ //
+ message = message || http.STATUS_CODES[code];
+ headers = {
+ Connection: 'close',
+ 'Content-Type': 'text/html',
+ 'Content-Length': Buffer.byteLength(message),
+ ...headers
+ };
+
+ socket.once('finish', socket.destroy);
+
+ socket.end(
+ `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` +
+ Object.keys(headers)
+ .map((h) => `${h}: ${headers[h]}`)
+ .join('\r\n') +
+ '\r\n\r\n' +
+ message
+ );
+}
+
+/**
+ * Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least
+ * one listener for it, otherwise call `abortHandshake()`.
+ *
+ * @param {WebSocketServer} server The WebSocket server
+ * @param {http.IncomingMessage} req The request object
+ * @param {Duplex} socket The socket of the upgrade request
+ * @param {Number} code The HTTP response status code
+ * @param {String} message The HTTP response body
+ * @param {Object} [headers] The HTTP response headers
+ * @private
+ */
+function abortHandshakeOrEmitwsClientError(
+ server,
+ req,
+ socket,
+ code,
+ message,
+ headers
+) {
+ if (server.listenerCount('wsClientError')) {
+ const err = new Error(message);
+ Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
+
+ server.emit('wsClientError', err, socket, req);
+ } else {
+ abortHandshake(socket, code, message, headers);
+ }
+}
+
+
+/***/ }),
+
+/***/ 16126:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$", "caughtErrors": "none" }] */
+
+
+
+const EventEmitter = __webpack_require__(24434);
+const https = __webpack_require__(65692);
+const http = __webpack_require__(58611);
+const net = __webpack_require__(69278);
+const tls = __webpack_require__(64756);
+const { randomBytes, createHash } = __webpack_require__(76982);
+const { Duplex, Readable } = __webpack_require__(2203);
+const { URL } = __webpack_require__(87016);
+
+const PerMessageDeflate = __webpack_require__(61613);
+const Receiver = __webpack_require__(37620);
+const Sender = __webpack_require__(18604);
+const { isBlob } = __webpack_require__(72002);
+
+const {
+ BINARY_TYPES,
+ CLOSE_TIMEOUT,
+ EMPTY_BUFFER,
+ GUID,
+ kForOnEventAttribute,
+ kListener,
+ kStatusCode,
+ kWebSocket,
+ NOOP
+} = __webpack_require__(93920);
+const {
+ EventTarget: { addEventListener, removeEventListener }
+} = __webpack_require__(79947);
+const { format, parse } = __webpack_require__(98904);
+const { toBuffer } = __webpack_require__(65348);
+
+const kAborted = Symbol('kAborted');
+const protocolVersions = [8, 13];
+const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
+const subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;
+
+/**
+ * Class representing a WebSocket.
+ *
+ * @extends EventEmitter
+ */
+class WebSocket extends EventEmitter {
+ /**
+ * Create a new `WebSocket`.
+ *
+ * @param {(String|URL)} address The URL to which to connect
+ * @param {(String|String[])} [protocols] The subprotocols
+ * @param {Object} [options] Connection options
+ */
+ constructor(address, protocols, options) {
+ super();
+
+ this._binaryType = BINARY_TYPES[0];
+ this._closeCode = 1006;
+ this._closeFrameReceived = false;
+ this._closeFrameSent = false;
+ this._closeMessage = EMPTY_BUFFER;
+ this._closeTimer = null;
+ this._errorEmitted = false;
+ this._extensions = {};
+ this._paused = false;
+ this._protocol = '';
+ this._readyState = WebSocket.CONNECTING;
+ this._receiver = null;
+ this._sender = null;
+ this._socket = null;
+
+ if (address !== null) {
+ this._bufferedAmount = 0;
+ this._isServer = false;
+ this._redirects = 0;
+
+ if (protocols === undefined) {
+ if (!options || options.protocols === undefined) {
+ protocols = [];
+ } else if (Array.isArray(options.protocols)) {
+ protocols = options.protocols;
+ } else {
+ protocols = [options.protocols];
+ }
+ } else if (!Array.isArray(protocols)) {
+ if (typeof protocols === 'object' && protocols !== null) {
+ options = protocols;
+
+ if (options.protocols === undefined) {
+ protocols = [];
+ } else if (Array.isArray(options.protocols)) {
+ protocols = options.protocols;
+ } else {
+ protocols = [options.protocols];
+ }
+ } else {
+ protocols = [protocols];
+ }
+ }
+
+ initAsClient(this, address, protocols, options);
+ } else {
+ this._autoPong = options.autoPong;
+ this._closeTimeout = options.closeTimeout;
+ this._isServer = true;
+ }
+ }
+
+ /**
+ * For historical reasons, the custom "nodebuffer" type is used by the default
+ * instead of "blob".
+ *
+ * @type {String}
+ */
+ get binaryType() {
+ return this._binaryType;
+ }
+
+ set binaryType(type) {
+ if (!BINARY_TYPES.includes(type)) return;
+
+ this._binaryType = type;
+
+ //
+ // Allow to change `binaryType` on the fly.
+ //
+ if (this._receiver) this._receiver._binaryType = type;
+ }
+
+ /**
+ * @type {Number}
+ */
+ get bufferedAmount() {
+ if (!this._socket) return this._bufferedAmount;
+
+ return this._socket._writableState.length + this._sender._bufferedBytes;
+ }
+
+ /**
+ * @type {String}
+ */
+ get extensions() {
+ return Object.keys(this._extensions).join();
+ }
+
+ /**
+ * @type {Boolean}
+ */
+ get isPaused() {
+ return this._paused;
+ }
+
+ /**
+ * @type {Function}
+ */
+ /* istanbul ignore next */
+ get onclose() {
+ return null;
+ }
+
+ /**
+ * @type {Function}
+ */
+ /* istanbul ignore next */
+ get onerror() {
+ return null;
+ }
+
+ /**
+ * @type {Function}
+ */
+ /* istanbul ignore next */
+ get onopen() {
+ return null;
+ }
+
+ /**
+ * @type {Function}
+ */
+ /* istanbul ignore next */
+ get onmessage() {
+ return null;
+ }
+
+ /**
+ * @type {String}
+ */
+ get protocol() {
+ return this._protocol;
+ }
+
+ /**
+ * @type {Number}
+ */
+ get readyState() {
+ return this._readyState;
+ }
+
+ /**
+ * @type {String}
+ */
+ get url() {
+ return this._url;
+ }
+
+ /**
+ * Set up the socket and the internal resources.
+ *
+ * @param {Duplex} socket The network socket between the server and client
+ * @param {Buffer} head The first packet of the upgraded stream
+ * @param {Object} options Options object
+ * @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
+ * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
+ * multiple times in the same tick
+ * @param {Function} [options.generateMask] The function used to generate the
+ * masking key
+ * @param {Number} [options.maxBufferedChunks=0] The maximum number of
+ * buffered data chunks
+ * @param {Number} [options.maxFragments=0] The maximum number of message
+ * fragments
+ * @param {Number} [options.maxPayload=0] The maximum allowed message size
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
+ * not to skip UTF-8 validation for text and close messages
+ * @private
+ */
+ setSocket(socket, head, options) {
+ const receiver = new Receiver({
+ allowSynchronousEvents: options.allowSynchronousEvents,
+ binaryType: this.binaryType,
+ extensions: this._extensions,
+ isServer: this._isServer,
+ maxBufferedChunks: options.maxBufferedChunks,
+ maxFragments: options.maxFragments,
+ maxPayload: options.maxPayload,
+ skipUTF8Validation: options.skipUTF8Validation
+ });
+
+ const sender = new Sender(socket, this._extensions, options.generateMask);
+
+ this._receiver = receiver;
+ this._sender = sender;
+ this._socket = socket;
+
+ receiver[kWebSocket] = this;
+ sender[kWebSocket] = this;
+ socket[kWebSocket] = this;
+
+ receiver.on('conclude', receiverOnConclude);
+ receiver.on('drain', receiverOnDrain);
+ receiver.on('error', receiverOnError);
+ receiver.on('message', receiverOnMessage);
+ receiver.on('ping', receiverOnPing);
+ receiver.on('pong', receiverOnPong);
+
+ sender.onerror = senderOnError;
+
+ //
+ // These methods may not be available if `socket` is just a `Duplex`.
+ //
+ if (socket.setTimeout) socket.setTimeout(0);
+ if (socket.setNoDelay) socket.setNoDelay();
+
+ if (head.length > 0) socket.unshift(head);
+
+ socket.on('close', socketOnClose);
+ socket.on('data', socketOnData);
+ socket.on('end', socketOnEnd);
+ socket.on('error', socketOnError);
+
+ this._readyState = WebSocket.OPEN;
+ this.emit('open');
+ }
+
+ /**
+ * Emit the `'close'` event.
+ *
+ * @private
+ */
+ emitClose() {
+ if (!this._socket) {
+ this._readyState = WebSocket.CLOSED;
+ this.emit('close', this._closeCode, this._closeMessage);
+ return;
+ }
+
+ if (this._extensions[PerMessageDeflate.extensionName]) {
+ this._extensions[PerMessageDeflate.extensionName].cleanup();
+ }
+
+ this._receiver.removeAllListeners();
+ this._readyState = WebSocket.CLOSED;
+ this.emit('close', this._closeCode, this._closeMessage);
+ }
+
+ /**
+ * Start a closing handshake.
+ *
+ * +----------+ +-----------+ +----------+
+ * - - -|ws.close()|-->|close frame|-->|ws.close()|- - -
+ * | +----------+ +-----------+ +----------+ |
+ * +----------+ +-----------+ |
+ * CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING
+ * +----------+ +-----------+ |
+ * | | | +---+ |
+ * +------------------------+-->|fin| - - - -
+ * | +---+ | +---+
+ * - - - - -|fin|<---------------------+
+ * +---+
+ *
+ * @param {Number} [code] Status code explaining why the connection is closing
+ * @param {(String|Buffer)} [data] The reason why the connection is
+ * closing
+ * @public
+ */
+ close(code, data) {
+ if (this.readyState === WebSocket.CLOSED) return;
+ if (this.readyState === WebSocket.CONNECTING) {
+ const msg = 'WebSocket was closed before the connection was established';
+ abortHandshake(this, this._req, msg);
+ return;
+ }
+
+ if (this.readyState === WebSocket.CLOSING) {
+ if (
+ this._closeFrameSent &&
+ (this._closeFrameReceived || this._receiver._writableState.errorEmitted)
+ ) {
+ this._socket.end();
+ }
+
+ return;
+ }
+
+ this._sender.close(code, data, !this._isServer, (err) => {
+ //
+ // This error is handled by the `'error'` listener on the socket. We only
+ // want to know if the close frame has been sent here.
+ //
+ if (err) return;
+
+ this._closeFrameSent = true;
+
+ if (
+ this._closeFrameReceived ||
+ this._receiver._writableState.errorEmitted
+ ) {
+ this._socket.end();
+ }
+ });
+
+ this._readyState = WebSocket.CLOSING;
+ setCloseTimer(this);
+ }
+
+ /**
+ * Pause the socket.
+ *
+ * @public
+ */
+ pause() {
+ if (
+ this.readyState === WebSocket.CONNECTING ||
+ this.readyState === WebSocket.CLOSED
+ ) {
+ return;
+ }
+
+ this._paused = true;
+ this._socket.pause();
+ }
+
+ /**
+ * Send a ping.
+ *
+ * @param {*} [data] The data to send
+ * @param {Boolean} [mask] Indicates whether or not to mask `data`
+ * @param {Function} [cb] Callback which is executed when the ping is sent
+ * @public
+ */
+ ping(data, mask, cb) {
+ if (this.readyState === WebSocket.CONNECTING) {
+ throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
+ }
+
+ if (typeof data === 'function') {
+ cb = data;
+ data = mask = undefined;
+ } else if (typeof mask === 'function') {
+ cb = mask;
+ mask = undefined;
+ }
+
+ if (typeof data === 'number') data = data.toString();
+
+ if (this.readyState !== WebSocket.OPEN) {
+ sendAfterClose(this, data, cb);
+ return;
+ }
+
+ if (mask === undefined) mask = !this._isServer;
+ this._sender.ping(data || EMPTY_BUFFER, mask, cb);
+ }
+
+ /**
+ * Send a pong.
+ *
+ * @param {*} [data] The data to send
+ * @param {Boolean} [mask] Indicates whether or not to mask `data`
+ * @param {Function} [cb] Callback which is executed when the pong is sent
+ * @public
+ */
+ pong(data, mask, cb) {
+ if (this.readyState === WebSocket.CONNECTING) {
+ throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
+ }
+
+ if (typeof data === 'function') {
+ cb = data;
+ data = mask = undefined;
+ } else if (typeof mask === 'function') {
+ cb = mask;
+ mask = undefined;
+ }
+
+ if (typeof data === 'number') data = data.toString();
+
+ if (this.readyState !== WebSocket.OPEN) {
+ sendAfterClose(this, data, cb);
+ return;
+ }
+
+ if (mask === undefined) mask = !this._isServer;
+ this._sender.pong(data || EMPTY_BUFFER, mask, cb);
+ }
+
+ /**
+ * Resume the socket.
+ *
+ * @public
+ */
+ resume() {
+ if (
+ this.readyState === WebSocket.CONNECTING ||
+ this.readyState === WebSocket.CLOSED
+ ) {
+ return;
+ }
+
+ this._paused = false;
+ if (!this._receiver._writableState.needDrain) this._socket.resume();
+ }
+
+ /**
+ * Send a data message.
+ *
+ * @param {*} data The message to send
+ * @param {Object} [options] Options object
+ * @param {Boolean} [options.binary] Specifies whether `data` is binary or
+ * text
+ * @param {Boolean} [options.compress] Specifies whether or not to compress
+ * `data`
+ * @param {Boolean} [options.fin=true] Specifies whether the fragment is the
+ * last one
+ * @param {Boolean} [options.mask] Specifies whether or not to mask `data`
+ * @param {Function} [cb] Callback which is executed when data is written out
+ * @public
+ */
+ send(data, options, cb) {
+ if (this.readyState === WebSocket.CONNECTING) {
+ throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
+ }
+
+ if (typeof options === 'function') {
+ cb = options;
+ options = {};
+ }
+
+ if (typeof data === 'number') data = data.toString();
+
+ if (this.readyState !== WebSocket.OPEN) {
+ sendAfterClose(this, data, cb);
+ return;
+ }
+
+ const opts = {
+ binary: typeof data !== 'string',
+ mask: !this._isServer,
+ compress: true,
+ fin: true,
+ ...options
+ };
+
+ if (!this._extensions[PerMessageDeflate.extensionName]) {
+ opts.compress = false;
+ }
+
+ this._sender.send(data || EMPTY_BUFFER, opts, cb);
+ }
+
+ /**
+ * Forcibly close the connection.
+ *
+ * @public
+ */
+ terminate() {
+ if (this.readyState === WebSocket.CLOSED) return;
+ if (this.readyState === WebSocket.CONNECTING) {
+ const msg = 'WebSocket was closed before the connection was established';
+ abortHandshake(this, this._req, msg);
+ return;
+ }
+
+ if (this._socket) {
+ this._readyState = WebSocket.CLOSING;
+ this._socket.destroy();
+ }
+ }
+}
+
+/**
+ * @constant {Number} CONNECTING
+ * @memberof WebSocket
+ */
+Object.defineProperty(WebSocket, 'CONNECTING', {
+ enumerable: true,
+ value: readyStates.indexOf('CONNECTING')
+});
+
+/**
+ * @constant {Number} CONNECTING
+ * @memberof WebSocket.prototype
+ */
+Object.defineProperty(WebSocket.prototype, 'CONNECTING', {
+ enumerable: true,
+ value: readyStates.indexOf('CONNECTING')
+});
+
+/**
+ * @constant {Number} OPEN
+ * @memberof WebSocket
+ */
+Object.defineProperty(WebSocket, 'OPEN', {
+ enumerable: true,
+ value: readyStates.indexOf('OPEN')
+});
+
+/**
+ * @constant {Number} OPEN
+ * @memberof WebSocket.prototype
+ */
+Object.defineProperty(WebSocket.prototype, 'OPEN', {
+ enumerable: true,
+ value: readyStates.indexOf('OPEN')
+});
+
+/**
+ * @constant {Number} CLOSING
+ * @memberof WebSocket
+ */
+Object.defineProperty(WebSocket, 'CLOSING', {
+ enumerable: true,
+ value: readyStates.indexOf('CLOSING')
+});
+
+/**
+ * @constant {Number} CLOSING
+ * @memberof WebSocket.prototype
+ */
+Object.defineProperty(WebSocket.prototype, 'CLOSING', {
+ enumerable: true,
+ value: readyStates.indexOf('CLOSING')
+});
+
+/**
+ * @constant {Number} CLOSED
+ * @memberof WebSocket
+ */
+Object.defineProperty(WebSocket, 'CLOSED', {
+ enumerable: true,
+ value: readyStates.indexOf('CLOSED')
+});
+
+/**
+ * @constant {Number} CLOSED
+ * @memberof WebSocket.prototype
+ */
+Object.defineProperty(WebSocket.prototype, 'CLOSED', {
+ enumerable: true,
+ value: readyStates.indexOf('CLOSED')
+});
+
+[
+ 'binaryType',
+ 'bufferedAmount',
+ 'extensions',
+ 'isPaused',
+ 'protocol',
+ 'readyState',
+ 'url'
+].forEach((property) => {
+ Object.defineProperty(WebSocket.prototype, property, { enumerable: true });
+});
+
+//
+// Add the `onopen`, `onerror`, `onclose`, and `onmessage` attributes.
+// See https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface
+//
+['open', 'error', 'close', 'message'].forEach((method) => {
+ Object.defineProperty(WebSocket.prototype, `on${method}`, {
+ enumerable: true,
+ get() {
+ for (const listener of this.listeners(method)) {
+ if (listener[kForOnEventAttribute]) return listener[kListener];
+ }
+
+ return null;
+ },
+ set(handler) {
+ for (const listener of this.listeners(method)) {
+ if (listener[kForOnEventAttribute]) {
+ this.removeListener(method, listener);
+ break;
+ }
+ }
+
+ if (typeof handler !== 'function') return;
+
+ this.addEventListener(method, handler, {
+ [kForOnEventAttribute]: true
+ });
+ }
+ });
+});
+
+WebSocket.prototype.addEventListener = addEventListener;
+WebSocket.prototype.removeEventListener = removeEventListener;
+
+module.exports = WebSocket;
+
+/**
+ * Initialize a WebSocket client.
+ *
+ * @param {WebSocket} websocket The client to initialize
+ * @param {(String|URL)} address The URL to which to connect
+ * @param {Array} protocols The subprotocols
+ * @param {Object} [options] Connection options
+ * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether any
+ * of the `'message'`, `'ping'`, and `'pong'` events can be emitted multiple
+ * times in the same tick
+ * @param {Boolean} [options.autoPong=true] Specifies whether or not to
+ * automatically send a pong in response to a ping
+ * @param {Number} [options.closeTimeout=30000] Duration in milliseconds to wait
+ * for the closing handshake to finish after `websocket.close()` is called
+ * @param {Function} [options.finishRequest] A function which can be used to
+ * customize the headers of each http request before it is sent
+ * @param {Boolean} [options.followRedirects=false] Whether or not to follow
+ * redirects
+ * @param {Function} [options.generateMask] The function used to generate the
+ * masking key
+ * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
+ * handshake request
+ * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
+ * buffered data chunks
+ * @param {Number} [options.maxFragments=16384] The maximum number of message
+ * fragments
+ * @param {Number} [options.maxPayload=104857600] The maximum allowed message
+ * size
+ * @param {Number} [options.maxRedirects=10] The maximum number of redirects
+ * allowed
+ * @param {String} [options.origin] Value of the `Origin` or
+ * `Sec-WebSocket-Origin` header
+ * @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable
+ * permessage-deflate
+ * @param {Number} [options.protocolVersion=13] Value of the
+ * `Sec-WebSocket-Version` header
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
+ * not to skip UTF-8 validation for text and close messages
+ * @private
+ */
+function initAsClient(websocket, address, protocols, options) {
+ const opts = {
+ allowSynchronousEvents: true,
+ autoPong: true,
+ closeTimeout: CLOSE_TIMEOUT,
+ protocolVersion: protocolVersions[1],
+ maxBufferedChunks: 256 * 1024,
+ maxFragments: 16 * 1024,
+ maxPayload: 100 * 1024 * 1024,
+ skipUTF8Validation: false,
+ perMessageDeflate: true,
+ followRedirects: false,
+ maxRedirects: 10,
+ ...options,
+ socketPath: undefined,
+ hostname: undefined,
+ protocol: undefined,
+ protocols: undefined,
+ timeout: undefined,
+ method: 'GET',
+ host: undefined,
+ path: undefined,
+ port: undefined
+ };
+
+ websocket._autoPong = opts.autoPong;
+ websocket._closeTimeout = opts.closeTimeout;
+
+ if (!protocolVersions.includes(opts.protocolVersion)) {
+ throw new RangeError(
+ `Unsupported protocol version: ${opts.protocolVersion} ` +
+ `(supported versions: ${protocolVersions.join(', ')})`
+ );
+ }
+
+ let parsedUrl;
+
+ if (address instanceof URL) {
+ parsedUrl = address;
+ } else {
+ try {
+ parsedUrl = new URL(address);
+ } catch {
+ throw new SyntaxError(`Invalid URL: ${address}`);
+ }
+ }
+
+ if (parsedUrl.protocol === 'http:') {
+ parsedUrl.protocol = 'ws:';
+ } else if (parsedUrl.protocol === 'https:') {
+ parsedUrl.protocol = 'wss:';
+ }
+
+ websocket._url = parsedUrl.href;
+
+ const isSecure = parsedUrl.protocol === 'wss:';
+ const isIpcUrl = parsedUrl.protocol === 'ws+unix:';
+ let invalidUrlMessage;
+
+ if (parsedUrl.protocol !== 'ws:' && !isSecure && !isIpcUrl) {
+ invalidUrlMessage =
+ 'The URL\'s protocol must be one of "ws:", "wss:", ' +
+ '"http:", "https:", or "ws+unix:"';
+ } else if (isIpcUrl && !parsedUrl.pathname) {
+ invalidUrlMessage = "The URL's pathname is empty";
+ } else if (parsedUrl.hash) {
+ invalidUrlMessage = 'The URL contains a fragment identifier';
+ }
+
+ if (invalidUrlMessage) {
+ const err = new SyntaxError(invalidUrlMessage);
+
+ if (websocket._redirects === 0) {
+ throw err;
+ } else {
+ emitErrorAndClose(websocket, err);
+ return;
+ }
+ }
+
+ const defaultPort = isSecure ? 443 : 80;
+ const key = randomBytes(16).toString('base64');
+ const request = isSecure ? https.request : http.request;
+ const protocolSet = new Set();
+ let perMessageDeflate;
+
+ opts.createConnection =
+ opts.createConnection || (isSecure ? tlsConnect : netConnect);
+ opts.defaultPort = opts.defaultPort || defaultPort;
+ opts.port = parsedUrl.port || defaultPort;
+ opts.host = parsedUrl.hostname.startsWith('[')
+ ? parsedUrl.hostname.slice(1, -1)
+ : parsedUrl.hostname;
+ opts.headers = {
+ ...opts.headers,
+ 'Sec-WebSocket-Version': opts.protocolVersion,
+ 'Sec-WebSocket-Key': key,
+ Connection: 'Upgrade',
+ Upgrade: 'websocket'
+ };
+ opts.path = parsedUrl.pathname + parsedUrl.search;
+ opts.timeout = opts.handshakeTimeout;
+
+ if (opts.perMessageDeflate) {
+ perMessageDeflate = new PerMessageDeflate({
+ ...opts.perMessageDeflate,
+ isServer: false,
+ maxPayload: opts.maxPayload
+ });
+ opts.headers['Sec-WebSocket-Extensions'] = format({
+ [PerMessageDeflate.extensionName]: perMessageDeflate.offer()
+ });
+ }
+ if (protocols.length) {
+ for (const protocol of protocols) {
+ if (
+ typeof protocol !== 'string' ||
+ !subprotocolRegex.test(protocol) ||
+ protocolSet.has(protocol)
+ ) {
+ throw new SyntaxError(
+ 'An invalid or duplicated subprotocol was specified'
+ );
+ }
+
+ protocolSet.add(protocol);
+ }
+
+ opts.headers['Sec-WebSocket-Protocol'] = protocols.join(',');
+ }
+ if (opts.origin) {
+ if (opts.protocolVersion < 13) {
+ opts.headers['Sec-WebSocket-Origin'] = opts.origin;
+ } else {
+ opts.headers.Origin = opts.origin;
+ }
+ }
+ if (parsedUrl.username || parsedUrl.password) {
+ opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
+ }
+
+ if (isIpcUrl) {
+ const parts = opts.path.split(':');
+
+ opts.socketPath = parts[0];
+ opts.path = parts[1];
+ }
+
+ let req;
+
+ if (opts.followRedirects) {
+ if (websocket._redirects === 0) {
+ websocket._originalIpc = isIpcUrl;
+ websocket._originalSecure = isSecure;
+ websocket._originalHostOrSocketPath = isIpcUrl
+ ? opts.socketPath
+ : parsedUrl.host;
+
+ const headers = options && options.headers;
+
+ //
+ // Shallow copy the user provided options so that headers can be changed
+ // without mutating the original object.
+ //
+ options = { ...options, headers: {} };
+
+ if (headers) {
+ for (const [key, value] of Object.entries(headers)) {
+ options.headers[key.toLowerCase()] = value;
+ }
+ }
+ } else if (websocket.listenerCount('redirect') === 0) {
+ const isSameHost = isIpcUrl
+ ? websocket._originalIpc
+ ? opts.socketPath === websocket._originalHostOrSocketPath
+ : false
+ : websocket._originalIpc
+ ? false
+ : parsedUrl.host === websocket._originalHostOrSocketPath;
+
+ if (!isSameHost || (websocket._originalSecure && !isSecure)) {
+ //
+ // Match curl 7.77.0 behavior and drop the following headers. These
+ // headers are also dropped when following a redirect to a subdomain.
+ //
+ delete opts.headers.authorization;
+ delete opts.headers.cookie;
+
+ if (!isSameHost) delete opts.headers.host;
+
+ opts.auth = undefined;
+ }
+ }
+
+ //
+ // Match curl 7.77.0 behavior and make the first `Authorization` header win.
+ // If the `Authorization` header is set, then there is nothing to do as it
+ // will take precedence.
+ //
+ if (opts.auth && !options.headers.authorization) {
+ options.headers.authorization =
+ 'Basic ' + Buffer.from(opts.auth).toString('base64');
+ }
+
+ req = websocket._req = request(opts);
+
+ if (websocket._redirects) {
+ //
+ // Unlike what is done for the `'upgrade'` event, no early exit is
+ // triggered here if the user calls `websocket.close()` or
+ // `websocket.terminate()` from a listener of the `'redirect'` event. This
+ // is because the user can also call `request.destroy()` with an error
+ // before calling `websocket.close()` or `websocket.terminate()` and this
+ // would result in an error being emitted on the `request` object with no
+ // `'error'` event listeners attached.
+ //
+ websocket.emit('redirect', websocket.url, req);
+ }
+ } else {
+ req = websocket._req = request(opts);
+ }
+
+ if (opts.timeout) {
+ req.on('timeout', () => {
+ abortHandshake(websocket, req, 'Opening handshake has timed out');
+ });
+ }
+
+ req.on('error', (err) => {
+ if (req === null || req[kAborted]) return;
+
+ req = websocket._req = null;
+ emitErrorAndClose(websocket, err);
+ });
+
+ req.on('response', (res) => {
+ const location = res.headers.location;
+ const statusCode = res.statusCode;
+
+ if (
+ location &&
+ opts.followRedirects &&
+ statusCode >= 300 &&
+ statusCode < 400
+ ) {
+ if (++websocket._redirects > opts.maxRedirects) {
+ abortHandshake(websocket, req, 'Maximum redirects exceeded');
+ return;
+ }
+
+ req.abort();
+
+ let addr;
+
+ try {
+ addr = new URL(location, address);
+ } catch (e) {
+ const err = new SyntaxError(`Invalid URL: ${location}`);
+ emitErrorAndClose(websocket, err);
+ return;
+ }
+
+ initAsClient(websocket, addr, protocols, options);
+ } else if (!websocket.emit('unexpected-response', req, res)) {
+ abortHandshake(
+ websocket,
+ req,
+ `Unexpected server response: ${res.statusCode}`
+ );
+ }
+ });
+
+ req.on('upgrade', (res, socket, head) => {
+ websocket.emit('upgrade', res);
+
+ //
+ // The user may have closed the connection from a listener of the
+ // `'upgrade'` event.
+ //
+ if (websocket.readyState !== WebSocket.CONNECTING) return;
+
+ req = websocket._req = null;
+
+ const upgrade = res.headers.upgrade;
+
+ if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') {
+ abortHandshake(websocket, socket, 'Invalid Upgrade header');
+ return;
+ }
+
+ const digest = createHash('sha1')
+ .update(key + GUID)
+ .digest('base64');
+
+ if (res.headers['sec-websocket-accept'] !== digest) {
+ abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header');
+ return;
+ }
+
+ const serverProt = res.headers['sec-websocket-protocol'];
+ let protError;
+
+ if (serverProt !== undefined) {
+ if (!protocolSet.size) {
+ protError = 'Server sent a subprotocol but none was requested';
+ } else if (!protocolSet.has(serverProt)) {
+ protError = 'Server sent an invalid subprotocol';
+ }
+ } else if (protocolSet.size) {
+ protError = 'Server sent no subprotocol';
+ }
+
+ if (protError) {
+ abortHandshake(websocket, socket, protError);
+ return;
+ }
+
+ if (serverProt) websocket._protocol = serverProt;
+
+ const secWebSocketExtensions = res.headers['sec-websocket-extensions'];
+
+ if (secWebSocketExtensions !== undefined) {
+ if (!perMessageDeflate) {
+ const message =
+ 'Server sent a Sec-WebSocket-Extensions header but no extension ' +
+ 'was requested';
+ abortHandshake(websocket, socket, message);
+ return;
+ }
+
+ let extensions;
+
+ try {
+ extensions = parse(secWebSocketExtensions);
+ } catch (err) {
+ const message = 'Invalid Sec-WebSocket-Extensions header';
+ abortHandshake(websocket, socket, message);
+ return;
+ }
+
+ const extensionNames = Object.keys(extensions);
+
+ if (
+ extensionNames.length !== 1 ||
+ extensionNames[0] !== PerMessageDeflate.extensionName
+ ) {
+ const message = 'Server indicated an extension that was not requested';
+ abortHandshake(websocket, socket, message);
+ return;
+ }
+
+ try {
+ perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]);
+ } catch (err) {
+ const message = 'Invalid Sec-WebSocket-Extensions header';
+ abortHandshake(websocket, socket, message);
+ return;
+ }
+
+ websocket._extensions[PerMessageDeflate.extensionName] =
+ perMessageDeflate;
+ }
+
+ websocket.setSocket(socket, head, {
+ allowSynchronousEvents: opts.allowSynchronousEvents,
+ generateMask: opts.generateMask,
+ maxBufferedChunks: opts.maxBufferedChunks,
+ maxFragments: opts.maxFragments,
+ maxPayload: opts.maxPayload,
+ skipUTF8Validation: opts.skipUTF8Validation
+ });
+ });
+
+ if (opts.finishRequest) {
+ opts.finishRequest(req, websocket);
+ } else {
+ req.end();
+ }
+}
+
+/**
+ * Emit the `'error'` and `'close'` events.
+ *
+ * @param {WebSocket} websocket The WebSocket instance
+ * @param {Error} The error to emit
+ * @private
+ */
+function emitErrorAndClose(websocket, err) {
+ websocket._readyState = WebSocket.CLOSING;
+ //
+ // The following assignment is practically useless and is done only for
+ // consistency.
+ //
+ websocket._errorEmitted = true;
+ websocket.emit('error', err);
+ websocket.emitClose();
+}
+
+/**
+ * Create a `net.Socket` and initiate a connection.
+ *
+ * @param {Object} options Connection options
+ * @return {net.Socket} The newly created socket used to start the connection
+ * @private
+ */
+function netConnect(options) {
+ options.path = options.socketPath;
+ return net.connect(options);
+}
+
+/**
+ * Create a `tls.TLSSocket` and initiate a connection.
+ *
+ * @param {Object} options Connection options
+ * @return {tls.TLSSocket} The newly created socket used to start the connection
+ * @private
+ */
+function tlsConnect(options) {
+ options.path = undefined;
+
+ if (!options.servername && options.servername !== '') {
+ options.servername = net.isIP(options.host) ? '' : options.host;
+ }
+
+ return tls.connect(options);
+}
+
+/**
+ * Abort the handshake and emit an error.
+ *
+ * @param {WebSocket} websocket The WebSocket instance
+ * @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to
+ * abort or the socket to destroy
+ * @param {String} message The error message
+ * @private
+ */
+function abortHandshake(websocket, stream, message) {
+ websocket._readyState = WebSocket.CLOSING;
+
+ const err = new Error(message);
+ Error.captureStackTrace(err, abortHandshake);
+
+ if (stream.setHeader) {
+ stream[kAborted] = true;
+ stream.abort();
+
+ if (stream.socket && !stream.socket.destroyed) {
+ //
+ // On Node.js >= 14.3.0 `request.abort()` does not destroy the socket if
+ // called after the request completed. See
+ // https://github.com/websockets/ws/issues/1869.
+ //
+ stream.socket.destroy();
+ }
+
+ process.nextTick(emitErrorAndClose, websocket, err);
+ } else {
+ stream.destroy(err);
+ stream.once('error', websocket.emit.bind(websocket, 'error'));
+ stream.once('close', websocket.emitClose.bind(websocket));
+ }
+}
+
+/**
+ * Handle cases where the `ping()`, `pong()`, or `send()` methods are called
+ * when the `readyState` attribute is `CLOSING` or `CLOSED`.
+ *
+ * @param {WebSocket} websocket The WebSocket instance
+ * @param {*} [data] The data to send
+ * @param {Function} [cb] Callback
+ * @private
+ */
+function sendAfterClose(websocket, data, cb) {
+ if (data) {
+ const length = isBlob(data) ? data.size : toBuffer(data).length;
+
+ //
+ // The `_bufferedAmount` property is used only when the peer is a client and
+ // the opening handshake fails. Under these circumstances, in fact, the
+ // `setSocket()` method is not called, so the `_socket` and `_sender`
+ // properties are set to `null`.
+ //
+ if (websocket._socket) websocket._sender._bufferedBytes += length;
+ else websocket._bufferedAmount += length;
+ }
+
+ if (cb) {
+ const err = new Error(
+ `WebSocket is not open: readyState ${websocket.readyState} ` +
+ `(${readyStates[websocket.readyState]})`
+ );
+ process.nextTick(cb, err);
+ }
+}
+
+/**
+ * The listener of the `Receiver` `'conclude'` event.
+ *
+ * @param {Number} code The status code
+ * @param {Buffer} reason The reason for closing
+ * @private
+ */
+function receiverOnConclude(code, reason) {
+ const websocket = this[kWebSocket];
+
+ websocket._closeFrameReceived = true;
+ websocket._closeMessage = reason;
+ websocket._closeCode = code;
+
+ if (websocket._socket[kWebSocket] === undefined) return;
+
+ websocket._socket.removeListener('data', socketOnData);
+ process.nextTick(resume, websocket._socket);
+
+ if (code === 1005) websocket.close();
+ else websocket.close(code, reason);
+}
+
+/**
+ * The listener of the `Receiver` `'drain'` event.
+ *
+ * @private
+ */
+function receiverOnDrain() {
+ const websocket = this[kWebSocket];
+
+ if (!websocket.isPaused) websocket._socket.resume();
+}
+
+/**
+ * The listener of the `Receiver` `'error'` event.
+ *
+ * @param {(RangeError|Error)} err The emitted error
+ * @private
+ */
+function receiverOnError(err) {
+ const websocket = this[kWebSocket];
+
+ if (websocket._socket[kWebSocket] !== undefined) {
+ websocket._socket.removeListener('data', socketOnData);
+
+ //
+ // On Node.js < 14.0.0 the `'error'` event is emitted synchronously. See
+ // https://github.com/websockets/ws/issues/1940.
+ //
+ process.nextTick(resume, websocket._socket);
+
+ websocket.close(err[kStatusCode]);
+ }
+
+ if (!websocket._errorEmitted) {
+ websocket._errorEmitted = true;
+ websocket.emit('error', err);
+ }
+}
+
+/**
+ * The listener of the `Receiver` `'finish'` event.
+ *
+ * @private
+ */
+function receiverOnFinish() {
+ this[kWebSocket].emitClose();
+}
+
+/**
+ * The listener of the `Receiver` `'message'` event.
+ *
+ * @param {Buffer|ArrayBuffer|Buffer[])} data The message
+ * @param {Boolean} isBinary Specifies whether the message is binary or not
+ * @private
+ */
+function receiverOnMessage(data, isBinary) {
+ this[kWebSocket].emit('message', data, isBinary);
+}
+
+/**
+ * The listener of the `Receiver` `'ping'` event.
+ *
+ * @param {Buffer} data The data included in the ping frame
+ * @private
+ */
+function receiverOnPing(data) {
+ const websocket = this[kWebSocket];
+
+ if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP);
+ websocket.emit('ping', data);
+}
+
+/**
+ * The listener of the `Receiver` `'pong'` event.
+ *
+ * @param {Buffer} data The data included in the pong frame
+ * @private
+ */
+function receiverOnPong(data) {
+ this[kWebSocket].emit('pong', data);
+}
+
+/**
+ * Resume a readable stream
+ *
+ * @param {Readable} stream The readable stream
+ * @private
+ */
+function resume(stream) {
+ stream.resume();
+}
+
+/**
+ * The `Sender` error event handler.
+ *
+ * @param {Error} The error
+ * @private
+ */
+function senderOnError(err) {
+ const websocket = this[kWebSocket];
+
+ if (websocket.readyState === WebSocket.CLOSED) return;
+ if (websocket.readyState === WebSocket.OPEN) {
+ websocket._readyState = WebSocket.CLOSING;
+ setCloseTimer(websocket);
+ }
+
+ //
+ // `socket.end()` is used instead of `socket.destroy()` to allow the other
+ // peer to finish sending queued data. There is no need to set a timer here
+ // because `CLOSING` means that it is already set or not needed.
+ //
+ this._socket.end();
+
+ if (!websocket._errorEmitted) {
+ websocket._errorEmitted = true;
+ websocket.emit('error', err);
+ }
+}
+
+/**
+ * Set a timer to destroy the underlying raw socket of a WebSocket.
+ *
+ * @param {WebSocket} websocket The WebSocket instance
+ * @private
+ */
+function setCloseTimer(websocket) {
+ websocket._closeTimer = setTimeout(
+ websocket._socket.destroy.bind(websocket._socket),
+ websocket._closeTimeout
+ );
+}
+
+/**
+ * The listener of the socket `'close'` event.
+ *
+ * @private
+ */
+function socketOnClose() {
+ const websocket = this[kWebSocket];
+
+ this.removeListener('close', socketOnClose);
+ this.removeListener('data', socketOnData);
+ this.removeListener('end', socketOnEnd);
+
+ websocket._readyState = WebSocket.CLOSING;
+
+ //
+ // The close frame might not have been received or the `'end'` event emitted,
+ // for example, if the socket was destroyed due to an error. Ensure that the
+ // `receiver` stream is closed after writing any remaining buffered data to
+ // it. If the readable side of the socket is in flowing mode then there is no
+ // buffered data as everything has been already written. If instead, the
+ // socket is paused, any possible buffered data will be read as a single
+ // chunk.
+ //
+ if (
+ !this._readableState.endEmitted &&
+ !websocket._closeFrameReceived &&
+ !websocket._receiver._writableState.errorEmitted &&
+ this._readableState.length !== 0
+ ) {
+ const chunk = this.read(this._readableState.length);
+
+ websocket._receiver.write(chunk);
+ }
+
+ websocket._receiver.end();
+
+ this[kWebSocket] = undefined;
+
+ clearTimeout(websocket._closeTimer);
+
+ if (
+ websocket._receiver._writableState.finished ||
+ websocket._receiver._writableState.errorEmitted
+ ) {
+ websocket.emitClose();
+ } else {
+ websocket._receiver.on('error', receiverOnFinish);
+ websocket._receiver.on('finish', receiverOnFinish);
+ }
+}
+
+/**
+ * The listener of the socket `'data'` event.
+ *
+ * @param {Buffer} chunk A chunk of data
+ * @private
+ */
+function socketOnData(chunk) {
+ if (!this[kWebSocket]._receiver.write(chunk)) {
+ this.pause();
+ }
+}
+
+/**
+ * The listener of the socket `'end'` event.
+ *
+ * @private
+ */
+function socketOnEnd() {
+ const websocket = this[kWebSocket];
+
+ websocket._readyState = WebSocket.CLOSING;
+ websocket._receiver.end();
+ this.end();
+}
+
+/**
+ * The listener of the socket `'error'` event.
+ *
+ * @private
+ */
+function socketOnError() {
+ const websocket = this[kWebSocket];
+
+ this.removeListener('error', socketOnError);
+ this.on('error', NOOP);
+
+ if (websocket) {
+ websocket._readyState = WebSocket.CLOSING;
+ this.destroy();
+ }
+}
+
+
+/***/ }),
+
+/***/ 48812:
+/***/ ((module) => {
+
+module.exports = eval("require")("bufferutil");
+
+
+/***/ }),
+
+/***/ 60710:
+/***/ ((module) => {
+
+module.exports = eval("require")("utf-8-validate");
+
+
+/***/ }),
+
+/***/ 79870:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/**
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.GCE_LINUX_BIOS_PATHS = void 0;
+exports.isGoogleCloudServerless = isGoogleCloudServerless;
+exports.isGoogleComputeEngineLinux = isGoogleComputeEngineLinux;
+exports.isGoogleComputeEngineMACAddress = isGoogleComputeEngineMACAddress;
+exports.isGoogleComputeEngine = isGoogleComputeEngine;
+exports.detectGCPResidency = detectGCPResidency;
+const fs_1 = __webpack_require__(79896);
+const os_1 = __webpack_require__(70857);
+/**
+ * Known paths unique to Google Compute Engine Linux instances
+ */
+exports.GCE_LINUX_BIOS_PATHS = {
+ BIOS_DATE: '/sys/class/dmi/id/bios_date',
+ BIOS_VENDOR: '/sys/class/dmi/id/bios_vendor',
+};
+const GCE_MAC_ADDRESS_REGEX = /^42:01/;
+/**
+ * Determines if the process is running on a Google Cloud Serverless environment (Cloud Run or Cloud Functions instance).
+ *
+ * Uses the:
+ * - {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}.
+ * - {@link https://cloud.google.com/functions/docs/env-var Cloud Functions environment variables}.
+ *
+ * @returns {boolean} `true` if the process is running on GCP serverless, `false` otherwise.
+ */
+function isGoogleCloudServerless() {
+ /**
+ * `CLOUD_RUN_JOB` is used for Cloud Run Jobs
+ * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}.
+ *
+ * `FUNCTION_NAME` is used in older Cloud Functions environments:
+ * - See {@link https://cloud.google.com/functions/docs/env-var Python 3.7 and Go 1.11}.
+ *
+ * `K_SERVICE` is used in Cloud Run and newer Cloud Functions environments:
+ * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}.
+ * - See {@link https://cloud.google.com/functions/docs/env-var Cloud Functions newer runtimes}.
+ */
+ const isGFEnvironment = process.env.CLOUD_RUN_JOB ||
+ process.env.FUNCTION_NAME ||
+ process.env.K_SERVICE;
+ return !!isGFEnvironment;
+}
+/**
+ * Determines if the process is running on a Linux Google Compute Engine instance.
+ *
+ * @returns {boolean} `true` if the process is running on Linux GCE, `false` otherwise.
+ */
+function isGoogleComputeEngineLinux() {
+ if ((0, os_1.platform)() !== 'linux')
+ return false;
+ try {
+ // ensure this file exist
+ (0, fs_1.statSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_DATE);
+ // ensure this file exist and matches
+ const biosVendor = (0, fs_1.readFileSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR, 'utf8');
+ return /Google/.test(biosVendor);
+ }
+ catch {
+ return false;
+ }
+}
+/**
+ * Determines if the process is running on a Google Compute Engine instance with a known
+ * MAC address.
+ *
+ * @returns {boolean} `true` if the process is running on GCE (as determined by MAC address), `false` otherwise.
+ */
+function isGoogleComputeEngineMACAddress() {
+ const interfaces = (0, os_1.networkInterfaces)();
+ for (const item of Object.values(interfaces)) {
+ if (!item)
+ continue;
+ for (const { mac } of item) {
+ if (GCE_MAC_ADDRESS_REGEX.test(mac)) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+/**
+ * Determines if the process is running on a Google Compute Engine instance.
+ *
+ * @returns {boolean} `true` if the process is running on GCE, `false` otherwise.
+ */
+function isGoogleComputeEngine() {
+ return isGoogleComputeEngineLinux() || isGoogleComputeEngineMACAddress();
+}
+/**
+ * Determines if the process is running on Google Cloud Platform.
+ *
+ * @returns {boolean} `true` if the process is running on GCP, `false` otherwise.
+ */
+function detectGCPResidency() {
+ return isGoogleCloudServerless() || isGoogleComputeEngine();
+}
+//# sourceMappingURL=gcp-residency.js.map
+
+/***/ }),
+
+/***/ 4381:
+/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
+
+
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+ var ownKeys = function(o) {
+ ownKeys = Object.getOwnPropertyNames || function (o) {
+ var ar = [];
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+ return ar;
+ };
+ return ownKeys(o);
+ };
+ return function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+ __setModuleDefault(result, mod);
+ return result;
+ };
+})();
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.gcpResidencyCache = exports.METADATA_SERVER_DETECTION = exports.HEADERS = exports.HEADER_VALUE = exports.HEADER_NAME = exports.SECONDARY_HOST_ADDRESS = exports.HOST_ADDRESS = exports.BASE_PATH = void 0;
+exports.instance = instance;
+exports.project = project;
+exports.universe = universe;
+exports.bulk = bulk;
+exports.isAvailable = isAvailable;
+exports.resetIsAvailableCache = resetIsAvailableCache;
+exports.getGCPResidency = getGCPResidency;
+exports.setGCPResidency = setGCPResidency;
+exports.requestTimeout = requestTimeout;
+/**
+ * Copyright 2018 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+const gaxios_1 = __webpack_require__(10627);
+const jsonBigint = __webpack_require__(97222);
+const gcp_residency_1 = __webpack_require__(79870);
+const logger = __importStar(__webpack_require__(23760));
+exports.BASE_PATH = '/computeMetadata/v1';
+exports.HOST_ADDRESS = 'http://169.254.169.254';
+exports.SECONDARY_HOST_ADDRESS = 'http://metadata.google.internal.';
+exports.HEADER_NAME = 'Metadata-Flavor';
+exports.HEADER_VALUE = 'Google';
+exports.HEADERS = Object.freeze({ [exports.HEADER_NAME]: exports.HEADER_VALUE });
+const log = logger.log('gcp-metadata');
+/**
+ * Metadata server detection override options.
+ *
+ * Available via `process.env.METADATA_SERVER_DETECTION`.
+ */
+exports.METADATA_SERVER_DETECTION = Object.freeze({
+ 'assume-present': "don't try to ping the metadata server, but assume it's present",
+ none: "don't try to ping the metadata server, but don't try to use it either",
+ 'bios-only': "treat the result of a BIOS probe as canonical (don't fall back to pinging)",
+ 'ping-only': 'skip the BIOS probe, and go straight to pinging',
+});
+/**
+ * Returns the base URL while taking into account the GCE_METADATA_HOST
+ * environment variable if it exists.
+ *
+ * @returns The base URL, e.g., http://169.254.169.254/computeMetadata/v1.
+ */
+function getBaseUrl(baseUrl) {
+ if (!baseUrl) {
+ baseUrl =
+ process.env.GCE_METADATA_IP ||
+ process.env.GCE_METADATA_HOST ||
+ exports.HOST_ADDRESS;
+ }
+ // If no scheme is provided default to HTTP:
+ if (!/^https?:\/\//.test(baseUrl)) {
+ baseUrl = `http://${baseUrl}`;
+ }
+ return new URL(exports.BASE_PATH, baseUrl).href;
+}
+// Accepts an options object passed from the user to the API. In previous
+// versions of the API, it referred to a `Request` or an `Axios` request
+// options object. Now it refers to an object with very limited property
+// names. This is here to help ensure users don't pass invalid options when
+// they upgrade from 0.4 to 0.5 to 0.8.
+function validate(options) {
+ Object.keys(options).forEach(key => {
+ switch (key) {
+ case 'params':
+ case 'property':
+ case 'headers':
+ break;
+ case 'qs':
+ throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");
+ default:
+ throw new Error(`'${key}' is not a valid configuration option.`);
+ }
+ });
+}
+async function metadataAccessor(type, options = {}, noResponseRetries = 3, fastFail = false) {
+ const headers = new Headers(exports.HEADERS);
+ let metadataKey = '';
+ let params = {};
+ if (typeof type === 'object') {
+ const metadataAccessor = type;
+ new Headers(metadataAccessor.headers).forEach((value, key) => headers.set(key, value));
+ metadataKey = metadataAccessor.metadataKey;
+ params = metadataAccessor.params || params;
+ noResponseRetries = metadataAccessor.noResponseRetries || noResponseRetries;
+ fastFail = metadataAccessor.fastFail || fastFail;
+ }
+ else {
+ metadataKey = type;
+ }
+ if (typeof options === 'string') {
+ metadataKey += `/${options}`;
+ }
+ else {
+ validate(options);
+ if (options.property) {
+ metadataKey += `/${options.property}`;
+ }
+ new Headers(options.headers).forEach((value, key) => headers.set(key, value));
+ params = options.params || params;
+ }
+ const requestMethod = fastFail ? fastFailMetadataRequest : gaxios_1.request;
+ const req = {
+ url: `${getBaseUrl()}/${metadataKey}`,
+ headers,
+ retryConfig: { noResponseRetries },
+ params,
+ responseType: 'text',
+ timeout: requestTimeout(),
+ };
+ log.info('instance request %j', req);
+ const res = await requestMethod(req);
+ log.info('instance metadata is %s', res.data);
+ const metadataFlavor = res.headers.get(exports.HEADER_NAME);
+ if (metadataFlavor !== exports.HEADER_VALUE) {
+ throw new RangeError(`Invalid response from metadata service: incorrect ${exports.HEADER_NAME} header. Expected '${exports.HEADER_VALUE}', got ${metadataFlavor ? `'${metadataFlavor}'` : 'no header'}`);
+ }
+ if (typeof res.data === 'string') {
+ try {
+ return jsonBigint.parse(res.data);
+ }
+ catch {
+ /* ignore */
+ }
+ }
+ return res.data;
+}
+async function fastFailMetadataRequest(options) {
+ const secondaryOptions = {
+ ...options,
+ url: options.url
+ ?.toString()
+ .replace(getBaseUrl(), getBaseUrl(exports.SECONDARY_HOST_ADDRESS)),
+ };
+ // We race a connection between DNS/IP to metadata server. There are a couple
+ // reasons for this:
+ //
+ // 1. the DNS is slow in some GCP environments; by checking both, we might
+ // detect the runtime environment significantly faster.
+ // 2. we can't just check the IP, which is tarpitted and slow to respond
+ // on a user's local machine.
+ //
+ // Returns first resolved promise or if all promises get rejected we return an AggregateError.
+ //
+ // Note, however, if a failure happens prior to a success, a rejection should
+ // occur, this is for folks running locally.
+ //
+ const r1 = (0, gaxios_1.request)(options);
+ const r2 = (0, gaxios_1.request)(secondaryOptions);
+ return Promise.any([r1, r2]);
+}
+/**
+ * Obtain metadata for the current GCE instance.
+ *
+ * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
+ *
+ * @example
+ * ```
+ * const serviceAccount: {} = await instance('service-accounts/');
+ * const serviceAccountEmail: string = await instance('service-accounts/default/email');
+ * ```
+ */
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+function instance(options) {
+ return metadataAccessor('instance', options);
+}
+/**
+ * Obtain metadata for the current GCP project.
+ *
+ * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
+ *
+ * @example
+ * ```
+ * const projectId: string = await project('project-id');
+ * const numericProjectId: number = await project('numeric-project-id');
+ * ```
+ */
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+function project(options) {
+ return metadataAccessor('project', options);
+}
+/**
+ * Obtain metadata for the current universe.
+ *
+ * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
+ *
+ * @example
+ * ```
+ * const universeDomain: string = await universe('universe-domain');
+ * ```
+ */
+function universe(options) {
+ return metadataAccessor('universe', options);
+}
+/**
+ * Retrieve metadata items in parallel.
+ *
+ * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
+ *
+ * @example
+ * ```
+ * const data = await bulk([
+ * {
+ * metadataKey: 'instance',
+ * },
+ * {
+ * metadataKey: 'project/project-id',
+ * },
+ * ] as const);
+ *
+ * // data.instance;
+ * // data['project/project-id'];
+ * ```
+ *
+ * @param properties The metadata properties to retrieve
+ * @returns The metadata in `metadatakey:value` format
+ */
+async function bulk(properties) {
+ const r = {};
+ await Promise.all(properties.map(item => {
+ return (async () => {
+ const res = await metadataAccessor(item);
+ const key = item.metadataKey;
+ r[key] = res;
+ })();
+ }));
+ return r;
+}
+/*
+ * How many times should we retry detecting GCP environment.
+ */
+function detectGCPAvailableRetries() {
+ return process.env.DETECT_GCP_RETRIES
+ ? Number(process.env.DETECT_GCP_RETRIES)
+ : 0;
+}
+let cachedIsAvailableResponse;
+/**
+ * Determine if the metadata server is currently available.
+ */
+async function isAvailable() {
+ if (process.env.METADATA_SERVER_DETECTION) {
+ const value = process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();
+ if (!(value in exports.METADATA_SERVER_DETECTION)) {
+ throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${value}\`, but it should be \`${Object.keys(exports.METADATA_SERVER_DETECTION).join('`, `')}\`, or unset`);
+ }
+ switch (value) {
+ case 'assume-present':
+ return true;
+ case 'none':
+ return false;
+ case 'bios-only':
+ return getGCPResidency();
+ case 'ping-only':
+ // continue, we want to ping the server
+ }
+ }
+ try {
+ // If a user is instantiating several GCP libraries at the same time,
+ // this may result in multiple calls to isAvailable(), to detect the
+ // runtime environment. We use the same promise for each of these calls
+ // to reduce the network load.
+ if (cachedIsAvailableResponse === undefined) {
+ cachedIsAvailableResponse = metadataAccessor('instance', undefined, detectGCPAvailableRetries(),
+ // If the default HOST_ADDRESS has been overridden, we should not
+ // make an effort to try SECONDARY_HOST_ADDRESS (as we are likely in
+ // a non-GCP environment):
+ !(process.env.GCE_METADATA_IP || process.env.GCE_METADATA_HOST));
+ }
+ await cachedIsAvailableResponse;
+ return true;
+ }
+ catch (e) {
+ const err = e;
+ if (process.env.DEBUG_AUTH) {
+ console.info(err);
+ }
+ if (err.type === 'request-timeout') {
+ // If running in a GCP environment, metadata endpoint should return
+ // within ms.
+ return false;
+ }
+ if (err.response && err.response.status === 404) {
+ return false;
+ }
+ else {
+ if (!(err.response && err.response.status === 404) &&
+ // A warning is emitted if we see an unexpected err.code, or err.code
+ // is not populated:
+ (!err.code ||
+ ![
+ 'EHOSTDOWN',
+ 'EHOSTUNREACH',
+ 'ENETUNREACH',
+ 'ENOENT',
+ 'ENOTFOUND',
+ 'ECONNREFUSED',
+ ].includes(err.code.toString()))) {
+ let code = 'UNKNOWN';
+ if (err.code)
+ code = err.code.toString();
+ process.emitWarning(`received unexpected error = ${err.message} code = ${code}`, 'MetadataLookupWarning');
+ }
+ // Failure to resolve the metadata service means that it is not available.
+ return false;
+ }
+ }
+}
+/**
+ * reset the memoized isAvailable() lookup.
+ */
+function resetIsAvailableCache() {
+ cachedIsAvailableResponse = undefined;
+}
+/**
+ * A cache for the detected GCP Residency.
+ */
+exports.gcpResidencyCache = null;
+/**
+ * Detects GCP Residency.
+ * Caches results to reduce costs for subsequent calls.
+ *
+ * @see setGCPResidency for setting
+ */
+function getGCPResidency() {
+ if (exports.gcpResidencyCache === null) {
+ setGCPResidency();
+ }
+ return exports.gcpResidencyCache;
+}
+/**
+ * Sets the detected GCP Residency.
+ * Useful for forcing metadata server detection behavior.
+ *
+ * Set `null` to autodetect the environment (default behavior).
+ * @see getGCPResidency for getting
+ */
+function setGCPResidency(value = null) {
+ exports.gcpResidencyCache = value !== null ? value : (0, gcp_residency_1.detectGCPResidency)();
+}
+/**
+ * Obtain the timeout for requests to the metadata server.
+ *
+ * In certain environments and conditions requests can take longer than
+ * the default timeout to complete. This function will determine the
+ * appropriate timeout based on the environment.
+ *
+ * @returns {number} a request timeout duration in milliseconds.
+ */
+function requestTimeout() {
+ return getGCPResidency() ? 0 : 3000;
+}
+__exportStar(__webpack_require__(79870), exports);
+//# sourceMappingURL=index.js.map
+
+/***/ }),
+
+/***/ 39122:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+
+// Copyright 2023 Google LLC
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+const pkg = __webpack_require__(62598);
+module.exports = { pkg };
+//# sourceMappingURL=util.cjs.map
+
+/***/ }),
+
+/***/ 69946:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+// Copyright 2023 Google LLC
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.USER_AGENT = exports.PRODUCT_NAME = exports.pkg = void 0;
+const pkg = __webpack_require__(21930);
+exports.pkg = pkg;
+const PRODUCT_NAME = 'google-api-nodejs-client';
+exports.PRODUCT_NAME = PRODUCT_NAME;
+const USER_AGENT = `${PRODUCT_NAME}/${pkg.version}`;
+exports.USER_AGENT = USER_AGENT;
+//# sourceMappingURL=shared.cjs.map
+
+/***/ }),
+
+/***/ 81247:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ AT: () => (/* binding */ supportsGoogleStrictToolSampling),
+/* harmony export */ B1: () => (/* binding */ convertTools),
+/* harmony export */ Ih: () => (/* binding */ usesGoogleThinkingLevel),
+/* harmony export */ O5: () => (/* binding */ resolveGoogleThinkingLevel),
+/* harmony export */ RE: () => (/* binding */ toGoogleSdkThinkingLevel),
+/* harmony export */ _0: () => (/* binding */ convertMessages),
+/* harmony export */ cq: () => (/* binding */ getDisabledGoogleThinkingConfig),
+/* harmony export */ f7: () => (/* binding */ mapStopReason),
+/* harmony export */ hz: () => (/* binding */ resolveGoogleFunctionCallingMode),
+/* harmony export */ ng: () => (/* binding */ toGoogleThinkingLevel),
+/* harmony export */ oH: () => (/* binding */ isThinkingPart),
+/* harmony export */ pc: () => (/* binding */ retainThoughtSignature),
+/* harmony export */ rM: () => (/* binding */ retryGoogleRequest)
+/* harmony export */ });
+/* unused harmony exports requiresToolCallId, mapToolChoice, mapStopReasonString */
+/* harmony import */ var _google_genai__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74751);
+/* harmony import */ var _models_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25941);
+/* harmony import */ var _utils_provider_retry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46863);
+/* harmony import */ var _utils_sanitize_unicode_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43780);
+/* harmony import */ var _utils_transcript_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19883);
+/* harmony import */ var _constrained_sampling_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(37776);
+/* harmony import */ var _transform_messages_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48809);
+/**
+ * Shared utilities for Google Generative AI and Google Vertex providers.
+ */
+
+
+
+
+
+
+
+const GOOGLE_SDK_THINKING_LEVEL_MAP = {
+ THINKING_LEVEL_UNSPECIFIED: _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .ThinkingLevel */ .HL.THINKING_LEVEL_UNSPECIFIED,
+ MINIMAL: _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .ThinkingLevel */ .HL.MINIMAL,
+ LOW: _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .ThinkingLevel */ .HL.LOW,
+ MEDIUM: _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .ThinkingLevel */ .HL.MEDIUM,
+ HIGH: _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .ThinkingLevel */ .HL.HIGH,
+};
+/** Resolve a supported pi level or model-specific Google mapping to a standard Google level. */
+function resolveGoogleThinkingLevel(model, level) {
+ const mapped = model.thinkingLevelMap?.[level];
+ const resolvedLevel = typeof mapped === "string" ? mapped.toLowerCase() : level;
+ switch (resolvedLevel) {
+ case "minimal":
+ case "low":
+ case "medium":
+ case "high":
+ return resolvedLevel;
+ default:
+ throw new Error(`Unsupported Google thinking level mapping for ${model.provider}/${model.id}: ${level} -> ${String(mapped)}`);
+ }
+}
+/**
+ * Whether this model uses Gemini's discrete `thinkingLevel` control instead of
+ * the token-based `thinkingBudget` control. Supported levels come from the
+ * model's `thinkingLevelMap`; this only selects the Google wire format.
+ */
+function usesGoogleThinkingLevel(model) {
+ const id = model.id.toLowerCase();
+ return (
+ // Match Gemini 3 Pro/Flash IDs with or without a minor version, such as
+ // gemini-3-flash-preview, gemini-3.1-pro-preview, and gemini-3.8-flash.
+ /gemini-3(?:\.\d+)?-(?:pro|flash)/.test(id) ||
+ id === "gemini-flash-latest" ||
+ id === "gemini-flash-lite-latest" ||
+ // Match both hosted Gemma 4 naming forms: gemma-4-* and gemma4-*.
+ /gemma-?4/.test(id));
+}
+function toGoogleThinkingLevel(level) {
+ switch (level) {
+ case "minimal":
+ return "MINIMAL";
+ case "low":
+ return "LOW";
+ case "medium":
+ return "MEDIUM";
+ case "high":
+ return "HIGH";
+ }
+}
+function toGoogleSdkThinkingLevel(level) {
+ return GOOGLE_SDK_THINKING_LEVEL_MAP[level];
+}
+function getDisabledGoogleThinkingConfig(model) {
+ if (!usesGoogleThinkingLevel(model))
+ return { thinkingBudget: 0 };
+ const fallback = (0,_models_js__WEBPACK_IMPORTED_MODULE_1__/* .clampThinkingLevel */ .Kt)(model, "off");
+ if (fallback === "off")
+ return { thinkingBudget: 0 };
+ const resolvedLevel = resolveGoogleThinkingLevel(model, fallback);
+ const apiLevel = toGoogleThinkingLevel(resolvedLevel);
+ return { thinkingLevel: toGoogleSdkThinkingLevel(apiLevel) };
+}
+/**
+ * Determines whether a streamed Gemini `Part` should be treated as "thinking".
+ *
+ * Protocol note (Gemini / Vertex AI thought signatures):
+ * - `thought: true` is the definitive marker for thinking content (thought summaries).
+ * - `thoughtSignature` is an encrypted representation of the model's internal thought process
+ * used to preserve reasoning context across multi-turn interactions.
+ * - `thoughtSignature` can appear on ANY part type (text, functionCall, etc.) - it does NOT
+ * indicate the part itself is thinking content.
+ * - For non-functionCall responses, the signature appears on the last part for context replay.
+ * - When persisting/replaying model outputs, signature-bearing parts must be preserved as-is;
+ * do not merge/move signatures across parts.
+ *
+ * See: https://ai.google.dev/gemini-api/docs/thought-signatures
+ */
+function isThinkingPart(part) {
+ return part.thought === true;
+}
+/**
+ * Retain thought signatures during streaming.
+ *
+ * Some backends only send `thoughtSignature` on the first delta for a given part/block; later deltas may omit it.
+ * This helper preserves the last non-empty signature for the current block.
+ *
+ * Note: this does NOT merge or move signatures across distinct response parts. It only prevents
+ * a signature from being overwritten with `undefined` within the same streamed block.
+ */
+function retainThoughtSignature(existing, incoming) {
+ if (typeof incoming === "string" && incoming.length > 0)
+ return incoming;
+ return existing;
+}
+// Thought signatures must be base64 for Google APIs (TYPE_BYTES).
+const base64SignaturePattern = /^[A-Za-z0-9+/]+={0,2}$/;
+function isValidThoughtSignature(signature) {
+ if (!signature)
+ return false;
+ if (signature.length % 4 !== 0)
+ return false;
+ return base64SignaturePattern.test(signature);
+}
+/**
+ * Only keep signatures from the same provider/model and with valid base64.
+ */
+function resolveThoughtSignature(isSameProviderAndModel, signature) {
+ return isSameProviderAndModel && isValidThoughtSignature(signature) ? signature : undefined;
+}
+/**
+ * Models via Google APIs that require explicit tool call IDs in function calls/responses.
+ */
+function requiresToolCallId(modelId) {
+ const geminiMajorVersion = getGeminiMajorVersion(modelId);
+ return (modelId.startsWith("claude-") ||
+ modelId.startsWith("gpt-oss-") ||
+ (geminiMajorVersion !== undefined && geminiMajorVersion >= 3));
+}
+function getGeminiMajorVersion(modelId) {
+ const match = modelId.toLowerCase().match(/^gemini(?:-live)?-(\d+)/);
+ if (!match)
+ return undefined;
+ return Number.parseInt(match[1], 10);
+}
+function supportsMultimodalFunctionResponse(modelId) {
+ const geminiMajorVersion = getGeminiMajorVersion(modelId);
+ if (geminiMajorVersion !== undefined) {
+ return geminiMajorVersion >= 3;
+ }
+ return true;
+}
+/**
+ * Convert internal messages to Gemini Content[] format.
+ */
+function convertMessages(model, context) {
+ // Gemini has no mid-conversation system messages; the leading prompt is sent as systemInstruction.
+ const conversation = (0,_utils_transcript_js__WEBPACK_IMPORTED_MODULE_2__/* .withoutInitialSystemMessage */ .rg)((0,_utils_transcript_js__WEBPACK_IMPORTED_MODULE_2__/* .collapseSystemMessages */ .zI)(context).messages);
+ const contents = [];
+ const normalizeToolCallId = (id) => {
+ if (!requiresToolCallId(model.id))
+ return id;
+ return id.replace(/[^a-zA-Z0-9_-]/g, "_").slice(0, 64);
+ };
+ const transformedMessages = (0,_transform_messages_js__WEBPACK_IMPORTED_MODULE_3__/* .transformMessages */ .b)(conversation, model, normalizeToolCallId);
+ for (const msg of transformedMessages) {
+ if (msg.role === "user") {
+ if (typeof msg.content === "string") {
+ contents.push({
+ role: "user",
+ parts: [{ text: (0,_utils_sanitize_unicode_js__WEBPACK_IMPORTED_MODULE_4__/* .sanitizeSurrogates */ .J)(msg.content) }],
+ });
+ }
+ else {
+ const parts = msg.content.map((item) => {
+ if (item.type === "text") {
+ return { text: (0,_utils_sanitize_unicode_js__WEBPACK_IMPORTED_MODULE_4__/* .sanitizeSurrogates */ .J)(item.text) };
+ }
+ else {
+ return {
+ inlineData: {
+ mimeType: item.mimeType,
+ data: item.data,
+ },
+ };
+ }
+ });
+ if (parts.length === 0)
+ continue;
+ contents.push({
+ role: "user",
+ parts,
+ });
+ }
+ }
+ else if (msg.role === "assistant") {
+ const parts = [];
+ // Check if message is from same provider and model - only then keep thinking blocks
+ const isSameProviderAndModel = msg.provider === model.provider && msg.model === model.id;
+ for (const block of msg.content) {
+ if (block.type === "text") {
+ const thoughtSignature = resolveThoughtSignature(isSameProviderAndModel, block.textSignature);
+ // Skip empty text blocks — unless they carry a thought signature. Gemini can attach
+ // the signature to a part whose visible text is empty and requires it echoed back;
+ // dropping it breaks the reasoning chain and the model intermittently ends mid-task
+ // turns with a thought-only STOP (empty completion, no tool call).
+ if ((!block.text || block.text.trim() === "") && !thoughtSignature)
+ continue;
+ parts.push({
+ text: (0,_utils_sanitize_unicode_js__WEBPACK_IMPORTED_MODULE_4__/* .sanitizeSurrogates */ .J)(block.text),
+ ...(thoughtSignature && { thoughtSignature }),
+ });
+ }
+ else if (block.type === "thinking") {
+ // Only keep as thinking block if same provider AND same model
+ // Otherwise convert to plain text (no tags to avoid model mimicking them)
+ if (isSameProviderAndModel) {
+ const thoughtSignature = resolveThoughtSignature(isSameProviderAndModel, block.thinkingSignature);
+ // Same rule as text blocks: an empty thinking block is dropped only when it
+ // carries no signature (mirrors the anthropic converter's handling).
+ if ((!block.thinking || block.thinking.trim() === "") && !thoughtSignature)
+ continue;
+ parts.push({
+ thought: true,
+ text: (0,_utils_sanitize_unicode_js__WEBPACK_IMPORTED_MODULE_4__/* .sanitizeSurrogates */ .J)(block.thinking),
+ ...(thoughtSignature && { thoughtSignature }),
+ });
+ }
+ else {
+ // Cross-provider/model: the signature is unusable, empty blocks stay dropped.
+ if (!block.thinking || block.thinking.trim() === "")
+ continue;
+ parts.push({
+ text: (0,_utils_sanitize_unicode_js__WEBPACK_IMPORTED_MODULE_4__/* .sanitizeSurrogates */ .J)(block.thinking),
+ });
+ }
+ }
+ else if (block.type === "toolCall") {
+ const thoughtSignature = resolveThoughtSignature(isSameProviderAndModel, block.thoughtSignature);
+ const part = {
+ functionCall: {
+ name: block.name,
+ args: block.arguments ?? {},
+ ...(requiresToolCallId(model.id) ? { id: block.id } : {}),
+ },
+ ...(thoughtSignature && { thoughtSignature }),
+ };
+ parts.push(part);
+ }
+ }
+ if (parts.length === 0)
+ continue;
+ contents.push({
+ role: "model",
+ parts,
+ });
+ }
+ else if (msg.role === "toolResult") {
+ // Extract text and image content
+ const textContent = msg.content.filter((c) => c.type === "text");
+ const textResult = textContent.map((c) => c.text).join("\n");
+ const imageContent = model.input.includes("image")
+ ? msg.content.filter((c) => c.type === "image")
+ : [];
+ const hasText = textResult.length > 0;
+ const hasImages = imageContent.length > 0;
+ // Gemini 3+ models support multimodal function responses with images nested inside
+ // functionResponse.parts. Claude and other non-Gemini models behind Cloud Code Assist /
+ // Gemini < 3 still needs a separate user image turn.
+ const modelSupportsMultimodalFunctionResponse = supportsMultimodalFunctionResponse(model.id);
+ // Use "output" key for success, "error" key for errors as per SDK documentation
+ const responseValue = hasText ? (0,_utils_sanitize_unicode_js__WEBPACK_IMPORTED_MODULE_4__/* .sanitizeSurrogates */ .J)(textResult) : hasImages ? "(see attached image)" : "";
+ const imageParts = imageContent.map((imageBlock) => ({
+ inlineData: {
+ mimeType: imageBlock.mimeType,
+ data: imageBlock.data,
+ },
+ }));
+ const includeId = requiresToolCallId(model.id);
+ const functionResponsePart = {
+ functionResponse: {
+ name: msg.toolName,
+ response: msg.isError ? { error: responseValue } : { output: responseValue },
+ ...(hasImages && modelSupportsMultimodalFunctionResponse && { parts: imageParts }),
+ ...(includeId ? { id: msg.toolCallId } : {}),
+ },
+ };
+ // Cloud Code Assist API requires all function responses to be in a single user turn.
+ // Check if the last content is already a user turn with function responses and merge.
+ const lastContent = contents[contents.length - 1];
+ if (lastContent?.role === "user" && lastContent.parts?.some((p) => p.functionResponse)) {
+ lastContent.parts.push(functionResponsePart);
+ }
+ else {
+ contents.push({
+ role: "user",
+ parts: [functionResponsePart],
+ });
+ }
+ // For Gemini < 3, add images in a separate user message
+ if (hasImages && !modelSupportsMultimodalFunctionResponse) {
+ contents.push({
+ role: "user",
+ parts: [{ text: "Tool result image:" }, ...imageParts],
+ });
+ }
+ }
+ }
+ return contents;
+}
+const JSON_SCHEMA_META_DECLARATIONS = new Set([
+ "$schema",
+ "$id",
+ "$anchor",
+ "$dynamicAnchor",
+ "$vocabulary",
+ "$comment",
+ "$defs",
+ "definitions", // pre-draft-2019-09 equivalent of $defs
+]);
+/**
+ * Strip meta-declarations from a schema obj
+ */
+function sanitizeForOpenApi(schema) {
+ if (typeof schema !== "object" || schema === null || Array.isArray(schema)) {
+ return schema;
+ }
+ const result = {};
+ for (const [key, value] of Object.entries(schema)) {
+ if (JSON_SCHEMA_META_DECLARATIONS.has(key))
+ continue;
+ result[key] = sanitizeForOpenApi(value);
+ }
+ return result;
+}
+/**
+ * Convert tools to Gemini function declarations format.
+ *
+ * By default uses `parametersJsonSchema` which supports full JSON Schema (including
+ * anyOf, oneOf, const, etc.). Set `useParameters` to true to use the legacy `parameters`
+ * field instead (OpenAPI 3.03 Schema). This is needed for Cloud Code Assist with Claude
+ * models, where the API translates `parameters` into Anthropic's `input_schema`.
+ */
+function convertTools(tools, useParameters = false, supportsStrictMode = true) {
+ if (tools.length === 0)
+ return undefined;
+ return [
+ {
+ functionDeclarations: tools.map((tool) => {
+ const strict = (0,_constrained_sampling_js__WEBPACK_IMPORTED_MODULE_5__/* .resolveJsonSchemaStrictSampling */ ._F)(tool, supportsStrictMode);
+ const parameters = (0,_constrained_sampling_js__WEBPACK_IMPORTED_MODULE_5__/* .getJsonSchemaToolParameters */ .Km)(tool, strict);
+ return {
+ name: tool.name,
+ description: tool.description,
+ ...(useParameters
+ ? { parameters: sanitizeForOpenApi(parameters) }
+ : { parametersJsonSchema: parameters }),
+ };
+ }),
+ },
+ ];
+}
+/** Gemini 3+ enforces required function parameters in validated tool-calling modes. */
+function supportsGoogleStrictToolSampling(modelId) {
+ const majorVersion = getGeminiMajorVersion(modelId);
+ return majorVersion !== undefined && majorVersion >= 3;
+}
+/** Map tool choice string to Gemini FunctionCallingConfigMode. */
+function mapToolChoice(choice) {
+ switch (choice) {
+ case "auto":
+ return _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FunctionCallingConfigMode */ .ce.AUTO;
+ case "none":
+ return _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FunctionCallingConfigMode */ .ce.NONE;
+ case "any":
+ return _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FunctionCallingConfigMode */ .ce.ANY;
+ default:
+ return _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FunctionCallingConfigMode */ .ce.AUTO;
+ }
+}
+function resolveGoogleFunctionCallingMode(tools, toolChoice, supportsStrictMode) {
+ const useStrictMode = tools.some((tool) => (0,_constrained_sampling_js__WEBPACK_IMPORTED_MODULE_5__/* .resolveJsonSchemaStrictSampling */ ._F)(tool, supportsStrictMode) === true);
+ if (toolChoice === "none" || toolChoice === "any") {
+ return mapToolChoice(toolChoice);
+ }
+ if (useStrictMode) {
+ return _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FunctionCallingConfigMode */ .ce.VALIDATED;
+ }
+ return toolChoice ? mapToolChoice(toolChoice) : undefined;
+}
+/**
+ * Map Gemini FinishReason to our StopReason.
+ */
+function mapStopReason(reason) {
+ switch (reason) {
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.STOP:
+ return "stop";
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.MAX_TOKENS:
+ return "length";
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.BLOCKLIST:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.PROHIBITED_CONTENT:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.SPII:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.SAFETY:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.IMAGE_SAFETY:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.IMAGE_PROHIBITED_CONTENT:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.IMAGE_RECITATION:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.IMAGE_OTHER:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.RECITATION:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.FINISH_REASON_UNSPECIFIED:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.OTHER:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.LANGUAGE:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.MALFORMED_FUNCTION_CALL:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.UNEXPECTED_TOOL_CALL:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.TOO_MANY_TOOL_CALLS:
+ case _google_genai__WEBPACK_IMPORTED_MODULE_0__/* .FinishReason */ .eD.NO_IMAGE:
+ return "error";
+ default: {
+ const _exhaustive = reason;
+ throw new Error(`Unhandled stop reason: ${_exhaustive}`);
+ }
+ }
+}
+/**
+ * Map string finish reason to our StopReason (for raw API responses).
+ */
+function mapStopReasonString(reason) {
+ switch (reason) {
+ case "STOP":
+ return "stop";
+ case "MAX_TOKENS":
+ return "length";
+ default:
+ return "error";
+ }
+}
+/**
+ * Run a Google GenAI SDK request with the shared provider retry policy
+ * (408/409/429/5xx with backoff, honoring retry-after), mirroring how the
+ * Anthropic and OpenAI adapters wrap their initial request in
+ * retryProviderRequest. The SDK's ApiError has a `status` property but no
+ * `headers` property, and retryProviderRequest only retries errors that carry
+ * both, so normalize the error by adding the missing `headers` before
+ * rethrowing.
+ */
+function retryGoogleRequest(request, options) {
+ return (0,_utils_provider_retry_js__WEBPACK_IMPORTED_MODULE_6__/* .retryProviderRequest */ .T)(async () => {
+ try {
+ return await request();
+ }
+ catch (error) {
+ if (error instanceof Error && "status" in error && !("headers" in error)) {
+ error.headers = undefined;
+ }
+ throw error;
+ }
+ }, {
+ maxRetries: options?.maxRetries,
+ maxRetryDelayMs: options?.maxRetryDelayMs,
+ signal: options?.signal,
+ });
+}
+//# sourceMappingURL=google-shared.js.map
+
+/***/ }),
+
+/***/ 20372:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Jo: () => (/* binding */ normalizeProviderError),
+/* harmony export */ lR: () => (/* binding */ formatProviderError)
+/* harmony export */ });
+/* unused harmony exports MAX_PROVIDER_ERROR_BODY_CHARS, truncateErrorText, safeJsonStringify */
+// Shared normalization for provider HTTP error objects.
+//
+// Endpoints behind a proxy / gateway may return a non-2xx response whose body
+// the provider SDK cannot fold into `error.message`. The SDK error object still
+// carries the HTTP status and the raw/parsed body, but under SDK-specific field
+// names. Provider catch blocks that read only `error.message` therefore drop
+// the body and surface opaque messages like `"403 status code (no body)"` or
+// collapse to `"Unknown: UnknownError"`.
+//
+// `normalizeProviderError` probes the known SDK field shapes (Mistral,
+// `openai`, `@google/genai`, AWS Bedrock) and returns a struct each provider
+// composes into its display string. The `messageCarriesBody` flag captures the
+// Anthropic / `@google/genai` happy path where the SDK already folded the body
+// into the message, so providers can preserve it without double-printing.
+const MAX_PROVIDER_ERROR_BODY_CHARS = 4000;
+function normalizeProviderError(error) {
+ if (!(error instanceof Error)) {
+ return { message: safeJsonStringify(error), messageCarriesBody: false };
+ }
+ const sdkError = error;
+ const status = extractStatus(sdkError);
+ const body = extractBody(sdkError);
+ const messageCarriesBody = body === undefined || error.message.includes(body);
+ return {
+ status,
+ body,
+ message: error.message,
+ messageCarriesBody,
+ };
+}
+/**
+ * Probe the HTTP status, first numeric hit wins, in SDK-field order:
+ * `statusCode` (Mistral) → `status` (`openai`, `@google/genai`) →
+ * `$metadata.httpStatusCode` (Bedrock) → `$response.statusCode` (Bedrock).
+ */
+function extractStatus(error) {
+ if (typeof error.statusCode === "number")
+ return error.statusCode;
+ if (typeof error.status === "number")
+ return error.status;
+ if (typeof error.$metadata?.httpStatusCode === "number")
+ return error.$metadata.httpStatusCode;
+ if (typeof error.$response?.statusCode === "number")
+ return error.$response.statusCode;
+ return undefined;
+}
+/**
+ * Probe the raw body reason, first usable hit wins, in SDK-field order:
+ * `body` string (Mistral) → `error` parsed JSON body object (`openai` SDK's
+ * `this.error`) → `$response.body` (Bedrock). Empty objects and unread response
+ * streams are treated as no body so they do not surface as `"{}"` or serialized
+ * stream internals. The chosen body is truncated to the cap.
+ */
+function extractBody(error) {
+ const bodyText = pickBodyText(error);
+ if (bodyText === undefined)
+ return undefined;
+ const trimmed = bodyText.trim();
+ if (trimmed.length === 0)
+ return undefined;
+ return truncateErrorText(trimmed, MAX_PROVIDER_ERROR_BODY_CHARS);
+}
+function pickBodyText(error) {
+ if (typeof error.body === "string")
+ return error.body;
+ if (isPlainNonEmptyObject(error.error))
+ return safeJsonStringify(error.error);
+ const responseBody = error.$response?.body;
+ if (typeof responseBody === "string")
+ return responseBody;
+ if (isReadableStreamLike(responseBody))
+ return undefined;
+ if (isPlainNonEmptyObject(responseBody))
+ return safeJsonStringify(responseBody);
+ return undefined;
+}
+function isReadableStreamLike(value) {
+ return typeof value === "object" && value !== null && "pipe" in value && typeof value.pipe === "function";
+}
+/**
+ * Only a PLAIN object counts as an HTTP body. SDK error fields can hold class
+ * instances instead of parsed bodies — AWS SDK v3's `$response.body` is an
+ * HTTP stream/response wrapper object, and stringifying one produced garbage
+ * like `{"_events":...}` as the "body", which then REPLACED `error.message`
+ * in the composed display string. `error.message` is where the SDK puts the
+ * real deserialized exception text ("Input is too long...", schema validation
+ * details, ...), so the one useful string was discarded for noise. A class
+ * instance yields no body, `messageCarriesBody` stays true, and the real
+ * message survives. Complements the `pipe` sniffing above: web
+ * ReadableStreams (pipeTo/pipeThrough, no `pipe`) and non-stream SDK wrapper
+ * classes fail the prototype check, while parsed JSON bodies (plain objects
+ * by construction) still pass.
+ */
+function isPlainNonEmptyObject(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto !== Object.prototype && proto !== null)
+ return false;
+ return Object.keys(value).length > 0;
+}
+/**
+ * Compose a display string from a normalized error. When the message already
+ * carries the body (Anthropic / `@google/genai` happy path) or no body/status
+ * was extracted, the message is returned unchanged. Otherwise the status and
+ * body are surfaced, with an optional provider prefix.
+ *
+ * - no prefix: `": "`
+ * - prefix: `" (): "`
+ */
+function formatProviderError(norm, prefix) {
+ if (norm.messageCarriesBody || norm.status === undefined || norm.body === undefined) {
+ return prefix !== undefined && norm.status !== undefined
+ ? `${prefix} (${norm.status}): ${norm.message}`
+ : norm.message;
+ }
+ return prefix !== undefined ? `${prefix} (${norm.status}): ${norm.body}` : `${norm.status}: ${norm.body}`;
+}
+function truncateErrorText(text, maxChars) {
+ if (text.length <= maxChars)
+ return text;
+ return `${text.slice(0, maxChars)}... [truncated ${text.length - maxChars} chars]`;
+}
+function safeJsonStringify(value) {
+ try {
+ const serialized = JSON.stringify(value);
+ return serialized === undefined ? String(value) : serialized;
+ }
+ catch {
+ return String(value);
+ }
+}
+//# sourceMappingURL=error-body.js.map
+
+/***/ }),
+
+/***/ 55278:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ w: () => (/* binding */ getPiUserAgent)
+/* harmony export */ });
+function loadNodeOs() {
+ if (typeof process === "undefined" || !(process.versions?.node || process.versions?.bun)) {
+ return null;
+ }
+ return process.getBuiltinModule?.("node:os") ?? null;
+}
+// Keep runtime OS loading browser-safe. A top-level runtime import of node:os breaks browser/Vite builds.
+const nodeOs = loadNodeOs();
+function getPiUserAgent() {
+ return nodeOs ? `pi (${nodeOs.platform()} ${nodeOs.release()}; ${nodeOs.arch()})` : "pi (browser)";
+}
+//# sourceMappingURL=pi-user-agent.js.map
+
+/***/ }),
+
+/***/ 46863:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ T: () => (/* binding */ retryProviderRequest)
+/* harmony export */ });
+const DEFAULT_MAX_RETRY_DELAY_MS = 60_000;
+function isProviderError(error) {
+ if (!(error instanceof Error) || !("status" in error) || !("headers" in error))
+ return false;
+ return ((error.status === undefined || typeof error.status === "number") &&
+ (error.headers === undefined || error.headers instanceof Headers));
+}
+/** Mirrors the pinned OpenAI/Anthropic SDK retry policy; review when either SDK is upgraded. */
+function isRetryableProviderError(error) {
+ const shouldRetry = error.headers?.get("x-should-retry");
+ if (shouldRetry === "true")
+ return true;
+ if (shouldRetry === "false")
+ return false;
+ if (error.status === undefined)
+ return true;
+ return (error.status === 408 ||
+ error.status === 409 ||
+ error.status === 429 ||
+ (typeof error.status === "number" && error.status >= 500));
+}
+function validateServerRetryDelayMs(delayMs, maxRetryDelayMs, providerErrorMessage) {
+ const maxDelayMs = maxRetryDelayMs ?? DEFAULT_MAX_RETRY_DELAY_MS;
+ if (maxDelayMs > 0 && delayMs > maxDelayMs) {
+ throw new Error(`Server requested ${Math.ceil(delayMs / 1000)}s retry delay (max: ${Math.ceil(maxDelayMs / 1000)}s). ${providerErrorMessage}`);
+ }
+ return delayMs;
+}
+function getRetryDelayMs(error, retryIndex, maxRetryDelayMs) {
+ const retryAfterMs = error.headers?.get("retry-after-ms");
+ if (retryAfterMs) {
+ const value = Number.parseFloat(retryAfterMs);
+ if (!Number.isNaN(value))
+ return validateServerRetryDelayMs(value, maxRetryDelayMs, error.message);
+ }
+ const retryAfter = error.headers?.get("retry-after");
+ if (retryAfter) {
+ const seconds = Number.parseFloat(retryAfter);
+ const delayMs = Number.isNaN(seconds) ? Date.parse(retryAfter) - Date.now() : seconds * 1000;
+ return validateServerRetryDelayMs(delayMs, maxRetryDelayMs, error.message);
+ }
+ const exponentialDelay = Math.min(0.5 * 2 ** retryIndex, 8) * 1000;
+ return exponentialDelay * (1 - Math.random() * 0.25);
+}
+function createAbortError() {
+ const error = new Error("Request aborted");
+ error.name = "AbortError";
+ return error;
+}
+function abortableSleep(ms, signal) {
+ return new Promise((resolve, reject) => {
+ if (signal?.aborted) {
+ reject(createAbortError());
+ return;
+ }
+ const onAbort = () => {
+ clearTimeout(timeout);
+ reject(createAbortError());
+ };
+ const timeout = setTimeout(() => {
+ signal?.removeEventListener("abort", onAbort);
+ resolve();
+ }, Math.max(0, ms));
+ signal?.addEventListener("abort", onAbort, { once: true });
+ });
+}
+/**
+ * Reproduce the retry behavior used by the OpenAI and Anthropic SDKs while making
+ * their backoff sleep interruptible. Their built-in retry timers ignore the
+ * request AbortSignal, so callers must invoke the SDK with `maxRetries: 0` and
+ * wrap the request with this helper. Provider-requested delays above
+ * `maxRetryDelayMs` fail immediately (60 seconds by default); set it to zero to
+ * disable the limit.
+ */
+async function retryProviderRequest(request, options = {}) {
+ const maxRetries = options.maxRetries ?? 0;
+ let retriesRemaining = maxRetries;
+ for (;;) {
+ try {
+ // Each retry is a fresh SDK request, so X-Stainless-Retry-Count remains zero.
+ return await request();
+ }
+ catch (error) {
+ if (options.signal?.aborted)
+ throw createAbortError();
+ if (retriesRemaining <= 0 || !isProviderError(error) || !isRetryableProviderError(error))
+ throw error;
+ const retryIndex = maxRetries - retriesRemaining;
+ retriesRemaining--;
+ await abortableSleep(getRetryDelayMs(error, retryIndex, options.maxRetryDelayMs), options.signal);
+ }
+ }
+}
+//# sourceMappingURL=provider-retry.js.map
+
+/***/ }),
+
+/***/ 74751:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ eD: () => (/* binding */ FinishReason),
+ ce: () => (/* binding */ FunctionCallingConfigMode),
+ M4: () => (/* binding */ GoogleGenAI),
+ r: () => (/* binding */ ResourceScope),
+ HL: () => (/* binding */ ThinkingLevel)
+});
+
+// UNUSED EXPORTS: ActivityHandling, AdapterSize, AggregationMetric, ApiError, ApiSpec, AspectRatio, AudioResponseFormat, AudioTranscriptionConfigMode, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, Delivery, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EmbeddingApiType, EndSensitivity, Environment, EvaluateDatasetResponse, FeatureSelectionPreference, FileSource, FileState, Files, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImageResizeMode, ImageResponseFormat, ImageSize, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, InteractionStatus, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MatchOperation, MediaModality, MediaProcessing, MediaResolution, Modality, ModelStage, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PairwiseChoice, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, ProminentPeople, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReinforcementTuningAutoraterScorerParsedResponseConversionScorer, ReinforcementTuningParseResponseConfig, ReinforcementTuningThinkingLevel, ReplayResponse, ResponseFormat, ResponseParseType, SafetyFilterLevel, SafetyPolicy, Scale, SegmentImageResponse, SegmentMode, ServiceTier, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, TextResponseFormat, Tokens, ToolResponse, ToolType, TrafficType, TuningJobState, TuningMethod, TuningMode, TuningSpeed, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, ValidateRewardResponse, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VideoOrientation, VideoResponseFormat, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls
+
+// EXTERNAL MODULE: ../../node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js
+var p_retry = __webpack_require__(37301);
+// EXTERNAL MODULE: ../../node_modules/.pnpm/google-auth-library@10.9.1/node_modules/google-auth-library/build/src/index.js
+var src = __webpack_require__(17220);
+// EXTERNAL MODULE: external "fs"
+var external_fs_ = __webpack_require__(79896);
+// EXTERNAL MODULE: external "fs/promises"
+var promises_ = __webpack_require__(91943);
+// EXTERNAL MODULE: external "node:stream"
+var external_node_stream_ = __webpack_require__(57075);
+// EXTERNAL MODULE: external "node:stream/promises"
+var external_node_stream_promises_ = __webpack_require__(46466);
+// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.22.0/node_modules/ws/lib/stream.js
+var stream = __webpack_require__(62509);
+// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.22.0/node_modules/ws/lib/extension.js
+var extension = __webpack_require__(98904);
+// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.22.0/node_modules/ws/lib/permessage-deflate.js
+var permessage_deflate = __webpack_require__(61613);
+// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.22.0/node_modules/ws/lib/receiver.js
+var receiver = __webpack_require__(37620);
+// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.22.0/node_modules/ws/lib/sender.js
+var sender = __webpack_require__(18604);
+// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.22.0/node_modules/ws/lib/subprotocol.js
+var subprotocol = __webpack_require__(1643);
+// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.22.0/node_modules/ws/lib/websocket.js
+var websocket = __webpack_require__(16126);
+// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.22.0/node_modules/ws/lib/websocket-server.js
+var websocket_server = __webpack_require__(96264);
+;// CONCATENATED MODULE: ../../node_modules/.pnpm/ws@8.22.0/node_modules/ws/wrapper.mjs
+
+
+
+
+
+
+
+
+
+
+
+/* harmony default export */ const wrapper = ((/* unused pure expression or super */ null && (WebSocket)));
+
+// EXTERNAL MODULE: external "path"
+var external_path_ = __webpack_require__(16928);
+;// CONCATENATED MODULE: ../../node_modules/.pnpm/@google+genai@2.21.0_@modelcontextprotocol+sdk@1.32.1_zod@4.6.7_/node_modules/@google/genai/dist/node/index.mjs
+
+
+
+
+
+
+
+
+
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+let _defaultBaseGeminiUrl = undefined;
+let _defaultBaseVertexUrl = undefined;
+/**
+ * Overrides the base URLs for the Gemini API and Vertex AI API.
+ *
+ * @remarks This function should be called before initializing the SDK. If the
+ * base URLs are set after initializing the SDK, the base URLs will not be
+ * updated. Base URLs provided in the HttpOptions will also take precedence over
+ * URLs set here.
+ *
+ * @example
+ * ```ts
+ * import {GoogleGenAI, setDefaultBaseUrls} from '@google/genai';
+ * // Override the base URL for the Gemini API.
+ * setDefaultBaseUrls({geminiUrl:'https://gemini.google.com'});
+ *
+ * // Override the base URL for the Vertex AI API.
+ * setDefaultBaseUrls({vertexUrl: 'https://vertexai.googleapis.com'});
+ *
+ * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});
+ * ```
+ */
+function setDefaultBaseUrls(baseUrlParams) {
+ _defaultBaseGeminiUrl = baseUrlParams.geminiUrl;
+ _defaultBaseVertexUrl = baseUrlParams.vertexUrl;
+}
+/**
+ * Returns the default base URLs for the Gemini API and Vertex AI API.
+ */
+function getDefaultBaseUrls() {
+ return {
+ geminiUrl: _defaultBaseGeminiUrl,
+ vertexUrl: _defaultBaseVertexUrl,
+ };
+}
+/**
+ * Returns the default base URL based on the following priority:
+ * 1. Base URLs set via HttpOptions.
+ * 2. Base URLs set via the latest call to setDefaultBaseUrls.
+ * 3. Base URLs set via environment variables.
+ */
+function getBaseUrl(httpOptions, vertexai, vertexBaseUrlFromEnv, geminiBaseUrlFromEnv) {
+ var _a, _b;
+ if (!(httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.baseUrl)) {
+ const defaultBaseUrls = getDefaultBaseUrls();
+ if (vertexai) {
+ return (_a = defaultBaseUrls.vertexUrl) !== null && _a !== void 0 ? _a : vertexBaseUrlFromEnv;
+ }
+ else {
+ return (_b = defaultBaseUrls.geminiUrl) !== null && _b !== void 0 ? _b : geminiBaseUrlFromEnv;
+ }
+ }
+ return httpOptions.baseUrl;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class BaseModule {
+}
+function formatMap(templateString, valueMap) {
+ // Use a regular expression to find all placeholders in the template string
+ const regex = /\{([^}]+)\}/g;
+ // Replace each placeholder with its corresponding value from the valueMap
+ return templateString.replace(regex, (match, key) => {
+ if (Object.prototype.hasOwnProperty.call(valueMap, key)) {
+ const value = valueMap[key];
+ // Convert the value to a string if it's not a string already
+ return value !== undefined && value !== null ? String(value) : '';
+ }
+ else {
+ // Handle missing keys
+ throw new Error(`Key '${key}' not found in valueMap.`);
+ }
+ });
+}
+function setValueByPath(data, keys, value) {
+ for (let i = 0; i < keys.length - 1; i++) {
+ const key = keys[i];
+ if (key.endsWith('[]')) {
+ const keyName = key.slice(0, -2);
+ if (!(keyName in data)) {
+ if (Array.isArray(value)) {
+ data[keyName] = Array.from({ length: value.length }, () => ({}));
+ }
+ else {
+ throw new Error(`Value must be a list given an array path ${key}`);
+ }
+ }
+ if (Array.isArray(data[keyName])) {
+ const arrayData = data[keyName];
+ if (Array.isArray(value)) {
+ for (let j = 0; j < arrayData.length; j++) {
+ const entry = arrayData[j];
+ setValueByPath(entry, keys.slice(i + 1), value[j]);
+ }
+ }
+ else {
+ for (const d of arrayData) {
+ setValueByPath(d, keys.slice(i + 1), value);
+ }
+ }
+ }
+ return;
+ }
+ else if (key.endsWith('[0]')) {
+ const keyName = key.slice(0, -3);
+ if (!(keyName in data)) {
+ data[keyName] = [{}];
+ }
+ const arrayData = data[keyName];
+ setValueByPath(arrayData[0], keys.slice(i + 1), value);
+ return;
+ }
+ if (!data[key] || typeof data[key] !== 'object') {
+ data[key] = {};
+ }
+ data = data[key];
+ }
+ const keyToSet = keys[keys.length - 1];
+ const existingData = data[keyToSet];
+ if (existingData !== undefined) {
+ if (!value ||
+ (typeof value === 'object' && Object.keys(value).length === 0)) {
+ return;
+ }
+ if (value === existingData) {
+ return;
+ }
+ if (typeof existingData === 'object' &&
+ typeof value === 'object' &&
+ existingData !== null &&
+ value !== null) {
+ Object.assign(existingData, value);
+ }
+ else {
+ throw new Error(`Cannot set value for an existing key. Key: ${keyToSet}`);
+ }
+ }
+ else {
+ if (keyToSet === '_self' &&
+ typeof value === 'object' &&
+ value !== null &&
+ !Array.isArray(value)) {
+ const valueAsRecord = value;
+ Object.assign(data, valueAsRecord);
+ }
+ else {
+ data[keyToSet] = value;
+ }
+ }
+}
+function getValueByPath(data, keys, defaultValue = undefined) {
+ try {
+ if (keys.length === 1 && keys[0] === '_self') {
+ return data;
+ }
+ for (let i = 0; i < keys.length; i++) {
+ if (typeof data !== 'object' || data === null) {
+ return defaultValue;
+ }
+ const key = keys[i];
+ if (key.endsWith('[]')) {
+ const keyName = key.slice(0, -2);
+ if (keyName in data) {
+ const arrayData = data[keyName];
+ if (!Array.isArray(arrayData)) {
+ return defaultValue;
+ }
+ return arrayData.map((d) => getValueByPath(d, keys.slice(i + 1), defaultValue));
+ }
+ else {
+ return defaultValue;
+ }
+ }
+ else {
+ data = data[key];
+ }
+ }
+ return data;
+ }
+ catch (error) {
+ if (error instanceof TypeError) {
+ return defaultValue;
+ }
+ throw error;
+ }
+}
+/**
+ * Moves values from source paths to destination paths.
+ *
+ * Examples:
+ * moveValueByPath(
+ * {'requests': [{'content': v1}, {'content': v2}]},
+ * {'requests[].*': 'requests[].request.*'}
+ * )
+ * -> {'requests': [{'request': {'content': v1}}, {'request': {'content': v2}}]}
+ */
+function moveValueByPath(data, paths) {
+ for (const [sourcePath, destPath] of Object.entries(paths)) {
+ const sourceKeys = sourcePath.split('.');
+ const destKeys = destPath.split('.');
+ // Determine keys to exclude from wildcard to avoid cyclic references
+ const excludeKeys = new Set();
+ let wildcardIdx = -1;
+ for (let i = 0; i < sourceKeys.length; i++) {
+ if (sourceKeys[i] === '*') {
+ wildcardIdx = i;
+ break;
+ }
+ }
+ if (wildcardIdx !== -1 && destKeys.length > wildcardIdx) {
+ // Extract the intermediate key between source and dest paths
+ // Example: source=['requests[]', '*'], dest=['requests[]', 'request', '*']
+ // We want to exclude 'request'
+ for (let i = wildcardIdx; i < destKeys.length; i++) {
+ const key = destKeys[i];
+ if (key !== '*' && !key.endsWith('[]') && !key.endsWith('[0]')) {
+ excludeKeys.add(key);
+ }
+ }
+ }
+ _moveValueRecursive(data, sourceKeys, destKeys, 0, excludeKeys);
+ }
+}
+/**
+ * Recursively moves values from source path to destination path.
+ */
+function _moveValueRecursive(data, sourceKeys, destKeys, keyIdx, excludeKeys) {
+ if (keyIdx >= sourceKeys.length) {
+ return;
+ }
+ if (typeof data !== 'object' || data === null) {
+ return;
+ }
+ const key = sourceKeys[keyIdx];
+ if (key.endsWith('[]')) {
+ const keyName = key.slice(0, -2);
+ const dataRecord = data;
+ if (keyName in dataRecord && Array.isArray(dataRecord[keyName])) {
+ for (const item of dataRecord[keyName]) {
+ _moveValueRecursive(item, sourceKeys, destKeys, keyIdx + 1, excludeKeys);
+ }
+ }
+ }
+ else if (key === '*') {
+ // wildcard - move all fields
+ if (typeof data === 'object' && data !== null && !Array.isArray(data)) {
+ const dataRecord = data;
+ const keysToMove = Object.keys(dataRecord).filter((k) => !k.startsWith('_') && !excludeKeys.has(k));
+ const valuesToMove = {};
+ for (const k of keysToMove) {
+ valuesToMove[k] = dataRecord[k];
+ }
+ // Set values at destination
+ for (const [k, v] of Object.entries(valuesToMove)) {
+ const newDestKeys = [];
+ for (const dk of destKeys.slice(keyIdx)) {
+ if (dk === '*') {
+ newDestKeys.push(k);
+ }
+ else {
+ newDestKeys.push(dk);
+ }
+ }
+ setValueByPath(dataRecord, newDestKeys, v);
+ }
+ for (const k of keysToMove) {
+ delete dataRecord[k];
+ }
+ }
+ }
+ else {
+ // Navigate to next level
+ const dataRecord = data;
+ if (key in dataRecord) {
+ _moveValueRecursive(dataRecord[key], sourceKeys, destKeys, keyIdx + 1, excludeKeys);
+ }
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+function tBytes$1(fromBytes) {
+ if (typeof fromBytes !== 'string') {
+ throw new Error('fromImageBytes must be a string');
+ }
+ // TODO(b/389133914): Remove dummy bytes converter.
+ return fromBytes;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
+function fetchPredictOperationParametersToVertex(fromObject) {
+ const toObject = {};
+ const fromOperationName = getValueByPath(fromObject, [
+ 'operationName',
+ ]);
+ if (fromOperationName != null) {
+ setValueByPath(toObject, ['operationName'], fromOperationName);
+ }
+ const fromResourceName = getValueByPath(fromObject, ['resourceName']);
+ if (fromResourceName != null) {
+ setValueByPath(toObject, ['_url', 'resourceName'], fromResourceName);
+ }
+ return toObject;
+}
+function generateVideosOperationFromMldev$1(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ const fromDone = getValueByPath(fromObject, ['done']);
+ if (fromDone != null) {
+ setValueByPath(toObject, ['done'], fromDone);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ const fromResponse = getValueByPath(fromObject, [
+ 'response',
+ 'generateVideoResponse',
+ ]);
+ if (fromResponse != null) {
+ setValueByPath(toObject, ['response'], generateVideosResponseFromMldev$1(fromResponse));
+ }
+ return toObject;
+}
+function generateVideosOperationFromVertex$1(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ const fromDone = getValueByPath(fromObject, ['done']);
+ if (fromDone != null) {
+ setValueByPath(toObject, ['done'], fromDone);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ const fromResponse = getValueByPath(fromObject, ['response']);
+ if (fromResponse != null) {
+ setValueByPath(toObject, ['response'], generateVideosResponseFromVertex$1(fromResponse));
+ }
+ return toObject;
+}
+function generateVideosResponseFromMldev$1(fromObject) {
+ const toObject = {};
+ const fromGeneratedVideos = getValueByPath(fromObject, [
+ 'generatedSamples',
+ ]);
+ if (fromGeneratedVideos != null) {
+ let transformedList = fromGeneratedVideos;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return generatedVideoFromMldev$1(item);
+ });
+ }
+ setValueByPath(toObject, ['generatedVideos'], transformedList);
+ }
+ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [
+ 'raiMediaFilteredCount',
+ ]);
+ if (fromRaiMediaFilteredCount != null) {
+ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount);
+ }
+ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [
+ 'raiMediaFilteredReasons',
+ ]);
+ if (fromRaiMediaFilteredReasons != null) {
+ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons);
+ }
+ return toObject;
+}
+function generateVideosResponseFromVertex$1(fromObject) {
+ const toObject = {};
+ const fromGeneratedVideos = getValueByPath(fromObject, ['videos']);
+ if (fromGeneratedVideos != null) {
+ let transformedList = fromGeneratedVideos;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return generatedVideoFromVertex$1(item);
+ });
+ }
+ setValueByPath(toObject, ['generatedVideos'], transformedList);
+ }
+ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [
+ 'raiMediaFilteredCount',
+ ]);
+ if (fromRaiMediaFilteredCount != null) {
+ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount);
+ }
+ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [
+ 'raiMediaFilteredReasons',
+ ]);
+ if (fromRaiMediaFilteredReasons != null) {
+ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons);
+ }
+ return toObject;
+}
+function generatedVideoFromMldev$1(fromObject) {
+ const toObject = {};
+ const fromVideo = getValueByPath(fromObject, ['video']);
+ if (fromVideo != null) {
+ setValueByPath(toObject, ['video'], videoFromMldev$1(fromVideo));
+ }
+ return toObject;
+}
+function generatedVideoFromVertex$1(fromObject) {
+ const toObject = {};
+ const fromVideo = getValueByPath(fromObject, ['_self']);
+ if (fromVideo != null) {
+ setValueByPath(toObject, ['video'], videoFromVertex$1(fromVideo));
+ }
+ return toObject;
+}
+function getOperationParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromOperationName = getValueByPath(fromObject, [
+ 'operationName',
+ ]);
+ if (fromOperationName != null) {
+ setValueByPath(toObject, ['_url', 'operationName'], fromOperationName);
+ }
+ return toObject;
+}
+function getOperationParametersToVertex(fromObject) {
+ const toObject = {};
+ const fromOperationName = getValueByPath(fromObject, [
+ 'operationName',
+ ]);
+ if (fromOperationName != null) {
+ setValueByPath(toObject, ['_url', 'operationName'], fromOperationName);
+ }
+ return toObject;
+}
+function importFileOperationFromMldev$1(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ const fromDone = getValueByPath(fromObject, ['done']);
+ if (fromDone != null) {
+ setValueByPath(toObject, ['done'], fromDone);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ const fromResponse = getValueByPath(fromObject, ['response']);
+ if (fromResponse != null) {
+ setValueByPath(toObject, ['response'], importFileResponseFromMldev$1(fromResponse));
+ }
+ return toObject;
+}
+function importFileResponseFromMldev$1(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromParent = getValueByPath(fromObject, ['parent']);
+ if (fromParent != null) {
+ setValueByPath(toObject, ['parent'], fromParent);
+ }
+ const fromDocumentName = getValueByPath(fromObject, ['documentName']);
+ if (fromDocumentName != null) {
+ setValueByPath(toObject, ['documentName'], fromDocumentName);
+ }
+ return toObject;
+}
+function uploadToFileSearchStoreOperationFromMldev(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ const fromDone = getValueByPath(fromObject, ['done']);
+ if (fromDone != null) {
+ setValueByPath(toObject, ['done'], fromDone);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ const fromResponse = getValueByPath(fromObject, ['response']);
+ if (fromResponse != null) {
+ setValueByPath(toObject, ['response'], uploadToFileSearchStoreResponseFromMldev(fromResponse));
+ }
+ return toObject;
+}
+function uploadToFileSearchStoreResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromParent = getValueByPath(fromObject, ['parent']);
+ if (fromParent != null) {
+ setValueByPath(toObject, ['parent'], fromParent);
+ }
+ const fromDocumentName = getValueByPath(fromObject, ['documentName']);
+ if (fromDocumentName != null) {
+ setValueByPath(toObject, ['documentName'], fromDocumentName);
+ }
+ return toObject;
+}
+function videoFromMldev$1(fromObject) {
+ const toObject = {};
+ const fromUri = getValueByPath(fromObject, ['uri']);
+ if (fromUri != null) {
+ setValueByPath(toObject, ['uri'], fromUri);
+ }
+ const fromVideoBytes = getValueByPath(fromObject, ['encodedVideo']);
+ if (fromVideoBytes != null) {
+ setValueByPath(toObject, ['videoBytes'], tBytes$1(fromVideoBytes));
+ }
+ const fromMimeType = getValueByPath(fromObject, ['encoding']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function videoFromVertex$1(fromObject) {
+ const toObject = {};
+ const fromUri = getValueByPath(fromObject, ['gcsUri']);
+ if (fromUri != null) {
+ setValueByPath(toObject, ['uri'], fromUri);
+ }
+ const fromVideoBytes = getValueByPath(fromObject, [
+ 'bytesBase64Encoded',
+ ]);
+ if (fromVideoBytes != null) {
+ setValueByPath(toObject, ['videoBytes'], tBytes$1(fromVideoBytes));
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+/** Outcome of the code execution. */
+var Outcome;
+(function (Outcome) {
+ /**
+ * Unspecified status. This value should not be used.
+ */
+ Outcome["OUTCOME_UNSPECIFIED"] = "OUTCOME_UNSPECIFIED";
+ /**
+ * Code execution completed successfully. `output` contains the stdout, if any.
+ */
+ Outcome["OUTCOME_OK"] = "OUTCOME_OK";
+ /**
+ * Code execution failed. `output` contains the stderr and stdout, if any.
+ */
+ Outcome["OUTCOME_FAILED"] = "OUTCOME_FAILED";
+ /**
+ * Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present.
+ */
+ Outcome["OUTCOME_DEADLINE_EXCEEDED"] = "OUTCOME_DEADLINE_EXCEEDED";
+})(Outcome || (Outcome = {}));
+/** Programming language of the `code`. */
+var Language;
+(function (Language) {
+ /**
+ * Unspecified language. This value should not be used.
+ */
+ Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
+ /**
+ * Python >= 3.10, with numpy and simpy available.
+ */
+ Language["PYTHON"] = "PYTHON";
+})(Language || (Language = {}));
+/** Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. */
+var FunctionResponseScheduling;
+(function (FunctionResponseScheduling) {
+ /**
+ * This value is unused.
+ */
+ FunctionResponseScheduling["SCHEDULING_UNSPECIFIED"] = "SCHEDULING_UNSPECIFIED";
+ /**
+ * Only add the result to the conversation context, do not interrupt or trigger generation.
+ */
+ FunctionResponseScheduling["SILENT"] = "SILENT";
+ /**
+ * Add the result to the conversation context, and prompt to generate output without interrupting ongoing generation.
+ */
+ FunctionResponseScheduling["WHEN_IDLE"] = "WHEN_IDLE";
+ /**
+ * Add the result to the conversation context, interrupt ongoing generation and prompt to generate output.
+ */
+ FunctionResponseScheduling["INTERRUPT"] = "INTERRUPT";
+})(FunctionResponseScheduling || (FunctionResponseScheduling = {}));
+/** Data type of the schema field. */
+var Type;
+(function (Type) {
+ /**
+ * Not specified, should not be used.
+ */
+ Type["TYPE_UNSPECIFIED"] = "TYPE_UNSPECIFIED";
+ /**
+ * OpenAPI string type
+ */
+ Type["STRING"] = "STRING";
+ /**
+ * OpenAPI number type
+ */
+ Type["NUMBER"] = "NUMBER";
+ /**
+ * OpenAPI integer type
+ */
+ Type["INTEGER"] = "INTEGER";
+ /**
+ * OpenAPI boolean type
+ */
+ Type["BOOLEAN"] = "BOOLEAN";
+ /**
+ * OpenAPI array type
+ */
+ Type["ARRAY"] = "ARRAY";
+ /**
+ * OpenAPI object type
+ */
+ Type["OBJECT"] = "OBJECT";
+ /**
+ * Null type
+ */
+ Type["NULL"] = "NULL";
+})(Type || (Type = {}));
+/** Type of auth scheme. This enum is not supported in Gemini API. */
+var AuthType;
+(function (AuthType) {
+ AuthType["AUTH_TYPE_UNSPECIFIED"] = "AUTH_TYPE_UNSPECIFIED";
+ /**
+ * No Auth.
+ */
+ AuthType["NO_AUTH"] = "NO_AUTH";
+ /**
+ * API Key Auth.
+ */
+ AuthType["API_KEY_AUTH"] = "API_KEY_AUTH";
+ /**
+ * HTTP Basic Auth.
+ */
+ AuthType["HTTP_BASIC_AUTH"] = "HTTP_BASIC_AUTH";
+ /**
+ * Google Service Account Auth.
+ */
+ AuthType["GOOGLE_SERVICE_ACCOUNT_AUTH"] = "GOOGLE_SERVICE_ACCOUNT_AUTH";
+ /**
+ * OAuth auth.
+ */
+ AuthType["OAUTH"] = "OAUTH";
+ /**
+ * OpenID Connect (OIDC) Auth.
+ */
+ AuthType["OIDC_AUTH"] = "OIDC_AUTH";
+})(AuthType || (AuthType = {}));
+/** The location of the API key. This enum is not supported in Gemini API. */
+var HttpElementLocation;
+(function (HttpElementLocation) {
+ HttpElementLocation["HTTP_IN_UNSPECIFIED"] = "HTTP_IN_UNSPECIFIED";
+ /**
+ * Element is in the HTTP request query.
+ */
+ HttpElementLocation["HTTP_IN_QUERY"] = "HTTP_IN_QUERY";
+ /**
+ * Element is in the HTTP request header.
+ */
+ HttpElementLocation["HTTP_IN_HEADER"] = "HTTP_IN_HEADER";
+ /**
+ * Element is in the HTTP request path.
+ */
+ HttpElementLocation["HTTP_IN_PATH"] = "HTTP_IN_PATH";
+ /**
+ * Element is in the HTTP request body.
+ */
+ HttpElementLocation["HTTP_IN_BODY"] = "HTTP_IN_BODY";
+ /**
+ * Element is in the HTTP request cookie.
+ */
+ HttpElementLocation["HTTP_IN_COOKIE"] = "HTTP_IN_COOKIE";
+})(HttpElementLocation || (HttpElementLocation = {}));
+/** The API spec that the external API implements. This enum is not supported in Gemini API. */
+var ApiSpec;
+(function (ApiSpec) {
+ /**
+ * Unspecified API spec. This value should not be used.
+ */
+ ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
+ /**
+ * Simple search API spec.
+ */
+ ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
+ /**
+ * Elastic search API spec.
+ */
+ ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
+})(ApiSpec || (ApiSpec = {}));
+/** The environment being operated. */
+var Environment;
+(function (Environment) {
+ /**
+ * Defaults to browser.
+ */
+ Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
+ /**
+ * Operates in a web browser.
+ */
+ Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
+ /**
+ * Operates in a mobile environment.
+ */
+ Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
+ /**
+ * Operates in a desktop environment.
+ */
+ Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
+})(Environment || (Environment = {}));
+/** SafetyPolicy */
+var SafetyPolicy;
+(function (SafetyPolicy) {
+ /**
+ * Unspecified safety policy.
+ */
+ SafetyPolicy["SAFETY_POLICY_UNSPECIFIED"] = "SAFETY_POLICY_UNSPECIFIED";
+ /**
+ * Safety policy for financial transactions.
+ */
+ SafetyPolicy["FINANCIAL_TRANSACTIONS"] = "FINANCIAL_TRANSACTIONS";
+ /**
+ * Safety policy for sensitive data modification.
+ */
+ SafetyPolicy["SENSITIVE_DATA_MODIFICATION"] = "SENSITIVE_DATA_MODIFICATION";
+ /**
+ * Safety policy for communication tools (e.g. Gmail, Chat, Meet).
+ */
+ SafetyPolicy["COMMUNICATION_TOOL"] = "COMMUNICATION_TOOL";
+ /**
+ * Safety policy for account creation.
+ */
+ SafetyPolicy["ACCOUNT_CREATION"] = "ACCOUNT_CREATION";
+ /**
+ * Safety policy for data modification.
+ */
+ SafetyPolicy["DATA_MODIFICATION"] = "DATA_MODIFICATION";
+ /**
+ * Safety policy for user consent management.
+ */
+ SafetyPolicy["USER_CONSENT_MANAGEMENT"] = "USER_CONSENT_MANAGEMENT";
+ /**
+ * Safety policy for legal terms and agreements.
+ */
+ SafetyPolicy["LEGAL_TERMS_AND_AGREEMENTS"] = "LEGAL_TERMS_AND_AGREEMENTS";
+})(SafetyPolicy || (SafetyPolicy = {}));
+/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
+var PhishBlockThreshold;
+(function (PhishBlockThreshold) {
+ /**
+ * Defaults to unspecified.
+ */
+ PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
+ /**
+ * Blocks Low and above confidence URL that is risky.
+ */
+ PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
+ /**
+ * Blocks Medium and above confidence URL that is risky.
+ */
+ PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
+ /**
+ * Blocks High and above confidence URL that is risky.
+ */
+ PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
+ /**
+ * Blocks Higher and above confidence URL that is risky.
+ */
+ PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
+ /**
+ * Blocks Very high and above confidence URL that is risky.
+ */
+ PhishBlockThreshold["BLOCK_VERY_HIGH_AND_ABOVE"] = "BLOCK_VERY_HIGH_AND_ABOVE";
+ /**
+ * Blocks Extremely high confidence URL that is risky.
+ */
+ PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
+})(PhishBlockThreshold || (PhishBlockThreshold = {}));
+/** Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
+var Behavior;
+(function (Behavior) {
+ /**
+ * This value is unspecified.
+ */
+ Behavior["UNSPECIFIED"] = "UNSPECIFIED";
+ /**
+ * If set, the system will wait to receive the function response before continuing the conversation.
+ */
+ Behavior["BLOCKING"] = "BLOCKING";
+ /**
+ * If set, the system will not wait to receive the function response. Instead, it will attempt to handle function responses as they become available while maintaining the conversation between the user and the model.
+ */
+ Behavior["NON_BLOCKING"] = "NON_BLOCKING";
+})(Behavior || (Behavior = {}));
+/** The mode of the predictor to be used in dynamic retrieval. */
+var DynamicRetrievalConfigMode;
+(function (DynamicRetrievalConfigMode) {
+ /**
+ * Always trigger retrieval.
+ */
+ DynamicRetrievalConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
+ /**
+ * Run retrieval only when system decides it is necessary.
+ */
+ DynamicRetrievalConfigMode["MODE_DYNAMIC"] = "MODE_DYNAMIC";
+})(DynamicRetrievalConfigMode || (DynamicRetrievalConfigMode = {}));
+/** The number of thoughts tokens that the model should generate. */
+var ThinkingLevel;
+(function (ThinkingLevel) {
+ /**
+ * Unspecified thinking level.
+ */
+ ThinkingLevel["THINKING_LEVEL_UNSPECIFIED"] = "THINKING_LEVEL_UNSPECIFIED";
+ /**
+ * MINIMAL thinking level.
+ */
+ ThinkingLevel["MINIMAL"] = "MINIMAL";
+ /**
+ * Low thinking level.
+ */
+ ThinkingLevel["LOW"] = "LOW";
+ /**
+ * Medium thinking level.
+ */
+ ThinkingLevel["MEDIUM"] = "MEDIUM";
+ /**
+ * High thinking level.
+ */
+ ThinkingLevel["HIGH"] = "HIGH";
+})(ThinkingLevel || (ThinkingLevel = {}));
+/** Enum that controls the generation of people. */
+var PersonGeneration;
+(function (PersonGeneration) {
+ /**
+ * Block generation of images of people.
+ */
+ PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
+ /**
+ * Generate images of adults, but not children.
+ */
+ PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
+ /**
+ * Generate images that include adults and children.
+ */
+ PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
+})(PersonGeneration || (PersonGeneration = {}));
+/** Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people. This enum is not supported in Gemini API. */
+var ProminentPeople;
+(function (ProminentPeople) {
+ /**
+ * Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
+ */
+ ProminentPeople["PROMINENT_PEOPLE_UNSPECIFIED"] = "PROMINENT_PEOPLE_UNSPECIFIED";
+ /**
+ * Allows the model to generate images of prominent people.
+ */
+ ProminentPeople["ALLOW_PROMINENT_PEOPLE"] = "ALLOW_PROMINENT_PEOPLE";
+ /**
+ * Prevents the model from generating images of prominent people.
+ */
+ ProminentPeople["BLOCK_PROMINENT_PEOPLE"] = "BLOCK_PROMINENT_PEOPLE";
+})(ProminentPeople || (ProminentPeople = {}));
+/** The harm category to be blocked. */
+var HarmCategory;
+(function (HarmCategory) {
+ /**
+ * Default value. This value is unused.
+ */
+ HarmCategory["HARM_CATEGORY_UNSPECIFIED"] = "HARM_CATEGORY_UNSPECIFIED";
+ /**
+ * Abusive, threatening, or content intended to bully, torment, or ridicule.
+ */
+ HarmCategory["HARM_CATEGORY_HARASSMENT"] = "HARM_CATEGORY_HARASSMENT";
+ /**
+ * Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
+ */
+ HarmCategory["HARM_CATEGORY_HATE_SPEECH"] = "HARM_CATEGORY_HATE_SPEECH";
+ /**
+ * Content that contains sexually explicit material.
+ */
+ HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
+ /**
+ * Content that promotes, facilitates, or enables dangerous activities.
+ */
+ HarmCategory["HARM_CATEGORY_DANGEROUS_CONTENT"] = "HARM_CATEGORY_DANGEROUS_CONTENT";
+ /**
+ * Deprecated: Election filter is not longer supported. The harm category is civic integrity.
+ */
+ HarmCategory["HARM_CATEGORY_CIVIC_INTEGRITY"] = "HARM_CATEGORY_CIVIC_INTEGRITY";
+ /**
+ * Prompts designed to bypass safety filters.
+ */
+ HarmCategory["HARM_CATEGORY_JAILBREAK"] = "HARM_CATEGORY_JAILBREAK";
+ /**
+ * Images that contain hate speech. This enum value is not supported in Gemini API.
+ */
+ HarmCategory["HARM_CATEGORY_IMAGE_HATE"] = "HARM_CATEGORY_IMAGE_HATE";
+ /**
+ * Images that contain dangerous content. This enum value is not supported in Gemini API.
+ */
+ HarmCategory["HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT"] = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT";
+ /**
+ * Images that contain harassment. This enum value is not supported in Gemini API.
+ */
+ HarmCategory["HARM_CATEGORY_IMAGE_HARASSMENT"] = "HARM_CATEGORY_IMAGE_HARASSMENT";
+ /**
+ * Images that contain sexually explicit content. This enum value is not supported in Gemini API.
+ */
+ HarmCategory["HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT";
+})(HarmCategory || (HarmCategory = {}));
+/** The method for blocking content. If not specified, the default behavior is to use the probability score. This enum is not supported in Gemini API. */
+var HarmBlockMethod;
+(function (HarmBlockMethod) {
+ /**
+ * The harm block method is unspecified.
+ */
+ HarmBlockMethod["HARM_BLOCK_METHOD_UNSPECIFIED"] = "HARM_BLOCK_METHOD_UNSPECIFIED";
+ /**
+ * The harm block method uses both probability and severity scores.
+ */
+ HarmBlockMethod["SEVERITY"] = "SEVERITY";
+ /**
+ * The harm block method uses the probability score.
+ */
+ HarmBlockMethod["PROBABILITY"] = "PROBABILITY";
+})(HarmBlockMethod || (HarmBlockMethod = {}));
+/** The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
+var HarmBlockThreshold;
+(function (HarmBlockThreshold) {
+ /**
+ * The harm block threshold is unspecified.
+ */
+ HarmBlockThreshold["HARM_BLOCK_THRESHOLD_UNSPECIFIED"] = "HARM_BLOCK_THRESHOLD_UNSPECIFIED";
+ /**
+ * Block content with a low harm probability or higher.
+ */
+ HarmBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
+ /**
+ * Block content with a medium harm probability or higher.
+ */
+ HarmBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
+ /**
+ * Block content with a high harm probability.
+ */
+ HarmBlockThreshold["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
+ /**
+ * Do not block any content, regardless of its harm probability.
+ */
+ HarmBlockThreshold["BLOCK_NONE"] = "BLOCK_NONE";
+ /**
+ * Turn off the safety filter entirely.
+ */
+ HarmBlockThreshold["OFF"] = "OFF";
+})(HarmBlockThreshold || (HarmBlockThreshold = {}));
+/** Function calling mode. */
+var FunctionCallingConfigMode;
+(function (FunctionCallingConfigMode) {
+ /**
+ * Unspecified function calling mode. This value should not be used.
+ */
+ FunctionCallingConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
+ /**
+ * Default model behavior, model decides to predict either function calls or natural language response.
+ */
+ FunctionCallingConfigMode["AUTO"] = "AUTO";
+ /**
+ * Model is constrained to always predicting function calls only. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations".
+ */
+ FunctionCallingConfigMode["ANY"] = "ANY";
+ /**
+ * Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
+ */
+ FunctionCallingConfigMode["NONE"] = "NONE";
+ /**
+ * Model is constrained to predict either function calls or natural language response. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations".
+ */
+ FunctionCallingConfigMode["VALIDATED"] = "VALIDATED";
+})(FunctionCallingConfigMode || (FunctionCallingConfigMode = {}));
+/** Output only. The reason why the model stopped generating tokens.
+
+If empty, the model has not stopped generating the tokens. */
+var FinishReason;
+(function (FinishReason) {
+ /**
+ * The finish reason is unspecified.
+ */
+ FinishReason["FINISH_REASON_UNSPECIFIED"] = "FINISH_REASON_UNSPECIFIED";
+ /**
+ * Token generation reached a natural stopping point or a configured stop sequence.
+ */
+ FinishReason["STOP"] = "STOP";
+ /**
+ * Token generation reached the configured maximum output tokens.
+ */
+ FinishReason["MAX_TOKENS"] = "MAX_TOKENS";
+ /**
+ * Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, [content][] is empty if content filters blocks the output.
+ */
+ FinishReason["SAFETY"] = "SAFETY";
+ /**
+ * The token generation stopped because of potential recitation.
+ */
+ FinishReason["RECITATION"] = "RECITATION";
+ /**
+ * The token generation stopped because of using an unsupported language.
+ */
+ FinishReason["LANGUAGE"] = "LANGUAGE";
+ /**
+ * All other reasons that stopped the token generation.
+ */
+ FinishReason["OTHER"] = "OTHER";
+ /**
+ * Token generation stopped because the content contains forbidden terms.
+ */
+ FinishReason["BLOCKLIST"] = "BLOCKLIST";
+ /**
+ * Token generation stopped for potentially containing prohibited content.
+ */
+ FinishReason["PROHIBITED_CONTENT"] = "PROHIBITED_CONTENT";
+ /**
+ * Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).
+ */
+ FinishReason["SPII"] = "SPII";
+ /**
+ * The function call generated by the model is invalid.
+ */
+ FinishReason["MALFORMED_FUNCTION_CALL"] = "MALFORMED_FUNCTION_CALL";
+ /**
+ * Token generation stopped because generated images have safety violations.
+ */
+ FinishReason["IMAGE_SAFETY"] = "IMAGE_SAFETY";
+ /**
+ * The tool call generated by the model is invalid.
+ */
+ FinishReason["UNEXPECTED_TOOL_CALL"] = "UNEXPECTED_TOOL_CALL";
+ /**
+ * Model called too many tools consecutively, thus the system exited execution.
+ */
+ FinishReason["TOO_MANY_TOOL_CALLS"] = "TOO_MANY_TOOL_CALLS";
+ /**
+ * Image generation stopped because the generated images have prohibited content.
+ */
+ FinishReason["IMAGE_PROHIBITED_CONTENT"] = "IMAGE_PROHIBITED_CONTENT";
+ /**
+ * The model was expected to generate an image, but none was generated.
+ */
+ FinishReason["NO_IMAGE"] = "NO_IMAGE";
+ /**
+ * Image generation stopped because the generated image may be a recitation from a source.
+ */
+ FinishReason["IMAGE_RECITATION"] = "IMAGE_RECITATION";
+ /**
+ * Image generation stopped for a reason not otherwise specified.
+ */
+ FinishReason["IMAGE_OTHER"] = "IMAGE_OTHER";
+})(FinishReason || (FinishReason = {}));
+/** Output only. The probability of harm for this category. */
+var HarmProbability;
+(function (HarmProbability) {
+ /**
+ * The harm probability is unspecified.
+ */
+ HarmProbability["HARM_PROBABILITY_UNSPECIFIED"] = "HARM_PROBABILITY_UNSPECIFIED";
+ /**
+ * The harm probability is negligible.
+ */
+ HarmProbability["NEGLIGIBLE"] = "NEGLIGIBLE";
+ /**
+ * The harm probability is low.
+ */
+ HarmProbability["LOW"] = "LOW";
+ /**
+ * The harm probability is medium.
+ */
+ HarmProbability["MEDIUM"] = "MEDIUM";
+ /**
+ * The harm probability is high.
+ */
+ HarmProbability["HIGH"] = "HIGH";
+})(HarmProbability || (HarmProbability = {}));
+/** Output only. The severity of harm for this category. This enum is not supported in Gemini API. */
+var HarmSeverity;
+(function (HarmSeverity) {
+ /**
+ * The harm severity is unspecified.
+ */
+ HarmSeverity["HARM_SEVERITY_UNSPECIFIED"] = "HARM_SEVERITY_UNSPECIFIED";
+ /**
+ * The harm severity is negligible.
+ */
+ HarmSeverity["HARM_SEVERITY_NEGLIGIBLE"] = "HARM_SEVERITY_NEGLIGIBLE";
+ /**
+ * The harm severity is low.
+ */
+ HarmSeverity["HARM_SEVERITY_LOW"] = "HARM_SEVERITY_LOW";
+ /**
+ * The harm severity is medium.
+ */
+ HarmSeverity["HARM_SEVERITY_MEDIUM"] = "HARM_SEVERITY_MEDIUM";
+ /**
+ * The harm severity is high.
+ */
+ HarmSeverity["HARM_SEVERITY_HIGH"] = "HARM_SEVERITY_HIGH";
+})(HarmSeverity || (HarmSeverity = {}));
+/** The status of the URL retrieval. */
+var UrlRetrievalStatus;
+(function (UrlRetrievalStatus) {
+ /**
+ * Default value. This value is unused.
+ */
+ UrlRetrievalStatus["URL_RETRIEVAL_STATUS_UNSPECIFIED"] = "URL_RETRIEVAL_STATUS_UNSPECIFIED";
+ /**
+ * The URL was retrieved successfully.
+ */
+ UrlRetrievalStatus["URL_RETRIEVAL_STATUS_SUCCESS"] = "URL_RETRIEVAL_STATUS_SUCCESS";
+ /**
+ * The URL retrieval failed.
+ */
+ UrlRetrievalStatus["URL_RETRIEVAL_STATUS_ERROR"] = "URL_RETRIEVAL_STATUS_ERROR";
+ /**
+ * Url retrieval is failed because the content is behind paywall. This enum value is not supported in Vertex AI.
+ */
+ UrlRetrievalStatus["URL_RETRIEVAL_STATUS_PAYWALL"] = "URL_RETRIEVAL_STATUS_PAYWALL";
+ /**
+ * Url retrieval is failed because the content is unsafe. This enum value is not supported in Vertex AI.
+ */
+ UrlRetrievalStatus["URL_RETRIEVAL_STATUS_UNSAFE"] = "URL_RETRIEVAL_STATUS_UNSAFE";
+})(UrlRetrievalStatus || (UrlRetrievalStatus = {}));
+/** Output only. The reason why the prompt was blocked. */
+var BlockedReason;
+(function (BlockedReason) {
+ /**
+ * The blocked reason is unspecified.
+ */
+ BlockedReason["BLOCKED_REASON_UNSPECIFIED"] = "BLOCKED_REASON_UNSPECIFIED";
+ /**
+ * The prompt was blocked for safety reasons.
+ */
+ BlockedReason["SAFETY"] = "SAFETY";
+ /**
+ * The prompt was blocked for other reasons. For example, it may be due to the prompt's language, or because it contains other harmful content.
+ */
+ BlockedReason["OTHER"] = "OTHER";
+ /**
+ * The prompt was blocked because it contains a term from the terminology blocklist.
+ */
+ BlockedReason["BLOCKLIST"] = "BLOCKLIST";
+ /**
+ * The prompt was blocked because it contains prohibited content.
+ */
+ BlockedReason["PROHIBITED_CONTENT"] = "PROHIBITED_CONTENT";
+ /**
+ * The prompt was blocked because it contains content that is unsafe for image generation.
+ */
+ BlockedReason["IMAGE_SAFETY"] = "IMAGE_SAFETY";
+ /**
+ * The prompt was blocked by Model Armor. This enum value is not supported in Gemini API.
+ */
+ BlockedReason["MODEL_ARMOR"] = "MODEL_ARMOR";
+ /**
+ * The prompt was blocked as a jailbreak attempt. This enum value is not supported in Gemini API.
+ */
+ BlockedReason["JAILBREAK"] = "JAILBREAK";
+})(BlockedReason || (BlockedReason = {}));
+/** Output only. The traffic type for this request. This enum is not supported in Gemini API. */
+var TrafficType;
+(function (TrafficType) {
+ /**
+ * Unspecified request traffic type.
+ */
+ TrafficType["TRAFFIC_TYPE_UNSPECIFIED"] = "TRAFFIC_TYPE_UNSPECIFIED";
+ /**
+ * The request was processed using Pay-As-You-Go quota.
+ */
+ TrafficType["ON_DEMAND"] = "ON_DEMAND";
+ /**
+ * Type for Priority Pay-As-You-Go traffic.
+ */
+ TrafficType["ON_DEMAND_PRIORITY"] = "ON_DEMAND_PRIORITY";
+ /**
+ * Type for Flex traffic.
+ */
+ TrafficType["ON_DEMAND_FLEX"] = "ON_DEMAND_FLEX";
+ /**
+ * Type for Provisioned Throughput traffic.
+ */
+ TrafficType["PROVISIONED_THROUGHPUT"] = "PROVISIONED_THROUGHPUT";
+})(TrafficType || (TrafficType = {}));
+/** The modality that this token count applies to. */
+var MediaModality;
+(function (MediaModality) {
+ /**
+ * When a modality is not specified, it is treated as `TEXT`.
+ */
+ MediaModality["MODALITY_UNSPECIFIED"] = "MODALITY_UNSPECIFIED";
+ /**
+ * The `Part` contains plain text.
+ */
+ MediaModality["TEXT"] = "TEXT";
+ /**
+ * The `Part` contains an image.
+ */
+ MediaModality["IMAGE"] = "IMAGE";
+ /**
+ * The `Part` contains a video.
+ */
+ MediaModality["VIDEO"] = "VIDEO";
+ /**
+ * The `Part` contains audio.
+ */
+ MediaModality["AUDIO"] = "AUDIO";
+ /**
+ * The `Part` contains a document, such as a PDF.
+ */
+ MediaModality["DOCUMENT"] = "DOCUMENT";
+})(MediaModality || (MediaModality = {}));
+/** The stage of the underlying model. This enum is not supported in Vertex AI. */
+var ModelStage;
+(function (ModelStage) {
+ /**
+ * Unspecified model stage.
+ */
+ ModelStage["MODEL_STAGE_UNSPECIFIED"] = "MODEL_STAGE_UNSPECIFIED";
+ /**
+ * The underlying model is subject to lots of tunings.
+ */
+ ModelStage["UNSTABLE_EXPERIMENTAL"] = "UNSTABLE_EXPERIMENTAL";
+ /**
+ * Models in this stage are for experimental purposes only.
+ */
+ ModelStage["EXPERIMENTAL"] = "EXPERIMENTAL";
+ /**
+ * Models in this stage are more mature than experimental models.
+ */
+ ModelStage["PREVIEW"] = "PREVIEW";
+ /**
+ * Models in this stage are considered stable and ready for production use.
+ */
+ ModelStage["STABLE"] = "STABLE";
+ /**
+ * If the model is on this stage, it means that this model is on the path to deprecation in near future. Only existing customers can use this model.
+ */
+ ModelStage["LEGACY"] = "LEGACY";
+ /**
+ * Models in this stage are deprecated. These models cannot be used.
+ */
+ ModelStage["DEPRECATED"] = "DEPRECATED";
+ /**
+ * Models in this stage are retired. These models cannot be used.
+ */
+ ModelStage["RETIRED"] = "RETIRED";
+})(ModelStage || (ModelStage = {}));
+/** The media resolution to use. */
+var MediaResolution;
+(function (MediaResolution) {
+ /**
+ * Media resolution has not been set
+ */
+ MediaResolution["MEDIA_RESOLUTION_UNSPECIFIED"] = "MEDIA_RESOLUTION_UNSPECIFIED";
+ /**
+ * Media resolution set to low (64 tokens).
+ */
+ MediaResolution["MEDIA_RESOLUTION_LOW"] = "MEDIA_RESOLUTION_LOW";
+ /**
+ * Media resolution set to medium (256 tokens).
+ */
+ MediaResolution["MEDIA_RESOLUTION_MEDIUM"] = "MEDIA_RESOLUTION_MEDIUM";
+ /**
+ * Media resolution set to high (zoomed reframing with 256 tokens).
+ */
+ MediaResolution["MEDIA_RESOLUTION_HIGH"] = "MEDIA_RESOLUTION_HIGH";
+})(MediaResolution || (MediaResolution = {}));
+/** Server content modalities. */
+var Modality;
+(function (Modality) {
+ /**
+ * The modality is unspecified.
+ */
+ Modality["MODALITY_UNSPECIFIED"] = "MODALITY_UNSPECIFIED";
+ /**
+ * Indicates the model should return text
+ */
+ Modality["TEXT"] = "TEXT";
+ /**
+ * Indicates the model should return images.
+ */
+ Modality["IMAGE"] = "IMAGE";
+ /**
+ * Indicates the model should return audio.
+ */
+ Modality["AUDIO"] = "AUDIO";
+ /**
+ * Indicates the model should return video.
+ */
+ Modality["VIDEO"] = "VIDEO";
+})(Modality || (Modality = {}));
+/** Delivery mode for the generated content. */
+var Delivery;
+(function (Delivery) {
+ /**
+ * Default value. This value is unused.
+ */
+ Delivery["DELIVERY_UNSPECIFIED"] = "DELIVERY_UNSPECIFIED";
+ /**
+ * Generated bytes are returned inline in the response.
+ */
+ Delivery["INLINE"] = "INLINE";
+ /**
+ * Generated content is stored and a URI is returned.
+ */
+ Delivery["URI"] = "URI";
+})(Delivery || (Delivery = {}));
+/** The aspect ratio for the image output. */
+var AspectRatio;
+(function (AspectRatio) {
+ /**
+ * Default value. This value is unused.
+ */
+ AspectRatio["ASPECT_RATIO_UNSPECIFIED"] = "ASPECT_RATIO_UNSPECIFIED";
+ /**
+ * 1:1 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_ONE_BY_ONE"] = "ASPECT_RATIO_ONE_BY_ONE";
+ /**
+ * 2:3 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_TWO_BY_THREE"] = "ASPECT_RATIO_TWO_BY_THREE";
+ /**
+ * 3:2 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_THREE_BY_TWO"] = "ASPECT_RATIO_THREE_BY_TWO";
+ /**
+ * 3:4 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_THREE_BY_FOUR"] = "ASPECT_RATIO_THREE_BY_FOUR";
+ /**
+ * 4:3 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_FOUR_BY_THREE"] = "ASPECT_RATIO_FOUR_BY_THREE";
+ /**
+ * 4:5 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_FOUR_BY_FIVE"] = "ASPECT_RATIO_FOUR_BY_FIVE";
+ /**
+ * 5:4 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_FIVE_BY_FOUR"] = "ASPECT_RATIO_FIVE_BY_FOUR";
+ /**
+ * 9:16 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_NINE_BY_SIXTEEN"] = "ASPECT_RATIO_NINE_BY_SIXTEEN";
+ /**
+ * 16:9 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_SIXTEEN_BY_NINE"] = "ASPECT_RATIO_SIXTEEN_BY_NINE";
+ /**
+ * 21:9 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_TWENTY_ONE_BY_NINE"] = "ASPECT_RATIO_TWENTY_ONE_BY_NINE";
+ /**
+ * 1:8 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_ONE_BY_EIGHT"] = "ASPECT_RATIO_ONE_BY_EIGHT";
+ /**
+ * 8:1 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_EIGHT_BY_ONE"] = "ASPECT_RATIO_EIGHT_BY_ONE";
+ /**
+ * 1:4 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_ONE_BY_FOUR"] = "ASPECT_RATIO_ONE_BY_FOUR";
+ /**
+ * 4:1 aspect ratio.
+ */
+ AspectRatio["ASPECT_RATIO_FOUR_BY_ONE"] = "ASPECT_RATIO_FOUR_BY_ONE";
+})(AspectRatio || (AspectRatio = {}));
+/** The size of the image output. */
+var ImageSize;
+(function (ImageSize) {
+ /**
+ * Default value. This value is unused.
+ */
+ ImageSize["IMAGE_SIZE_UNSPECIFIED"] = "IMAGE_SIZE_UNSPECIFIED";
+ /**
+ * 512px image size.
+ */
+ ImageSize["IMAGE_SIZE_FIVE_TWELVE"] = "IMAGE_SIZE_FIVE_TWELVE";
+ /**
+ * 1K image size.
+ */
+ ImageSize["IMAGE_SIZE_ONE_K"] = "IMAGE_SIZE_ONE_K";
+ /**
+ * 2K image size.
+ */
+ ImageSize["IMAGE_SIZE_TWO_K"] = "IMAGE_SIZE_TWO_K";
+ /**
+ * 4K image size.
+ */
+ ImageSize["IMAGE_SIZE_FOUR_K"] = "IMAGE_SIZE_FOUR_K";
+})(ImageSize || (ImageSize = {}));
+/** Tuning mode. This enum is not supported in Gemini API. */
+var TuningMode;
+(function (TuningMode) {
+ /**
+ * Tuning mode is unspecified.
+ */
+ TuningMode["TUNING_MODE_UNSPECIFIED"] = "TUNING_MODE_UNSPECIFIED";
+ /**
+ * Full fine-tuning mode.
+ */
+ TuningMode["TUNING_MODE_FULL"] = "TUNING_MODE_FULL";
+ /**
+ * PEFT adapter tuning mode.
+ */
+ TuningMode["TUNING_MODE_PEFT_ADAPTER"] = "TUNING_MODE_PEFT_ADAPTER";
+})(TuningMode || (TuningMode = {}));
+/** Adapter size for tuning. This enum is not supported in Gemini API. */
+var AdapterSize;
+(function (AdapterSize) {
+ /**
+ * Adapter size is unspecified.
+ */
+ AdapterSize["ADAPTER_SIZE_UNSPECIFIED"] = "ADAPTER_SIZE_UNSPECIFIED";
+ /**
+ * Adapter size 1.
+ */
+ AdapterSize["ADAPTER_SIZE_ONE"] = "ADAPTER_SIZE_ONE";
+ /**
+ * Adapter size 2.
+ */
+ AdapterSize["ADAPTER_SIZE_TWO"] = "ADAPTER_SIZE_TWO";
+ /**
+ * Adapter size 4.
+ */
+ AdapterSize["ADAPTER_SIZE_FOUR"] = "ADAPTER_SIZE_FOUR";
+ /**
+ * Adapter size 8.
+ */
+ AdapterSize["ADAPTER_SIZE_EIGHT"] = "ADAPTER_SIZE_EIGHT";
+ /**
+ * Adapter size 16.
+ */
+ AdapterSize["ADAPTER_SIZE_SIXTEEN"] = "ADAPTER_SIZE_SIXTEEN";
+ /**
+ * Adapter size 32.
+ */
+ AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
+})(AdapterSize || (AdapterSize = {}));
+/** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
+var ResponseParseType;
+(function (ResponseParseType) {
+ /**
+ * Default value. Fallback to IDENTITY
+ */
+ ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
+ /**
+ * Returns the sample response as is.
+ */
+ ResponseParseType["IDENTITY"] = "IDENTITY";
+ /**
+ * Uses regex to extract the important part of sample response. Similar to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_extract) `REGEX_EXTRACT(response, regex_extract_expression)`, but different in that if there are multiple matches, the last match will be returned.
+ */
+ ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
+})(ResponseParseType || (ResponseParseType = {}));
+/** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
+var MatchOperation;
+(function (MatchOperation) {
+ /**
+ * Default value. A user error will be returned if not set.
+ */
+ MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
+ /**
+ * Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
+ */
+ MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
+ /**
+ * The match operation returns `true` if expression is a substring of the target.
+ */
+ MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
+ /**
+ * The match operation returns `true` expression is an exact match of the target.
+ */
+ MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
+})(MatchOperation || (MatchOperation = {}));
+/** Represents how much to think for the tuning job. */
+var ReinforcementTuningThinkingLevel;
+(function (ReinforcementTuningThinkingLevel) {
+ /**
+ * Unspecified thinking level.
+ */
+ ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
+ /**
+ * Little to no thinking.
+ */
+ ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
+ /**
+ * High thinking level.
+ */
+ ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
+})(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
+/** Job state. */
+var JobState;
+(function (JobState) {
+ /**
+ * The job state is unspecified.
+ */
+ JobState["JOB_STATE_UNSPECIFIED"] = "JOB_STATE_UNSPECIFIED";
+ /**
+ * The job has been just created or resumed and processing has not yet begun.
+ */
+ JobState["JOB_STATE_QUEUED"] = "JOB_STATE_QUEUED";
+ /**
+ * The service is preparing to run the job.
+ */
+ JobState["JOB_STATE_PENDING"] = "JOB_STATE_PENDING";
+ /**
+ * The job is in progress.
+ */
+ JobState["JOB_STATE_RUNNING"] = "JOB_STATE_RUNNING";
+ /**
+ * The job completed successfully.
+ */
+ JobState["JOB_STATE_SUCCEEDED"] = "JOB_STATE_SUCCEEDED";
+ /**
+ * The job failed.
+ */
+ JobState["JOB_STATE_FAILED"] = "JOB_STATE_FAILED";
+ /**
+ * The job is being cancelled. From this state the job may only go to either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+ */
+ JobState["JOB_STATE_CANCELLING"] = "JOB_STATE_CANCELLING";
+ /**
+ * The job has been cancelled.
+ */
+ JobState["JOB_STATE_CANCELLED"] = "JOB_STATE_CANCELLED";
+ /**
+ * The job has been stopped, and can be resumed.
+ */
+ JobState["JOB_STATE_PAUSED"] = "JOB_STATE_PAUSED";
+ /**
+ * The job has expired.
+ */
+ JobState["JOB_STATE_EXPIRED"] = "JOB_STATE_EXPIRED";
+ /**
+ * The job is being updated. Only jobs in the `JOB_STATE_RUNNING` state can be updated. After updating, the job goes back to the `JOB_STATE_RUNNING` state.
+ */
+ JobState["JOB_STATE_UPDATING"] = "JOB_STATE_UPDATING";
+ /**
+ * The job is partially succeeded, some results may be missing due to errors.
+ */
+ JobState["JOB_STATE_PARTIALLY_SUCCEEDED"] = "JOB_STATE_PARTIALLY_SUCCEEDED";
+})(JobState || (JobState = {}));
+/** Output only. The detail state of the tuning job (while the overall `JobState` is running). This enum is not supported in Gemini API. */
+var TuningJobState;
+(function (TuningJobState) {
+ /**
+ * Default tuning job state.
+ */
+ TuningJobState["TUNING_JOB_STATE_UNSPECIFIED"] = "TUNING_JOB_STATE_UNSPECIFIED";
+ /**
+ * Tuning job is waiting for job quota.
+ */
+ TuningJobState["TUNING_JOB_STATE_WAITING_FOR_QUOTA"] = "TUNING_JOB_STATE_WAITING_FOR_QUOTA";
+ /**
+ * Tuning job is validating the dataset.
+ */
+ TuningJobState["TUNING_JOB_STATE_PROCESSING_DATASET"] = "TUNING_JOB_STATE_PROCESSING_DATASET";
+ /**
+ * Tuning job is waiting for hardware capacity.
+ */
+ TuningJobState["TUNING_JOB_STATE_WAITING_FOR_CAPACITY"] = "TUNING_JOB_STATE_WAITING_FOR_CAPACITY";
+ /**
+ * Tuning job is running.
+ */
+ TuningJobState["TUNING_JOB_STATE_TUNING"] = "TUNING_JOB_STATE_TUNING";
+ /**
+ * Tuning job is doing some post processing steps.
+ */
+ TuningJobState["TUNING_JOB_STATE_POST_PROCESSING"] = "TUNING_JOB_STATE_POST_PROCESSING";
+})(TuningJobState || (TuningJobState = {}));
+/** Aggregation metric. This enum is not supported in Gemini API. */
+var AggregationMetric;
+(function (AggregationMetric) {
+ /**
+ * Unspecified aggregation metric.
+ */
+ AggregationMetric["AGGREGATION_METRIC_UNSPECIFIED"] = "AGGREGATION_METRIC_UNSPECIFIED";
+ /**
+ * Average aggregation metric. Not supported for Pairwise metric.
+ */
+ AggregationMetric["AVERAGE"] = "AVERAGE";
+ /**
+ * Mode aggregation metric.
+ */
+ AggregationMetric["MODE"] = "MODE";
+ /**
+ * Standard deviation aggregation metric. Not supported for pairwise metric.
+ */
+ AggregationMetric["STANDARD_DEVIATION"] = "STANDARD_DEVIATION";
+ /**
+ * Variance aggregation metric. Not supported for pairwise metric.
+ */
+ AggregationMetric["VARIANCE"] = "VARIANCE";
+ /**
+ * Minimum aggregation metric. Not supported for pairwise metric.
+ */
+ AggregationMetric["MINIMUM"] = "MINIMUM";
+ /**
+ * Maximum aggregation metric. Not supported for pairwise metric.
+ */
+ AggregationMetric["MAXIMUM"] = "MAXIMUM";
+ /**
+ * Median aggregation metric. Not supported for pairwise metric.
+ */
+ AggregationMetric["MEDIAN"] = "MEDIAN";
+ /**
+ * 90th percentile aggregation metric. Not supported for pairwise metric.
+ */
+ AggregationMetric["PERCENTILE_P90"] = "PERCENTILE_P90";
+ /**
+ * 95th percentile aggregation metric. Not supported for pairwise metric.
+ */
+ AggregationMetric["PERCENTILE_P95"] = "PERCENTILE_P95";
+ /**
+ * 99th percentile aggregation metric. Not supported for pairwise metric.
+ */
+ AggregationMetric["PERCENTILE_P99"] = "PERCENTILE_P99";
+})(AggregationMetric || (AggregationMetric = {}));
+/** Output only. Pairwise metric choice. This enum is not supported in Gemini API. */
+var PairwiseChoice;
+(function (PairwiseChoice) {
+ /**
+ * Unspecified prediction choice.
+ */
+ PairwiseChoice["PAIRWISE_CHOICE_UNSPECIFIED"] = "PAIRWISE_CHOICE_UNSPECIFIED";
+ /**
+ * Baseline prediction wins
+ */
+ PairwiseChoice["BASELINE"] = "BASELINE";
+ /**
+ * Candidate prediction wins
+ */
+ PairwiseChoice["CANDIDATE"] = "CANDIDATE";
+ /**
+ * Winner cannot be determined
+ */
+ PairwiseChoice["TIE"] = "TIE";
+})(PairwiseChoice || (PairwiseChoice = {}));
+/** The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API. */
+var VideoOrientation;
+(function (VideoOrientation) {
+ /**
+ * Unspecified video orientation. Defaults to landscape.
+ */
+ VideoOrientation["VIDEO_ORIENTATION_UNSPECIFIED"] = "VIDEO_ORIENTATION_UNSPECIFIED";
+ /**
+ * Landscape orientation (e.g. 16:9, 1280x720).
+ */
+ VideoOrientation["LANDSCAPE"] = "LANDSCAPE";
+ /**
+ * Portrait orientation (e.g. 9:16, 720x1280).
+ */
+ VideoOrientation["PORTRAIT"] = "PORTRAIT";
+})(VideoOrientation || (VideoOrientation = {}));
+/** The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API. */
+var TuningSpeed;
+(function (TuningSpeed) {
+ /**
+ * The default / unset value. For Veo 3.0 models, this defaults to FAST.
+ */
+ TuningSpeed["TUNING_SPEED_UNSPECIFIED"] = "TUNING_SPEED_UNSPECIFIED";
+ /**
+ * Regular tuning speed.
+ */
+ TuningSpeed["REGULAR"] = "REGULAR";
+ /**
+ * Fast tuning speed.
+ */
+ TuningSpeed["FAST"] = "FAST";
+})(TuningSpeed || (TuningSpeed = {}));
+/** The tuning task for Veo. This enum is not supported in Gemini API. */
+var TuningTask;
+(function (TuningTask) {
+ /**
+ * Default value. This value is unused.
+ */
+ TuningTask["TUNING_TASK_UNSPECIFIED"] = "TUNING_TASK_UNSPECIFIED";
+ /**
+ * Tuning task for image to video.
+ */
+ TuningTask["TUNING_TASK_I2V"] = "TUNING_TASK_I2V";
+ /**
+ * Tuning task for text to video.
+ */
+ TuningTask["TUNING_TASK_T2V"] = "TUNING_TASK_T2V";
+ /**
+ * Tuning task for reference to video.
+ */
+ TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
+})(TuningTask || (TuningTask = {}));
+/** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
+var DocumentState;
+(function (DocumentState) {
+ /**
+ * The default value. This value is used if the state is omitted.
+ */
+ DocumentState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
+ /**
+ * Some `Chunks` of the `Document` are being processed (embedding and vector storage).
+ */
+ DocumentState["STATE_PENDING"] = "STATE_PENDING";
+ /**
+ * All `Chunks` of the `Document` is processed and available for querying.
+ */
+ DocumentState["STATE_ACTIVE"] = "STATE_ACTIVE";
+ /**
+ * Some `Chunks` of the `Document` failed processing.
+ */
+ DocumentState["STATE_FAILED"] = "STATE_FAILED";
+})(DocumentState || (DocumentState = {}));
+/** Pricing and performance service tier. */
+var ServiceTier;
+(function (ServiceTier) {
+ /**
+ * Default service tier, which is standard.
+ */
+ ServiceTier["UNSPECIFIED"] = "unspecified";
+ /**
+ * Flex service tier.
+ */
+ ServiceTier["FLEX"] = "flex";
+ /**
+ * Standard service tier.
+ */
+ ServiceTier["STANDARD"] = "standard";
+ /**
+ * Priority service tier.
+ */
+ ServiceTier["PRIORITY"] = "priority";
+})(ServiceTier || (ServiceTier = {}));
+/** How the model processes input media for understanding. */
+var MediaProcessing;
+(function (MediaProcessing) {
+ /**
+ * Default. Uses model-specific processing
+ */
+ MediaProcessing["MEDIA_PROCESSING_UNSPECIFIED"] = "MEDIA_PROCESSING_UNSPECIFIED";
+ /**
+ * Fixed-rate frame extraction. All frames placed in context.
+ */
+ MediaProcessing["STATIC"] = "STATIC";
+ /**
+ * Model-driven dynamic navigation. Recommended for most use cases.
+ */
+ MediaProcessing["AGENTIC"] = "AGENTIC";
+})(MediaProcessing || (MediaProcessing = {}));
+/** The tokenization quality used for given media. */
+var PartMediaResolutionLevel;
+(function (PartMediaResolutionLevel) {
+ /**
+ * Media resolution has not been set.
+ */
+ PartMediaResolutionLevel["MEDIA_RESOLUTION_UNSPECIFIED"] = "MEDIA_RESOLUTION_UNSPECIFIED";
+ /**
+ * Media resolution set to low.
+ */
+ PartMediaResolutionLevel["MEDIA_RESOLUTION_LOW"] = "MEDIA_RESOLUTION_LOW";
+ /**
+ * Media resolution set to medium.
+ */
+ PartMediaResolutionLevel["MEDIA_RESOLUTION_MEDIUM"] = "MEDIA_RESOLUTION_MEDIUM";
+ /**
+ * Media resolution set to high.
+ */
+ PartMediaResolutionLevel["MEDIA_RESOLUTION_HIGH"] = "MEDIA_RESOLUTION_HIGH";
+ /**
+ * Media resolution set to ultra high.
+ */
+ PartMediaResolutionLevel["MEDIA_RESOLUTION_ULTRA_HIGH"] = "MEDIA_RESOLUTION_ULTRA_HIGH";
+})(PartMediaResolutionLevel || (PartMediaResolutionLevel = {}));
+/** The type of tool in the function call. */
+var ToolType;
+(function (ToolType) {
+ /**
+ * Unspecified tool type.
+ */
+ ToolType["TOOL_TYPE_UNSPECIFIED"] = "TOOL_TYPE_UNSPECIFIED";
+ /**
+ * Google search tool, maps to Tool.google_search.search_types.web_search.
+ */
+ ToolType["GOOGLE_SEARCH_WEB"] = "GOOGLE_SEARCH_WEB";
+ /**
+ * Image search tool, maps to Tool.google_search.search_types.image_search.
+ */
+ ToolType["GOOGLE_SEARCH_IMAGE"] = "GOOGLE_SEARCH_IMAGE";
+ /**
+ * URL context tool, maps to Tool.url_context.
+ */
+ ToolType["URL_CONTEXT"] = "URL_CONTEXT";
+ /**
+ * Google maps tool, maps to Tool.google_maps.
+ */
+ ToolType["GOOGLE_MAPS"] = "GOOGLE_MAPS";
+ /**
+ * File search tool, maps to Tool.file_search.
+ */
+ ToolType["FILE_SEARCH"] = "FILE_SEARCH";
+ /**
+ * Media processing tool.
+ */
+ ToolType["MEDIA_PROCESSING"] = "MEDIA_PROCESSING";
+})(ToolType || (ToolType = {}));
+/** Resource scope. */
+var ResourceScope;
+(function (ResourceScope) {
+ /**
+ * When setting base_url, this value configures resource scope to be the collection.
+ The resource name will not include api version, project, or location.
+ For example, if base_url is set to "https://aiplatform.googleapis.com",
+ then the resource name for a Model would be
+ "https://aiplatform.googleapis.com/publishers/google/models/gemini-3-pro-preview
+ */
+ ResourceScope["COLLECTION"] = "COLLECTION";
+})(ResourceScope || (ResourceScope = {}));
+/** Options for feature selection preference. */
+var FeatureSelectionPreference;
+(function (FeatureSelectionPreference) {
+ FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED";
+ FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY";
+ FeatureSelectionPreference["BALANCED"] = "BALANCED";
+ FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST";
+})(FeatureSelectionPreference || (FeatureSelectionPreference = {}));
+/** Enum representing the Gemini Enterprise Agent Platform embedding API to use. */
+var EmbeddingApiType;
+(function (EmbeddingApiType) {
+ /**
+ * predict API endpoint (default)
+ */
+ EmbeddingApiType["PREDICT"] = "PREDICT";
+ /**
+ * embedContent API Endpoint
+ */
+ EmbeddingApiType["EMBED_CONTENT"] = "EMBED_CONTENT";
+})(EmbeddingApiType || (EmbeddingApiType = {}));
+/** Enum that controls the safety filter level for objectionable content. */
+var SafetyFilterLevel;
+(function (SafetyFilterLevel) {
+ SafetyFilterLevel["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
+ SafetyFilterLevel["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
+ SafetyFilterLevel["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
+ SafetyFilterLevel["BLOCK_NONE"] = "BLOCK_NONE";
+})(SafetyFilterLevel || (SafetyFilterLevel = {}));
+/** Enum that specifies the language of the text in the prompt. */
+var ImagePromptLanguage;
+(function (ImagePromptLanguage) {
+ /**
+ * Auto-detect the language.
+ */
+ ImagePromptLanguage["auto"] = "auto";
+ /**
+ * English
+ */
+ ImagePromptLanguage["en"] = "en";
+ /**
+ * Japanese
+ */
+ ImagePromptLanguage["ja"] = "ja";
+ /**
+ * Korean
+ */
+ ImagePromptLanguage["ko"] = "ko";
+ /**
+ * Hindi
+ */
+ ImagePromptLanguage["hi"] = "hi";
+ /**
+ * Chinese
+ */
+ ImagePromptLanguage["zh"] = "zh";
+ /**
+ * Portuguese
+ */
+ ImagePromptLanguage["pt"] = "pt";
+ /**
+ * Spanish
+ */
+ ImagePromptLanguage["es"] = "es";
+})(ImagePromptLanguage || (ImagePromptLanguage = {}));
+/** Enum representing the mask mode of a mask reference image. */
+var MaskReferenceMode;
+(function (MaskReferenceMode) {
+ MaskReferenceMode["MASK_MODE_DEFAULT"] = "MASK_MODE_DEFAULT";
+ MaskReferenceMode["MASK_MODE_USER_PROVIDED"] = "MASK_MODE_USER_PROVIDED";
+ MaskReferenceMode["MASK_MODE_BACKGROUND"] = "MASK_MODE_BACKGROUND";
+ MaskReferenceMode["MASK_MODE_FOREGROUND"] = "MASK_MODE_FOREGROUND";
+ MaskReferenceMode["MASK_MODE_SEMANTIC"] = "MASK_MODE_SEMANTIC";
+})(MaskReferenceMode || (MaskReferenceMode = {}));
+/** Enum representing the control type of a control reference image. */
+var ControlReferenceType;
+(function (ControlReferenceType) {
+ ControlReferenceType["CONTROL_TYPE_DEFAULT"] = "CONTROL_TYPE_DEFAULT";
+ ControlReferenceType["CONTROL_TYPE_CANNY"] = "CONTROL_TYPE_CANNY";
+ ControlReferenceType["CONTROL_TYPE_SCRIBBLE"] = "CONTROL_TYPE_SCRIBBLE";
+ ControlReferenceType["CONTROL_TYPE_FACE_MESH"] = "CONTROL_TYPE_FACE_MESH";
+})(ControlReferenceType || (ControlReferenceType = {}));
+/** Enum representing the subject type of a subject reference image. */
+var SubjectReferenceType;
+(function (SubjectReferenceType) {
+ SubjectReferenceType["SUBJECT_TYPE_DEFAULT"] = "SUBJECT_TYPE_DEFAULT";
+ SubjectReferenceType["SUBJECT_TYPE_PERSON"] = "SUBJECT_TYPE_PERSON";
+ SubjectReferenceType["SUBJECT_TYPE_ANIMAL"] = "SUBJECT_TYPE_ANIMAL";
+ SubjectReferenceType["SUBJECT_TYPE_PRODUCT"] = "SUBJECT_TYPE_PRODUCT";
+})(SubjectReferenceType || (SubjectReferenceType = {}));
+/** Enum representing the editing mode. */
+var EditMode;
+(function (EditMode) {
+ EditMode["EDIT_MODE_DEFAULT"] = "EDIT_MODE_DEFAULT";
+ EditMode["EDIT_MODE_INPAINT_REMOVAL"] = "EDIT_MODE_INPAINT_REMOVAL";
+ EditMode["EDIT_MODE_INPAINT_INSERTION"] = "EDIT_MODE_INPAINT_INSERTION";
+ EditMode["EDIT_MODE_OUTPAINT"] = "EDIT_MODE_OUTPAINT";
+ EditMode["EDIT_MODE_CONTROLLED_EDITING"] = "EDIT_MODE_CONTROLLED_EDITING";
+ EditMode["EDIT_MODE_STYLE"] = "EDIT_MODE_STYLE";
+ EditMode["EDIT_MODE_BGSWAP"] = "EDIT_MODE_BGSWAP";
+ EditMode["EDIT_MODE_PRODUCT_IMAGE"] = "EDIT_MODE_PRODUCT_IMAGE";
+})(EditMode || (EditMode = {}));
+/** Enum that represents the segmentation mode. */
+var SegmentMode;
+(function (SegmentMode) {
+ SegmentMode["FOREGROUND"] = "FOREGROUND";
+ SegmentMode["BACKGROUND"] = "BACKGROUND";
+ SegmentMode["PROMPT"] = "PROMPT";
+ SegmentMode["SEMANTIC"] = "SEMANTIC";
+ SegmentMode["INTERACTIVE"] = "INTERACTIVE";
+})(SegmentMode || (SegmentMode = {}));
+/** Enum for the reference type of a video generation reference image. */
+var VideoGenerationReferenceType;
+(function (VideoGenerationReferenceType) {
+ /**
+ * A reference image that provides assets to the generated video,
+ such as the scene, an object, a character, etc.
+ */
+ VideoGenerationReferenceType["ASSET"] = "ASSET";
+ /**
+ * A reference image that provides aesthetics including colors,
+ lighting, texture, etc., to be used as the style of the generated video,
+ such as 'anime', 'photography', 'origami', etc.
+ */
+ VideoGenerationReferenceType["STYLE"] = "STYLE";
+})(VideoGenerationReferenceType || (VideoGenerationReferenceType = {}));
+/** Enum for the mask mode of a video generation mask. */
+var VideoGenerationMaskMode;
+(function (VideoGenerationMaskMode) {
+ /**
+ * The image mask contains a masked rectangular region which is
+ applied on the first frame of the input video. The object described in
+ the prompt is inserted into this region and will appear in subsequent
+ frames.
+ */
+ VideoGenerationMaskMode["INSERT"] = "INSERT";
+ /**
+ * The image mask is used to determine an object in the
+ first video frame to track. This object is removed from the video.
+ */
+ VideoGenerationMaskMode["REMOVE"] = "REMOVE";
+ /**
+ * The image mask is used to determine a region in the
+ video. Objects in this region will be removed.
+ */
+ VideoGenerationMaskMode["REMOVE_STATIC"] = "REMOVE_STATIC";
+ /**
+ * The image mask contains a masked rectangular region where
+ the input video will go. The remaining area will be generated. Video
+ masks are not supported.
+ */
+ VideoGenerationMaskMode["OUTPAINT"] = "OUTPAINT";
+})(VideoGenerationMaskMode || (VideoGenerationMaskMode = {}));
+/** Enum that controls the compression quality of the generated videos. */
+var VideoCompressionQuality;
+(function (VideoCompressionQuality) {
+ /**
+ * Optimized video compression quality. This will produce videos
+ with a compressed, smaller file size.
+ */
+ VideoCompressionQuality["OPTIMIZED"] = "OPTIMIZED";
+ /**
+ * Lossless video compression quality. This will produce videos
+ with a larger file size.
+ */
+ VideoCompressionQuality["LOSSLESS"] = "LOSSLESS";
+})(VideoCompressionQuality || (VideoCompressionQuality = {}));
+/** Resize mode for the image input for video generation. */
+var ImageResizeMode;
+(function (ImageResizeMode) {
+ /**
+ * Crop the image to fit the correct aspect ratio (so we lose parts
+ of the image in the process).
+ */
+ ImageResizeMode["CROP"] = "CROP";
+ /**
+ * Pad the image to fit the correct aspect ratio (so we don't lose
+ any parts of the image in the process).
+ */
+ ImageResizeMode["PAD"] = "PAD";
+})(ImageResizeMode || (ImageResizeMode = {}));
+/** Enum representing the tuning method. */
+var TuningMethod;
+(function (TuningMethod) {
+ /**
+ * Supervised fine tuning.
+ */
+ TuningMethod["SUPERVISED_FINE_TUNING"] = "SUPERVISED_FINE_TUNING";
+ /**
+ * Preference optimization tuning.
+ */
+ TuningMethod["PREFERENCE_TUNING"] = "PREFERENCE_TUNING";
+ /**
+ * Distillation tuning.
+ */
+ TuningMethod["DISTILLATION"] = "DISTILLATION";
+ /**
+ * Reinforcement tuning.
+ */
+ TuningMethod["REINFORCEMENT_TUNING"] = "REINFORCEMENT_TUNING";
+})(TuningMethod || (TuningMethod = {}));
+/** State for the lifecycle of a File. */
+var FileState;
+(function (FileState) {
+ FileState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
+ FileState["PROCESSING"] = "PROCESSING";
+ FileState["ACTIVE"] = "ACTIVE";
+ FileState["FAILED"] = "FAILED";
+})(FileState || (FileState = {}));
+/** Source of the File. */
+var FileSource;
+(function (FileSource) {
+ FileSource["SOURCE_UNSPECIFIED"] = "SOURCE_UNSPECIFIED";
+ FileSource["UPLOADED"] = "UPLOADED";
+ FileSource["GENERATED"] = "GENERATED";
+ FileSource["REGISTERED"] = "REGISTERED";
+})(FileSource || (FileSource = {}));
+/** The reason why the turn is complete. */
+var TurnCompleteReason;
+(function (TurnCompleteReason) {
+ /**
+ * Default value. Reason is unspecified.
+ */
+ TurnCompleteReason["TURN_COMPLETE_REASON_UNSPECIFIED"] = "TURN_COMPLETE_REASON_UNSPECIFIED";
+ /**
+ * The function call generated by the model is invalid.
+ */
+ TurnCompleteReason["MALFORMED_FUNCTION_CALL"] = "MALFORMED_FUNCTION_CALL";
+ /**
+ * The response is rejected by the model.
+ */
+ TurnCompleteReason["RESPONSE_REJECTED"] = "RESPONSE_REJECTED";
+ /**
+ * Needs more input from the user.
+ */
+ TurnCompleteReason["NEED_MORE_INPUT"] = "NEED_MORE_INPUT";
+ /**
+ * Input content is prohibited.
+ */
+ TurnCompleteReason["PROHIBITED_INPUT_CONTENT"] = "PROHIBITED_INPUT_CONTENT";
+ /**
+ * Input image contains prohibited content.
+ */
+ TurnCompleteReason["IMAGE_PROHIBITED_INPUT_CONTENT"] = "IMAGE_PROHIBITED_INPUT_CONTENT";
+ /**
+ * Input text contains prominent person reference.
+ */
+ TurnCompleteReason["INPUT_TEXT_CONTAIN_PROMINENT_PERSON_PROHIBITED"] = "INPUT_TEXT_CONTAIN_PROMINENT_PERSON_PROHIBITED";
+ /**
+ * Input image contains celebrity.
+ */
+ TurnCompleteReason["INPUT_IMAGE_CELEBRITY"] = "INPUT_IMAGE_CELEBRITY";
+ /**
+ * Input image contains photo realistic child.
+ */
+ TurnCompleteReason["INPUT_IMAGE_PHOTO_REALISTIC_CHILD_PROHIBITED"] = "INPUT_IMAGE_PHOTO_REALISTIC_CHILD_PROHIBITED";
+ /**
+ * Input text contains NCII content.
+ */
+ TurnCompleteReason["INPUT_TEXT_NCII_PROHIBITED"] = "INPUT_TEXT_NCII_PROHIBITED";
+ /**
+ * Other input safety issue.
+ */
+ TurnCompleteReason["INPUT_OTHER"] = "INPUT_OTHER";
+ /**
+ * Input contains IP violation.
+ */
+ TurnCompleteReason["INPUT_IP_PROHIBITED"] = "INPUT_IP_PROHIBITED";
+ /**
+ * Input matched blocklist.
+ */
+ TurnCompleteReason["BLOCKLIST"] = "BLOCKLIST";
+ /**
+ * Input is unsafe for image generation.
+ */
+ TurnCompleteReason["UNSAFE_PROMPT_FOR_IMAGE_GENERATION"] = "UNSAFE_PROMPT_FOR_IMAGE_GENERATION";
+ /**
+ * Generated image failed safety check.
+ */
+ TurnCompleteReason["GENERATED_IMAGE_SAFETY"] = "GENERATED_IMAGE_SAFETY";
+ /**
+ * Generated content failed safety check.
+ */
+ TurnCompleteReason["GENERATED_CONTENT_SAFETY"] = "GENERATED_CONTENT_SAFETY";
+ /**
+ * Generated audio failed safety check.
+ */
+ TurnCompleteReason["GENERATED_AUDIO_SAFETY"] = "GENERATED_AUDIO_SAFETY";
+ /**
+ * Generated video failed safety check.
+ */
+ TurnCompleteReason["GENERATED_VIDEO_SAFETY"] = "GENERATED_VIDEO_SAFETY";
+ /**
+ * Generated content is prohibited.
+ */
+ TurnCompleteReason["GENERATED_CONTENT_PROHIBITED"] = "GENERATED_CONTENT_PROHIBITED";
+ /**
+ * Generated content matched blocklist.
+ */
+ TurnCompleteReason["GENERATED_CONTENT_BLOCKLIST"] = "GENERATED_CONTENT_BLOCKLIST";
+ /**
+ * Generated image is prohibited.
+ */
+ TurnCompleteReason["GENERATED_IMAGE_PROHIBITED"] = "GENERATED_IMAGE_PROHIBITED";
+ /**
+ * Generated image contains celebrity.
+ */
+ TurnCompleteReason["GENERATED_IMAGE_CELEBRITY"] = "GENERATED_IMAGE_CELEBRITY";
+ /**
+ * Generated image contains prominent people detected by rewriter.
+ */
+ TurnCompleteReason["GENERATED_IMAGE_PROMINENT_PEOPLE_DETECTED_BY_REWRITER"] = "GENERATED_IMAGE_PROMINENT_PEOPLE_DETECTED_BY_REWRITER";
+ /**
+ * Generated image contains identifiable people.
+ */
+ TurnCompleteReason["GENERATED_IMAGE_IDENTIFIABLE_PEOPLE"] = "GENERATED_IMAGE_IDENTIFIABLE_PEOPLE";
+ /**
+ * Generated image contains minors.
+ */
+ TurnCompleteReason["GENERATED_IMAGE_MINORS"] = "GENERATED_IMAGE_MINORS";
+ /**
+ * Generated image contains IP violation.
+ */
+ TurnCompleteReason["OUTPUT_IMAGE_IP_PROHIBITED"] = "OUTPUT_IMAGE_IP_PROHIBITED";
+ /**
+ * Other generated content issue.
+ */
+ TurnCompleteReason["GENERATED_OTHER"] = "GENERATED_OTHER";
+ /**
+ * Max regeneration attempts reached.
+ */
+ TurnCompleteReason["MAX_REGENERATION_REACHED"] = "MAX_REGENERATION_REACHED";
+})(TurnCompleteReason || (TurnCompleteReason = {}));
+/** The different activity states of the live session. */
+var InteractionStatus;
+(function (InteractionStatus) {
+ /**
+ * Unspecified interaction status.
+ */
+ InteractionStatus["INTERACTION_STATUS_UNSPECIFIED"] = "INTERACTION_STATUS_UNSPECIFIED";
+ /**
+ * The server is still actively processing user input or running background reasoning. More model output may follow.
+ */
+ InteractionStatus["IN_PROGRESS"] = "IN_PROGRESS";
+ /**
+ * Deprecated: Use IDLE instead.
+ */
+ InteractionStatus["REQUIRES_ACTION"] = "REQUIRES_ACTION";
+ /**
+ * The server has completed all processing and background reasoning.
+ */
+ InteractionStatus["IDLE"] = "IDLE";
+})(InteractionStatus || (InteractionStatus = {}));
+/** The type of the VAD signal. */
+var VadSignalType;
+(function (VadSignalType) {
+ /**
+ * The default is VAD_SIGNAL_TYPE_UNSPECIFIED.
+ */
+ VadSignalType["VAD_SIGNAL_TYPE_UNSPECIFIED"] = "VAD_SIGNAL_TYPE_UNSPECIFIED";
+ /**
+ * Start of sentence signal.
+ */
+ VadSignalType["VAD_SIGNAL_TYPE_SOS"] = "VAD_SIGNAL_TYPE_SOS";
+ /**
+ * End of sentence signal.
+ */
+ VadSignalType["VAD_SIGNAL_TYPE_EOS"] = "VAD_SIGNAL_TYPE_EOS";
+})(VadSignalType || (VadSignalType = {}));
+/** The type of the voice activity signal. */
+var VoiceActivityType;
+(function (VoiceActivityType) {
+ /**
+ * The default is VOICE_ACTIVITY_TYPE_UNSPECIFIED.
+ */
+ VoiceActivityType["TYPE_UNSPECIFIED"] = "TYPE_UNSPECIFIED";
+ /**
+ * Start of sentence signal.
+ */
+ VoiceActivityType["ACTIVITY_START"] = "ACTIVITY_START";
+ /**
+ * End of sentence signal.
+ */
+ VoiceActivityType["ACTIVITY_END"] = "ACTIVITY_END";
+})(VoiceActivityType || (VoiceActivityType = {}));
+/** Start of speech sensitivity. */
+var StartSensitivity;
+(function (StartSensitivity) {
+ /**
+ * The default is START_SENSITIVITY_LOW for Gemini Enterprise Agent Platform and START_SENSITIVITY_HIGH for Gemini Live.
+ */
+ StartSensitivity["START_SENSITIVITY_UNSPECIFIED"] = "START_SENSITIVITY_UNSPECIFIED";
+ /**
+ * Automatic detection will detect the start of speech more often.
+ */
+ StartSensitivity["START_SENSITIVITY_HIGH"] = "START_SENSITIVITY_HIGH";
+ /**
+ * Automatic detection will detect the start of speech less often.
+ */
+ StartSensitivity["START_SENSITIVITY_LOW"] = "START_SENSITIVITY_LOW";
+})(StartSensitivity || (StartSensitivity = {}));
+/** End of speech sensitivity. */
+var EndSensitivity;
+(function (EndSensitivity) {
+ /**
+ * The default is END_SENSITIVITY_LOW for Gemini Enterprise Agent Platform and END_SENSITIVITY_HIGH for Gemini Live.
+ */
+ EndSensitivity["END_SENSITIVITY_UNSPECIFIED"] = "END_SENSITIVITY_UNSPECIFIED";
+ /**
+ * Automatic detection ends speech more often.
+ */
+ EndSensitivity["END_SENSITIVITY_HIGH"] = "END_SENSITIVITY_HIGH";
+ /**
+ * Automatic detection ends speech less often.
+ */
+ EndSensitivity["END_SENSITIVITY_LOW"] = "END_SENSITIVITY_LOW";
+})(EndSensitivity || (EndSensitivity = {}));
+/** The different ways of handling user activity. */
+var ActivityHandling;
+(function (ActivityHandling) {
+ /**
+ * If unspecified, the default behavior is `START_OF_ACTIVITY_INTERRUPTS`.
+ */
+ ActivityHandling["ACTIVITY_HANDLING_UNSPECIFIED"] = "ACTIVITY_HANDLING_UNSPECIFIED";
+ /**
+ * If true, start of activity will interrupt the model's response (also called "barge in"). The model's current response will be cut-off in the moment of the interruption. This is the default behavior.
+ */
+ ActivityHandling["START_OF_ACTIVITY_INTERRUPTS"] = "START_OF_ACTIVITY_INTERRUPTS";
+ /**
+ * The model's response will not be interrupted.
+ */
+ ActivityHandling["NO_INTERRUPTION"] = "NO_INTERRUPTION";
+})(ActivityHandling || (ActivityHandling = {}));
+/** Options about which input is included in the user's turn. */
+var TurnCoverage;
+(function (TurnCoverage) {
+ /**
+ * If unspecified, the default behavior is `TURN_INCLUDES_ONLY_ACTIVITY`.
+ */
+ TurnCoverage["TURN_COVERAGE_UNSPECIFIED"] = "TURN_COVERAGE_UNSPECIFIED";
+ /**
+ * The users turn only includes activity since the last turn, excluding inactivity (e.g. silence on the audio stream). This is the default behavior.
+ */
+ TurnCoverage["TURN_INCLUDES_ONLY_ACTIVITY"] = "TURN_INCLUDES_ONLY_ACTIVITY";
+ /**
+ * The users turn includes all realtime input since the last turn, including inactivity (e.g. silence on the audio stream).
+ */
+ TurnCoverage["TURN_INCLUDES_ALL_INPUT"] = "TURN_INCLUDES_ALL_INPUT";
+ /**
+ * Includes audio activity and all video since the last turn. With automatic activity detection, audio activity means speech and excludes silence.
+ */
+ TurnCoverage["TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO"] = "TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO";
+})(TurnCoverage || (TurnCoverage = {}));
+/** Transcription mode. */
+var AudioTranscriptionConfigMode;
+(function (AudioTranscriptionConfigMode) {
+ /**
+ * Unspecified transcription mode.
+ */
+ AudioTranscriptionConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
+ /**
+ * Verbatim transcription mode.
+ */
+ AudioTranscriptionConfigMode["VERBATIM"] = "VERBATIM";
+ /**
+ * Smart transcription mode.
+ */
+ AudioTranscriptionConfigMode["SMART"] = "SMART";
+})(AudioTranscriptionConfigMode || (AudioTranscriptionConfigMode = {}));
+/** Scale of the generated music. */
+var Scale;
+(function (Scale) {
+ /**
+ * Default value. This value is unused.
+ */
+ Scale["SCALE_UNSPECIFIED"] = "SCALE_UNSPECIFIED";
+ /**
+ * C major or A minor.
+ */
+ Scale["C_MAJOR_A_MINOR"] = "C_MAJOR_A_MINOR";
+ /**
+ * Db major or Bb minor.
+ */
+ Scale["D_FLAT_MAJOR_B_FLAT_MINOR"] = "D_FLAT_MAJOR_B_FLAT_MINOR";
+ /**
+ * D major or B minor.
+ */
+ Scale["D_MAJOR_B_MINOR"] = "D_MAJOR_B_MINOR";
+ /**
+ * Eb major or C minor
+ */
+ Scale["E_FLAT_MAJOR_C_MINOR"] = "E_FLAT_MAJOR_C_MINOR";
+ /**
+ * E major or Db minor.
+ */
+ Scale["E_MAJOR_D_FLAT_MINOR"] = "E_MAJOR_D_FLAT_MINOR";
+ /**
+ * F major or D minor.
+ */
+ Scale["F_MAJOR_D_MINOR"] = "F_MAJOR_D_MINOR";
+ /**
+ * Gb major or Eb minor.
+ */
+ Scale["G_FLAT_MAJOR_E_FLAT_MINOR"] = "G_FLAT_MAJOR_E_FLAT_MINOR";
+ /**
+ * G major or E minor.
+ */
+ Scale["G_MAJOR_E_MINOR"] = "G_MAJOR_E_MINOR";
+ /**
+ * Ab major or F minor.
+ */
+ Scale["A_FLAT_MAJOR_F_MINOR"] = "A_FLAT_MAJOR_F_MINOR";
+ /**
+ * A major or Gb minor.
+ */
+ Scale["A_MAJOR_G_FLAT_MINOR"] = "A_MAJOR_G_FLAT_MINOR";
+ /**
+ * Bb major or G minor.
+ */
+ Scale["B_FLAT_MAJOR_G_MINOR"] = "B_FLAT_MAJOR_G_MINOR";
+ /**
+ * B major or Ab minor.
+ */
+ Scale["B_MAJOR_A_FLAT_MINOR"] = "B_MAJOR_A_FLAT_MINOR";
+})(Scale || (Scale = {}));
+/** The mode of music generation. */
+var MusicGenerationMode;
+(function (MusicGenerationMode) {
+ /**
+ * Rely on the server default generation mode.
+ */
+ MusicGenerationMode["MUSIC_GENERATION_MODE_UNSPECIFIED"] = "MUSIC_GENERATION_MODE_UNSPECIFIED";
+ /**
+ * Steer text prompts to regions of latent space with higher quality
+ music.
+ */
+ MusicGenerationMode["QUALITY"] = "QUALITY";
+ /**
+ * Steer text prompts to regions of latent space with a larger
+ diversity of music.
+ */
+ MusicGenerationMode["DIVERSITY"] = "DIVERSITY";
+ /**
+ * Steer text prompts to regions of latent space more likely to
+ generate music with vocals.
+ */
+ MusicGenerationMode["VOCALIZATION"] = "VOCALIZATION";
+})(MusicGenerationMode || (MusicGenerationMode = {}));
+/** The playback control signal to apply to the music generation. */
+var LiveMusicPlaybackControl;
+(function (LiveMusicPlaybackControl) {
+ /**
+ * This value is unused.
+ */
+ LiveMusicPlaybackControl["PLAYBACK_CONTROL_UNSPECIFIED"] = "PLAYBACK_CONTROL_UNSPECIFIED";
+ /**
+ * Start generating the music.
+ */
+ LiveMusicPlaybackControl["PLAY"] = "PLAY";
+ /**
+ * Hold the music generation. Use PLAY to resume from the current position.
+ */
+ LiveMusicPlaybackControl["PAUSE"] = "PAUSE";
+ /**
+ * Stop the music generation and reset the context (prompts retained).
+ Use PLAY to restart the music generation.
+ */
+ LiveMusicPlaybackControl["STOP"] = "STOP";
+ /**
+ * Reset the context of the music generation without stopping it.
+ Retains the current prompts and config.
+ */
+ LiveMusicPlaybackControl["RESET_CONTEXT"] = "RESET_CONTEXT";
+})(LiveMusicPlaybackControl || (LiveMusicPlaybackControl = {}));
+/** The output from a server-side `ToolCall` execution.
+
+This message contains the results of a tool invocation that was initiated by a
+`ToolCall` from the model. The client should pass this `ToolResponse` back to
+the API in a subsequent turn within a `Content` message, along with the
+corresponding `ToolCall`. */
+class ToolResponse {
+}
+/** URI based data for function response. This data type is not supported in Gemini API. */
+class FunctionResponseFileData {
+}
+/** Raw media bytes for function response. Text should not be sent as raw bytes, use the 'text' field. */
+class FunctionResponseBlob {
+}
+/** A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. */
+class FunctionResponsePart {
+}
+/**
+ * Creates a `FunctionResponsePart` object from a `base64` encoded `string`.
+ */
+function createFunctionResponsePartFromBase64(data, mimeType) {
+ return {
+ inlineData: {
+ data: data,
+ mimeType: mimeType,
+ },
+ };
+}
+/**
+ * Creates a `FunctionResponsePart` object from a `URI` string.
+ */
+function createFunctionResponsePartFromUri(uri, mimeType) {
+ return {
+ fileData: {
+ fileUri: uri,
+ mimeType: mimeType,
+ },
+ };
+}
+/** The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. */
+class FunctionResponse {
+}
+/**
+ * Creates a `Part` object from a `URI` string.
+ */
+function createPartFromUri(uri, mimeType, mediaResolution) {
+ return Object.assign({ fileData: {
+ fileUri: uri,
+ mimeType: mimeType,
+ } }, (mediaResolution && { mediaResolution: { level: mediaResolution } }));
+}
+/**
+ * Creates a `Part` object from a `text` string.
+ */
+function createPartFromText(text) {
+ return {
+ text: text,
+ };
+}
+/**
+ * Creates a `Part` object from a `FunctionCall` object.
+ */
+function createPartFromFunctionCall(name, args) {
+ return {
+ functionCall: {
+ name: name,
+ args: args,
+ },
+ };
+}
+/**
+ * Creates a `Part` object from a `FunctionResponse` object.
+ */
+function createPartFromFunctionResponse(id, name, response, parts = []) {
+ return {
+ functionResponse: Object.assign({ id: id, name: name, response: response }, (parts.length > 0 && { parts })),
+ };
+}
+/**
+ * Creates a `Part` object from a `base64` encoded `string`.
+ */
+function createPartFromBase64(data, mimeType, mediaResolution) {
+ return Object.assign({ inlineData: {
+ data: data,
+ mimeType: mimeType,
+ } }, (mediaResolution && { mediaResolution: { level: mediaResolution } }));
+}
+/**
+ * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object.
+ */
+function createPartFromCodeExecutionResult(outcome, output) {
+ return {
+ codeExecutionResult: {
+ outcome: outcome,
+ output: output,
+ },
+ };
+}
+/**
+ * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object.
+ */
+function createPartFromExecutableCode(code, language) {
+ return {
+ executableCode: {
+ code: code,
+ language: language,
+ },
+ };
+}
+function _isPart(obj) {
+ if (typeof obj === 'object' && obj !== null) {
+ return ('fileData' in obj ||
+ 'text' in obj ||
+ 'functionCall' in obj ||
+ 'functionResponse' in obj ||
+ 'inlineData' in obj ||
+ 'videoMetadata' in obj ||
+ 'codeExecutionResult' in obj ||
+ 'executableCode' in obj);
+ }
+ return false;
+}
+function _toParts(partOrString) {
+ const parts = [];
+ if (typeof partOrString === 'string') {
+ parts.push(createPartFromText(partOrString));
+ }
+ else if (_isPart(partOrString)) {
+ parts.push(partOrString);
+ }
+ else if (Array.isArray(partOrString)) {
+ if (partOrString.length === 0) {
+ throw new Error('partOrString cannot be an empty array');
+ }
+ for (const part of partOrString) {
+ if (typeof part === 'string') {
+ parts.push(createPartFromText(part));
+ }
+ else if (_isPart(part)) {
+ parts.push(part);
+ }
+ else {
+ throw new Error('element in PartUnion must be a Part object or string');
+ }
+ }
+ }
+ else {
+ throw new Error('partOrString must be a Part object, string, or array');
+ }
+ return parts;
+}
+/**
+ * Creates a `Content` object with a user role from a `PartListUnion` object or `string`.
+ */
+function createUserContent(partOrString) {
+ return {
+ role: 'user',
+ parts: _toParts(partOrString),
+ };
+}
+/**
+ * Creates a `Content` object with a model role from a `PartListUnion` object or `string`.
+ */
+function createModelContent(partOrString) {
+ return {
+ role: 'model',
+ parts: _toParts(partOrString),
+ };
+}
+/** A wrapper class for the http response. */
+class HttpResponse {
+ constructor(response) {
+ // Process the headers.
+ const headers = {};
+ for (const pair of response.headers.entries()) {
+ headers[pair[0]] = pair[1];
+ }
+ this.headers = headers;
+ // Keep the original response.
+ this.responseInternal = response;
+ }
+ json() {
+ return this.responseInternal.json();
+ }
+}
+/** Content filter results for a prompt sent in the request. Note: This is sent only in the first stream chunk and only if no candidates were generated due to content violations. */
+class GenerateContentResponsePromptFeedback {
+}
+/** Usage metadata about the content generation request and response. This message provides a detailed breakdown of token usage and other relevant metrics. This data type is not supported in Gemini API. */
+class GenerateContentResponseUsageMetadata {
+}
+/** Response message for PredictionService.GenerateContent. */
+class GenerateContentResponse {
+ /**
+ * Returns the concatenation of all text parts from the first candidate in the response.
+ *
+ * @remarks
+ * If there are multiple candidates in the response, the text from the first
+ * one will be returned.
+ * If there are non-text parts in the response, the concatenation of all text
+ * parts will be returned, and a warning will be logged.
+ * If there are thought parts in the response, the concatenation of all text
+ * parts excluding the thought parts will be returned.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.generateContent({
+ * model: 'gemini-2.0-flash',
+ * contents:
+ * 'Why is the sky blue?',
+ * });
+ *
+ * console.debug(response.text);
+ * ```
+ */
+ get text() {
+ var _a, _b, _c, _d, _e, _f, _g, _h;
+ if (((_d = (_c = (_b = (_a = this.candidates) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.parts) === null || _d === void 0 ? void 0 : _d.length) === 0) {
+ return undefined;
+ }
+ if (this.candidates && this.candidates.length > 1) {
+ console.warn('there are multiple candidates in the response, returning text from the first one.');
+ }
+ let text = '';
+ let anyTextPartText = false;
+ const nonTextParts = [];
+ for (const part of (_h = (_g = (_f = (_e = this.candidates) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.content) === null || _g === void 0 ? void 0 : _g.parts) !== null && _h !== void 0 ? _h : []) {
+ for (const [fieldName, fieldValue] of Object.entries(part)) {
+ if (fieldName !== 'text' &&
+ fieldName !== 'thought' &&
+ fieldName !== 'thoughtSignature' &&
+ (fieldValue !== null || fieldValue !== undefined)) {
+ nonTextParts.push(fieldName);
+ }
+ }
+ if (typeof part.text === 'string') {
+ if (typeof part.thought === 'boolean' && part.thought) {
+ continue;
+ }
+ anyTextPartText = true;
+ text += part.text;
+ }
+ }
+ if (nonTextParts.length > 0) {
+ console.warn(`there are non-text parts ${nonTextParts} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`);
+ }
+ // part.text === '' is different from part.text is null
+ return anyTextPartText ? text : undefined;
+ }
+ /**
+ * Returns the concatenation of all inline data parts from the first candidate
+ * in the response.
+ *
+ * @remarks
+ * If there are multiple candidates in the response, the inline data from the
+ * first one will be returned. If there are non-inline data parts in the
+ * response, the concatenation of all inline data parts will be returned, and
+ * a warning will be logged.
+ */
+ get data() {
+ var _a, _b, _c, _d, _e, _f, _g, _h;
+ if (((_d = (_c = (_b = (_a = this.candidates) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.parts) === null || _d === void 0 ? void 0 : _d.length) === 0) {
+ return undefined;
+ }
+ if (this.candidates && this.candidates.length > 1) {
+ console.warn('there are multiple candidates in the response, returning data from the first one.');
+ }
+ let data = '';
+ const nonDataParts = [];
+ for (const part of (_h = (_g = (_f = (_e = this.candidates) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.content) === null || _g === void 0 ? void 0 : _g.parts) !== null && _h !== void 0 ? _h : []) {
+ for (const [fieldName, fieldValue] of Object.entries(part)) {
+ if (fieldName !== 'inlineData' &&
+ (fieldValue !== null || fieldValue !== undefined)) {
+ nonDataParts.push(fieldName);
+ }
+ }
+ if (part.inlineData && typeof part.inlineData.data === 'string') {
+ data += atob(part.inlineData.data);
+ }
+ }
+ if (nonDataParts.length > 0) {
+ console.warn(`there are non-data parts ${nonDataParts} in the response, returning concatenation of all data parts. Please refer to the non data parts for a full response from model.`);
+ }
+ return data.length > 0 ? btoa(data) : undefined;
+ }
+ /**
+ * Returns the function calls from the first candidate in the response.
+ *
+ * @remarks
+ * If there are multiple candidates in the response, the function calls from
+ * the first one will be returned.
+ * If there are no function calls in the response, undefined will be returned.
+ *
+ * @example
+ * ```ts
+ * const controlLightFunctionDeclaration: FunctionDeclaration = {
+ * name: 'controlLight',
+ * parameters: {
+ * type: Type.OBJECT,
+ * description: 'Set the brightness and color temperature of a room light.',
+ * properties: {
+ * brightness: {
+ * type: Type.NUMBER,
+ * description:
+ * 'Light level from 0 to 100. Zero is off and 100 is full brightness.',
+ * },
+ * colorTemperature: {
+ * type: Type.STRING,
+ * description:
+ * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.',
+ * },
+ * },
+ * required: ['brightness', 'colorTemperature'],
+ * };
+ * const response = await ai.models.generateContent({
+ * model: 'gemini-2.0-flash',
+ * contents: 'Dim the lights so the room feels cozy and warm.',
+ * config: {
+ * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}],
+ * toolConfig: {
+ * functionCallingConfig: {
+ * mode: FunctionCallingConfigMode.ANY,
+ * allowedFunctionNames: ['controlLight'],
+ * },
+ * },
+ * },
+ * });
+ * console.debug(JSON.stringify(response.functionCalls));
+ * ```
+ */
+ get functionCalls() {
+ var _a, _b, _c, _d, _e, _f, _g, _h;
+ if (((_d = (_c = (_b = (_a = this.candidates) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.parts) === null || _d === void 0 ? void 0 : _d.length) === 0) {
+ return undefined;
+ }
+ if (this.candidates && this.candidates.length > 1) {
+ console.warn('there are multiple candidates in the response, returning function calls from the first one.');
+ }
+ const functionCalls = (_h = (_g = (_f = (_e = this.candidates) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.content) === null || _g === void 0 ? void 0 : _g.parts) === null || _h === void 0 ? void 0 : _h.filter((part) => part.functionCall).map((part) => part.functionCall).filter((functionCall) => functionCall !== undefined);
+ if ((functionCalls === null || functionCalls === void 0 ? void 0 : functionCalls.length) === 0) {
+ return undefined;
+ }
+ return functionCalls;
+ }
+ /**
+ * Returns the first executable code from the first candidate in the response.
+ *
+ * @remarks
+ * If there are multiple candidates in the response, the executable code from
+ * the first one will be returned.
+ * If there are no executable code in the response, undefined will be
+ * returned.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.generateContent({
+ * model: 'gemini-2.0-flash',
+ * contents:
+ * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'
+ * config: {
+ * tools: [{codeExecution: {}}],
+ * },
+ * });
+ *
+ * console.debug(response.executableCode);
+ * ```
+ */
+ get executableCode() {
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
+ if (((_d = (_c = (_b = (_a = this.candidates) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.parts) === null || _d === void 0 ? void 0 : _d.length) === 0) {
+ return undefined;
+ }
+ if (this.candidates && this.candidates.length > 1) {
+ console.warn('there are multiple candidates in the response, returning executable code from the first one.');
+ }
+ const executableCode = (_h = (_g = (_f = (_e = this.candidates) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.content) === null || _g === void 0 ? void 0 : _g.parts) === null || _h === void 0 ? void 0 : _h.filter((part) => part.executableCode).map((part) => part.executableCode).filter((executableCode) => executableCode !== undefined);
+ if ((executableCode === null || executableCode === void 0 ? void 0 : executableCode.length) === 0) {
+ return undefined;
+ }
+ return (_j = executableCode === null || executableCode === void 0 ? void 0 : executableCode[0]) === null || _j === void 0 ? void 0 : _j.code;
+ }
+ /**
+ * Returns the first code execution result from the first candidate in the response.
+ *
+ * @remarks
+ * If there are multiple candidates in the response, the code execution result from
+ * the first one will be returned.
+ * If there are no code execution result in the response, undefined will be returned.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.generateContent({
+ * model: 'gemini-2.0-flash',
+ * contents:
+ * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'
+ * config: {
+ * tools: [{codeExecution: {}}],
+ * },
+ * });
+ *
+ * console.debug(response.codeExecutionResult);
+ * ```
+ */
+ get codeExecutionResult() {
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
+ if (((_d = (_c = (_b = (_a = this.candidates) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.parts) === null || _d === void 0 ? void 0 : _d.length) === 0) {
+ return undefined;
+ }
+ if (this.candidates && this.candidates.length > 1) {
+ console.warn('there are multiple candidates in the response, returning code execution result from the first one.');
+ }
+ const codeExecutionResult = (_h = (_g = (_f = (_e = this.candidates) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.content) === null || _g === void 0 ? void 0 : _g.parts) === null || _h === void 0 ? void 0 : _h.filter((part) => part.codeExecutionResult).map((part) => part.codeExecutionResult).filter((codeExecutionResult) => codeExecutionResult !== undefined);
+ if ((codeExecutionResult === null || codeExecutionResult === void 0 ? void 0 : codeExecutionResult.length) === 0) {
+ return undefined;
+ }
+ return (_j = codeExecutionResult === null || codeExecutionResult === void 0 ? void 0 : codeExecutionResult[0]) === null || _j === void 0 ? void 0 : _j.output;
+ }
+}
+/** Response for the embed_content method. */
+class EmbedContentResponse {
+}
+/** The output images response. */
+class GenerateImagesResponse {
+}
+/** Response for the request to edit an image. */
+class EditImageResponse {
+}
+class UpscaleImageResponse {
+}
+/** The output images response. */
+class RecontextImageResponse {
+}
+/** The output images response. */
+class SegmentImageResponse {
+}
+class ListModelsResponse {
+}
+class DeleteModelResponse {
+}
+/** Configuration for audio-specific output formatting. */
+class AudioResponseFormat {
+}
+/** Configuration for image-specific output formatting. */
+class ImageResponseFormat {
+}
+/** Configuration for text-specific output formatting. */
+class TextResponseFormat {
+}
+/** Configuration for video-specific output formatting. This data type is not supported in Gemini API. */
+class VideoResponseFormat {
+}
+/** Configuration for the model to configure output formatting and delivery. This data type is not supported in Gemini API. */
+class ResponseFormat {
+}
+/** Response for counting tokens. */
+class CountTokensResponse {
+}
+/** Response for computing tokens. */
+class ComputeTokensResponse {
+}
+/** Response with generated videos. */
+class GenerateVideosResponse {
+}
+/** A video generation operation. */
+class GenerateVideosOperation {
+ /**
+ * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
+ */
+ _fromAPIResponse({ apiResponse, _isVertexAI, }) {
+ const operation = new GenerateVideosOperation();
+ let response;
+ const op = apiResponse;
+ if (_isVertexAI) {
+ response = generateVideosOperationFromVertex$1(op);
+ }
+ else {
+ response = generateVideosOperationFromMldev$1(op);
+ }
+ Object.assign(operation, response);
+ return operation;
+ }
+}
+/** Defines how to parse sample response config for reinforcement tuning. The parsed response (i.e., substring) will be passed to the reward functions. For example, the input prompt might be: > "Perform step-by-step thoughts first to problem A, finally output answer in the block." The sample response from the model under tuning might look like: > "Yes" Here, users can define the following parse config: ``` { "parseType": "REGEX_EXTRACT", "regexExtractExpression": ".*(.*?)" } ``` The resulting parsed response would be `"Yes"` and will be passed to the reward functions for evaluating rewards. This data type is not supported in Gemini API. */
+class ReinforcementTuningParseResponseConfig {
+}
+/** Scores responses by directly converting the parsed autorater response to a float reward. Note: Reward is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API. */
+class ReinforcementTuningAutoraterScorerParsedResponseConversionScorer {
+}
+/** The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API. */
+class EvaluateDatasetResponse {
+}
+/** Response for the list tuning jobs method. */
+class ListTuningJobsResponse {
+}
+/** Empty response for tunings.cancel method. */
+class CancelTuningJobResponse {
+}
+/** Response for the validate_reward method.
+
+Contains the computed reward for a reinforcement tuning reward
+configuration. */
+class ValidateRewardResponse {
+}
+/** Empty response for caches.delete method. */
+class DeleteCachedContentResponse {
+}
+class ListCachedContentsResponse {
+}
+/** Config for documents.list return value. */
+class ListDocumentsResponse {
+}
+/** Config for file_search_stores.list return value. */
+class ListFileSearchStoresResponse {
+}
+/** Response for the resumable upload method. */
+class UploadToFileSearchStoreResumableResponse {
+}
+/** Response for ImportFile to import a File API file with a file search store. */
+class ImportFileResponse {
+}
+/** Long-running operation for importing a file to a FileSearchStore. */
+class ImportFileOperation {
+ /**
+ * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
+ */
+ _fromAPIResponse({ apiResponse, _isVertexAI, }) {
+ const operation = new ImportFileOperation();
+ const op = apiResponse;
+ const response = importFileOperationFromMldev$1(op);
+ Object.assign(operation, response);
+ return operation;
+ }
+}
+/** Response for the list files method. */
+class ListFilesResponse {
+}
+/** Response for the create file method. */
+class CreateFileResponse {
+}
+/** Response for the delete file method. */
+class DeleteFileResponse {
+}
+/** Response for the _register file method. */
+class RegisterFilesResponse {
+}
+/** Config for `inlined_responses` parameter. */
+class InlinedResponse {
+}
+/** Config for `response` parameter. */
+class SingleEmbedContentResponse {
+}
+/** Config for `inlined_embedding_responses` parameter. */
+class InlinedEmbedContentResponse {
+}
+/** Config for batches.list return value. */
+class ListBatchJobsResponse {
+}
+/** Represents a single response in a replay. */
+class ReplayResponse {
+}
+/** A raw reference image.
+
+A raw reference image represents the base image to edit, provided by the user.
+It can optionally be provided in addition to a mask reference image or
+a style reference image. */
+class RawReferenceImage {
+ /** Internal method to convert to ReferenceImageAPIInternal. */
+ toReferenceImageAPI() {
+ const referenceImageAPI = {
+ referenceType: 'REFERENCE_TYPE_RAW',
+ referenceImage: this.referenceImage,
+ referenceId: this.referenceId,
+ };
+ return referenceImageAPI;
+ }
+}
+/** A mask reference image.
+
+This encapsulates either a mask image provided by the user and configs for
+the user provided mask, or only config parameters for the model to generate
+a mask.
+
+A mask image is an image whose non-zero values indicate where to edit the base
+image. If the user provides a mask image, the mask must be in the same
+dimensions as the raw image. */
+class MaskReferenceImage {
+ /** Internal method to convert to ReferenceImageAPIInternal. */
+ toReferenceImageAPI() {
+ const referenceImageAPI = {
+ referenceType: 'REFERENCE_TYPE_MASK',
+ referenceImage: this.referenceImage,
+ referenceId: this.referenceId,
+ maskImageConfig: this.config,
+ };
+ return referenceImageAPI;
+ }
+}
+/** A control reference image.
+
+The image of the control reference image is either a control image provided
+by the user, or a regular image which the backend will use to generate a
+control image of. In the case of the latter, the
+enable_control_image_computation field in the config should be set to True.
+
+A control image is an image that represents a sketch image of areas for the
+model to fill in based on the prompt. */
+class ControlReferenceImage {
+ /** Internal method to convert to ReferenceImageAPIInternal. */
+ toReferenceImageAPI() {
+ const referenceImageAPI = {
+ referenceType: 'REFERENCE_TYPE_CONTROL',
+ referenceImage: this.referenceImage,
+ referenceId: this.referenceId,
+ controlImageConfig: this.config,
+ };
+ return referenceImageAPI;
+ }
+}
+/** A style reference image.
+
+This encapsulates a style reference image provided by the user, and
+additionally optional config parameters for the style reference image.
+
+A raw reference image can also be provided as a destination for the style to
+be applied to. */
+class StyleReferenceImage {
+ /** Internal method to convert to ReferenceImageAPIInternal. */
+ toReferenceImageAPI() {
+ const referenceImageAPI = {
+ referenceType: 'REFERENCE_TYPE_STYLE',
+ referenceImage: this.referenceImage,
+ referenceId: this.referenceId,
+ styleImageConfig: this.config,
+ };
+ return referenceImageAPI;
+ }
+}
+/** A subject reference image.
+
+This encapsulates a subject reference image provided by the user, and
+additionally optional config parameters for the subject reference image.
+
+A raw reference image can also be provided as a destination for the subject to
+be applied to. */
+class SubjectReferenceImage {
+ /* Internal method to convert to ReferenceImageAPIInternal. */
+ toReferenceImageAPI() {
+ const referenceImageAPI = {
+ referenceType: 'REFERENCE_TYPE_SUBJECT',
+ referenceImage: this.referenceImage,
+ referenceId: this.referenceId,
+ subjectImageConfig: this.config,
+ };
+ return referenceImageAPI;
+ }
+}
+/** A content reference image.
+
+A content reference image represents a subject to reference (ex. person,
+product, animal) provided by the user. It can optionally be provided in
+addition to a style reference image (ex. background, style reference). */
+class ContentReferenceImage {
+ /** Internal method to convert to ReferenceImageAPIInternal. */
+ toReferenceImageAPI() {
+ const referenceImageAPI = {
+ referenceType: 'REFERENCE_TYPE_CONTENT',
+ referenceImage: this.referenceImage,
+ referenceId: this.referenceId,
+ };
+ return referenceImageAPI;
+ }
+}
+/** Response message for API call. */
+class LiveServerMessage {
+ /**
+ * Returns the concatenation of all text parts from the server content if present.
+ *
+ * @remarks
+ * If there are non-text parts in the response, the concatenation of all text
+ * parts will be returned, and a warning will be logged.
+ */
+ get text() {
+ var _a, _b, _c;
+ let text = '';
+ let anyTextPartFound = false;
+ const nonTextParts = [];
+ for (const part of (_c = (_b = (_a = this.serverContent) === null || _a === void 0 ? void 0 : _a.modelTurn) === null || _b === void 0 ? void 0 : _b.parts) !== null && _c !== void 0 ? _c : []) {
+ for (const [fieldName, fieldValue] of Object.entries(part)) {
+ if (fieldName !== 'text' &&
+ fieldName !== 'thought' &&
+ fieldValue !== null) {
+ nonTextParts.push(fieldName);
+ }
+ }
+ if (typeof part.text === 'string') {
+ if (typeof part.thought === 'boolean' && part.thought) {
+ continue;
+ }
+ anyTextPartFound = true;
+ text += part.text;
+ }
+ }
+ if (nonTextParts.length > 0) {
+ console.warn(`there are non-text parts ${nonTextParts} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`);
+ }
+ // part.text === '' is different from part.text is null
+ return anyTextPartFound ? text : undefined;
+ }
+ /**
+ * Returns the concatenation of all inline data parts from the server content if present.
+ *
+ * @remarks
+ * If there are non-inline data parts in the
+ * response, the concatenation of all inline data parts will be returned, and
+ * a warning will be logged.
+ */
+ get data() {
+ var _a, _b, _c;
+ let data = '';
+ const nonDataParts = [];
+ for (const part of (_c = (_b = (_a = this.serverContent) === null || _a === void 0 ? void 0 : _a.modelTurn) === null || _b === void 0 ? void 0 : _b.parts) !== null && _c !== void 0 ? _c : []) {
+ for (const [fieldName, fieldValue] of Object.entries(part)) {
+ if (fieldName !== 'inlineData' && fieldValue !== null) {
+ nonDataParts.push(fieldName);
+ }
+ }
+ if (part.inlineData && typeof part.inlineData.data === 'string') {
+ data += atob(part.inlineData.data);
+ }
+ }
+ if (nonDataParts.length > 0) {
+ console.warn(`there are non-data parts ${nonDataParts} in the response, returning concatenation of all data parts. Please refer to the non data parts for a full response from model.`);
+ }
+ return data.length > 0 ? btoa(data) : undefined;
+ }
+}
+/** Client generated response to a `ToolCall` received from the server.
+
+Individual `FunctionResponse` objects are matched to the respective
+`FunctionCall` objects by the `id` field.
+
+Note that in the unary and server-streaming GenerateContent APIs function
+calling happens by exchanging the `Content` parts, while in the bidi
+GenerateContent APIs function calling happens over this dedicated set of
+messages. */
+class LiveClientToolResponse {
+}
+/** Parameters for sending tool responses to the live API. */
+class LiveSendToolResponseParameters {
+ constructor() {
+ /** Tool responses to send to the session. */
+ this.functionResponses = [];
+ }
+}
+/** Response message for the LiveMusicClientMessage call. */
+class LiveMusicServerMessage {
+ /**
+ * Returns the first audio chunk from the server content, if present.
+ *
+ * @remarks
+ * If there are no audio chunks in the response, undefined will be returned.
+ */
+ get audioChunk() {
+ if (this.serverContent &&
+ this.serverContent.audioChunks &&
+ this.serverContent.audioChunks.length > 0) {
+ return this.serverContent.audioChunks[0];
+ }
+ return undefined;
+ }
+}
+/** The response when long-running operation for uploading a file to a FileSearchStore complete. */
+class UploadToFileSearchStoreResponse {
+}
+/** Long-running operation for uploading a file to a FileSearchStore. */
+class UploadToFileSearchStoreOperation {
+ /**
+ * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
+ */
+ _fromAPIResponse({ apiResponse, _isVertexAI, }) {
+ const operation = new UploadToFileSearchStoreOperation();
+ const op = apiResponse;
+ const response = uploadToFileSearchStoreOperationFromMldev(op);
+ Object.assign(operation, response);
+ return operation;
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+function tModel(apiClient, model) {
+ if (!model || typeof model !== 'string') {
+ throw new Error('model is required and must be a string');
+ }
+ if (model.includes('..') || model.includes('?') || model.includes('&')) {
+ throw new Error('invalid model parameter');
+ }
+ if (apiClient.isVertexAI()) {
+ if (model.startsWith('publishers/') ||
+ model.startsWith('projects/') ||
+ model.startsWith('models/')) {
+ return model;
+ }
+ else if (model.indexOf('/') >= 0) {
+ const parts = model.split('/', 2);
+ return `publishers/${parts[0]}/models/${parts[1]}`;
+ }
+ else {
+ return `publishers/google/models/${model}`;
+ }
+ }
+ else {
+ if (model.startsWith('models/') || model.startsWith('tunedModels/')) {
+ return model;
+ }
+ else {
+ return `models/${model}`;
+ }
+ }
+}
+function tCachesModel(apiClient, model) {
+ const transformedModel = tModel(apiClient, model);
+ if (!transformedModel) {
+ return '';
+ }
+ if (transformedModel.startsWith('publishers/') && apiClient.isVertexAI()) {
+ // vertex caches only support model name start with projects.
+ return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/${transformedModel}`;
+ }
+ else if (transformedModel.startsWith('models/') && apiClient.isVertexAI()) {
+ return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/publishers/google/${transformedModel}`;
+ }
+ else {
+ return transformedModel;
+ }
+}
+function tBlobs(blobs) {
+ if (Array.isArray(blobs)) {
+ return blobs.map((blob) => tBlob(blob));
+ }
+ else {
+ return [tBlob(blobs)];
+ }
+}
+function tBlob(blob) {
+ if (typeof blob === 'object' && blob !== null) {
+ return blob;
+ }
+ throw new Error(`Could not parse input as Blob. Unsupported blob type: ${typeof blob}`);
+}
+function tImageBlob(blob) {
+ const transformedBlob = tBlob(blob);
+ if (transformedBlob.mimeType &&
+ transformedBlob.mimeType.startsWith('image/')) {
+ return transformedBlob;
+ }
+ throw new Error(`Unsupported mime type: ${transformedBlob.mimeType}`);
+}
+function tAudioBlob(blob) {
+ const transformedBlob = tBlob(blob);
+ if (transformedBlob.mimeType &&
+ transformedBlob.mimeType.startsWith('audio/')) {
+ return transformedBlob;
+ }
+ throw new Error(`Unsupported mime type: ${transformedBlob.mimeType}`);
+}
+function tPart(origin) {
+ if (origin === null || origin === undefined) {
+ throw new Error('PartUnion is required');
+ }
+ if (typeof origin === 'object') {
+ return origin;
+ }
+ if (typeof origin === 'string') {
+ return { text: origin };
+ }
+ throw new Error(`Unsupported part type: ${typeof origin}`);
+}
+function tParts(origin) {
+ if (origin === null ||
+ origin === undefined ||
+ (Array.isArray(origin) && origin.length === 0)) {
+ throw new Error('PartListUnion is required');
+ }
+ if (Array.isArray(origin)) {
+ return origin.map((item) => tPart(item));
+ }
+ return [tPart(origin)];
+}
+function _isContent(origin) {
+ return (origin !== null &&
+ origin !== undefined &&
+ typeof origin === 'object' &&
+ 'parts' in origin &&
+ Array.isArray(origin.parts));
+}
+function _isFunctionCallPart(origin) {
+ return (origin !== null &&
+ origin !== undefined &&
+ typeof origin === 'object' &&
+ 'functionCall' in origin);
+}
+function _isFunctionResponsePart(origin) {
+ return (origin !== null &&
+ origin !== undefined &&
+ typeof origin === 'object' &&
+ 'functionResponse' in origin);
+}
+function tContent(origin) {
+ if (origin === null || origin === undefined) {
+ throw new Error('ContentUnion is required');
+ }
+ if (_isContent(origin)) {
+ // _isContent is a utility function that checks if the
+ // origin is a Content.
+ return origin;
+ }
+ return {
+ role: 'user',
+ parts: tParts(origin),
+ };
+}
+function tContentsForEmbed(apiClient, origin) {
+ if (!origin) {
+ return [];
+ }
+ if (apiClient.isVertexAI() && Array.isArray(origin)) {
+ return origin.flatMap((item) => {
+ const content = tContent(item);
+ if (content.parts &&
+ content.parts.length > 0 &&
+ content.parts[0].text !== undefined) {
+ return [content.parts[0].text];
+ }
+ return [];
+ });
+ }
+ else if (apiClient.isVertexAI()) {
+ const content = tContent(origin);
+ if (content.parts &&
+ content.parts.length > 0 &&
+ content.parts[0].text !== undefined) {
+ return [content.parts[0].text];
+ }
+ return [];
+ }
+ if (Array.isArray(origin)) {
+ return origin.map((item) => tContent(item));
+ }
+ return [tContent(origin)];
+}
+function tContents(origin) {
+ if (origin === null ||
+ origin === undefined ||
+ (Array.isArray(origin) && origin.length === 0)) {
+ throw new Error('contents are required');
+ }
+ if (!Array.isArray(origin)) {
+ // If it's not an array, it's a single content or a single PartUnion.
+ if (_isFunctionCallPart(origin) || _isFunctionResponsePart(origin)) {
+ throw new Error('To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them');
+ }
+ return [tContent(origin)];
+ }
+ const result = [];
+ const accumulatedParts = [];
+ const isContentArray = _isContent(origin[0]);
+ for (const item of origin) {
+ const isContent = _isContent(item);
+ if (isContent != isContentArray) {
+ throw new Error('Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them');
+ }
+ if (isContent) {
+ // `isContent` contains the result of _isContent, which is a utility
+ // function that checks if the item is a Content.
+ result.push(item);
+ }
+ else if (_isFunctionCallPart(item) || _isFunctionResponsePart(item)) {
+ throw new Error('To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them');
+ }
+ else {
+ accumulatedParts.push(item);
+ }
+ }
+ if (!isContentArray) {
+ result.push({ role: 'user', parts: tParts(accumulatedParts) });
+ }
+ return result;
+}
+/*
+Transform the type field from an array of types to an array of anyOf fields.
+Example:
+ {type: ['STRING', 'NUMBER']}
+will be transformed to
+ {anyOf: [{type: 'STRING'}, {type: 'NUMBER'}]}
+*/
+function flattenTypeArrayToAnyOf(typeList, resultingSchema) {
+ if (typeList.includes('null')) {
+ resultingSchema['nullable'] = true;
+ }
+ const listWithoutNull = typeList.filter((type) => type !== 'null');
+ if (listWithoutNull.length === 1) {
+ resultingSchema['type'] = Object.values(Type).includes(listWithoutNull[0].toUpperCase())
+ ? listWithoutNull[0].toUpperCase()
+ : Type.TYPE_UNSPECIFIED;
+ }
+ else {
+ resultingSchema['anyOf'] = [];
+ for (const i of listWithoutNull) {
+ resultingSchema['anyOf'].push({
+ 'type': Object.values(Type).includes(i.toUpperCase())
+ ? i.toUpperCase()
+ : Type.TYPE_UNSPECIFIED,
+ });
+ }
+ }
+}
+function processJsonSchema(_jsonSchema) {
+ const genAISchema = {};
+ const schemaFieldNames = ['items'];
+ const listSchemaFieldNames = ['anyOf'];
+ const dictSchemaFieldNames = ['properties'];
+ if (_jsonSchema['type'] && _jsonSchema['anyOf']) {
+ throw new Error('type and anyOf cannot be both populated.');
+ }
+ /*
+ This is to handle the nullable array or object. The _jsonSchema will
+ be in the format of {anyOf: [{type: 'null'}, {type: 'object'}]}. The
+ logic is to check if anyOf has 2 elements and one of the element is null,
+ if so, the anyOf field is unnecessary, so we need to get rid of the anyOf
+ field and make the schema nullable. Then use the other element as the new
+ _jsonSchema for processing. This is because the backend doesn't have a null
+ type.
+ This has to be checked before we process any other fields.
+ For example:
+ const objectNullable = z.object({
+ nullableArray: z.array(z.string()).nullable(),
+ });
+ Will have the raw _jsonSchema as:
+ {
+ type: 'OBJECT',
+ properties: {
+ nullableArray: {
+ anyOf: [
+ {type: 'null'},
+ {
+ type: 'array',
+ items: {type: 'string'},
+ },
+ ],
+ }
+ },
+ required: [ 'nullableArray' ],
+ }
+ Will result in following schema compatible with Gemini API:
+ {
+ type: 'OBJECT',
+ properties: {
+ nullableArray: {
+ nullable: true,
+ type: 'ARRAY',
+ items: {type: 'string'},
+ }
+ },
+ required: [ 'nullableArray' ],
+ }
+ */
+ const incomingAnyOf = _jsonSchema['anyOf'];
+ if (incomingAnyOf != null && incomingAnyOf.length == 2) {
+ if (incomingAnyOf[0]['type'] === 'null') {
+ genAISchema['nullable'] = true;
+ _jsonSchema = incomingAnyOf[1];
+ }
+ else if (incomingAnyOf[1]['type'] === 'null') {
+ genAISchema['nullable'] = true;
+ _jsonSchema = incomingAnyOf[0];
+ }
+ }
+ if (_jsonSchema['type'] instanceof Array) {
+ flattenTypeArrayToAnyOf(_jsonSchema['type'], genAISchema);
+ }
+ for (const [fieldName, fieldValue] of Object.entries(_jsonSchema)) {
+ // Skip if the fieldvalue is undefined or null.
+ if (fieldValue == null) {
+ continue;
+ }
+ if (fieldName == 'type') {
+ if (fieldValue === 'null') {
+ throw new Error('type: null can not be the only possible type for the field.');
+ }
+ if (fieldValue instanceof Array) {
+ // we have already handled the type field with array of types in the
+ // beginning of this function.
+ continue;
+ }
+ genAISchema['type'] = Object.values(Type).includes(fieldValue.toUpperCase())
+ ? fieldValue.toUpperCase()
+ : Type.TYPE_UNSPECIFIED;
+ }
+ else if (schemaFieldNames.includes(fieldName)) {
+ genAISchema[fieldName] =
+ processJsonSchema(fieldValue);
+ }
+ else if (listSchemaFieldNames.includes(fieldName)) {
+ const listSchemaFieldValue = [];
+ for (const item of fieldValue) {
+ if (item['type'] == 'null') {
+ genAISchema['nullable'] = true;
+ continue;
+ }
+ listSchemaFieldValue.push(processJsonSchema(item));
+ }
+ genAISchema[fieldName] =
+ listSchemaFieldValue;
+ }
+ else if (dictSchemaFieldNames.includes(fieldName)) {
+ const dictSchemaFieldValue = {};
+ for (const [key, value] of Object.entries(fieldValue)) {
+ dictSchemaFieldValue[key] = processJsonSchema(value);
+ }
+ genAISchema[fieldName] =
+ dictSchemaFieldValue;
+ }
+ else {
+ // additionalProperties is not included in JSONSchema, skipping it.
+ if (fieldName === 'additionalProperties') {
+ continue;
+ }
+ genAISchema[fieldName] = fieldValue;
+ }
+ }
+ return genAISchema;
+}
+// we take the unknown in the schema field because we want enable user to pass
+// the output of major schema declaration tools without casting. Tools such as
+// zodToJsonSchema, typebox, zodToJsonSchema function can return JsonSchema7Type
+// or object, see details in
+// https://github.com/StefanTerdell/zod-to-json-schema/blob/70525efe555cd226691e093d171370a3b10921d1/src/zodToJsonSchema.ts#L7
+// typebox can return unknown, see details in
+// https://github.com/sinclairzx81/typebox/blob/5a5431439f7d5ca6b494d0d18fbfd7b1a356d67c/src/type/create/type.ts#L35
+// Note: proper json schemas with the $schema field set never arrive to this
+// transformer. Schemas with $schema are routed to the equivalent API json
+// schema field.
+function tSchema(schema) {
+ return processJsonSchema(schema);
+}
+function tJsonSchema(schema) {
+ return schema;
+}
+function tSpeechConfig(speechConfig) {
+ if (typeof speechConfig === 'object') {
+ return speechConfig;
+ }
+ else if (typeof speechConfig === 'string') {
+ return {
+ voiceConfig: {
+ prebuiltVoiceConfig: {
+ voiceName: speechConfig,
+ },
+ },
+ };
+ }
+ else {
+ throw new Error(`Unsupported speechConfig type: ${typeof speechConfig}`);
+ }
+}
+function tLiveSpeechConfig(speechConfig) {
+ if ('multiSpeakerVoiceConfig' in speechConfig) {
+ throw new Error('multiSpeakerVoiceConfig is not supported in the live API.');
+ }
+ return speechConfig;
+}
+function tTool(tool) {
+ if (tool.functionDeclarations) {
+ for (const functionDeclaration of tool.functionDeclarations) {
+ if (functionDeclaration.parameters) {
+ if (!Object.keys(functionDeclaration.parameters).includes('$schema')) {
+ functionDeclaration.parameters = processJsonSchema(functionDeclaration.parameters);
+ }
+ else {
+ if (!functionDeclaration.parametersJsonSchema) {
+ functionDeclaration.parametersJsonSchema =
+ functionDeclaration.parameters;
+ delete functionDeclaration.parameters;
+ }
+ }
+ }
+ if (functionDeclaration.response) {
+ if (!Object.keys(functionDeclaration.response).includes('$schema')) {
+ functionDeclaration.response = processJsonSchema(functionDeclaration.response);
+ }
+ else {
+ if (!functionDeclaration.responseJsonSchema) {
+ functionDeclaration.responseJsonSchema =
+ functionDeclaration.response;
+ delete functionDeclaration.response;
+ }
+ }
+ }
+ }
+ }
+ return tool;
+}
+function tTools(tools) {
+ // Check if the incoming type is defined.
+ if (tools === undefined || tools === null) {
+ throw new Error('tools is required');
+ }
+ if (!Array.isArray(tools)) {
+ throw new Error('tools is required and must be an array of Tools');
+ }
+ const result = [];
+ for (const tool of tools) {
+ result.push(tool);
+ }
+ return result;
+}
+/**
+ * Prepends resource name with project, location, resource_prefix if needed.
+ *
+ * @param client The API client.
+ * @param resourceName The resource name.
+ * @param resourcePrefix The resource prefix.
+ * @param splitsAfterPrefix The number of splits after the prefix.
+ * @returns The completed resource name.
+ *
+ * Examples:
+ *
+ * ```
+ * resource_name = '123'
+ * resource_prefix = 'cachedContents'
+ * splits_after_prefix = 1
+ * client.vertexai = True
+ * client.project = 'bar'
+ * client.location = 'us-west1'
+ * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)
+ * returns: 'projects/bar/locations/us-west1/cachedContents/123'
+ * ```
+ *
+ * ```
+ * resource_name = 'projects/foo/locations/us-central1/cachedContents/123'
+ * resource_prefix = 'cachedContents'
+ * splits_after_prefix = 1
+ * client.vertexai = True
+ * client.project = 'bar'
+ * client.location = 'us-west1'
+ * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)
+ * returns: 'projects/foo/locations/us-central1/cachedContents/123'
+ * ```
+ *
+ * ```
+ * resource_name = '123'
+ * resource_prefix = 'cachedContents'
+ * splits_after_prefix = 1
+ * client.vertexai = False
+ * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)
+ * returns 'cachedContents/123'
+ * ```
+ *
+ * ```
+ * resource_name = 'some/wrong/cachedContents/resource/name/123'
+ * resource_prefix = 'cachedContents'
+ * splits_after_prefix = 1
+ * client.vertexai = False
+ * # client.vertexai = True
+ * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)
+ * -> 'some/wrong/resource/name/123'
+ * ```
+ */
+function resourceName(client, resourceName, resourcePrefix, splitsAfterPrefix = 1) {
+ const shouldAppendPrefix = !resourceName.startsWith(`${resourcePrefix}/`) &&
+ resourceName.split('/').length === splitsAfterPrefix;
+ if (client.isVertexAI()) {
+ if (resourceName.startsWith('projects/')) {
+ return resourceName;
+ }
+ else if (resourceName.startsWith('locations/')) {
+ return `projects/${client.getProject()}/${resourceName}`;
+ }
+ else if (resourceName.startsWith(`${resourcePrefix}/`)) {
+ return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourceName}`;
+ }
+ else if (shouldAppendPrefix) {
+ return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourcePrefix}/${resourceName}`;
+ }
+ else {
+ return resourceName;
+ }
+ }
+ if (shouldAppendPrefix) {
+ return `${resourcePrefix}/${resourceName}`;
+ }
+ return resourceName;
+}
+function tCachedContentName(apiClient, name) {
+ if (typeof name !== 'string') {
+ throw new Error('name must be a string');
+ }
+ return resourceName(apiClient, name, 'cachedContents');
+}
+function tTuningJobStatus(status) {
+ switch (status) {
+ case 'STATE_UNSPECIFIED':
+ return 'JOB_STATE_UNSPECIFIED';
+ case 'CREATING':
+ return 'JOB_STATE_RUNNING';
+ case 'ACTIVE':
+ return 'JOB_STATE_SUCCEEDED';
+ case 'FAILED':
+ return 'JOB_STATE_FAILED';
+ default:
+ return status;
+ }
+}
+function tBytes(fromImageBytes) {
+ return tBytes$1(fromImageBytes);
+}
+function _isFile(origin) {
+ return (origin !== null &&
+ origin !== undefined &&
+ typeof origin === 'object' &&
+ 'name' in origin);
+}
+function isGeneratedVideo(origin) {
+ return (origin !== null &&
+ origin !== undefined &&
+ typeof origin === 'object' &&
+ 'video' in origin);
+}
+function isVideo(origin) {
+ return (origin !== null &&
+ origin !== undefined &&
+ typeof origin === 'object' &&
+ 'uri' in origin);
+}
+function tFileName(fromName) {
+ var _a;
+ let name;
+ if (_isFile(fromName)) {
+ name = fromName.name;
+ }
+ if (isVideo(fromName)) {
+ name = fromName.uri;
+ if (name === undefined) {
+ return undefined;
+ }
+ }
+ if (isGeneratedVideo(fromName)) {
+ name = (_a = fromName.video) === null || _a === void 0 ? void 0 : _a.uri;
+ if (name === undefined) {
+ return undefined;
+ }
+ }
+ if (typeof fromName === 'string') {
+ name = fromName;
+ }
+ if (name === undefined) {
+ throw new Error('Could not extract file name from the provided input.');
+ }
+ if (name.startsWith('https://')) {
+ const suffix = name.split('files/')[1];
+ const match = suffix.match(/[a-z0-9]+/);
+ if (match === null) {
+ throw new Error(`Could not extract file name from URI ${name}`);
+ }
+ name = match[0];
+ }
+ else if (name.startsWith('files/')) {
+ name = name.split('files/')[1];
+ }
+ return name;
+}
+function tModelsUrl(apiClient, baseModels) {
+ let res;
+ if (apiClient.isVertexAI()) {
+ res = baseModels ? 'publishers/google/models' : 'models';
+ }
+ else {
+ res = baseModels ? 'models' : 'tunedModels';
+ }
+ return res;
+}
+function tExtractModels(response) {
+ for (const key of ['models', 'tunedModels', 'publisherModels']) {
+ if (hasField(response, key)) {
+ return response[key];
+ }
+ }
+ return [];
+}
+function hasField(data, fieldName) {
+ return data !== null && typeof data === 'object' && fieldName in data;
+}
+function mcpToGeminiTool(mcpTool, config = {}) {
+ const mcpToolSchema = mcpTool;
+ const functionDeclaration = {
+ name: mcpToolSchema['name'],
+ description: mcpToolSchema['description'],
+ parametersJsonSchema: mcpToolSchema['inputSchema'],
+ };
+ if (mcpToolSchema['outputSchema']) {
+ functionDeclaration['responseJsonSchema'] = mcpToolSchema['outputSchema'];
+ }
+ if (config.behavior) {
+ functionDeclaration['behavior'] = config.behavior;
+ }
+ const geminiTool = {
+ functionDeclarations: [
+ functionDeclaration,
+ ],
+ };
+ return geminiTool;
+}
+/**
+ * Converts a list of MCP tools to a single Gemini tool with a list of function
+ * declarations.
+ */
+function mcpToolsToGeminiTool(mcpTools, config = {}) {
+ const functionDeclarations = [];
+ const toolNames = new Set();
+ for (const mcpTool of mcpTools) {
+ const mcpToolName = mcpTool.name;
+ if (toolNames.has(mcpToolName)) {
+ throw new Error(`Duplicate function name ${mcpToolName} found in MCP tools. Please ensure function names are unique.`);
+ }
+ toolNames.add(mcpToolName);
+ const geminiTool = mcpToGeminiTool(mcpTool, config);
+ if (geminiTool.functionDeclarations) {
+ functionDeclarations.push(...geminiTool.functionDeclarations);
+ }
+ }
+ return { functionDeclarations: functionDeclarations };
+}
+// Transforms a source input into a BatchJobSource object with validation.
+function tBatchJobSource(client, src) {
+ let sourceObj;
+ if (typeof src === 'string') {
+ if (client.isVertexAI()) {
+ if (src.startsWith('gs://')) {
+ sourceObj = { format: 'jsonl', gcsUri: [src] };
+ }
+ else if (src.startsWith('bq://')) {
+ sourceObj = { format: 'bigquery', bigqueryUri: src };
+ }
+ else if (/^projects\/[^/]+\/locations\/[^/]+\/datasets\/[^/]+$/.test(src)) {
+ sourceObj = { format: 'vertex-dataset', vertexDatasetName: src };
+ }
+ else {
+ throw new Error(`Unsupported string source for Vertex AI: ${src}`);
+ }
+ }
+ else {
+ // MLDEV
+ if (src.startsWith('files/')) {
+ sourceObj = { fileName: src }; // Default to fileName for string input
+ }
+ else {
+ throw new Error(`Unsupported string source for Gemini API: ${src}`);
+ }
+ }
+ }
+ else if (Array.isArray(src)) {
+ if (client.isVertexAI()) {
+ throw new Error('InlinedRequest[] is not supported in Vertex AI.');
+ }
+ sourceObj = { inlinedRequests: src };
+ }
+ else {
+ // It's already a BatchJobSource object
+ sourceObj = src;
+ }
+ // Validation logic
+ const vertexSourcesCount = [
+ sourceObj.gcsUri,
+ sourceObj.bigqueryUri,
+ sourceObj.vertexDatasetName,
+ ].filter(Boolean).length;
+ const mldevSourcesCount = [
+ sourceObj.inlinedRequests,
+ sourceObj.fileName,
+ ].filter(Boolean).length;
+ if (client.isVertexAI()) {
+ if (mldevSourcesCount > 0 || vertexSourcesCount !== 1) {
+ throw new Error('Exactly one of `gcsUri`, `bigqueryUri`, or `vertexDatasetName` must be set for Vertex AI.');
+ }
+ }
+ else {
+ // MLDEV
+ if (vertexSourcesCount > 0 || mldevSourcesCount !== 1) {
+ throw new Error('Exactly one of `inlinedRequests`, `fileName`, ' +
+ 'must be set for Gemini API.');
+ }
+ }
+ return sourceObj;
+}
+function tBatchJobDestination(dest) {
+ if (typeof dest !== 'string') {
+ return dest;
+ }
+ const destString = dest;
+ if (destString.startsWith('gs://')) {
+ return {
+ format: 'jsonl',
+ gcsUri: destString,
+ };
+ }
+ else if (destString.startsWith('bq://')) {
+ return {
+ format: 'bigquery',
+ bigqueryUri: destString,
+ };
+ }
+ else {
+ throw new Error(`Unsupported destination: ${destString}`);
+ }
+}
+function tRecvBatchJobDestination(dest) {
+ // Ensure dest is a non-null object before proceeding.
+ if (typeof dest !== 'object' || dest === null) {
+ // If the input is not an object, it cannot be a valid BatchJobDestination
+ // based on the operations performed. Return it cast, or handle as an error.
+ // Casting an empty object might be a safe default.
+ return {};
+ }
+ // Cast to Record to allow string property access.
+ const obj = dest;
+ // Safely access nested properties.
+ const inlineResponsesVal = obj['inlinedResponses'];
+ if (typeof inlineResponsesVal !== 'object' || inlineResponsesVal === null) {
+ return dest;
+ }
+ const inlineResponsesObj = inlineResponsesVal;
+ const responsesArray = inlineResponsesObj['inlinedResponses'];
+ if (!Array.isArray(responsesArray) || responsesArray.length === 0) {
+ return dest;
+ }
+ // Check if any response has the 'embedding' property.
+ let hasEmbedding = false;
+ for (const responseItem of responsesArray) {
+ if (typeof responseItem !== 'object' || responseItem === null) {
+ continue;
+ }
+ const responseItemObj = responseItem;
+ const responseVal = responseItemObj['response'];
+ if (typeof responseVal !== 'object' || responseVal === null) {
+ continue;
+ }
+ const responseObj = responseVal;
+ // Check for the existence of the 'embedding' key.
+ if (responseObj['embedding'] !== undefined) {
+ hasEmbedding = true;
+ break;
+ }
+ }
+ // Perform the transformation if an embedding was found.
+ if (hasEmbedding) {
+ obj['inlinedEmbedContentResponses'] = obj['inlinedResponses'];
+ delete obj['inlinedResponses'];
+ }
+ // Cast the (potentially) modified object to the target type.
+ return dest;
+}
+function tBatchJobName(apiClient, name) {
+ const nameString = name;
+ if (!apiClient.isVertexAI()) {
+ const mldevPattern = /batches\/[^/]+$/;
+ if (mldevPattern.test(nameString)) {
+ return nameString.split('/').pop();
+ }
+ else {
+ throw new Error(`Invalid batch job name: ${nameString}.`);
+ }
+ }
+ const vertexPattern = /^projects\/[^/]+\/locations\/[^/]+\/batchPredictionJobs\/[^/]+$/;
+ if (vertexPattern.test(nameString)) {
+ return nameString.split('/').pop();
+ }
+ else if (/^\d+$/.test(nameString)) {
+ return nameString;
+ }
+ else {
+ throw new Error(`Invalid batch job name: ${nameString}.`);
+ }
+}
+function tJobState(state) {
+ const stateString = state;
+ if (stateString === 'BATCH_STATE_UNSPECIFIED') {
+ return 'JOB_STATE_UNSPECIFIED';
+ }
+ else if (stateString === 'BATCH_STATE_PENDING') {
+ return 'JOB_STATE_PENDING';
+ }
+ else if (stateString === 'BATCH_STATE_RUNNING') {
+ return 'JOB_STATE_RUNNING';
+ }
+ else if (stateString === 'BATCH_STATE_SUCCEEDED') {
+ return 'JOB_STATE_SUCCEEDED';
+ }
+ else if (stateString === 'BATCH_STATE_FAILED') {
+ return 'JOB_STATE_FAILED';
+ }
+ else if (stateString === 'BATCH_STATE_CANCELLED') {
+ return 'JOB_STATE_CANCELLED';
+ }
+ else if (stateString === 'BATCH_STATE_EXPIRED') {
+ return 'JOB_STATE_EXPIRED';
+ }
+ else {
+ return stateString;
+ }
+}
+function tIsVertexEmbedContentModel(model) {
+ return ((model.includes('gemini') && model !== 'gemini-embedding-001') ||
+ model.includes('maas'));
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+function authConfigToMldev$4(fromObject) {
+ const toObject = {};
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
+ if (fromApiKey != null) {
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
+ }
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
+ undefined) {
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function batchJobDestinationFromMldev(fromObject) {
+ const toObject = {};
+ const fromFileName = getValueByPath(fromObject, ['responsesFile']);
+ if (fromFileName != null) {
+ setValueByPath(toObject, ['fileName'], fromFileName);
+ }
+ const fromInlinedResponses = getValueByPath(fromObject, [
+ 'inlinedResponses',
+ 'inlinedResponses',
+ ]);
+ if (fromInlinedResponses != null) {
+ let transformedList = fromInlinedResponses;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return inlinedResponseFromMldev(item);
+ });
+ }
+ setValueByPath(toObject, ['inlinedResponses'], transformedList);
+ }
+ const fromInlinedEmbedContentResponses = getValueByPath(fromObject, [
+ 'inlinedEmbedContentResponses',
+ 'inlinedResponses',
+ ]);
+ if (fromInlinedEmbedContentResponses != null) {
+ let transformedList = fromInlinedEmbedContentResponses;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['inlinedEmbedContentResponses'], transformedList);
+ }
+ return toObject;
+}
+function batchJobDestinationFromVertex(fromObject) {
+ const toObject = {};
+ const fromFormat = getValueByPath(fromObject, ['predictionsFormat']);
+ if (fromFormat != null) {
+ setValueByPath(toObject, ['format'], fromFormat);
+ }
+ const fromGcsUri = getValueByPath(fromObject, [
+ 'gcsDestination',
+ 'outputUriPrefix',
+ ]);
+ if (fromGcsUri != null) {
+ setValueByPath(toObject, ['gcsUri'], fromGcsUri);
+ }
+ const fromBigqueryUri = getValueByPath(fromObject, [
+ 'bigqueryDestination',
+ 'outputUri',
+ ]);
+ if (fromBigqueryUri != null) {
+ setValueByPath(toObject, ['bigqueryUri'], fromBigqueryUri);
+ }
+ const fromVertexDataset = getValueByPath(fromObject, [
+ 'vertexMultimodalDatasetDestination',
+ ]);
+ if (fromVertexDataset != null) {
+ setValueByPath(toObject, ['vertexDataset'], vertexMultimodalDatasetDestinationFromVertex(fromVertexDataset));
+ }
+ return toObject;
+}
+function batchJobDestinationToVertex(fromObject) {
+ const toObject = {};
+ const fromFormat = getValueByPath(fromObject, ['format']);
+ if (fromFormat != null) {
+ setValueByPath(toObject, ['predictionsFormat'], fromFormat);
+ }
+ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
+ if (fromGcsUri != null) {
+ setValueByPath(toObject, ['gcsDestination', 'outputUriPrefix'], fromGcsUri);
+ }
+ const fromBigqueryUri = getValueByPath(fromObject, ['bigqueryUri']);
+ if (fromBigqueryUri != null) {
+ setValueByPath(toObject, ['bigqueryDestination', 'outputUri'], fromBigqueryUri);
+ }
+ const fromVertexDataset = getValueByPath(fromObject, [
+ 'vertexDataset',
+ ]);
+ if (fromVertexDataset != null) {
+ setValueByPath(toObject, ['vertexMultimodalDatasetDestination'], vertexMultimodalDatasetDestinationToVertex(fromVertexDataset));
+ }
+ if (getValueByPath(fromObject, ['fileName']) !== undefined) {
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['inlinedResponses']) !== undefined) {
+ throw new Error('inlinedResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['inlinedEmbedContentResponses']) !==
+ undefined) {
+ throw new Error('inlinedEmbedContentResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function batchJobFromMldev(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromDisplayName = getValueByPath(fromObject, [
+ 'metadata',
+ 'displayName',
+ ]);
+ if (fromDisplayName != null) {
+ setValueByPath(toObject, ['displayName'], fromDisplayName);
+ }
+ const fromState = getValueByPath(fromObject, ['metadata', 'state']);
+ if (fromState != null) {
+ setValueByPath(toObject, ['state'], tJobState(fromState));
+ }
+ const fromCreateTime = getValueByPath(fromObject, [
+ 'metadata',
+ 'createTime',
+ ]);
+ if (fromCreateTime != null) {
+ setValueByPath(toObject, ['createTime'], fromCreateTime);
+ }
+ const fromEndTime = getValueByPath(fromObject, [
+ 'metadata',
+ 'endTime',
+ ]);
+ if (fromEndTime != null) {
+ setValueByPath(toObject, ['endTime'], fromEndTime);
+ }
+ const fromUpdateTime = getValueByPath(fromObject, [
+ 'metadata',
+ 'updateTime',
+ ]);
+ if (fromUpdateTime != null) {
+ setValueByPath(toObject, ['updateTime'], fromUpdateTime);
+ }
+ const fromModel = getValueByPath(fromObject, ['metadata', 'model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['model'], fromModel);
+ }
+ const fromDest = getValueByPath(fromObject, ['metadata', 'output']);
+ if (fromDest != null) {
+ setValueByPath(toObject, ['dest'], batchJobDestinationFromMldev(tRecvBatchJobDestination(fromDest)));
+ }
+ return toObject;
+}
+function batchJobFromVertex(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (fromDisplayName != null) {
+ setValueByPath(toObject, ['displayName'], fromDisplayName);
+ }
+ const fromState = getValueByPath(fromObject, ['state']);
+ if (fromState != null) {
+ setValueByPath(toObject, ['state'], tJobState(fromState));
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ const fromCreateTime = getValueByPath(fromObject, ['createTime']);
+ if (fromCreateTime != null) {
+ setValueByPath(toObject, ['createTime'], fromCreateTime);
+ }
+ const fromStartTime = getValueByPath(fromObject, ['startTime']);
+ if (fromStartTime != null) {
+ setValueByPath(toObject, ['startTime'], fromStartTime);
+ }
+ const fromEndTime = getValueByPath(fromObject, ['endTime']);
+ if (fromEndTime != null) {
+ setValueByPath(toObject, ['endTime'], fromEndTime);
+ }
+ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']);
+ if (fromUpdateTime != null) {
+ setValueByPath(toObject, ['updateTime'], fromUpdateTime);
+ }
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['model'], fromModel);
+ }
+ const fromSrc = getValueByPath(fromObject, ['inputConfig']);
+ if (fromSrc != null) {
+ setValueByPath(toObject, ['src'], batchJobSourceFromVertex(fromSrc));
+ }
+ const fromDest = getValueByPath(fromObject, ['outputConfig']);
+ if (fromDest != null) {
+ setValueByPath(toObject, ['dest'], batchJobDestinationFromVertex(tRecvBatchJobDestination(fromDest)));
+ }
+ const fromOutputInfo = getValueByPath(fromObject, ['outputInfo']);
+ if (fromOutputInfo != null) {
+ setValueByPath(toObject, ['outputInfo'], fromOutputInfo);
+ }
+ const fromCompletionStats = getValueByPath(fromObject, [
+ 'completionStats',
+ ]);
+ if (fromCompletionStats != null) {
+ setValueByPath(toObject, ['completionStats'], fromCompletionStats);
+ }
+ return toObject;
+}
+function batchJobSourceFromVertex(fromObject) {
+ const toObject = {};
+ const fromFormat = getValueByPath(fromObject, ['instancesFormat']);
+ if (fromFormat != null) {
+ setValueByPath(toObject, ['format'], fromFormat);
+ }
+ const fromGcsUri = getValueByPath(fromObject, ['gcsSource', 'uris']);
+ if (fromGcsUri != null) {
+ setValueByPath(toObject, ['gcsUri'], fromGcsUri);
+ }
+ const fromBigqueryUri = getValueByPath(fromObject, [
+ 'bigquerySource',
+ 'inputUri',
+ ]);
+ if (fromBigqueryUri != null) {
+ setValueByPath(toObject, ['bigqueryUri'], fromBigqueryUri);
+ }
+ const fromVertexDatasetName = getValueByPath(fromObject, [
+ 'vertexMultimodalDatasetSource',
+ 'datasetName',
+ ]);
+ if (fromVertexDatasetName != null) {
+ setValueByPath(toObject, ['vertexDatasetName'], fromVertexDatasetName);
+ }
+ return toObject;
+}
+function batchJobSourceToMldev(apiClient, fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['format']) !== undefined) {
+ throw new Error('format parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['bigqueryUri']) !== undefined) {
+ throw new Error('bigqueryUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['vertexDatasetName']) !== undefined) {
+ throw new Error('vertexDatasetName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromFileName = getValueByPath(fromObject, ['fileName']);
+ if (fromFileName != null) {
+ setValueByPath(toObject, ['fileName'], fromFileName);
+ }
+ const fromInlinedRequests = getValueByPath(fromObject, [
+ 'inlinedRequests',
+ ]);
+ if (fromInlinedRequests != null) {
+ let transformedList = fromInlinedRequests;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return inlinedRequestToMldev(apiClient, item);
+ });
+ }
+ setValueByPath(toObject, ['requests', 'requests'], transformedList);
+ }
+ return toObject;
+}
+function batchJobSourceToVertex(fromObject) {
+ const toObject = {};
+ const fromFormat = getValueByPath(fromObject, ['format']);
+ if (fromFormat != null) {
+ setValueByPath(toObject, ['instancesFormat'], fromFormat);
+ }
+ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
+ if (fromGcsUri != null) {
+ setValueByPath(toObject, ['gcsSource', 'uris'], fromGcsUri);
+ }
+ const fromBigqueryUri = getValueByPath(fromObject, ['bigqueryUri']);
+ if (fromBigqueryUri != null) {
+ setValueByPath(toObject, ['bigquerySource', 'inputUri'], fromBigqueryUri);
+ }
+ const fromVertexDatasetName = getValueByPath(fromObject, [
+ 'vertexDatasetName',
+ ]);
+ if (fromVertexDatasetName != null) {
+ setValueByPath(toObject, ['vertexMultimodalDatasetSource', 'datasetName'], fromVertexDatasetName);
+ }
+ if (getValueByPath(fromObject, ['fileName']) !== undefined) {
+ throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['inlinedRequests']) !== undefined) {
+ throw new Error('inlinedRequests parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function blobToMldev$4(fromObject) {
+ const toObject = {};
+ const fromData = getValueByPath(fromObject, ['data']);
+ if (fromData != null) {
+ setValueByPath(toObject, ['data'], fromData);
+ }
+ if (getValueByPath(fromObject, ['displayName']) !== undefined) {
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function cancelBatchJobParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tBatchJobName(apiClient, fromName));
+ }
+ return toObject;
+}
+function cancelBatchJobParametersToVertex(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tBatchJobName(apiClient, fromName));
+ }
+ return toObject;
+}
+function candidateFromMldev$1(fromObject) {
+ const toObject = {};
+ const fromContent = getValueByPath(fromObject, ['content']);
+ if (fromContent != null) {
+ setValueByPath(toObject, ['content'], fromContent);
+ }
+ const fromCitationMetadata = getValueByPath(fromObject, [
+ 'citationMetadata',
+ ]);
+ if (fromCitationMetadata != null) {
+ setValueByPath(toObject, ['citationMetadata'], citationMetadataFromMldev$1(fromCitationMetadata));
+ }
+ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
+ if (fromTokenCount != null) {
+ setValueByPath(toObject, ['tokenCount'], fromTokenCount);
+ }
+ const fromFinishReason = getValueByPath(fromObject, ['finishReason']);
+ if (fromFinishReason != null) {
+ setValueByPath(toObject, ['finishReason'], fromFinishReason);
+ }
+ const fromGroundingMetadata = getValueByPath(fromObject, [
+ 'groundingMetadata',
+ ]);
+ if (fromGroundingMetadata != null) {
+ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
+ }
+ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']);
+ if (fromAvgLogprobs != null) {
+ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);
+ }
+ const fromIndex = getValueByPath(fromObject, ['index']);
+ if (fromIndex != null) {
+ setValueByPath(toObject, ['index'], fromIndex);
+ }
+ const fromLogprobsResult = getValueByPath(fromObject, [
+ 'logprobsResult',
+ ]);
+ if (fromLogprobsResult != null) {
+ setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);
+ }
+ const fromSafetyRatings = getValueByPath(fromObject, [
+ 'safetyRatings',
+ ]);
+ if (fromSafetyRatings != null) {
+ let transformedList = fromSafetyRatings;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['safetyRatings'], transformedList);
+ }
+ const fromUrlContextMetadata = getValueByPath(fromObject, [
+ 'urlContextMetadata',
+ ]);
+ if (fromUrlContextMetadata != null) {
+ setValueByPath(toObject, ['urlContextMetadata'], fromUrlContextMetadata);
+ }
+ return toObject;
+}
+function citationMetadataFromMldev$1(fromObject) {
+ const toObject = {};
+ const fromCitations = getValueByPath(fromObject, ['citationSources']);
+ if (fromCitations != null) {
+ let transformedList = fromCitations;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['citations'], transformedList);
+ }
+ return toObject;
+}
+function contentToMldev$4(fromObject) {
+ const toObject = {};
+ const fromParts = getValueByPath(fromObject, ['parts']);
+ if (fromParts != null) {
+ let transformedList = fromParts;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return partToMldev$4(item);
+ });
+ }
+ setValueByPath(toObject, ['parts'], transformedList);
+ }
+ const fromRole = getValueByPath(fromObject, ['role']);
+ if (fromRole != null) {
+ setValueByPath(toObject, ['role'], fromRole);
+ }
+ return toObject;
+}
+function createBatchJobConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (parentObject !== undefined && fromDisplayName != null) {
+ setValueByPath(parentObject, ['batch', 'displayName'], fromDisplayName);
+ }
+ if (getValueByPath(fromObject, ['dest']) !== undefined) {
+ throw new Error('dest parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromWebhookConfig = getValueByPath(fromObject, [
+ 'webhookConfig',
+ ]);
+ if (parentObject !== undefined && fromWebhookConfig != null) {
+ setValueByPath(parentObject, ['batch', 'webhookConfig'], fromWebhookConfig);
+ }
+ return toObject;
+}
+function createBatchJobConfigToVertex(fromObject, parentObject) {
+ const toObject = {};
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (parentObject !== undefined && fromDisplayName != null) {
+ setValueByPath(parentObject, ['displayName'], fromDisplayName);
+ }
+ const fromDest = getValueByPath(fromObject, ['dest']);
+ if (parentObject !== undefined && fromDest != null) {
+ setValueByPath(parentObject, ['outputConfig'], batchJobDestinationToVertex(tBatchJobDestination(fromDest)));
+ }
+ if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function createBatchJobParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromSrc = getValueByPath(fromObject, ['src']);
+ if (fromSrc != null) {
+ setValueByPath(toObject, ['batch', 'inputConfig'], batchJobSourceToMldev(apiClient, tBatchJobSource(apiClient, fromSrc)));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ createBatchJobConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function createBatchJobParametersToVertex(apiClient, fromObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['model'], tModel(apiClient, fromModel));
+ }
+ const fromSrc = getValueByPath(fromObject, ['src']);
+ if (fromSrc != null) {
+ setValueByPath(toObject, ['inputConfig'], batchJobSourceToVertex(tBatchJobSource(apiClient, fromSrc)));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ createBatchJobConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function createEmbeddingsBatchJobConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (parentObject !== undefined && fromDisplayName != null) {
+ setValueByPath(parentObject, ['batch', 'displayName'], fromDisplayName);
+ }
+ return toObject;
+}
+function createEmbeddingsBatchJobParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromSrc = getValueByPath(fromObject, ['src']);
+ if (fromSrc != null) {
+ setValueByPath(toObject, ['batch', 'inputConfig'], embeddingsBatchJobSourceToMldev(apiClient, fromSrc));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ createEmbeddingsBatchJobConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function deleteBatchJobParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tBatchJobName(apiClient, fromName));
+ }
+ return toObject;
+}
+function deleteBatchJobParametersToVertex(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tBatchJobName(apiClient, fromName));
+ }
+ return toObject;
+}
+function deleteResourceJobFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromDone = getValueByPath(fromObject, ['done']);
+ if (fromDone != null) {
+ setValueByPath(toObject, ['done'], fromDone);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ return toObject;
+}
+function deleteResourceJobFromVertex(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromDone = getValueByPath(fromObject, ['done']);
+ if (fromDone != null) {
+ setValueByPath(toObject, ['done'], fromDone);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ return toObject;
+}
+function embedContentBatchToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (fromContents != null) {
+ let transformedList = tContentsForEmbed(apiClient, fromContents);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['requests[]', 'request', 'content'], transformedList);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ setValueByPath(toObject, ['_self'], embedContentConfigToMldev$1(fromConfig, toObject));
+ moveValueByPath(toObject, { 'requests[].*': 'requests[].request.*' });
+ }
+ return toObject;
+}
+function embedContentConfigToMldev$1(fromObject, parentObject) {
+ const toObject = {};
+ const fromTaskType = getValueByPath(fromObject, ['taskType']);
+ if (parentObject !== undefined && fromTaskType != null) {
+ setValueByPath(parentObject, ['requests[]', 'taskType'], fromTaskType);
+ }
+ const fromTitle = getValueByPath(fromObject, ['title']);
+ if (parentObject !== undefined && fromTitle != null) {
+ setValueByPath(parentObject, ['requests[]', 'title'], fromTitle);
+ }
+ const fromOutputDimensionality = getValueByPath(fromObject, [
+ 'outputDimensionality',
+ ]);
+ if (parentObject !== undefined && fromOutputDimensionality != null) {
+ setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
+ }
+ if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function embeddingsBatchJobSourceToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromFileName = getValueByPath(fromObject, ['fileName']);
+ if (fromFileName != null) {
+ setValueByPath(toObject, ['file_name'], fromFileName);
+ }
+ const fromInlinedRequests = getValueByPath(fromObject, [
+ 'inlinedRequests',
+ ]);
+ if (fromInlinedRequests != null) {
+ setValueByPath(toObject, ['requests'], embedContentBatchToMldev(apiClient, fromInlinedRequests));
+ }
+ return toObject;
+}
+function fileDataToMldev$4(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['displayName']) !== undefined) {
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromFileUri = getValueByPath(fromObject, ['fileUri']);
+ if (fromFileUri != null) {
+ setValueByPath(toObject, ['fileUri'], fromFileUri);
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function functionCallToMldev$4(fromObject) {
+ const toObject = {};
+ const fromArgs = getValueByPath(fromObject, ['args']);
+ if (fromArgs != null) {
+ setValueByPath(toObject, ['args'], fromArgs);
+ }
+ const fromId = getValueByPath(fromObject, ['id']);
+ if (fromId != null) {
+ setValueByPath(toObject, ['id'], fromId);
+ }
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function functionCallingConfigToMldev$2(fromObject) {
+ const toObject = {};
+ const fromAllowedFunctionNames = getValueByPath(fromObject, [
+ 'allowedFunctionNames',
+ ]);
+ if (fromAllowedFunctionNames != null) {
+ setValueByPath(toObject, ['allowedFunctionNames'], fromAllowedFunctionNames);
+ }
+ const fromMode = getValueByPath(fromObject, ['mode']);
+ if (fromMode != null) {
+ setValueByPath(toObject, ['mode'], fromMode);
+ }
+ if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
+ undefined) {
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
+ const toObject = {};
+ const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
+ if (parentObject !== undefined && fromServiceTier != null) {
+ setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
+ }
+ const fromSystemInstruction = getValueByPath(fromObject, [
+ 'systemInstruction',
+ ]);
+ if (parentObject !== undefined && fromSystemInstruction != null) {
+ setValueByPath(parentObject, ['systemInstruction'], contentToMldev$4(tContent(fromSystemInstruction)));
+ }
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
+ if (fromTemperature != null) {
+ setValueByPath(toObject, ['temperature'], fromTemperature);
+ }
+ const fromTopP = getValueByPath(fromObject, ['topP']);
+ if (fromTopP != null) {
+ setValueByPath(toObject, ['topP'], fromTopP);
+ }
+ const fromTopK = getValueByPath(fromObject, ['topK']);
+ if (fromTopK != null) {
+ setValueByPath(toObject, ['topK'], fromTopK);
+ }
+ const fromCandidateCount = getValueByPath(fromObject, [
+ 'candidateCount',
+ ]);
+ if (fromCandidateCount != null) {
+ setValueByPath(toObject, ['candidateCount'], fromCandidateCount);
+ }
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
+ 'maxOutputTokens',
+ ]);
+ if (fromMaxOutputTokens != null) {
+ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);
+ }
+ const fromStopSequences = getValueByPath(fromObject, [
+ 'stopSequences',
+ ]);
+ if (fromStopSequences != null) {
+ setValueByPath(toObject, ['stopSequences'], fromStopSequences);
+ }
+ const fromResponseLogprobs = getValueByPath(fromObject, [
+ 'responseLogprobs',
+ ]);
+ if (fromResponseLogprobs != null) {
+ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);
+ }
+ const fromLogprobs = getValueByPath(fromObject, ['logprobs']);
+ if (fromLogprobs != null) {
+ setValueByPath(toObject, ['logprobs'], fromLogprobs);
+ }
+ const fromPresencePenalty = getValueByPath(fromObject, [
+ 'presencePenalty',
+ ]);
+ if (fromPresencePenalty != null) {
+ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);
+ }
+ const fromFrequencyPenalty = getValueByPath(fromObject, [
+ 'frequencyPenalty',
+ ]);
+ if (fromFrequencyPenalty != null) {
+ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (fromSeed != null) {
+ setValueByPath(toObject, ['seed'], fromSeed);
+ }
+ const fromResponseMimeType = getValueByPath(fromObject, [
+ 'responseMimeType',
+ ]);
+ if (fromResponseMimeType != null) {
+ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);
+ }
+ const fromResponseSchema = getValueByPath(fromObject, [
+ 'responseSchema',
+ ]);
+ if (fromResponseSchema != null) {
+ setValueByPath(toObject, ['responseSchema'], tSchema(fromResponseSchema));
+ }
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
+ 'responseJsonSchema',
+ ]);
+ if (fromResponseJsonSchema != null) {
+ setValueByPath(toObject, ['responseJsonSchema'], tJsonSchema(fromResponseJsonSchema));
+ }
+ if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromSafetySettings = getValueByPath(fromObject, [
+ 'safetySettings',
+ ]);
+ if (parentObject !== undefined && fromSafetySettings != null) {
+ let transformedList = fromSafetySettings;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return safetySettingToMldev$3(item);
+ });
+ }
+ setValueByPath(parentObject, ['safetySettings'], transformedList);
+ }
+ const fromTools = getValueByPath(fromObject, ['tools']);
+ if (parentObject !== undefined && fromTools != null) {
+ let transformedList = tTools(fromTools);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return toolToMldev$4(tTool(item));
+ });
+ }
+ setValueByPath(parentObject, ['tools'], transformedList);
+ }
+ const fromToolConfig = getValueByPath(fromObject, ['toolConfig']);
+ if (parentObject !== undefined && fromToolConfig != null) {
+ setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$2(fromToolConfig));
+ }
+ if (getValueByPath(fromObject, ['labels']) !== undefined) {
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromCachedContent = getValueByPath(fromObject, [
+ 'cachedContent',
+ ]);
+ if (parentObject !== undefined && fromCachedContent != null) {
+ setValueByPath(parentObject, ['cachedContent'], tCachedContentName(apiClient, fromCachedContent));
+ }
+ const fromResponseModalities = getValueByPath(fromObject, [
+ 'responseModalities',
+ ]);
+ if (fromResponseModalities != null) {
+ setValueByPath(toObject, ['responseModalities'], fromResponseModalities);
+ }
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
+ if (fromSpeechConfig != null) {
+ setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
+ }
+ if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromThinkingConfig = getValueByPath(fromObject, [
+ 'thinkingConfig',
+ ]);
+ if (fromThinkingConfig != null) {
+ setValueByPath(toObject, ['thinkingConfig'], fromThinkingConfig);
+ }
+ const fromAudioTranscriptionConfig = getValueByPath(fromObject, [
+ 'audioTranscriptionConfig',
+ ]);
+ if (fromAudioTranscriptionConfig != null) {
+ setValueByPath(toObject, ['audioTranscriptionConfig'], fromAudioTranscriptionConfig);
+ }
+ const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
+ if (fromImageConfig != null) {
+ setValueByPath(toObject, ['imageConfig'], imageConfigToMldev$1(fromImageConfig));
+ }
+ const fromEnableEnhancedCivicAnswers = getValueByPath(fromObject, [
+ 'enableEnhancedCivicAnswers',
+ ]);
+ if (fromEnableEnhancedCivicAnswers != null) {
+ setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
+ }
+ if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function generateContentResponseFromMldev$1(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromCandidates = getValueByPath(fromObject, ['candidates']);
+ if (fromCandidates != null) {
+ let transformedList = fromCandidates;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return candidateFromMldev$1(item);
+ });
+ }
+ setValueByPath(toObject, ['candidates'], transformedList);
+ }
+ const fromModelVersion = getValueByPath(fromObject, ['modelVersion']);
+ if (fromModelVersion != null) {
+ setValueByPath(toObject, ['modelVersion'], fromModelVersion);
+ }
+ const fromPromptFeedback = getValueByPath(fromObject, [
+ 'promptFeedback',
+ ]);
+ if (fromPromptFeedback != null) {
+ setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);
+ }
+ const fromResponseId = getValueByPath(fromObject, ['responseId']);
+ if (fromResponseId != null) {
+ setValueByPath(toObject, ['responseId'], fromResponseId);
+ }
+ const fromUsageMetadata = getValueByPath(fromObject, [
+ 'usageMetadata',
+ ]);
+ if (fromUsageMetadata != null) {
+ setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
+ }
+ const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
+ if (fromModelStatus != null) {
+ setValueByPath(toObject, ['modelStatus'], fromModelStatus);
+ }
+ return toObject;
+}
+function getBatchJobParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tBatchJobName(apiClient, fromName));
+ }
+ return toObject;
+}
+function getBatchJobParametersToVertex(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tBatchJobName(apiClient, fromName));
+ }
+ return toObject;
+}
+function googleMapsToMldev$4(fromObject) {
+ const toObject = {};
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
+ if (fromAuthConfig != null) {
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev$4(fromAuthConfig));
+ }
+ const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
+ if (fromEnableWidget != null) {
+ setValueByPath(toObject, ['enableWidget'], fromEnableWidget);
+ }
+ if (getValueByPath(fromObject, ['groundingTypes']) !== undefined) {
+ throw new Error('groundingTypes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function googleSearchToMldev$4(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
+ if (fromSearchTypes != null) {
+ setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
+ }
+ const fromTimeRangeFilter = getValueByPath(fromObject, [
+ 'timeRangeFilter',
+ ]);
+ if (fromTimeRangeFilter != null) {
+ setValueByPath(toObject, ['timeRangeFilter'], fromTimeRangeFilter);
+ }
+ return toObject;
+}
+function imageConfigToMldev$1(fromObject) {
+ const toObject = {};
+ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
+ if (fromAspectRatio != null) {
+ setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
+ }
+ const fromImageSize = getValueByPath(fromObject, ['imageSize']);
+ if (fromImageSize != null) {
+ setValueByPath(toObject, ['imageSize'], fromImageSize);
+ }
+ if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
+ undefined) {
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function inlinedRequestToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['request', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (fromContents != null) {
+ let transformedList = tContents(fromContents);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return contentToMldev$4(item);
+ });
+ }
+ setValueByPath(toObject, ['request', 'contents'], transformedList);
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ setValueByPath(toObject, ['request', 'generationConfig'], generateContentConfigToMldev$1(apiClient, fromConfig, getValueByPath(toObject, ['request'], {})));
+ }
+ return toObject;
+}
+function inlinedResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromResponse = getValueByPath(fromObject, ['response']);
+ if (fromResponse != null) {
+ setValueByPath(toObject, ['response'], generateContentResponseFromMldev$1(fromResponse));
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ return toObject;
+}
+function listBatchJobsConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromPageSize = getValueByPath(fromObject, ['pageSize']);
+ if (parentObject !== undefined && fromPageSize != null) {
+ setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
+ }
+ const fromPageToken = getValueByPath(fromObject, ['pageToken']);
+ if (parentObject !== undefined && fromPageToken != null) {
+ setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
+ }
+ if (getValueByPath(fromObject, ['filter']) !== undefined) {
+ throw new Error('filter parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function listBatchJobsConfigToVertex(fromObject, parentObject) {
+ const toObject = {};
+ const fromPageSize = getValueByPath(fromObject, ['pageSize']);
+ if (parentObject !== undefined && fromPageSize != null) {
+ setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
+ }
+ const fromPageToken = getValueByPath(fromObject, ['pageToken']);
+ if (parentObject !== undefined && fromPageToken != null) {
+ setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
+ }
+ const fromFilter = getValueByPath(fromObject, ['filter']);
+ if (parentObject !== undefined && fromFilter != null) {
+ setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
+ }
+ return toObject;
+}
+function listBatchJobsParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ listBatchJobsConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function listBatchJobsParametersToVertex(fromObject) {
+ const toObject = {};
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ listBatchJobsConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function listBatchJobsResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromNextPageToken = getValueByPath(fromObject, [
+ 'nextPageToken',
+ ]);
+ if (fromNextPageToken != null) {
+ setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);
+ }
+ const fromBatchJobs = getValueByPath(fromObject, ['operations']);
+ if (fromBatchJobs != null) {
+ let transformedList = fromBatchJobs;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return batchJobFromMldev(item);
+ });
+ }
+ setValueByPath(toObject, ['batchJobs'], transformedList);
+ }
+ return toObject;
+}
+function listBatchJobsResponseFromVertex(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromNextPageToken = getValueByPath(fromObject, [
+ 'nextPageToken',
+ ]);
+ if (fromNextPageToken != null) {
+ setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);
+ }
+ const fromBatchJobs = getValueByPath(fromObject, [
+ 'batchPredictionJobs',
+ ]);
+ if (fromBatchJobs != null) {
+ let transformedList = fromBatchJobs;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return batchJobFromVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['batchJobs'], transformedList);
+ }
+ return toObject;
+}
+function partToMldev$4(fromObject) {
+ const toObject = {};
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ const fromToolCall = getValueByPath(fromObject, ['toolCall']);
+ if (fromToolCall != null) {
+ setValueByPath(toObject, ['toolCall'], fromToolCall);
+ }
+ const fromToolResponse = getValueByPath(fromObject, ['toolResponse']);
+ if (fromToolResponse != null) {
+ setValueByPath(toObject, ['toolResponse'], fromToolResponse);
+ }
+ const fromAudioTranscription = getValueByPath(fromObject, [
+ 'audioTranscription',
+ ]);
+ if (fromAudioTranscription != null) {
+ setValueByPath(toObject, ['audioTranscription'], fromAudioTranscription);
+ }
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
+ 'codeExecutionResult',
+ ]);
+ if (fromCodeExecutionResult != null) {
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
+ }
+ const fromExecutableCode = getValueByPath(fromObject, [
+ 'executableCode',
+ ]);
+ if (fromExecutableCode != null) {
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
+ }
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
+ if (fromFileData != null) {
+ setValueByPath(toObject, ['fileData'], fileDataToMldev$4(fromFileData));
+ }
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
+ if (fromFunctionCall != null) {
+ setValueByPath(toObject, ['functionCall'], functionCallToMldev$4(fromFunctionCall));
+ }
+ const fromFunctionResponse = getValueByPath(fromObject, [
+ 'functionResponse',
+ ]);
+ if (fromFunctionResponse != null) {
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
+ }
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
+ if (fromInlineData != null) {
+ setValueByPath(toObject, ['inlineData'], blobToMldev$4(fromInlineData));
+ }
+ const fromText = getValueByPath(fromObject, ['text']);
+ if (fromText != null) {
+ setValueByPath(toObject, ['text'], fromText);
+ }
+ const fromThought = getValueByPath(fromObject, ['thought']);
+ if (fromThought != null) {
+ setValueByPath(toObject, ['thought'], fromThought);
+ }
+ const fromThoughtSignature = getValueByPath(fromObject, [
+ 'thoughtSignature',
+ ]);
+ if (fromThoughtSignature != null) {
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
+ }
+ const fromVideoMetadata = getValueByPath(fromObject, [
+ 'videoMetadata',
+ ]);
+ if (fromVideoMetadata != null) {
+ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
+ }
+ const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
+ if (fromPartMetadata != null) {
+ setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
+ }
+ const fromMediaProcessing = getValueByPath(fromObject, [
+ 'mediaProcessing',
+ ]);
+ if (fromMediaProcessing != null) {
+ setValueByPath(toObject, ['mediaProcessing'], fromMediaProcessing);
+ }
+ return toObject;
+}
+function safetySettingToMldev$3(fromObject) {
+ const toObject = {};
+ const fromCategory = getValueByPath(fromObject, ['category']);
+ if (fromCategory != null) {
+ setValueByPath(toObject, ['category'], fromCategory);
+ }
+ if (getValueByPath(fromObject, ['method']) !== undefined) {
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromThreshold = getValueByPath(fromObject, ['threshold']);
+ if (fromThreshold != null) {
+ setValueByPath(toObject, ['threshold'], fromThreshold);
+ }
+ return toObject;
+}
+function toolConfigToMldev$2(fromObject) {
+ const toObject = {};
+ const fromFunctionCallingConfig = getValueByPath(fromObject, [
+ 'functionCallingConfig',
+ ]);
+ if (fromFunctionCallingConfig != null) {
+ setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToMldev$2(fromFunctionCallingConfig));
+ }
+ const fromRetrievalConfig = getValueByPath(fromObject, [
+ 'retrievalConfig',
+ ]);
+ if (fromRetrievalConfig != null) {
+ setValueByPath(toObject, ['retrievalConfig'], fromRetrievalConfig);
+ }
+ const fromIncludeServerSideToolInvocations = getValueByPath(fromObject, ['includeServerSideToolInvocations']);
+ if (fromIncludeServerSideToolInvocations != null) {
+ setValueByPath(toObject, ['includeServerSideToolInvocations'], fromIncludeServerSideToolInvocations);
+ }
+ return toObject;
+}
+function toolToMldev$4(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
+ if (fromGoogleMaps != null) {
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
+ }
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
+ if (fromMcpServers != null) {
+ let transformedList = fromMcpServers;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['mcpServers'], transformedList);
+ }
+ const fromCodeExecution = getValueByPath(fromObject, [
+ 'codeExecution',
+ ]);
+ if (fromCodeExecution != null) {
+ setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
+ }
+ const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
+ if (fromComputerUse != null) {
+ setValueByPath(toObject, ['computerUse'], fromComputerUse);
+ }
+ if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
+ throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromFunctionDeclarations = getValueByPath(fromObject, [
+ 'functionDeclarations',
+ ]);
+ if (fromFunctionDeclarations != null) {
+ let transformedList = fromFunctionDeclarations;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['functionDeclarations'], transformedList);
+ }
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
+ if (fromGoogleSearch != null) {
+ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$4(fromGoogleSearch));
+ }
+ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
+ 'googleSearchRetrieval',
+ ]);
+ if (fromGoogleSearchRetrieval != null) {
+ setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
+ }
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
+ if (fromUrlContext != null) {
+ setValueByPath(toObject, ['urlContext'], fromUrlContext);
+ }
+ const fromFileSearch = getValueByPath(fromObject, ['fileSearch']);
+ if (fromFileSearch != null) {
+ setValueByPath(toObject, ['fileSearch'], fromFileSearch);
+ }
+ return toObject;
+}
+function vertexMultimodalDatasetDestinationFromVertex(fromObject) {
+ const toObject = {};
+ const fromBigqueryDestination = getValueByPath(fromObject, [
+ 'bigqueryDestination',
+ 'outputUri',
+ ]);
+ if (fromBigqueryDestination != null) {
+ setValueByPath(toObject, ['bigqueryDestination'], fromBigqueryDestination);
+ }
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (fromDisplayName != null) {
+ setValueByPath(toObject, ['displayName'], fromDisplayName);
+ }
+ return toObject;
+}
+function vertexMultimodalDatasetDestinationToVertex(fromObject) {
+ const toObject = {};
+ const fromBigqueryDestination = getValueByPath(fromObject, [
+ 'bigqueryDestination',
+ ]);
+ if (fromBigqueryDestination != null) {
+ setValueByPath(toObject, ['bigqueryDestination', 'outputUri'], fromBigqueryDestination);
+ }
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (fromDisplayName != null) {
+ setValueByPath(toObject, ['displayName'], fromDisplayName);
+ }
+ return toObject;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+var PagedItem;
+(function (PagedItem) {
+ PagedItem["PAGED_ITEM_BATCH_JOBS"] = "batchJobs";
+ PagedItem["PAGED_ITEM_MODELS"] = "models";
+ PagedItem["PAGED_ITEM_TUNING_JOBS"] = "tuningJobs";
+ PagedItem["PAGED_ITEM_FILES"] = "files";
+ PagedItem["PAGED_ITEM_CACHED_CONTENTS"] = "cachedContents";
+ PagedItem["PAGED_ITEM_FILE_SEARCH_STORES"] = "fileSearchStores";
+ PagedItem["PAGED_ITEM_DOCUMENTS"] = "documents";
+ PagedItem["PAGED_ITEM_SKILLS"] = "skills";
+})(PagedItem || (PagedItem = {}));
+/**
+ * Pager class for iterating through paginated results.
+ */
+class Pager {
+ constructor(name, request, response, params) {
+ this.pageInternal = [];
+ this.paramsInternal = {};
+ this.requestInternal = request;
+ this.init(name, response, params);
+ }
+ init(name, response, params) {
+ var _a, _b;
+ this.nameInternal = name;
+ this.pageInternal = response[this.nameInternal] || [];
+ this.sdkHttpResponseInternal = response === null || response === void 0 ? void 0 : response.sdkHttpResponse;
+ this.idxInternal = 0;
+ let requestParams = { config: {} };
+ if (!params || Object.keys(params).length === 0) {
+ requestParams = { config: {} };
+ }
+ else if (typeof params === 'object') {
+ requestParams = Object.assign({}, params);
+ }
+ else {
+ requestParams = params;
+ }
+ if (requestParams['config']) {
+ requestParams['config']['pageToken'] = response['nextPageToken'];
+ }
+ this.paramsInternal = requestParams;
+ this.pageInternalSize =
+ (_b = (_a = requestParams['config']) === null || _a === void 0 ? void 0 : _a['pageSize']) !== null && _b !== void 0 ? _b : this.pageInternal.length;
+ }
+ initNextPage(response) {
+ this.init(this.nameInternal, response, this.paramsInternal);
+ }
+ /**
+ * Returns the current page, which is a list of items.
+ *
+ * @remarks
+ * The first page is retrieved when the pager is created. The returned list of
+ * items could be a subset of the entire list.
+ */
+ get page() {
+ return this.pageInternal;
+ }
+ /**
+ * Returns the type of paged item (for example, ``batch_jobs``).
+ */
+ get name() {
+ return this.nameInternal;
+ }
+ /**
+ * Returns the length of the page fetched each time by this pager.
+ *
+ * @remarks
+ * The number of items in the page is less than or equal to the page length.
+ */
+ get pageSize() {
+ return this.pageInternalSize;
+ }
+ /**
+ * Returns the headers of the API response.
+ */
+ get sdkHttpResponse() {
+ return this.sdkHttpResponseInternal;
+ }
+ /**
+ * Returns the parameters when making the API request for the next page.
+ *
+ * @remarks
+ * Parameters contain a set of optional configs that can be
+ * used to customize the API request. For example, the `pageToken` parameter
+ * contains the token to request the next page.
+ */
+ get params() {
+ return this.paramsInternal;
+ }
+ /**
+ * Returns the total number of items in the current page.
+ */
+ get pageLength() {
+ return this.pageInternal.length;
+ }
+ /**
+ * Returns the item at the given index.
+ */
+ getItem(index) {
+ return this.pageInternal[index];
+ }
+ /**
+ * Returns an async iterator that support iterating through all items
+ * retrieved from the API.
+ *
+ * @remarks
+ * The iterator will automatically fetch the next page if there are more items
+ * to fetch from the API.
+ *
+ * @example
+ *
+ * ```ts
+ * const pager = await ai.files.list({config: {pageSize: 10}});
+ * for await (const file of pager) {
+ * console.log(file.name);
+ * }
+ * ```
+ */
+ [Symbol.asyncIterator]() {
+ return {
+ next: async () => {
+ if (this.idxInternal >= this.pageLength) {
+ if (this.hasNextPage()) {
+ await this.nextPage();
+ }
+ else {
+ return { value: undefined, done: true };
+ }
+ }
+ const item = this.getItem(this.idxInternal);
+ this.idxInternal += 1;
+ return { value: item, done: false };
+ },
+ return: async () => {
+ return { value: undefined, done: true };
+ },
+ };
+ }
+ /**
+ * Fetches the next page of items. This makes a new API request.
+ *
+ * @throws {Error} If there are no more pages to fetch.
+ *
+ * @example
+ *
+ * ```ts
+ * const pager = await ai.files.list({config: {pageSize: 10}});
+ * let page = pager.page;
+ * while (true) {
+ * for (const file of page) {
+ * console.log(file.name);
+ * }
+ * if (!pager.hasNextPage()) {
+ * break;
+ * }
+ * page = await pager.nextPage();
+ * }
+ * ```
+ */
+ async nextPage() {
+ if (!this.hasNextPage()) {
+ throw new Error('No more pages to fetch.');
+ }
+ const response = await this.requestInternal(this.params);
+ this.initNextPage(response);
+ return this.page;
+ }
+ /**
+ * Returns true if there are more pages to fetch from the API.
+ */
+ hasNextPage() {
+ var _a;
+ if (((_a = this.params['config']) === null || _a === void 0 ? void 0 : _a['pageToken']) !== undefined) {
+ return true;
+ }
+ return false;
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class Batches extends BaseModule {
+ constructor(apiClient) {
+ super();
+ this.apiClient = apiClient;
+ /**
+ * Lists batch jobs.
+ *
+ * @param params - The parameters for the list request.
+ * @return - A pager of batch jobs.
+ *
+ * @example
+ * ```ts
+ * const batchJobs = await ai.batches.list({config: {'pageSize': 2}});
+ * for await (const batchJob of batchJobs) {
+ * console.log(batchJob);
+ * }
+ * ```
+ */
+ this.list = async (params = {}) => {
+ return new Pager(PagedItem.PAGED_ITEM_BATCH_JOBS, (x) => this.listInternal(x), await this.listInternal(params), params);
+ };
+ /**
+ * Create batch job.
+ *
+ * @param params - The parameters for create batch job request.
+ * @return The created batch job.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.batches.create({
+ * model: 'gemini-2.0-flash',
+ * src: {gcsUri: 'gs://bucket/path/to/file.jsonl', format: 'jsonl'},
+ * config: {
+ * dest: {gcsUri: 'gs://bucket/path/output/directory', format: 'jsonl'},
+ * }
+ * });
+ * console.log(response);
+ * ```
+ */
+ this.create = async (params) => {
+ if (this.apiClient.isVertexAI()) {
+ // Format destination if not provided
+ // Cast params.src as Vertex AI path does not handle InlinedRequest[]
+ params.config = this.formatDestination(params.src, params.config);
+ }
+ return this.createInternal(params);
+ };
+ /**
+ * **Experimental** Creates an embedding batch job.
+ *
+ * @param params - The parameters for create embedding batch job request.
+ * @return The created batch job.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.batches.createEmbeddings({
+ * model: 'text-embedding-004',
+ * src: {fileName: 'files/my_embedding_input'},
+ * });
+ * console.log(response);
+ * ```
+ */
+ this.createEmbeddings = async (params) => {
+ console.warn('batches.createEmbeddings() is experimental and may change without notice.');
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('Gemini Enterprise Agent Platform (previously known as Vertex AI) does not support batches.createEmbeddings.');
+ }
+ return this.createEmbeddingsInternal(params);
+ };
+ }
+ // Helper function to handle inlined generate content requests
+ createInlinedGenerateContentRequest(params) {
+ const body = createBatchJobParametersToMldev(this.apiClient, // Use instance apiClient
+ params);
+ const urlParams = body['_url'];
+ const path = formatMap('{model}:batchGenerateContent', urlParams);
+ const batch = body['batch'];
+ const inputConfig = batch['inputConfig'];
+ const requestsWrapper = inputConfig['requests'];
+ const requests = requestsWrapper['requests'];
+ const newRequests = [];
+ for (const request of requests) {
+ const requestDict = Object.assign({}, request); // Clone
+ if (requestDict['systemInstruction']) {
+ const systemInstructionValue = requestDict['systemInstruction'];
+ delete requestDict['systemInstruction'];
+ const requestContent = requestDict['request'];
+ requestContent['systemInstruction'] = systemInstructionValue;
+ requestDict['request'] = requestContent;
+ }
+ newRequests.push(requestDict);
+ }
+ requestsWrapper['requests'] = newRequests;
+ delete body['config'];
+ delete body['_url'];
+ delete body['_query'];
+ return { path, body };
+ }
+ // Helper function to get the first GCS URI
+ getGcsUri(src) {
+ if (typeof src === 'string') {
+ return src.startsWith('gs://') ? src : undefined;
+ }
+ if (!Array.isArray(src) && src.gcsUri && src.gcsUri.length > 0) {
+ return src.gcsUri[0];
+ }
+ return undefined;
+ }
+ // Helper function to get the BigQuery URI
+ getBigqueryUri(src) {
+ if (typeof src === 'string') {
+ return src.startsWith('bq://') ? src : undefined;
+ }
+ if (!Array.isArray(src)) {
+ return src.bigqueryUri;
+ }
+ return undefined;
+ }
+ // Function to format the destination configuration for Vertex AI
+ formatDestination(src, config) {
+ const newConfig = config ? Object.assign({}, config) : {};
+ const timestampStr = Date.now().toString();
+ if (!newConfig.displayName) {
+ newConfig.displayName = `genaiBatchJob_${timestampStr}`;
+ }
+ if (newConfig.dest === undefined) {
+ const gcsUri = this.getGcsUri(src);
+ const bigqueryUri = this.getBigqueryUri(src);
+ if (gcsUri) {
+ if (gcsUri.endsWith('.jsonl')) {
+ // For .jsonl files, remove suffix and add /dest
+ newConfig.dest = `${gcsUri.slice(0, -6)}/dest`;
+ }
+ else {
+ // Fallback for other GCS URIs
+ newConfig.dest = `${gcsUri}_dest_${timestampStr}`;
+ }
+ }
+ else if (bigqueryUri) {
+ newConfig.dest = `${bigqueryUri}_dest_${timestampStr}`;
+ }
+ else {
+ throw new Error('Unsupported source for Gemini Enterprise Agent Platform (previously known as Vertex AI): No GCS or BigQuery URI found.');
+ }
+ }
+ return newConfig;
+ }
+ /**
+ * Internal method to create batch job.
+ *
+ * @param params - The parameters for create batch job request.
+ * @return The created batch job.
+ *
+ */
+ async createInternal(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = createBatchJobParametersToVertex(this.apiClient, params);
+ path = formatMap('batchPredictionJobs', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = batchJobFromVertex(apiResponse);
+ return resp;
+ });
+ }
+ else {
+ const body = createBatchJobParametersToMldev(this.apiClient, params);
+ path = formatMap('{model}:batchGenerateContent', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = batchJobFromMldev(apiResponse);
+ return resp;
+ });
+ }
+ }
+ /**
+ * Internal method to create batch job.
+ *
+ * @param params - The parameters for create batch job request.
+ * @return The created batch job.
+ *
+ */
+ async createEmbeddingsInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = createEmbeddingsBatchJobParametersToMldev(this.apiClient, params);
+ path = formatMap('{model}:asyncBatchEmbedContent', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = batchJobFromMldev(apiResponse);
+ return resp;
+ });
+ }
+ }
+ /**
+ * Gets batch job configurations.
+ *
+ * @param params - The parameters for the get request.
+ * @return The batch job.
+ *
+ * @example
+ * ```ts
+ * await ai.batches.get({name: '...'}); // The server-generated resource name.
+ * ```
+ */
+ async get(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = getBatchJobParametersToVertex(this.apiClient, params);
+ path = formatMap('batchPredictionJobs/{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = batchJobFromVertex(apiResponse);
+ return resp;
+ });
+ }
+ else {
+ const body = getBatchJobParametersToMldev(this.apiClient, params);
+ path = formatMap('batches/{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = batchJobFromMldev(apiResponse);
+ return resp;
+ });
+ }
+ }
+ /**
+ * Cancels a batch job.
+ *
+ * @param params - The parameters for the cancel request.
+ * @return The empty response returned by the API.
+ *
+ * @example
+ * ```ts
+ * await ai.batches.cancel({name: '...'}); // The server-generated resource name.
+ * ```
+ */
+ async cancel(params) {
+ var _a, _b, _c, _d;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = cancelBatchJobParametersToVertex(this.apiClient, params);
+ path = formatMap('batchPredictionJobs/{name}:cancel', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ await this.apiClient.request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ });
+ }
+ else {
+ const body = cancelBatchJobParametersToMldev(this.apiClient, params);
+ path = formatMap('batches/{name}:cancel', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ await this.apiClient.request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ });
+ }
+ }
+ async listInternal(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = listBatchJobsParametersToVertex(params);
+ path = formatMap('batchPredictionJobs', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = listBatchJobsResponseFromVertex(apiResponse);
+ const typedResp = new ListBatchJobsResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ const body = listBatchJobsParametersToMldev(params);
+ path = formatMap('batches', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = listBatchJobsResponseFromMldev(apiResponse);
+ const typedResp = new ListBatchJobsResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ /**
+ * Deletes a batch job.
+ *
+ * @param params - The parameters for the delete request.
+ * @return The empty response returned by the API.
+ *
+ * @example
+ * ```ts
+ * await ai.batches.delete({name: '...'}); // The server-generated resource name.
+ * ```
+ */
+ async delete(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = deleteBatchJobParametersToVertex(this.apiClient, params);
+ path = formatMap('batchPredictionJobs/{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'DELETE',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = deleteResourceJobFromVertex(apiResponse);
+ return resp;
+ });
+ }
+ else {
+ const body = deleteBatchJobParametersToMldev(this.apiClient, params);
+ path = formatMap('batches/{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'DELETE',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = deleteResourceJobFromMldev(apiResponse);
+ return resp;
+ });
+ }
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+function authConfigToMldev$3(fromObject) {
+ const toObject = {};
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
+ if (fromApiKey != null) {
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
+ }
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
+ undefined) {
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function blobToMldev$3(fromObject) {
+ const toObject = {};
+ const fromData = getValueByPath(fromObject, ['data']);
+ if (fromData != null) {
+ setValueByPath(toObject, ['data'], fromData);
+ }
+ if (getValueByPath(fromObject, ['displayName']) !== undefined) {
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function computerUseToVertex$2(fromObject) {
+ const toObject = {};
+ const fromEnablePromptInjectionDetection = getValueByPath(fromObject, [
+ 'enablePromptInjectionDetection',
+ ]);
+ if (fromEnablePromptInjectionDetection != null) {
+ setValueByPath(toObject, ['enablePromptInjectionDetection'], fromEnablePromptInjectionDetection);
+ }
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
+ if (fromEnvironment != null) {
+ setValueByPath(toObject, ['environment'], fromEnvironment);
+ }
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
+ 'excludedPredefinedFunctions',
+ ]);
+ if (fromExcludedPredefinedFunctions != null) {
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
+ }
+ if (getValueByPath(fromObject, ['disabledSafetyPolicies']) !== undefined) {
+ throw new Error('disabledSafetyPolicies parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function contentToMldev$3(fromObject) {
+ const toObject = {};
+ const fromParts = getValueByPath(fromObject, ['parts']);
+ if (fromParts != null) {
+ let transformedList = fromParts;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return partToMldev$3(item);
+ });
+ }
+ setValueByPath(toObject, ['parts'], transformedList);
+ }
+ const fromRole = getValueByPath(fromObject, ['role']);
+ if (fromRole != null) {
+ setValueByPath(toObject, ['role'], fromRole);
+ }
+ return toObject;
+}
+function contentToVertex$3(fromObject) {
+ const toObject = {};
+ const fromParts = getValueByPath(fromObject, ['parts']);
+ if (fromParts != null) {
+ let transformedList = fromParts;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return partToVertex$3(item);
+ });
+ }
+ setValueByPath(toObject, ['parts'], transformedList);
+ }
+ const fromRole = getValueByPath(fromObject, ['role']);
+ if (fromRole != null) {
+ setValueByPath(toObject, ['role'], fromRole);
+ }
+ return toObject;
+}
+function createCachedContentConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromTtl = getValueByPath(fromObject, ['ttl']);
+ if (parentObject !== undefined && fromTtl != null) {
+ setValueByPath(parentObject, ['ttl'], fromTtl);
+ }
+ const fromExpireTime = getValueByPath(fromObject, ['expireTime']);
+ if (parentObject !== undefined && fromExpireTime != null) {
+ setValueByPath(parentObject, ['expireTime'], fromExpireTime);
+ }
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (parentObject !== undefined && fromDisplayName != null) {
+ setValueByPath(parentObject, ['displayName'], fromDisplayName);
+ }
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (parentObject !== undefined && fromContents != null) {
+ let transformedList = tContents(fromContents);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return contentToMldev$3(item);
+ });
+ }
+ setValueByPath(parentObject, ['contents'], transformedList);
+ }
+ const fromSystemInstruction = getValueByPath(fromObject, [
+ 'systemInstruction',
+ ]);
+ if (parentObject !== undefined && fromSystemInstruction != null) {
+ setValueByPath(parentObject, ['systemInstruction'], contentToMldev$3(tContent(fromSystemInstruction)));
+ }
+ const fromTools = getValueByPath(fromObject, ['tools']);
+ if (parentObject !== undefined && fromTools != null) {
+ let transformedList = fromTools;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return toolToMldev$3(item);
+ });
+ }
+ setValueByPath(parentObject, ['tools'], transformedList);
+ }
+ const fromToolConfig = getValueByPath(fromObject, ['toolConfig']);
+ if (parentObject !== undefined && fromToolConfig != null) {
+ setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$1(fromToolConfig));
+ }
+ if (getValueByPath(fromObject, ['kmsKeyName']) !== undefined) {
+ throw new Error('kmsKeyName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function createCachedContentConfigToVertex(fromObject, parentObject) {
+ const toObject = {};
+ const fromTtl = getValueByPath(fromObject, ['ttl']);
+ if (parentObject !== undefined && fromTtl != null) {
+ setValueByPath(parentObject, ['ttl'], fromTtl);
+ }
+ const fromExpireTime = getValueByPath(fromObject, ['expireTime']);
+ if (parentObject !== undefined && fromExpireTime != null) {
+ setValueByPath(parentObject, ['expireTime'], fromExpireTime);
+ }
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (parentObject !== undefined && fromDisplayName != null) {
+ setValueByPath(parentObject, ['displayName'], fromDisplayName);
+ }
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (parentObject !== undefined && fromContents != null) {
+ let transformedList = tContents(fromContents);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return contentToVertex$3(item);
+ });
+ }
+ setValueByPath(parentObject, ['contents'], transformedList);
+ }
+ const fromSystemInstruction = getValueByPath(fromObject, [
+ 'systemInstruction',
+ ]);
+ if (parentObject !== undefined && fromSystemInstruction != null) {
+ setValueByPath(parentObject, ['systemInstruction'], contentToVertex$3(tContent(fromSystemInstruction)));
+ }
+ const fromTools = getValueByPath(fromObject, ['tools']);
+ if (parentObject !== undefined && fromTools != null) {
+ let transformedList = fromTools;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return toolToVertex$2(item);
+ });
+ }
+ setValueByPath(parentObject, ['tools'], transformedList);
+ }
+ const fromToolConfig = getValueByPath(fromObject, ['toolConfig']);
+ if (parentObject !== undefined && fromToolConfig != null) {
+ setValueByPath(parentObject, ['toolConfig'], toolConfigToVertex$1(fromToolConfig));
+ }
+ const fromKmsKeyName = getValueByPath(fromObject, ['kmsKeyName']);
+ if (parentObject !== undefined && fromKmsKeyName != null) {
+ setValueByPath(parentObject, ['encryption_spec', 'kmsKeyName'], fromKmsKeyName);
+ }
+ return toObject;
+}
+function createCachedContentParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['model'], tCachesModel(apiClient, fromModel));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ createCachedContentConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function createCachedContentParametersToVertex(apiClient, fromObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['model'], tCachesModel(apiClient, fromModel));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ createCachedContentConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function deleteCachedContentParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tCachedContentName(apiClient, fromName));
+ }
+ return toObject;
+}
+function deleteCachedContentParametersToVertex(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tCachedContentName(apiClient, fromName));
+ }
+ return toObject;
+}
+function deleteCachedContentResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ return toObject;
+}
+function deleteCachedContentResponseFromVertex(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ return toObject;
+}
+function fileDataToMldev$3(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['displayName']) !== undefined) {
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromFileUri = getValueByPath(fromObject, ['fileUri']);
+ if (fromFileUri != null) {
+ setValueByPath(toObject, ['fileUri'], fromFileUri);
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function functionCallToMldev$3(fromObject) {
+ const toObject = {};
+ const fromArgs = getValueByPath(fromObject, ['args']);
+ if (fromArgs != null) {
+ setValueByPath(toObject, ['args'], fromArgs);
+ }
+ const fromId = getValueByPath(fromObject, ['id']);
+ if (fromId != null) {
+ setValueByPath(toObject, ['id'], fromId);
+ }
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function functionCallingConfigToMldev$1(fromObject) {
+ const toObject = {};
+ const fromAllowedFunctionNames = getValueByPath(fromObject, [
+ 'allowedFunctionNames',
+ ]);
+ if (fromAllowedFunctionNames != null) {
+ setValueByPath(toObject, ['allowedFunctionNames'], fromAllowedFunctionNames);
+ }
+ const fromMode = getValueByPath(fromObject, ['mode']);
+ if (fromMode != null) {
+ setValueByPath(toObject, ['mode'], fromMode);
+ }
+ if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
+ undefined) {
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function getCachedContentParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tCachedContentName(apiClient, fromName));
+ }
+ return toObject;
+}
+function getCachedContentParametersToVertex(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tCachedContentName(apiClient, fromName));
+ }
+ return toObject;
+}
+function googleMapsToMldev$3(fromObject) {
+ const toObject = {};
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
+ if (fromAuthConfig != null) {
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev$3(fromAuthConfig));
+ }
+ const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
+ if (fromEnableWidget != null) {
+ setValueByPath(toObject, ['enableWidget'], fromEnableWidget);
+ }
+ if (getValueByPath(fromObject, ['groundingTypes']) !== undefined) {
+ throw new Error('groundingTypes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function googleSearchToMldev$3(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
+ if (fromSearchTypes != null) {
+ setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
+ }
+ const fromTimeRangeFilter = getValueByPath(fromObject, [
+ 'timeRangeFilter',
+ ]);
+ if (fromTimeRangeFilter != null) {
+ setValueByPath(toObject, ['timeRangeFilter'], fromTimeRangeFilter);
+ }
+ return toObject;
+}
+function listCachedContentsConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromPageSize = getValueByPath(fromObject, ['pageSize']);
+ if (parentObject !== undefined && fromPageSize != null) {
+ setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
+ }
+ const fromPageToken = getValueByPath(fromObject, ['pageToken']);
+ if (parentObject !== undefined && fromPageToken != null) {
+ setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
+ }
+ return toObject;
+}
+function listCachedContentsConfigToVertex(fromObject, parentObject) {
+ const toObject = {};
+ const fromPageSize = getValueByPath(fromObject, ['pageSize']);
+ if (parentObject !== undefined && fromPageSize != null) {
+ setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
+ }
+ const fromPageToken = getValueByPath(fromObject, ['pageToken']);
+ if (parentObject !== undefined && fromPageToken != null) {
+ setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
+ }
+ return toObject;
+}
+function listCachedContentsParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ listCachedContentsConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function listCachedContentsParametersToVertex(fromObject) {
+ const toObject = {};
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ listCachedContentsConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function listCachedContentsResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromNextPageToken = getValueByPath(fromObject, [
+ 'nextPageToken',
+ ]);
+ if (fromNextPageToken != null) {
+ setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);
+ }
+ const fromCachedContents = getValueByPath(fromObject, [
+ 'cachedContents',
+ ]);
+ if (fromCachedContents != null) {
+ let transformedList = fromCachedContents;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['cachedContents'], transformedList);
+ }
+ return toObject;
+}
+function listCachedContentsResponseFromVertex(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromNextPageToken = getValueByPath(fromObject, [
+ 'nextPageToken',
+ ]);
+ if (fromNextPageToken != null) {
+ setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);
+ }
+ const fromCachedContents = getValueByPath(fromObject, [
+ 'cachedContents',
+ ]);
+ if (fromCachedContents != null) {
+ let transformedList = fromCachedContents;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['cachedContents'], transformedList);
+ }
+ return toObject;
+}
+function mcpServerToVertex$2(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['name']) !== undefined) {
+ throw new Error('name parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['streamableHttpTransport']) !== undefined) {
+ throw new Error('streamableHttpTransport parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function partToMldev$3(fromObject) {
+ const toObject = {};
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ const fromToolCall = getValueByPath(fromObject, ['toolCall']);
+ if (fromToolCall != null) {
+ setValueByPath(toObject, ['toolCall'], fromToolCall);
+ }
+ const fromToolResponse = getValueByPath(fromObject, ['toolResponse']);
+ if (fromToolResponse != null) {
+ setValueByPath(toObject, ['toolResponse'], fromToolResponse);
+ }
+ const fromAudioTranscription = getValueByPath(fromObject, [
+ 'audioTranscription',
+ ]);
+ if (fromAudioTranscription != null) {
+ setValueByPath(toObject, ['audioTranscription'], fromAudioTranscription);
+ }
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
+ 'codeExecutionResult',
+ ]);
+ if (fromCodeExecutionResult != null) {
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
+ }
+ const fromExecutableCode = getValueByPath(fromObject, [
+ 'executableCode',
+ ]);
+ if (fromExecutableCode != null) {
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
+ }
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
+ if (fromFileData != null) {
+ setValueByPath(toObject, ['fileData'], fileDataToMldev$3(fromFileData));
+ }
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
+ if (fromFunctionCall != null) {
+ setValueByPath(toObject, ['functionCall'], functionCallToMldev$3(fromFunctionCall));
+ }
+ const fromFunctionResponse = getValueByPath(fromObject, [
+ 'functionResponse',
+ ]);
+ if (fromFunctionResponse != null) {
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
+ }
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
+ if (fromInlineData != null) {
+ setValueByPath(toObject, ['inlineData'], blobToMldev$3(fromInlineData));
+ }
+ const fromText = getValueByPath(fromObject, ['text']);
+ if (fromText != null) {
+ setValueByPath(toObject, ['text'], fromText);
+ }
+ const fromThought = getValueByPath(fromObject, ['thought']);
+ if (fromThought != null) {
+ setValueByPath(toObject, ['thought'], fromThought);
+ }
+ const fromThoughtSignature = getValueByPath(fromObject, [
+ 'thoughtSignature',
+ ]);
+ if (fromThoughtSignature != null) {
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
+ }
+ const fromVideoMetadata = getValueByPath(fromObject, [
+ 'videoMetadata',
+ ]);
+ if (fromVideoMetadata != null) {
+ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
+ }
+ const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
+ if (fromPartMetadata != null) {
+ setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
+ }
+ const fromMediaProcessing = getValueByPath(fromObject, [
+ 'mediaProcessing',
+ ]);
+ if (fromMediaProcessing != null) {
+ setValueByPath(toObject, ['mediaProcessing'], fromMediaProcessing);
+ }
+ return toObject;
+}
+function partToVertex$3(fromObject) {
+ const toObject = {};
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ const fromAudioTranscription = getValueByPath(fromObject, [
+ 'audioTranscription',
+ ]);
+ if (fromAudioTranscription != null) {
+ setValueByPath(toObject, ['audioTranscription'], fromAudioTranscription);
+ }
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
+ 'codeExecutionResult',
+ ]);
+ if (fromCodeExecutionResult != null) {
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
+ }
+ const fromExecutableCode = getValueByPath(fromObject, [
+ 'executableCode',
+ ]);
+ if (fromExecutableCode != null) {
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
+ }
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
+ if (fromFileData != null) {
+ setValueByPath(toObject, ['fileData'], fromFileData);
+ }
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
+ if (fromFunctionCall != null) {
+ setValueByPath(toObject, ['functionCall'], fromFunctionCall);
+ }
+ const fromFunctionResponse = getValueByPath(fromObject, [
+ 'functionResponse',
+ ]);
+ if (fromFunctionResponse != null) {
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
+ }
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
+ if (fromInlineData != null) {
+ setValueByPath(toObject, ['inlineData'], fromInlineData);
+ }
+ const fromText = getValueByPath(fromObject, ['text']);
+ if (fromText != null) {
+ setValueByPath(toObject, ['text'], fromText);
+ }
+ const fromThought = getValueByPath(fromObject, ['thought']);
+ if (fromThought != null) {
+ setValueByPath(toObject, ['thought'], fromThought);
+ }
+ const fromThoughtSignature = getValueByPath(fromObject, [
+ 'thoughtSignature',
+ ]);
+ if (fromThoughtSignature != null) {
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
+ }
+ const fromVideoMetadata = getValueByPath(fromObject, [
+ 'videoMetadata',
+ ]);
+ if (fromVideoMetadata != null) {
+ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
+ }
+ if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ const fromMediaProcessing = getValueByPath(fromObject, [
+ 'mediaProcessing',
+ ]);
+ if (fromMediaProcessing != null) {
+ setValueByPath(toObject, ['mediaProcessing'], fromMediaProcessing);
+ }
+ return toObject;
+}
+function toolConfigToMldev$1(fromObject) {
+ const toObject = {};
+ const fromFunctionCallingConfig = getValueByPath(fromObject, [
+ 'functionCallingConfig',
+ ]);
+ if (fromFunctionCallingConfig != null) {
+ setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToMldev$1(fromFunctionCallingConfig));
+ }
+ const fromRetrievalConfig = getValueByPath(fromObject, [
+ 'retrievalConfig',
+ ]);
+ if (fromRetrievalConfig != null) {
+ setValueByPath(toObject, ['retrievalConfig'], fromRetrievalConfig);
+ }
+ const fromIncludeServerSideToolInvocations = getValueByPath(fromObject, ['includeServerSideToolInvocations']);
+ if (fromIncludeServerSideToolInvocations != null) {
+ setValueByPath(toObject, ['includeServerSideToolInvocations'], fromIncludeServerSideToolInvocations);
+ }
+ return toObject;
+}
+function toolConfigToVertex$1(fromObject) {
+ const toObject = {};
+ const fromFunctionCallingConfig = getValueByPath(fromObject, [
+ 'functionCallingConfig',
+ ]);
+ if (fromFunctionCallingConfig != null) {
+ setValueByPath(toObject, ['functionCallingConfig'], fromFunctionCallingConfig);
+ }
+ const fromRetrievalConfig = getValueByPath(fromObject, [
+ 'retrievalConfig',
+ ]);
+ if (fromRetrievalConfig != null) {
+ setValueByPath(toObject, ['retrievalConfig'], fromRetrievalConfig);
+ }
+ if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
+ undefined) {
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function toolToMldev$3(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
+ if (fromGoogleMaps != null) {
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
+ }
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
+ if (fromMcpServers != null) {
+ let transformedList = fromMcpServers;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['mcpServers'], transformedList);
+ }
+ const fromCodeExecution = getValueByPath(fromObject, [
+ 'codeExecution',
+ ]);
+ if (fromCodeExecution != null) {
+ setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
+ }
+ const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
+ if (fromComputerUse != null) {
+ setValueByPath(toObject, ['computerUse'], fromComputerUse);
+ }
+ if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
+ throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromFunctionDeclarations = getValueByPath(fromObject, [
+ 'functionDeclarations',
+ ]);
+ if (fromFunctionDeclarations != null) {
+ let transformedList = fromFunctionDeclarations;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['functionDeclarations'], transformedList);
+ }
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
+ if (fromGoogleSearch != null) {
+ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$3(fromGoogleSearch));
+ }
+ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
+ 'googleSearchRetrieval',
+ ]);
+ if (fromGoogleSearchRetrieval != null) {
+ setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
+ }
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
+ if (fromUrlContext != null) {
+ setValueByPath(toObject, ['urlContext'], fromUrlContext);
+ }
+ const fromFileSearch = getValueByPath(fromObject, ['fileSearch']);
+ if (fromFileSearch != null) {
+ setValueByPath(toObject, ['fileSearch'], fromFileSearch);
+ }
+ return toObject;
+}
+function toolToVertex$2(fromObject) {
+ const toObject = {};
+ const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
+ if (fromRetrieval != null) {
+ setValueByPath(toObject, ['retrieval'], fromRetrieval);
+ }
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
+ if (fromGoogleMaps != null) {
+ setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
+ }
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
+ if (fromMcpServers != null) {
+ let transformedList = fromMcpServers;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return mcpServerToVertex$2(item);
+ });
+ }
+ setValueByPath(toObject, ['mcpServers'], transformedList);
+ }
+ const fromCodeExecution = getValueByPath(fromObject, [
+ 'codeExecution',
+ ]);
+ if (fromCodeExecution != null) {
+ setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
+ }
+ const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
+ if (fromComputerUse != null) {
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex$2(fromComputerUse));
+ }
+ const fromEnterpriseWebSearch = getValueByPath(fromObject, [
+ 'enterpriseWebSearch',
+ ]);
+ if (fromEnterpriseWebSearch != null) {
+ setValueByPath(toObject, ['enterpriseWebSearch'], fromEnterpriseWebSearch);
+ }
+ const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
+ if (fromExaAiSearch != null) {
+ setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
+ }
+ const fromFunctionDeclarations = getValueByPath(fromObject, [
+ 'functionDeclarations',
+ ]);
+ if (fromFunctionDeclarations != null) {
+ let transformedList = fromFunctionDeclarations;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['functionDeclarations'], transformedList);
+ }
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
+ if (fromGoogleSearch != null) {
+ setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
+ }
+ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
+ 'googleSearchRetrieval',
+ ]);
+ if (fromGoogleSearchRetrieval != null) {
+ setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
+ }
+ const fromParallelAiSearch = getValueByPath(fromObject, [
+ 'parallelAiSearch',
+ ]);
+ if (fromParallelAiSearch != null) {
+ setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
+ }
+ const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
+ if (fromUrlContext != null) {
+ setValueByPath(toObject, ['urlContext'], fromUrlContext);
+ }
+ if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function updateCachedContentConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromTtl = getValueByPath(fromObject, ['ttl']);
+ if (parentObject !== undefined && fromTtl != null) {
+ setValueByPath(parentObject, ['ttl'], fromTtl);
+ }
+ const fromExpireTime = getValueByPath(fromObject, ['expireTime']);
+ if (parentObject !== undefined && fromExpireTime != null) {
+ setValueByPath(parentObject, ['expireTime'], fromExpireTime);
+ }
+ return toObject;
+}
+function updateCachedContentConfigToVertex(fromObject, parentObject) {
+ const toObject = {};
+ const fromTtl = getValueByPath(fromObject, ['ttl']);
+ if (parentObject !== undefined && fromTtl != null) {
+ setValueByPath(parentObject, ['ttl'], fromTtl);
+ }
+ const fromExpireTime = getValueByPath(fromObject, ['expireTime']);
+ if (parentObject !== undefined && fromExpireTime != null) {
+ setValueByPath(parentObject, ['expireTime'], fromExpireTime);
+ }
+ return toObject;
+}
+function updateCachedContentParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tCachedContentName(apiClient, fromName));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ updateCachedContentConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function updateCachedContentParametersToVertex(apiClient, fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], tCachedContentName(apiClient, fromName));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ updateCachedContentConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class Caches extends BaseModule {
+ constructor(apiClient) {
+ super();
+ this.apiClient = apiClient;
+ /**
+ * Lists cached contents.
+ *
+ * @param params - The parameters for the list request.
+ * @return - A pager of cached contents.
+ *
+ * @example
+ * ```ts
+ * const cachedContents = await ai.caches.list({config: {'pageSize': 2}});
+ * for await (const cachedContent of cachedContents) {
+ * console.log(cachedContent);
+ * }
+ * ```
+ */
+ this.list = async (params = {}) => {
+ return new Pager(PagedItem.PAGED_ITEM_CACHED_CONTENTS, (x) => this.listInternal(x), await this.listInternal(params), params);
+ };
+ }
+ /**
+ * Creates a cached contents resource.
+ *
+ * @remarks
+ * Context caching is only supported for specific models. See [Gemini
+ * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac)
+ * and [Gemini Enterprise Agent Platform reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models)
+ * for more information.
+ *
+ * @param params - The parameters for the create request.
+ * @return The created cached content.
+ *
+ * @example
+ * ```ts
+ * const contents = ...; // Initialize the content to cache.
+ * const response = await ai.caches.create({
+ * model: 'gemini-2.0-flash-001',
+ * config: {
+ * 'contents': contents,
+ * 'displayName': 'test cache',
+ * 'systemInstruction': 'What is the sum of the two pdfs?',
+ * 'ttl': '86400s',
+ * }
+ * });
+ * ```
+ */
+ async create(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = createCachedContentParametersToVertex(this.apiClient, params);
+ path = formatMap('cachedContents', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((resp) => {
+ return resp;
+ });
+ }
+ else {
+ const body = createCachedContentParametersToMldev(this.apiClient, params);
+ path = formatMap('cachedContents', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((resp) => {
+ return resp;
+ });
+ }
+ }
+ /**
+ * Gets cached content configurations.
+ *
+ * @param params - The parameters for the get request.
+ * @return The cached content.
+ *
+ * @example
+ * ```ts
+ * await ai.caches.get({name: '...'}); // The server-generated resource name.
+ * ```
+ */
+ async get(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = getCachedContentParametersToVertex(this.apiClient, params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((resp) => {
+ return resp;
+ });
+ }
+ else {
+ const body = getCachedContentParametersToMldev(this.apiClient, params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((resp) => {
+ return resp;
+ });
+ }
+ }
+ /**
+ * Deletes cached content.
+ *
+ * @param params - The parameters for the delete request.
+ * @return The empty response returned by the API.
+ *
+ * @example
+ * ```ts
+ * await ai.caches.delete({name: '...'}); // The server-generated resource name.
+ * ```
+ */
+ async delete(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = deleteCachedContentParametersToVertex(this.apiClient, params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'DELETE',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = deleteCachedContentResponseFromVertex(apiResponse);
+ const typedResp = new DeleteCachedContentResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ const body = deleteCachedContentParametersToMldev(this.apiClient, params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'DELETE',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = deleteCachedContentResponseFromMldev(apiResponse);
+ const typedResp = new DeleteCachedContentResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ /**
+ * Updates cached content configurations.
+ *
+ * @param params - The parameters for the update request.
+ * @return The updated cached content.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.caches.update({
+ * name: '...', // The server-generated resource name.
+ * config: {'ttl': '7600s'}
+ * });
+ * ```
+ */
+ async update(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = updateCachedContentParametersToVertex(this.apiClient, params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'PATCH',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((resp) => {
+ return resp;
+ });
+ }
+ else {
+ const body = updateCachedContentParametersToMldev(this.apiClient, params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'PATCH',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((resp) => {
+ return resp;
+ });
+ }
+ }
+ async listInternal(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = listCachedContentsParametersToVertex(params);
+ path = formatMap('cachedContents', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = listCachedContentsResponseFromVertex(apiResponse);
+ const typedResp = new ListCachedContentsResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ const body = listCachedContentsParametersToMldev(params);
+ path = formatMap('cachedContents', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = listCachedContentsResponseFromMldev(apiResponse);
+ const typedResp = new ListCachedContentsResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+}
+
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */
+/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
+
+
+function __rest(s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+}
+
+function __values(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+}
+
+function __await(v) {
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
+}
+
+function __asyncGenerator(thisArg, _arguments, generator) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
+ function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
+ function fulfill(value) { resume("next", value); }
+ function reject(value) { resume("throw", value); }
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
+}
+
+function __asyncValues(o) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var m = o[Symbol.asyncIterator], i;
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
+}
+
+typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
+ var e = new Error(message);
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
+};
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+/**
+ * Returns true if the response is valid, false otherwise.
+ */
+function isValidResponse(response) {
+ var _a;
+ if (response.candidates == undefined || response.candidates.length === 0) {
+ return false;
+ }
+ const content = (_a = response.candidates[0]) === null || _a === void 0 ? void 0 : _a.content;
+ if (content === undefined) {
+ return false;
+ }
+ return isValidContent(content);
+}
+function isValidContent(content) {
+ if (content.parts === undefined || content.parts.length === 0) {
+ return false;
+ }
+ for (const part of content.parts) {
+ if (part === undefined || Object.keys(part).length === 0) {
+ return false;
+ }
+ }
+ return true;
+}
+/**
+ * Validates the history contains the correct roles.
+ *
+ * @throws Error if the history does not start with a user turn.
+ * @throws Error if the history contains an invalid role.
+ */
+function validateHistory(history) {
+ // Empty history is valid.
+ if (history.length === 0) {
+ return;
+ }
+ for (const content of history) {
+ if (content.role !== 'user' && content.role !== 'model') {
+ throw new Error(`Role must be user or model, but got ${content.role}.`);
+ }
+ }
+}
+/**
+ * Extracts the curated (valid) history from a comprehensive history.
+ *
+ * @remarks
+ * The model may sometimes generate invalid or empty contents(e.g., due to safty
+ * filters or recitation). Extracting valid turns from the history
+ * ensures that subsequent requests could be accpeted by the model.
+ */
+function extractCuratedHistory(comprehensiveHistory) {
+ if (comprehensiveHistory === undefined || comprehensiveHistory.length === 0) {
+ return [];
+ }
+ const curatedHistory = [];
+ const length = comprehensiveHistory.length;
+ let i = 0;
+ while (i < length) {
+ if (comprehensiveHistory[i].role === 'user') {
+ curatedHistory.push(comprehensiveHistory[i]);
+ i++;
+ }
+ else {
+ const modelOutput = [];
+ let isValid = true;
+ while (i < length && comprehensiveHistory[i].role === 'model') {
+ modelOutput.push(comprehensiveHistory[i]);
+ if (isValid && !isValidContent(comprehensiveHistory[i])) {
+ isValid = false;
+ }
+ i++;
+ }
+ if (isValid) {
+ curatedHistory.push(...modelOutput);
+ }
+ else {
+ // Remove the last user input when model content is invalid.
+ curatedHistory.pop();
+ }
+ }
+ }
+ return curatedHistory;
+}
+/**
+ * A utility class to create a chat session.
+ */
+class Chats {
+ constructor(modelsModule, apiClient) {
+ this.modelsModule = modelsModule;
+ this.apiClient = apiClient;
+ }
+ /**
+ * Creates a new chat session.
+ *
+ * @remarks
+ * The config in the params will be used for all requests within the chat
+ * session unless overridden by a per-request `config` in
+ * @see {@link types.SendMessageParameters#config}.
+ *
+ * @param params - Parameters for creating a chat session.
+ * @returns A new chat session.
+ *
+ * @example
+ * ```ts
+ * const chat = ai.chats.create({
+ * model: 'gemini-2.0-flash'
+ * config: {
+ * temperature: 0.5,
+ * maxOutputTokens: 1024,
+ * }
+ * });
+ * ```
+ */
+ create(params) {
+ return new Chat(this.apiClient, this.modelsModule, params.model, params.config,
+ // Deep copy the history to avoid mutating the history outside of the
+ // chat session.
+ structuredClone(params.history));
+ }
+}
+/**
+ * Chat session that enables sending messages to the model with previous
+ * conversation context.
+ *
+ * @remarks
+ * The session maintains all the turns between user and model.
+ */
+class Chat {
+ constructor(apiClient, modelsModule, model, config = {}, history = []) {
+ this.apiClient = apiClient;
+ this.modelsModule = modelsModule;
+ this.model = model;
+ this.config = config;
+ this.history = history;
+ // A promise to represent the current state of the message being sent to the
+ // model.
+ this.sendPromise = Promise.resolve();
+ validateHistory(history);
+ }
+ /**
+ * Sends a message to the model and returns the response.
+ *
+ * @remarks
+ * This method will wait for the previous message to be processed before
+ * sending the next message.
+ *
+ * @see {@link Chat#sendMessageStream} for streaming method.
+ * @param params - parameters for sending messages within a chat session.
+ * @returns The model's response.
+ *
+ * @example
+ * ```ts
+ * const chat = ai.chats.create({model: 'gemini-2.0-flash'});
+ * const response = await chat.sendMessage({
+ * message: 'Why is the sky blue?'
+ * });
+ * console.log(response.text);
+ * ```
+ */
+ async sendMessage(params) {
+ var _a;
+ await this.sendPromise;
+ const inputContent = tContent(params.message);
+ const responsePromise = this.modelsModule.generateContent({
+ model: this.model,
+ contents: this.getHistory(true).concat(inputContent),
+ config: (_a = params.config) !== null && _a !== void 0 ? _a : this.config,
+ });
+ this.sendPromise = (async () => {
+ var _a, _b, _c;
+ const response = await responsePromise;
+ const outputContent = (_b = (_a = response.candidates) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.content;
+ // Because the AFC input contains the entire curated chat history in
+ // addition to the new user input, we need to truncate the AFC history
+ // to deduplicate the existing chat history.
+ const fullAutomaticFunctionCallingHistory = response.automaticFunctionCallingHistory;
+ const index = this.getHistory(true).length;
+ let automaticFunctionCallingHistory = [];
+ if (fullAutomaticFunctionCallingHistory != null) {
+ automaticFunctionCallingHistory =
+ (_c = fullAutomaticFunctionCallingHistory.slice(index)) !== null && _c !== void 0 ? _c : [];
+ }
+ const modelOutput = outputContent ? [outputContent] : [];
+ this.recordHistory(inputContent, modelOutput, automaticFunctionCallingHistory);
+ return;
+ })();
+ await this.sendPromise.catch(() => {
+ // Resets sendPromise to avoid subsequent calls failing
+ this.sendPromise = Promise.resolve();
+ });
+ return responsePromise;
+ }
+ /**
+ * Sends a message to the model and returns the response in chunks.
+ *
+ * @remarks
+ * This method will wait for the previous message to be processed before
+ * sending the next message.
+ *
+ * @see {@link Chat#sendMessage} for non-streaming method.
+ * @param params - parameters for sending the message.
+ * @return The model's response.
+ *
+ * @example
+ * ```ts
+ * const chat = ai.chats.create({model: 'gemini-2.0-flash'});
+ * const response = await chat.sendMessageStream({
+ * message: 'Why is the sky blue?'
+ * });
+ * for await (const chunk of response) {
+ * console.log(chunk.text);
+ * }
+ * ```
+ */
+ async sendMessageStream(params) {
+ var _a;
+ await this.sendPromise;
+ const inputContent = tContent(params.message);
+ const streamResponse = this.modelsModule.generateContentStream({
+ model: this.model,
+ contents: this.getHistory(true).concat(inputContent),
+ config: (_a = params.config) !== null && _a !== void 0 ? _a : this.config,
+ });
+ // Resolve the internal tracking of send completion promise - `sendPromise`
+ // for both success and failure response. The actual failure is still
+ // propagated by the `await streamResponse`.
+ this.sendPromise = streamResponse
+ .then(() => undefined)
+ .catch(() => undefined);
+ const response = await streamResponse;
+ const result = this.processStreamResponse(response, inputContent);
+ return result;
+ }
+ /**
+ * Returns the chat history.
+ *
+ * @remarks
+ * The history is a list of contents alternating between user and model.
+ *
+ * There are two types of history:
+ * - The `curated history` contains only the valid turns between user and
+ * model, which will be included in the subsequent requests sent to the model.
+ * - The `comprehensive history` contains all turns, including invalid or
+ * empty model outputs, providing a complete record of the history.
+ *
+ * The history is updated after receiving the response from the model,
+ * for streaming response, it means receiving the last chunk of the response.
+ *
+ * The `comprehensive history` is returned by default. To get the `curated
+ * history`, set the `curated` parameter to `true`.
+ *
+ * @param curated - whether to return the curated history or the comprehensive
+ * history.
+ * @return History contents alternating between user and model for the entire
+ * chat session.
+ */
+ getHistory(curated = false) {
+ const history = curated
+ ? extractCuratedHistory(this.history)
+ : this.history;
+ // Deep copy the history to avoid mutating the history outside of the
+ // chat session.
+ return structuredClone(history);
+ }
+ processStreamResponse(streamResponse, inputContent) {
+ return __asyncGenerator(this, arguments, function* processStreamResponse_1() {
+ var _a, e_1, _b, _c;
+ var _d, _e;
+ const outputContent = [];
+ try {
+ for (var _f = true, streamResponse_1 = __asyncValues(streamResponse), streamResponse_1_1; streamResponse_1_1 = yield __await(streamResponse_1.next()), _a = streamResponse_1_1.done, !_a; _f = true) {
+ _c = streamResponse_1_1.value;
+ _f = false;
+ const chunk = _c;
+ if (isValidResponse(chunk)) {
+ const content = (_e = (_d = chunk.candidates) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.content;
+ if (content !== undefined) {
+ outputContent.push(content);
+ }
+ }
+ yield yield __await(chunk);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (!_f && !_a && (_b = streamResponse_1.return)) yield __await(_b.call(streamResponse_1));
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ this.recordHistory(inputContent, outputContent);
+ });
+ }
+ recordHistory(userInput, modelOutput, automaticFunctionCallingHistory) {
+ let outputContents = [];
+ if (modelOutput.length > 0 &&
+ modelOutput.every((content) => content.role !== undefined)) {
+ outputContents = modelOutput;
+ }
+ else {
+ // Appends an empty content when model returns empty response, so that the
+ // history is always alternating between user and model.
+ outputContents.push({
+ role: 'model',
+ parts: [],
+ });
+ }
+ if (automaticFunctionCallingHistory &&
+ automaticFunctionCallingHistory.length > 0) {
+ this.history.push(...extractCuratedHistory(automaticFunctionCallingHistory));
+ }
+ else {
+ this.history.push(userInput);
+ }
+ this.history.push(...outputContents);
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+/**
+ * API errors raised by the GenAI API.
+ */
+class ApiError extends Error {
+ constructor(options) {
+ super(options.message);
+ this.name = 'ApiError';
+ this.status = options.status;
+ Object.setPrototypeOf(this, ApiError.prototype);
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
+function createFileParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromFile = getValueByPath(fromObject, ['file']);
+ if (fromFile != null) {
+ setValueByPath(toObject, ['file'], fromFile);
+ }
+ return toObject;
+}
+function createFileResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ return toObject;
+}
+function deleteFileParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'file'], tFileName(fromName));
+ }
+ return toObject;
+}
+function deleteFileResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ return toObject;
+}
+function getFileParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'file'], tFileName(fromName));
+ }
+ return toObject;
+}
+function internalRegisterFilesParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromUris = getValueByPath(fromObject, ['uris']);
+ if (fromUris != null) {
+ setValueByPath(toObject, ['uris'], fromUris);
+ }
+ return toObject;
+}
+function listFilesConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromPageSize = getValueByPath(fromObject, ['pageSize']);
+ if (parentObject !== undefined && fromPageSize != null) {
+ setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
+ }
+ const fromPageToken = getValueByPath(fromObject, ['pageToken']);
+ if (parentObject !== undefined && fromPageToken != null) {
+ setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
+ }
+ return toObject;
+}
+function listFilesParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ listFilesConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function listFilesResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromNextPageToken = getValueByPath(fromObject, [
+ 'nextPageToken',
+ ]);
+ if (fromNextPageToken != null) {
+ setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);
+ }
+ const fromFiles = getValueByPath(fromObject, ['files']);
+ if (fromFiles != null) {
+ let transformedList = fromFiles;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['files'], transformedList);
+ }
+ return toObject;
+}
+function registerFilesResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromFiles = getValueByPath(fromObject, ['files']);
+ if (fromFiles != null) {
+ let transformedList = fromFiles;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['files'], transformedList);
+ }
+ return toObject;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+let Files$1 = class Files extends BaseModule {
+ constructor(apiClient) {
+ super();
+ this.apiClient = apiClient;
+ /**
+ * Lists files.
+ *
+ * @param params - The parameters for the list request.
+ * @return - A pager of files.
+ *
+ * @example
+ * ```ts
+ * const files = await ai.files.list({config: {'pageSize': 2}});
+ * for await (const file of files) {
+ * console.log(file);
+ * }
+ * ```
+ */
+ this.list = async (params = {}) => {
+ return new Pager(PagedItem.PAGED_ITEM_FILES, (x) => this.listInternal(x), await this.listInternal(params), params);
+ };
+ }
+ /**
+ * Uploads a file asynchronously to the Gemini API.
+ * This method is not available in Gemini Enterprise Agent Platform (previously known as Vertex AI).
+ * Supported upload sources:
+ * - Node.js: File path (string) or Blob object.
+ * - Browser: Blob object (e.g., File).
+ *
+ * @remarks
+ * The `mimeType` can be specified in the `config` parameter. If omitted:
+ * - For file path (string) inputs, the `mimeType` will be inferred from the
+ * file extension.
+ * - For Blob object inputs, the `mimeType` will be set to the Blob's `type`
+ * property.
+ * Some examples for file extension to mimeType mapping:
+ * .txt -> text/plain
+ * .json -> application/json
+ * .jpg -> image/jpeg
+ * .png -> image/png
+ * .mp3 -> audio/mpeg
+ * .mp4 -> video/mp4
+ *
+ * This section can contain multiple paragraphs and code examples.
+ *
+ * @param params - Optional parameters specified in the
+ * `types.UploadFileParameters` interface.
+ * @see {@link types.UploadFileParameters#config} for the optional
+ * config in the parameters.
+ * @return A promise that resolves to a `types.File` object.
+ * @throws An error if called on a Gemini Enterprise Agent Platform (previously known as Vertex AI) client.
+ * @throws An error if the `mimeType` is not provided and can not be inferred,
+ * the `mimeType` can be provided in the `params.config` parameter.
+ * @throws An error occurs if a suitable upload location cannot be established.
+ *
+ * @example
+ * The following code uploads a file to Gemini API.
+ *
+ * ```ts
+ * const file = await ai.files.upload({file: 'file.txt', config: {
+ * mimeType: 'text/plain',
+ * }});
+ * console.log(file.name);
+ * ```
+ */
+ async upload(params) {
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('Gemini Enterprise Agent Platform (previously known as Vertex AI) does not support uploading files. You can share files through a GCS bucket.');
+ }
+ return this.apiClient
+ .uploadFile(params.file, params.config)
+ .then((resp) => {
+ return resp;
+ });
+ }
+ /**
+ * Downloads a remotely stored file asynchronously to a location specified in
+ * the `params` object. This method only works on Node environment, to
+ * download files in the browser, use a browser compliant method like an
+ * tag.
+ *
+ * @param params - The parameters for the download request.
+ *
+ * @example
+ * The following code downloads an example file named "files/mehozpxf877d" as
+ * "file.txt".
+ *
+ * ```ts
+ * await ai.files.download({file: file.name, downloadPath: 'file.txt'});
+ * ```
+ */
+ async download(params) {
+ await this.apiClient.downloadFile(params);
+ }
+ /**
+ * Registers Google Cloud Storage files for use with the API.
+ * This method is only available in Node.js environments.
+ */
+ async registerFiles(params) {
+ throw new Error('registerFiles is only supported in Node.js environments.');
+ }
+ async _registerFiles(params) {
+ return this.registerFilesInternal(params);
+ }
+ async listInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = listFilesParametersToMldev(params);
+ path = formatMap('files', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = listFilesResponseFromMldev(apiResponse);
+ const typedResp = new ListFilesResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ async createInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = createFileParametersToMldev(params);
+ path = formatMap('upload/v1beta/files', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = createFileResponseFromMldev(apiResponse);
+ const typedResp = new CreateFileResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ /**
+ * Retrieves the file information from the service.
+ *
+ * @param params - The parameters for the get request
+ * @return The Promise that resolves to the types.File object requested.
+ *
+ * @example
+ * ```ts
+ * const config: GetFileParameters = {
+ * name: fileName,
+ * };
+ * file = await ai.files.get(config);
+ * console.log(file.name);
+ * ```
+ */
+ async get(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = getFileParametersToMldev(params);
+ path = formatMap('files/{file}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((resp) => {
+ return resp;
+ });
+ }
+ }
+ /**
+ * Deletes a remotely stored file.
+ *
+ * @param params - The parameters for the delete request.
+ * @return The DeleteFileResponse, the response for the delete method.
+ *
+ * @example
+ * The following code deletes an example file named "files/mehozpxf877d".
+ *
+ * ```ts
+ * await ai.files.delete({name: file.name});
+ * ```
+ */
+ async delete(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = deleteFileParametersToMldev(params);
+ path = formatMap('files/{file}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'DELETE',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = deleteFileResponseFromMldev(apiResponse);
+ const typedResp = new DeleteFileResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ async registerFilesInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = internalRegisterFilesParametersToMldev(params);
+ path = formatMap('files:register', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = registerFilesResponseFromMldev(apiResponse);
+ const typedResp = new RegisterFilesResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+};
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+function authConfigToMldev$2(fromObject) {
+ const toObject = {};
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
+ if (fromApiKey != null) {
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
+ }
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
+ undefined) {
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function blobToMldev$2(fromObject) {
+ const toObject = {};
+ const fromData = getValueByPath(fromObject, ['data']);
+ if (fromData != null) {
+ setValueByPath(toObject, ['data'], fromData);
+ }
+ if (getValueByPath(fromObject, ['displayName']) !== undefined) {
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function computerUseToVertex$1(fromObject) {
+ const toObject = {};
+ const fromEnablePromptInjectionDetection = getValueByPath(fromObject, [
+ 'enablePromptInjectionDetection',
+ ]);
+ if (fromEnablePromptInjectionDetection != null) {
+ setValueByPath(toObject, ['enablePromptInjectionDetection'], fromEnablePromptInjectionDetection);
+ }
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
+ if (fromEnvironment != null) {
+ setValueByPath(toObject, ['environment'], fromEnvironment);
+ }
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
+ 'excludedPredefinedFunctions',
+ ]);
+ if (fromExcludedPredefinedFunctions != null) {
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
+ }
+ if (getValueByPath(fromObject, ['disabledSafetyPolicies']) !== undefined) {
+ throw new Error('disabledSafetyPolicies parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function contentToMldev$2(fromObject) {
+ const toObject = {};
+ const fromParts = getValueByPath(fromObject, ['parts']);
+ if (fromParts != null) {
+ let transformedList = fromParts;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return partToMldev$2(item);
+ });
+ }
+ setValueByPath(toObject, ['parts'], transformedList);
+ }
+ const fromRole = getValueByPath(fromObject, ['role']);
+ if (fromRole != null) {
+ setValueByPath(toObject, ['role'], fromRole);
+ }
+ return toObject;
+}
+function contentToVertex$2(fromObject) {
+ const toObject = {};
+ const fromParts = getValueByPath(fromObject, ['parts']);
+ if (fromParts != null) {
+ let transformedList = fromParts;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return partToVertex$2(item);
+ });
+ }
+ setValueByPath(toObject, ['parts'], transformedList);
+ }
+ const fromRole = getValueByPath(fromObject, ['role']);
+ if (fromRole != null) {
+ setValueByPath(toObject, ['role'], fromRole);
+ }
+ return toObject;
+}
+function fileDataToMldev$2(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['displayName']) !== undefined) {
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromFileUri = getValueByPath(fromObject, ['fileUri']);
+ if (fromFileUri != null) {
+ setValueByPath(toObject, ['fileUri'], fromFileUri);
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function functionCallToMldev$2(fromObject) {
+ const toObject = {};
+ const fromArgs = getValueByPath(fromObject, ['args']);
+ if (fromArgs != null) {
+ setValueByPath(toObject, ['args'], fromArgs);
+ }
+ const fromId = getValueByPath(fromObject, ['id']);
+ if (fromId != null) {
+ setValueByPath(toObject, ['id'], fromId);
+ }
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function generationConfigToVertex$1(fromObject) {
+ const toObject = {};
+ const fromModelSelectionConfig = getValueByPath(fromObject, [
+ 'modelSelectionConfig',
+ ]);
+ if (fromModelSelectionConfig != null) {
+ setValueByPath(toObject, ['modelConfig'], fromModelSelectionConfig);
+ }
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
+ 'responseJsonSchema',
+ ]);
+ if (fromResponseJsonSchema != null) {
+ setValueByPath(toObject, ['responseJsonSchema'], tJsonSchema(fromResponseJsonSchema));
+ }
+ const fromAudioTranscriptionConfig = getValueByPath(fromObject, [
+ 'audioTranscriptionConfig',
+ ]);
+ if (fromAudioTranscriptionConfig != null) {
+ setValueByPath(toObject, ['audioTranscriptionConfig'], fromAudioTranscriptionConfig);
+ }
+ const fromAudioTimestamp = getValueByPath(fromObject, [
+ 'audioTimestamp',
+ ]);
+ if (fromAudioTimestamp != null) {
+ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);
+ }
+ const fromCandidateCount = getValueByPath(fromObject, [
+ 'candidateCount',
+ ]);
+ if (fromCandidateCount != null) {
+ setValueByPath(toObject, ['candidateCount'], fromCandidateCount);
+ }
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
+ 'enableAffectiveDialog',
+ ]);
+ if (fromEnableAffectiveDialog != null) {
+ setValueByPath(toObject, ['enableAffectiveDialog'], fromEnableAffectiveDialog);
+ }
+ const fromFrequencyPenalty = getValueByPath(fromObject, [
+ 'frequencyPenalty',
+ ]);
+ if (fromFrequencyPenalty != null) {
+ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);
+ }
+ const fromLogprobs = getValueByPath(fromObject, ['logprobs']);
+ if (fromLogprobs != null) {
+ setValueByPath(toObject, ['logprobs'], fromLogprobs);
+ }
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
+ 'maxOutputTokens',
+ ]);
+ if (fromMaxOutputTokens != null) {
+ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);
+ }
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ const fromPresencePenalty = getValueByPath(fromObject, [
+ 'presencePenalty',
+ ]);
+ if (fromPresencePenalty != null) {
+ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);
+ }
+ const fromResponseFormat = getValueByPath(fromObject, [
+ 'responseFormat',
+ ]);
+ if (fromResponseFormat != null) {
+ let transformedList = fromResponseFormat;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['responseFormat'], transformedList);
+ }
+ const fromResponseLogprobs = getValueByPath(fromObject, [
+ 'responseLogprobs',
+ ]);
+ if (fromResponseLogprobs != null) {
+ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);
+ }
+ const fromResponseMimeType = getValueByPath(fromObject, [
+ 'responseMimeType',
+ ]);
+ if (fromResponseMimeType != null) {
+ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);
+ }
+ const fromResponseModalities = getValueByPath(fromObject, [
+ 'responseModalities',
+ ]);
+ if (fromResponseModalities != null) {
+ setValueByPath(toObject, ['responseModalities'], fromResponseModalities);
+ }
+ const fromResponseSchema = getValueByPath(fromObject, [
+ 'responseSchema',
+ ]);
+ if (fromResponseSchema != null) {
+ setValueByPath(toObject, ['responseSchema'], fromResponseSchema);
+ }
+ const fromRoutingConfig = getValueByPath(fromObject, [
+ 'routingConfig',
+ ]);
+ if (fromRoutingConfig != null) {
+ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (fromSeed != null) {
+ setValueByPath(toObject, ['seed'], fromSeed);
+ }
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
+ if (fromSpeechConfig != null) {
+ setValueByPath(toObject, ['speechConfig'], speechConfigToVertex$1(fromSpeechConfig));
+ }
+ const fromStopSequences = getValueByPath(fromObject, [
+ 'stopSequences',
+ ]);
+ if (fromStopSequences != null) {
+ setValueByPath(toObject, ['stopSequences'], fromStopSequences);
+ }
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
+ if (fromTemperature != null) {
+ setValueByPath(toObject, ['temperature'], fromTemperature);
+ }
+ const fromThinkingConfig = getValueByPath(fromObject, [
+ 'thinkingConfig',
+ ]);
+ if (fromThinkingConfig != null) {
+ setValueByPath(toObject, ['thinkingConfig'], fromThinkingConfig);
+ }
+ const fromTopK = getValueByPath(fromObject, ['topK']);
+ if (fromTopK != null) {
+ setValueByPath(toObject, ['topK'], fromTopK);
+ }
+ const fromTopP = getValueByPath(fromObject, ['topP']);
+ if (fromTopP != null) {
+ setValueByPath(toObject, ['topP'], fromTopP);
+ }
+ if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
+ undefined) {
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['translationConfig']) !== undefined) {
+ throw new Error('translationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function googleMapsToMldev$2(fromObject) {
+ const toObject = {};
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
+ if (fromAuthConfig != null) {
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev$2(fromAuthConfig));
+ }
+ const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
+ if (fromEnableWidget != null) {
+ setValueByPath(toObject, ['enableWidget'], fromEnableWidget);
+ }
+ if (getValueByPath(fromObject, ['groundingTypes']) !== undefined) {
+ throw new Error('groundingTypes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function googleSearchToMldev$2(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
+ if (fromSearchTypes != null) {
+ setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
+ }
+ const fromTimeRangeFilter = getValueByPath(fromObject, [
+ 'timeRangeFilter',
+ ]);
+ if (fromTimeRangeFilter != null) {
+ setValueByPath(toObject, ['timeRangeFilter'], fromTimeRangeFilter);
+ }
+ return toObject;
+}
+function liveConnectConfigToMldev$1(fromObject, parentObject) {
+ const toObject = {};
+ const fromGenerationConfig = getValueByPath(fromObject, [
+ 'generationConfig',
+ ]);
+ if (parentObject !== undefined && fromGenerationConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
+ }
+ const fromResponseModalities = getValueByPath(fromObject, [
+ 'responseModalities',
+ ]);
+ if (parentObject !== undefined && fromResponseModalities != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
+ }
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
+ if (parentObject !== undefined && fromTemperature != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
+ }
+ const fromTopP = getValueByPath(fromObject, ['topP']);
+ if (parentObject !== undefined && fromTopP != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
+ }
+ const fromTopK = getValueByPath(fromObject, ['topK']);
+ if (parentObject !== undefined && fromTopK != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
+ }
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
+ 'maxOutputTokens',
+ ]);
+ if (parentObject !== undefined && fromMaxOutputTokens != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
+ }
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (parentObject !== undefined && fromMediaResolution != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (parentObject !== undefined && fromSeed != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
+ }
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
+ if (parentObject !== undefined && fromSpeechConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], tLiveSpeechConfig(fromSpeechConfig));
+ }
+ const fromThinkingConfig = getValueByPath(fromObject, [
+ 'thinkingConfig',
+ ]);
+ if (parentObject !== undefined && fromThinkingConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], fromThinkingConfig);
+ }
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
+ 'enableAffectiveDialog',
+ ]);
+ if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
+ }
+ const fromSystemInstruction = getValueByPath(fromObject, [
+ 'systemInstruction',
+ ]);
+ if (parentObject !== undefined && fromSystemInstruction != null) {
+ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev$2(tContent(fromSystemInstruction)));
+ }
+ const fromTools = getValueByPath(fromObject, ['tools']);
+ if (parentObject !== undefined && fromTools != null) {
+ let transformedList = tTools(fromTools);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return toolToMldev$2(tTool(item));
+ });
+ }
+ setValueByPath(parentObject, ['setup', 'tools'], transformedList);
+ }
+ const fromSessionResumption = getValueByPath(fromObject, [
+ 'sessionResumption',
+ ]);
+ if (parentObject !== undefined && fromSessionResumption != null) {
+ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev$1(fromSessionResumption));
+ }
+ const fromInputAudioTranscription = getValueByPath(fromObject, [
+ 'inputAudioTranscription',
+ ]);
+ if (parentObject !== undefined && fromInputAudioTranscription != null) {
+ setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], fromInputAudioTranscription);
+ }
+ const fromOutputAudioTranscription = getValueByPath(fromObject, [
+ 'outputAudioTranscription',
+ ]);
+ if (parentObject !== undefined && fromOutputAudioTranscription != null) {
+ setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], fromOutputAudioTranscription);
+ }
+ const fromRealtimeInputConfig = getValueByPath(fromObject, [
+ 'realtimeInputConfig',
+ ]);
+ if (parentObject !== undefined && fromRealtimeInputConfig != null) {
+ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], fromRealtimeInputConfig);
+ }
+ const fromContextWindowCompression = getValueByPath(fromObject, [
+ 'contextWindowCompression',
+ ]);
+ if (parentObject !== undefined && fromContextWindowCompression != null) {
+ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], fromContextWindowCompression);
+ }
+ const fromProactivity = getValueByPath(fromObject, ['proactivity']);
+ if (parentObject !== undefined && fromProactivity != null) {
+ setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
+ }
+ if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
+ if (parentObject !== undefined && fromAvatarConfig != null) {
+ setValueByPath(parentObject, ['setup', 'avatarConfig'], fromAvatarConfig);
+ }
+ const fromSafetySettings = getValueByPath(fromObject, [
+ 'safetySettings',
+ ]);
+ if (parentObject !== undefined && fromSafetySettings != null) {
+ let transformedList = fromSafetySettings;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return safetySettingToMldev$2(item);
+ });
+ }
+ setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
+ }
+ const fromTranslationConfig = getValueByPath(fromObject, [
+ 'translationConfig',
+ ]);
+ if (parentObject !== undefined && fromTranslationConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'translationConfig'], fromTranslationConfig);
+ }
+ return toObject;
+}
+function liveConnectConfigToVertex(fromObject, parentObject) {
+ const toObject = {};
+ const fromGenerationConfig = getValueByPath(fromObject, [
+ 'generationConfig',
+ ]);
+ if (parentObject !== undefined && fromGenerationConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig'], generationConfigToVertex$1(fromGenerationConfig));
+ }
+ const fromResponseModalities = getValueByPath(fromObject, [
+ 'responseModalities',
+ ]);
+ if (parentObject !== undefined && fromResponseModalities != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
+ }
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
+ if (parentObject !== undefined && fromTemperature != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
+ }
+ const fromTopP = getValueByPath(fromObject, ['topP']);
+ if (parentObject !== undefined && fromTopP != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
+ }
+ const fromTopK = getValueByPath(fromObject, ['topK']);
+ if (parentObject !== undefined && fromTopK != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
+ }
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
+ 'maxOutputTokens',
+ ]);
+ if (parentObject !== undefined && fromMaxOutputTokens != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
+ }
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (parentObject !== undefined && fromMediaResolution != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (parentObject !== undefined && fromSeed != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
+ }
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
+ if (parentObject !== undefined && fromSpeechConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
+ }
+ const fromThinkingConfig = getValueByPath(fromObject, [
+ 'thinkingConfig',
+ ]);
+ if (parentObject !== undefined && fromThinkingConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], fromThinkingConfig);
+ }
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
+ 'enableAffectiveDialog',
+ ]);
+ if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
+ }
+ const fromSystemInstruction = getValueByPath(fromObject, [
+ 'systemInstruction',
+ ]);
+ if (parentObject !== undefined && fromSystemInstruction != null) {
+ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$2(tContent(fromSystemInstruction)));
+ }
+ const fromTools = getValueByPath(fromObject, ['tools']);
+ if (parentObject !== undefined && fromTools != null) {
+ let transformedList = tTools(fromTools);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return toolToVertex$1(tTool(item));
+ });
+ }
+ setValueByPath(parentObject, ['setup', 'tools'], transformedList);
+ }
+ const fromSessionResumption = getValueByPath(fromObject, [
+ 'sessionResumption',
+ ]);
+ if (parentObject !== undefined && fromSessionResumption != null) {
+ setValueByPath(parentObject, ['setup', 'sessionResumption'], fromSessionResumption);
+ }
+ const fromInputAudioTranscription = getValueByPath(fromObject, [
+ 'inputAudioTranscription',
+ ]);
+ if (parentObject !== undefined && fromInputAudioTranscription != null) {
+ setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], fromInputAudioTranscription);
+ }
+ const fromOutputAudioTranscription = getValueByPath(fromObject, [
+ 'outputAudioTranscription',
+ ]);
+ if (parentObject !== undefined && fromOutputAudioTranscription != null) {
+ setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], fromOutputAudioTranscription);
+ }
+ const fromRealtimeInputConfig = getValueByPath(fromObject, [
+ 'realtimeInputConfig',
+ ]);
+ if (parentObject !== undefined && fromRealtimeInputConfig != null) {
+ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], fromRealtimeInputConfig);
+ }
+ const fromContextWindowCompression = getValueByPath(fromObject, [
+ 'contextWindowCompression',
+ ]);
+ if (parentObject !== undefined && fromContextWindowCompression != null) {
+ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], fromContextWindowCompression);
+ }
+ const fromProactivity = getValueByPath(fromObject, ['proactivity']);
+ if (parentObject !== undefined && fromProactivity != null) {
+ setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
+ }
+ const fromExplicitVadSignal = getValueByPath(fromObject, [
+ 'explicitVadSignal',
+ ]);
+ if (parentObject !== undefined && fromExplicitVadSignal != null) {
+ setValueByPath(parentObject, ['setup', 'explicitVadSignal'], fromExplicitVadSignal);
+ }
+ const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
+ if (parentObject !== undefined && fromAvatarConfig != null) {
+ setValueByPath(parentObject, ['setup', 'avatarConfig'], fromAvatarConfig);
+ }
+ const fromSafetySettings = getValueByPath(fromObject, [
+ 'safetySettings',
+ ]);
+ if (parentObject !== undefined && fromSafetySettings != null) {
+ let transformedList = fromSafetySettings;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
+ }
+ const fromTranslationConfig = getValueByPath(fromObject, [
+ 'translationConfig',
+ ]);
+ if (parentObject !== undefined && fromTranslationConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'translationConfig'], fromTranslationConfig);
+ }
+ return toObject;
+}
+function liveConnectParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ setValueByPath(toObject, ['config'], liveConnectConfigToMldev$1(fromConfig, toObject));
+ }
+ return toObject;
+}
+function liveConnectParametersToVertex(apiClient, fromObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
+ }
+ return toObject;
+}
+function liveMusicSetConfigParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromMusicGenerationConfig = getValueByPath(fromObject, [
+ 'musicGenerationConfig',
+ ]);
+ if (fromMusicGenerationConfig != null) {
+ setValueByPath(toObject, ['musicGenerationConfig'], fromMusicGenerationConfig);
+ }
+ return toObject;
+}
+function liveMusicSetWeightedPromptsParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromWeightedPrompts = getValueByPath(fromObject, [
+ 'weightedPrompts',
+ ]);
+ if (fromWeightedPrompts != null) {
+ let transformedList = fromWeightedPrompts;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['weightedPrompts'], transformedList);
+ }
+ return toObject;
+}
+function liveSendRealtimeInputParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromMedia = getValueByPath(fromObject, ['media']);
+ if (fromMedia != null) {
+ let transformedList = tBlobs(fromMedia);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return blobToMldev$2(item);
+ });
+ }
+ setValueByPath(toObject, ['mediaChunks'], transformedList);
+ }
+ const fromAudio = getValueByPath(fromObject, ['audio']);
+ if (fromAudio != null) {
+ setValueByPath(toObject, ['audio'], blobToMldev$2(tAudioBlob(fromAudio)));
+ }
+ const fromAudioStreamEnd = getValueByPath(fromObject, [
+ 'audioStreamEnd',
+ ]);
+ if (fromAudioStreamEnd != null) {
+ setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
+ }
+ const fromVideo = getValueByPath(fromObject, ['video']);
+ if (fromVideo != null) {
+ setValueByPath(toObject, ['video'], blobToMldev$2(tImageBlob(fromVideo)));
+ }
+ const fromText = getValueByPath(fromObject, ['text']);
+ if (fromText != null) {
+ setValueByPath(toObject, ['text'], fromText);
+ }
+ const fromActivityStart = getValueByPath(fromObject, [
+ 'activityStart',
+ ]);
+ if (fromActivityStart != null) {
+ setValueByPath(toObject, ['activityStart'], fromActivityStart);
+ }
+ const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
+ if (fromActivityEnd != null) {
+ setValueByPath(toObject, ['activityEnd'], fromActivityEnd);
+ }
+ return toObject;
+}
+function liveSendRealtimeInputParametersToVertex(fromObject) {
+ const toObject = {};
+ const fromMedia = getValueByPath(fromObject, ['media']);
+ if (fromMedia != null) {
+ let transformedList = tBlobs(fromMedia);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['mediaChunks'], transformedList);
+ }
+ const fromAudio = getValueByPath(fromObject, ['audio']);
+ if (fromAudio != null) {
+ setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
+ }
+ const fromAudioStreamEnd = getValueByPath(fromObject, [
+ 'audioStreamEnd',
+ ]);
+ if (fromAudioStreamEnd != null) {
+ setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
+ }
+ const fromVideo = getValueByPath(fromObject, ['video']);
+ if (fromVideo != null) {
+ setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
+ }
+ const fromText = getValueByPath(fromObject, ['text']);
+ if (fromText != null) {
+ setValueByPath(toObject, ['text'], fromText);
+ }
+ const fromActivityStart = getValueByPath(fromObject, [
+ 'activityStart',
+ ]);
+ if (fromActivityStart != null) {
+ setValueByPath(toObject, ['activityStart'], fromActivityStart);
+ }
+ const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
+ if (fromActivityEnd != null) {
+ setValueByPath(toObject, ['activityEnd'], fromActivityEnd);
+ }
+ return toObject;
+}
+function liveServerMessageFromVertex(fromObject) {
+ const toObject = {};
+ const fromSetupComplete = getValueByPath(fromObject, [
+ 'setupComplete',
+ ]);
+ if (fromSetupComplete != null) {
+ setValueByPath(toObject, ['setupComplete'], fromSetupComplete);
+ }
+ const fromServerContent = getValueByPath(fromObject, [
+ 'serverContent',
+ ]);
+ if (fromServerContent != null) {
+ setValueByPath(toObject, ['serverContent'], fromServerContent);
+ }
+ const fromToolCall = getValueByPath(fromObject, ['toolCall']);
+ if (fromToolCall != null) {
+ setValueByPath(toObject, ['toolCall'], fromToolCall);
+ }
+ const fromToolCallCancellation = getValueByPath(fromObject, [
+ 'toolCallCancellation',
+ ]);
+ if (fromToolCallCancellation != null) {
+ setValueByPath(toObject, ['toolCallCancellation'], fromToolCallCancellation);
+ }
+ const fromUsageMetadata = getValueByPath(fromObject, [
+ 'usageMetadata',
+ ]);
+ if (fromUsageMetadata != null) {
+ setValueByPath(toObject, ['usageMetadata'], usageMetadataFromVertex(fromUsageMetadata));
+ }
+ const fromGoAway = getValueByPath(fromObject, ['goAway']);
+ if (fromGoAway != null) {
+ setValueByPath(toObject, ['goAway'], fromGoAway);
+ }
+ const fromSessionResumptionUpdate = getValueByPath(fromObject, [
+ 'sessionResumptionUpdate',
+ ]);
+ if (fromSessionResumptionUpdate != null) {
+ setValueByPath(toObject, ['sessionResumptionUpdate'], fromSessionResumptionUpdate);
+ }
+ const fromVoiceActivityDetectionSignal = getValueByPath(fromObject, [
+ 'voiceActivityDetectionSignal',
+ ]);
+ if (fromVoiceActivityDetectionSignal != null) {
+ setValueByPath(toObject, ['voiceActivityDetectionSignal'], fromVoiceActivityDetectionSignal);
+ }
+ const fromVoiceActivity = getValueByPath(fromObject, [
+ 'voiceActivity',
+ ]);
+ if (fromVoiceActivity != null) {
+ setValueByPath(toObject, ['voiceActivity'], voiceActivityFromVertex(fromVoiceActivity));
+ }
+ return toObject;
+}
+function mcpServerToVertex$1(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['name']) !== undefined) {
+ throw new Error('name parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['streamableHttpTransport']) !== undefined) {
+ throw new Error('streamableHttpTransport parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function multiSpeakerVoiceConfigToVertex$1(fromObject) {
+ const toObject = {};
+ const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
+ 'speakerVoiceConfigs',
+ ]);
+ if (fromSpeakerVoiceConfigs != null) {
+ let transformedList = fromSpeakerVoiceConfigs;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return speakerVoiceConfigToVertex$1(item);
+ });
+ }
+ setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
+ }
+ return toObject;
+}
+function partToMldev$2(fromObject) {
+ const toObject = {};
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ const fromToolCall = getValueByPath(fromObject, ['toolCall']);
+ if (fromToolCall != null) {
+ setValueByPath(toObject, ['toolCall'], fromToolCall);
+ }
+ const fromToolResponse = getValueByPath(fromObject, ['toolResponse']);
+ if (fromToolResponse != null) {
+ setValueByPath(toObject, ['toolResponse'], fromToolResponse);
+ }
+ const fromAudioTranscription = getValueByPath(fromObject, [
+ 'audioTranscription',
+ ]);
+ if (fromAudioTranscription != null) {
+ setValueByPath(toObject, ['audioTranscription'], fromAudioTranscription);
+ }
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
+ 'codeExecutionResult',
+ ]);
+ if (fromCodeExecutionResult != null) {
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
+ }
+ const fromExecutableCode = getValueByPath(fromObject, [
+ 'executableCode',
+ ]);
+ if (fromExecutableCode != null) {
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
+ }
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
+ if (fromFileData != null) {
+ setValueByPath(toObject, ['fileData'], fileDataToMldev$2(fromFileData));
+ }
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
+ if (fromFunctionCall != null) {
+ setValueByPath(toObject, ['functionCall'], functionCallToMldev$2(fromFunctionCall));
+ }
+ const fromFunctionResponse = getValueByPath(fromObject, [
+ 'functionResponse',
+ ]);
+ if (fromFunctionResponse != null) {
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
+ }
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
+ if (fromInlineData != null) {
+ setValueByPath(toObject, ['inlineData'], blobToMldev$2(fromInlineData));
+ }
+ const fromText = getValueByPath(fromObject, ['text']);
+ if (fromText != null) {
+ setValueByPath(toObject, ['text'], fromText);
+ }
+ const fromThought = getValueByPath(fromObject, ['thought']);
+ if (fromThought != null) {
+ setValueByPath(toObject, ['thought'], fromThought);
+ }
+ const fromThoughtSignature = getValueByPath(fromObject, [
+ 'thoughtSignature',
+ ]);
+ if (fromThoughtSignature != null) {
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
+ }
+ const fromVideoMetadata = getValueByPath(fromObject, [
+ 'videoMetadata',
+ ]);
+ if (fromVideoMetadata != null) {
+ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
+ }
+ const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
+ if (fromPartMetadata != null) {
+ setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
+ }
+ const fromMediaProcessing = getValueByPath(fromObject, [
+ 'mediaProcessing',
+ ]);
+ if (fromMediaProcessing != null) {
+ setValueByPath(toObject, ['mediaProcessing'], fromMediaProcessing);
+ }
+ return toObject;
+}
+function partToVertex$2(fromObject) {
+ const toObject = {};
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ const fromAudioTranscription = getValueByPath(fromObject, [
+ 'audioTranscription',
+ ]);
+ if (fromAudioTranscription != null) {
+ setValueByPath(toObject, ['audioTranscription'], fromAudioTranscription);
+ }
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
+ 'codeExecutionResult',
+ ]);
+ if (fromCodeExecutionResult != null) {
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
+ }
+ const fromExecutableCode = getValueByPath(fromObject, [
+ 'executableCode',
+ ]);
+ if (fromExecutableCode != null) {
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
+ }
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
+ if (fromFileData != null) {
+ setValueByPath(toObject, ['fileData'], fromFileData);
+ }
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
+ if (fromFunctionCall != null) {
+ setValueByPath(toObject, ['functionCall'], fromFunctionCall);
+ }
+ const fromFunctionResponse = getValueByPath(fromObject, [
+ 'functionResponse',
+ ]);
+ if (fromFunctionResponse != null) {
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
+ }
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
+ if (fromInlineData != null) {
+ setValueByPath(toObject, ['inlineData'], fromInlineData);
+ }
+ const fromText = getValueByPath(fromObject, ['text']);
+ if (fromText != null) {
+ setValueByPath(toObject, ['text'], fromText);
+ }
+ const fromThought = getValueByPath(fromObject, ['thought']);
+ if (fromThought != null) {
+ setValueByPath(toObject, ['thought'], fromThought);
+ }
+ const fromThoughtSignature = getValueByPath(fromObject, [
+ 'thoughtSignature',
+ ]);
+ if (fromThoughtSignature != null) {
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
+ }
+ const fromVideoMetadata = getValueByPath(fromObject, [
+ 'videoMetadata',
+ ]);
+ if (fromVideoMetadata != null) {
+ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
+ }
+ if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ const fromMediaProcessing = getValueByPath(fromObject, [
+ 'mediaProcessing',
+ ]);
+ if (fromMediaProcessing != null) {
+ setValueByPath(toObject, ['mediaProcessing'], fromMediaProcessing);
+ }
+ return toObject;
+}
+function replicatedVoiceConfigToVertex$1(fromObject) {
+ const toObject = {};
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ const fromVoiceSampleAudio = getValueByPath(fromObject, [
+ 'voiceSampleAudio',
+ ]);
+ if (fromVoiceSampleAudio != null) {
+ setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
+ }
+ if (getValueByPath(fromObject, ['consentAudio']) !== undefined) {
+ throw new Error('consentAudio parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['voiceConsentSignature']) !== undefined) {
+ throw new Error('voiceConsentSignature parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function safetySettingToMldev$2(fromObject) {
+ const toObject = {};
+ const fromCategory = getValueByPath(fromObject, ['category']);
+ if (fromCategory != null) {
+ setValueByPath(toObject, ['category'], fromCategory);
+ }
+ if (getValueByPath(fromObject, ['method']) !== undefined) {
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromThreshold = getValueByPath(fromObject, ['threshold']);
+ if (fromThreshold != null) {
+ setValueByPath(toObject, ['threshold'], fromThreshold);
+ }
+ return toObject;
+}
+function sessionResumptionConfigToMldev$1(fromObject) {
+ const toObject = {};
+ const fromHandle = getValueByPath(fromObject, ['handle']);
+ if (fromHandle != null) {
+ setValueByPath(toObject, ['handle'], fromHandle);
+ }
+ if (getValueByPath(fromObject, ['transparent']) !== undefined) {
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function speakerVoiceConfigToVertex$1(fromObject) {
+ const toObject = {};
+ const fromSpeaker = getValueByPath(fromObject, ['speaker']);
+ if (fromSpeaker != null) {
+ setValueByPath(toObject, ['speaker'], fromSpeaker);
+ }
+ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
+ if (fromVoiceConfig != null) {
+ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
+ }
+ return toObject;
+}
+function speechConfigToVertex$1(fromObject) {
+ const toObject = {};
+ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
+ if (fromVoiceConfig != null) {
+ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
+ }
+ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
+ if (fromLanguageCode != null) {
+ setValueByPath(toObject, ['languageCode'], fromLanguageCode);
+ }
+ const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
+ 'multiSpeakerVoiceConfig',
+ ]);
+ if (fromMultiSpeakerVoiceConfig != null) {
+ setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex$1(fromMultiSpeakerVoiceConfig));
+ }
+ return toObject;
+}
+function toolToMldev$2(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
+ if (fromGoogleMaps != null) {
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
+ }
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
+ if (fromMcpServers != null) {
+ let transformedList = fromMcpServers;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['mcpServers'], transformedList);
+ }
+ const fromCodeExecution = getValueByPath(fromObject, [
+ 'codeExecution',
+ ]);
+ if (fromCodeExecution != null) {
+ setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
+ }
+ const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
+ if (fromComputerUse != null) {
+ setValueByPath(toObject, ['computerUse'], fromComputerUse);
+ }
+ if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
+ throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromFunctionDeclarations = getValueByPath(fromObject, [
+ 'functionDeclarations',
+ ]);
+ if (fromFunctionDeclarations != null) {
+ let transformedList = fromFunctionDeclarations;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['functionDeclarations'], transformedList);
+ }
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
+ if (fromGoogleSearch != null) {
+ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(fromGoogleSearch));
+ }
+ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
+ 'googleSearchRetrieval',
+ ]);
+ if (fromGoogleSearchRetrieval != null) {
+ setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
+ }
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
+ if (fromUrlContext != null) {
+ setValueByPath(toObject, ['urlContext'], fromUrlContext);
+ }
+ const fromFileSearch = getValueByPath(fromObject, ['fileSearch']);
+ if (fromFileSearch != null) {
+ setValueByPath(toObject, ['fileSearch'], fromFileSearch);
+ }
+ return toObject;
+}
+function toolToVertex$1(fromObject) {
+ const toObject = {};
+ const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
+ if (fromRetrieval != null) {
+ setValueByPath(toObject, ['retrieval'], fromRetrieval);
+ }
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
+ if (fromGoogleMaps != null) {
+ setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
+ }
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
+ if (fromMcpServers != null) {
+ let transformedList = fromMcpServers;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return mcpServerToVertex$1(item);
+ });
+ }
+ setValueByPath(toObject, ['mcpServers'], transformedList);
+ }
+ const fromCodeExecution = getValueByPath(fromObject, [
+ 'codeExecution',
+ ]);
+ if (fromCodeExecution != null) {
+ setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
+ }
+ const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
+ if (fromComputerUse != null) {
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex$1(fromComputerUse));
+ }
+ const fromEnterpriseWebSearch = getValueByPath(fromObject, [
+ 'enterpriseWebSearch',
+ ]);
+ if (fromEnterpriseWebSearch != null) {
+ setValueByPath(toObject, ['enterpriseWebSearch'], fromEnterpriseWebSearch);
+ }
+ const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
+ if (fromExaAiSearch != null) {
+ setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
+ }
+ const fromFunctionDeclarations = getValueByPath(fromObject, [
+ 'functionDeclarations',
+ ]);
+ if (fromFunctionDeclarations != null) {
+ let transformedList = fromFunctionDeclarations;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['functionDeclarations'], transformedList);
+ }
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
+ if (fromGoogleSearch != null) {
+ setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
+ }
+ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
+ 'googleSearchRetrieval',
+ ]);
+ if (fromGoogleSearchRetrieval != null) {
+ setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
+ }
+ const fromParallelAiSearch = getValueByPath(fromObject, [
+ 'parallelAiSearch',
+ ]);
+ if (fromParallelAiSearch != null) {
+ setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
+ }
+ const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
+ if (fromUrlContext != null) {
+ setValueByPath(toObject, ['urlContext'], fromUrlContext);
+ }
+ if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function usageMetadataFromVertex(fromObject) {
+ const toObject = {};
+ const fromResponseTokenCount = getValueByPath(fromObject, [
+ 'candidatesTokenCount',
+ ]);
+ if (fromResponseTokenCount != null) {
+ setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
+ }
+ const fromResponseTokensDetails = getValueByPath(fromObject, [
+ 'candidatesTokensDetails',
+ ]);
+ if (fromResponseTokensDetails != null) {
+ let transformedList = fromResponseTokensDetails;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['responseTokensDetails'], transformedList);
+ }
+ const fromCacheTokensDetails = getValueByPath(fromObject, [
+ 'cacheTokensDetails',
+ ]);
+ if (fromCacheTokensDetails != null) {
+ let transformedList = fromCacheTokensDetails;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
+ }
+ const fromCachedContentTokenCount = getValueByPath(fromObject, [
+ 'cachedContentTokenCount',
+ ]);
+ if (fromCachedContentTokenCount != null) {
+ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
+ }
+ const fromPromptTokenCount = getValueByPath(fromObject, [
+ 'promptTokenCount',
+ ]);
+ if (fromPromptTokenCount != null) {
+ setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
+ }
+ const fromPromptTokensDetails = getValueByPath(fromObject, [
+ 'promptTokensDetails',
+ ]);
+ if (fromPromptTokensDetails != null) {
+ let transformedList = fromPromptTokensDetails;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['promptTokensDetails'], transformedList);
+ }
+ const fromThoughtsTokenCount = getValueByPath(fromObject, [
+ 'thoughtsTokenCount',
+ ]);
+ if (fromThoughtsTokenCount != null) {
+ setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
+ }
+ const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
+ 'toolUsePromptTokenCount',
+ ]);
+ if (fromToolUsePromptTokenCount != null) {
+ setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
+ }
+ const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
+ 'toolUsePromptTokensDetails',
+ ]);
+ if (fromToolUsePromptTokensDetails != null) {
+ let transformedList = fromToolUsePromptTokensDetails;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
+ }
+ const fromTotalTokenCount = getValueByPath(fromObject, [
+ 'totalTokenCount',
+ ]);
+ if (fromTotalTokenCount != null) {
+ setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
+ }
+ const fromTrafficType = getValueByPath(fromObject, ['trafficType']);
+ if (fromTrafficType != null) {
+ setValueByPath(toObject, ['trafficType'], fromTrafficType);
+ }
+ return toObject;
+}
+function voiceActivityFromVertex(fromObject) {
+ const toObject = {};
+ const fromVoiceActivityType = getValueByPath(fromObject, ['type']);
+ if (fromVoiceActivityType != null) {
+ setValueByPath(toObject, ['voiceActivityType'], fromVoiceActivityType);
+ }
+ const fromAudioOffset = getValueByPath(fromObject, ['audioOffset']);
+ if (fromAudioOffset != null) {
+ setValueByPath(toObject, ['audioOffset'], fromAudioOffset);
+ }
+ return toObject;
+}
+function voiceConfigToVertex$1(fromObject) {
+ const toObject = {};
+ const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
+ 'replicatedVoiceConfig',
+ ]);
+ if (fromReplicatedVoiceConfig != null) {
+ setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex$1(fromReplicatedVoiceConfig));
+ }
+ const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
+ 'prebuiltVoiceConfig',
+ ]);
+ if (fromPrebuiltVoiceConfig != null) {
+ setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
+ }
+ return toObject;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+function authConfigToMldev$1(fromObject, _rootObject) {
+ const toObject = {};
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
+ if (fromApiKey != null) {
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
+ }
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
+ undefined) {
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function blobToMldev$1(fromObject, _rootObject) {
+ const toObject = {};
+ const fromData = getValueByPath(fromObject, ['data']);
+ if (fromData != null) {
+ setValueByPath(toObject, ['data'], fromData);
+ }
+ if (getValueByPath(fromObject, ['displayName']) !== undefined) {
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function candidateFromMldev(fromObject, rootObject) {
+ const toObject = {};
+ const fromContent = getValueByPath(fromObject, ['content']);
+ if (fromContent != null) {
+ setValueByPath(toObject, ['content'], fromContent);
+ }
+ const fromCitationMetadata = getValueByPath(fromObject, [
+ 'citationMetadata',
+ ]);
+ if (fromCitationMetadata != null) {
+ setValueByPath(toObject, ['citationMetadata'], citationMetadataFromMldev(fromCitationMetadata));
+ }
+ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
+ if (fromTokenCount != null) {
+ setValueByPath(toObject, ['tokenCount'], fromTokenCount);
+ }
+ const fromFinishReason = getValueByPath(fromObject, ['finishReason']);
+ if (fromFinishReason != null) {
+ setValueByPath(toObject, ['finishReason'], fromFinishReason);
+ }
+ const fromGroundingMetadata = getValueByPath(fromObject, [
+ 'groundingMetadata',
+ ]);
+ if (fromGroundingMetadata != null) {
+ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
+ }
+ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']);
+ if (fromAvgLogprobs != null) {
+ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);
+ }
+ const fromIndex = getValueByPath(fromObject, ['index']);
+ if (fromIndex != null) {
+ setValueByPath(toObject, ['index'], fromIndex);
+ }
+ const fromLogprobsResult = getValueByPath(fromObject, [
+ 'logprobsResult',
+ ]);
+ if (fromLogprobsResult != null) {
+ setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);
+ }
+ const fromSafetyRatings = getValueByPath(fromObject, [
+ 'safetyRatings',
+ ]);
+ if (fromSafetyRatings != null) {
+ let transformedList = fromSafetyRatings;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['safetyRatings'], transformedList);
+ }
+ const fromUrlContextMetadata = getValueByPath(fromObject, [
+ 'urlContextMetadata',
+ ]);
+ if (fromUrlContextMetadata != null) {
+ setValueByPath(toObject, ['urlContextMetadata'], fromUrlContextMetadata);
+ }
+ return toObject;
+}
+function citationMetadataFromMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromCitations = getValueByPath(fromObject, ['citationSources']);
+ if (fromCitations != null) {
+ let transformedList = fromCitations;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['citations'], transformedList);
+ }
+ return toObject;
+}
+function computeTokensParametersToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (fromContents != null) {
+ let transformedList = tContents(fromContents);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return contentToVertex$1(item);
+ });
+ }
+ setValueByPath(toObject, ['contents'], transformedList);
+ }
+ return toObject;
+}
+function computeTokensResponseFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromTokensInfo = getValueByPath(fromObject, ['tokensInfo']);
+ if (fromTokensInfo != null) {
+ let transformedList = fromTokensInfo;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['tokensInfo'], transformedList);
+ }
+ return toObject;
+}
+function computerUseToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromEnablePromptInjectionDetection = getValueByPath(fromObject, [
+ 'enablePromptInjectionDetection',
+ ]);
+ if (fromEnablePromptInjectionDetection != null) {
+ setValueByPath(toObject, ['enablePromptInjectionDetection'], fromEnablePromptInjectionDetection);
+ }
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
+ if (fromEnvironment != null) {
+ setValueByPath(toObject, ['environment'], fromEnvironment);
+ }
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
+ 'excludedPredefinedFunctions',
+ ]);
+ if (fromExcludedPredefinedFunctions != null) {
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
+ }
+ if (getValueByPath(fromObject, ['disabledSafetyPolicies']) !== undefined) {
+ throw new Error('disabledSafetyPolicies parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function contentEmbeddingFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromValues = getValueByPath(fromObject, ['values']);
+ if (fromValues != null) {
+ setValueByPath(toObject, ['values'], fromValues);
+ }
+ const fromStatistics = getValueByPath(fromObject, ['statistics']);
+ if (fromStatistics != null) {
+ setValueByPath(toObject, ['statistics'], contentEmbeddingStatisticsFromVertex(fromStatistics));
+ }
+ return toObject;
+}
+function contentEmbeddingStatisticsFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromTruncated = getValueByPath(fromObject, ['truncated']);
+ if (fromTruncated != null) {
+ setValueByPath(toObject, ['truncated'], fromTruncated);
+ }
+ const fromTokenCount = getValueByPath(fromObject, ['token_count']);
+ if (fromTokenCount != null) {
+ setValueByPath(toObject, ['tokenCount'], fromTokenCount);
+ }
+ const fromTokensDetails = getValueByPath(fromObject, [
+ 'tokensDetails',
+ ]);
+ if (fromTokensDetails != null) {
+ let transformedList = fromTokensDetails;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['tokensDetails'], transformedList);
+ }
+ return toObject;
+}
+function contentToMldev$1(fromObject, rootObject) {
+ const toObject = {};
+ const fromParts = getValueByPath(fromObject, ['parts']);
+ if (fromParts != null) {
+ let transformedList = fromParts;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return partToMldev$1(item);
+ });
+ }
+ setValueByPath(toObject, ['parts'], transformedList);
+ }
+ const fromRole = getValueByPath(fromObject, ['role']);
+ if (fromRole != null) {
+ setValueByPath(toObject, ['role'], fromRole);
+ }
+ return toObject;
+}
+function contentToVertex$1(fromObject, rootObject) {
+ const toObject = {};
+ const fromParts = getValueByPath(fromObject, ['parts']);
+ if (fromParts != null) {
+ let transformedList = fromParts;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return partToVertex$1(item);
+ });
+ }
+ setValueByPath(toObject, ['parts'], transformedList);
+ }
+ const fromRole = getValueByPath(fromObject, ['role']);
+ if (fromRole != null) {
+ setValueByPath(toObject, ['role'], fromRole);
+ }
+ return toObject;
+}
+function controlReferenceConfigToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromControlType = getValueByPath(fromObject, ['controlType']);
+ if (fromControlType != null) {
+ setValueByPath(toObject, ['controlType'], fromControlType);
+ }
+ const fromEnableControlImageComputation = getValueByPath(fromObject, [
+ 'enableControlImageComputation',
+ ]);
+ if (fromEnableControlImageComputation != null) {
+ setValueByPath(toObject, ['computeControl'], fromEnableControlImageComputation);
+ }
+ return toObject;
+}
+function countTokensConfigToMldev(fromObject, _rootObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) {
+ throw new Error('systemInstruction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['tools']) !== undefined) {
+ throw new Error('tools parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['generationConfig']) !== undefined) {
+ throw new Error('generationConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function countTokensConfigToVertex(fromObject, parentObject, rootObject) {
+ const toObject = {};
+ const fromSystemInstruction = getValueByPath(fromObject, [
+ 'systemInstruction',
+ ]);
+ if (parentObject !== undefined && fromSystemInstruction != null) {
+ setValueByPath(parentObject, ['systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
+ }
+ const fromTools = getValueByPath(fromObject, ['tools']);
+ if (parentObject !== undefined && fromTools != null) {
+ let transformedList = fromTools;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return toolToVertex(item);
+ });
+ }
+ setValueByPath(parentObject, ['tools'], transformedList);
+ }
+ const fromGenerationConfig = getValueByPath(fromObject, [
+ 'generationConfig',
+ ]);
+ if (parentObject !== undefined && fromGenerationConfig != null) {
+ setValueByPath(parentObject, ['generationConfig'], generationConfigToVertex(fromGenerationConfig));
+ }
+ return toObject;
+}
+function countTokensParametersToMldev(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (fromContents != null) {
+ let transformedList = tContents(fromContents);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return contentToMldev$1(item);
+ });
+ }
+ setValueByPath(toObject, ['contents'], transformedList);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ countTokensConfigToMldev(fromConfig);
+ }
+ return toObject;
+}
+function countTokensParametersToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (fromContents != null) {
+ let transformedList = tContents(fromContents);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return contentToVertex$1(item);
+ });
+ }
+ setValueByPath(toObject, ['contents'], transformedList);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ countTokensConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function countTokensResponseFromMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']);
+ if (fromTotalTokens != null) {
+ setValueByPath(toObject, ['totalTokens'], fromTotalTokens);
+ }
+ const fromCachedContentTokenCount = getValueByPath(fromObject, [
+ 'cachedContentTokenCount',
+ ]);
+ if (fromCachedContentTokenCount != null) {
+ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
+ }
+ return toObject;
+}
+function countTokensResponseFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']);
+ if (fromTotalTokens != null) {
+ setValueByPath(toObject, ['totalTokens'], fromTotalTokens);
+ }
+ return toObject;
+}
+function deleteModelParametersToMldev(apiClient, fromObject, _rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel));
+ }
+ return toObject;
+}
+function deleteModelParametersToVertex(apiClient, fromObject, _rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel));
+ }
+ return toObject;
+}
+function deleteModelResponseFromMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ return toObject;
+}
+function deleteModelResponseFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ return toObject;
+}
+function editImageConfigToVertex(fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']);
+ if (parentObject !== undefined && fromOutputGcsUri != null) {
+ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri);
+ }
+ const fromNegativePrompt = getValueByPath(fromObject, [
+ 'negativePrompt',
+ ]);
+ if (parentObject !== undefined && fromNegativePrompt != null) {
+ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt);
+ }
+ const fromNumberOfImages = getValueByPath(fromObject, [
+ 'numberOfImages',
+ ]);
+ if (parentObject !== undefined && fromNumberOfImages != null) {
+ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages);
+ }
+ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
+ if (parentObject !== undefined && fromAspectRatio != null) {
+ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio);
+ }
+ const fromGuidanceScale = getValueByPath(fromObject, [
+ 'guidanceScale',
+ ]);
+ if (parentObject !== undefined && fromGuidanceScale != null) {
+ setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (parentObject !== undefined && fromSeed != null) {
+ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);
+ }
+ const fromSafetyFilterLevel = getValueByPath(fromObject, [
+ 'safetyFilterLevel',
+ ]);
+ if (parentObject !== undefined && fromSafetyFilterLevel != null) {
+ setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel);
+ }
+ const fromPersonGeneration = getValueByPath(fromObject, [
+ 'personGeneration',
+ ]);
+ if (parentObject !== undefined && fromPersonGeneration != null) {
+ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
+ }
+ const fromIncludeSafetyAttributes = getValueByPath(fromObject, [
+ 'includeSafetyAttributes',
+ ]);
+ if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {
+ setValueByPath(parentObject, ['parameters', 'includeSafetyAttributes'], fromIncludeSafetyAttributes);
+ }
+ const fromIncludeRaiReason = getValueByPath(fromObject, [
+ 'includeRaiReason',
+ ]);
+ if (parentObject !== undefined && fromIncludeRaiReason != null) {
+ setValueByPath(parentObject, ['parameters', 'includeRaiReason'], fromIncludeRaiReason);
+ }
+ const fromLanguage = getValueByPath(fromObject, ['language']);
+ if (parentObject !== undefined && fromLanguage != null) {
+ setValueByPath(parentObject, ['parameters', 'language'], fromLanguage);
+ }
+ const fromOutputMimeType = getValueByPath(fromObject, [
+ 'outputMimeType',
+ ]);
+ if (parentObject !== undefined && fromOutputMimeType != null) {
+ setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType);
+ }
+ const fromOutputCompressionQuality = getValueByPath(fromObject, [
+ 'outputCompressionQuality',
+ ]);
+ if (parentObject !== undefined && fromOutputCompressionQuality != null) {
+ setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
+ }
+ const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']);
+ if (parentObject !== undefined && fromAddWatermark != null) {
+ setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark);
+ }
+ const fromLabels = getValueByPath(fromObject, ['labels']);
+ if (parentObject !== undefined && fromLabels != null) {
+ setValueByPath(parentObject, ['labels'], fromLabels);
+ }
+ const fromEditMode = getValueByPath(fromObject, ['editMode']);
+ if (parentObject !== undefined && fromEditMode != null) {
+ setValueByPath(parentObject, ['parameters', 'editMode'], fromEditMode);
+ }
+ const fromBaseSteps = getValueByPath(fromObject, ['baseSteps']);
+ if (parentObject !== undefined && fromBaseSteps != null) {
+ setValueByPath(parentObject, ['parameters', 'editConfig', 'baseSteps'], fromBaseSteps);
+ }
+ return toObject;
+}
+function editImageParametersInternalToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromPrompt = getValueByPath(fromObject, ['prompt']);
+ if (fromPrompt != null) {
+ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);
+ }
+ const fromReferenceImages = getValueByPath(fromObject, [
+ 'referenceImages',
+ ]);
+ if (fromReferenceImages != null) {
+ let transformedList = fromReferenceImages;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return referenceImageAPIInternalToVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['instances[0]', 'referenceImages'], transformedList);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ editImageConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function editImageResponseFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromGeneratedImages = getValueByPath(fromObject, [
+ 'predictions',
+ ]);
+ if (fromGeneratedImages != null) {
+ let transformedList = fromGeneratedImages;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return generatedImageFromVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['generatedImages'], transformedList);
+ }
+ return toObject;
+}
+function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ const fromTaskType = getValueByPath(fromObject, ['taskType']);
+ if (parentObject !== undefined && fromTaskType != null) {
+ setValueByPath(parentObject, ['requests[]', 'taskType'], fromTaskType);
+ }
+ const fromTitle = getValueByPath(fromObject, ['title']);
+ if (parentObject !== undefined && fromTitle != null) {
+ setValueByPath(parentObject, ['requests[]', 'title'], fromTitle);
+ }
+ const fromOutputDimensionality = getValueByPath(fromObject, [
+ 'outputDimensionality',
+ ]);
+ if (parentObject !== undefined && fromOutputDimensionality != null) {
+ setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
+ }
+ if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
+ throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
+ throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
+ throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
+ throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function embedContentConfigToVertex(fromObject, parentObject, rootObject) {
+ const toObject = {};
+ let discriminatorTaskType = getValueByPath(rootObject, [
+ 'embeddingApiType',
+ ]);
+ if (discriminatorTaskType === undefined) {
+ discriminatorTaskType = 'PREDICT';
+ }
+ if (discriminatorTaskType === 'PREDICT') {
+ const fromTaskType = getValueByPath(fromObject, ['taskType']);
+ if (parentObject !== undefined && fromTaskType != null) {
+ setValueByPath(parentObject, ['instances[]', 'task_type'], fromTaskType);
+ }
+ }
+ else if (discriminatorTaskType === 'EMBED_CONTENT') {
+ const fromTaskType = getValueByPath(fromObject, ['taskType']);
+ if (parentObject !== undefined && fromTaskType != null) {
+ setValueByPath(parentObject, ['embedContentConfig', 'taskType'], fromTaskType);
+ }
+ }
+ let discriminatorTitle = getValueByPath(rootObject, [
+ 'embeddingApiType',
+ ]);
+ if (discriminatorTitle === undefined) {
+ discriminatorTitle = 'PREDICT';
+ }
+ if (discriminatorTitle === 'PREDICT') {
+ const fromTitle = getValueByPath(fromObject, ['title']);
+ if (parentObject !== undefined && fromTitle != null) {
+ setValueByPath(parentObject, ['instances[]', 'title'], fromTitle);
+ }
+ }
+ else if (discriminatorTitle === 'EMBED_CONTENT') {
+ const fromTitle = getValueByPath(fromObject, ['title']);
+ if (parentObject !== undefined && fromTitle != null) {
+ setValueByPath(parentObject, ['embedContentConfig', 'title'], fromTitle);
+ }
+ }
+ let discriminatorOutputDimensionality = getValueByPath(rootObject, [
+ 'embeddingApiType',
+ ]);
+ if (discriminatorOutputDimensionality === undefined) {
+ discriminatorOutputDimensionality = 'PREDICT';
+ }
+ if (discriminatorOutputDimensionality === 'PREDICT') {
+ const fromOutputDimensionality = getValueByPath(fromObject, [
+ 'outputDimensionality',
+ ]);
+ if (parentObject !== undefined && fromOutputDimensionality != null) {
+ setValueByPath(parentObject, ['parameters', 'outputDimensionality'], fromOutputDimensionality);
+ }
+ }
+ else if (discriminatorOutputDimensionality === 'EMBED_CONTENT') {
+ const fromOutputDimensionality = getValueByPath(fromObject, [
+ 'outputDimensionality',
+ ]);
+ if (parentObject !== undefined && fromOutputDimensionality != null) {
+ setValueByPath(parentObject, ['embedContentConfig', 'outputDimensionality'], fromOutputDimensionality);
+ }
+ }
+ let discriminatorMimeType = getValueByPath(rootObject, [
+ 'embeddingApiType',
+ ]);
+ if (discriminatorMimeType === undefined) {
+ discriminatorMimeType = 'PREDICT';
+ }
+ if (discriminatorMimeType === 'PREDICT') {
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (parentObject !== undefined && fromMimeType != null) {
+ setValueByPath(parentObject, ['instances[]', 'mimeType'], fromMimeType);
+ }
+ }
+ let discriminatorAutoTruncate = getValueByPath(rootObject, [
+ 'embeddingApiType',
+ ]);
+ if (discriminatorAutoTruncate === undefined) {
+ discriminatorAutoTruncate = 'PREDICT';
+ }
+ if (discriminatorAutoTruncate === 'PREDICT') {
+ const fromAutoTruncate = getValueByPath(fromObject, [
+ 'autoTruncate',
+ ]);
+ if (parentObject !== undefined && fromAutoTruncate != null) {
+ setValueByPath(parentObject, ['parameters', 'autoTruncate'], fromAutoTruncate);
+ }
+ }
+ else if (discriminatorAutoTruncate === 'EMBED_CONTENT') {
+ const fromAutoTruncate = getValueByPath(fromObject, [
+ 'autoTruncate',
+ ]);
+ if (parentObject !== undefined && fromAutoTruncate != null) {
+ setValueByPath(parentObject, ['embedContentConfig', 'autoTruncate'], fromAutoTruncate);
+ }
+ }
+ let discriminatorDocumentOcr = getValueByPath(rootObject, [
+ 'embeddingApiType',
+ ]);
+ if (discriminatorDocumentOcr === undefined) {
+ discriminatorDocumentOcr = 'PREDICT';
+ }
+ if (discriminatorDocumentOcr === 'EMBED_CONTENT') {
+ const fromDocumentOcr = getValueByPath(fromObject, ['documentOcr']);
+ if (parentObject !== undefined && fromDocumentOcr != null) {
+ setValueByPath(parentObject, ['embedContentConfig', 'documentOcr'], fromDocumentOcr);
+ }
+ }
+ let discriminatorAudioTrackExtraction = getValueByPath(rootObject, [
+ 'embeddingApiType',
+ ]);
+ if (discriminatorAudioTrackExtraction === undefined) {
+ discriminatorAudioTrackExtraction = 'PREDICT';
+ }
+ if (discriminatorAudioTrackExtraction === 'EMBED_CONTENT') {
+ const fromAudioTrackExtraction = getValueByPath(fromObject, [
+ 'audioTrackExtraction',
+ ]);
+ if (parentObject !== undefined && fromAudioTrackExtraction != null) {
+ setValueByPath(parentObject, ['embedContentConfig', 'audioTrackExtraction'], fromAudioTrackExtraction);
+ }
+ }
+ return toObject;
+}
+function embedContentParametersPrivateToMldev(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (fromContents != null) {
+ let transformedList = tContentsForEmbed(apiClient, fromContents);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['requests[]', 'content'], transformedList);
+ }
+ const fromContent = getValueByPath(fromObject, ['content']);
+ if (fromContent != null) {
+ contentToMldev$1(tContent(fromContent));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ embedContentConfigToMldev(fromConfig, toObject);
+ }
+ const fromModelForEmbedContent = getValueByPath(fromObject, ['model']);
+ if (fromModelForEmbedContent !== undefined) {
+ setValueByPath(toObject, ['requests[]', 'model'], tModel(apiClient, fromModelForEmbedContent));
+ }
+ return toObject;
+}
+function embedContentParametersPrivateToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ let discriminatorContents = getValueByPath(rootObject, [
+ 'embeddingApiType',
+ ]);
+ if (discriminatorContents === undefined) {
+ discriminatorContents = 'PREDICT';
+ }
+ if (discriminatorContents === 'PREDICT') {
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (fromContents != null) {
+ let transformedList = tContentsForEmbed(apiClient, fromContents);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['instances[]', 'content'], transformedList);
+ }
+ }
+ let discriminatorContent = getValueByPath(rootObject, [
+ 'embeddingApiType',
+ ]);
+ if (discriminatorContent === undefined) {
+ discriminatorContent = 'PREDICT';
+ }
+ if (discriminatorContent === 'EMBED_CONTENT') {
+ const fromContent = getValueByPath(fromObject, ['content']);
+ if (fromContent != null) {
+ setValueByPath(toObject, ['content'], contentToVertex$1(tContent(fromContent)));
+ }
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ embedContentConfigToVertex(fromConfig, toObject, rootObject);
+ }
+ return toObject;
+}
+function embedContentResponseFromMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromEmbeddings = getValueByPath(fromObject, ['embeddings']);
+ if (fromEmbeddings != null) {
+ let transformedList = fromEmbeddings;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['embeddings'], transformedList);
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ return toObject;
+}
+function embedContentResponseFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromEmbeddings = getValueByPath(fromObject, [
+ 'predictions[]',
+ 'embeddings',
+ ]);
+ if (fromEmbeddings != null) {
+ let transformedList = fromEmbeddings;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return contentEmbeddingFromVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['embeddings'], transformedList);
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ if (rootObject &&
+ getValueByPath(rootObject, ['embeddingApiType']) === 'EMBED_CONTENT') {
+ const embedding = getValueByPath(fromObject, ['embedding']);
+ const usageMetadata = getValueByPath(fromObject, ['usageMetadata']);
+ const truncated = getValueByPath(fromObject, ['truncated']);
+ if (embedding) {
+ const stats = {};
+ if (usageMetadata &&
+ usageMetadata['promptTokenCount']) {
+ stats.tokenCount = usageMetadata['promptTokenCount'];
+ }
+ if (usageMetadata &&
+ usageMetadata['promptTokensDetails']) {
+ stats.tokensDetails = usageMetadata['promptTokensDetails'];
+ }
+ if (truncated) {
+ stats.truncated = truncated;
+ }
+ embedding.statistics = stats;
+ setValueByPath(toObject, ['embeddings'], [embedding]);
+ }
+ }
+ return toObject;
+}
+function endpointFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['endpoint']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromDeployedModelId = getValueByPath(fromObject, [
+ 'deployedModelId',
+ ]);
+ if (fromDeployedModelId != null) {
+ setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId);
+ }
+ return toObject;
+}
+function fileDataToMldev$1(fromObject, _rootObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['displayName']) !== undefined) {
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromFileUri = getValueByPath(fromObject, ['fileUri']);
+ if (fromFileUri != null) {
+ setValueByPath(toObject, ['fileUri'], fromFileUri);
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function functionCallToMldev$1(fromObject, _rootObject) {
+ const toObject = {};
+ const fromArgs = getValueByPath(fromObject, ['args']);
+ if (fromArgs != null) {
+ setValueByPath(toObject, ['args'], fromArgs);
+ }
+ const fromId = getValueByPath(fromObject, ['id']);
+ if (fromId != null) {
+ setValueByPath(toObject, ['id'], fromId);
+ }
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function functionCallingConfigToMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromAllowedFunctionNames = getValueByPath(fromObject, [
+ 'allowedFunctionNames',
+ ]);
+ if (fromAllowedFunctionNames != null) {
+ setValueByPath(toObject, ['allowedFunctionNames'], fromAllowedFunctionNames);
+ }
+ const fromMode = getValueByPath(fromObject, ['mode']);
+ if (fromMode != null) {
+ setValueByPath(toObject, ['mode'], fromMode);
+ }
+ if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
+ undefined) {
+ throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootObject) {
+ const toObject = {};
+ const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
+ if (parentObject !== undefined && fromServiceTier != null) {
+ setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
+ }
+ const fromSystemInstruction = getValueByPath(fromObject, [
+ 'systemInstruction',
+ ]);
+ if (parentObject !== undefined && fromSystemInstruction != null) {
+ setValueByPath(parentObject, ['systemInstruction'], contentToMldev$1(tContent(fromSystemInstruction)));
+ }
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
+ if (fromTemperature != null) {
+ setValueByPath(toObject, ['temperature'], fromTemperature);
+ }
+ const fromTopP = getValueByPath(fromObject, ['topP']);
+ if (fromTopP != null) {
+ setValueByPath(toObject, ['topP'], fromTopP);
+ }
+ const fromTopK = getValueByPath(fromObject, ['topK']);
+ if (fromTopK != null) {
+ setValueByPath(toObject, ['topK'], fromTopK);
+ }
+ const fromCandidateCount = getValueByPath(fromObject, [
+ 'candidateCount',
+ ]);
+ if (fromCandidateCount != null) {
+ setValueByPath(toObject, ['candidateCount'], fromCandidateCount);
+ }
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
+ 'maxOutputTokens',
+ ]);
+ if (fromMaxOutputTokens != null) {
+ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);
+ }
+ const fromStopSequences = getValueByPath(fromObject, [
+ 'stopSequences',
+ ]);
+ if (fromStopSequences != null) {
+ setValueByPath(toObject, ['stopSequences'], fromStopSequences);
+ }
+ const fromResponseLogprobs = getValueByPath(fromObject, [
+ 'responseLogprobs',
+ ]);
+ if (fromResponseLogprobs != null) {
+ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);
+ }
+ const fromLogprobs = getValueByPath(fromObject, ['logprobs']);
+ if (fromLogprobs != null) {
+ setValueByPath(toObject, ['logprobs'], fromLogprobs);
+ }
+ const fromPresencePenalty = getValueByPath(fromObject, [
+ 'presencePenalty',
+ ]);
+ if (fromPresencePenalty != null) {
+ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);
+ }
+ const fromFrequencyPenalty = getValueByPath(fromObject, [
+ 'frequencyPenalty',
+ ]);
+ if (fromFrequencyPenalty != null) {
+ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (fromSeed != null) {
+ setValueByPath(toObject, ['seed'], fromSeed);
+ }
+ const fromResponseMimeType = getValueByPath(fromObject, [
+ 'responseMimeType',
+ ]);
+ if (fromResponseMimeType != null) {
+ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);
+ }
+ const fromResponseSchema = getValueByPath(fromObject, [
+ 'responseSchema',
+ ]);
+ if (fromResponseSchema != null) {
+ setValueByPath(toObject, ['responseSchema'], tSchema(fromResponseSchema));
+ }
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
+ 'responseJsonSchema',
+ ]);
+ if (fromResponseJsonSchema != null) {
+ setValueByPath(toObject, ['responseJsonSchema'], tJsonSchema(fromResponseJsonSchema));
+ }
+ if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
+ throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
+ throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromSafetySettings = getValueByPath(fromObject, [
+ 'safetySettings',
+ ]);
+ if (parentObject !== undefined && fromSafetySettings != null) {
+ let transformedList = fromSafetySettings;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return safetySettingToMldev$1(item);
+ });
+ }
+ setValueByPath(parentObject, ['safetySettings'], transformedList);
+ }
+ const fromTools = getValueByPath(fromObject, ['tools']);
+ if (parentObject !== undefined && fromTools != null) {
+ let transformedList = tTools(fromTools);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return toolToMldev$1(tTool(item));
+ });
+ }
+ setValueByPath(parentObject, ['tools'], transformedList);
+ }
+ const fromToolConfig = getValueByPath(fromObject, ['toolConfig']);
+ if (parentObject !== undefined && fromToolConfig != null) {
+ setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(fromToolConfig));
+ }
+ if (getValueByPath(fromObject, ['labels']) !== undefined) {
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromCachedContent = getValueByPath(fromObject, [
+ 'cachedContent',
+ ]);
+ if (parentObject !== undefined && fromCachedContent != null) {
+ setValueByPath(parentObject, ['cachedContent'], tCachedContentName(apiClient, fromCachedContent));
+ }
+ const fromResponseModalities = getValueByPath(fromObject, [
+ 'responseModalities',
+ ]);
+ if (fromResponseModalities != null) {
+ setValueByPath(toObject, ['responseModalities'], fromResponseModalities);
+ }
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
+ if (fromSpeechConfig != null) {
+ setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
+ }
+ if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
+ throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromThinkingConfig = getValueByPath(fromObject, [
+ 'thinkingConfig',
+ ]);
+ if (fromThinkingConfig != null) {
+ setValueByPath(toObject, ['thinkingConfig'], fromThinkingConfig);
+ }
+ const fromAudioTranscriptionConfig = getValueByPath(fromObject, [
+ 'audioTranscriptionConfig',
+ ]);
+ if (fromAudioTranscriptionConfig != null) {
+ setValueByPath(toObject, ['audioTranscriptionConfig'], fromAudioTranscriptionConfig);
+ }
+ const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
+ if (fromImageConfig != null) {
+ setValueByPath(toObject, ['imageConfig'], imageConfigToMldev(fromImageConfig));
+ }
+ const fromEnableEnhancedCivicAnswers = getValueByPath(fromObject, [
+ 'enableEnhancedCivicAnswers',
+ ]);
+ if (fromEnableEnhancedCivicAnswers != null) {
+ setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
+ }
+ if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
+ throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function generateContentConfigToVertex(apiClient, fromObject, parentObject, rootObject) {
+ const toObject = {};
+ const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
+ if (parentObject !== undefined && fromServiceTier != null) {
+ setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
+ }
+ const fromSystemInstruction = getValueByPath(fromObject, [
+ 'systemInstruction',
+ ]);
+ if (parentObject !== undefined && fromSystemInstruction != null) {
+ setValueByPath(parentObject, ['systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
+ }
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
+ if (fromTemperature != null) {
+ setValueByPath(toObject, ['temperature'], fromTemperature);
+ }
+ const fromTopP = getValueByPath(fromObject, ['topP']);
+ if (fromTopP != null) {
+ setValueByPath(toObject, ['topP'], fromTopP);
+ }
+ const fromTopK = getValueByPath(fromObject, ['topK']);
+ if (fromTopK != null) {
+ setValueByPath(toObject, ['topK'], fromTopK);
+ }
+ const fromCandidateCount = getValueByPath(fromObject, [
+ 'candidateCount',
+ ]);
+ if (fromCandidateCount != null) {
+ setValueByPath(toObject, ['candidateCount'], fromCandidateCount);
+ }
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
+ 'maxOutputTokens',
+ ]);
+ if (fromMaxOutputTokens != null) {
+ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);
+ }
+ const fromStopSequences = getValueByPath(fromObject, [
+ 'stopSequences',
+ ]);
+ if (fromStopSequences != null) {
+ setValueByPath(toObject, ['stopSequences'], fromStopSequences);
+ }
+ const fromResponseLogprobs = getValueByPath(fromObject, [
+ 'responseLogprobs',
+ ]);
+ if (fromResponseLogprobs != null) {
+ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);
+ }
+ const fromLogprobs = getValueByPath(fromObject, ['logprobs']);
+ if (fromLogprobs != null) {
+ setValueByPath(toObject, ['logprobs'], fromLogprobs);
+ }
+ const fromPresencePenalty = getValueByPath(fromObject, [
+ 'presencePenalty',
+ ]);
+ if (fromPresencePenalty != null) {
+ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);
+ }
+ const fromFrequencyPenalty = getValueByPath(fromObject, [
+ 'frequencyPenalty',
+ ]);
+ if (fromFrequencyPenalty != null) {
+ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (fromSeed != null) {
+ setValueByPath(toObject, ['seed'], fromSeed);
+ }
+ const fromResponseMimeType = getValueByPath(fromObject, [
+ 'responseMimeType',
+ ]);
+ if (fromResponseMimeType != null) {
+ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);
+ }
+ const fromResponseSchema = getValueByPath(fromObject, [
+ 'responseSchema',
+ ]);
+ if (fromResponseSchema != null) {
+ setValueByPath(toObject, ['responseSchema'], tSchema(fromResponseSchema));
+ }
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
+ 'responseJsonSchema',
+ ]);
+ if (fromResponseJsonSchema != null) {
+ setValueByPath(toObject, ['responseJsonSchema'], tJsonSchema(fromResponseJsonSchema));
+ }
+ const fromRoutingConfig = getValueByPath(fromObject, [
+ 'routingConfig',
+ ]);
+ if (fromRoutingConfig != null) {
+ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);
+ }
+ const fromModelSelectionConfig = getValueByPath(fromObject, [
+ 'modelSelectionConfig',
+ ]);
+ if (fromModelSelectionConfig != null) {
+ setValueByPath(toObject, ['modelConfig'], fromModelSelectionConfig);
+ }
+ const fromSafetySettings = getValueByPath(fromObject, [
+ 'safetySettings',
+ ]);
+ if (parentObject !== undefined && fromSafetySettings != null) {
+ let transformedList = fromSafetySettings;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(parentObject, ['safetySettings'], transformedList);
+ }
+ const fromTools = getValueByPath(fromObject, ['tools']);
+ if (parentObject !== undefined && fromTools != null) {
+ let transformedList = tTools(fromTools);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return toolToVertex(tTool(item));
+ });
+ }
+ setValueByPath(parentObject, ['tools'], transformedList);
+ }
+ const fromToolConfig = getValueByPath(fromObject, ['toolConfig']);
+ if (parentObject !== undefined && fromToolConfig != null) {
+ setValueByPath(parentObject, ['toolConfig'], toolConfigToVertex(fromToolConfig));
+ }
+ const fromLabels = getValueByPath(fromObject, ['labels']);
+ if (parentObject !== undefined && fromLabels != null) {
+ setValueByPath(parentObject, ['labels'], fromLabels);
+ }
+ const fromCachedContent = getValueByPath(fromObject, [
+ 'cachedContent',
+ ]);
+ if (parentObject !== undefined && fromCachedContent != null) {
+ setValueByPath(parentObject, ['cachedContent'], tCachedContentName(apiClient, fromCachedContent));
+ }
+ const fromResponseModalities = getValueByPath(fromObject, [
+ 'responseModalities',
+ ]);
+ if (fromResponseModalities != null) {
+ setValueByPath(toObject, ['responseModalities'], fromResponseModalities);
+ }
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
+ if (fromSpeechConfig != null) {
+ setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(tSpeechConfig(fromSpeechConfig)));
+ }
+ const fromAudioTimestamp = getValueByPath(fromObject, [
+ 'audioTimestamp',
+ ]);
+ if (fromAudioTimestamp != null) {
+ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);
+ }
+ const fromThinkingConfig = getValueByPath(fromObject, [
+ 'thinkingConfig',
+ ]);
+ if (fromThinkingConfig != null) {
+ setValueByPath(toObject, ['thinkingConfig'], fromThinkingConfig);
+ }
+ const fromAudioTranscriptionConfig = getValueByPath(fromObject, [
+ 'audioTranscriptionConfig',
+ ]);
+ if (fromAudioTranscriptionConfig != null) {
+ setValueByPath(toObject, ['audioTranscriptionConfig'], fromAudioTranscriptionConfig);
+ }
+ const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
+ if (fromImageConfig != null) {
+ setValueByPath(toObject, ['imageConfig'], imageConfigToVertex(fromImageConfig));
+ }
+ if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
+ undefined) {
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ const fromModelArmorConfig = getValueByPath(fromObject, [
+ 'modelArmorConfig',
+ ]);
+ if (parentObject !== undefined && fromModelArmorConfig != null) {
+ setValueByPath(parentObject, ['modelArmorConfig'], fromModelArmorConfig);
+ }
+ return toObject;
+}
+function generateContentParametersToMldev(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (fromContents != null) {
+ let transformedList = tContents(fromContents);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return contentToMldev$1(item);
+ });
+ }
+ setValueByPath(toObject, ['contents'], transformedList);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ setValueByPath(toObject, ['generationConfig'], generateContentConfigToMldev(apiClient, fromConfig, toObject));
+ }
+ return toObject;
+}
+function generateContentParametersToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (fromContents != null) {
+ let transformedList = tContents(fromContents);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return contentToVertex$1(item);
+ });
+ }
+ setValueByPath(toObject, ['contents'], transformedList);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ setValueByPath(toObject, ['generationConfig'], generateContentConfigToVertex(apiClient, fromConfig, toObject));
+ }
+ return toObject;
+}
+function generateContentResponseFromMldev(fromObject, rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromCandidates = getValueByPath(fromObject, ['candidates']);
+ if (fromCandidates != null) {
+ let transformedList = fromCandidates;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return candidateFromMldev(item);
+ });
+ }
+ setValueByPath(toObject, ['candidates'], transformedList);
+ }
+ const fromModelVersion = getValueByPath(fromObject, ['modelVersion']);
+ if (fromModelVersion != null) {
+ setValueByPath(toObject, ['modelVersion'], fromModelVersion);
+ }
+ const fromPromptFeedback = getValueByPath(fromObject, [
+ 'promptFeedback',
+ ]);
+ if (fromPromptFeedback != null) {
+ setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);
+ }
+ const fromResponseId = getValueByPath(fromObject, ['responseId']);
+ if (fromResponseId != null) {
+ setValueByPath(toObject, ['responseId'], fromResponseId);
+ }
+ const fromUsageMetadata = getValueByPath(fromObject, [
+ 'usageMetadata',
+ ]);
+ if (fromUsageMetadata != null) {
+ setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
+ }
+ const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
+ if (fromModelStatus != null) {
+ setValueByPath(toObject, ['modelStatus'], fromModelStatus);
+ }
+ return toObject;
+}
+function generateContentResponseFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromCandidates = getValueByPath(fromObject, ['candidates']);
+ if (fromCandidates != null) {
+ let transformedList = fromCandidates;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['candidates'], transformedList);
+ }
+ const fromCreateTime = getValueByPath(fromObject, ['createTime']);
+ if (fromCreateTime != null) {
+ setValueByPath(toObject, ['createTime'], fromCreateTime);
+ }
+ const fromModelVersion = getValueByPath(fromObject, ['modelVersion']);
+ if (fromModelVersion != null) {
+ setValueByPath(toObject, ['modelVersion'], fromModelVersion);
+ }
+ const fromPromptFeedback = getValueByPath(fromObject, [
+ 'promptFeedback',
+ ]);
+ if (fromPromptFeedback != null) {
+ setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);
+ }
+ const fromResponseId = getValueByPath(fromObject, ['responseId']);
+ if (fromResponseId != null) {
+ setValueByPath(toObject, ['responseId'], fromResponseId);
+ }
+ const fromUsageMetadata = getValueByPath(fromObject, [
+ 'usageMetadata',
+ ]);
+ if (fromUsageMetadata != null) {
+ setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
+ }
+ return toObject;
+}
+function generateImagesConfigToVertex(fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']);
+ if (parentObject !== undefined && fromOutputGcsUri != null) {
+ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri);
+ }
+ const fromNegativePrompt = getValueByPath(fromObject, [
+ 'negativePrompt',
+ ]);
+ if (parentObject !== undefined && fromNegativePrompt != null) {
+ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt);
+ }
+ const fromNumberOfImages = getValueByPath(fromObject, [
+ 'numberOfImages',
+ ]);
+ if (parentObject !== undefined && fromNumberOfImages != null) {
+ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages);
+ }
+ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
+ if (parentObject !== undefined && fromAspectRatio != null) {
+ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio);
+ }
+ const fromGuidanceScale = getValueByPath(fromObject, [
+ 'guidanceScale',
+ ]);
+ if (parentObject !== undefined && fromGuidanceScale != null) {
+ setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (parentObject !== undefined && fromSeed != null) {
+ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);
+ }
+ const fromSafetyFilterLevel = getValueByPath(fromObject, [
+ 'safetyFilterLevel',
+ ]);
+ if (parentObject !== undefined && fromSafetyFilterLevel != null) {
+ setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel);
+ }
+ const fromPersonGeneration = getValueByPath(fromObject, [
+ 'personGeneration',
+ ]);
+ if (parentObject !== undefined && fromPersonGeneration != null) {
+ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
+ }
+ const fromIncludeSafetyAttributes = getValueByPath(fromObject, [
+ 'includeSafetyAttributes',
+ ]);
+ if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {
+ setValueByPath(parentObject, ['parameters', 'includeSafetyAttributes'], fromIncludeSafetyAttributes);
+ }
+ const fromIncludeRaiReason = getValueByPath(fromObject, [
+ 'includeRaiReason',
+ ]);
+ if (parentObject !== undefined && fromIncludeRaiReason != null) {
+ setValueByPath(parentObject, ['parameters', 'includeRaiReason'], fromIncludeRaiReason);
+ }
+ const fromLanguage = getValueByPath(fromObject, ['language']);
+ if (parentObject !== undefined && fromLanguage != null) {
+ setValueByPath(parentObject, ['parameters', 'language'], fromLanguage);
+ }
+ const fromOutputMimeType = getValueByPath(fromObject, [
+ 'outputMimeType',
+ ]);
+ if (parentObject !== undefined && fromOutputMimeType != null) {
+ setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType);
+ }
+ const fromOutputCompressionQuality = getValueByPath(fromObject, [
+ 'outputCompressionQuality',
+ ]);
+ if (parentObject !== undefined && fromOutputCompressionQuality != null) {
+ setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
+ }
+ const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']);
+ if (parentObject !== undefined && fromAddWatermark != null) {
+ setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark);
+ }
+ const fromLabels = getValueByPath(fromObject, ['labels']);
+ if (parentObject !== undefined && fromLabels != null) {
+ setValueByPath(parentObject, ['labels'], fromLabels);
+ }
+ const fromImageSize = getValueByPath(fromObject, ['imageSize']);
+ if (parentObject !== undefined && fromImageSize != null) {
+ setValueByPath(parentObject, ['parameters', 'sampleImageSize'], fromImageSize);
+ }
+ const fromEnhancePrompt = getValueByPath(fromObject, [
+ 'enhancePrompt',
+ ]);
+ if (parentObject !== undefined && fromEnhancePrompt != null) {
+ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
+ }
+ return toObject;
+}
+function generateImagesParametersToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromPrompt = getValueByPath(fromObject, ['prompt']);
+ if (fromPrompt != null) {
+ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ generateImagesConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function generateImagesResponseFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromGeneratedImages = getValueByPath(fromObject, [
+ 'predictions',
+ ]);
+ if (fromGeneratedImages != null) {
+ let transformedList = fromGeneratedImages;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return generatedImageFromVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['generatedImages'], transformedList);
+ }
+ const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [
+ 'positivePromptSafetyAttributes',
+ ]);
+ if (fromPositivePromptSafetyAttributes != null) {
+ setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromVertex(fromPositivePromptSafetyAttributes));
+ }
+ return toObject;
+}
+function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
+ const toObject = {};
+ const fromNumberOfVideos = getValueByPath(fromObject, [
+ 'numberOfVideos',
+ ]);
+ if (parentObject !== undefined && fromNumberOfVideos != null) {
+ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos);
+ }
+ if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
+ throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['fps']) !== undefined) {
+ throw new Error('fps parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromDurationSeconds = getValueByPath(fromObject, [
+ 'durationSeconds',
+ ]);
+ if (parentObject !== undefined && fromDurationSeconds != null) {
+ setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds);
+ }
+ if (getValueByPath(fromObject, ['seed']) !== undefined) {
+ throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
+ if (parentObject !== undefined && fromAspectRatio != null) {
+ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio);
+ }
+ const fromResolution = getValueByPath(fromObject, ['resolution']);
+ if (parentObject !== undefined && fromResolution != null) {
+ setValueByPath(parentObject, ['parameters', 'resolution'], fromResolution);
+ }
+ const fromPersonGeneration = getValueByPath(fromObject, [
+ 'personGeneration',
+ ]);
+ if (parentObject !== undefined && fromPersonGeneration != null) {
+ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
+ }
+ if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {
+ throw new Error('pubsubTopic parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromNegativePrompt = getValueByPath(fromObject, [
+ 'negativePrompt',
+ ]);
+ if (parentObject !== undefined && fromNegativePrompt != null) {
+ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt);
+ }
+ const fromEnhancePrompt = getValueByPath(fromObject, [
+ 'enhancePrompt',
+ ]);
+ if (parentObject !== undefined && fromEnhancePrompt != null) {
+ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
+ }
+ if (getValueByPath(fromObject, ['generateAudio']) !== undefined) {
+ throw new Error('generateAudio parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromLastFrame = getValueByPath(fromObject, ['lastFrame']);
+ if (parentObject !== undefined && fromLastFrame != null) {
+ setValueByPath(parentObject, ['instances[0]', 'lastFrame'], imageToMldev(fromLastFrame));
+ }
+ const fromReferenceImages = getValueByPath(fromObject, [
+ 'referenceImages',
+ ]);
+ if (parentObject !== undefined && fromReferenceImages != null) {
+ let transformedList = fromReferenceImages;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return videoGenerationReferenceImageToMldev(item);
+ });
+ }
+ setValueByPath(parentObject, ['instances[0]', 'referenceImages'], transformedList);
+ }
+ if (getValueByPath(fromObject, ['mask']) !== undefined) {
+ throw new Error('mask parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
+ throw new Error('compressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['labels']) !== undefined) {
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromWebhookConfig = getValueByPath(fromObject, [
+ 'webhookConfig',
+ ]);
+ if (parentObject !== undefined && fromWebhookConfig != null) {
+ setValueByPath(parentObject, ['webhookConfig'], fromWebhookConfig);
+ }
+ if (getValueByPath(fromObject, ['resizeMode']) !== undefined) {
+ throw new Error('resizeMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
+ const toObject = {};
+ const fromNumberOfVideos = getValueByPath(fromObject, [
+ 'numberOfVideos',
+ ]);
+ if (parentObject !== undefined && fromNumberOfVideos != null) {
+ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos);
+ }
+ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']);
+ if (parentObject !== undefined && fromOutputGcsUri != null) {
+ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri);
+ }
+ const fromFps = getValueByPath(fromObject, ['fps']);
+ if (parentObject !== undefined && fromFps != null) {
+ setValueByPath(parentObject, ['parameters', 'fps'], fromFps);
+ }
+ const fromDurationSeconds = getValueByPath(fromObject, [
+ 'durationSeconds',
+ ]);
+ if (parentObject !== undefined && fromDurationSeconds != null) {
+ setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (parentObject !== undefined && fromSeed != null) {
+ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);
+ }
+ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
+ if (parentObject !== undefined && fromAspectRatio != null) {
+ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio);
+ }
+ const fromResolution = getValueByPath(fromObject, ['resolution']);
+ if (parentObject !== undefined && fromResolution != null) {
+ setValueByPath(parentObject, ['parameters', 'resolution'], fromResolution);
+ }
+ const fromPersonGeneration = getValueByPath(fromObject, [
+ 'personGeneration',
+ ]);
+ if (parentObject !== undefined && fromPersonGeneration != null) {
+ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
+ }
+ const fromPubsubTopic = getValueByPath(fromObject, ['pubsubTopic']);
+ if (parentObject !== undefined && fromPubsubTopic != null) {
+ setValueByPath(parentObject, ['parameters', 'pubsubTopic'], fromPubsubTopic);
+ }
+ const fromNegativePrompt = getValueByPath(fromObject, [
+ 'negativePrompt',
+ ]);
+ if (parentObject !== undefined && fromNegativePrompt != null) {
+ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt);
+ }
+ const fromEnhancePrompt = getValueByPath(fromObject, [
+ 'enhancePrompt',
+ ]);
+ if (parentObject !== undefined && fromEnhancePrompt != null) {
+ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
+ }
+ const fromGenerateAudio = getValueByPath(fromObject, [
+ 'generateAudio',
+ ]);
+ if (parentObject !== undefined && fromGenerateAudio != null) {
+ setValueByPath(parentObject, ['parameters', 'generateAudio'], fromGenerateAudio);
+ }
+ const fromLastFrame = getValueByPath(fromObject, ['lastFrame']);
+ if (parentObject !== undefined && fromLastFrame != null) {
+ setValueByPath(parentObject, ['instances[0]', 'lastFrame'], imageToVertex(fromLastFrame));
+ }
+ const fromReferenceImages = getValueByPath(fromObject, [
+ 'referenceImages',
+ ]);
+ if (parentObject !== undefined && fromReferenceImages != null) {
+ let transformedList = fromReferenceImages;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return videoGenerationReferenceImageToVertex(item);
+ });
+ }
+ setValueByPath(parentObject, ['instances[0]', 'referenceImages'], transformedList);
+ }
+ const fromMask = getValueByPath(fromObject, ['mask']);
+ if (parentObject !== undefined && fromMask != null) {
+ setValueByPath(parentObject, ['instances[0]', 'mask'], videoGenerationMaskToVertex(fromMask));
+ }
+ const fromCompressionQuality = getValueByPath(fromObject, [
+ 'compressionQuality',
+ ]);
+ if (parentObject !== undefined && fromCompressionQuality != null) {
+ setValueByPath(parentObject, ['parameters', 'compressionQuality'], fromCompressionQuality);
+ }
+ const fromLabels = getValueByPath(fromObject, ['labels']);
+ if (parentObject !== undefined && fromLabels != null) {
+ setValueByPath(parentObject, ['labels'], fromLabels);
+ }
+ if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
+ throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ const fromResizeMode = getValueByPath(fromObject, ['resizeMode']);
+ if (parentObject !== undefined && fromResizeMode != null) {
+ setValueByPath(parentObject, ['parameters', 'resizeMode'], fromResizeMode);
+ }
+ return toObject;
+}
+function generateVideosOperationFromMldev(fromObject, rootObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ const fromDone = getValueByPath(fromObject, ['done']);
+ if (fromDone != null) {
+ setValueByPath(toObject, ['done'], fromDone);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ const fromResponse = getValueByPath(fromObject, [
+ 'response',
+ 'generateVideoResponse',
+ ]);
+ if (fromResponse != null) {
+ setValueByPath(toObject, ['response'], generateVideosResponseFromMldev(fromResponse));
+ }
+ return toObject;
+}
+function generateVideosOperationFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ const fromDone = getValueByPath(fromObject, ['done']);
+ if (fromDone != null) {
+ setValueByPath(toObject, ['done'], fromDone);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ const fromResponse = getValueByPath(fromObject, ['response']);
+ if (fromResponse != null) {
+ setValueByPath(toObject, ['response'], generateVideosResponseFromVertex(fromResponse));
+ }
+ return toObject;
+}
+function generateVideosParametersToMldev(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromPrompt = getValueByPath(fromObject, ['prompt']);
+ if (fromPrompt != null) {
+ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);
+ }
+ const fromImage = getValueByPath(fromObject, ['image']);
+ if (fromImage != null) {
+ setValueByPath(toObject, ['instances[0]', 'image'], imageToMldev(fromImage));
+ }
+ const fromVideo = getValueByPath(fromObject, ['video']);
+ if (fromVideo != null) {
+ setValueByPath(toObject, ['instances[0]', 'video'], videoToMldev(fromVideo));
+ }
+ const fromSource = getValueByPath(fromObject, ['source']);
+ if (fromSource != null) {
+ generateVideosSourceToMldev(fromSource, toObject);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ generateVideosConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function generateVideosParametersToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromPrompt = getValueByPath(fromObject, ['prompt']);
+ if (fromPrompt != null) {
+ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);
+ }
+ const fromImage = getValueByPath(fromObject, ['image']);
+ if (fromImage != null) {
+ setValueByPath(toObject, ['instances[0]', 'image'], imageToVertex(fromImage));
+ }
+ const fromVideo = getValueByPath(fromObject, ['video']);
+ if (fromVideo != null) {
+ setValueByPath(toObject, ['instances[0]', 'video'], videoToVertex(fromVideo));
+ }
+ const fromSource = getValueByPath(fromObject, ['source']);
+ if (fromSource != null) {
+ generateVideosSourceToVertex(fromSource, toObject);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ generateVideosConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function generateVideosResponseFromMldev(fromObject, rootObject) {
+ const toObject = {};
+ const fromGeneratedVideos = getValueByPath(fromObject, [
+ 'generatedSamples',
+ ]);
+ if (fromGeneratedVideos != null) {
+ let transformedList = fromGeneratedVideos;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return generatedVideoFromMldev(item);
+ });
+ }
+ setValueByPath(toObject, ['generatedVideos'], transformedList);
+ }
+ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [
+ 'raiMediaFilteredCount',
+ ]);
+ if (fromRaiMediaFilteredCount != null) {
+ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount);
+ }
+ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [
+ 'raiMediaFilteredReasons',
+ ]);
+ if (fromRaiMediaFilteredReasons != null) {
+ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons);
+ }
+ return toObject;
+}
+function generateVideosResponseFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromGeneratedVideos = getValueByPath(fromObject, ['videos']);
+ if (fromGeneratedVideos != null) {
+ let transformedList = fromGeneratedVideos;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return generatedVideoFromVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['generatedVideos'], transformedList);
+ }
+ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [
+ 'raiMediaFilteredCount',
+ ]);
+ if (fromRaiMediaFilteredCount != null) {
+ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount);
+ }
+ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [
+ 'raiMediaFilteredReasons',
+ ]);
+ if (fromRaiMediaFilteredReasons != null) {
+ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons);
+ }
+ return toObject;
+}
+function generateVideosSourceToMldev(fromObject, parentObject, rootObject) {
+ const toObject = {};
+ const fromPrompt = getValueByPath(fromObject, ['prompt']);
+ if (parentObject !== undefined && fromPrompt != null) {
+ setValueByPath(parentObject, ['instances[0]', 'prompt'], fromPrompt);
+ }
+ const fromImage = getValueByPath(fromObject, ['image']);
+ if (parentObject !== undefined && fromImage != null) {
+ setValueByPath(parentObject, ['instances[0]', 'image'], imageToMldev(fromImage));
+ }
+ const fromVideo = getValueByPath(fromObject, ['video']);
+ if (parentObject !== undefined && fromVideo != null) {
+ setValueByPath(parentObject, ['instances[0]', 'video'], videoToMldev(fromVideo));
+ }
+ return toObject;
+}
+function generateVideosSourceToVertex(fromObject, parentObject, rootObject) {
+ const toObject = {};
+ const fromPrompt = getValueByPath(fromObject, ['prompt']);
+ if (parentObject !== undefined && fromPrompt != null) {
+ setValueByPath(parentObject, ['instances[0]', 'prompt'], fromPrompt);
+ }
+ const fromImage = getValueByPath(fromObject, ['image']);
+ if (parentObject !== undefined && fromImage != null) {
+ setValueByPath(parentObject, ['instances[0]', 'image'], imageToVertex(fromImage));
+ }
+ const fromVideo = getValueByPath(fromObject, ['video']);
+ if (parentObject !== undefined && fromVideo != null) {
+ setValueByPath(parentObject, ['instances[0]', 'video'], videoToVertex(fromVideo));
+ }
+ return toObject;
+}
+function generatedImageFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromImage = getValueByPath(fromObject, ['_self']);
+ if (fromImage != null) {
+ setValueByPath(toObject, ['image'], imageFromVertex(fromImage));
+ }
+ const fromRaiFilteredReason = getValueByPath(fromObject, [
+ 'raiFilteredReason',
+ ]);
+ if (fromRaiFilteredReason != null) {
+ setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason);
+ }
+ const fromSafetyAttributes = getValueByPath(fromObject, ['_self']);
+ if (fromSafetyAttributes != null) {
+ setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromVertex(fromSafetyAttributes));
+ }
+ const fromEnhancedPrompt = getValueByPath(fromObject, ['prompt']);
+ if (fromEnhancedPrompt != null) {
+ setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt);
+ }
+ return toObject;
+}
+function generatedImageMaskFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromMask = getValueByPath(fromObject, ['_self']);
+ if (fromMask != null) {
+ setValueByPath(toObject, ['mask'], imageFromVertex(fromMask));
+ }
+ const fromLabels = getValueByPath(fromObject, ['labels']);
+ if (fromLabels != null) {
+ let transformedList = fromLabels;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['labels'], transformedList);
+ }
+ return toObject;
+}
+function generatedVideoFromMldev(fromObject, rootObject) {
+ const toObject = {};
+ const fromVideo = getValueByPath(fromObject, ['video']);
+ if (fromVideo != null) {
+ setValueByPath(toObject, ['video'], videoFromMldev(fromVideo));
+ }
+ return toObject;
+}
+function generatedVideoFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromVideo = getValueByPath(fromObject, ['_self']);
+ if (fromVideo != null) {
+ setValueByPath(toObject, ['video'], videoFromVertex(fromVideo));
+ }
+ return toObject;
+}
+function generationConfigToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromModelSelectionConfig = getValueByPath(fromObject, [
+ 'modelSelectionConfig',
+ ]);
+ if (fromModelSelectionConfig != null) {
+ setValueByPath(toObject, ['modelConfig'], fromModelSelectionConfig);
+ }
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
+ 'responseJsonSchema',
+ ]);
+ if (fromResponseJsonSchema != null) {
+ setValueByPath(toObject, ['responseJsonSchema'], tJsonSchema(fromResponseJsonSchema));
+ }
+ const fromAudioTranscriptionConfig = getValueByPath(fromObject, [
+ 'audioTranscriptionConfig',
+ ]);
+ if (fromAudioTranscriptionConfig != null) {
+ setValueByPath(toObject, ['audioTranscriptionConfig'], fromAudioTranscriptionConfig);
+ }
+ const fromAudioTimestamp = getValueByPath(fromObject, [
+ 'audioTimestamp',
+ ]);
+ if (fromAudioTimestamp != null) {
+ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);
+ }
+ const fromCandidateCount = getValueByPath(fromObject, [
+ 'candidateCount',
+ ]);
+ if (fromCandidateCount != null) {
+ setValueByPath(toObject, ['candidateCount'], fromCandidateCount);
+ }
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
+ 'enableAffectiveDialog',
+ ]);
+ if (fromEnableAffectiveDialog != null) {
+ setValueByPath(toObject, ['enableAffectiveDialog'], fromEnableAffectiveDialog);
+ }
+ const fromFrequencyPenalty = getValueByPath(fromObject, [
+ 'frequencyPenalty',
+ ]);
+ if (fromFrequencyPenalty != null) {
+ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);
+ }
+ const fromLogprobs = getValueByPath(fromObject, ['logprobs']);
+ if (fromLogprobs != null) {
+ setValueByPath(toObject, ['logprobs'], fromLogprobs);
+ }
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
+ 'maxOutputTokens',
+ ]);
+ if (fromMaxOutputTokens != null) {
+ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);
+ }
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ const fromPresencePenalty = getValueByPath(fromObject, [
+ 'presencePenalty',
+ ]);
+ if (fromPresencePenalty != null) {
+ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);
+ }
+ const fromResponseFormat = getValueByPath(fromObject, [
+ 'responseFormat',
+ ]);
+ if (fromResponseFormat != null) {
+ let transformedList = fromResponseFormat;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['responseFormat'], transformedList);
+ }
+ const fromResponseLogprobs = getValueByPath(fromObject, [
+ 'responseLogprobs',
+ ]);
+ if (fromResponseLogprobs != null) {
+ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);
+ }
+ const fromResponseMimeType = getValueByPath(fromObject, [
+ 'responseMimeType',
+ ]);
+ if (fromResponseMimeType != null) {
+ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);
+ }
+ const fromResponseModalities = getValueByPath(fromObject, [
+ 'responseModalities',
+ ]);
+ if (fromResponseModalities != null) {
+ setValueByPath(toObject, ['responseModalities'], fromResponseModalities);
+ }
+ const fromResponseSchema = getValueByPath(fromObject, [
+ 'responseSchema',
+ ]);
+ if (fromResponseSchema != null) {
+ setValueByPath(toObject, ['responseSchema'], fromResponseSchema);
+ }
+ const fromRoutingConfig = getValueByPath(fromObject, [
+ 'routingConfig',
+ ]);
+ if (fromRoutingConfig != null) {
+ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (fromSeed != null) {
+ setValueByPath(toObject, ['seed'], fromSeed);
+ }
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
+ if (fromSpeechConfig != null) {
+ setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(fromSpeechConfig));
+ }
+ const fromStopSequences = getValueByPath(fromObject, [
+ 'stopSequences',
+ ]);
+ if (fromStopSequences != null) {
+ setValueByPath(toObject, ['stopSequences'], fromStopSequences);
+ }
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
+ if (fromTemperature != null) {
+ setValueByPath(toObject, ['temperature'], fromTemperature);
+ }
+ const fromThinkingConfig = getValueByPath(fromObject, [
+ 'thinkingConfig',
+ ]);
+ if (fromThinkingConfig != null) {
+ setValueByPath(toObject, ['thinkingConfig'], fromThinkingConfig);
+ }
+ const fromTopK = getValueByPath(fromObject, ['topK']);
+ if (fromTopK != null) {
+ setValueByPath(toObject, ['topK'], fromTopK);
+ }
+ const fromTopP = getValueByPath(fromObject, ['topP']);
+ if (fromTopP != null) {
+ setValueByPath(toObject, ['topP'], fromTopP);
+ }
+ if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
+ undefined) {
+ throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['translationConfig']) !== undefined) {
+ throw new Error('translationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function getModelParametersToMldev(apiClient, fromObject, _rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel));
+ }
+ return toObject;
+}
+function getModelParametersToVertex(apiClient, fromObject, _rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel));
+ }
+ return toObject;
+}
+function googleMapsToMldev$1(fromObject, rootObject) {
+ const toObject = {};
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
+ if (fromAuthConfig != null) {
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev$1(fromAuthConfig));
+ }
+ const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
+ if (fromEnableWidget != null) {
+ setValueByPath(toObject, ['enableWidget'], fromEnableWidget);
+ }
+ if (getValueByPath(fromObject, ['groundingTypes']) !== undefined) {
+ throw new Error('groundingTypes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function googleSearchToMldev$1(fromObject, _rootObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
+ if (fromSearchTypes != null) {
+ setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
+ }
+ const fromTimeRangeFilter = getValueByPath(fromObject, [
+ 'timeRangeFilter',
+ ]);
+ if (fromTimeRangeFilter != null) {
+ setValueByPath(toObject, ['timeRangeFilter'], fromTimeRangeFilter);
+ }
+ return toObject;
+}
+function imageConfigToMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
+ if (fromAspectRatio != null) {
+ setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
+ }
+ const fromImageSize = getValueByPath(fromObject, ['imageSize']);
+ if (fromImageSize != null) {
+ setValueByPath(toObject, ['imageSize'], fromImageSize);
+ }
+ if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
+ throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
+ throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
+ undefined) {
+ throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
+ throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
+ throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function imageConfigToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
+ if (fromAspectRatio != null) {
+ setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
+ }
+ const fromImageSize = getValueByPath(fromObject, ['imageSize']);
+ if (fromImageSize != null) {
+ setValueByPath(toObject, ['imageSize'], fromImageSize);
+ }
+ const fromPersonGeneration = getValueByPath(fromObject, [
+ 'personGeneration',
+ ]);
+ if (fromPersonGeneration != null) {
+ setValueByPath(toObject, ['personGeneration'], fromPersonGeneration);
+ }
+ const fromOutputMimeType = getValueByPath(fromObject, [
+ 'outputMimeType',
+ ]);
+ if (fromOutputMimeType != null) {
+ setValueByPath(toObject, ['imageOutputOptions', 'mimeType'], fromOutputMimeType);
+ }
+ const fromOutputCompressionQuality = getValueByPath(fromObject, [
+ 'outputCompressionQuality',
+ ]);
+ if (fromOutputCompressionQuality != null) {
+ setValueByPath(toObject, ['imageOutputOptions', 'compressionQuality'], fromOutputCompressionQuality);
+ }
+ const fromImageOutputOptions = getValueByPath(fromObject, [
+ 'imageOutputOptions',
+ ]);
+ if (fromImageOutputOptions != null) {
+ setValueByPath(toObject, ['imageOutputOptions'], fromImageOutputOptions);
+ }
+ const fromProminentPeople = getValueByPath(fromObject, [
+ 'prominentPeople',
+ ]);
+ if (fromProminentPeople != null) {
+ setValueByPath(toObject, ['prominentPeople'], fromProminentPeople);
+ }
+ return toObject;
+}
+function imageFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
+ if (fromGcsUri != null) {
+ setValueByPath(toObject, ['gcsUri'], fromGcsUri);
+ }
+ const fromImageBytes = getValueByPath(fromObject, [
+ 'bytesBase64Encoded',
+ ]);
+ if (fromImageBytes != null) {
+ setValueByPath(toObject, ['imageBytes'], tBytes(fromImageBytes));
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function imageToMldev(fromObject, _rootObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromImageBytes = getValueByPath(fromObject, ['imageBytes']);
+ if (fromImageBytes != null) {
+ setValueByPath(toObject, ['bytesBase64Encoded'], tBytes(fromImageBytes));
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function imageToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
+ if (fromGcsUri != null) {
+ setValueByPath(toObject, ['gcsUri'], fromGcsUri);
+ }
+ const fromImageBytes = getValueByPath(fromObject, ['imageBytes']);
+ if (fromImageBytes != null) {
+ setValueByPath(toObject, ['bytesBase64Encoded'], tBytes(fromImageBytes));
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function listModelsConfigToMldev(apiClient, fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ const fromPageSize = getValueByPath(fromObject, ['pageSize']);
+ if (parentObject !== undefined && fromPageSize != null) {
+ setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
+ }
+ const fromPageToken = getValueByPath(fromObject, ['pageToken']);
+ if (parentObject !== undefined && fromPageToken != null) {
+ setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
+ }
+ const fromFilter = getValueByPath(fromObject, ['filter']);
+ if (parentObject !== undefined && fromFilter != null) {
+ setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
+ }
+ const fromQueryBase = getValueByPath(fromObject, ['queryBase']);
+ if (parentObject !== undefined && fromQueryBase != null) {
+ setValueByPath(parentObject, ['_url', 'models_url'], tModelsUrl(apiClient, fromQueryBase));
+ }
+ return toObject;
+}
+function listModelsConfigToVertex(apiClient, fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ const fromPageSize = getValueByPath(fromObject, ['pageSize']);
+ if (parentObject !== undefined && fromPageSize != null) {
+ setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
+ }
+ const fromPageToken = getValueByPath(fromObject, ['pageToken']);
+ if (parentObject !== undefined && fromPageToken != null) {
+ setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
+ }
+ const fromFilter = getValueByPath(fromObject, ['filter']);
+ if (parentObject !== undefined && fromFilter != null) {
+ setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
+ }
+ const fromQueryBase = getValueByPath(fromObject, ['queryBase']);
+ if (parentObject !== undefined && fromQueryBase != null) {
+ setValueByPath(parentObject, ['_url', 'models_url'], tModelsUrl(apiClient, fromQueryBase));
+ }
+ return toObject;
+}
+function listModelsParametersToMldev(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ listModelsConfigToMldev(apiClient, fromConfig, toObject);
+ }
+ return toObject;
+}
+function listModelsParametersToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ listModelsConfigToVertex(apiClient, fromConfig, toObject);
+ }
+ return toObject;
+}
+function listModelsResponseFromMldev(fromObject, rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromNextPageToken = getValueByPath(fromObject, [
+ 'nextPageToken',
+ ]);
+ if (fromNextPageToken != null) {
+ setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);
+ }
+ const fromModels = getValueByPath(fromObject, ['_self']);
+ if (fromModels != null) {
+ let transformedList = tExtractModels(fromModels);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return modelFromMldev(item);
+ });
+ }
+ setValueByPath(toObject, ['models'], transformedList);
+ }
+ return toObject;
+}
+function listModelsResponseFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromNextPageToken = getValueByPath(fromObject, [
+ 'nextPageToken',
+ ]);
+ if (fromNextPageToken != null) {
+ setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);
+ }
+ const fromModels = getValueByPath(fromObject, ['_self']);
+ if (fromModels != null) {
+ let transformedList = tExtractModels(fromModels);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return modelFromVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['models'], transformedList);
+ }
+ return toObject;
+}
+function maskReferenceConfigToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromMaskMode = getValueByPath(fromObject, ['maskMode']);
+ if (fromMaskMode != null) {
+ setValueByPath(toObject, ['maskMode'], fromMaskMode);
+ }
+ const fromSegmentationClasses = getValueByPath(fromObject, [
+ 'segmentationClasses',
+ ]);
+ if (fromSegmentationClasses != null) {
+ setValueByPath(toObject, ['maskClasses'], fromSegmentationClasses);
+ }
+ const fromMaskDilation = getValueByPath(fromObject, ['maskDilation']);
+ if (fromMaskDilation != null) {
+ setValueByPath(toObject, ['dilation'], fromMaskDilation);
+ }
+ return toObject;
+}
+function mcpServerToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['name']) !== undefined) {
+ throw new Error('name parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['streamableHttpTransport']) !== undefined) {
+ throw new Error('streamableHttpTransport parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function modelFromMldev(fromObject, rootObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (fromDisplayName != null) {
+ setValueByPath(toObject, ['displayName'], fromDisplayName);
+ }
+ const fromDescription = getValueByPath(fromObject, ['description']);
+ if (fromDescription != null) {
+ setValueByPath(toObject, ['description'], fromDescription);
+ }
+ const fromVersion = getValueByPath(fromObject, ['version']);
+ if (fromVersion != null) {
+ setValueByPath(toObject, ['version'], fromVersion);
+ }
+ const fromTunedModelInfo = getValueByPath(fromObject, ['_self']);
+ if (fromTunedModelInfo != null) {
+ setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromMldev(fromTunedModelInfo));
+ }
+ const fromInputTokenLimit = getValueByPath(fromObject, [
+ 'inputTokenLimit',
+ ]);
+ if (fromInputTokenLimit != null) {
+ setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit);
+ }
+ const fromOutputTokenLimit = getValueByPath(fromObject, [
+ 'outputTokenLimit',
+ ]);
+ if (fromOutputTokenLimit != null) {
+ setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit);
+ }
+ const fromSupportedActions = getValueByPath(fromObject, [
+ 'supportedGenerationMethods',
+ ]);
+ if (fromSupportedActions != null) {
+ setValueByPath(toObject, ['supportedActions'], fromSupportedActions);
+ }
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
+ if (fromTemperature != null) {
+ setValueByPath(toObject, ['temperature'], fromTemperature);
+ }
+ const fromMaxTemperature = getValueByPath(fromObject, [
+ 'maxTemperature',
+ ]);
+ if (fromMaxTemperature != null) {
+ setValueByPath(toObject, ['maxTemperature'], fromMaxTemperature);
+ }
+ const fromTopP = getValueByPath(fromObject, ['topP']);
+ if (fromTopP != null) {
+ setValueByPath(toObject, ['topP'], fromTopP);
+ }
+ const fromTopK = getValueByPath(fromObject, ['topK']);
+ if (fromTopK != null) {
+ setValueByPath(toObject, ['topK'], fromTopK);
+ }
+ const fromThinking = getValueByPath(fromObject, ['thinking']);
+ if (fromThinking != null) {
+ setValueByPath(toObject, ['thinking'], fromThinking);
+ }
+ return toObject;
+}
+function modelFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (fromDisplayName != null) {
+ setValueByPath(toObject, ['displayName'], fromDisplayName);
+ }
+ const fromDescription = getValueByPath(fromObject, ['description']);
+ if (fromDescription != null) {
+ setValueByPath(toObject, ['description'], fromDescription);
+ }
+ const fromVersion = getValueByPath(fromObject, ['versionId']);
+ if (fromVersion != null) {
+ setValueByPath(toObject, ['version'], fromVersion);
+ }
+ const fromEndpoints = getValueByPath(fromObject, ['deployedModels']);
+ if (fromEndpoints != null) {
+ let transformedList = fromEndpoints;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return endpointFromVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['endpoints'], transformedList);
+ }
+ const fromLabels = getValueByPath(fromObject, ['labels']);
+ if (fromLabels != null) {
+ setValueByPath(toObject, ['labels'], fromLabels);
+ }
+ const fromTunedModelInfo = getValueByPath(fromObject, ['_self']);
+ if (fromTunedModelInfo != null) {
+ setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromVertex(fromTunedModelInfo));
+ }
+ const fromDefaultCheckpointId = getValueByPath(fromObject, [
+ 'defaultCheckpointId',
+ ]);
+ if (fromDefaultCheckpointId != null) {
+ setValueByPath(toObject, ['defaultCheckpointId'], fromDefaultCheckpointId);
+ }
+ const fromCheckpoints = getValueByPath(fromObject, ['checkpoints']);
+ if (fromCheckpoints != null) {
+ let transformedList = fromCheckpoints;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['checkpoints'], transformedList);
+ }
+ return toObject;
+}
+function multiSpeakerVoiceConfigToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
+ 'speakerVoiceConfigs',
+ ]);
+ if (fromSpeakerVoiceConfigs != null) {
+ let transformedList = fromSpeakerVoiceConfigs;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return speakerVoiceConfigToVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
+ }
+ return toObject;
+}
+function partToMldev$1(fromObject, rootObject) {
+ const toObject = {};
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ const fromToolCall = getValueByPath(fromObject, ['toolCall']);
+ if (fromToolCall != null) {
+ setValueByPath(toObject, ['toolCall'], fromToolCall);
+ }
+ const fromToolResponse = getValueByPath(fromObject, ['toolResponse']);
+ if (fromToolResponse != null) {
+ setValueByPath(toObject, ['toolResponse'], fromToolResponse);
+ }
+ const fromAudioTranscription = getValueByPath(fromObject, [
+ 'audioTranscription',
+ ]);
+ if (fromAudioTranscription != null) {
+ setValueByPath(toObject, ['audioTranscription'], fromAudioTranscription);
+ }
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
+ 'codeExecutionResult',
+ ]);
+ if (fromCodeExecutionResult != null) {
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
+ }
+ const fromExecutableCode = getValueByPath(fromObject, [
+ 'executableCode',
+ ]);
+ if (fromExecutableCode != null) {
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
+ }
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
+ if (fromFileData != null) {
+ setValueByPath(toObject, ['fileData'], fileDataToMldev$1(fromFileData));
+ }
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
+ if (fromFunctionCall != null) {
+ setValueByPath(toObject, ['functionCall'], functionCallToMldev$1(fromFunctionCall));
+ }
+ const fromFunctionResponse = getValueByPath(fromObject, [
+ 'functionResponse',
+ ]);
+ if (fromFunctionResponse != null) {
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
+ }
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
+ if (fromInlineData != null) {
+ setValueByPath(toObject, ['inlineData'], blobToMldev$1(fromInlineData));
+ }
+ const fromText = getValueByPath(fromObject, ['text']);
+ if (fromText != null) {
+ setValueByPath(toObject, ['text'], fromText);
+ }
+ const fromThought = getValueByPath(fromObject, ['thought']);
+ if (fromThought != null) {
+ setValueByPath(toObject, ['thought'], fromThought);
+ }
+ const fromThoughtSignature = getValueByPath(fromObject, [
+ 'thoughtSignature',
+ ]);
+ if (fromThoughtSignature != null) {
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
+ }
+ const fromVideoMetadata = getValueByPath(fromObject, [
+ 'videoMetadata',
+ ]);
+ if (fromVideoMetadata != null) {
+ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
+ }
+ const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
+ if (fromPartMetadata != null) {
+ setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
+ }
+ const fromMediaProcessing = getValueByPath(fromObject, [
+ 'mediaProcessing',
+ ]);
+ if (fromMediaProcessing != null) {
+ setValueByPath(toObject, ['mediaProcessing'], fromMediaProcessing);
+ }
+ return toObject;
+}
+function partToVertex$1(fromObject, _rootObject) {
+ const toObject = {};
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ const fromAudioTranscription = getValueByPath(fromObject, [
+ 'audioTranscription',
+ ]);
+ if (fromAudioTranscription != null) {
+ setValueByPath(toObject, ['audioTranscription'], fromAudioTranscription);
+ }
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
+ 'codeExecutionResult',
+ ]);
+ if (fromCodeExecutionResult != null) {
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
+ }
+ const fromExecutableCode = getValueByPath(fromObject, [
+ 'executableCode',
+ ]);
+ if (fromExecutableCode != null) {
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
+ }
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
+ if (fromFileData != null) {
+ setValueByPath(toObject, ['fileData'], fromFileData);
+ }
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
+ if (fromFunctionCall != null) {
+ setValueByPath(toObject, ['functionCall'], fromFunctionCall);
+ }
+ const fromFunctionResponse = getValueByPath(fromObject, [
+ 'functionResponse',
+ ]);
+ if (fromFunctionResponse != null) {
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
+ }
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
+ if (fromInlineData != null) {
+ setValueByPath(toObject, ['inlineData'], fromInlineData);
+ }
+ const fromText = getValueByPath(fromObject, ['text']);
+ if (fromText != null) {
+ setValueByPath(toObject, ['text'], fromText);
+ }
+ const fromThought = getValueByPath(fromObject, ['thought']);
+ if (fromThought != null) {
+ setValueByPath(toObject, ['thought'], fromThought);
+ }
+ const fromThoughtSignature = getValueByPath(fromObject, [
+ 'thoughtSignature',
+ ]);
+ if (fromThoughtSignature != null) {
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
+ }
+ const fromVideoMetadata = getValueByPath(fromObject, [
+ 'videoMetadata',
+ ]);
+ if (fromVideoMetadata != null) {
+ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
+ }
+ if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ const fromMediaProcessing = getValueByPath(fromObject, [
+ 'mediaProcessing',
+ ]);
+ if (fromMediaProcessing != null) {
+ setValueByPath(toObject, ['mediaProcessing'], fromMediaProcessing);
+ }
+ return toObject;
+}
+function productImageToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromProductImage = getValueByPath(fromObject, ['productImage']);
+ if (fromProductImage != null) {
+ setValueByPath(toObject, ['image'], imageToVertex(fromProductImage));
+ }
+ return toObject;
+}
+function recontextImageConfigToVertex(fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ const fromNumberOfImages = getValueByPath(fromObject, [
+ 'numberOfImages',
+ ]);
+ if (parentObject !== undefined && fromNumberOfImages != null) {
+ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages);
+ }
+ const fromBaseSteps = getValueByPath(fromObject, ['baseSteps']);
+ if (parentObject !== undefined && fromBaseSteps != null) {
+ setValueByPath(parentObject, ['parameters', 'baseSteps'], fromBaseSteps);
+ }
+ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']);
+ if (parentObject !== undefined && fromOutputGcsUri != null) {
+ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (parentObject !== undefined && fromSeed != null) {
+ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);
+ }
+ const fromSafetyFilterLevel = getValueByPath(fromObject, [
+ 'safetyFilterLevel',
+ ]);
+ if (parentObject !== undefined && fromSafetyFilterLevel != null) {
+ setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel);
+ }
+ const fromPersonGeneration = getValueByPath(fromObject, [
+ 'personGeneration',
+ ]);
+ if (parentObject !== undefined && fromPersonGeneration != null) {
+ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
+ }
+ const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']);
+ if (parentObject !== undefined && fromAddWatermark != null) {
+ setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark);
+ }
+ const fromOutputMimeType = getValueByPath(fromObject, [
+ 'outputMimeType',
+ ]);
+ if (parentObject !== undefined && fromOutputMimeType != null) {
+ setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType);
+ }
+ const fromOutputCompressionQuality = getValueByPath(fromObject, [
+ 'outputCompressionQuality',
+ ]);
+ if (parentObject !== undefined && fromOutputCompressionQuality != null) {
+ setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
+ }
+ const fromEnhancePrompt = getValueByPath(fromObject, [
+ 'enhancePrompt',
+ ]);
+ if (parentObject !== undefined && fromEnhancePrompt != null) {
+ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
+ }
+ const fromLabels = getValueByPath(fromObject, ['labels']);
+ if (parentObject !== undefined && fromLabels != null) {
+ setValueByPath(parentObject, ['labels'], fromLabels);
+ }
+ return toObject;
+}
+function recontextImageParametersToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromSource = getValueByPath(fromObject, ['source']);
+ if (fromSource != null) {
+ recontextImageSourceToVertex(fromSource, toObject);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ recontextImageConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function recontextImageResponseFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromGeneratedImages = getValueByPath(fromObject, [
+ 'predictions',
+ ]);
+ if (fromGeneratedImages != null) {
+ let transformedList = fromGeneratedImages;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return generatedImageFromVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['generatedImages'], transformedList);
+ }
+ return toObject;
+}
+function recontextImageSourceToVertex(fromObject, parentObject, rootObject) {
+ const toObject = {};
+ const fromPrompt = getValueByPath(fromObject, ['prompt']);
+ if (parentObject !== undefined && fromPrompt != null) {
+ setValueByPath(parentObject, ['instances[0]', 'prompt'], fromPrompt);
+ }
+ const fromPersonImage = getValueByPath(fromObject, ['personImage']);
+ if (parentObject !== undefined && fromPersonImage != null) {
+ setValueByPath(parentObject, ['instances[0]', 'personImage', 'image'], imageToVertex(fromPersonImage));
+ }
+ const fromProductImages = getValueByPath(fromObject, [
+ 'productImages',
+ ]);
+ if (parentObject !== undefined && fromProductImages != null) {
+ let transformedList = fromProductImages;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return productImageToVertex(item);
+ });
+ }
+ setValueByPath(parentObject, ['instances[0]', 'productImages'], transformedList);
+ }
+ return toObject;
+}
+function referenceImageAPIInternalToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromReferenceImage = getValueByPath(fromObject, [
+ 'referenceImage',
+ ]);
+ if (fromReferenceImage != null) {
+ setValueByPath(toObject, ['referenceImage'], imageToVertex(fromReferenceImage));
+ }
+ const fromReferenceId = getValueByPath(fromObject, ['referenceId']);
+ if (fromReferenceId != null) {
+ setValueByPath(toObject, ['referenceId'], fromReferenceId);
+ }
+ const fromReferenceType = getValueByPath(fromObject, [
+ 'referenceType',
+ ]);
+ if (fromReferenceType != null) {
+ setValueByPath(toObject, ['referenceType'], fromReferenceType);
+ }
+ const fromMaskImageConfig = getValueByPath(fromObject, [
+ 'maskImageConfig',
+ ]);
+ if (fromMaskImageConfig != null) {
+ setValueByPath(toObject, ['maskImageConfig'], maskReferenceConfigToVertex(fromMaskImageConfig));
+ }
+ const fromControlImageConfig = getValueByPath(fromObject, [
+ 'controlImageConfig',
+ ]);
+ if (fromControlImageConfig != null) {
+ setValueByPath(toObject, ['controlImageConfig'], controlReferenceConfigToVertex(fromControlImageConfig));
+ }
+ const fromStyleImageConfig = getValueByPath(fromObject, [
+ 'styleImageConfig',
+ ]);
+ if (fromStyleImageConfig != null) {
+ setValueByPath(toObject, ['styleImageConfig'], fromStyleImageConfig);
+ }
+ const fromSubjectImageConfig = getValueByPath(fromObject, [
+ 'subjectImageConfig',
+ ]);
+ if (fromSubjectImageConfig != null) {
+ setValueByPath(toObject, ['subjectImageConfig'], fromSubjectImageConfig);
+ }
+ return toObject;
+}
+function replicatedVoiceConfigToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ const fromVoiceSampleAudio = getValueByPath(fromObject, [
+ 'voiceSampleAudio',
+ ]);
+ if (fromVoiceSampleAudio != null) {
+ setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
+ }
+ if (getValueByPath(fromObject, ['consentAudio']) !== undefined) {
+ throw new Error('consentAudio parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['voiceConsentSignature']) !== undefined) {
+ throw new Error('voiceConsentSignature parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function safetyAttributesFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromCategories = getValueByPath(fromObject, [
+ 'safetyAttributes',
+ 'categories',
+ ]);
+ if (fromCategories != null) {
+ setValueByPath(toObject, ['categories'], fromCategories);
+ }
+ const fromScores = getValueByPath(fromObject, [
+ 'safetyAttributes',
+ 'scores',
+ ]);
+ if (fromScores != null) {
+ setValueByPath(toObject, ['scores'], fromScores);
+ }
+ const fromContentType = getValueByPath(fromObject, ['contentType']);
+ if (fromContentType != null) {
+ setValueByPath(toObject, ['contentType'], fromContentType);
+ }
+ return toObject;
+}
+function safetySettingToMldev$1(fromObject, _rootObject) {
+ const toObject = {};
+ const fromCategory = getValueByPath(fromObject, ['category']);
+ if (fromCategory != null) {
+ setValueByPath(toObject, ['category'], fromCategory);
+ }
+ if (getValueByPath(fromObject, ['method']) !== undefined) {
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromThreshold = getValueByPath(fromObject, ['threshold']);
+ if (fromThreshold != null) {
+ setValueByPath(toObject, ['threshold'], fromThreshold);
+ }
+ return toObject;
+}
+function scribbleImageToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromImage = getValueByPath(fromObject, ['image']);
+ if (fromImage != null) {
+ setValueByPath(toObject, ['image'], imageToVertex(fromImage));
+ }
+ return toObject;
+}
+function segmentImageConfigToVertex(fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ const fromMode = getValueByPath(fromObject, ['mode']);
+ if (parentObject !== undefined && fromMode != null) {
+ setValueByPath(parentObject, ['parameters', 'mode'], fromMode);
+ }
+ const fromMaxPredictions = getValueByPath(fromObject, [
+ 'maxPredictions',
+ ]);
+ if (parentObject !== undefined && fromMaxPredictions != null) {
+ setValueByPath(parentObject, ['parameters', 'maxPredictions'], fromMaxPredictions);
+ }
+ const fromConfidenceThreshold = getValueByPath(fromObject, [
+ 'confidenceThreshold',
+ ]);
+ if (parentObject !== undefined && fromConfidenceThreshold != null) {
+ setValueByPath(parentObject, ['parameters', 'confidenceThreshold'], fromConfidenceThreshold);
+ }
+ const fromMaskDilation = getValueByPath(fromObject, ['maskDilation']);
+ if (parentObject !== undefined && fromMaskDilation != null) {
+ setValueByPath(parentObject, ['parameters', 'maskDilation'], fromMaskDilation);
+ }
+ const fromBinaryColorThreshold = getValueByPath(fromObject, [
+ 'binaryColorThreshold',
+ ]);
+ if (parentObject !== undefined && fromBinaryColorThreshold != null) {
+ setValueByPath(parentObject, ['parameters', 'binaryColorThreshold'], fromBinaryColorThreshold);
+ }
+ const fromLabels = getValueByPath(fromObject, ['labels']);
+ if (parentObject !== undefined && fromLabels != null) {
+ setValueByPath(parentObject, ['labels'], fromLabels);
+ }
+ return toObject;
+}
+function segmentImageParametersToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromSource = getValueByPath(fromObject, ['source']);
+ if (fromSource != null) {
+ segmentImageSourceToVertex(fromSource, toObject);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ segmentImageConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function segmentImageResponseFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromGeneratedMasks = getValueByPath(fromObject, ['predictions']);
+ if (fromGeneratedMasks != null) {
+ let transformedList = fromGeneratedMasks;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return generatedImageMaskFromVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['generatedMasks'], transformedList);
+ }
+ return toObject;
+}
+function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
+ const toObject = {};
+ const fromPrompt = getValueByPath(fromObject, ['prompt']);
+ if (parentObject !== undefined && fromPrompt != null) {
+ setValueByPath(parentObject, ['instances[0]', 'prompt'], fromPrompt);
+ }
+ const fromImage = getValueByPath(fromObject, ['image']);
+ if (parentObject !== undefined && fromImage != null) {
+ setValueByPath(parentObject, ['instances[0]', 'image'], imageToVertex(fromImage));
+ }
+ const fromScribbleImage = getValueByPath(fromObject, [
+ 'scribbleImage',
+ ]);
+ if (parentObject !== undefined && fromScribbleImage != null) {
+ setValueByPath(parentObject, ['instances[0]', 'scribble'], scribbleImageToVertex(fromScribbleImage));
+ }
+ return toObject;
+}
+function speakerVoiceConfigToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromSpeaker = getValueByPath(fromObject, ['speaker']);
+ if (fromSpeaker != null) {
+ setValueByPath(toObject, ['speaker'], fromSpeaker);
+ }
+ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
+ if (fromVoiceConfig != null) {
+ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
+ }
+ return toObject;
+}
+function speechConfigToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
+ if (fromVoiceConfig != null) {
+ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
+ }
+ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
+ if (fromLanguageCode != null) {
+ setValueByPath(toObject, ['languageCode'], fromLanguageCode);
+ }
+ const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
+ 'multiSpeakerVoiceConfig',
+ ]);
+ if (fromMultiSpeakerVoiceConfig != null) {
+ setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex(fromMultiSpeakerVoiceConfig));
+ }
+ return toObject;
+}
+function toolConfigToMldev(fromObject, rootObject) {
+ const toObject = {};
+ const fromFunctionCallingConfig = getValueByPath(fromObject, [
+ 'functionCallingConfig',
+ ]);
+ if (fromFunctionCallingConfig != null) {
+ setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToMldev(fromFunctionCallingConfig));
+ }
+ const fromRetrievalConfig = getValueByPath(fromObject, [
+ 'retrievalConfig',
+ ]);
+ if (fromRetrievalConfig != null) {
+ setValueByPath(toObject, ['retrievalConfig'], fromRetrievalConfig);
+ }
+ const fromIncludeServerSideToolInvocations = getValueByPath(fromObject, ['includeServerSideToolInvocations']);
+ if (fromIncludeServerSideToolInvocations != null) {
+ setValueByPath(toObject, ['includeServerSideToolInvocations'], fromIncludeServerSideToolInvocations);
+ }
+ return toObject;
+}
+function toolConfigToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromFunctionCallingConfig = getValueByPath(fromObject, [
+ 'functionCallingConfig',
+ ]);
+ if (fromFunctionCallingConfig != null) {
+ setValueByPath(toObject, ['functionCallingConfig'], fromFunctionCallingConfig);
+ }
+ const fromRetrievalConfig = getValueByPath(fromObject, [
+ 'retrievalConfig',
+ ]);
+ if (fromRetrievalConfig != null) {
+ setValueByPath(toObject, ['retrievalConfig'], fromRetrievalConfig);
+ }
+ if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
+ undefined) {
+ throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function toolToMldev$1(fromObject, rootObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
+ if (fromGoogleMaps != null) {
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
+ }
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
+ if (fromMcpServers != null) {
+ let transformedList = fromMcpServers;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['mcpServers'], transformedList);
+ }
+ const fromCodeExecution = getValueByPath(fromObject, [
+ 'codeExecution',
+ ]);
+ if (fromCodeExecution != null) {
+ setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
+ }
+ const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
+ if (fromComputerUse != null) {
+ setValueByPath(toObject, ['computerUse'], fromComputerUse);
+ }
+ if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
+ throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromFunctionDeclarations = getValueByPath(fromObject, [
+ 'functionDeclarations',
+ ]);
+ if (fromFunctionDeclarations != null) {
+ let transformedList = fromFunctionDeclarations;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['functionDeclarations'], transformedList);
+ }
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
+ if (fromGoogleSearch != null) {
+ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(fromGoogleSearch));
+ }
+ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
+ 'googleSearchRetrieval',
+ ]);
+ if (fromGoogleSearchRetrieval != null) {
+ setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
+ }
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
+ if (fromUrlContext != null) {
+ setValueByPath(toObject, ['urlContext'], fromUrlContext);
+ }
+ const fromFileSearch = getValueByPath(fromObject, ['fileSearch']);
+ if (fromFileSearch != null) {
+ setValueByPath(toObject, ['fileSearch'], fromFileSearch);
+ }
+ return toObject;
+}
+function toolToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
+ if (fromRetrieval != null) {
+ setValueByPath(toObject, ['retrieval'], fromRetrieval);
+ }
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
+ if (fromGoogleMaps != null) {
+ setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
+ }
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
+ if (fromMcpServers != null) {
+ let transformedList = fromMcpServers;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return mcpServerToVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['mcpServers'], transformedList);
+ }
+ const fromCodeExecution = getValueByPath(fromObject, [
+ 'codeExecution',
+ ]);
+ if (fromCodeExecution != null) {
+ setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
+ }
+ const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
+ if (fromComputerUse != null) {
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex(fromComputerUse));
+ }
+ const fromEnterpriseWebSearch = getValueByPath(fromObject, [
+ 'enterpriseWebSearch',
+ ]);
+ if (fromEnterpriseWebSearch != null) {
+ setValueByPath(toObject, ['enterpriseWebSearch'], fromEnterpriseWebSearch);
+ }
+ const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
+ if (fromExaAiSearch != null) {
+ setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
+ }
+ const fromFunctionDeclarations = getValueByPath(fromObject, [
+ 'functionDeclarations',
+ ]);
+ if (fromFunctionDeclarations != null) {
+ let transformedList = fromFunctionDeclarations;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['functionDeclarations'], transformedList);
+ }
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
+ if (fromGoogleSearch != null) {
+ setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
+ }
+ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
+ 'googleSearchRetrieval',
+ ]);
+ if (fromGoogleSearchRetrieval != null) {
+ setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
+ }
+ const fromParallelAiSearch = getValueByPath(fromObject, [
+ 'parallelAiSearch',
+ ]);
+ if (fromParallelAiSearch != null) {
+ setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
+ }
+ const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
+ if (fromUrlContext != null) {
+ setValueByPath(toObject, ['urlContext'], fromUrlContext);
+ }
+ if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
+ throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function tunedModelInfoFromMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromBaseModel = getValueByPath(fromObject, ['baseModel']);
+ if (fromBaseModel != null) {
+ setValueByPath(toObject, ['baseModel'], fromBaseModel);
+ }
+ const fromCreateTime = getValueByPath(fromObject, ['createTime']);
+ if (fromCreateTime != null) {
+ setValueByPath(toObject, ['createTime'], fromCreateTime);
+ }
+ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']);
+ if (fromUpdateTime != null) {
+ setValueByPath(toObject, ['updateTime'], fromUpdateTime);
+ }
+ return toObject;
+}
+function tunedModelInfoFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromBaseModel = getValueByPath(fromObject, [
+ 'labels',
+ 'google-vertex-llm-tuning-base-model-id',
+ ]);
+ if (fromBaseModel != null) {
+ setValueByPath(toObject, ['baseModel'], fromBaseModel);
+ }
+ const fromCreateTime = getValueByPath(fromObject, ['createTime']);
+ if (fromCreateTime != null) {
+ setValueByPath(toObject, ['createTime'], fromCreateTime);
+ }
+ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']);
+ if (fromUpdateTime != null) {
+ setValueByPath(toObject, ['updateTime'], fromUpdateTime);
+ }
+ return toObject;
+}
+function updateModelConfigToMldev(fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (parentObject !== undefined && fromDisplayName != null) {
+ setValueByPath(parentObject, ['displayName'], fromDisplayName);
+ }
+ const fromDescription = getValueByPath(fromObject, ['description']);
+ if (parentObject !== undefined && fromDescription != null) {
+ setValueByPath(parentObject, ['description'], fromDescription);
+ }
+ const fromDefaultCheckpointId = getValueByPath(fromObject, [
+ 'defaultCheckpointId',
+ ]);
+ if (parentObject !== undefined && fromDefaultCheckpointId != null) {
+ setValueByPath(parentObject, ['defaultCheckpointId'], fromDefaultCheckpointId);
+ }
+ return toObject;
+}
+function updateModelConfigToVertex(fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (parentObject !== undefined && fromDisplayName != null) {
+ setValueByPath(parentObject, ['displayName'], fromDisplayName);
+ }
+ const fromDescription = getValueByPath(fromObject, ['description']);
+ if (parentObject !== undefined && fromDescription != null) {
+ setValueByPath(parentObject, ['description'], fromDescription);
+ }
+ const fromDefaultCheckpointId = getValueByPath(fromObject, [
+ 'defaultCheckpointId',
+ ]);
+ if (parentObject !== undefined && fromDefaultCheckpointId != null) {
+ setValueByPath(parentObject, ['defaultCheckpointId'], fromDefaultCheckpointId);
+ }
+ return toObject;
+}
+function updateModelParametersToMldev(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ updateModelConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function updateModelParametersToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ updateModelConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function upscaleImageAPIConfigInternalToVertex(fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']);
+ if (parentObject !== undefined && fromOutputGcsUri != null) {
+ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri);
+ }
+ const fromSafetyFilterLevel = getValueByPath(fromObject, [
+ 'safetyFilterLevel',
+ ]);
+ if (parentObject !== undefined && fromSafetyFilterLevel != null) {
+ setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel);
+ }
+ const fromPersonGeneration = getValueByPath(fromObject, [
+ 'personGeneration',
+ ]);
+ if (parentObject !== undefined && fromPersonGeneration != null) {
+ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
+ }
+ const fromIncludeRaiReason = getValueByPath(fromObject, [
+ 'includeRaiReason',
+ ]);
+ if (parentObject !== undefined && fromIncludeRaiReason != null) {
+ setValueByPath(parentObject, ['parameters', 'includeRaiReason'], fromIncludeRaiReason);
+ }
+ const fromOutputMimeType = getValueByPath(fromObject, [
+ 'outputMimeType',
+ ]);
+ if (parentObject !== undefined && fromOutputMimeType != null) {
+ setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType);
+ }
+ const fromOutputCompressionQuality = getValueByPath(fromObject, [
+ 'outputCompressionQuality',
+ ]);
+ if (parentObject !== undefined && fromOutputCompressionQuality != null) {
+ setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
+ }
+ const fromEnhanceInputImage = getValueByPath(fromObject, [
+ 'enhanceInputImage',
+ ]);
+ if (parentObject !== undefined && fromEnhanceInputImage != null) {
+ setValueByPath(parentObject, ['parameters', 'upscaleConfig', 'enhanceInputImage'], fromEnhanceInputImage);
+ }
+ const fromImagePreservationFactor = getValueByPath(fromObject, [
+ 'imagePreservationFactor',
+ ]);
+ if (parentObject !== undefined && fromImagePreservationFactor != null) {
+ setValueByPath(parentObject, ['parameters', 'upscaleConfig', 'imagePreservationFactor'], fromImagePreservationFactor);
+ }
+ const fromLabels = getValueByPath(fromObject, ['labels']);
+ if (parentObject !== undefined && fromLabels != null) {
+ setValueByPath(parentObject, ['labels'], fromLabels);
+ }
+ const fromNumberOfImages = getValueByPath(fromObject, [
+ 'numberOfImages',
+ ]);
+ if (parentObject !== undefined && fromNumberOfImages != null) {
+ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages);
+ }
+ const fromMode = getValueByPath(fromObject, ['mode']);
+ if (parentObject !== undefined && fromMode != null) {
+ setValueByPath(parentObject, ['parameters', 'mode'], fromMode);
+ }
+ return toObject;
+}
+function upscaleImageAPIParametersInternalToVertex(apiClient, fromObject, rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromImage = getValueByPath(fromObject, ['image']);
+ if (fromImage != null) {
+ setValueByPath(toObject, ['instances[0]', 'image'], imageToVertex(fromImage));
+ }
+ const fromUpscaleFactor = getValueByPath(fromObject, [
+ 'upscaleFactor',
+ ]);
+ if (fromUpscaleFactor != null) {
+ setValueByPath(toObject, ['parameters', 'upscaleConfig', 'upscaleFactor'], fromUpscaleFactor);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ upscaleImageAPIConfigInternalToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function upscaleImageResponseFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromGeneratedImages = getValueByPath(fromObject, [
+ 'predictions',
+ ]);
+ if (fromGeneratedImages != null) {
+ let transformedList = fromGeneratedImages;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return generatedImageFromVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['generatedImages'], transformedList);
+ }
+ return toObject;
+}
+function videoFromMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromUri = getValueByPath(fromObject, ['uri']);
+ if (fromUri != null) {
+ setValueByPath(toObject, ['uri'], fromUri);
+ }
+ const fromVideoBytes = getValueByPath(fromObject, ['encodedVideo']);
+ if (fromVideoBytes != null) {
+ setValueByPath(toObject, ['videoBytes'], tBytes(fromVideoBytes));
+ }
+ const fromMimeType = getValueByPath(fromObject, ['encoding']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function videoFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromUri = getValueByPath(fromObject, ['gcsUri']);
+ if (fromUri != null) {
+ setValueByPath(toObject, ['uri'], fromUri);
+ }
+ const fromVideoBytes = getValueByPath(fromObject, [
+ 'bytesBase64Encoded',
+ ]);
+ if (fromVideoBytes != null) {
+ setValueByPath(toObject, ['videoBytes'], tBytes(fromVideoBytes));
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function videoGenerationMaskToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromImage = getValueByPath(fromObject, ['image']);
+ if (fromImage != null) {
+ setValueByPath(toObject, ['_self'], imageToVertex(fromImage));
+ }
+ const fromMaskMode = getValueByPath(fromObject, ['maskMode']);
+ if (fromMaskMode != null) {
+ setValueByPath(toObject, ['maskMode'], fromMaskMode);
+ }
+ return toObject;
+}
+function videoGenerationReferenceImageToMldev(fromObject, rootObject) {
+ const toObject = {};
+ const fromImage = getValueByPath(fromObject, ['image']);
+ if (fromImage != null) {
+ setValueByPath(toObject, ['image'], imageToMldev(fromImage));
+ }
+ const fromReferenceType = getValueByPath(fromObject, [
+ 'referenceType',
+ ]);
+ if (fromReferenceType != null) {
+ setValueByPath(toObject, ['referenceType'], fromReferenceType);
+ }
+ return toObject;
+}
+function videoGenerationReferenceImageToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromImage = getValueByPath(fromObject, ['image']);
+ if (fromImage != null) {
+ setValueByPath(toObject, ['image'], imageToVertex(fromImage));
+ }
+ const fromReferenceType = getValueByPath(fromObject, [
+ 'referenceType',
+ ]);
+ if (fromReferenceType != null) {
+ setValueByPath(toObject, ['referenceType'], fromReferenceType);
+ }
+ return toObject;
+}
+function videoToMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromUri = getValueByPath(fromObject, ['uri']);
+ if (fromUri != null) {
+ setValueByPath(toObject, ['uri'], fromUri);
+ }
+ const fromVideoBytes = getValueByPath(fromObject, ['videoBytes']);
+ if (fromVideoBytes != null) {
+ setValueByPath(toObject, ['encodedVideo'], tBytes(fromVideoBytes));
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['encoding'], fromMimeType);
+ }
+ return toObject;
+}
+function videoToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromUri = getValueByPath(fromObject, ['uri']);
+ if (fromUri != null) {
+ setValueByPath(toObject, ['gcsUri'], fromUri);
+ }
+ const fromVideoBytes = getValueByPath(fromObject, ['videoBytes']);
+ if (fromVideoBytes != null) {
+ setValueByPath(toObject, ['bytesBase64Encoded'], tBytes(fromVideoBytes));
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function voiceConfigToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
+ 'replicatedVoiceConfig',
+ ]);
+ if (fromReplicatedVoiceConfig != null) {
+ setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex(fromReplicatedVoiceConfig));
+ }
+ const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
+ 'prebuiltVoiceConfig',
+ ]);
+ if (fromPrebuiltVoiceConfig != null) {
+ setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
+ }
+ return toObject;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+function createFileSearchStoreConfigToMldev(apiClient, fromObject, parentObject) {
+ const toObject = {};
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (parentObject !== undefined && fromDisplayName != null) {
+ setValueByPath(parentObject, ['displayName'], fromDisplayName);
+ }
+ const fromEmbeddingModel = getValueByPath(fromObject, [
+ 'embeddingModel',
+ ]);
+ if (parentObject !== undefined && fromEmbeddingModel != null) {
+ setValueByPath(parentObject, ['embeddingModel'], tModel(apiClient, fromEmbeddingModel));
+ }
+ return toObject;
+}
+function createFileSearchStoreParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ createFileSearchStoreConfigToMldev(apiClient, fromConfig, toObject);
+ }
+ return toObject;
+}
+function deleteFileSearchStoreConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromForce = getValueByPath(fromObject, ['force']);
+ if (parentObject !== undefined && fromForce != null) {
+ setValueByPath(parentObject, ['_query', 'force'], fromForce);
+ }
+ return toObject;
+}
+function deleteFileSearchStoreParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], fromName);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ deleteFileSearchStoreConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function getFileSearchStoreParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], fromName);
+ }
+ return toObject;
+}
+function importFileConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromCustomMetadata = getValueByPath(fromObject, [
+ 'customMetadata',
+ ]);
+ if (parentObject !== undefined && fromCustomMetadata != null) {
+ let transformedList = fromCustomMetadata;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(parentObject, ['customMetadata'], transformedList);
+ }
+ const fromChunkingConfig = getValueByPath(fromObject, [
+ 'chunkingConfig',
+ ]);
+ if (parentObject !== undefined && fromChunkingConfig != null) {
+ setValueByPath(parentObject, ['chunkingConfig'], fromChunkingConfig);
+ }
+ return toObject;
+}
+function importFileOperationFromMldev(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ const fromDone = getValueByPath(fromObject, ['done']);
+ if (fromDone != null) {
+ setValueByPath(toObject, ['done'], fromDone);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ const fromResponse = getValueByPath(fromObject, ['response']);
+ if (fromResponse != null) {
+ setValueByPath(toObject, ['response'], importFileResponseFromMldev(fromResponse));
+ }
+ return toObject;
+}
+function importFileParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromFileSearchStoreName = getValueByPath(fromObject, [
+ 'fileSearchStoreName',
+ ]);
+ if (fromFileSearchStoreName != null) {
+ setValueByPath(toObject, ['_url', 'file_search_store_name'], fromFileSearchStoreName);
+ }
+ const fromFileName = getValueByPath(fromObject, ['fileName']);
+ if (fromFileName != null) {
+ setValueByPath(toObject, ['fileName'], fromFileName);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ importFileConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function importFileResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromParent = getValueByPath(fromObject, ['parent']);
+ if (fromParent != null) {
+ setValueByPath(toObject, ['parent'], fromParent);
+ }
+ const fromDocumentName = getValueByPath(fromObject, ['documentName']);
+ if (fromDocumentName != null) {
+ setValueByPath(toObject, ['documentName'], fromDocumentName);
+ }
+ return toObject;
+}
+function listFileSearchStoresConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromPageSize = getValueByPath(fromObject, ['pageSize']);
+ if (parentObject !== undefined && fromPageSize != null) {
+ setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
+ }
+ const fromPageToken = getValueByPath(fromObject, ['pageToken']);
+ if (parentObject !== undefined && fromPageToken != null) {
+ setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
+ }
+ return toObject;
+}
+function listFileSearchStoresParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ listFileSearchStoresConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function listFileSearchStoresResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromNextPageToken = getValueByPath(fromObject, [
+ 'nextPageToken',
+ ]);
+ if (fromNextPageToken != null) {
+ setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);
+ }
+ const fromFileSearchStores = getValueByPath(fromObject, [
+ 'fileSearchStores',
+ ]);
+ if (fromFileSearchStores != null) {
+ let transformedList = fromFileSearchStores;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['fileSearchStores'], transformedList);
+ }
+ return toObject;
+}
+function uploadToFileSearchStoreConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (parentObject !== undefined && fromMimeType != null) {
+ setValueByPath(parentObject, ['mimeType'], fromMimeType);
+ }
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
+ if (parentObject !== undefined && fromDisplayName != null) {
+ setValueByPath(parentObject, ['displayName'], fromDisplayName);
+ }
+ const fromCustomMetadata = getValueByPath(fromObject, [
+ 'customMetadata',
+ ]);
+ if (parentObject !== undefined && fromCustomMetadata != null) {
+ let transformedList = fromCustomMetadata;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(parentObject, ['customMetadata'], transformedList);
+ }
+ const fromChunkingConfig = getValueByPath(fromObject, [
+ 'chunkingConfig',
+ ]);
+ if (parentObject !== undefined && fromChunkingConfig != null) {
+ setValueByPath(parentObject, ['chunkingConfig'], fromChunkingConfig);
+ }
+ return toObject;
+}
+function uploadToFileSearchStoreParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromFileSearchStoreName = getValueByPath(fromObject, [
+ 'fileSearchStoreName',
+ ]);
+ if (fromFileSearchStoreName != null) {
+ setValueByPath(toObject, ['_url', 'file_search_store_name'], fromFileSearchStoreName);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ uploadToFileSearchStoreConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function uploadToFileSearchStoreResumableResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ return toObject;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+const CONTENT_TYPE_HEADER = 'Content-Type';
+const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
+const USER_AGENT_HEADER = 'User-Agent';
+const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
+const SDK_VERSION = '2.21.0'; // x-release-please-version
+const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
+const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
+const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
+const MULTI_REGIONAL_LOCATIONS = new Set(['us', 'eu']);
+/**
+ * Raises Undici's internal header/body timeouts to at least `timeout` ms.
+ *
+ * In Node > 18 the built-in fetch is backed by Undici, which sets a global
+ * dispatcher tracking its own headersTimeout and bodyTimeout via Symbol
+ * properties. Those would otherwise fire before a longer caller-supplied
+ * timeout.
+ */
+function raiseUndiciTimeouts(timeout) {
+ const dispatcherSymbol = Symbol.for('undici.globalDispatcher.1');
+ const globalDispatcher = globalThis[dispatcherSymbol];
+ if (!globalDispatcher) {
+ return;
+ }
+ for (const sym of Object.getOwnPropertySymbols(globalDispatcher)) {
+ const desc = sym.description;
+ if ((desc === null || desc === void 0 ? void 0 : desc.includes('headers timeout')) || (desc === null || desc === void 0 ? void 0 : desc.includes('body timeout'))) {
+ const currentTimeout = globalDispatcher[sym];
+ if (typeof currentTimeout === 'number') {
+ globalDispatcher[sym] = Math.max(currentTimeout, timeout);
+ }
+ }
+ }
+}
+/**
+ * Creates the abort plumbing for one attempt.
+ *
+ * A fresh signal per attempt is what makes `HttpOptions.timeout` a per-attempt
+ * deadline rather than a budget shared across every retry and backoff.
+ */
+function createAttemptSignal(timeout, callerSignal) {
+ const noop = () => { };
+ if (!(timeout && timeout > 0) && !callerSignal) {
+ return { signal: undefined, dispose: noop };
+ }
+ const controller = new AbortController();
+ let timeoutHandle;
+ if (timeout && timeout > 0) {
+ timeoutHandle = setTimeout(() => controller.abort(), timeout);
+ if (timeoutHandle &&
+ typeof timeoutHandle.unref === 'function') {
+ // call unref to prevent nodejs process from hanging, see
+ // https://nodejs.org/api/timers.html#timeoutunref
+ timeoutHandle.unref();
+ }
+ }
+ const onCallerAbort = () => controller.abort();
+ if (callerSignal) {
+ if (callerSignal.aborted) {
+ controller.abort();
+ }
+ else {
+ callerSignal.addEventListener('abort', onCallerAbort);
+ }
+ }
+ return {
+ signal: controller.signal,
+ dispose: () => {
+ if (timeoutHandle !== undefined) {
+ clearTimeout(timeoutHandle);
+ }
+ callerSignal === null || callerSignal === void 0 ? void 0 : callerSignal.removeEventListener('abort', onCallerAbort);
+ },
+ };
+}
+// Default retry options.
+// The config is based on https://cloud.google.com/storage/docs/retry-strategy.
+// LINT.IfChange
+const DEFAULT_RETRY_ATTEMPTS = 5; // Including the initial call
+const DEFAULT_RETRY_INITIAL_DELAY = 1.0; // seconds
+const DEFAULT_RETRY_MAX_DELAY = 60.0; // seconds
+const DEFAULT_RETRY_EXP_BASE = 2;
+const DEFAULT_RETRY_JITTER = 1;
+const DEFAULT_RETRY_HTTP_STATUS_CODES = [
+ 408, // Request timeout
+ 429, // Too many requests
+ 500, // Internal server error
+ 502, // Bad gateway
+ 503, // Service unavailable
+ 504, // Gateway timeout
+];
+/**
+ * The ApiClient class is used to send requests to the Gemini API or Vertex AI
+ * endpoints.
+ *
+ * WARNING: This is an internal API and may change without notice. Direct usage
+ * is not supported and may break your application.
+ */
+class ApiClient {
+ constructor(opts) {
+ var _a, _b, _c;
+ this.clientOptions = Object.assign({}, opts);
+ this.customBaseUrl = (_a = opts.httpOptions) === null || _a === void 0 ? void 0 : _a.baseUrl;
+ const initHttpOptions = {};
+ if (this.clientOptions.vertexai) {
+ if (!this.clientOptions.location &&
+ !this.clientOptions.apiKey &&
+ !this.customBaseUrl) {
+ this.clientOptions.location = 'global';
+ }
+ const hasSufficientAuth = (this.clientOptions.project && this.clientOptions.location) ||
+ this.clientOptions.apiKey;
+ if (!hasSufficientAuth && !this.customBaseUrl) {
+ throw new Error('Authentication is not set up. Please provide either a project and location, or an API key, or a custom base URL.');
+ }
+ const hasConstructorAuth = (opts.project && opts.location) || !!opts.apiKey;
+ if (this.customBaseUrl && !hasConstructorAuth) {
+ initHttpOptions.baseUrl = this.customBaseUrl;
+ this.clientOptions.project = undefined;
+ this.clientOptions.location = undefined;
+ }
+ else if ((this.clientOptions.apiKey && !this.clientOptions.project) ||
+ this.clientOptions.location === 'global') {
+ // Vertex Express or global endpoint case.
+ initHttpOptions.baseUrl = 'https://aiplatform.googleapis.com/';
+ }
+ else if (this.clientOptions.project &&
+ this.clientOptions.location &&
+ MULTI_REGIONAL_LOCATIONS.has(this.clientOptions.location)) {
+ initHttpOptions.baseUrl = `https://aiplatform.${this.clientOptions.location}.rep.googleapis.com/`;
+ }
+ else if (this.clientOptions.project && this.clientOptions.location) {
+ initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;
+ }
+ initHttpOptions.apiVersion =
+ (_b = this.clientOptions.apiVersion) !== null && _b !== void 0 ? _b : VERTEX_AI_API_DEFAULT_VERSION;
+ }
+ else {
+ // Gemini API
+ if (!this.clientOptions.apiKey) {
+ console.warn('API key should be set when using the Gemini API.');
+ }
+ initHttpOptions.apiVersion =
+ (_c = this.clientOptions.apiVersion) !== null && _c !== void 0 ? _c : GOOGLE_AI_API_DEFAULT_VERSION;
+ initHttpOptions.baseUrl = `https://generativelanguage.googleapis.com/`;
+ }
+ initHttpOptions.headers = this.getDefaultHeaders();
+ this.clientOptions.httpOptions = initHttpOptions;
+ if (opts.httpOptions) {
+ this.clientOptions.httpOptions = this.patchHttpOptions(initHttpOptions, opts.httpOptions);
+ }
+ }
+ isVertexAI() {
+ var _a;
+ return (_a = this.clientOptions.vertexai) !== null && _a !== void 0 ? _a : false;
+ }
+ getProject() {
+ return this.clientOptions.project;
+ }
+ getLocation() {
+ return this.clientOptions.location;
+ }
+ getCustomBaseUrl() {
+ return this.customBaseUrl;
+ }
+ async getAuthHeaders() {
+ const headers = new Headers();
+ await this.clientOptions.auth.addAuthHeaders(headers);
+ return headers;
+ }
+ getApiVersion() {
+ if (this.clientOptions.httpOptions &&
+ this.clientOptions.httpOptions.apiVersion !== undefined) {
+ return this.clientOptions.httpOptions.apiVersion;
+ }
+ throw new Error('API version is not set.');
+ }
+ getBaseUrl() {
+ if (this.clientOptions.httpOptions &&
+ this.clientOptions.httpOptions.baseUrl !== undefined) {
+ return this.clientOptions.httpOptions.baseUrl;
+ }
+ throw new Error('Base URL is not set.');
+ }
+ getRequestUrl() {
+ return this.getRequestUrlInternal(this.clientOptions.httpOptions);
+ }
+ getHeaders() {
+ if (this.clientOptions.httpOptions &&
+ this.clientOptions.httpOptions.headers !== undefined) {
+ return this.clientOptions.httpOptions.headers;
+ }
+ else {
+ throw new Error('Headers are not set.');
+ }
+ }
+ getRequestUrlInternal(httpOptions) {
+ if (!httpOptions ||
+ httpOptions.baseUrl === undefined ||
+ httpOptions.apiVersion === undefined) {
+ throw new Error('HTTP options are not correctly set.');
+ }
+ const baseUrl = httpOptions.baseUrl.endsWith('/')
+ ? httpOptions.baseUrl.slice(0, -1)
+ : httpOptions.baseUrl;
+ const urlElement = [baseUrl];
+ if (httpOptions.apiVersion && httpOptions.apiVersion !== '') {
+ urlElement.push(httpOptions.apiVersion);
+ }
+ return urlElement.join('/');
+ }
+ getBaseResourcePath() {
+ return `projects/${this.clientOptions.project}/locations/${this.clientOptions.location}`;
+ }
+ getApiKey() {
+ return this.clientOptions.apiKey;
+ }
+ getWebsocketBaseUrl() {
+ const baseUrl = this.getBaseUrl();
+ const urlParts = new URL(baseUrl);
+ urlParts.protocol = urlParts.protocol == 'http:' ? 'ws' : 'wss';
+ return urlParts.toString();
+ }
+ setBaseUrl(url) {
+ if (this.clientOptions.httpOptions) {
+ this.clientOptions.httpOptions.baseUrl = url;
+ }
+ else {
+ throw new Error('HTTP options are not correctly set.');
+ }
+ }
+ constructUrl(path, httpOptions, prependProjectLocation) {
+ const urlElement = [this.getRequestUrlInternal(httpOptions)];
+ if (prependProjectLocation) {
+ urlElement.push(this.getBaseResourcePath());
+ }
+ if (path !== '') {
+ urlElement.push(path);
+ }
+ const url = new URL(`${urlElement.join('/')}`);
+ return url;
+ }
+ shouldPrependVertexProjectPath(request, httpOptions) {
+ if (httpOptions.baseUrl &&
+ httpOptions.baseUrlResourceScope === ResourceScope.COLLECTION) {
+ return false;
+ }
+ if (!this.clientOptions.vertexai) {
+ return false;
+ }
+ if (!this.clientOptions.project || !this.clientOptions.location) {
+ return false;
+ }
+ if (request.path.startsWith('projects/')) {
+ // Assume the path already starts with
+ // `projects//location/`.
+ return false;
+ }
+ if (request.httpMethod === 'GET' &&
+ request.path.startsWith('publishers/google/models')) {
+ // These paths are used by Vertex's models.get and models.list
+ // calls. For base models Vertex does not accept a project/location
+ // prefix (for tuned model the prefix is required).
+ return false;
+ }
+ return true;
+ }
+ async request(request) {
+ let patchedHttpOptions = this.clientOptions.httpOptions;
+ if (request.httpOptions) {
+ patchedHttpOptions = this.patchHttpOptions(this.clientOptions.httpOptions, request.httpOptions);
+ }
+ const prependProjectLocation = this.shouldPrependVertexProjectPath(request, patchedHttpOptions);
+ const url = this.constructUrl(request.path, patchedHttpOptions, prependProjectLocation);
+ if (request.queryParams) {
+ for (const [key, value] of Object.entries(request.queryParams)) {
+ url.searchParams.append(key, String(value));
+ }
+ }
+ let requestInit = {};
+ if (request.httpMethod === 'GET') {
+ if (request.body && request.body !== '{}') {
+ throw new Error('Request body should be empty for GET request, but got non empty request body');
+ }
+ }
+ else {
+ requestInit.body = request.body;
+ }
+ requestInit = await this.includeExtraHttpOptionsToRequestInit(requestInit, patchedHttpOptions, url.toString());
+ return this.unaryApiCall(url, requestInit, request.httpMethod, patchedHttpOptions.retryOptions, patchedHttpOptions.timeout, request.abortSignal);
+ }
+ patchHttpOptions(baseHttpOptions, requestHttpOptions) {
+ const patchedHttpOptions = JSON.parse(JSON.stringify(baseHttpOptions));
+ for (const [key, value] of Object.entries(requestHttpOptions)) {
+ // Records compile to objects.
+ if (typeof value === 'object') {
+ // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type
+ // because expression of type 'string' can't be used to index type
+ // 'HttpOptions'.
+ patchedHttpOptions[key] = Object.assign(Object.assign({}, patchedHttpOptions[key]), value);
+ }
+ else if (value !== undefined) {
+ // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type
+ // because expression of type 'string' can't be used to index type
+ // 'HttpOptions'.
+ patchedHttpOptions[key] = value;
+ }
+ }
+ return patchedHttpOptions;
+ }
+ async requestStream(request) {
+ let patchedHttpOptions = this.clientOptions.httpOptions;
+ if (request.httpOptions) {
+ patchedHttpOptions = this.patchHttpOptions(this.clientOptions.httpOptions, request.httpOptions);
+ }
+ const prependProjectLocation = this.shouldPrependVertexProjectPath(request, patchedHttpOptions);
+ const url = this.constructUrl(request.path, patchedHttpOptions, prependProjectLocation);
+ if (!url.searchParams.has('alt') || url.searchParams.get('alt') !== 'sse') {
+ url.searchParams.set('alt', 'sse');
+ }
+ let requestInit = {};
+ requestInit.body = request.body;
+ requestInit = await this.includeExtraHttpOptionsToRequestInit(requestInit, patchedHttpOptions, url.toString());
+ return this.streamApiCall(url, requestInit, request.httpMethod, patchedHttpOptions.retryOptions, patchedHttpOptions.timeout, request.abortSignal);
+ }
+ async includeExtraHttpOptionsToRequestInit(requestInit, httpOptions, url) {
+ if ((httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.timeout) && httpOptions.timeout > 0) {
+ raiseUndiciTimeouts(httpOptions.timeout);
+ }
+ if (httpOptions && httpOptions.extraBody !== null) {
+ includeExtraBodyToRequestInit(requestInit, httpOptions.extraBody);
+ }
+ requestInit.headers = await this.getHeadersInternal(httpOptions, url);
+ return requestInit;
+ }
+ async unaryApiCall(url, requestInit, httpMethod, retryOptions, timeout, abortSignal) {
+ return this.apiCall(url.toString(), Object.assign(Object.assign({}, requestInit), { method: httpMethod }), retryOptions, timeout, abortSignal)
+ .then(async (response) => {
+ await throwErrorIfNotOK(response);
+ return new HttpResponse(response);
+ })
+ .catch((e) => {
+ if (e instanceof Error) {
+ throw e;
+ }
+ else {
+ throw new Error(`exception ${e} sending request`, { cause: e });
+ }
+ });
+ }
+ async streamApiCall(url, requestInit, httpMethod, retryOptions, timeout, abortSignal) {
+ return this.apiCall(url.toString(), Object.assign(Object.assign({}, requestInit), { method: httpMethod }), retryOptions, timeout, abortSignal)
+ .then(async (response) => {
+ await throwErrorIfNotOK(response);
+ return this.processStreamResponse(response);
+ })
+ .catch((e) => {
+ if (e instanceof Error) {
+ throw e;
+ }
+ else {
+ throw new Error(`exception ${e} sending request`, { cause: e });
+ }
+ });
+ }
+ processStreamResponse(response) {
+ return __asyncGenerator(this, arguments, function* processStreamResponse_1() {
+ var _a;
+ const reader = (_a = response === null || response === void 0 ? void 0 : response.body) === null || _a === void 0 ? void 0 : _a.getReader();
+ const decoder = new TextDecoder('utf-8');
+ if (!reader) {
+ throw new Error('Response body is empty');
+ }
+ try {
+ let buffer = '';
+ const dataPrefix = 'data:';
+ const delimiters = ['\n\n', '\r\r', '\r\n\r\n'];
+ while (true) {
+ const { done, value } = yield __await(reader.read());
+ if (done) {
+ if (buffer.trim().length > 0) {
+ throw new Error('Incomplete JSON segment at the end');
+ }
+ break;
+ }
+ const chunkString = decoder.decode(value, { stream: true });
+ // Parse and throw an error if the chunk contains an error.
+ try {
+ const chunkJson = JSON.parse(chunkString);
+ if ('error' in chunkJson) {
+ const errorJson = JSON.parse(JSON.stringify(chunkJson['error']));
+ const status = errorJson['status'];
+ const code = errorJson['code'];
+ const errorMessage = `got status: ${status}. ${JSON.stringify(chunkJson)}`;
+ if (code >= 400 && code < 600) {
+ const apiError = new ApiError({
+ message: errorMessage,
+ status: code,
+ });
+ throw apiError;
+ }
+ }
+ }
+ catch (e) {
+ const error = e;
+ if (error.name === 'ApiError') {
+ throw e;
+ }
+ }
+ buffer += chunkString;
+ let delimiterIndex = -1;
+ let delimiterLength = 0;
+ while (true) {
+ delimiterIndex = -1;
+ delimiterLength = 0;
+ for (const delimiter of delimiters) {
+ const index = buffer.indexOf(delimiter);
+ if (index !== -1 &&
+ (delimiterIndex === -1 || index < delimiterIndex)) {
+ delimiterIndex = index;
+ delimiterLength = delimiter.length;
+ }
+ }
+ if (delimiterIndex === -1) {
+ break; // No complete event in buffer
+ }
+ const eventString = buffer.substring(0, delimiterIndex);
+ buffer = buffer.substring(delimiterIndex + delimiterLength);
+ const trimmedEvent = eventString.trim();
+ if (trimmedEvent.startsWith(dataPrefix)) {
+ const processedChunkString = trimmedEvent
+ .substring(dataPrefix.length)
+ .trim();
+ try {
+ const partialResponse = new Response(processedChunkString, {
+ headers: response === null || response === void 0 ? void 0 : response.headers,
+ status: response === null || response === void 0 ? void 0 : response.status,
+ statusText: response === null || response === void 0 ? void 0 : response.statusText,
+ });
+ yield yield __await(new HttpResponse(partialResponse));
+ }
+ catch (e) {
+ throw new Error(`exception parsing stream chunk ${processedChunkString}. ${e}`);
+ }
+ }
+ }
+ }
+ }
+ finally {
+ reader.releaseLock();
+ }
+ });
+ }
+ async apiCall(url, requestInit, retryOptions, timeout, abortSignal) {
+ var _a, _b, _c, _d, _e, _f;
+ const retryableStatusCodes = (_a = retryOptions === null || retryOptions === void 0 ? void 0 : retryOptions.httpStatusCodes) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_HTTP_STATUS_CODES;
+ const runFetch = async () => {
+ // A fresh signal per attempt, so that `timeout` bounds this attempt
+ // rather than the whole retry sequence.
+ const attempt = createAttemptSignal(timeout, abortSignal);
+ let response;
+ try {
+ response = await fetch(url, Object.assign(Object.assign({}, requestInit), { signal: attempt.signal }));
+ }
+ catch (e) {
+ attempt.dispose();
+ throw e;
+ }
+ if (!retryOptions ||
+ response.ok ||
+ !retryableStatusCodes.includes(response.status)) {
+ // Either a success, or a failure that must not be retried.
+ //
+ // The attempt is deliberately not disposed: ownership of the response
+ // passes to the caller, and the timeout must stay armed while the body
+ // is consumed.
+ return response;
+ }
+ // Retryable failure, and this response is about to be discarded, so the
+ // attempt's timeout is no longer needed.
+ try {
+ // Throw the typed `ApiError` so that callers can still rely on
+ // `error.status` once the retries are exhausted.
+ await throwErrorIfNotOK(response);
+ }
+ finally {
+ attempt.dispose();
+ }
+ // Unreachable: throwErrorIfNotOK always throws for a non-ok response.
+ return response;
+ };
+ if (!retryOptions) {
+ return runFetch();
+ }
+ // `attempts` counts the initial call, so p-retry gets one less.
+ const attempts = Math.max(1, (_b = retryOptions.attempts) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_ATTEMPTS);
+ const minTimeout = Math.round(((_c = retryOptions.initialDelay) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_INITIAL_DELAY) * 1000);
+ const maxTimeout = Math.max(minTimeout, Math.round(((_d = retryOptions.maxDelay) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_MAX_DELAY) * 1000));
+ return p_retry(runFetch, {
+ retries: attempts - 1,
+ factor: (_e = retryOptions.expBase) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_EXP_BASE,
+ minTimeout,
+ maxTimeout,
+ randomize: ((_f = retryOptions.jitter) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_JITTER) > 0,
+ onFailedAttempt: (info) => {
+ var _a;
+ if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {
+ throw (_a = info.error) !== null && _a !== void 0 ? _a : info;
+ }
+ },
+ });
+ }
+ getDefaultHeaders() {
+ const headers = {};
+ const versionHeaderValue = LIBRARY_LABEL + ' ' + this.clientOptions.userAgentExtra;
+ headers[USER_AGENT_HEADER] = versionHeaderValue;
+ headers[GOOGLE_API_CLIENT_HEADER] = versionHeaderValue;
+ headers[CONTENT_TYPE_HEADER] = 'application/json';
+ return headers;
+ }
+ async getHeadersInternal(httpOptions, url) {
+ const headers = new Headers();
+ if (httpOptions && httpOptions.headers) {
+ for (const [key, value] of Object.entries(httpOptions.headers)) {
+ headers.append(key, value);
+ }
+ }
+ // Append a timeout header if it is set, note that the timeout option is
+ // in milliseconds but the header is in seconds.
+ // NOTE: This is intentionally outside the httpOptions.headers guard above
+ // so that the X-Server-Timeout header is always sent whenever a timeout
+ // is configured, even if the caller did not supply any custom headers.
+ if ((httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.timeout) && httpOptions.timeout > 0) {
+ headers.append(SERVER_TIMEOUT_HEADER, String(Math.ceil(httpOptions.timeout / 1000)));
+ }
+ await this.clientOptions.auth.addAuthHeaders(headers, url);
+ return headers;
+ }
+ getFileName(file) {
+ var _a;
+ let fileName = '';
+ if (typeof file === 'string') {
+ fileName = file.replace(/[/\\]+$/, '');
+ fileName = (_a = fileName.split(/[/\\]/).pop()) !== null && _a !== void 0 ? _a : '';
+ }
+ return fileName;
+ }
+ /**
+ * Uploads a file asynchronously using Gemini API only, this is not supported
+ * in Vertex AI.
+ *
+ * @param file The string path to the file to be uploaded or a Blob object.
+ * @param config Optional parameters specified in the `UploadFileConfig`
+ * interface. @see {@link types.UploadFileConfig}
+ * @return A promise that resolves to a `File` object.
+ * @throws An error if called on a Vertex AI client.
+ * @throws An error if the `mimeType` is not provided and can not be inferred,
+ */
+ async uploadFile(file, config) {
+ var _a;
+ const fileToUpload = {};
+ if (config != null) {
+ fileToUpload.mimeType = config.mimeType;
+ fileToUpload.name = config.name;
+ fileToUpload.displayName = config.displayName;
+ }
+ if (fileToUpload.name && !fileToUpload.name.startsWith('files/')) {
+ fileToUpload.name = `files/${fileToUpload.name}`;
+ }
+ const uploader = this.clientOptions.uploader;
+ const fileStat = await uploader.stat(file);
+ fileToUpload.sizeBytes = String(fileStat.size);
+ const mimeType = (_a = config === null || config === void 0 ? void 0 : config.mimeType) !== null && _a !== void 0 ? _a : fileStat.type;
+ if (mimeType === undefined || mimeType === '') {
+ throw new Error('Can not determine mimeType. Please provide mimeType in the config.');
+ }
+ fileToUpload.mimeType = mimeType;
+ const body = {
+ file: fileToUpload,
+ };
+ const fileName = this.getFileName(file);
+ const path = formatMap('upload/v1beta/files', body['_url']);
+ const uploadUrl = await this.fetchUploadUrl(path, fileToUpload.sizeBytes, fileToUpload.mimeType, fileName, body, config === null || config === void 0 ? void 0 : config.httpOptions);
+ return uploader.upload(file, uploadUrl, this);
+ }
+ /**
+ * Uploads a file to a given file search store asynchronously using Gemini API only, this is not supported
+ * in Vertex AI.
+ *
+ * @param fileSearchStoreName The name of the file search store to upload the file to.
+ * @param file The string path to the file to be uploaded or a Blob object.
+ * @param config Optional parameters specified in the `UploadFileConfig`
+ * interface. @see {@link UploadFileConfig}
+ * @return A promise that resolves to a `File` object.
+ * @throws An error if called on a Vertex AI client.
+ * @throws An error if the `mimeType` is not provided and can not be inferred,
+ */
+ async uploadFileToFileSearchStore(fileSearchStoreName, file, config) {
+ var _a;
+ const uploader = this.clientOptions.uploader;
+ const fileStat = await uploader.stat(file);
+ const sizeBytes = String(fileStat.size);
+ const mimeType = (_a = config === null || config === void 0 ? void 0 : config.mimeType) !== null && _a !== void 0 ? _a : fileStat.type;
+ if (mimeType === undefined || mimeType === '') {
+ throw new Error('Can not determine mimeType. Please provide mimeType in the config.');
+ }
+ const path = `upload/v1beta/${fileSearchStoreName}:uploadToFileSearchStore`;
+ const fileName = this.getFileName(file);
+ const body = {};
+ if (config != null) {
+ uploadToFileSearchStoreConfigToMldev(config, body);
+ }
+ const uploadUrl = await this.fetchUploadUrl(path, sizeBytes, mimeType, fileName, body, config === null || config === void 0 ? void 0 : config.httpOptions);
+ return uploader.uploadToFileSearchStore(file, uploadUrl, this);
+ }
+ /**
+ * Downloads a file asynchronously to the specified path.
+ *
+ * @params params - The parameters for the download request, see {@link
+ * types.DownloadFileParameters}
+ */
+ async downloadFile(params) {
+ const downloader = this.clientOptions.downloader;
+ await downloader.download(params, this);
+ }
+ async fetchUploadUrl(path, sizeBytes, mimeType, fileName, body, configHttpOptions) {
+ var _a;
+ let httpOptions = {};
+ if (configHttpOptions) {
+ httpOptions = configHttpOptions;
+ }
+ else {
+ httpOptions = {
+ apiVersion: '', // api-version is set in the path.
+ headers: Object.assign({ 'Content-Type': 'application/json', 'X-Goog-Upload-Protocol': 'resumable', 'X-Goog-Upload-Command': 'start', 'X-Goog-Upload-Header-Content-Length': `${sizeBytes}`, 'X-Goog-Upload-Header-Content-Type': `${mimeType}` }, (fileName ? { 'X-Goog-Upload-File-Name': fileName } : {})),
+ };
+ }
+ const httpResponse = await this.request({
+ path,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions,
+ });
+ if (!httpResponse || !(httpResponse === null || httpResponse === void 0 ? void 0 : httpResponse.headers)) {
+ throw new Error('Server did not return an HttpResponse or the returned HttpResponse did not have headers.');
+ }
+ const uploadUrl = (_a = httpResponse === null || httpResponse === void 0 ? void 0 : httpResponse.headers) === null || _a === void 0 ? void 0 : _a['x-goog-upload-url'];
+ if (uploadUrl === undefined) {
+ throw new Error('Failed to get upload url. Server did not return the x-google-upload-url in the headers');
+ }
+ return uploadUrl;
+ }
+}
+async function throwErrorIfNotOK(response) {
+ var _a;
+ if (response === undefined) {
+ throw new Error('response is undefined');
+ }
+ if (!response.ok) {
+ const status = response.status;
+ let errorBody;
+ if ((_a = response.headers.get('content-type')) === null || _a === void 0 ? void 0 : _a.includes('application/json')) {
+ errorBody = await response.json();
+ }
+ else {
+ errorBody = {
+ error: {
+ message: await response.text(),
+ code: response.status,
+ status: response.statusText,
+ },
+ };
+ }
+ const errorMessage = JSON.stringify(errorBody);
+ if (status >= 400 && status < 600) {
+ const apiError = new ApiError({
+ message: errorMessage,
+ status: status,
+ });
+ throw apiError;
+ }
+ throw new Error(errorMessage);
+ }
+}
+/**
+ * Recursively updates the `requestInit.body` with values from an `extraBody` object.
+ *
+ * If `requestInit.body` is a string, it's assumed to be JSON and will be parsed.
+ * The `extraBody` is then deeply merged into this parsed object.
+ * If `requestInit.body` is a Blob, `extraBody` will be ignored, and a warning logged,
+ * as merging structured data into an opaque Blob is not supported.
+ *
+ * The function does not enforce that updated values from `extraBody` have the
+ * same type as existing values in `requestInit.body`. Type mismatches during
+ * the merge will result in a warning, but the value from `extraBody` will overwrite
+ * the original. `extraBody` users are responsible for ensuring `extraBody` has the correct structure.
+ *
+ * @param requestInit The RequestInit object whose body will be updated.
+ * @param extraBody The object containing updates to be merged into `requestInit.body`.
+ */
+function includeExtraBodyToRequestInit(requestInit, extraBody) {
+ if (!extraBody || Object.keys(extraBody).length === 0) {
+ return;
+ }
+ if (requestInit.body instanceof Blob) {
+ console.warn('includeExtraBodyToRequestInit: extraBody provided but current request body is a Blob. extraBody will be ignored as merging is not supported for Blob bodies.');
+ return;
+ }
+ let currentBodyObject = {};
+ // If adding new type to HttpRequest.body, please check the code below to
+ // see if we need to update the logic.
+ if (typeof requestInit.body === 'string' && requestInit.body.length > 0) {
+ try {
+ const parsedBody = JSON.parse(requestInit.body);
+ if (typeof parsedBody === 'object' &&
+ parsedBody !== null &&
+ !Array.isArray(parsedBody)) {
+ currentBodyObject = parsedBody;
+ }
+ else {
+ console.warn('includeExtraBodyToRequestInit: Original request body is valid JSON but not a non-array object. Skip applying extraBody to the request body.');
+ return;
+ }
+ /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
+ }
+ catch (e) {
+ console.warn('includeExtraBodyToRequestInit: Original request body is not valid JSON. Skip applying extraBody to the request body.');
+ return;
+ }
+ }
+ function deepMerge(target, source) {
+ const output = Object.assign({}, target);
+ for (const key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ const sourceValue = source[key];
+ const targetValue = output[key];
+ if (sourceValue &&
+ typeof sourceValue === 'object' &&
+ !Array.isArray(sourceValue) &&
+ targetValue &&
+ typeof targetValue === 'object' &&
+ !Array.isArray(targetValue)) {
+ output[key] = deepMerge(targetValue, sourceValue);
+ }
+ else {
+ if (targetValue &&
+ sourceValue &&
+ typeof targetValue !== typeof sourceValue) {
+ console.warn(`includeExtraBodyToRequestInit:deepMerge: Type mismatch for key "${key}". Original type: ${typeof targetValue}, New type: ${typeof sourceValue}. Overwriting.`);
+ }
+ output[key] = sourceValue;
+ }
+ }
+ }
+ return output;
+ }
+ const mergedBody = deepMerge(currentBodyObject, extraBody);
+ requestInit.body = JSON.stringify(mergedBody);
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+// TODO: b/416041229 - Determine how to retrieve the MCP package version.
+const MCP_LABEL = 'mcp_used/unknown';
+// Whether MCP tool usage is detected from mcpToTool. This is used for
+// telemetry.
+let hasMcpToolUsageFromMcpToTool = false;
+// Checks whether the list of tools contains any MCP tools.
+function hasMcpToolUsage(tools) {
+ for (const tool of tools) {
+ if (isMcpCallableTool(tool)) {
+ return true;
+ }
+ if (typeof tool === 'object' && 'inputSchema' in tool) {
+ return true;
+ }
+ }
+ return hasMcpToolUsageFromMcpToTool;
+}
+// Sets the MCP version label in the Google API client header.
+function setMcpUsageHeader(headers) {
+ var _a;
+ const existingHeader = (_a = headers[GOOGLE_API_CLIENT_HEADER]) !== null && _a !== void 0 ? _a : '';
+ headers[GOOGLE_API_CLIENT_HEADER] = (existingHeader + ` ${MCP_LABEL}`).trimStart();
+}
+// Returns true if the object is a MCP CallableTool, otherwise false.
+function isMcpCallableTool(object) {
+ return (object !== null &&
+ typeof object === 'object' &&
+ object instanceof McpCallableTool);
+}
+// List all tools from the MCP client.
+function listAllTools(mcpClient_1) {
+ return __asyncGenerator(this, arguments, function* listAllTools_1(mcpClient, maxTools = 100) {
+ let cursor = undefined;
+ let numTools = 0;
+ while (numTools < maxTools) {
+ const t = yield __await(mcpClient.listTools({ cursor }));
+ for (const tool of t.tools) {
+ yield yield __await(tool);
+ numTools++;
+ }
+ if (!t.nextCursor) {
+ break;
+ }
+ cursor = t.nextCursor;
+ }
+ });
+}
+/**
+ * McpCallableTool can be used for model inference and invoking MCP clients with
+ * given function call arguments.
+ *
+ * @experimental Built-in MCP support is an experimental feature, may change in future
+ * versions.
+ */
+class McpCallableTool {
+ constructor(mcpClients = [], config) {
+ this.mcpTools = [];
+ this.functionNameToMcpClient = {};
+ this.mcpClients = mcpClients;
+ this.config = config;
+ }
+ /**
+ * Creates a McpCallableTool.
+ */
+ static create(mcpClients, config) {
+ return new McpCallableTool(mcpClients, config);
+ }
+ /**
+ * Validates the function names are not duplicate and initialize the function
+ * name to MCP client mapping.
+ *
+ * @throws {Error} if the MCP tools from the MCP clients have duplicate tool
+ * names.
+ */
+ async initialize() {
+ var _a, e_1, _b, _c;
+ if (this.mcpTools.length > 0) {
+ return;
+ }
+ const functionMap = {};
+ const mcpTools = [];
+ for (const mcpClient of this.mcpClients) {
+ try {
+ for (var _d = true, _e = (e_1 = void 0, __asyncValues(listAllTools(mcpClient))), _f; _f = await _e.next(), _a = _f.done, !_a; _d = true) {
+ _c = _f.value;
+ _d = false;
+ const mcpTool = _c;
+ mcpTools.push(mcpTool);
+ const mcpToolName = mcpTool.name;
+ if (functionMap[mcpToolName]) {
+ throw new Error(`Duplicate function name ${mcpToolName} found in MCP tools. Please ensure function names are unique.`);
+ }
+ functionMap[mcpToolName] = mcpClient;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (!_d && !_a && (_b = _e.return)) await _b.call(_e);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ }
+ this.mcpTools = mcpTools;
+ this.functionNameToMcpClient = functionMap;
+ }
+ async tool() {
+ await this.initialize();
+ return mcpToolsToGeminiTool(this.mcpTools, this.config);
+ }
+ async callTool(functionCalls) {
+ await this.initialize();
+ const functionCallResponseParts = [];
+ for (const functionCall of functionCalls) {
+ if (functionCall.name in this.functionNameToMcpClient) {
+ const mcpClient = this.functionNameToMcpClient[functionCall.name];
+ let requestOptions = undefined;
+ // TODO: b/424238654 - Add support for finer grained timeout control.
+ if (this.config.timeout) {
+ requestOptions = {
+ timeout: this.config.timeout,
+ };
+ }
+ const callToolResponse = await mcpClient.callTool({
+ name: functionCall.name,
+ arguments: functionCall.args,
+ },
+ // Set the result schema to undefined to allow MCP to rely on the
+ // default schema.
+ undefined, requestOptions);
+ functionCallResponseParts.push({
+ functionResponse: {
+ name: functionCall.name,
+ response: callToolResponse.isError
+ ? { error: callToolResponse }
+ : callToolResponse,
+ },
+ });
+ }
+ }
+ return functionCallResponseParts;
+ }
+}
+function isMcpClient(client) {
+ return (client !== null &&
+ typeof client === 'object' &&
+ 'listTools' in client &&
+ typeof client.listTools === 'function');
+}
+/**
+ * Creates a McpCallableTool from MCP clients and an optional config.
+ *
+ * The callable tool can invoke the MCP clients with given function call
+ * arguments. (often for automatic function calling).
+ * Use the config to modify tool parameters such as behavior.
+ *
+ * @experimental Built-in MCP support is an experimental feature, may change in future
+ * versions.
+ */
+function mcpToTool(...args) {
+ // Set MCP usage for telemetry.
+ hasMcpToolUsageFromMcpToTool = true;
+ if (args.length === 0) {
+ throw new Error('No MCP clients provided');
+ }
+ const maybeConfig = args[args.length - 1];
+ if (isMcpClient(maybeConfig)) {
+ return McpCallableTool.create(args, {});
+ }
+ return McpCallableTool.create(args.slice(0, args.length - 1), maybeConfig);
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+/**
+ * Handles incoming messages from the WebSocket.
+ *
+ * @remarks
+ * This function is responsible for parsing incoming messages, transforming them
+ * into LiveMusicServerMessage, and then calling the onmessage callback.
+ * Note that the first message which is received from the server is a
+ * setupComplete message.
+ *
+ * @param apiClient The ApiClient instance.
+ * @param onmessage The user-provided onmessage callback (if any).
+ * @param event The MessageEvent from the WebSocket.
+ */
+async function handleWebSocketMessage$1(apiClient, onmessage, event) {
+ const serverMessage = new LiveMusicServerMessage();
+ let data;
+ if (event.data instanceof Blob) {
+ data = JSON.parse(await event.data.text());
+ }
+ else {
+ data = JSON.parse(event.data);
+ }
+ Object.assign(serverMessage, data);
+ onmessage(serverMessage);
+}
+/**
+ LiveMusic class encapsulates the configuration for live music
+ generation via Lyria Live models.
+
+ @experimental
+ */
+class LiveMusic {
+ constructor(apiClient, auth, webSocketFactory) {
+ this.apiClient = apiClient;
+ this.auth = auth;
+ this.webSocketFactory = webSocketFactory;
+ }
+ /**
+ Establishes a connection to the specified model and returns a
+ LiveMusicSession object representing that connection.
+
+ @experimental
+
+ @remarks
+
+ @param params - The parameters for establishing a connection to the model.
+ @return A live session.
+
+ @example
+ ```ts
+ let model = 'models/lyria-realtime-exp';
+ const session = await ai.live.music.connect({
+ model: model,
+ callbacks: {
+ onmessage: (e: MessageEvent) => {
+ console.log('Received message from the server: %s\n', debug(e.data));
+ },
+ onerror: (e: ErrorEvent) => {
+ console.log('Error occurred: %s\n', debug(e.error));
+ },
+ onclose: (e: CloseEvent) => {
+ console.log('Connection closed.');
+ },
+ },
+ });
+ ```
+ */
+ async connect(params) {
+ var _a, _b;
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('Live music is not supported for Vertex AI.');
+ }
+ console.warn('Live music generation is experimental and may change in future versions.');
+ const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();
+ const apiVersion = this.apiClient.getApiVersion();
+ const headers = mapToHeaders$1(this.apiClient.getDefaultHeaders());
+ const apiKey = this.apiClient.getApiKey();
+ const url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${apiVersion}.GenerativeService.BidiGenerateMusic?key=${apiKey}`;
+ let onopenResolve = () => { };
+ const onopenPromise = new Promise((resolve) => {
+ onopenResolve = resolve;
+ });
+ const callbacks = params.callbacks;
+ const onopenAwaitedCallback = function () {
+ onopenResolve({});
+ };
+ const apiClient = this.apiClient;
+ const websocketCallbacks = {
+ onopen: onopenAwaitedCallback,
+ onmessage: (event) => {
+ void handleWebSocketMessage$1(apiClient, callbacks.onmessage, event);
+ },
+ onerror: (_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onerror) !== null && _a !== void 0 ? _a : function (e) {
+ },
+ onclose: (_b = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onclose) !== null && _b !== void 0 ? _b : function (e) {
+ },
+ };
+ const conn = this.webSocketFactory.create(url, headersToMap$1(headers), websocketCallbacks);
+ conn.connect();
+ // Wait for the websocket to open before sending requests.
+ await onopenPromise;
+ const model = tModel(this.apiClient, params.model);
+ const setup = { model };
+ const clientMessage = { setup };
+ conn.send(JSON.stringify(clientMessage));
+ return new LiveMusicSession(conn, this.apiClient);
+ }
+}
+/**
+ Represents a connection to the API.
+
+ @experimental
+ */
+class LiveMusicSession {
+ constructor(conn, apiClient) {
+ this.conn = conn;
+ this.apiClient = apiClient;
+ }
+ /**
+ Sets inputs to steer music generation. Updates the session's current
+ weighted prompts.
+
+ @param params - Contains one property, `weightedPrompts`.
+
+ - `weightedPrompts` to send to the model; weights are normalized to
+ sum to 1.0.
+
+ @experimental
+ */
+ async setWeightedPrompts(params) {
+ if (!params.weightedPrompts ||
+ Object.keys(params.weightedPrompts).length === 0) {
+ throw new Error('Weighted prompts must be set and contain at least one entry.');
+ }
+ const clientContent = liveMusicSetWeightedPromptsParametersToMldev(params);
+ this.conn.send(JSON.stringify({ clientContent }));
+ }
+ /**
+ Sets a configuration to the model. Updates the session's current
+ music generation config.
+
+ @param params - Contains one property, `musicGenerationConfig`.
+
+ - `musicGenerationConfig` to set in the model. Passing an empty or
+ undefined config to the model will reset the config to defaults.
+
+ @experimental
+ */
+ async setMusicGenerationConfig(params) {
+ if (!params.musicGenerationConfig) {
+ params.musicGenerationConfig = {};
+ }
+ const setConfigParameters = liveMusicSetConfigParametersToMldev(params);
+ this.conn.send(JSON.stringify(setConfigParameters));
+ }
+ sendPlaybackControl(playbackControl) {
+ const clientMessage = { playbackControl };
+ this.conn.send(JSON.stringify(clientMessage));
+ }
+ /**
+ * Start the music stream.
+ *
+ * @experimental
+ */
+ play() {
+ this.sendPlaybackControl(LiveMusicPlaybackControl.PLAY);
+ }
+ /**
+ * Temporarily halt the music stream. Use `play` to resume from the current
+ * position.
+ *
+ * @experimental
+ */
+ pause() {
+ this.sendPlaybackControl(LiveMusicPlaybackControl.PAUSE);
+ }
+ /**
+ * Stop the music stream and reset the state. Retains the current prompts
+ * and config.
+ *
+ * @experimental
+ */
+ stop() {
+ this.sendPlaybackControl(LiveMusicPlaybackControl.STOP);
+ }
+ /**
+ * Resets the context of the music generation without stopping it.
+ * Retains the current prompts and config.
+ *
+ * @experimental
+ */
+ resetContext() {
+ this.sendPlaybackControl(LiveMusicPlaybackControl.RESET_CONTEXT);
+ }
+ /**
+ Terminates the WebSocket connection.
+
+ @experimental
+ */
+ close() {
+ this.conn.close();
+ }
+}
+// Converts an headers object to a "map" object as expected by the WebSocket
+// constructor. We use this as the Auth interface works with Headers objects
+// while the WebSocket constructor takes a map.
+function headersToMap$1(headers) {
+ const headerMap = {};
+ headers.forEach((value, key) => {
+ headerMap[key] = value;
+ });
+ return headerMap;
+}
+// Converts a "map" object to a headers object. We use this as the Auth
+// interface works with Headers objects while the API client default headers
+// returns a map.
+function mapToHeaders$1(map) {
+ const headers = new Headers();
+ for (const [key, value] of Object.entries(map)) {
+ headers.append(key, value);
+ }
+ return headers;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+const FUNCTION_RESPONSE_REQUIRES_ID = 'FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.';
+/**
+ * Handles incoming messages from the WebSocket.
+ *
+ * @remarks
+ * This function is responsible for parsing incoming messages, transforming them
+ * into LiveServerMessages, and then calling the onmessage callback. Note that
+ * the first message which is received from the server is a setupComplete
+ * message.
+ *
+ * @param apiClient The ApiClient instance.
+ * @param onmessage The user-provided onmessage callback (if any).
+ * @param event The MessageEvent from the WebSocket.
+ */
+async function handleWebSocketMessage(apiClient, onmessage, event) {
+ const serverMessage = new LiveServerMessage();
+ let jsonData;
+ if (event.data instanceof Blob) {
+ jsonData = await event.data.text();
+ }
+ else if (event.data instanceof ArrayBuffer) {
+ jsonData = new TextDecoder().decode(event.data);
+ }
+ else {
+ jsonData = event.data;
+ }
+ const data = JSON.parse(jsonData);
+ if (apiClient.isVertexAI()) {
+ const resp = liveServerMessageFromVertex(data);
+ Object.assign(serverMessage, resp);
+ }
+ else {
+ const resp = data;
+ Object.assign(serverMessage, resp);
+ }
+ onmessage(serverMessage);
+}
+/**
+ Live class encapsulates the configuration for live interaction with the
+ Generative Language API. It embeds ApiClient for general API settings.
+
+ @experimental
+ */
+class Live {
+ constructor(apiClient, auth, webSocketFactory) {
+ this.apiClient = apiClient;
+ this.auth = auth;
+ this.webSocketFactory = webSocketFactory;
+ this.music = new LiveMusic(this.apiClient, this.auth, this.webSocketFactory);
+ }
+ /**
+ Establishes a connection to the specified model with the given
+ configuration and returns a Session object representing that connection.
+
+ @experimental Built-in MCP support is an experimental feature, may change in
+ future versions.
+
+ @remarks
+
+ @param params - The parameters for establishing a connection to the model.
+ @return A live session.
+
+ @example
+ ```ts
+ let model: string;
+ if (GOOGLE_GENAI_USE_VERTEXAI) {
+ model = 'gemini-2.0-flash-live-preview-04-09';
+ } else {
+ model = 'gemini-live-2.5-flash-preview';
+ }
+ const session = await ai.live.connect({
+ model: model,
+ config: {
+ responseModalities: [Modality.AUDIO],
+ },
+ callbacks: {
+ onopen: () => {
+ console.log('Connected to the socket.');
+ },
+ onmessage: (e: MessageEvent) => {
+ console.log('Received message from the server: %s\n', debug(e.data));
+ },
+ onerror: (e: ErrorEvent) => {
+ console.log('Error occurred: %s\n', debug(e.error));
+ },
+ onclose: (e: CloseEvent) => {
+ console.log('Connection closed.');
+ },
+ },
+ });
+ ```
+ */
+ async connect(params) {
+ var _a, _b, _c, _d, _e, _f;
+ // TODO: b/404946746 - Support per request HTTP options.
+ if (params.config && params.config.httpOptions) {
+ throw new Error('The Live module does not support httpOptions at request-level in' +
+ ' LiveConnectConfig yet. Please use the client-level httpOptions' +
+ ' configuration instead.');
+ }
+ const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();
+ const apiVersion = this.apiClient.getApiVersion();
+ let url;
+ const clientHeaders = this.apiClient.getHeaders();
+ if (params.config &&
+ params.config.tools &&
+ hasMcpToolUsage(params.config.tools)) {
+ setMcpUsageHeader(clientHeaders);
+ }
+ const headers = mapToHeaders(clientHeaders);
+ if (this.apiClient.isVertexAI()) {
+ const project = this.apiClient.getProject();
+ const location = this.apiClient.getLocation();
+ const apiKey = this.apiClient.getApiKey();
+ const hasStandardAuth = (!!project && !!location) || !!apiKey;
+ if (this.apiClient.getCustomBaseUrl() && !hasStandardAuth) {
+ // Custom base URL without standard auth (e.g., proxy).
+ url = websocketBaseUrl;
+ // Auth headers are assumed to be in `clientHeaders` from httpOptions.
+ }
+ else {
+ url = `${websocketBaseUrl}/ws/google.cloud.aiplatform.${apiVersion}.LlmBidiService/BidiGenerateContent`;
+ await this.auth.addAuthHeaders(headers, url);
+ }
+ }
+ else {
+ const apiKey = this.apiClient.getApiKey();
+ let method = 'BidiGenerateContent';
+ let keyName = 'key';
+ if (apiKey === null || apiKey === void 0 ? void 0 : apiKey.startsWith('auth_tokens/')) {
+ console.warn('Warning: Ephemeral token support is experimental and may change in future versions.');
+ if (apiVersion !== 'v1alpha') {
+ console.warn("Warning: The SDK's ephemeral token support is in v1alpha only. Please use const ai = new GoogleGenAI({apiKey: token.name, httpOptions: { apiVersion: 'v1alpha' }}); before session connection.");
+ }
+ method = 'BidiGenerateContentConstrained';
+ keyName = 'access_token';
+ }
+ url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${apiVersion}.GenerativeService.${method}?${keyName}=${apiKey}`;
+ }
+ let onopenResolve = () => { };
+ const onopenPromise = new Promise((resolve) => {
+ onopenResolve = resolve;
+ });
+ const callbacks = params.callbacks;
+ const onopenAwaitedCallback = function () {
+ var _a;
+ (_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onopen) === null || _a === void 0 ? void 0 : _a.call(callbacks);
+ onopenResolve({});
+ };
+ const apiClient = this.apiClient;
+ let sessionResolved = false;
+ const messageQueue = [];
+ let setupCompleteResolve = () => { };
+ const setupCompletePromise = new Promise((resolve) => {
+ setupCompleteResolve = resolve;
+ });
+ const websocketCallbacks = {
+ onopen: onopenAwaitedCallback,
+ onmessage: (event) => {
+ void handleWebSocketMessage(apiClient, (msg) => {
+ if (msg['setupComplete'] && !session.setupComplete) {
+ session.setupComplete = msg['setupComplete'];
+ setupCompleteResolve({});
+ }
+ if (sessionResolved) {
+ callbacks.onmessage(msg);
+ }
+ else {
+ messageQueue.push(msg);
+ }
+ }, event);
+ },
+ onerror: (_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onerror) !== null && _a !== void 0 ? _a : function (e) {
+ },
+ onclose: (_b = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onclose) !== null && _b !== void 0 ? _b : function (e) {
+ },
+ };
+ const conn = this.webSocketFactory.create(url, headersToMap(headers), websocketCallbacks);
+ conn.connect();
+ // Wait for the websocket to open before sending requests.
+ await onopenPromise;
+ let transformedModel = tModel(this.apiClient, params.model);
+ if (this.apiClient.isVertexAI() &&
+ transformedModel.startsWith('publishers/')) {
+ const project = this.apiClient.getProject();
+ const location = this.apiClient.getLocation();
+ if (project && location) {
+ transformedModel =
+ `projects/${project}/locations/${location}/` + transformedModel;
+ }
+ }
+ let clientMessage = {};
+ if (this.apiClient.isVertexAI() &&
+ ((_c = params.config) === null || _c === void 0 ? void 0 : _c.responseModalities) === undefined) {
+ // Set default to AUDIO to align with MLDev API.
+ if (params.config === undefined) {
+ params.config = { responseModalities: [Modality.AUDIO] };
+ }
+ else {
+ params.config.responseModalities = [Modality.AUDIO];
+ }
+ }
+ if ((_d = params.config) === null || _d === void 0 ? void 0 : _d.generationConfig) {
+ // Raise deprecation warning for generationConfig.
+ console.warn('Setting `LiveConnectConfig.generation_config` is deprecated, please set the fields on `LiveConnectConfig` directly. It will be removed in the next major version (not before 7/31/2026).');
+ }
+ const inputTools = (_f = (_e = params.config) === null || _e === void 0 ? void 0 : _e.tools) !== null && _f !== void 0 ? _f : [];
+ const convertedTools = [];
+ for (const tool of inputTools) {
+ if (this.isCallableTool(tool)) {
+ const callableTool = tool;
+ convertedTools.push(await callableTool.tool());
+ }
+ else {
+ convertedTools.push(tool);
+ }
+ }
+ if (convertedTools.length > 0) {
+ params.config.tools = convertedTools;
+ }
+ const liveConnectParameters = {
+ model: transformedModel,
+ config: params.config,
+ callbacks: params.callbacks,
+ };
+ if (this.apiClient.isVertexAI()) {
+ clientMessage = liveConnectParametersToVertex(this.apiClient, liveConnectParameters);
+ }
+ else {
+ clientMessage = liveConnectParametersToMldev(this.apiClient, liveConnectParameters);
+ }
+ delete clientMessage['config'];
+ const session = new Session(conn, this.apiClient);
+ conn.send(JSON.stringify(clientMessage));
+ await setupCompletePromise;
+ sessionResolved = true;
+ for (const msg of messageQueue) {
+ callbacks.onmessage(msg);
+ }
+ return session;
+ }
+ // TODO: b/416041229 - Abstract this method to a common place.
+ isCallableTool(tool) {
+ return 'callTool' in tool && typeof tool.callTool === 'function';
+ }
+}
+const defaultLiveSendClientContentParamerters = {
+ turnComplete: true,
+};
+/**
+ Represents a connection to the API.
+
+ @experimental
+ */
+class Session {
+ constructor(conn, apiClient) {
+ this.conn = conn;
+ this.apiClient = apiClient;
+ }
+ tLiveClientContent(apiClient, params) {
+ if (params.turns !== null && params.turns !== undefined) {
+ let contents = [];
+ try {
+ contents = tContents(params.turns);
+ if (!apiClient.isVertexAI()) {
+ contents = contents.map((item) => contentToMldev$1(item));
+ }
+ }
+ catch (_a) {
+ throw new Error(`Failed to parse client content "turns", type: '${typeof params.turns}'`);
+ }
+ return {
+ clientContent: { turns: contents, turnComplete: params.turnComplete },
+ };
+ }
+ return {
+ clientContent: { turnComplete: params.turnComplete },
+ };
+ }
+ tLiveClienttToolResponse(apiClient, params) {
+ let functionResponses = [];
+ if (params.functionResponses == null) {
+ throw new Error('functionResponses is required.');
+ }
+ if (!Array.isArray(params.functionResponses)) {
+ functionResponses = [params.functionResponses];
+ }
+ else {
+ functionResponses = params.functionResponses;
+ }
+ if (functionResponses.length === 0) {
+ throw new Error('functionResponses is required.');
+ }
+ for (const functionResponse of functionResponses) {
+ if (typeof functionResponse !== 'object' ||
+ functionResponse === null ||
+ !('name' in functionResponse) ||
+ !('response' in functionResponse)) {
+ throw new Error(`Could not parse function response, type '${typeof functionResponse}'.`);
+ }
+ if (!apiClient.isVertexAI() && !('id' in functionResponse)) {
+ throw new Error(FUNCTION_RESPONSE_REQUIRES_ID);
+ }
+ }
+ const clientMessage = {
+ toolResponse: { 'functionResponses': functionResponses },
+ };
+ return clientMessage;
+ }
+ /**
+ Send a message over the established connection.
+
+ @param params - Contains two **optional** properties, `turns` and
+ `turnComplete`.
+
+ - `turns` will be converted to a `Content[]`
+ - `turnComplete: true` [default] indicates that you are done sending
+ content and expect a response. If `turnComplete: false`, the server
+ will wait for additional messages before starting generation.
+
+ @experimental
+
+ @remarks
+ There are two ways to send messages to the live API:
+ `sendClientContent` and `sendRealtimeInput`.
+
+ `sendClientContent` messages are added to the model context **in order**.
+ Having a conversation using `sendClientContent` messages is roughly
+ equivalent to using the `Chat.sendMessageStream`, except that the state of
+ the `chat` history is stored on the API server instead of locally.
+
+ Because of `sendClientContent`'s order guarantee, the model cannot respons
+ as quickly to `sendClientContent` messages as to `sendRealtimeInput`
+ messages. This makes the biggest difference when sending objects that have
+ significant preprocessing time (typically images).
+
+ The `sendClientContent` message sends a `Content[]`
+ which has more options than the `Blob` sent by `sendRealtimeInput`.
+
+ So the main use-cases for `sendClientContent` over `sendRealtimeInput` are:
+
+ - Sending anything that can't be represented as a `Blob` (text,
+ `sendClientContent({turns="Hello?"}`)).
+ - Managing turns when not using audio input and voice activity detection.
+ (`sendClientContent({turnComplete:true})` or the short form
+ `sendClientContent()`)
+ - Prefilling a conversation context
+ ```
+ sendClientContent({
+ turns: [
+ Content({role:user, parts:...}),
+ Content({role:user, parts:...}),
+ ...
+ ]
+ })
+ ```
+ @experimental
+ */
+ sendClientContent(params) {
+ params = Object.assign(Object.assign({}, defaultLiveSendClientContentParamerters), params);
+ const clientMessage = this.tLiveClientContent(this.apiClient, params);
+ this.conn.send(JSON.stringify(clientMessage));
+ }
+ /**
+ Send a realtime message over the established connection.
+
+ @param params - Contains one property, `media`.
+
+ - `media` will be converted to a `Blob`
+
+ @experimental
+
+ @remarks
+ Use `sendRealtimeInput` for realtime audio chunks and video frames (images).
+
+ With `sendRealtimeInput` the api will respond to audio automatically
+ based on voice activity detection (VAD).
+
+ `sendRealtimeInput` is optimized for responsivness at the expense of
+ deterministic ordering guarantees. Audio and video tokens are to the
+ context when they become available.
+
+ Note: The Call signature expects a `Blob` object, but only a subset
+ of audio and image mimetypes are allowed.
+ */
+ sendRealtimeInput(params) {
+ let clientMessage = {};
+ if (this.apiClient.isVertexAI()) {
+ clientMessage = {
+ 'realtimeInput': liveSendRealtimeInputParametersToVertex(params),
+ };
+ }
+ else {
+ clientMessage = {
+ 'realtimeInput': liveSendRealtimeInputParametersToMldev(params),
+ };
+ }
+ this.conn.send(JSON.stringify(clientMessage));
+ }
+ /**
+ Send a function response message over the established connection.
+
+ @param params - Contains property `functionResponses`.
+
+ - `functionResponses` will be converted to a `functionResponses[]`
+
+ @remarks
+ Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server.
+
+ Use {@link types.LiveConnectConfig#tools} to configure the callable functions.
+
+ @experimental
+ */
+ sendToolResponse(params) {
+ if (params.functionResponses == null) {
+ throw new Error('Tool response parameters are required.');
+ }
+ const clientMessage = this.tLiveClienttToolResponse(this.apiClient, params);
+ this.conn.send(JSON.stringify(clientMessage));
+ }
+ /**
+ Terminates the WebSocket connection.
+
+ @experimental
+
+ @example
+ ```ts
+ let model: string;
+ if (GOOGLE_GENAI_USE_VERTEXAI) {
+ model = 'gemini-2.0-flash-live-preview-04-09';
+ } else {
+ model = 'gemini-live-2.5-flash-preview';
+ }
+ const session = await ai.live.connect({
+ model: model,
+ config: {
+ responseModalities: [Modality.AUDIO],
+ }
+ });
+
+ session.close();
+ ```
+ */
+ close() {
+ this.conn.close();
+ }
+}
+// Converts an headers object to a "map" object as expected by the WebSocket
+// constructor. We use this as the Auth interface works with Headers objects
+// while the WebSocket constructor takes a map.
+function headersToMap(headers) {
+ const headerMap = {};
+ headers.forEach((value, key) => {
+ headerMap[key] = value;
+ });
+ return headerMap;
+}
+// Converts a "map" object to a headers object. We use this as the Auth
+// interface works with Headers objects while the API client default headers
+// returns a map.
+function mapToHeaders(map) {
+ const headers = new Headers();
+ for (const [key, value] of Object.entries(map)) {
+ headers.append(key, value);
+ }
+ return headers;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+const DEFAULT_MAX_REMOTE_CALLS = 10;
+/** Returns whether automatic function calling is disabled. */
+function shouldDisableAfc(config) {
+ var _a, _b, _c;
+ if ((_a = config === null || config === void 0 ? void 0 : config.automaticFunctionCalling) === null || _a === void 0 ? void 0 : _a.disable) {
+ return true;
+ }
+ let callableToolsPresent = false;
+ for (const tool of (_b = config === null || config === void 0 ? void 0 : config.tools) !== null && _b !== void 0 ? _b : []) {
+ if (isCallableTool(tool)) {
+ callableToolsPresent = true;
+ break;
+ }
+ }
+ if (!callableToolsPresent) {
+ return true;
+ }
+ const maxCalls = (_c = config === null || config === void 0 ? void 0 : config.automaticFunctionCalling) === null || _c === void 0 ? void 0 : _c.maximumRemoteCalls;
+ if ((maxCalls && (maxCalls < 0 || !Number.isInteger(maxCalls))) ||
+ maxCalls == 0) {
+ console.warn('Invalid maximumRemoteCalls value provided for automatic function calling. Disabled automatic function calling. Please provide a valid integer value greater than 0. maximumRemoteCalls provided:', maxCalls);
+ return true;
+ }
+ return false;
+}
+function isCallableTool(tool) {
+ return 'callTool' in tool && typeof tool.callTool === 'function';
+}
+// Checks whether the list of tools contains any CallableTools. Will return true
+// if there is at least one CallableTool.
+function hasCallableTools(params) {
+ var _a, _b, _c;
+ return (_c = (_b = (_a = params.config) === null || _a === void 0 ? void 0 : _a.tools) === null || _b === void 0 ? void 0 : _b.some((tool) => isCallableTool(tool))) !== null && _c !== void 0 ? _c : false;
+}
+/**
+ * Returns the indexes of the tools that are not compatible with AFC.
+ */
+function findAfcIncompatibleToolIndexes(params) {
+ var _a;
+ // Use number[] for an array of numbers in TypeScript
+ const afcIncompatibleToolIndexes = [];
+ if (!((_a = params === null || params === void 0 ? void 0 : params.config) === null || _a === void 0 ? void 0 : _a.tools)) {
+ return afcIncompatibleToolIndexes;
+ }
+ params.config.tools.forEach((tool, index) => {
+ if (isCallableTool(tool)) {
+ return;
+ }
+ const geminiTool = tool;
+ if (geminiTool.functionDeclarations &&
+ geminiTool.functionDeclarations.length > 0) {
+ afcIncompatibleToolIndexes.push(index);
+ }
+ });
+ return afcIncompatibleToolIndexes;
+}
+/**
+ * Returns whether to append automatic function calling history to the
+ * response.
+ */
+function shouldAppendAfcHistory(config) {
+ var _a;
+ return !((_a = config === null || config === void 0 ? void 0 : config.automaticFunctionCalling) === null || _a === void 0 ? void 0 : _a.ignoreCallHistory);
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class Models extends BaseModule {
+ constructor(apiClient) {
+ super();
+ this.apiClient = apiClient;
+ /**
+ * Calculates embeddings for the given contents.
+ *
+ * @param params - The parameters for embedding contents.
+ * @return The response from the API.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.embedContent({
+ * model: 'text-embedding-004',
+ * contents: [
+ * 'What is your name?',
+ * 'What is your favorite color?',
+ * ],
+ * config: {
+ * outputDimensionality: 64,
+ * },
+ * });
+ * console.log(response);
+ * ```
+ */
+ this.embedContent = async (params) => {
+ if (!this.apiClient.isVertexAI()) {
+ const isGeminiEmbedding2Model = params.model.includes('gemini-embedding-2');
+ if (isGeminiEmbedding2Model) {
+ params.contents = tContents(params.contents);
+ }
+ return await this.embedContentInternal(params);
+ }
+ const isVertexEmbedContentModel = (params.model.includes('gemini') &&
+ params.model !== 'gemini-embedding-001') ||
+ params.model.includes('maas');
+ if (isVertexEmbedContentModel) {
+ const contents = tContents(params.contents);
+ if (contents.length > 1) {
+ throw new Error('The embedContent API for this model only supports one content at a time.');
+ }
+ const paramsPrivate = Object.assign(Object.assign({}, params), { content: contents[0], embeddingApiType: EmbeddingApiType.EMBED_CONTENT });
+ return await this.embedContentInternal(paramsPrivate);
+ }
+ else {
+ const paramsPrivate = Object.assign(Object.assign({}, params), { embeddingApiType: EmbeddingApiType.PREDICT });
+ return await this.embedContentInternal(paramsPrivate);
+ }
+ };
+ /**
+ * Makes an API request to generate content with a given model.
+ *
+ * For the `model` parameter, supported formats for Gemini Enterprise Agent Platform API include:
+ * - The Gemini model ID, for example: 'gemini-2.0-flash'
+ * - The full resource name starts with 'projects/', for example:
+ * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
+ * - The partial resource name with 'publishers/', for example:
+ * 'publishers/google/models/gemini-2.0-flash' or
+ * 'publishers/meta/models/llama-3.1-405b-instruct-maas'
+ * - `/` separated publisher and model name, for example:
+ * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'
+ *
+ * For the `model` parameter, supported formats for Gemini API include:
+ * - The Gemini model ID, for example: 'gemini-2.0-flash'
+ * - The model name starts with 'models/', for example:
+ * 'models/gemini-2.0-flash'
+ * - For tuned models, the model name starts with 'tunedModels/',
+ * for example:
+ * 'tunedModels/1234567890123456789'
+ *
+ * Some models support multimodal input and output.
+ *
+ * @param params - The parameters for generating content.
+ * @return The response from generating content.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.generateContent({
+ * model: 'gemini-2.0-flash',
+ * contents: 'why is the sky blue?',
+ * config: {
+ * candidateCount: 2,
+ * }
+ * });
+ * console.log(response);
+ * ```
+ */
+ this.generateContent = async (params) => {
+ var _a, _b, _c, _d, _e;
+ const transformedParams = await this.processParamsMaybeAddMcpUsage(params);
+ this.maybeMoveToResponseJsonSchema(params);
+ if (!hasCallableTools(params) || shouldDisableAfc(params.config)) {
+ return await this.generateContentInternal(transformedParams);
+ }
+ const incompatibleToolIndexes = findAfcIncompatibleToolIndexes(params);
+ if (incompatibleToolIndexes.length > 0) {
+ const formattedIndexes = incompatibleToolIndexes
+ .map((index) => `tools[${index}]`)
+ .join(', ');
+ throw new Error(`Automatic function calling with CallableTools (or MCP objects) and basic FunctionDeclarations is not yet supported. Incompatible tools found at ${formattedIndexes}.`);
+ }
+ let response;
+ let functionResponseContent;
+ const automaticFunctionCallingHistory = tContents(transformedParams.contents);
+ const maxRemoteCalls = (_c = (_b = (_a = transformedParams.config) === null || _a === void 0 ? void 0 : _a.automaticFunctionCalling) === null || _b === void 0 ? void 0 : _b.maximumRemoteCalls) !== null && _c !== void 0 ? _c : DEFAULT_MAX_REMOTE_CALLS;
+ let remoteCalls = 0;
+ while (remoteCalls < maxRemoteCalls) {
+ response = await this.generateContentInternal(transformedParams);
+ if (!response.functionCalls || response.functionCalls.length === 0) {
+ break;
+ }
+ const responseContent = response.candidates[0].content;
+ const functionResponseParts = [];
+ for (const tool of (_e = (_d = params.config) === null || _d === void 0 ? void 0 : _d.tools) !== null && _e !== void 0 ? _e : []) {
+ if (isCallableTool(tool)) {
+ const callableTool = tool;
+ const parts = await callableTool.callTool(response.functionCalls);
+ functionResponseParts.push(...parts);
+ }
+ }
+ remoteCalls++;
+ functionResponseContent = {
+ role: 'user',
+ parts: functionResponseParts,
+ };
+ transformedParams.contents = tContents(transformedParams.contents);
+ transformedParams.contents.push(responseContent);
+ transformedParams.contents.push(functionResponseContent);
+ if (shouldAppendAfcHistory(transformedParams.config)) {
+ automaticFunctionCallingHistory.push(responseContent);
+ automaticFunctionCallingHistory.push(functionResponseContent);
+ }
+ }
+ if (shouldAppendAfcHistory(transformedParams.config)) {
+ response.automaticFunctionCallingHistory =
+ automaticFunctionCallingHistory;
+ }
+ return response;
+ };
+ /**
+ * Makes an API request to generate content with a given model and yields the
+ * response in chunks.
+ *
+ * For the `model` parameter, supported formats for Gemini Enterprise Agent Platform API include:
+ * - The Gemini model ID, for example: 'gemini-2.0-flash'
+ * - The full resource name starts with 'projects/', for example:
+ * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
+ * - The partial resource name with 'publishers/', for example:
+ * 'publishers/google/models/gemini-2.0-flash' or
+ * 'publishers/meta/models/llama-3.1-405b-instruct-maas'
+ * - `/` separated publisher and model name, for example:
+ * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'
+ *
+ * For the `model` parameter, supported formats for Gemini API include:
+ * - The Gemini model ID, for example: 'gemini-2.0-flash'
+ * - The model name starts with 'models/', for example:
+ * 'models/gemini-2.0-flash'
+ * - For tuned models, the model name starts with 'tunedModels/',
+ * for example:
+ * 'tunedModels/1234567890123456789'
+ *
+ * Some models support multimodal input and output.
+ *
+ * @param params - The parameters for generating content with streaming response.
+ * @return The response from generating content.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.generateContentStream({
+ * model: 'gemini-2.0-flash',
+ * contents: 'why is the sky blue?',
+ * config: {
+ * maxOutputTokens: 200,
+ * }
+ * });
+ * for await (const chunk of response) {
+ * console.log(chunk);
+ * }
+ * ```
+ */
+ this.generateContentStream = async (params) => {
+ var _a, _b, _c, _d, _e;
+ this.maybeMoveToResponseJsonSchema(params);
+ if (shouldDisableAfc(params.config)) {
+ const transformedParams = await this.processParamsMaybeAddMcpUsage(params);
+ return await this.generateContentStreamInternal(transformedParams);
+ }
+ const incompatibleToolIndexes = findAfcIncompatibleToolIndexes(params);
+ if (incompatibleToolIndexes.length > 0) {
+ const formattedIndexes = incompatibleToolIndexes
+ .map((index) => `tools[${index}]`)
+ .join(', ');
+ throw new Error(`Incompatible tools found at ${formattedIndexes}. Automatic function calling with CallableTools (or MCP objects) and basic FunctionDeclarations" is not yet supported.`);
+ }
+ // With tool compatibility confirmed, validate that the configuration are
+ // compatible with each other and raise an error if invalid.
+ const streamFunctionCall = (_c = (_b = (_a = params === null || params === void 0 ? void 0 : params.config) === null || _a === void 0 ? void 0 : _a.toolConfig) === null || _b === void 0 ? void 0 : _b.functionCallingConfig) === null || _c === void 0 ? void 0 : _c.streamFunctionCallArguments;
+ const disableAfc = (_e = (_d = params === null || params === void 0 ? void 0 : params.config) === null || _d === void 0 ? void 0 : _d.automaticFunctionCalling) === null || _e === void 0 ? void 0 : _e.disable;
+ if (streamFunctionCall && !disableAfc) {
+ throw new Error("Running in streaming mode with 'streamFunctionCallArguments' enabled, " +
+ 'this feature is not compatible with automatic function calling (AFC). ' +
+ "Please set 'config.automaticFunctionCalling.disable' to true to disable AFC " +
+ "or leave 'config.toolConfig.functionCallingConfig.streamFunctionCallArguments' " +
+ 'to be undefined or set to false to disable streaming function call arguments feature.');
+ }
+ return await this.processAfcStream(params);
+ };
+ /**
+ * Generates an image based on a text description and configuration.
+ *
+ * @param params - The parameters for generating images.
+ * @return The response from the API.
+ *
+ * @example
+ * ```ts
+ * const response = await client.models.generateImages({
+ * model: 'imagen-4.0-generate-001',
+ * prompt: 'Robot holding a red skateboard',
+ * config: {
+ * numberOfImages: 1,
+ * includeRaiReason: true,
+ * },
+ * });
+ * console.log(response?.generatedImages?.[0]?.image?.imageBytes);
+ * ```
+ */
+ this.generateImages = async (params) => {
+ if (!Models.loggedGenerateImagesWarning) {
+ Models.loggedGenerateImagesWarning = true;
+ console.warn('The generateImages method is deprecated and will be removed in the next major release (not before Jan. 1 2027). Please use the generateContent method with image models instead. See https://ai.google.dev/gemini-api/docs/deprecations#imagen-models and https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/capabilities/image-generation#generate-images');
+ }
+ return await this.generateImagesInternal(params).then((apiResponse) => {
+ var _a;
+ let positivePromptSafetyAttributes;
+ const generatedImages = [];
+ if (apiResponse === null || apiResponse === void 0 ? void 0 : apiResponse.generatedImages) {
+ for (const generatedImage of apiResponse.generatedImages) {
+ if (generatedImage &&
+ (generatedImage === null || generatedImage === void 0 ? void 0 : generatedImage.safetyAttributes) &&
+ ((_a = generatedImage === null || generatedImage === void 0 ? void 0 : generatedImage.safetyAttributes) === null || _a === void 0 ? void 0 : _a.contentType) === 'Positive Prompt') {
+ positivePromptSafetyAttributes = generatedImage === null || generatedImage === void 0 ? void 0 : generatedImage.safetyAttributes;
+ }
+ else {
+ generatedImages.push(generatedImage);
+ }
+ }
+ }
+ let response;
+ if (positivePromptSafetyAttributes) {
+ response = {
+ generatedImages: generatedImages,
+ positivePromptSafetyAttributes: positivePromptSafetyAttributes,
+ sdkHttpResponse: apiResponse.sdkHttpResponse,
+ };
+ }
+ else {
+ response = {
+ generatedImages: generatedImages,
+ sdkHttpResponse: apiResponse.sdkHttpResponse,
+ };
+ }
+ return response;
+ });
+ };
+ this.list = async (params) => {
+ var _a;
+ const defaultConfig = {
+ queryBase: true,
+ };
+ const actualConfig = Object.assign(Object.assign({}, defaultConfig), params === null || params === void 0 ? void 0 : params.config);
+ const actualParams = {
+ config: actualConfig,
+ };
+ if (this.apiClient.isVertexAI()) {
+ if (!actualParams.config.queryBase) {
+ if ((_a = actualParams.config) === null || _a === void 0 ? void 0 : _a.filter) {
+ throw new Error('Filtering tuned models list is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ else {
+ actualParams.config.filter = 'labels.tune-type:*';
+ }
+ }
+ }
+ return new Pager(PagedItem.PAGED_ITEM_MODELS, (x) => this.listInternal(x), await this.listInternal(actualParams), actualParams);
+ };
+ /**
+ * Edits an image based on a prompt, list of reference images, and configuration.
+ *
+ * @param params - The parameters for editing an image.
+ * @return The response from the API.
+ *
+ * @example
+ * ```ts
+ * const response = await client.models.editImage({
+ * model: 'imagen-3.0-capability-001',
+ * prompt: 'Generate an image containing a mug with the product logo [1] visible on the side of the mug.',
+ * referenceImages: [subjectReferenceImage]
+ * config: {
+ * numberOfImages: 1,
+ * includeRaiReason: true,
+ * },
+ * });
+ * console.log(response?.generatedImages?.[0]?.image?.imageBytes);
+ * ```
+ */
+ this.editImage = async (params) => {
+ if (!Models.loggedEditImageWarning) {
+ Models.loggedEditImageWarning = true;
+ console.warn('The editImage method is deprecated and will be removed in the next major release (not before Jan. 1 2027). Please use the generateContent method with image models instead. See https://ai.google.dev/gemini-api/docs/deprecations#imagen-models and https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/capabilities/gemini-edit-images#edit-an-image');
+ }
+ const paramsInternal = {
+ model: params.model,
+ prompt: params.prompt,
+ referenceImages: [],
+ config: params.config,
+ };
+ if (params.referenceImages) {
+ if (params.referenceImages) {
+ paramsInternal.referenceImages = params.referenceImages.map((img) => img.toReferenceImageAPI());
+ }
+ }
+ return await this.editImageInternal(paramsInternal);
+ };
+ /**
+ * Upscales an image based on an image, upscale factor, and configuration.
+ * Only supported in Gemini Enterprise Agent Platform currently.
+ *
+ * @param params - The parameters for upscaling an image.
+ * @return The response from the API.
+ *
+ * @example
+ * ```ts
+ * const response = await client.models.upscaleImage({
+ * model: 'imagen-4.0-upscale-preview',
+ * image: image,
+ * upscaleFactor: 'x2',
+ * config: {
+ * includeRaiReason: true,
+ * },
+ * });
+ * console.log(response?.generatedImages?.[0]?.image?.imageBytes);
+ * ```
+ */
+ this.upscaleImage = async (params) => {
+ let apiConfig = {
+ numberOfImages: 1,
+ mode: 'upscale',
+ };
+ if (params.config) {
+ apiConfig = Object.assign(Object.assign({}, apiConfig), params.config);
+ }
+ const apiParams = {
+ model: params.model,
+ image: params.image,
+ upscaleFactor: params.upscaleFactor,
+ config: apiConfig,
+ };
+ return await this.upscaleImageInternal(apiParams);
+ };
+ /**
+ * Generates videos based on a text description and configuration.
+ *
+ * @param params - The parameters for generating videos.
+ * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.
+ *
+ * @example
+ * ```ts
+ * const operation = await ai.models.generateVideos({
+ * model: 'veo-2.0-generate-001',
+ * source: {
+ * prompt: 'A neon hologram of a cat driving at top speed',
+ * },
+ * config: {
+ * numberOfVideos: 1
+ * });
+ *
+ * while (!operation.done) {
+ * await new Promise(resolve => setTimeout(resolve, 10000));
+ * operation = await ai.operations.getVideosOperation({operation: operation});
+ * }
+ *
+ * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);
+ * ```
+ */
+ this.generateVideos = async (params) => {
+ var _a, _b, _c, _d, _e, _f;
+ if ((params.prompt || params.image || params.video) && params.source) {
+ throw new Error('Source and prompt/image/video are mutually exclusive. Please only use source.');
+ }
+ if (params.prompt || params.image || params.video) {
+ if (!Models.loggedGenerateVideosWarning) {
+ Models.loggedGenerateVideosWarning = true;
+ console.warn('The generateVideos method with prompt/image/video arguments is deprecated and will be removed in a future major release (not before 2026-07-31). Please use the source argument instead.');
+ }
+ }
+ // Gemini API does not support video bytes.
+ if (!this.apiClient.isVertexAI()) {
+ if (((_a = params.video) === null || _a === void 0 ? void 0 : _a.uri) && ((_b = params.video) === null || _b === void 0 ? void 0 : _b.videoBytes)) {
+ params.video = {
+ uri: params.video.uri,
+ mimeType: params.video.mimeType,
+ };
+ }
+ else if (((_d = (_c = params.source) === null || _c === void 0 ? void 0 : _c.video) === null || _d === void 0 ? void 0 : _d.uri) &&
+ ((_f = (_e = params.source) === null || _e === void 0 ? void 0 : _e.video) === null || _f === void 0 ? void 0 : _f.videoBytes)) {
+ params.source.video = {
+ uri: params.source.video.uri,
+ mimeType: params.source.video.mimeType,
+ };
+ }
+ }
+ return await this.generateVideosInternal(params);
+ };
+ }
+ /**
+ * This logic is needed for GenerateContentConfig only.
+ * Previously we made GenerateContentConfig.responseSchema field to accept
+ * unknown. Since v1.9.0, we switch to use backend JSON schema support.
+ * To maintain backward compatibility, we move the data that was treated as
+ * JSON schema from the responseSchema field to the responseJsonSchema field.
+ */
+ maybeMoveToResponseJsonSchema(params) {
+ if (params.config && params.config.responseSchema) {
+ if (!params.config.responseJsonSchema) {
+ if (Object.keys(params.config.responseSchema).includes('$schema')) {
+ params.config.responseJsonSchema = params.config.responseSchema;
+ delete params.config.responseSchema;
+ }
+ }
+ }
+ return;
+ }
+ /**
+ * Transforms the CallableTools in the parameters to be simply Tools, it
+ * copies the params into a new object and replaces the tools, it does not
+ * modify the original params. Also sets the MCP usage header if there are
+ * MCP tools in the parameters.
+ */
+ async processParamsMaybeAddMcpUsage(params) {
+ var _a, _b, _c;
+ const tools = (_a = params.config) === null || _a === void 0 ? void 0 : _a.tools;
+ if (!tools) {
+ return params;
+ }
+ const transformedTools = await Promise.all(tools.map(async (tool) => {
+ if (isCallableTool(tool)) {
+ const callableTool = tool;
+ return await callableTool.tool();
+ }
+ return tool;
+ }));
+ const newParams = {
+ model: params.model,
+ contents: params.contents,
+ config: Object.assign(Object.assign({}, params.config), { tools: transformedTools }),
+ };
+ newParams.config.tools = transformedTools;
+ if (params.config &&
+ params.config.tools &&
+ hasMcpToolUsage(params.config.tools)) {
+ const headers = (_c = (_b = params.config.httpOptions) === null || _b === void 0 ? void 0 : _b.headers) !== null && _c !== void 0 ? _c : {};
+ let newHeaders = Object.assign({}, headers);
+ if (Object.keys(newHeaders).length === 0) {
+ newHeaders = this.apiClient.getDefaultHeaders();
+ }
+ setMcpUsageHeader(newHeaders);
+ newParams.config.httpOptions = Object.assign(Object.assign({}, params.config.httpOptions), { headers: newHeaders });
+ }
+ return newParams;
+ }
+ async initAfcToolsMap(params) {
+ var _a, _b, _c;
+ const afcTools = new Map();
+ for (const tool of (_b = (_a = params.config) === null || _a === void 0 ? void 0 : _a.tools) !== null && _b !== void 0 ? _b : []) {
+ if (isCallableTool(tool)) {
+ const callableTool = tool;
+ const toolDeclaration = await callableTool.tool();
+ for (const declaration of (_c = toolDeclaration.functionDeclarations) !== null && _c !== void 0 ? _c : []) {
+ if (!declaration.name) {
+ throw new Error('Function declaration name is required.');
+ }
+ if (afcTools.has(declaration.name)) {
+ throw new Error(`Duplicate tool declaration name: ${declaration.name}`);
+ }
+ afcTools.set(declaration.name, callableTool);
+ }
+ }
+ }
+ return afcTools;
+ }
+ async processAfcStream(params) {
+ var _a, _b, _c;
+ const maxRemoteCalls = (_c = (_b = (_a = params.config) === null || _a === void 0 ? void 0 : _a.automaticFunctionCalling) === null || _b === void 0 ? void 0 : _b.maximumRemoteCalls) !== null && _c !== void 0 ? _c : DEFAULT_MAX_REMOTE_CALLS;
+ let wereFunctionsCalled = false;
+ let remoteCallCount = 0;
+ const afcToolsMap = await this.initAfcToolsMap(params);
+ return (function (models, afcTools, params) {
+ return __asyncGenerator(this, arguments, function* () {
+ var _a, e_1, _b, _c;
+ var _d, _e;
+ while (remoteCallCount < maxRemoteCalls) {
+ if (wereFunctionsCalled) {
+ remoteCallCount++;
+ wereFunctionsCalled = false;
+ }
+ const transformedParams = yield __await(models.processParamsMaybeAddMcpUsage(params));
+ const response = yield __await(models.generateContentStreamInternal(transformedParams));
+ const functionResponses = [];
+ const responseContents = [];
+ try {
+ for (var _f = true, response_1 = (e_1 = void 0, __asyncValues(response)), response_1_1; response_1_1 = yield __await(response_1.next()), _a = response_1_1.done, !_a; _f = true) {
+ _c = response_1_1.value;
+ _f = false;
+ const chunk = _c;
+ yield yield __await(chunk);
+ if (chunk.candidates && ((_d = chunk.candidates[0]) === null || _d === void 0 ? void 0 : _d.content)) {
+ responseContents.push(chunk.candidates[0].content);
+ for (const part of (_e = chunk.candidates[0].content.parts) !== null && _e !== void 0 ? _e : []) {
+ if (remoteCallCount < maxRemoteCalls && part.functionCall) {
+ if (!part.functionCall.name) {
+ throw new Error('Function call name was not returned by the model.');
+ }
+ if (!afcTools.has(part.functionCall.name)) {
+ throw new Error(`Automatic function calling was requested, but not all the tools the model used implement the CallableTool interface. Available tools: ${afcTools.keys()}, missing tool: ${part.functionCall.name}`);
+ }
+ else {
+ const responseParts = yield __await(afcTools
+ .get(part.functionCall.name)
+ .callTool([part.functionCall]));
+ functionResponses.push(...responseParts);
+ }
+ }
+ }
+ }
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (!_f && !_a && (_b = response_1.return)) yield __await(_b.call(response_1));
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ if (functionResponses.length > 0) {
+ wereFunctionsCalled = true;
+ const typedResponseChunk = new GenerateContentResponse();
+ typedResponseChunk.candidates = [
+ {
+ content: {
+ role: 'user',
+ parts: functionResponses,
+ },
+ },
+ ];
+ yield yield __await(typedResponseChunk);
+ const newContents = [];
+ newContents.push(...responseContents);
+ newContents.push({
+ role: 'user',
+ parts: functionResponses,
+ });
+ const updatedContents = tContents(params.contents).concat(newContents);
+ params.contents = updatedContents;
+ }
+ else {
+ break;
+ }
+ }
+ });
+ })(this, afcToolsMap, params);
+ }
+ async generateContentInternal(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = generateContentParametersToVertex(this.apiClient, params);
+ path = formatMap('{model}:generateContent', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = generateContentResponseFromVertex(apiResponse);
+ const typedResp = new GenerateContentResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ const body = generateContentParametersToMldev(this.apiClient, params);
+ path = formatMap('{model}:generateContent', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = generateContentResponseFromMldev(apiResponse);
+ const typedResp = new GenerateContentResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ async generateContentStreamInternal(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = generateContentParametersToVertex(this.apiClient, params);
+ path = formatMap('{model}:streamGenerateContent?alt=sse', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ const apiClient = this.apiClient;
+ response = apiClient.requestStream({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ });
+ return response.then(function (apiResponse) {
+ return __asyncGenerator(this, arguments, function* () {
+ var _a, e_2, _b, _c;
+ try {
+ for (var _d = true, apiResponse_1 = __asyncValues(apiResponse), apiResponse_1_1; apiResponse_1_1 = yield __await(apiResponse_1.next()), _a = apiResponse_1_1.done, !_a; _d = true) {
+ _c = apiResponse_1_1.value;
+ _d = false;
+ const chunk = _c;
+ const resp = generateContentResponseFromVertex((yield __await(chunk.json())), params);
+ resp['sdkHttpResponse'] = {
+ headers: chunk.headers,
+ };
+ const typedResp = new GenerateContentResponse();
+ Object.assign(typedResp, resp);
+ yield yield __await(typedResp);
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (!_d && !_a && (_b = apiResponse_1.return)) yield __await(_b.call(apiResponse_1));
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ });
+ });
+ }
+ else {
+ const body = generateContentParametersToMldev(this.apiClient, params);
+ path = formatMap('{model}:streamGenerateContent?alt=sse', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ const apiClient = this.apiClient;
+ response = apiClient.requestStream({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ });
+ return response.then(function (apiResponse) {
+ return __asyncGenerator(this, arguments, function* () {
+ var _a, e_3, _b, _c;
+ try {
+ for (var _d = true, apiResponse_2 = __asyncValues(apiResponse), apiResponse_2_1; apiResponse_2_1 = yield __await(apiResponse_2.next()), _a = apiResponse_2_1.done, !_a; _d = true) {
+ _c = apiResponse_2_1.value;
+ _d = false;
+ const chunk = _c;
+ const resp = generateContentResponseFromMldev((yield __await(chunk.json())), params);
+ resp['sdkHttpResponse'] = {
+ headers: chunk.headers,
+ };
+ const typedResp = new GenerateContentResponse();
+ Object.assign(typedResp, resp);
+ yield yield __await(typedResp);
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (!_d && !_a && (_b = apiResponse_2.return)) yield __await(_b.call(apiResponse_2));
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ });
+ });
+ }
+ }
+ /**
+ * Calculates embeddings for the given contents. Only text is supported.
+ *
+ * @param params - The parameters for embedding contents.
+ * @return The response from the API.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.embedContent({
+ * model: 'text-embedding-004',
+ * contents: [
+ * 'What is your name?',
+ * 'What is your favorite color?',
+ * ],
+ * config: {
+ * outputDimensionality: 64,
+ * },
+ * });
+ * console.log(response);
+ * ```
+ */
+ async embedContentInternal(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = embedContentParametersPrivateToVertex(this.apiClient, params, params);
+ const endpointUrl = tIsVertexEmbedContentModel(params.model)
+ ? '{model}:embedContent'
+ : '{model}:predict';
+ path = formatMap(endpointUrl, body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = embedContentResponseFromVertex(apiResponse, params);
+ const typedResp = new EmbedContentResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ const body = embedContentParametersPrivateToMldev(this.apiClient, params);
+ path = formatMap('{model}:batchEmbedContents', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = embedContentResponseFromMldev(apiResponse);
+ const typedResp = new EmbedContentResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ /**
+ * Private method for generating images.
+ */
+ async generateImagesInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = generateImagesParametersToVertex(this.apiClient, params);
+ path = formatMap('{model}:predict', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = generateImagesResponseFromVertex(apiResponse);
+ const typedResp = new GenerateImagesResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ throw new Error('This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).');
+ }
+ }
+ /**
+ * Private method for editing an image.
+ */
+ async editImageInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = editImageParametersInternalToVertex(this.apiClient, params);
+ path = formatMap('{model}:predict', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = editImageResponseFromVertex(apiResponse);
+ const typedResp = new EditImageResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ throw new Error('This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).');
+ }
+ }
+ /**
+ * Private method for upscaling an image.
+ */
+ async upscaleImageInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = upscaleImageAPIParametersInternalToVertex(this.apiClient, params);
+ path = formatMap('{model}:predict', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = upscaleImageResponseFromVertex(apiResponse);
+ const typedResp = new UpscaleImageResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ throw new Error('This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).');
+ }
+ }
+ /**
+ * Recontextualizes an image.
+ *
+ * There is one type of recontextualization currently supported:
+ * 1) Virtual Try-On: Generate images of persons modeling fashion products.
+ *
+ * @param params - The parameters for recontextualizing an image.
+ * @return The response from the API.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.recontextImage({
+ * model: 'virtual-try-on-001',
+ * source: {
+ * personImage: personImage,
+ * productImages: [productImage],
+ * },
+ * config: {
+ * numberOfImages: 1,
+ * },
+ * });
+ * console.log(response?.generatedImages?.[0]?.image?.imageBytes);
+ * ```
+ */
+ async recontextImage(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = recontextImageParametersToVertex(this.apiClient, params);
+ path = formatMap('{model}:predict', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = recontextImageResponseFromVertex(apiResponse);
+ const typedResp = new RecontextImageResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ throw new Error('This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).');
+ }
+ }
+ /**
+ * Segments an image, creating a mask of a specified area.
+ *
+ * @param params - The parameters for segmenting an image.
+ * @return The response from the API.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.segmentImage({
+ * model: 'image-segmentation-001',
+ * source: {
+ * image: image,
+ * },
+ * config: {
+ * mode: 'foreground',
+ * },
+ * });
+ * console.log(response?.generatedMasks?.[0]?.mask?.imageBytes);
+ * ```
+ */
+ async segmentImage(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = segmentImageParametersToVertex(this.apiClient, params);
+ path = formatMap('{model}:predict', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = segmentImageResponseFromVertex(apiResponse);
+ const typedResp = new SegmentImageResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ throw new Error('This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).');
+ }
+ }
+ /**
+ * Fetches information about a model by name.
+ *
+ * @example
+ * ```ts
+ * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'});
+ * ```
+ */
+ async get(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = getModelParametersToVertex(this.apiClient, params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = modelFromVertex(apiResponse);
+ return resp;
+ });
+ }
+ else {
+ const body = getModelParametersToMldev(this.apiClient, params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = modelFromMldev(apiResponse);
+ return resp;
+ });
+ }
+ }
+ async listInternal(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = listModelsParametersToVertex(this.apiClient, params);
+ path = formatMap('{models_url}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = listModelsResponseFromVertex(apiResponse);
+ const typedResp = new ListModelsResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ const body = listModelsParametersToMldev(this.apiClient, params);
+ path = formatMap('{models_url}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = listModelsResponseFromMldev(apiResponse);
+ const typedResp = new ListModelsResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ /**
+ * Updates a tuned model by its name.
+ *
+ * @param params - The parameters for updating the model.
+ * @return The response from the API.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.update({
+ * model: 'tuned-model-name',
+ * config: {
+ * displayName: 'New display name',
+ * description: 'New description',
+ * },
+ * });
+ * ```
+ */
+ async update(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = updateModelParametersToVertex(this.apiClient, params);
+ path = formatMap('{model}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'PATCH',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = modelFromVertex(apiResponse);
+ return resp;
+ });
+ }
+ else {
+ const body = updateModelParametersToMldev(this.apiClient, params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'PATCH',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = modelFromMldev(apiResponse);
+ return resp;
+ });
+ }
+ }
+ /**
+ * Deletes a tuned model by its name.
+ *
+ * @param params - The parameters for deleting the model.
+ * @return The response from the API.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.delete({model: 'tuned-model-name'});
+ * ```
+ */
+ async delete(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = deleteModelParametersToVertex(this.apiClient, params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'DELETE',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = deleteModelResponseFromVertex(apiResponse);
+ const typedResp = new DeleteModelResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ const body = deleteModelParametersToMldev(this.apiClient, params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'DELETE',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = deleteModelResponseFromMldev(apiResponse);
+ const typedResp = new DeleteModelResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ /**
+ * Counts the number of tokens in the given contents. Multimodal input is
+ * supported for Gemini models.
+ *
+ * @param params - The parameters for counting tokens.
+ * @return The response from the API.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.countTokens({
+ * model: 'gemini-2.0-flash',
+ * contents: 'The quick brown fox jumps over the lazy dog.'
+ * });
+ * console.log(response);
+ * ```
+ */
+ async countTokens(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = countTokensParametersToVertex(this.apiClient, params);
+ path = formatMap('{model}:countTokens', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = countTokensResponseFromVertex(apiResponse);
+ const typedResp = new CountTokensResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ const body = countTokensParametersToMldev(this.apiClient, params);
+ path = formatMap('{model}:countTokens', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = countTokensResponseFromMldev(apiResponse);
+ const typedResp = new CountTokensResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ /**
+ * Given a list of contents, returns a corresponding TokensInfo containing
+ * the list of tokens and list of token ids.
+ *
+ * This method is not supported by the Gemini Developer API.
+ *
+ * @param params - The parameters for computing tokens.
+ * @return The response from the API.
+ *
+ * @example
+ * ```ts
+ * const response = await ai.models.computeTokens({
+ * model: 'gemini-2.0-flash',
+ * contents: 'What is your name?'
+ * });
+ * console.log(response);
+ * ```
+ */
+ async computeTokens(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = computeTokensParametersToVertex(this.apiClient, params);
+ path = formatMap('{model}:computeTokens', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = computeTokensResponseFromVertex(apiResponse);
+ const typedResp = new ComputeTokensResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ throw new Error('This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).');
+ }
+ }
+ /**
+ * Private method for generating videos.
+ */
+ async generateVideosInternal(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = generateVideosParametersToVertex(this.apiClient, params);
+ path = formatMap('{model}:predictLongRunning', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = generateVideosOperationFromVertex(apiResponse);
+ const typedResp = new GenerateVideosOperation();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ const body = generateVideosParametersToMldev(this.apiClient, params);
+ path = formatMap('{model}:predictLongRunning', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = generateVideosOperationFromMldev(apiResponse);
+ const typedResp = new GenerateVideosOperation();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+}
+Models.loggedGenerateImagesWarning = false;
+Models.loggedEditImageWarning = false;
+Models.loggedGenerateVideosWarning = false;
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class Operations extends BaseModule {
+ constructor(apiClient) {
+ super();
+ this.apiClient = apiClient;
+ }
+ /**
+ * Gets the status of a long-running operation.
+ *
+ * @param parameters The parameters for the get operation request.
+ * @return The updated Operation object, with the latest status or result.
+ */
+ async getVideosOperation(parameters) {
+ const operation = parameters.operation;
+ const config = parameters.config;
+ if (operation.name === undefined || operation.name === '') {
+ throw new Error('Operation name is required.');
+ }
+ if (this.apiClient.isVertexAI()) {
+ const resourceName = operation.name.split('/operations/')[0];
+ let httpOptions = undefined;
+ if (config && 'httpOptions' in config) {
+ httpOptions = config.httpOptions;
+ }
+ const rawOperation = await this.fetchPredictVideosOperationInternal({
+ operationName: operation.name,
+ resourceName: resourceName,
+ config: { httpOptions: httpOptions },
+ });
+ return operation._fromAPIResponse({
+ apiResponse: rawOperation,
+ _isVertexAI: true,
+ });
+ }
+ else {
+ const rawOperation = await this.getVideosOperationInternal({
+ operationName: operation.name,
+ config: config,
+ });
+ return operation._fromAPIResponse({
+ apiResponse: rawOperation,
+ _isVertexAI: false,
+ });
+ }
+ }
+ /**
+ * Gets the status of a long-running operation.
+ *
+ * @param parameters The parameters for the get operation request.
+ * @return The updated Operation object, with the latest status or result.
+ */
+ async get(parameters) {
+ const operation = parameters.operation;
+ const config = parameters.config;
+ if (operation.name === undefined || operation.name === '') {
+ throw new Error('Operation name is required.');
+ }
+ if (this.apiClient.isVertexAI()) {
+ const resourceName = operation.name.split('/operations/')[0];
+ let httpOptions = undefined;
+ if (config && 'httpOptions' in config) {
+ httpOptions = config.httpOptions;
+ }
+ const rawOperation = await this.fetchPredictVideosOperationInternal({
+ operationName: operation.name,
+ resourceName: resourceName,
+ config: { httpOptions: httpOptions },
+ });
+ return operation._fromAPIResponse({
+ apiResponse: rawOperation,
+ _isVertexAI: true,
+ });
+ }
+ else {
+ const rawOperation = await this.getVideosOperationInternal({
+ operationName: operation.name,
+ config: config,
+ });
+ return operation._fromAPIResponse({
+ apiResponse: rawOperation,
+ _isVertexAI: false,
+ });
+ }
+ }
+ async getVideosOperationInternal(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = getOperationParametersToVertex(params);
+ path = formatMap('{operationName}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response;
+ }
+ else {
+ const body = getOperationParametersToMldev(params);
+ path = formatMap('{operationName}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response;
+ }
+ }
+ async fetchPredictVideosOperationInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = fetchPredictOperationParametersToVertex(params);
+ path = formatMap('{resourceName}:fetchPredictOperation', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response;
+ }
+ else {
+ throw new Error('This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).');
+ }
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+function authConfigToMldev(fromObject) {
+ const toObject = {};
+ const fromApiKey = getValueByPath(fromObject, ['apiKey']);
+ if (fromApiKey != null) {
+ setValueByPath(toObject, ['apiKey'], fromApiKey);
+ }
+ if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
+ throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['authType']) !== undefined) {
+ throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
+ undefined) {
+ throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
+ throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
+ throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
+ throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function blobToMldev(fromObject) {
+ const toObject = {};
+ const fromData = getValueByPath(fromObject, ['data']);
+ if (fromData != null) {
+ setValueByPath(toObject, ['data'], fromData);
+ }
+ if (getValueByPath(fromObject, ['displayName']) !== undefined) {
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function contentToMldev(fromObject) {
+ const toObject = {};
+ const fromParts = getValueByPath(fromObject, ['parts']);
+ if (fromParts != null) {
+ let transformedList = fromParts;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return partToMldev(item);
+ });
+ }
+ setValueByPath(toObject, ['parts'], transformedList);
+ }
+ const fromRole = getValueByPath(fromObject, ['role']);
+ if (fromRole != null) {
+ setValueByPath(toObject, ['role'], fromRole);
+ }
+ return toObject;
+}
+function createAuthTokenConfigToMldev(apiClient, fromObject, parentObject) {
+ const toObject = {};
+ const fromExpireTime = getValueByPath(fromObject, ['expireTime']);
+ if (parentObject !== undefined && fromExpireTime != null) {
+ setValueByPath(parentObject, ['expireTime'], fromExpireTime);
+ }
+ const fromNewSessionExpireTime = getValueByPath(fromObject, [
+ 'newSessionExpireTime',
+ ]);
+ if (parentObject !== undefined && fromNewSessionExpireTime != null) {
+ setValueByPath(parentObject, ['newSessionExpireTime'], fromNewSessionExpireTime);
+ }
+ const fromUses = getValueByPath(fromObject, ['uses']);
+ if (parentObject !== undefined && fromUses != null) {
+ setValueByPath(parentObject, ['uses'], fromUses);
+ }
+ const fromLiveConnectConstraints = getValueByPath(fromObject, [
+ 'liveConnectConstraints',
+ ]);
+ if (parentObject !== undefined && fromLiveConnectConstraints != null) {
+ setValueByPath(parentObject, ['bidiGenerateContentSetup'], liveConnectConstraintsToMldev(apiClient, fromLiveConnectConstraints));
+ }
+ const fromLockAdditionalFields = getValueByPath(fromObject, [
+ 'lockAdditionalFields',
+ ]);
+ if (parentObject !== undefined && fromLockAdditionalFields != null) {
+ setValueByPath(parentObject, ['fieldMask'], fromLockAdditionalFields);
+ }
+ return toObject;
+}
+function createAuthTokenParametersToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ setValueByPath(toObject, ['config'], createAuthTokenConfigToMldev(apiClient, fromConfig, toObject));
+ }
+ return toObject;
+}
+function fileDataToMldev(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['displayName']) !== undefined) {
+ throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromFileUri = getValueByPath(fromObject, ['fileUri']);
+ if (fromFileUri != null) {
+ setValueByPath(toObject, ['fileUri'], fromFileUri);
+ }
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
+ if (fromMimeType != null) {
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
+ }
+ return toObject;
+}
+function functionCallToMldev(fromObject) {
+ const toObject = {};
+ const fromArgs = getValueByPath(fromObject, ['args']);
+ if (fromArgs != null) {
+ setValueByPath(toObject, ['args'], fromArgs);
+ }
+ const fromId = getValueByPath(fromObject, ['id']);
+ if (fromId != null) {
+ setValueByPath(toObject, ['id'], fromId);
+ }
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
+ throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
+ throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function googleMapsToMldev(fromObject) {
+ const toObject = {};
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
+ if (fromAuthConfig != null) {
+ setValueByPath(toObject, ['authConfig'], authConfigToMldev(fromAuthConfig));
+ }
+ const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
+ if (fromEnableWidget != null) {
+ setValueByPath(toObject, ['enableWidget'], fromEnableWidget);
+ }
+ if (getValueByPath(fromObject, ['groundingTypes']) !== undefined) {
+ throw new Error('groundingTypes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function googleSearchToMldev(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
+ throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
+ throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
+ if (fromSearchTypes != null) {
+ setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
+ }
+ const fromTimeRangeFilter = getValueByPath(fromObject, [
+ 'timeRangeFilter',
+ ]);
+ if (fromTimeRangeFilter != null) {
+ setValueByPath(toObject, ['timeRangeFilter'], fromTimeRangeFilter);
+ }
+ return toObject;
+}
+function liveConnectConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromGenerationConfig = getValueByPath(fromObject, [
+ 'generationConfig',
+ ]);
+ if (parentObject !== undefined && fromGenerationConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
+ }
+ const fromResponseModalities = getValueByPath(fromObject, [
+ 'responseModalities',
+ ]);
+ if (parentObject !== undefined && fromResponseModalities != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
+ }
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
+ if (parentObject !== undefined && fromTemperature != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
+ }
+ const fromTopP = getValueByPath(fromObject, ['topP']);
+ if (parentObject !== undefined && fromTopP != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
+ }
+ const fromTopK = getValueByPath(fromObject, ['topK']);
+ if (parentObject !== undefined && fromTopK != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
+ }
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
+ 'maxOutputTokens',
+ ]);
+ if (parentObject !== undefined && fromMaxOutputTokens != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
+ }
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (parentObject !== undefined && fromMediaResolution != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (parentObject !== undefined && fromSeed != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
+ }
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
+ if (parentObject !== undefined && fromSpeechConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], tLiveSpeechConfig(fromSpeechConfig));
+ }
+ const fromThinkingConfig = getValueByPath(fromObject, [
+ 'thinkingConfig',
+ ]);
+ if (parentObject !== undefined && fromThinkingConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], fromThinkingConfig);
+ }
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
+ 'enableAffectiveDialog',
+ ]);
+ if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
+ }
+ const fromSystemInstruction = getValueByPath(fromObject, [
+ 'systemInstruction',
+ ]);
+ if (parentObject !== undefined && fromSystemInstruction != null) {
+ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev(tContent(fromSystemInstruction)));
+ }
+ const fromTools = getValueByPath(fromObject, ['tools']);
+ if (parentObject !== undefined && fromTools != null) {
+ let transformedList = tTools(fromTools);
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return toolToMldev(tTool(item));
+ });
+ }
+ setValueByPath(parentObject, ['setup', 'tools'], transformedList);
+ }
+ const fromSessionResumption = getValueByPath(fromObject, [
+ 'sessionResumption',
+ ]);
+ if (parentObject !== undefined && fromSessionResumption != null) {
+ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev(fromSessionResumption));
+ }
+ const fromInputAudioTranscription = getValueByPath(fromObject, [
+ 'inputAudioTranscription',
+ ]);
+ if (parentObject !== undefined && fromInputAudioTranscription != null) {
+ setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], fromInputAudioTranscription);
+ }
+ const fromOutputAudioTranscription = getValueByPath(fromObject, [
+ 'outputAudioTranscription',
+ ]);
+ if (parentObject !== undefined && fromOutputAudioTranscription != null) {
+ setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], fromOutputAudioTranscription);
+ }
+ const fromRealtimeInputConfig = getValueByPath(fromObject, [
+ 'realtimeInputConfig',
+ ]);
+ if (parentObject !== undefined && fromRealtimeInputConfig != null) {
+ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], fromRealtimeInputConfig);
+ }
+ const fromContextWindowCompression = getValueByPath(fromObject, [
+ 'contextWindowCompression',
+ ]);
+ if (parentObject !== undefined && fromContextWindowCompression != null) {
+ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], fromContextWindowCompression);
+ }
+ const fromProactivity = getValueByPath(fromObject, ['proactivity']);
+ if (parentObject !== undefined && fromProactivity != null) {
+ setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
+ }
+ if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
+ throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
+ if (parentObject !== undefined && fromAvatarConfig != null) {
+ setValueByPath(parentObject, ['setup', 'avatarConfig'], fromAvatarConfig);
+ }
+ const fromSafetySettings = getValueByPath(fromObject, [
+ 'safetySettings',
+ ]);
+ if (parentObject !== undefined && fromSafetySettings != null) {
+ let transformedList = fromSafetySettings;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return safetySettingToMldev(item);
+ });
+ }
+ setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
+ }
+ const fromTranslationConfig = getValueByPath(fromObject, [
+ 'translationConfig',
+ ]);
+ if (parentObject !== undefined && fromTranslationConfig != null) {
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'translationConfig'], fromTranslationConfig);
+ }
+ return toObject;
+}
+function liveConnectConstraintsToMldev(apiClient, fromObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['model']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ setValueByPath(toObject, ['config'], liveConnectConfigToMldev(fromConfig, toObject));
+ }
+ return toObject;
+}
+function partToMldev(fromObject) {
+ const toObject = {};
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ const fromToolCall = getValueByPath(fromObject, ['toolCall']);
+ if (fromToolCall != null) {
+ setValueByPath(toObject, ['toolCall'], fromToolCall);
+ }
+ const fromToolResponse = getValueByPath(fromObject, ['toolResponse']);
+ if (fromToolResponse != null) {
+ setValueByPath(toObject, ['toolResponse'], fromToolResponse);
+ }
+ const fromAudioTranscription = getValueByPath(fromObject, [
+ 'audioTranscription',
+ ]);
+ if (fromAudioTranscription != null) {
+ setValueByPath(toObject, ['audioTranscription'], fromAudioTranscription);
+ }
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
+ 'codeExecutionResult',
+ ]);
+ if (fromCodeExecutionResult != null) {
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
+ }
+ const fromExecutableCode = getValueByPath(fromObject, [
+ 'executableCode',
+ ]);
+ if (fromExecutableCode != null) {
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
+ }
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
+ if (fromFileData != null) {
+ setValueByPath(toObject, ['fileData'], fileDataToMldev(fromFileData));
+ }
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
+ if (fromFunctionCall != null) {
+ setValueByPath(toObject, ['functionCall'], functionCallToMldev(fromFunctionCall));
+ }
+ const fromFunctionResponse = getValueByPath(fromObject, [
+ 'functionResponse',
+ ]);
+ if (fromFunctionResponse != null) {
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
+ }
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
+ if (fromInlineData != null) {
+ setValueByPath(toObject, ['inlineData'], blobToMldev(fromInlineData));
+ }
+ const fromText = getValueByPath(fromObject, ['text']);
+ if (fromText != null) {
+ setValueByPath(toObject, ['text'], fromText);
+ }
+ const fromThought = getValueByPath(fromObject, ['thought']);
+ if (fromThought != null) {
+ setValueByPath(toObject, ['thought'], fromThought);
+ }
+ const fromThoughtSignature = getValueByPath(fromObject, [
+ 'thoughtSignature',
+ ]);
+ if (fromThoughtSignature != null) {
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
+ }
+ const fromVideoMetadata = getValueByPath(fromObject, [
+ 'videoMetadata',
+ ]);
+ if (fromVideoMetadata != null) {
+ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
+ }
+ const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
+ if (fromPartMetadata != null) {
+ setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
+ }
+ const fromMediaProcessing = getValueByPath(fromObject, [
+ 'mediaProcessing',
+ ]);
+ if (fromMediaProcessing != null) {
+ setValueByPath(toObject, ['mediaProcessing'], fromMediaProcessing);
+ }
+ return toObject;
+}
+function safetySettingToMldev(fromObject) {
+ const toObject = {};
+ const fromCategory = getValueByPath(fromObject, ['category']);
+ if (fromCategory != null) {
+ setValueByPath(toObject, ['category'], fromCategory);
+ }
+ if (getValueByPath(fromObject, ['method']) !== undefined) {
+ throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromThreshold = getValueByPath(fromObject, ['threshold']);
+ if (fromThreshold != null) {
+ setValueByPath(toObject, ['threshold'], fromThreshold);
+ }
+ return toObject;
+}
+function sessionResumptionConfigToMldev(fromObject) {
+ const toObject = {};
+ const fromHandle = getValueByPath(fromObject, ['handle']);
+ if (fromHandle != null) {
+ setValueByPath(toObject, ['handle'], fromHandle);
+ }
+ if (getValueByPath(fromObject, ['transparent']) !== undefined) {
+ throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function toolToMldev(fromObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
+ throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
+ if (fromGoogleMaps != null) {
+ setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
+ }
+ const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
+ if (fromMcpServers != null) {
+ let transformedList = fromMcpServers;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['mcpServers'], transformedList);
+ }
+ const fromCodeExecution = getValueByPath(fromObject, [
+ 'codeExecution',
+ ]);
+ if (fromCodeExecution != null) {
+ setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
+ }
+ const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
+ if (fromComputerUse != null) {
+ setValueByPath(toObject, ['computerUse'], fromComputerUse);
+ }
+ if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
+ throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
+ throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromFunctionDeclarations = getValueByPath(fromObject, [
+ 'functionDeclarations',
+ ]);
+ if (fromFunctionDeclarations != null) {
+ let transformedList = fromFunctionDeclarations;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['functionDeclarations'], transformedList);
+ }
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
+ if (fromGoogleSearch != null) {
+ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(fromGoogleSearch));
+ }
+ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
+ 'googleSearchRetrieval',
+ ]);
+ if (fromGoogleSearchRetrieval != null) {
+ setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
+ }
+ if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
+ throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
+ if (fromUrlContext != null) {
+ setValueByPath(toObject, ['urlContext'], fromUrlContext);
+ }
+ const fromFileSearch = getValueByPath(fromObject, ['fileSearch']);
+ if (fromFileSearch != null) {
+ setValueByPath(toObject, ['fileSearch'], fromFileSearch);
+ }
+ return toObject;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+/**
+ * Returns a comma-separated list of field masks from a given object.
+ *
+ * @param setup The object to extract field masks from.
+ * @return A comma-separated list of field masks.
+ */
+function getFieldMasks(setup) {
+ const fields = [];
+ for (const key in setup) {
+ if (Object.prototype.hasOwnProperty.call(setup, key)) {
+ const value = setup[key];
+ // 2nd layer, recursively get field masks see TODO(b/418290100)
+ if (typeof value === 'object' &&
+ value != null &&
+ Object.keys(value).length > 0) {
+ const field = Object.keys(value).map((kk) => `${key}.${kk}`);
+ fields.push(...field);
+ }
+ else {
+ fields.push(key); // 1st layer
+ }
+ }
+ }
+ return fields.join(',');
+}
+/**
+ * Converts bidiGenerateContentSetup.
+ * @param requestDict - The request dictionary.
+ * @param config - The configuration object.
+ * @return - The modified request dictionary.
+ */
+function convertBidiSetupToTokenSetup(requestDict, config) {
+ // Convert bidiGenerateContentSetup from bidiGenerateContentSetup.setup.
+ let setupForMaskGeneration = null;
+ const bidiGenerateContentSetupValue = requestDict['bidiGenerateContentSetup'];
+ if (typeof bidiGenerateContentSetupValue === 'object' &&
+ bidiGenerateContentSetupValue !== null &&
+ 'setup' in bidiGenerateContentSetupValue) {
+ // Now we know bidiGenerateContentSetupValue is an object and has a 'setup'
+ // property.
+ const innerSetup = bidiGenerateContentSetupValue
+ .setup;
+ if (typeof innerSetup === 'object' && innerSetup !== null) {
+ // Valid inner setup found.
+ requestDict['bidiGenerateContentSetup'] = innerSetup;
+ setupForMaskGeneration = innerSetup;
+ }
+ else {
+ // `bidiGenerateContentSetupValue.setup` is not a valid object; treat as
+ // if bidiGenerateContentSetup is invalid.
+ delete requestDict['bidiGenerateContentSetup'];
+ }
+ }
+ else if (bidiGenerateContentSetupValue !== undefined) {
+ // `bidiGenerateContentSetup` exists but not in the expected
+ // shape {setup: {...}}; treat as invalid.
+ delete requestDict['bidiGenerateContentSetup'];
+ }
+ const preExistingFieldMask = requestDict['fieldMask'];
+ // Handle mask generation setup.
+ if (setupForMaskGeneration) {
+ const generatedMaskFromBidi = getFieldMasks(setupForMaskGeneration);
+ if (Array.isArray(config === null || config === void 0 ? void 0 : config.lockAdditionalFields) &&
+ (config === null || config === void 0 ? void 0 : config.lockAdditionalFields.length) === 0) {
+ // Case 1: lockAdditionalFields is an empty array. Lock only fields from
+ // bidi setup.
+ if (generatedMaskFromBidi) {
+ // Only assign if mask is not empty
+ requestDict['fieldMask'] = generatedMaskFromBidi;
+ }
+ else {
+ delete requestDict['fieldMask']; // If mask is empty, effectively no
+ // specific fields locked by bidi
+ }
+ }
+ else if ((config === null || config === void 0 ? void 0 : config.lockAdditionalFields) &&
+ config.lockAdditionalFields.length > 0 &&
+ preExistingFieldMask !== null &&
+ Array.isArray(preExistingFieldMask) &&
+ preExistingFieldMask.length > 0) {
+ // Case 2: Lock fields from bidi setup + additional fields
+ // (preExistingFieldMask).
+ const generationConfigFields = [
+ 'temperature',
+ 'topK',
+ 'topP',
+ 'maxOutputTokens',
+ 'responseModalities',
+ 'seed',
+ 'speechConfig',
+ ];
+ let mappedFieldsFromPreExisting = [];
+ if (preExistingFieldMask.length > 0) {
+ mappedFieldsFromPreExisting = preExistingFieldMask.map((field) => {
+ if (generationConfigFields.includes(field)) {
+ return `generationConfig.${field}`;
+ }
+ return field; // Keep original field name if not in
+ // generationConfigFields
+ });
+ }
+ const finalMaskParts = [];
+ if (generatedMaskFromBidi) {
+ finalMaskParts.push(generatedMaskFromBidi);
+ }
+ if (mappedFieldsFromPreExisting.length > 0) {
+ finalMaskParts.push(...mappedFieldsFromPreExisting);
+ }
+ if (finalMaskParts.length > 0) {
+ requestDict['fieldMask'] = finalMaskParts.join(',');
+ }
+ else {
+ // If no fields from bidi and no valid additional fields from
+ // pre-existing mask.
+ delete requestDict['fieldMask'];
+ }
+ }
+ else {
+ // Case 3: "Lock all fields" (meaning, don't send a field_mask, let server
+ // defaults apply or all are mutable). This is hit if:
+ // - `config.lockAdditionalFields` is undefined.
+ // - `config.lockAdditionalFields` is non-empty, BUT
+ // `preExistingFieldMask` is null, not a string, or an empty string.
+ delete requestDict['fieldMask'];
+ }
+ }
+ else {
+ // No valid `bidiGenerateContentSetup` was found or extracted.
+ // "Lock additional null fields if any".
+ if (preExistingFieldMask !== null &&
+ Array.isArray(preExistingFieldMask) &&
+ preExistingFieldMask.length > 0) {
+ // If there's a pre-existing field mask, it's a string, and it's not
+ // empty, then we should lock all fields.
+ requestDict['fieldMask'] = preExistingFieldMask.join(',');
+ }
+ else {
+ delete requestDict['fieldMask'];
+ }
+ }
+ return requestDict;
+}
+class Tokens extends BaseModule {
+ constructor(apiClient) {
+ super();
+ this.apiClient = apiClient;
+ }
+ /**
+ * Creates an ephemeral auth token resource.
+ *
+ * @experimental
+ *
+ * @remarks
+ * Ephemeral auth tokens is only supported in the Gemini Developer API.
+ * It can be used for the session connection to the Live constrained API.
+ * Support in v1alpha only.
+ *
+ * @param params - The parameters for the create request.
+ * @return The created auth token.
+ *
+ * @example
+ * ```ts
+ * const ai = new GoogleGenAI({
+ * apiKey: token.name,
+ * httpOptions: { apiVersion: 'v1alpha' } // Support in v1alpha only.
+ * });
+ *
+ * // Case 1: If LiveEphemeralParameters is unset, unlock LiveConnectConfig
+ * // when using the token in Live API sessions. Each session connection can
+ * // use a different configuration.
+ * const config: CreateAuthTokenConfig = {
+ * uses: 3,
+ * expireTime: '2025-05-01T00:00:00Z',
+ * }
+ * const token = await ai.tokens.create(config);
+ *
+ * // Case 2: If LiveEphemeralParameters is set, lock all fields in
+ * // LiveConnectConfig when using the token in Live API sessions. For
+ * // example, changing `outputAudioTranscription` in the Live API
+ * // connection will be ignored by the API.
+ * const config: CreateAuthTokenConfig =
+ * uses: 3,
+ * expireTime: '2025-05-01T00:00:00Z',
+ * LiveEphemeralParameters: {
+ * model: 'gemini-2.0-flash-001',
+ * config: {
+ * 'responseModalities': ['AUDIO'],
+ * 'systemInstruction': 'Always answer in English.',
+ * }
+ * }
+ * }
+ * const token = await ai.tokens.create(config);
+ *
+ * // Case 3: If LiveEphemeralParameters is set and lockAdditionalFields is
+ * // set, lock LiveConnectConfig with set and additional fields (e.g.
+ * // responseModalities, systemInstruction, temperature in this example) when
+ * // using the token in Live API sessions.
+ * const config: CreateAuthTokenConfig =
+ * uses: 3,
+ * expireTime: '2025-05-01T00:00:00Z',
+ * LiveEphemeralParameters: {
+ * model: 'gemini-2.0-flash-001',
+ * config: {
+ * 'responseModalities': ['AUDIO'],
+ * 'systemInstruction': 'Always answer in English.',
+ * }
+ * },
+ * lockAdditionalFields: ['temperature'],
+ * }
+ * const token = await ai.tokens.create(config);
+ *
+ * // Case 4: If LiveEphemeralParameters is set and lockAdditionalFields is
+ * // empty array, lock LiveConnectConfig with set fields (e.g.
+ * // responseModalities, systemInstruction in this example) when using the
+ * // token in Live API sessions.
+ * const config: CreateAuthTokenConfig =
+ * uses: 3,
+ * expireTime: '2025-05-01T00:00:00Z',
+ * LiveEphemeralParameters: {
+ * model: 'gemini-2.0-flash-001',
+ * config: {
+ * 'responseModalities': ['AUDIO'],
+ * 'systemInstruction': 'Always answer in English.',
+ * }
+ * },
+ * lockAdditionalFields: [],
+ * }
+ * const token = await ai.tokens.create(config);
+ * ```
+ */
+ async create(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('The client.tokens.create method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = createAuthTokenParametersToMldev(this.apiClient, params);
+ path = formatMap('auth_tokens', body['_url']);
+ queryParams = body['_query'];
+ delete body['config'];
+ delete body['_url'];
+ delete body['_query'];
+ const transformedBody = convertBidiSetupToTokenSetup(body, params.config);
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(transformedBody),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((resp) => {
+ return resp;
+ });
+ }
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
+function deleteDocumentConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromForce = getValueByPath(fromObject, ['force']);
+ if (parentObject !== undefined && fromForce != null) {
+ setValueByPath(parentObject, ['_query', 'force'], fromForce);
+ }
+ return toObject;
+}
+function deleteDocumentParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], fromName);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ deleteDocumentConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function getDocumentParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], fromName);
+ }
+ return toObject;
+}
+function listDocumentsConfigToMldev(fromObject, parentObject) {
+ const toObject = {};
+ const fromPageSize = getValueByPath(fromObject, ['pageSize']);
+ if (parentObject !== undefined && fromPageSize != null) {
+ setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
+ }
+ const fromPageToken = getValueByPath(fromObject, ['pageToken']);
+ if (parentObject !== undefined && fromPageToken != null) {
+ setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
+ }
+ return toObject;
+}
+function listDocumentsParametersToMldev(fromObject) {
+ const toObject = {};
+ const fromParent = getValueByPath(fromObject, ['parent']);
+ if (fromParent != null) {
+ setValueByPath(toObject, ['_url', 'parent'], fromParent);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ listDocumentsConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function listDocumentsResponseFromMldev(fromObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromNextPageToken = getValueByPath(fromObject, [
+ 'nextPageToken',
+ ]);
+ if (fromNextPageToken != null) {
+ setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);
+ }
+ const fromDocuments = getValueByPath(fromObject, ['documents']);
+ if (fromDocuments != null) {
+ let transformedList = fromDocuments;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['documents'], transformedList);
+ }
+ return toObject;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class Documents extends BaseModule {
+ constructor(apiClient) {
+ super();
+ this.apiClient = apiClient;
+ /**
+ * Lists documents.
+ *
+ * @param params - The parameters for the list request.
+ * @return - A pager of documents.
+ *
+ * @example
+ * ```ts
+ * const documents = await ai.documents.list({parent:'rag_store_name', config: {'pageSize': 2}});
+ * for await (const document of documents) {
+ * console.log(document);
+ * }
+ * ```
+ */
+ this.list = async (params) => {
+ return new Pager(PagedItem.PAGED_ITEM_DOCUMENTS, (x) => this.listInternal({ parent: params.parent, config: x.config }), await this.listInternal(params), params);
+ };
+ }
+ /**
+ * Gets a Document.
+ *
+ * @param params - The parameters for getting a document.
+ * @return Document.
+ */
+ async get(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = getDocumentParametersToMldev(params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((resp) => {
+ return resp;
+ });
+ }
+ }
+ /**
+ * Deletes a Document.
+ *
+ * @param params - The parameters for deleting a document.
+ */
+ async delete(params) {
+ var _a, _b;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = deleteDocumentParametersToMldev(params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ await this.apiClient.request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'DELETE',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ });
+ }
+ }
+ async listInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = listDocumentsParametersToMldev(params);
+ path = formatMap('{parent}/documents', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = listDocumentsResponseFromMldev(apiResponse);
+ const typedResp = new ListDocumentsResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class FileSearchStores extends BaseModule {
+ constructor(apiClient, documents = new Documents(apiClient)) {
+ super();
+ this.apiClient = apiClient;
+ this.documents = documents;
+ /**
+ * Lists file search stores.
+ *
+ * @param params - The parameters for the list request.
+ * @return - A pager of file search stores.
+ *
+ * @example
+ * ```ts
+ * const fileSearchStores = await ai.fileSearchStores.list({config: {'pageSize': 2}});
+ * for await (const fileSearchStore of fileSearchStores) {
+ * console.log(fileSearchStore);
+ * }
+ * ```
+ */
+ this.list = async (params = {}) => {
+ return new Pager(PagedItem.PAGED_ITEM_FILE_SEARCH_STORES, (x) => this.listInternal(x), await this.listInternal(params), params);
+ };
+ }
+ /**
+ * Uploads a file asynchronously to a given File Search Store.
+ * This method is not available in Gemini Enterprise Agent Platform (previously known as Vertex AI).
+ * Supported upload sources:
+ * - Node.js: File path (string) or Blob object.
+ * - Browser: Blob object (e.g., File).
+ *
+ * @remarks
+ * The `mimeType` can be specified in the `config` parameter. If omitted:
+ * - For file path (string) inputs, the `mimeType` will be inferred from the
+ * file extension.
+ * - For Blob object inputs, the `mimeType` will be set to the Blob's `type`
+ * property.
+ *
+ * This section can contain multiple paragraphs and code examples.
+ *
+ * @param params - Optional parameters specified in the
+ * `types.UploadToFileSearchStoreParameters` interface.
+ * @see {@link types.UploadToFileSearchStoreParameters#config} for the optional
+ * config in the parameters.
+ * @return A promise that resolves to a long running operation.
+ * @throws An error if called on a Gemini Enterprise Agent Platform (previously known as Vertex AI) client.
+ * @throws An error if the `mimeType` is not provided and can not be inferred,
+ * the `mimeType` can be provided in the `params.config` parameter.
+ * @throws An error occurs if a suitable upload location cannot be established.
+ *
+ * @example
+ * The following code uploads a file to a given file search store.
+ *
+ * ```ts
+ * const operation = await ai.fileSearchStores.upload({fileSearchStoreName: 'fileSearchStores/foo-bar', file: 'file.txt', config: {
+ * mimeType: 'text/plain',
+ * }});
+ * console.log(operation.name);
+ * ```
+ */
+ async uploadToFileSearchStore(params) {
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('Gemini Enterprise Agent Platform (previously known as Vertex AI) does not support uploading files to a file search store.');
+ }
+ return this.apiClient.uploadFileToFileSearchStore(params.fileSearchStoreName, params.file, params.config);
+ }
+ /**
+ * Downloads media using a Media ID or URI.
+ * This method is only supported in the Gemini Developer client.
+ *
+ * @param uri - The URI or Media ID of the blob.
+ * @param config - Optional configuration for the download.
+ * @returns A promise that resolves to the blob data as a Uint8Array.
+ */
+ async downloadMedia(uri, config) {
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported in the Gemini Developer client.');
+ }
+ const parsedUri = new URL(uri, 'http://dummy.com');
+ let pathname = parsedUri.pathname;
+ if (pathname.startsWith('/')) {
+ pathname = pathname.slice(1);
+ }
+ if (!pathname.includes('/media/')) {
+ throw new Error(`Invalid uri format: ${uri}. Expected to contain /media/`);
+ }
+ const queryParams = {};
+ parsedUri.searchParams.forEach((value, key) => {
+ queryParams[key] = value;
+ });
+ queryParams['alt'] = 'media';
+ const httpOptions = Object.assign({}, config === null || config === void 0 ? void 0 : config.httpOptions);
+ const response = await this.apiClient.request({
+ path: pathname,
+ httpMethod: 'GET',
+ queryParams: queryParams,
+ httpOptions: httpOptions,
+ });
+ if (response instanceof HttpResponse) {
+ const arrayBuffer = await response.responseInternal.arrayBuffer();
+ return new Uint8Array(arrayBuffer);
+ }
+ else {
+ throw new Error('Unexpected response type from downloadMedia');
+ }
+ }
+ /**
+ * Creates a File Search Store.
+ *
+ * @param params - The parameters for creating a File Search Store.
+ * @return FileSearchStore.
+ */
+ async create(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = createFileSearchStoreParametersToMldev(this.apiClient, params);
+ path = formatMap('fileSearchStores', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((resp) => {
+ return resp;
+ });
+ }
+ }
+ /**
+ * Gets a File Search Store.
+ *
+ * @param params - The parameters for getting a File Search Store.
+ * @return FileSearchStore.
+ */
+ async get(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = getFileSearchStoreParametersToMldev(params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((resp) => {
+ return resp;
+ });
+ }
+ }
+ /**
+ * Deletes a File Search Store.
+ *
+ * @param params - The parameters for deleting a File Search Store.
+ */
+ async delete(params) {
+ var _a, _b;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = deleteFileSearchStoreParametersToMldev(params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ await this.apiClient.request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'DELETE',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ });
+ }
+ }
+ async listInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = listFileSearchStoresParametersToMldev(params);
+ path = formatMap('fileSearchStores', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = listFileSearchStoresResponseFromMldev(apiResponse);
+ const typedResp = new ListFileSearchStoresResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ async uploadToFileSearchStoreInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = uploadToFileSearchStoreParametersToMldev(params);
+ path = formatMap('upload/v1beta/{file_search_store_name}:uploadToFileSearchStore', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = uploadToFileSearchStoreResumableResponseFromMldev(apiResponse);
+ const typedResp = new UploadToFileSearchStoreResumableResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ /**
+ * Imports a File from File Service to a FileSearchStore.
+ *
+ * This is a long-running operation, see aip.dev/151
+ *
+ * @param params - The parameters for importing a file to a file search store.
+ * @return ImportFileOperation.
+ */
+ async importFile(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = importFileParametersToMldev(params);
+ path = formatMap('{file_search_store_name}:importFile', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json();
+ });
+ return response.then((apiResponse) => {
+ const resp = importFileOperationFromMldev(apiResponse);
+ const typedResp = new ImportFileOperation();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Checks for the existence of the Deno global object to determine the environment.
+ * @returns {boolean} True if the runtime is Deno, false otherwise.
+ */
+function isDeno() {
+ if ("Deno" in globalThis) {
+ return true;
+ }
+ return false;
+}
+let envMemo = undefined;
+/**
+ * Reads and validates environment variables.
+ */
+function env() {
+ var _a, _b, _c, _d, _e, _f;
+ if (envMemo) {
+ return envMemo;
+ }
+ const globals = globalThis;
+ let envObject = {};
+ if (isDeno()) {
+ envObject = (_d = (_c = (_b = (_a = globals.Deno) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.toObject) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : {};
+ }
+ else {
+ envObject = (_f = (_e = globals.process) === null || _e === void 0 ? void 0 : _e.env) !== null && _f !== void 0 ? _f : {};
+ }
+ envMemo = envObject;
+ return envMemo;
+}
+/**
+ * Populates global parameters with environment variables.
+ */
+function fillGlobals(options) {
+ var _a, _b;
+ const clone = Object.assign({}, options);
+ const envVars = env();
+ if (typeof envVars.GOOGLE_GENAI_API_VERSION !== "undefined") {
+ (_a = clone.api_version) !== null && _a !== void 0 ? _a : (clone.api_version = envVars.GOOGLE_GENAI_API_VERSION);
+ }
+ if (typeof envVars.GOOGLE_GENAI_USER_PROJECT !== "undefined") {
+ (_b = clone.user_project) !== null && _b !== void 0 ? _b : (clone.user_project = envVars.GOOGLE_GENAI_USER_PROJECT);
+ }
+ return clone;
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+class GoogleGenAISecurityProvider {
+ constructor(options) {
+ this.options = options;
+ }
+ getDefaultHeaders() {
+ return this.options.defaultHeaders;
+ }
+ async resolveGoogleGenAISecurity(url) {
+ return securityFromHeaders(await this.options.getAuthHeaders(url));
+ }
+}
+class GoogleGenAIAuthHook {
+ beforeCreateRequest(_hookCtx, input) {
+ return Object.assign(Object.assign({}, input), { url: decodeSDKLevelAPIVersionPath(input.url) });
+ }
+ async beforeRequest(hookCtx, request) {
+ applyDefaultHeaders(request.headers, getStaticDefaultHeaders(hookCtx.security_source));
+ applyUserProject(hookCtx, request.headers);
+ if (hasAuthHeaders(request.headers)) {
+ return request;
+ }
+ const security = await resolveSecurity$1(hookCtx.security_source, request.url);
+ applyDefaultHeaders(request.headers, security === null || security === void 0 ? void 0 : security.default_headers);
+ applyAuth(request.headers, security);
+ return request;
+ }
+}
+function decodeSDKLevelAPIVersionPath(url) {
+ const [, apiVersion, ...rest] = url.pathname.split("/");
+ if (!apiVersion) {
+ return url;
+ }
+ const decodedAPIVersion = decodeURIComponent(apiVersion);
+ if (!decodedAPIVersion.includes("/")) {
+ return url;
+ }
+ const nextURL = new URL(url);
+ nextURL.pathname = `/${decodedAPIVersion}/${rest.join("/")}`;
+ return nextURL;
+}
+async function resolveSecurity$1(securitySource, requestURL) {
+ if (isSecurityResolver(securitySource)) {
+ return securitySource.resolveGoogleGenAISecurity(requestURL);
+ }
+ const security = typeof securitySource === "function"
+ ? await securitySource()
+ : securitySource;
+ if (isSecurity(security)) {
+ return withEnvSecurity(security);
+ }
+ return withEnvSecurity(undefined);
+}
+function getStaticDefaultHeaders(securitySource) {
+ var _a, _b;
+ if (isSecurityResolver(securitySource)) {
+ return ((_b = (_a = securitySource.getDefaultHeaders) === null || _a === void 0 ? void 0 : _a.call(securitySource)) !== null && _b !== void 0 ? _b : securitySource.defaultHeaders);
+ }
+ if (isSecurity(securitySource)) {
+ return securitySource.default_headers;
+ }
+ return undefined;
+}
+function withEnvSecurity(security) {
+ var _a, _b;
+ const envVars = env();
+ const nextSecurity = Object.assign(Object.assign({}, security), { api_key: (_a = security === null || security === void 0 ? void 0 : security.api_key) !== null && _a !== void 0 ? _a : envVars.GOOGLE_GENAI_API_KEY, access_token: (_b = security === null || security === void 0 ? void 0 : security.access_token) !== null && _b !== void 0 ? _b : envVars.GOOGLE_GENAI_ACCESS_TOKEN });
+ return hasSecurityValue(nextSecurity) ? nextSecurity : undefined;
+}
+function securityFromHeaders(headers) {
+ var _a, _b;
+ const defaultHeaders = {};
+ for (const [key, value] of headers) {
+ const lowerKey = key.toLowerCase();
+ if (lowerKey !== "authorization" && lowerKey !== "x-goog-api-key") {
+ defaultHeaders[key] = value;
+ }
+ }
+ const security = {
+ access_token: (_a = headers.get("authorization")) !== null && _a !== void 0 ? _a : undefined,
+ api_key: (_b = headers.get("x-goog-api-key")) !== null && _b !== void 0 ? _b : undefined,
+ default_headers: Object.keys(defaultHeaders).length
+ ? defaultHeaders
+ : undefined,
+ };
+ return hasSecurityValue(security) ? security : undefined;
+}
+function applyDefaultHeaders(target, source) {
+ if (!source) {
+ return;
+ }
+ for (const [key, value] of new Headers(source)) {
+ if (target.get(key) === null) {
+ target.set(key, value);
+ }
+ }
+}
+function applyUserProject(hookCtx, headers) {
+ if (hookCtx.options.user_project !== undefined &&
+ headers.get("x-goog-user-project") === null) {
+ headers.set("x-goog-user-project", hookCtx.options.user_project);
+ }
+}
+function applyAuth(headers, security) {
+ if (!security) {
+ return;
+ }
+ if (security.api_key) {
+ headers.set("x-goog-api-key", security.api_key);
+ return;
+ }
+ if (security.access_token) {
+ headers.set("Authorization", bearer(security.access_token));
+ }
+}
+function hasAuthHeaders(headers) {
+ return (headers.get("authorization") !== null ||
+ headers.get("x-goog-api-key") !== null);
+}
+function bearer(token) {
+ return token.slice(0, 7).toLowerCase() === "bearer "
+ ? token
+ : `Bearer ${token}`;
+}
+function isSecurity(value) {
+ return typeof value === "object" && value !== null;
+}
+function isSecurityResolver(value) {
+ return (typeof value === "object" &&
+ value !== null &&
+ "resolveGoogleGenAISecurity" in value &&
+ typeof value.resolveGoogleGenAISecurity === "function");
+}
+function hasSecurityValue(security) {
+ return (security.api_key !== undefined ||
+ security.access_token !== undefined ||
+ security.default_headers !== undefined);
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+/**
+ * Base class for all HTTP errors.
+ */
+class HTTPClientError extends Error {
+ constructor(message, opts) {
+ let msg = message;
+ if (opts === null || opts === void 0 ? void 0 : opts.cause) {
+ msg += `: ${opts.cause}`;
+ }
+ super(msg, opts);
+ this.name = "HTTPClientError";
+ // In older runtimes, the cause field would not have been assigned through
+ // the super() call.
+ if (typeof this.cause === "undefined") {
+ this.cause = opts === null || opts === void 0 ? void 0 : opts.cause;
+ }
+ }
+}
+/**
+ * An error to capture unrecognised or unexpected errors when making HTTP calls.
+ */
+class UnexpectedClientError extends HTTPClientError {
+ constructor() {
+ super(...arguments);
+ this.name = "UnexpectedClientError";
+ }
+}
+/**
+ * An error that is raised when any inputs used to create a request are invalid.
+ */
+class InvalidRequestError extends HTTPClientError {
+ constructor() {
+ super(...arguments);
+ this.name = "InvalidRequestError";
+ }
+}
+/**
+ * An error that is raised when a HTTP request was aborted by the client error.
+ */
+class RequestAbortedError extends HTTPClientError {
+ constructor() {
+ super(...arguments);
+ this.name = "RequestAbortedError";
+ }
+}
+/**
+ * An error that is raised when a HTTP request timed out due to an AbortSignal
+ * signal timeout.
+ */
+class RequestTimeoutError extends HTTPClientError {
+ constructor() {
+ super(...arguments);
+ this.name = "RequestTimeoutError";
+ }
+}
+/**
+ * An error that is raised when a HTTP client is unable to make a request to
+ * a server.
+ */
+class ConnectionError extends HTTPClientError {
+ constructor() {
+ super(...arguments);
+ this.name = "ConnectionError";
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+/** The base class for all HTTP error responses */
+class GoogleGenAiError extends Error {
+ constructor(message, httpMeta) {
+ var _a, _b, _c, _d;
+ super(message);
+ this.statusCode = (_a = httpMeta === null || httpMeta === void 0 ? void 0 : httpMeta.response) === null || _a === void 0 ? void 0 : _a.status;
+ this.body = (_b = httpMeta === null || httpMeta === void 0 ? void 0 : httpMeta.body) !== null && _b !== void 0 ? _b : "";
+ this.headers = (_c = httpMeta === null || httpMeta === void 0 ? void 0 : httpMeta.response) === null || _c === void 0 ? void 0 : _c.headers;
+ this.contentType = ((_d = httpMeta === null || httpMeta === void 0 ? void 0 : httpMeta.response) === null || _d === void 0 ? void 0 : _d.headers.get("content-type")) || "";
+ this.rawResponse = httpMeta === null || httpMeta === void 0 ? void 0 : httpMeta.response;
+ this.name = "GoogleGenAiError";
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+class GeminiNextGenAPIClientError extends Error {
+}
+/** General errors raised by the GenAI API. */
+class APIError extends GeminiNextGenAPIClientError {
+ constructor(status, error, message, headers) {
+ super(APIError.makeMessage(status, error, message));
+ this.status = status;
+ this.headers = headers;
+ this.error = error;
+ this.statusCode = status;
+ this.body = stringifyErrorBody(error);
+ this.contentType = (headers === null || headers === void 0 ? void 0 : headers.get("content-type")) || "";
+ this.rawResponse = undefined;
+ this.cause = undefined;
+ this.name = this.constructor.name;
+ Object.setPrototypeOf(this, new.target.prototype);
+ }
+ static makeMessage(status, error, message) {
+ var _a;
+ const errorMessage = error && isPlainObject$2(error) && typeof error["message"] === "string"
+ ? error["message"]
+ : undefined;
+ const errorBody = stringifyErrorBody(error);
+ const msg = (_a = errorMessage !== null && errorMessage !== void 0 ? errorMessage : message) !== null && _a !== void 0 ? _a : (errorBody || "An error occurred");
+ const statusText = status ? `${status} ` : "";
+ return `${statusText}${msg}`;
+ }
+ static generate(status, errorResponse, message, headers) {
+ if (!status || !headers) {
+ return new APIConnectionError({
+ message,
+ cause: errorResponse instanceof Error ? errorResponse : undefined,
+ });
+ }
+ if (status === 400) {
+ return new BadRequestError(status, errorResponse, message, headers);
+ }
+ if (status === 401) {
+ return new AuthenticationError(status, errorResponse, message, headers);
+ }
+ if (status === 403) {
+ return new PermissionDeniedError(status, errorResponse, message, headers);
+ }
+ if (status === 404) {
+ return new NotFoundError(status, errorResponse, message, headers);
+ }
+ if (status === 409) {
+ return new ConflictError(status, errorResponse, message, headers);
+ }
+ if (status === 422) {
+ return new UnprocessableEntityError(status, errorResponse, message, headers);
+ }
+ if (status === 429) {
+ return new RateLimitError(status, errorResponse, message, headers);
+ }
+ if (status >= 500) {
+ return new InternalServerError(status, errorResponse, message, headers);
+ }
+ return new APIError(status, errorResponse, message, headers);
+ }
+}
+class APIUserAbortError extends APIError {
+ constructor({ message } = {}) {
+ super(undefined, undefined, message || "Request was aborted.", undefined);
+ }
+}
+class APIConnectionError extends APIError {
+ constructor({ message, cause, }) {
+ super(undefined, undefined, message || "Connection error.", undefined);
+ this.cause = cause;
+ }
+}
+class APIConnectionTimeoutError extends APIConnectionError {
+ constructor({ message } = {}) {
+ super({
+ message: message ||
+ "Request timed out. This is a client-side timeout. You can increase the timeout by setting the `timeout` argument in your request or client http options.",
+ });
+ }
+}
+class BadRequestError extends APIError {
+}
+class AuthenticationError extends APIError {
+}
+class PermissionDeniedError extends APIError {
+}
+class NotFoundError extends APIError {
+}
+class ConflictError extends APIError {
+}
+class UnprocessableEntityError extends APIError {
+}
+class RateLimitError extends APIError {
+}
+class InternalServerError extends APIError {
+}
+function wrapSDKError(error) {
+ if (isCompatAPIErrorInstance(error)) {
+ return error;
+ }
+ if (error instanceof GoogleGenAiError) {
+ return wrapAPIError(error);
+ }
+ if (error instanceof HTTPClientError) {
+ return wrapHTTPClientError(error);
+ }
+ return error;
+}
+function wrapAPIError(error) {
+ const errorPayload = getErrorPayload(error);
+ const wrapped = APIError.generate(error.statusCode, errorPayload, error.message, error.headers);
+ defineReadonly(wrapped, "body", error.body);
+ defineReadonly(wrapped, "contentType", error.contentType);
+ defineReadonly(wrapped, "rawResponse", error.rawResponse);
+ defineReadonly(wrapped, "statusCode", error.statusCode);
+ defineReadonly(wrapped, "cause", error);
+ return wrapped;
+}
+function wrapHTTPClientError(error) {
+ if (error instanceof RequestTimeoutError) {
+ return new APIConnectionTimeoutError({ message: error.message });
+ }
+ if (error instanceof RequestAbortedError) {
+ return new APIUserAbortError({ message: error.message });
+ }
+ if (error instanceof ConnectionError) {
+ return new APIConnectionError({ message: error.message, cause: error });
+ }
+ return new APIConnectionError({ message: error.message, cause: error });
+}
+function getErrorPayload(error) {
+ const data = getObjectProperty(error, "data$");
+ if (data && typeof data === "object") {
+ return data;
+ }
+ try {
+ const parsed = JSON.parse(error.body);
+ if (parsed && typeof parsed === "object") {
+ return parsed;
+ }
+ }
+ catch (_a) {
+ // Fall through to generated error.error below.
+ }
+ const dataError = getObjectProperty(error, "error");
+ return dataError && typeof dataError === "object"
+ ? dataError
+ : undefined;
+}
+function getObjectProperty(value, key) {
+ return value && typeof value === "object"
+ ? value[key]
+ : undefined;
+}
+function stringifyErrorBody(error) {
+ if (!error)
+ return "";
+ try {
+ return JSON.stringify(error);
+ }
+ catch (_a) {
+ return String(error);
+ }
+}
+function isPlainObject$2(value) {
+ return value !== null && typeof value === "object" && !Array.isArray(value);
+}
+function isCompatAPIErrorInstance(value) {
+ // Avoid instanceof here so this guard never depends on Symbol.hasInstance.
+ return typeof value === "object" && value !== null
+ ? APIError.prototype.isPrototypeOf(value)
+ : false;
+}
+function defineReadonly(target, key, value) {
+ Object.defineProperty(target, key, {
+ configurable: true,
+ enumerable: true,
+ value,
+ writable: false,
+ });
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * This file is only ever generated once on the first generation and then is free to be modified.
+ * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them
+ * in this file or in separate files in the hooks folder.
+ */
+function initHooks(hooks) {
+ // Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook
+ // with an instance of a hook that implements that specific Hook interface
+ // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
+ const googleGenAIAuthHook = new GoogleGenAIAuthHook();
+ hooks.registerBeforeCreateRequestHook(googleGenAIAuthHook);
+ hooks.registerBeforeRequestHook(googleGenAIAuthHook);
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+class SDKHooks {
+ constructor() {
+ this.sdkInitHooks = [];
+ this.beforeCreateRequestHooks = [];
+ this.beforeRequestHooks = [];
+ this.afterSuccessHooks = [];
+ this.afterErrorHooks = [];
+ const presetHooks = [];
+ for (const hook of presetHooks) {
+ if ("sdkInit" in hook) {
+ this.registerSDKInitHook(hook);
+ }
+ if ("beforeCreateRequest" in hook) {
+ this.registerBeforeCreateRequestHook(hook);
+ }
+ if ("beforeRequest" in hook) {
+ this.registerBeforeRequestHook(hook);
+ }
+ if ("afterSuccess" in hook) {
+ this.registerAfterSuccessHook(hook);
+ }
+ if ("afterError" in hook) {
+ this.registerAfterErrorHook(hook);
+ }
+ }
+ initHooks(this);
+ }
+ registerSDKInitHook(hook) {
+ this.sdkInitHooks.push(hook);
+ }
+ registerBeforeCreateRequestHook(hook) {
+ this.beforeCreateRequestHooks.push(hook);
+ }
+ registerBeforeRequestHook(hook) {
+ this.beforeRequestHooks.push(hook);
+ }
+ registerAfterSuccessHook(hook) {
+ this.afterSuccessHooks.push(hook);
+ }
+ registerAfterErrorHook(hook) {
+ this.afterErrorHooks.push(hook);
+ }
+ sdkInit(opts) {
+ return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts);
+ }
+ beforeCreateRequest(hookCtx, input) {
+ let inp = input;
+ for (const hook of this.beforeCreateRequestHooks) {
+ inp = hook.beforeCreateRequest(hookCtx, inp);
+ }
+ return inp;
+ }
+ async beforeRequest(hookCtx, request) {
+ let req = request;
+ for (const hook of this.beforeRequestHooks) {
+ req = await hook.beforeRequest(hookCtx, req);
+ }
+ return req;
+ }
+ async afterSuccess(hookCtx, response) {
+ let res = response;
+ for (const hook of this.afterSuccessHooks) {
+ res = await hook.afterSuccess(hookCtx, res);
+ }
+ return res;
+ }
+ async afterError(hookCtx, response, error) {
+ let res = response;
+ let err = error;
+ for (const hook of this.afterErrorHooks) {
+ const result = await hook.afterError(hookCtx, res, err);
+ res = result.response;
+ err = result.error;
+ }
+ return { response: res, error: err };
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+function OK(value) {
+ return { ok: true, value };
+}
+function ERR(error) {
+ return { ok: false, error };
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+function bytesToBase64(u8arr) {
+ return btoa(String.fromCodePoint(...u8arr));
+}
+function stringToBytes(str) {
+ return new TextEncoder().encode(str);
+}
+function stringToBase64(str) {
+ return bytesToBase64(stringToBytes(str));
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+const hasOwn = Object.prototype.hasOwnProperty;
+function pathToFunc(pathPattern, options) {
+ const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
+ return function buildURLPath(params = {}) {
+ return pathPattern
+ .replace(paramRE, function (_, placeholder) {
+ if (!hasOwn.call(params, placeholder)) {
+ throw new Error(`Parameter '${placeholder}' is required`);
+ }
+ const value = params[placeholder];
+ if (typeof value !== "string" && typeof value !== "number") {
+ throw new Error(`Parameter '${placeholder}' must be a string or number`);
+ }
+ return `${value}`;
+ })
+ .replace(/^\/+/, "");
+ };
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Contains the list of servers available to the SDK
+ */
+const ServerList = [
+ /**
+ * Global Endpoint
+ */
+ "https://generativelanguage.googleapis.com",
+];
+function serverURLFromOptions(options) {
+ var _a;
+ let serverURL = options.server_url;
+ const params = {};
+ if (!serverURL) {
+ const serverIdx = (_a = options.server_idx) !== null && _a !== void 0 ? _a : 0;
+ if (serverIdx < 0 || serverIdx >= ServerList.length) {
+ throw new Error(`Invalid server index ${serverIdx}`);
+ }
+ serverURL = ServerList[serverIdx] || "";
+ }
+ const u = pathToFunc(serverURL)(params);
+ return new URL(u);
+}
+const SDK_METADATA = {
+ userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 internal v1beta @google/genai",
+};
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+function combineSignals(...signals) {
+ const filtered = [];
+ for (const signal of signals) {
+ if (signal) {
+ filtered.push(signal);
+ }
+ }
+ switch (filtered.length) {
+ case 0:
+ case 1:
+ return filtered[0] || null;
+ default:
+ if ("any" in AbortSignal && typeof AbortSignal.any === "function") {
+ return AbortSignal.any(filtered);
+ }
+ return abortSignalAny(filtered);
+ }
+}
+function abortSignalAny(signals) {
+ const controller = new AbortController();
+ const result = controller.signal;
+ if (!signals.length) {
+ return controller.signal;
+ }
+ if (signals.length === 1) {
+ return signals[0] || controller.signal;
+ }
+ for (const signal of signals) {
+ if (signal.aborted) {
+ return signal;
+ }
+ }
+ function abort() {
+ controller.abort(this.reason);
+ clean();
+ }
+ const signalRefs = [];
+ function clean() {
+ for (const signalRef of signalRefs) {
+ const signal = signalRef.deref();
+ if (signal) {
+ signal.removeEventListener("abort", abort);
+ }
+ }
+ }
+ for (const signal of signals) {
+ signalRefs.push(new WeakRef(signal));
+ signal.addEventListener("abort", abort);
+ }
+ return result;
+}
+function compactMap(values) {
+ const out = {};
+ for (const [k, v] of Object.entries(values)) {
+ if (typeof v !== "undefined") {
+ out[k] = v;
+ }
+ }
+ return out;
+}
+function isPlainObject$1(value) {
+ if (value === null || typeof value !== "object")
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null || proto === Object.prototype)
+ return true;
+ // cross-realm plain objects (vm contexts, iframes) inherit from a
+ // different realm's Object.prototype, which itself has a null prototype
+ try {
+ return Object.getPrototypeOf(proto) === null;
+ }
+ catch (_a) {
+ return false;
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+function formEncoder(sep) {
+ return (key, value, options) => {
+ let out = "";
+ const pairs = (options === null || options === void 0 ? void 0 : options.explode)
+ ? explode(key, value)
+ : [[key, value]];
+ if (pairs.every(([_, v]) => v == null)) {
+ return;
+ }
+ const encodeString = (v) => {
+ return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v) : v;
+ };
+ const encodeValue = (v) => encodeString(serializeValue(v));
+ const encodedSep = encodeString(sep);
+ pairs.forEach(([pk, pv]) => {
+ var _a, _b;
+ let tmp = "";
+ let encValue = null;
+ if (pv == null) {
+ return;
+ }
+ else if (Array.isArray(pv)) {
+ encValue = (_a = mapDefined(pv, (v) => `${encodeValue(v)}`)) === null || _a === void 0 ? void 0 : _a.join(encodedSep);
+ }
+ else if (isPlainObject$1(pv)) {
+ encValue = (_b = mapDefinedEntries(Object.entries(pv), ([k, v]) => {
+ return `${encodeString(k)}${encodedSep}${encodeValue(v)}`;
+ })) === null || _b === void 0 ? void 0 : _b.join(encodedSep);
+ }
+ else {
+ encValue = `${encodeValue(pv)}`;
+ }
+ if (encValue == null) {
+ return;
+ }
+ tmp = `${encodeString(pk)}=${encValue}`;
+ // If we end up with the nothing then skip forward
+ if (!tmp || tmp === "=") {
+ return;
+ }
+ out += `&${tmp}`;
+ });
+ return out.slice(1);
+ };
+}
+const encodeForm = formEncoder(",");
+function encodeJSON(key, value, options) {
+ if (typeof value === "undefined") {
+ return;
+ }
+ const encodeString = (v) => {
+ return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v) : v;
+ };
+ const encVal = encodeString(JSON.stringify(value, jsonReplacer));
+ return (options === null || options === void 0 ? void 0 : options.explode) ? encVal : `${encodeString(key)}=${encVal}`;
+}
+const encodeSimple = (key, value, options) => {
+ let out = "";
+ const pairs = (options === null || options === void 0 ? void 0 : options.explode)
+ ? explode(key, value)
+ : [[key, value]];
+ if (pairs.every(([_, v]) => v == null)) {
+ return;
+ }
+ const encodeString = (v) => {
+ return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v) : v;
+ };
+ const encodeValue = (v) => encodeString(serializeValue(v));
+ pairs.forEach(([pk, pv]) => {
+ var _a;
+ let tmp = "";
+ if (pv == null) {
+ return;
+ }
+ else if (Array.isArray(pv)) {
+ tmp = (_a = mapDefined(pv, (v) => `${encodeValue(v)}`)) === null || _a === void 0 ? void 0 : _a.join(",");
+ }
+ else if (isPlainObject$1(pv)) {
+ const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => {
+ return `,${encodeString(k)},${encodeValue(v)}`;
+ });
+ tmp = mapped === null || mapped === void 0 ? void 0 : mapped.join("").slice(1);
+ }
+ else {
+ const k = (options === null || options === void 0 ? void 0 : options.explode) && isPlainObject$1(value) ? `${pk}=` : "";
+ tmp = `${k}${encodeValue(pv)}`;
+ }
+ out += tmp ? `,${tmp}` : "";
+ });
+ return out.slice(1);
+};
+function explode(key, value) {
+ if (Array.isArray(value)) {
+ return value.map((v) => [key, v]);
+ }
+ else if (isPlainObject$1(value)) {
+ const o = value !== null && value !== void 0 ? value : {};
+ return Object.entries(o).map(([k, v]) => [k, v]);
+ }
+ else {
+ return [[key, value]];
+ }
+}
+function serializeValue(value) {
+ if (value == null) {
+ return "";
+ }
+ else if (value instanceof Date) {
+ return value.toISOString();
+ }
+ else if (value instanceof Uint8Array) {
+ return bytesToBase64(value);
+ }
+ else if (typeof value === "object") {
+ return JSON.stringify(value, jsonReplacer);
+ }
+ return `${value}`;
+}
+function jsonReplacer(_, value) {
+ if (value instanceof Uint8Array) {
+ return bytesToBase64(value);
+ }
+ else {
+ return value;
+ }
+}
+function mapDefined(inp, mapper) {
+ const res = inp.reduce((acc, v) => {
+ if (v == null) {
+ return acc;
+ }
+ const m = mapper(v);
+ if (m == null) {
+ return acc;
+ }
+ acc.push(m);
+ return acc;
+ }, []);
+ return res.length ? res : null;
+}
+function mapDefinedEntries(inp, mapper) {
+ const acc = [];
+ for (const [k, v] of inp) {
+ if (v == null) {
+ continue;
+ }
+ const m = mapper([k, v]);
+ if (m == null) {
+ continue;
+ }
+ acc.push(m);
+ }
+ return acc.length ? acc : null;
+}
+function queryJoin(...args) {
+ return args.filter(Boolean).join("&");
+}
+function queryEncoder(f) {
+ const bulkEncode = function (values, options) {
+ var _a, _b, _c;
+ const opts = Object.assign(Object.assign({}, options), { explode: (_a = options === null || options === void 0 ? void 0 : options.explode) !== null && _a !== void 0 ? _a : true, charEncoding: (_b = options === null || options === void 0 ? void 0 : options.charEncoding) !== null && _b !== void 0 ? _b : "percent" });
+ const allowEmptySet = new Set((_c = options === null || options === void 0 ? void 0 : options.allowEmptyValue) !== null && _c !== void 0 ? _c : []);
+ const encoded = Object.entries(values).map(([key, value]) => {
+ if (allowEmptySet.has(key)) {
+ if (value === undefined
+ || value === null
+ || value === ""
+ || (Array.isArray(value) && value.length === 0)) {
+ return `${encodeURIComponent(key)}=`;
+ }
+ }
+ return f(key, value, opts);
+ });
+ return queryJoin(...encoded);
+ };
+ return bulkEncode;
+}
+const encodeFormQuery = queryEncoder(encodeForm);
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+const DEFAULT_FETCHER = (input, init) => {
+ // If input is a Request and init is undefined, Bun will discard the method,
+ // headers, body and other options that were set on the request object.
+ // Node.js and browers would ignore an undefined init value. This check is
+ // therefore needed for interop with Bun.
+ if (init == null) {
+ return fetch(input);
+ }
+ else {
+ return fetch(input, init);
+ }
+};
+class HTTPClient {
+ constructor(options = {}) {
+ this.requestHooks = [];
+ this.requestErrorHooks = [];
+ this.responseHooks = [];
+ this.options = options;
+ this.fetcher = options.fetcher || DEFAULT_FETCHER;
+ }
+ async request(request) {
+ let req = request;
+ for (const hook of this.requestHooks) {
+ const nextRequest = await hook(req);
+ if (nextRequest) {
+ req = nextRequest;
+ }
+ }
+ try {
+ const res = await this.fetcher(req);
+ for (const hook of this.responseHooks) {
+ await hook(res, req);
+ }
+ return res;
+ }
+ catch (err) {
+ for (const hook of this.requestErrorHooks) {
+ await hook(err, req);
+ }
+ throw err;
+ }
+ }
+ addHook(...args) {
+ if (args[0] === "beforeRequest") {
+ this.requestHooks.push(args[1]);
+ }
+ else if (args[0] === "requestError") {
+ this.requestErrorHooks.push(args[1]);
+ }
+ else if (args[0] === "response") {
+ this.responseHooks.push(args[1]);
+ }
+ else {
+ throw new Error(`Invalid hook type: ${args[0]}`);
+ }
+ return this;
+ }
+ removeHook(...args) {
+ let target;
+ if (args[0] === "beforeRequest") {
+ target = this.requestHooks;
+ }
+ else if (args[0] === "requestError") {
+ target = this.requestErrorHooks;
+ }
+ else if (args[0] === "response") {
+ target = this.responseHooks;
+ }
+ else {
+ throw new Error(`Invalid hook type: ${args[0]}`);
+ }
+ const index = target.findIndex((v) => v === args[1]);
+ if (index >= 0) {
+ target.splice(index, 1);
+ }
+ return this;
+ }
+ clone() {
+ const child = new HTTPClient(this.options);
+ child.requestHooks = this.requestHooks.slice();
+ child.requestErrorHooks = this.requestErrorHooks.slice();
+ child.responseHooks = this.responseHooks.slice();
+ return child;
+ }
+}
+// A semicolon surrounded by optional whitespace characters is used to separate
+// segments in a media type string.
+const mediaParamSeparator = /\s*;\s*/g;
+function matchContentType(response, pattern) {
+ var _a;
+ // `*` is a special case which means anything is acceptable.
+ if (pattern === "*") {
+ return true;
+ }
+ let contentType = ((_a = response.headers.get("content-type")) === null || _a === void 0 ? void 0 : _a.trim()) || "application/octet-stream";
+ contentType = contentType.toLowerCase();
+ const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator);
+ const [wantType = "", ...wantParams] = wantParts;
+ if (wantType.split("/").length !== 2) {
+ return false;
+ }
+ const gotParts = contentType.split(mediaParamSeparator);
+ const [gotType = "", ...gotParams] = gotParts;
+ const [type = "", subtype = ""] = gotType.split("/");
+ if (!type || !subtype) {
+ return false;
+ }
+ if (wantType !== "*/*" &&
+ gotType !== wantType &&
+ `${type}/*` !== wantType &&
+ `*/${subtype}` !== wantType) {
+ return false;
+ }
+ if (gotParams.length < wantParams.length) {
+ return false;
+ }
+ const params = new Set(gotParams);
+ for (const wantParam of wantParams) {
+ if (!params.has(wantParam)) {
+ return false;
+ }
+ }
+ return true;
+}
+const codeRangeRE$1 = new RegExp("^[0-9]xx$", "i");
+function matchStatusCode(response, codes) {
+ const actual = `${response.status}`;
+ const expectedCodes = Array.isArray(codes) ? codes : [codes];
+ if (!expectedCodes.length) {
+ return false;
+ }
+ return expectedCodes.some((ec) => {
+ const code = `${ec}`;
+ if (code === "default") {
+ return true;
+ }
+ if (!codeRangeRE$1.test(`${code}`)) {
+ return code === actual;
+ }
+ const expectFamily = code.charAt(0);
+ if (!expectFamily) {
+ throw new Error("Invalid status code range");
+ }
+ const actualFamily = actual.charAt(0);
+ if (!actualFamily) {
+ throw new Error(`Invalid response status code: ${actual}`);
+ }
+ return actualFamily === expectFamily;
+ });
+}
+function matchResponse(response, code, contentTypePattern) {
+ return (matchStatusCode(response, code) &&
+ matchContentType(response, contentTypePattern));
+}
+/**
+ * Uses various heurisitics to determine if an error is a connection error.
+ */
+function isConnectionError(err) {
+ if (typeof err !== "object" || err == null) {
+ return false;
+ }
+ // Covers fetch in Deno as well
+ const isBrowserErr = err instanceof TypeError &&
+ err.message.toLowerCase().startsWith("failed to fetch");
+ const isNodeErr = err instanceof TypeError &&
+ err.message.toLowerCase().startsWith("fetch failed");
+ const isBunErr = "name" in err && err.name === "ConnectionError";
+ const isGenericErr = "code" in err &&
+ typeof err.code === "string" &&
+ err.code.toLowerCase() === "econnreset";
+ return isBrowserErr || isNodeErr || isGenericErr || isBunErr;
+}
+/**
+ * Uses various heurisitics to determine if an error is a timeout error.
+ */
+function isTimeoutError(err) {
+ if (typeof err !== "object" || err == null) {
+ return false;
+ }
+ // Fetch in browser, Node.js, Bun, Deno
+ const isNative = "name" in err && err.name === "TimeoutError";
+ const isLegacyNative = "code" in err && err.code === 23;
+ // Node.js HTTP client and Axios
+ const isGenericErr = "code" in err &&
+ typeof err.code === "string" &&
+ err.code.toLowerCase() === "econnaborted";
+ return isNative || isLegacyNative || isGenericErr;
+}
+/**
+ * Uses various heurisitics to determine if an error is a abort error.
+ */
+function isAbortError(err) {
+ if (typeof err !== "object" || err == null) {
+ return false;
+ }
+ // Fetch in browser, Node.js, Bun, Deno
+ const isNative = "name" in err && err.name === "AbortError";
+ const isLegacyNative = "code" in err && err.code === 20;
+ // Node.js HTTP client and Axios
+ const isGenericErr = "code" in err &&
+ typeof err.code === "string" &&
+ err.code.toLowerCase() === "econnaborted";
+ return isNative || isLegacyNative || isGenericErr;
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+const defaultBackoff = {
+ initialInterval: 500,
+ maxInterval: 60000,
+ exponent: 1.5,
+ maxElapsedTime: 3600000,
+};
+/**
+ * PermanentError is an error that is not recoverable. Throwing this error will
+ * cause a retry loop to terminate.
+ */
+class PermanentError extends Error {
+ constructor(message, options) {
+ let msg = message;
+ if (options === null || options === void 0 ? void 0 : options.cause) {
+ msg += `: ${options.cause}`;
+ }
+ super(msg, options);
+ this.name = "PermanentError";
+ // In older runtimes, the cause field would not have been assigned through
+ // the super() call.
+ if (typeof this.cause === "undefined") {
+ this.cause = options === null || options === void 0 ? void 0 : options.cause;
+ }
+ Object.setPrototypeOf(this, PermanentError.prototype);
+ }
+}
+/**
+ * TemporaryError is an error is used to signal that an HTTP request can be
+ * retried as part of a retry loop. If retry attempts are exhausted and this
+ * error is thrown, the response will be returned to the caller.
+ */
+class TemporaryError extends Error {
+ constructor(message, response) {
+ super(message);
+ this.response = response;
+ this.name = "TemporaryError";
+ Object.setPrototypeOf(this, TemporaryError.prototype);
+ }
+}
+async function retry(fetchFn, options) {
+ var _a;
+ switch (options.config.strategy) {
+ case "backoff":
+ return retryBackoff(wrapFetcher(fetchFn, {
+ statusCodes: options.statusCodes,
+ retryConnectionErrors: !!options.config.retryConnectionErrors,
+ }), (_a = options.config.backoff) !== null && _a !== void 0 ? _a : defaultBackoff);
+ case "attempt-count-backoff":
+ return retryAttemptCountBackoff(wrapFetcher(fetchFn, {
+ statusCodes: options.statusCodes,
+ retryConnectionErrors: !!options.config.retryConnectionErrors,
+ }), Object.assign(Object.assign({}, defaultBackoff), options.config.backoff), options.config);
+ default:
+ return await fetchFn(0);
+ }
+}
+function wrapFetcher(fn, options) {
+ return async (attempt) => {
+ try {
+ const res = await fn(attempt);
+ if (isRetryableResponse(res, options.statusCodes)) {
+ throw new TemporaryError("Response failed with retryable status code", res);
+ }
+ return res;
+ }
+ catch (err) {
+ if (err instanceof TemporaryError) {
+ throw err;
+ }
+ if (options.retryConnectionErrors &&
+ (isTimeoutError(err) || isConnectionError(err))) {
+ throw err;
+ }
+ throw new PermanentError("Permanent error", { cause: err });
+ }
+ };
+}
+const codeRangeRE = new RegExp("^[0-9]xx$", "i");
+function isRetryableResponse(res, statusCodes) {
+ const actual = `${res.status}`;
+ return statusCodes.some((code) => {
+ if (!codeRangeRE.test(code)) {
+ return code === actual;
+ }
+ const expectFamily = code.charAt(0);
+ if (!expectFamily) {
+ throw new Error("Invalid status code range");
+ }
+ const actualFamily = actual.charAt(0);
+ if (!actualFamily) {
+ throw new Error(`Invalid response status code: ${actual}`);
+ }
+ return actualFamily === expectFamily;
+ });
+}
+async function retryBackoff(fn, strategy) {
+ const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy;
+ const start = Date.now();
+ let x = 0;
+ while (true) {
+ try {
+ const res = await fn(x);
+ return res;
+ }
+ catch (err) {
+ if (err instanceof PermanentError) {
+ throw err.cause;
+ }
+ const elapsed = Date.now() - start;
+ if (elapsed > maxElapsedTime) {
+ if (err instanceof TemporaryError) {
+ return err.response;
+ }
+ throw err;
+ }
+ let retryInterval = 0;
+ if (err instanceof TemporaryError) {
+ retryInterval = retryIntervalFromResponse(err.response);
+ }
+ if (retryInterval <= 0) {
+ retryInterval =
+ initialInterval * Math.pow(x, exponent) + Math.random() * 1000;
+ }
+ const d = Math.min(retryInterval, maxInterval);
+ await delay(d);
+ x++;
+ }
+ }
+}
+async function retryAttemptCountBackoff(fn, strategy, config) {
+ let attempt = 0;
+ while (true) {
+ try {
+ return await fn(attempt);
+ }
+ catch (err) {
+ if (err instanceof PermanentError) {
+ throw err.cause;
+ }
+ if (attempt >= config.maxRetries) {
+ if (err instanceof TemporaryError) {
+ return err.response;
+ }
+ throw err;
+ }
+ let retryInterval = 0;
+ if (err instanceof TemporaryError) {
+ retryInterval = retryIntervalFromResponse(err.response);
+ }
+ if (retryInterval <= 0) {
+ retryInterval =
+ strategy.initialInterval *
+ Math.pow(strategy.exponent, attempt) *
+ (1 - Math.random() * 0.25);
+ }
+ const d = Math.min(retryInterval, strategy.maxInterval);
+ await delay(d);
+ attempt++;
+ }
+ }
+}
+function retryIntervalFromResponse(res) {
+ const retryAfterMsVal = res.headers.get("retry-after-ms");
+ if (retryAfterMsVal) {
+ const parsedMs = Number(retryAfterMsVal);
+ if (Number.isFinite(parsedMs) && parsedMs >= 0) {
+ return parsedMs;
+ }
+ }
+ const retryVal = res.headers.get("retry-after") || "";
+ if (!retryVal) {
+ return 0;
+ }
+ const parsedNumber = Number(retryVal);
+ if (Number.isInteger(parsedNumber)) {
+ return parsedNumber * 1000;
+ }
+ const parsedDate = Date.parse(retryVal);
+ if (Number.isInteger(parsedDate)) {
+ const deltaMS = parsedDate - Date.now();
+ return deltaMS > 0 ? Math.ceil(deltaMS) : 0;
+ }
+ return 0;
+}
+async function delay(delay) {
+ return new Promise((resolve) => setTimeout(resolve, delay));
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+const gt = typeof globalThis === "undefined" ? null : globalThis;
+const webWorkerLike = typeof gt === "object"
+ && gt != null
+ && "importScripts" in gt
+ && typeof gt["importScripts"] === "function";
+const isBrowserLike = webWorkerLike
+ || (typeof navigator !== "undefined" && "serviceWorker" in navigator)
+ || (typeof window === "object" && typeof window.document !== "undefined");
+class ClientSDK {
+ constructor(options = {}) {
+ const opt = options;
+ if (typeof opt === "object"
+ && opt != null
+ && "hooks" in opt
+ && opt.hooks instanceof SDKHooks) {
+ this._hooks = opt.hooks;
+ }
+ else {
+ this._hooks = new SDKHooks();
+ }
+ const defaultHttpClient = new HTTPClient();
+ options.http_client = options.http_client || defaultHttpClient;
+ options = this._hooks.sdkInit(options);
+ const url = serverURLFromOptions(options);
+ if (url) {
+ url.pathname = url.pathname.replace(/\/+$/, "") + "/";
+ }
+ this._baseURL = url;
+ this._httpClient = options.http_client || defaultHttpClient;
+ this._options = Object.assign(Object.assign({}, fillGlobals(options)), { hooks: this._hooks });
+ this._logger = this._options.debug_logger;
+ if (!this._logger && env().GOOGLE_GENAI_DEBUG) {
+ this._logger = console;
+ }
+ }
+ _createRequest(context, conf, options) {
+ var _a, _b, _c, _d, _e;
+ const { method, path, query, headers: opHeaders, security } = conf;
+ const base = (_a = conf.baseURL) !== null && _a !== void 0 ? _a : this._baseURL;
+ if (!base) {
+ return ERR(new InvalidRequestError("No base URL provided for operation"));
+ }
+ const baseURL = new URL(base);
+ let reqURL;
+ if (path) {
+ baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
+ reqURL = new URL(path, baseURL);
+ if (!reqURL.search && baseURL.search) {
+ reqURL.search = baseURL.search;
+ }
+ }
+ else {
+ reqURL = baseURL;
+ }
+ reqURL.hash = "";
+ // Appends already-encoded query pairs to a query string, replacing any
+ // existing pairs with the same key so later sources take precedence.
+ const mergeQuery = (current, additions) => {
+ if (!additions) {
+ return current;
+ }
+ const additionKeys = new Set(additions
+ .split("&")
+ .filter((pair) => pair !== "")
+ .map((pair) => { var _a; return (_a = pair.split("=")[0]) !== null && _a !== void 0 ? _a : ""; }));
+ const kept = current.split("&").filter((pair) => {
+ var _a;
+ return pair !== "" && !additionKeys.has((_a = pair.split("=")[0]) !== null && _a !== void 0 ? _a : "");
+ });
+ return [...kept, additions].join("&");
+ };
+ const encodeQueryRecord = (record) => {
+ return Object.entries(record)
+ .map(([k, v]) => {
+ if (v == null) {
+ return undefined;
+ }
+ const value = isPlainObject$1(v) ? JSON.stringify(v) : v;
+ return encodeForm(k, value, {
+ explode: Array.isArray(value),
+ charEncoding: "percent",
+ });
+ })
+ .filter((pair) => typeof pair !== "undefined")
+ .join("&");
+ };
+ const finalQuery = [
+ query || "",
+ encodeQueryRecord((options === null || options === void 0 ? void 0 : options.extra_query) || {}),
+ encodeQueryRecord((security === null || security === void 0 ? void 0 : security.queryParams) || {}),
+ ].reduce(mergeQuery, reqURL.search.slice(1));
+ if (finalQuery) {
+ reqURL.search = `?${finalQuery}`;
+ }
+ const headers = new Headers(opHeaders);
+ const username = security === null || security === void 0 ? void 0 : security.basic.username;
+ const password = security === null || security === void 0 ? void 0 : security.basic.password;
+ if (username != null || password != null) {
+ const encoded = stringToBase64([username || "", password || ""].join(":"));
+ headers.set("Authorization", `Basic ${encoded}`);
+ }
+ const securityHeaders = new Headers((security === null || security === void 0 ? void 0 : security.headers) || {});
+ for (const [k, v] of securityHeaders) {
+ headers.set(k, v);
+ }
+ let cookie = headers.get("cookie") || "";
+ for (const [k, v] of Object.entries((security === null || security === void 0 ? void 0 : security.cookies) || {})) {
+ cookie += `; ${k}=${v}`;
+ }
+ cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie;
+ headers.set("cookie", cookie);
+ const userHeaders = new Headers((_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : (_c = options === null || options === void 0 ? void 0 : options.fetch_options) === null || _c === void 0 ? void 0 : _c.headers);
+ for (const [k, v] of userHeaders) {
+ headers.set(k, v);
+ }
+ // Only set user agent header in non-browser-like environments since CORS
+ // policy disallows setting it in browsers e.g. Chrome throws an error.
+ if (!isBrowserLike) {
+ headers.set((_d = conf.uaHeader) !== null && _d !== void 0 ? _d : "user-agent", (_e = conf.userAgent) !== null && _e !== void 0 ? _e : SDK_METADATA.userAgent);
+ }
+ let reqBody = conf.body;
+ const extraBody = Object.fromEntries(Object.entries((options === null || options === void 0 ? void 0 : options.extra_body) || {}).filter(([, v]) => typeof v !== "undefined"));
+ if (Object.keys(extraBody).length > 0) {
+ const contentType = new Headers(opHeaders).get("content-type") || "";
+ const isJSON = /^(application|text)\/([^+]+\+)*json/.test(contentType);
+ if (!isJSON || (typeof reqBody !== "string" && reqBody != null)) {
+ return ERR(new InvalidRequestError("extra_body can only be merged into JSON object request bodies"));
+ }
+ let parsedBody;
+ try {
+ parsedBody = reqBody ? JSON.parse(reqBody) : {};
+ }
+ catch (err) {
+ return ERR(new InvalidRequestError("extra_body can only be merged into JSON object request bodies", { cause: err }));
+ }
+ if (!isPlainObject$1(parsedBody)) {
+ return ERR(new InvalidRequestError("extra_body can only be merged into JSON object request bodies"));
+ }
+ reqBody = JSON.stringify(Object.assign(Object.assign({}, parsedBody), extraBody));
+ headers.delete("content-length");
+ }
+ const fetchOptions = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.fetch_options), options);
+ if (!(fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.signal) && conf.timeout_ms != null && conf.timeout_ms > 0) {
+ context.timeout_ms = conf.timeout_ms;
+ }
+ if (conf.body instanceof ReadableStream) {
+ Object.assign(fetchOptions, { duplex: "half" });
+ }
+ let input;
+ try {
+ input = this._hooks.beforeCreateRequest(context, {
+ url: reqURL,
+ options: Object.assign(Object.assign({}, fetchOptions), { body: reqBody !== null && reqBody !== void 0 ? reqBody : null, headers,
+ method }),
+ });
+ }
+ catch (err) {
+ return ERR(new UnexpectedClientError("Create request hook failed to execute", {
+ cause: err,
+ }));
+ }
+ return OK(new Request(input.url, input.options));
+ }
+ async _do(request, options) {
+ const { context, isErrorStatusCode } = options;
+ const timeout_ms = context.timeout_ms;
+ return retry(async () => {
+ var _a;
+ const cloned = request.clone();
+ let attempt = cloned;
+ if (timeout_ms != null && timeout_ms > 0) {
+ const timeoutSignal = AbortSignal.timeout(timeout_ms);
+ const combined = (_a = combineSignals(cloned.signal, timeoutSignal)) !== null && _a !== void 0 ? _a : timeoutSignal;
+ attempt = new Request(cloned, { signal: combined });
+ }
+ const req = await this._hooks.beforeRequest(context, attempt);
+ await logRequest(this._logger, req).catch((e) => { var _a; return (_a = this._logger) === null || _a === void 0 ? void 0 : _a.log("Failed to log request:", e); });
+ let response = await this._httpClient.request(req);
+ try {
+ if (isErrorStatusCode(response.status)) {
+ const result = await this._hooks.afterError(context, response, null);
+ if (result.error) {
+ throw result.error;
+ }
+ response = result.response || response;
+ }
+ else {
+ response = await this._hooks.afterSuccess(context, response);
+ }
+ }
+ finally {
+ await logResponse(this._logger, response, req)
+ .catch(e => { var _a; return (_a = this._logger) === null || _a === void 0 ? void 0 : _a.log("Failed to log response:", e); });
+ }
+ return response;
+ }, { config: options.retryConfig, statusCodes: options.retryCodes }).then((r) => OK(r), (err) => {
+ switch (true) {
+ case isAbortError(err):
+ return ERR(new RequestAbortedError("Request aborted by client", {
+ cause: err,
+ }));
+ case isTimeoutError(err):
+ return ERR(new RequestTimeoutError("Request timed out", { cause: err }));
+ case isConnectionError(err):
+ return ERR(new ConnectionError("Unable to make request", { cause: err }));
+ default:
+ return ERR(new UnexpectedClientError("Unexpected HTTP client error", {
+ cause: err,
+ }));
+ }
+ });
+ }
+}
+const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/;
+const jsonlLikeContentTypeRE = /^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/;
+async function logRequest(logger, req) {
+ if (!logger) {
+ return;
+ }
+ const contentType = req.headers.get("content-type");
+ const ct = (contentType === null || contentType === void 0 ? void 0 : contentType.split(";")[0]) || "";
+ logger.group(`> Request: ${req.method} ${req.url}`);
+ logger.group("Headers:");
+ for (const [k, v] of req.headers.entries()) {
+ logger.log(`${k}: ${v}`);
+ }
+ logger.groupEnd();
+ logger.group("Body:");
+ switch (true) {
+ case jsonLikeContentTypeRE.test(ct):
+ logger.log(await req.clone().json());
+ break;
+ case ct.startsWith("text/"):
+ logger.log(await req.clone().text());
+ break;
+ case ct === "multipart/form-data": {
+ const body = await req.clone().formData();
+ for (const [k, v] of body) {
+ const vlabel = v instanceof Blob ? "" : v;
+ logger.log(`${k}: ${vlabel}`);
+ }
+ break;
+ }
+ default:
+ logger.log(`<${contentType}>`);
+ break;
+ }
+ logger.groupEnd();
+ logger.groupEnd();
+}
+async function logResponse(logger, res, req) {
+ if (!logger) {
+ return;
+ }
+ const contentType = res.headers.get("content-type");
+ const ct = (contentType === null || contentType === void 0 ? void 0 : contentType.split(";")[0]) || "";
+ logger.group(`< Response: ${req.method} ${req.url}`);
+ logger.log("Status Code:", res.status, res.statusText);
+ logger.group("Headers:");
+ for (const [k, v] of res.headers.entries()) {
+ logger.log(`${k}: ${v}`);
+ }
+ logger.groupEnd();
+ logger.group("Body:");
+ switch (true) {
+ case matchContentType(res, "application/json")
+ || jsonLikeContentTypeRE.test(ct) && !jsonlLikeContentTypeRE.test(ct):
+ logger.log(await res.clone().json());
+ break;
+ case matchContentType(res, "application/jsonl")
+ || jsonlLikeContentTypeRE.test(ct):
+ case matchContentType(res, "text/event-stream"):
+ logger.log(`<${contentType}>`);
+ break;
+ case matchContentType(res, "text/*"):
+ logger.log(await res.clone().text());
+ break;
+ case matchContentType(res, "multipart/form-data"): {
+ const body = await res.clone().formData();
+ for (const [k, v] of body) {
+ const vlabel = v instanceof Blob ? "" : v;
+ logger.log(`${k}: ${vlabel}`);
+ }
+ break;
+ }
+ default:
+ logger.log(`<${contentType}>`);
+ break;
+ }
+ logger.groupEnd();
+ logger.groupEnd();
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+/** The fallback error class if no more specific error class is matched */
+class GoogleGenAiDefaultError extends GoogleGenAiError {
+ constructor(message, httpMeta) {
+ if (message) {
+ message += `: `;
+ }
+ message += `Status ${httpMeta.response.status}`;
+ const contentType = httpMeta.response.headers.get("content-type") || `""`;
+ if (contentType !== "application/json") {
+ message += ` Content-Type ${contentType.includes(" ") ? `"${contentType}"` : contentType}`;
+ }
+ const body = httpMeta.body || `""`;
+ message += body.length > 100 ? "\n" : ". ";
+ let bodyDisplay = body;
+ if (body.length > 10000) {
+ const truncated = body.substring(0, 10000);
+ const remaining = body.length - 10000;
+ bodyDisplay = `${truncated}...and ${remaining} more chars`;
+ }
+ message += `Body: ${bodyDisplay}`;
+ message = message.trim();
+ super(message, httpMeta);
+ this.name = "GoogleGenAiDefaultError";
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+function tryParseJson(s) {
+ try {
+ return JSON.parse(s);
+ }
+ catch (_a) {
+ return s;
+ }
+}
+function wrapEventStreamResponse(body, opts = {}) {
+ var _a, _b;
+ const flattened = opts.flattened === true;
+ const sentinel = (_a = opts.sentinel) !== null && _a !== void 0 ? _a : "";
+ return new Stream(body, (rawEvent) => {
+ if (sentinel !== "" && rawEvent.data === sentinel) {
+ return { done: true, value: undefined };
+ }
+ if (flattened) {
+ const data = rawEvent.data == null
+ ? undefined
+ : tryParseJson(rawEvent.data);
+ return { done: false, value: data };
+ }
+ return {
+ done: false,
+ value: Object.assign(Object.assign({}, rawEvent), { data: rawEvent.data == null
+ ? rawEvent.data
+ : tryParseJson(rawEvent.data) }),
+ };
+ }, { dataRequired: (_b = opts.dataRequired) !== null && _b !== void 0 ? _b : true });
+}
+class Stream extends ReadableStream {
+ constructor(responseBody, parse, opts) {
+ var _a;
+ const upstream = responseBody.getReader();
+ let buffer = new Uint8Array(4096);
+ let bufferLen = 0;
+ let searchStart = 0;
+ const state = { eventId: undefined };
+ const dataRequired = (_a = opts === null || opts === void 0 ? void 0 : opts.dataRequired) !== null && _a !== void 0 ? _a : true;
+ super({
+ async pull(downstream) {
+ try {
+ while (true) {
+ const match = findBoundary(buffer, bufferLen, searchStart);
+ if (!match) {
+ // Bytes before the trailing MAX_BOUNDARY_LEN-1 were already
+ // scanned with full lookahead and cannot start a boundary even
+ // once more data arrives, so the next scan can skip them.
+ searchStart = Math.max(0, bufferLen - MAX_BOUNDARY_LEN + 1);
+ const chunk = await upstream.read();
+ if (chunk.done)
+ return downstream.close();
+ if (bufferLen + chunk.value.length > buffer.length) {
+ const grown = new Uint8Array(Math.max(buffer.length * 2, bufferLen + chunk.value.length));
+ grown.set(buffer.subarray(0, bufferLen));
+ buffer = grown;
+ }
+ buffer.set(chunk.value, bufferLen);
+ bufferLen += chunk.value.length;
+ continue;
+ }
+ const message = buffer.slice(0, match.index);
+ buffer.copyWithin(0, match.index + match.length, bufferLen);
+ bufferLen -= match.index + match.length;
+ if (buffer.length > 4096 && bufferLen <= buffer.length >> 2) {
+ // Release oversized capacity retained after an unusually large
+ // event so long-lived streams do not hold peak memory.
+ const shrunk = new Uint8Array(Math.max(4096, bufferLen * 2));
+ shrunk.set(buffer.subarray(0, bufferLen));
+ buffer = shrunk;
+ }
+ searchStart = 0;
+ const item = parseMessage(message, parse, state, dataRequired);
+ if (item && !item.done)
+ return downstream.enqueue(item.value);
+ if (item === null || item === void 0 ? void 0 : item.done) {
+ await upstream.cancel("done");
+ return downstream.close();
+ }
+ }
+ }
+ catch (e) {
+ downstream.error(e);
+ await upstream.cancel(e);
+ }
+ },
+ cancel: reason => upstream.cancel(reason),
+ });
+ }
+ [Symbol.asyncIterator](options) {
+ const fn = ReadableStream.prototype[Symbol.asyncIterator];
+ if (typeof fn === "function")
+ return fn.call(this, options);
+ const reader = this.getReader();
+ const iterator = {
+ next: async () => {
+ const r = await reader.read();
+ if (r.done) {
+ reader.releaseLock();
+ return { done: true, value: undefined };
+ }
+ return { done: false, value: r.value };
+ },
+ throw: async (e) => {
+ await reader.cancel(e);
+ reader.releaseLock();
+ return { done: true, value: undefined };
+ },
+ return: async () => {
+ await reader.cancel("done");
+ reader.releaseLock();
+ return { done: true, value: undefined };
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ };
+ const asyncDispose = Symbol.asyncDispose;
+ if (asyncDispose) {
+ iterator[asyncDispose] = async () => {
+ var _a;
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
+ };
+ }
+ return iterator;
+ }
+ values(options) {
+ return this[Symbol.asyncIterator](options);
+ }
+}
+const CR = 13;
+const LF = 10;
+const BOUNDARIES = [
+ [CR, LF, CR, LF], // \r\n\r\n
+ [CR, LF, CR], // \r\n\r
+ [CR, LF, LF], // \r\n\n
+ [CR, CR, LF], // \r\r\n
+ [LF, CR, LF], // \n\r\n
+ [CR, CR], // \r\r
+ [LF, CR], // \n\r
+ [LF, LF], // \n\n
+];
+const MAX_BOUNDARY_LEN = BOUNDARIES.reduce((m, b) => Math.max(m, b.length), 0);
+function findBoundary(buf, len, from) {
+ for (let i = from; i < len; i++) {
+ if (buf[i] !== CR && buf[i] !== LF)
+ continue;
+ for (const boundary of BOUNDARIES) {
+ if (i + boundary.length > len)
+ continue;
+ let match = true;
+ for (let j = 0; j < boundary.length; j++) {
+ if (buf[i + j] !== boundary[j]) {
+ match = false;
+ break;
+ }
+ }
+ if (match)
+ return { index: i, length: boundary.length };
+ }
+ }
+ return null;
+}
+function parseMessage(chunk, parse, state, dataRequired) {
+ const text = new TextDecoder().decode(chunk);
+ const lines = text.split(/\r\n|\r|\n/);
+ const dataLines = [];
+ const ret = {};
+ let ignore = true;
+ for (const line of lines) {
+ if (!line || line.startsWith(":"))
+ continue;
+ ignore = false;
+ const i = line.indexOf(":");
+ let field = line;
+ let value = "";
+ if (i > 0) {
+ field = line.slice(0, i);
+ value = line[i + 1] === " " ? line.slice(i + 2) : line.slice(i + 1);
+ }
+ if (field === "data")
+ dataLines.push(value);
+ else if (field === "event")
+ ret.event = value;
+ else if (field === "id" && !value.includes("\0"))
+ state.eventId = value;
+ else if (field === "retry" && /^\d+$/.test(value)) {
+ ret.retry = Number(value);
+ }
+ }
+ if (ignore)
+ return;
+ ret.id = state.eventId;
+ if (dataLines.length)
+ ret.data = dataLines.join("\n");
+ else if (dataRequired)
+ return; // skip data-less events when data is required
+ return parse(ret);
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+const DEFAULT_CONTENT_TYPES = {
+ jsonl: "application/jsonl",
+ json: "application/json",
+ text: "text/plain",
+ bytes: "application/octet-stream",
+ stream: "application/octet-stream",
+ sse: "text/event-stream",
+ nil: "*",
+ fail: "*",
+};
+function jsonErr(codes, errorClass, options) {
+ return Object.assign(Object.assign({}, options), { err: true, enc: "json", codes, errorClass });
+}
+function json(codes, options) {
+ return Object.assign(Object.assign({}, options), { enc: "json", codes });
+}
+function sse(codes, sse, options) {
+ return Object.assign(Object.assign(Object.assign({}, options), { enc: "sse", codes }), (sse ? { sse } : {}));
+}
+function nil(codes, options) {
+ return Object.assign(Object.assign({}, options), { enc: "nil", codes });
+}
+function fail(codes) {
+ return { enc: "fail", codes };
+}
+function match(...matchers) {
+ return async function matchFunc(response, request, options) {
+ let raw;
+ let matcher;
+ for (const match of matchers) {
+ const { codes } = match;
+ const ctpattern = "ctype" in match
+ ? match.ctype
+ : DEFAULT_CONTENT_TYPES[match.enc];
+ if (ctpattern && matchResponse(response, codes, ctpattern)) {
+ matcher = match;
+ break;
+ }
+ else if (!ctpattern && matchStatusCode(response, codes)) {
+ matcher = match;
+ break;
+ }
+ }
+ if (!matcher) {
+ return [{
+ ok: false,
+ error: new GoogleGenAiDefaultError("Unexpected Status or Content-Type", {
+ response,
+ request,
+ body: await response.text().catch(() => ""),
+ }),
+ }, raw];
+ }
+ const encoding = matcher.enc;
+ let body = "";
+ switch (encoding) {
+ case "json":
+ body = await response.text();
+ try {
+ raw = JSON.parse(body);
+ }
+ catch (err) {
+ // Passthrough for malformed error bodies; success bodies must be valid.
+ if (!("err" in matcher)) {
+ throw err;
+ }
+ raw = body;
+ }
+ break;
+ case "jsonl":
+ raw = response.body;
+ break;
+ case "bytes":
+ raw = new Uint8Array(await response.arrayBuffer());
+ break;
+ case "stream":
+ raw = response.body;
+ break;
+ case "text":
+ body = await response.text();
+ raw = body;
+ break;
+ case "sse":
+ if (response.body) {
+ const sseOpts = ("sse" in matcher && matcher.sse) || {};
+ raw = wrapEventStreamResponse(response.body, sseOpts);
+ }
+ else {
+ raw = null;
+ }
+ break;
+ case "nil":
+ body = await response.text();
+ raw = undefined;
+ break;
+ case "fail":
+ body = await response.text();
+ raw = body;
+ break;
+ default:
+ throw new Error(`Unsupported response type: ${encoding}`);
+ }
+ if (matcher.enc === "fail") {
+ return [{
+ ok: false,
+ error: new GoogleGenAiDefaultError("API error occurred", {
+ request,
+ response,
+ body,
+ }),
+ }, raw];
+ }
+ const resultKey = matcher.key || (options === null || options === void 0 ? void 0 : options.resultKey);
+ let data;
+ const headersField = matcher.hdrs
+ ? { headers: unpackHeaders(response.headers) }
+ : null;
+ if ("err" in matcher) {
+ data = Object.assign(Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.extraFields), headersField), (isPlainObject$1(raw) ? raw : null));
+ }
+ else if (resultKey) {
+ data = Object.assign(Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.extraFields), headersField), { [resultKey]: raw });
+ }
+ else if (matcher.hdrs) {
+ data = Object.assign(Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.extraFields), headersField), (isPlainObject$1(raw) ? raw : null));
+ }
+ else {
+ data = raw;
+ }
+ if ("err" in matcher) {
+ // When the spec error response is a single error class, instantiate
+ // it with the data + httpMeta. When the spec defines a discriminated
+ // union of error variants (no class), `errorClass` is undefined and
+ // we pass the parsed payload through as the error value directly.
+ const errValue = matcher.errorClass
+ ? new matcher.errorClass(data, { request, response, body })
+ : data;
+ return [{ ok: false, error: errValue }, raw];
+ }
+ return [{ ok: true, value: data }, raw];
+ };
+}
+const headerValRE = /, */;
+/**
+ * Iterates over a Headers object and returns an object with all the header
+ * entries. Values are represented as an array to account for repeated headers.
+ */
+function unpackHeaders(headers) {
+ const out = {};
+ for (const [k, v] of headers.entries()) {
+ out[k] = v.split(headerValRE);
+ }
+ return out;
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+const SecurityErrorCode = {
+ Incomplete: "incomplete",
+ UnrecognisedSecurityType: "unrecognized_security_type",
+};
+class SecurityError extends Error {
+ constructor(code, message) {
+ super(message);
+ this.code = code;
+ this.name = "SecurityError";
+ }
+ static incomplete() {
+ return new SecurityError(SecurityErrorCode.Incomplete, "Security requirements not met in order to perform the operation");
+ }
+ static unrecognizedType(type) {
+ return new SecurityError(SecurityErrorCode.UnrecognisedSecurityType, `Unrecognised security type: ${type}`);
+ }
+}
+function resolveSecurity(...options) {
+ const state = {
+ basic: {},
+ headers: {},
+ queryParams: {},
+ cookies: {},
+ oauth2: { type: "none" },
+ };
+ const option = options.find((opts) => {
+ return opts.every((o) => {
+ if (o.value == null) {
+ return false;
+ }
+ else if (o.type === "http:basic") {
+ return o.value.username != null || o.value.password != null;
+ }
+ else if (o.type === "http:custom") {
+ return null;
+ }
+ else if (o.type === "oauth2:password") {
+ return (typeof o.value === "string" && !!o.value);
+ }
+ else if (o.type === "oauth2:client_credentials") {
+ if (typeof o.value == "string") {
+ return !!o.value;
+ }
+ return o.value.client_id != null || o.value.client_secret != null;
+ }
+ else if (typeof o.value === "string") {
+ return !!o.value;
+ }
+ else {
+ throw new Error(`Unrecognized security type: ${o.type} (value type: ${typeof o
+ .value})`);
+ }
+ });
+ });
+ if (option == null) {
+ return null;
+ }
+ option.forEach((spec) => {
+ if (spec.value == null) {
+ return;
+ }
+ const { type } = spec;
+ switch (type) {
+ case "apiKey:header":
+ state.headers[spec.fieldName] = spec.value;
+ break;
+ case "apiKey:query":
+ state.queryParams[spec.fieldName] = spec.value;
+ break;
+ case "apiKey:cookie":
+ state.cookies[spec.fieldName] = spec.value;
+ break;
+ case "http:basic":
+ applyBasic(state, spec);
+ break;
+ case "http:custom":
+ break;
+ case "http:bearer":
+ applyBearer(state, spec);
+ break;
+ case "oauth2":
+ applyBearer(state, spec);
+ break;
+ case "oauth2:password":
+ applyBearer(state, spec);
+ break;
+ case "oauth2:client_credentials":
+ break;
+ case "openIdConnect":
+ applyBearer(state, spec);
+ break;
+ default:
+ throw SecurityError.unrecognizedType((type));
+ }
+ });
+ return state;
+}
+function applyBasic(state, spec) {
+ if (spec.value == null) {
+ return;
+ }
+ state.basic = spec.value;
+}
+function applyBearer(state, spec) {
+ if (typeof spec.value !== "string" || !spec.value) {
+ return;
+ }
+ let value = spec.value;
+ if (value.slice(0, 7).toLowerCase() !== "bearer ") {
+ value = `Bearer ${value}`;
+ }
+ if (spec.fieldName !== undefined) {
+ state.headers[spec.fieldName] = value;
+ }
+}
+function resolveGlobalSecurity(security, allowedFields) {
+ var _a, _b;
+ let inputs = [
+ [
+ {
+ fieldName: "accessToken",
+ type: "http:custom",
+ value: (_a = security === null || security === void 0 ? void 0 : security.access_token) !== null && _a !== void 0 ? _a : env().GOOGLE_GENAI_ACCESS_TOKEN,
+ },
+ {
+ fieldName: "apiKey",
+ type: "http:custom",
+ value: (_b = security === null || security === void 0 ? void 0 : security.api_key) !== null && _b !== void 0 ? _b : env().GOOGLE_GENAI_API_KEY,
+ },
+ {
+ fieldName: "defaultHeaders",
+ type: "http:custom",
+ value: security === null || security === void 0 ? void 0 : security.default_headers,
+ },
+ ],
+ ];
+ return resolveSecurity(...inputs);
+}
+async function extractSecurity(sec) {
+ if (sec == null) {
+ return;
+ }
+ return typeof sec === "function" ? sec() : sec;
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+var _a;
+class APIPromise {
+ constructor(p, callSource) {
+ this[_a] = "APIPromise";
+ this._promise = p instanceof Promise ? p : Promise.resolve(p);
+ this._unwrapped = p instanceof Promise ? null : Promise.resolve(p[0]);
+ this._callSource = callSource !== null && callSource !== void 0 ? callSource : null;
+ }
+ _getUnwrapped() {
+ var _b;
+ return ((_b = this._unwrapped) !== null && _b !== void 0 ? _b : (this._unwrapped = this._promise.then(([value]) => value)));
+ }
+ then(onfulfilled, onrejected) {
+ return this._promise.then(onfulfilled ? ([value]) => onfulfilled(value) : void 0, onrejected);
+ }
+ catch(onrejected) {
+ return this._getUnwrapped().catch(onrejected);
+ }
+ finally(onfinally) {
+ return this._getUnwrapped().finally(onfinally);
+ }
+ $inspect() {
+ return this._promise;
+ }
+ asResponse() {
+ var _b;
+ const src = ((_b = this._callSource) !== null && _b !== void 0 ? _b : (this._callSource = this._promise.then(([, call]) => call)));
+ return src.then((call) => {
+ if (!call.response) {
+ throw new Error("APIPromise.asResponse: response unavailable");
+ }
+ return call.response;
+ });
+ }
+ async withResponse() {
+ const [[data], response] = await Promise.all([
+ this._promise,
+ this.asResponse(),
+ ]);
+ return { data, response };
+ }
+ _thenUnwrap(transform) {
+ var _b;
+ const data = this._promise.then(([value, call]) => [transform(value), call]);
+ data.catch(() => { });
+ return new APIPromise(data, (_b = this._callSource) !== null && _b !== void 0 ? _b : undefined);
+ }
+}
+_a = Symbol.toStringTag;
+function unwrapAsAPIPromise(p) {
+ const inner = p.$inspect();
+ const data = inner.then(([r, call]) => {
+ if (!r.ok) {
+ throw r.error;
+ }
+ return [r.value, call];
+ });
+ const callSource = inner.then(([r, call]) => {
+ var _b;
+ if (!r.ok && !((_b = call.response) === null || _b === void 0 ? void 0 : _b.ok)) {
+ throw r.error;
+ }
+ return call;
+ });
+ data.catch(() => { });
+ callSource.catch(() => { });
+ return new APIPromise(data, callSource);
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Creates a new Agent (Typed version for SDK).
+ */
+function agentsCreate(client, body, api_version, options) {
+ return new APIPromise($do$q(client, body, api_version, options));
+}
+async function $do$q(client, body, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ body: body,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body$ = encodeJSON("body", payload.body, { explode: true });
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ };
+ const path = pathToFunc("/{api_version}/agents")(pathParams);
+ const headers = new Headers(compactMap({
+ "Content-Type": "application/json",
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "CreateAgent",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "POST",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body$,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Deletes an Agent.
+ */
+function agentsDelete(client, id, api_version, options) {
+ return new APIPromise($do$p(client, id, api_version, options));
+}
+async function $do$p(client, id, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/agents/{id}")(pathParams);
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "DeleteAgent",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "DELETE",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Gets a specific Agent.
+ */
+function agentsGet(client, id, api_version, options) {
+ return new APIPromise($do$o(client, id, api_version, options));
+}
+async function $do$o(client, id, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/agents/{id}")(pathParams);
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "GetAgent",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Lists all Agents.
+ */
+function agentsList(client, api_version, page_size, page_token, parent, options) {
+ return new APIPromise($do$n(client, api_version, page_size, page_token, parent, options));
+}
+async function $do$n(client, api_version, page_size, page_token, parent, options) {
+ var _a, _b, _c;
+ const input = {
+ api_version: api_version,
+ page_size: page_size,
+ page_token: page_token,
+ parent: parent,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload === null || payload === void 0 ? void 0 : payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ };
+ const path = pathToFunc("/{api_version}/agents")(pathParams);
+ const query = encodeFormQuery({
+ "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
+ "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
+ "parent": payload === null || payload === void 0 ? void 0 : payload.parent,
+ });
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "ListAgents",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ query: query,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+class Agents extends ClientSDK {
+ /**
+ * Lists all Agents.
+ */
+ list(params, options) {
+ return unwrapAsAPIPromise(agentsList(this, params === null || params === void 0 ? void 0 : params.api_version, params === null || params === void 0 ? void 0 : params.page_size, params === null || params === void 0 ? void 0 : params.page_token, params === null || params === void 0 ? void 0 : params.parent, options));
+ }
+ /**
+ * Creates a new Agent (Typed version for SDK).
+ */
+ create(params, options) {
+ const { api_version } = params, body = __rest(params, ["api_version"]);
+ return unwrapAsAPIPromise(agentsCreate(this, body, api_version, options));
+ }
+ /**
+ * Deletes an Agent.
+ */
+ delete(id, params, options) {
+ return unwrapAsAPIPromise(agentsDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
+ }
+ /**
+ * Gets a specific Agent.
+ */
+ get(id, params, options) {
+ return unwrapAsAPIPromise(agentsGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Creates an environment.
+ */
+function environmentsCreateEnvironment(client, body, api_version, options) {
+ return new APIPromise($do$m(client, body, api_version, options));
+}
+async function $do$m(client, body, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ body: body,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body$ = encodeJSON("body", payload.body, { explode: true });
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ };
+ const path = pathToFunc("/{api_version}/environments")(pathParams);
+ const headers = new Headers(compactMap({
+ "Content-Type": "application/json",
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "CreateEnvironment",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "POST",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body$,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Deletes an environment.
+ */
+function environmentsDeleteEnvironment(client, id, api_version, options) {
+ return new APIPromise($do$l(client, id, api_version, options));
+}
+async function $do$l(client, id, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/environments/{id}")(pathParams);
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "DeleteEnvironment",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "DELETE",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Gets an environment.
+ */
+function environmentsGetEnvironment(client, id, api_version, options) {
+ return new APIPromise($do$k(client, id, api_version, options));
+}
+async function $do$k(client, id, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/environments/{id}")(pathParams);
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "GetEnvironment",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Lists environments.
+ */
+function environmentsListEnvironments(client, api_version, page_size, page_token, options) {
+ return new APIPromise($do$j(client, api_version, page_size, page_token, options));
+}
+async function $do$j(client, api_version, page_size, page_token, options) {
+ var _a, _b, _c;
+ const input = {
+ api_version: api_version,
+ page_size: page_size,
+ page_token: page_token,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload === null || payload === void 0 ? void 0 : payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ };
+ const path = pathToFunc("/{api_version}/environments")(pathParams);
+ const query = encodeFormQuery({
+ "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
+ "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
+ });
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "ListEnvironments",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ query: query,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Retrieves file metadata or directory contents from an environment's snapshot. To download file contents directly, pass ?alt=media or use the files.download helper.
+ */
+function environmentsFilesList(client, environment, path, api_version, page_size, page_token, recursive, options) {
+ return new APIPromise($do$i(client, environment, path, api_version, page_size, page_token, recursive, options));
+}
+async function $do$i(client, environment, path, api_version, page_size, page_token, recursive, options) {
+ var _a, _b, _c;
+ const input = {
+ environment: environment,
+ path: path,
+ api_version: api_version,
+ page_size: page_size,
+ page_token: page_token,
+ recursive: recursive,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ environment: encodeSimple("environment", payload.environment, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ path: encodeSimple("path", payload.path, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path$ = pathToFunc("/{api_version}/environments/{environment}/files/{path}")(pathParams);
+ const query = encodeFormQuery({
+ "page_size": payload.page_size,
+ "page_token": payload.page_token,
+ "recursive": payload.recursive,
+ });
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "GetEnvironmentFiles",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path$,
+ headers: headers,
+ query: query,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+class Files extends ClientSDK {
+ /**
+ * Retrieves file metadata or directory contents from an environment's snapshot. To download file contents directly, pass ?alt=media or use the files.download helper.
+ */
+ list(environment, path, params, options) {
+ return unwrapAsAPIPromise(environmentsFilesList(this, environment, path, params === null || params === void 0 ? void 0 : params.api_version, params === null || params === void 0 ? void 0 : params.page_size, params === null || params === void 0 ? void 0 : params.page_token, params === null || params === void 0 ? void 0 : params.recursive, options));
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+class Environments extends ClientSDK {
+ get files() {
+ var _a;
+ return ((_a = this._files) !== null && _a !== void 0 ? _a : (this._files = new Files(this._options)));
+ }
+ /**
+ * Lists environments.
+ */
+ listEnvironments(params, options) {
+ return unwrapAsAPIPromise(environmentsListEnvironments(this, params === null || params === void 0 ? void 0 : params.api_version, params === null || params === void 0 ? void 0 : params.page_size, params === null || params === void 0 ? void 0 : params.page_token, options));
+ }
+ /**
+ * Creates an environment.
+ */
+ createEnvironment(body, api_version, options) {
+ return unwrapAsAPIPromise(environmentsCreateEnvironment(this, body, api_version, options));
+ }
+ /**
+ * Deletes an environment.
+ */
+ deleteEnvironment(id, params, options) {
+ return unwrapAsAPIPromise(environmentsDeleteEnvironment(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
+ }
+ /**
+ * Gets an environment.
+ */
+ getEnvironment(id, params, options) {
+ return unwrapAsAPIPromise(environmentsGetEnvironment(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Error cancelling interaction
+ */
+class CancelInteractionByIdServerError extends GoogleGenAiError {
+ constructor(err, httpMeta) {
+ var _a;
+ const message = ((_a = err.error) === null || _a === void 0 ? void 0 : _a.message)
+ || `API error occurred: ${JSON.stringify(err)}`;
+ super(message, httpMeta);
+ this.data$ = err;
+ this.error = err.error;
+ this.name = "CancelInteractionByIdServerError";
+ }
+}
+/**
+ * Error cancelling interaction
+ */
+class CancelInteractionByIdClientError extends GoogleGenAiError {
+ constructor(err, httpMeta) {
+ var _a;
+ const message = ((_a = err.error) === null || _a === void 0 ? void 0 : _a.message)
+ || `API error occurred: ${JSON.stringify(err)}`;
+ super(message, httpMeta);
+ this.data$ = err;
+ this.error = err.error;
+ this.name = "CancelInteractionByIdClientError";
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Error creating interaction
+ */
+class CreateInteractionServerError extends GoogleGenAiError {
+ constructor(err, httpMeta) {
+ var _a;
+ const message = ((_a = err.error) === null || _a === void 0 ? void 0 : _a.message)
+ || `API error occurred: ${JSON.stringify(err)}`;
+ super(message, httpMeta);
+ this.data$ = err;
+ this.error = err.error;
+ this.name = "CreateInteractionServerError";
+ }
+}
+/**
+ * Error creating interaction
+ */
+class CreateInteractionClientError extends GoogleGenAiError {
+ constructor(err, httpMeta) {
+ var _a;
+ const message = ((_a = err.error) === null || _a === void 0 ? void 0 : _a.message)
+ || `API error occurred: ${JSON.stringify(err)}`;
+ super(message, httpMeta);
+ this.data$ = err;
+ this.error = err.error;
+ this.name = "CreateInteractionClientError";
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Error deleting interaction
+ */
+class DeleteInteractionServerError extends GoogleGenAiError {
+ constructor(err, httpMeta) {
+ var _a;
+ const message = ((_a = err.error) === null || _a === void 0 ? void 0 : _a.message)
+ || `API error occurred: ${JSON.stringify(err)}`;
+ super(message, httpMeta);
+ this.data$ = err;
+ this.error = err.error;
+ this.name = "DeleteInteractionServerError";
+ }
+}
+/**
+ * Error deleting interaction
+ */
+class DeleteInteractionClientError extends GoogleGenAiError {
+ constructor(err, httpMeta) {
+ var _a;
+ const message = ((_a = err.error) === null || _a === void 0 ? void 0 : _a.message)
+ || `API error occurred: ${JSON.stringify(err)}`;
+ super(message, httpMeta);
+ this.data$ = err;
+ this.error = err.error;
+ this.name = "DeleteInteractionClientError";
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Error getting interaction
+ */
+class GetInteractionByIdServerError extends GoogleGenAiError {
+ constructor(err, httpMeta) {
+ var _a;
+ const message = ((_a = err.error) === null || _a === void 0 ? void 0 : _a.message)
+ || `API error occurred: ${JSON.stringify(err)}`;
+ super(message, httpMeta);
+ this.data$ = err;
+ this.error = err.error;
+ this.name = "GetInteractionByIdServerError";
+ }
+}
+/**
+ * Error getting interaction
+ */
+class GetInteractionByIdClientError extends GoogleGenAiError {
+ constructor(err, httpMeta) {
+ var _a;
+ const message = ((_a = err.error) === null || _a === void 0 ? void 0 : _a.message)
+ || `API error occurred: ${JSON.stringify(err)}`;
+ super(message, httpMeta);
+ this.data$ = err;
+ this.error = err.error;
+ this.name = "GetInteractionByIdClientError";
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Canceling an interaction
+ *
+ * @remarks
+ * Cancels an interaction by id. This only applies to background interactions that are still running.
+ */
+function interactionsCancel(client, id, api_version, options) {
+ return new APIPromise($do$h(client, id, api_version, options));
+}
+async function $do$h(client, id, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/interactions/{id}/cancel")(pathParams);
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "cancelInteractionById",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "POST",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const responseFields = {
+ httpMeta: { response: response, request: req },
+ };
+ const [result] = await match(json(200), jsonErr("4XX", CancelInteractionByIdClientError), jsonErr("5XX", CancelInteractionByIdServerError))(response, req, { extraFields: responseFields });
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+function interactionsCreate(client, body, api_version, options) {
+ return new APIPromise($do$g(client, body, api_version, options));
+}
+async function $do$g(client, body, api_version, options) {
+ var _a, _b, _c, _d;
+ const input = {
+ body: body,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body$ = encodeJSON("body", payload.body, { explode: true });
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ };
+ const path = pathToFunc("/{api_version}/interactions")(pathParams);
+ const headers = new Headers(compactMap({
+ "Content-Type": "application/json",
+ Accept: ((_b = input === null || input === void 0 ? void 0 : input.body) === null || _b === void 0 ? void 0 : _b.stream) ? "text/event-stream" : "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_d = (_c = options === null || options === void 0 ? void 0 : options.server_url) !== null && _c !== void 0 ? _c : client._baseURL) !== null && _d !== void 0 ? _d : "",
+ operation_id: "CreateInteraction",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "POST",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body$,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const responseFields = {
+ httpMeta: { response: response, request: req },
+ };
+ const [result] = await match(json(200), sse(200, {
+ sentinel: "[DONE]",
+ flattened: true,
+ }), jsonErr("4XX", CreateInteractionClientError), jsonErr("5XX", CreateInteractionServerError))(response, req, { extraFields: responseFields });
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Deleting an interaction
+ *
+ * @remarks
+ * Deletes the interaction by id.
+ */
+function interactionsDelete(client, id, api_version, options) {
+ return new APIPromise($do$f(client, id, api_version, options));
+}
+async function $do$f(client, id, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/interactions/{id}")(pathParams);
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "deleteInteraction",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "DELETE",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const responseFields = {
+ httpMeta: { response: response, request: req },
+ };
+ const [result] = await match(nil(200), jsonErr("4XX", DeleteInteractionClientError), jsonErr("5XX", DeleteInteractionServerError))(response, req, { extraFields: responseFields });
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+function interactionsGet(client, id, api_version, include_input, last_event_id, stream, options) {
+ return new APIPromise($do$e(client, id, api_version, include_input, last_event_id, stream, options));
+}
+async function $do$e(client, id, api_version, include_input, last_event_id, stream, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ include_input: include_input,
+ last_event_id: last_event_id,
+ stream: stream,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/interactions/{id}")(pathParams);
+ const query = encodeFormQuery({
+ "include_input": payload.include_input,
+ "last_event_id": payload.last_event_id,
+ "stream": payload.stream,
+ });
+ const headers = new Headers(compactMap({
+ Accept: (input === null || input === void 0 ? void 0 : input.stream) ? "text/event-stream" : "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "getInteractionById",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ query: query,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const responseFields = {
+ httpMeta: { response: response, request: req },
+ };
+ const [result] = await match(json(200), sse(200, {
+ sentinel: "[DONE]",
+ flattened: true,
+ }), jsonErr("4XX", GetInteractionByIdClientError), jsonErr("5XX", GetInteractionByIdServerError))(response, req, { extraFields: responseFields });
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+class Interactions extends ClientSDK {
+ create(params, options) {
+ const { api_version } = params, body = __rest(params, ["api_version"]);
+ return unwrapAsAPIPromise(interactionsCreate(this, body, api_version, options));
+ }
+ /**
+ * Deleting an interaction
+ *
+ * @remarks
+ * Deletes the interaction by id.
+ */
+ delete(id, params, options) {
+ return unwrapAsAPIPromise(interactionsDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
+ }
+ get(id, params, options) {
+ return unwrapAsAPIPromise(interactionsGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, params === null || params === void 0 ? void 0 : params.include_input, params === null || params === void 0 ? void 0 : params.last_event_id, params === null || params === void 0 ? void 0 : params.stream, options));
+ }
+ /**
+ * Canceling an interaction
+ *
+ * @remarks
+ * Cancels an interaction by id. This only applies to background interactions that are still running.
+ */
+ cancel(id, params, options) {
+ return unwrapAsAPIPromise(interactionsCancel(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Creates a new trigger that will invoke the specified agent on the given cron schedule.
+ */
+function triggersCreate(client, body, api_version, options) {
+ return new APIPromise($do$d(client, body, api_version, options));
+}
+async function $do$d(client, body, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ body: body,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body$ = encodeJSON("body", payload.body, { explode: true });
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ };
+ const path = pathToFunc("/{api_version}/triggers")(pathParams);
+ const headers = new Headers(compactMap({
+ "Content-Type": "application/json",
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "CreateTrigger",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "POST",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body$,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Deletes a trigger.
+ */
+function triggersDelete(client, id, api_version, options) {
+ return new APIPromise($do$c(client, id, api_version, options));
+}
+async function $do$c(client, id, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "DeleteTrigger",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "DELETE",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Gets details of a single trigger.
+ */
+function triggersGet(client, id, api_version, options) {
+ return new APIPromise($do$b(client, id, api_version, options));
+}
+async function $do$b(client, id, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "GetTrigger",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Lists executions for a trigger.
+ */
+function triggersListExecutions(client, trigger_id, api_version, page_size, page_token, options) {
+ return new APIPromise($do$a(client, trigger_id, api_version, page_size, page_token, options));
+}
+async function $do$a(client, trigger_id, api_version, page_size, page_token, options) {
+ var _a, _b, _c;
+ const input = {
+ trigger_id: trigger_id,
+ api_version: api_version,
+ page_size: page_size,
+ page_token: page_token,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
+ const query = encodeFormQuery({
+ "page_size": payload.page_size,
+ "page_token": payload.page_token,
+ });
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "ListTriggerExecutions",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ query: query,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Lists triggers for a project.
+ */
+function triggersList(client, api_version, filter, page_size, page_token, options) {
+ return new APIPromise($do$9(client, api_version, filter, page_size, page_token, options));
+}
+async function $do$9(client, api_version, filter, page_size, page_token, options) {
+ var _a, _b, _c;
+ const input = {
+ api_version: api_version,
+ filter: filter,
+ page_size: page_size,
+ page_token: page_token,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload === null || payload === void 0 ? void 0 : payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ };
+ const path = pathToFunc("/{api_version}/triggers")(pathParams);
+ const query = encodeFormQuery({
+ "filter": payload === null || payload === void 0 ? void 0 : payload.filter,
+ "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
+ "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
+ });
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "ListTriggers",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ query: query,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Runs a trigger immediately.
+ */
+function triggersRun(client, trigger_id, api_version, options) {
+ return new APIPromise($do$8(client, trigger_id, api_version, options));
+}
+async function $do$8(client, trigger_id, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ trigger_id: trigger_id,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "RunTrigger",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "POST",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Updates a trigger.
+ */
+function triggersUpdate(client, id, body, api_version, options) {
+ return new APIPromise($do$7(client, id, body, api_version, options));
+}
+async function $do$7(client, id, body, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ body: body,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body$ = encodeJSON("body", payload.body, { explode: true });
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
+ const headers = new Headers(compactMap({
+ "Content-Type": "application/json",
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "UpdateTrigger",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "PATCH",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body$,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+class Triggers extends ClientSDK {
+ /**
+ * Lists triggers for a project.
+ */
+ list(params, options) {
+ return unwrapAsAPIPromise(triggersList(this, params === null || params === void 0 ? void 0 : params.api_version, params === null || params === void 0 ? void 0 : params.filter, params === null || params === void 0 ? void 0 : params.page_size, params === null || params === void 0 ? void 0 : params.page_token, options));
+ }
+ /**
+ * Creates a new trigger that will invoke the specified agent on the given cron schedule.
+ */
+ create(params, options) {
+ const { api_version } = params, body = __rest(params, ["api_version"]);
+ return unwrapAsAPIPromise(triggersCreate(this, body, api_version, options));
+ }
+ /**
+ * Deletes a trigger.
+ */
+ delete(id, params, options) {
+ return unwrapAsAPIPromise(triggersDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
+ }
+ /**
+ * Gets details of a single trigger.
+ */
+ get(id, params, options) {
+ return unwrapAsAPIPromise(triggersGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
+ }
+ /**
+ * Updates a trigger.
+ */
+ update(id, params, options) {
+ const { api_version } = params, body = __rest(params, ["api_version"]);
+ return unwrapAsAPIPromise(triggersUpdate(this, id, body, api_version, options));
+ }
+ /**
+ * Lists executions for a trigger.
+ */
+ listExecutions(trigger_id, params, options) {
+ return unwrapAsAPIPromise(triggersListExecutions(this, trigger_id, params === null || params === void 0 ? void 0 : params.api_version, params === null || params === void 0 ? void 0 : params.page_size, params === null || params === void 0 ? void 0 : params.page_token, options));
+ }
+ /**
+ * Runs a trigger immediately.
+ */
+ run(trigger_id, params, options) {
+ return unwrapAsAPIPromise(triggersRun(this, trigger_id, params === null || params === void 0 ? void 0 : params.api_version, options));
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Creates a new Webhook.
+ */
+function webhooksCreate(client, body, api_version, options) {
+ return new APIPromise($do$6(client, body, api_version, options));
+}
+async function $do$6(client, body, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ body: body,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body$ = encodeJSON("body", payload.body, { explode: true });
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ };
+ const path = pathToFunc("/{api_version}/webhooks")(pathParams);
+ const headers = new Headers(compactMap({
+ "Content-Type": "application/json",
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "CreateWebhook",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "POST",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body$,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Deletes a Webhook.
+ */
+function webhooksDelete(client, id, api_version, options) {
+ return new APIPromise($do$5(client, id, api_version, options));
+}
+async function $do$5(client, id, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "DeleteWebhook",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "DELETE",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Gets a specific Webhook.
+ */
+function webhooksGet(client, id, api_version, options) {
+ return new APIPromise($do$4(client, id, api_version, options));
+}
+async function $do$4(client, id, api_version, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "GetWebhook",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Lists all Webhooks.
+ */
+function webhooksList(client, api_version, page_size, page_token, options) {
+ return new APIPromise($do$3(client, api_version, page_size, page_token, options));
+}
+async function $do$3(client, api_version, page_size, page_token, options) {
+ var _a, _b, _c;
+ const input = {
+ api_version: api_version,
+ page_size: page_size,
+ page_token: page_token,
+ };
+ const payload = input;
+ const body = null;
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload === null || payload === void 0 ? void 0 : payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ };
+ const path = pathToFunc("/{api_version}/webhooks")(pathParams);
+ const query = encodeFormQuery({
+ "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
+ "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
+ });
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "ListWebhooks",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ query: query,
+ body: body,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Sends a ping event to a Webhook.
+ */
+function webhooksPing(client, id, api_version, body, options) {
+ return new APIPromise($do$2(client, id, api_version, body, options));
+}
+async function $do$2(client, id, api_version, body, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ body: body,
+ };
+ const payload = input;
+ const body$ = encodeJSON("body", payload.body, { explode: true });
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/webhooks/{id}:ping")(pathParams);
+ const headers = new Headers(compactMap({
+ "Content-Type": "application/json",
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "PingWebhook",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "POST",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body$,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Generates a new signing secret for a Webhook.
+ */
+function webhooksRotateSigningSecret(client, id, api_version, body, options) {
+ return new APIPromise($do$1(client, id, api_version, body, options));
+}
+async function $do$1(client, id, api_version, body, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ body: body,
+ };
+ const payload = input;
+ const body$ = encodeJSON("body", payload.body, { explode: true });
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/webhooks/{id}:rotateSigningSecret")(pathParams);
+ const headers = new Headers(compactMap({
+ "Content-Type": "application/json",
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "RotateSigningSecret",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "POST",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ body: body$,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/**
+ * Updates an existing Webhook.
+ */
+function webhooksUpdate(client, id, api_version, update_mask, body, options) {
+ return new APIPromise($do(client, id, api_version, update_mask, body, options));
+}
+async function $do(client, id, api_version, update_mask, body, options) {
+ var _a, _b, _c;
+ const input = {
+ id: id,
+ api_version: api_version,
+ update_mask: update_mask,
+ body: body,
+ };
+ const payload = input;
+ const body$ = encodeJSON("body", payload.body, { explode: true });
+ const pathParams = {
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
+ id: encodeSimple("id", payload.id, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
+ const query = encodeFormQuery({
+ "update_mask": payload.update_mask,
+ });
+ const headers = new Headers(compactMap({
+ "Content-Type": "application/json",
+ Accept: "application/json",
+ }));
+ const securityInput = await extractSecurity(client._options.security);
+ const requestSecurity = resolveGlobalSecurity(securityInput);
+ const context = {
+ options: client._options,
+ base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
+ operation_id: "UpdateWebhook",
+ o_auth2_scopes: null,
+ resolved_security: requestSecurity,
+ security_source: client._options.security,
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
+ || client._options.retry_config
+ || {
+ strategy: "attempt-count-backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 8000,
+ exponent: 2,
+ maxElapsedTime: 30000,
+ },
+ retryConnectionErrors: true,
+ maxRetries: 4,
+ }
+ || { strategy: "none" },
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
+ };
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "PATCH",
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
+ path: path,
+ headers: headers,
+ query: query,
+ body: body$,
+ userAgent: client._options.user_agent,
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
+ retryConfig: context.retry_config,
+ retryCodes: context.retry_codes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+ return [result, { status: "complete", request: req, response }];
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+class Webhooks extends ClientSDK {
+ /**
+ * Lists all Webhooks.
+ */
+ list(params, options) {
+ return unwrapAsAPIPromise(webhooksList(this, params === null || params === void 0 ? void 0 : params.api_version, params === null || params === void 0 ? void 0 : params.page_size, params === null || params === void 0 ? void 0 : params.page_token, options));
+ }
+ /**
+ * Creates a new Webhook.
+ */
+ create(params, options) {
+ const { api_version } = params, body = __rest(params, ["api_version"]);
+ return unwrapAsAPIPromise(webhooksCreate(this, body, api_version, options));
+ }
+ /**
+ * Deletes a Webhook.
+ */
+ delete(id, params, options) {
+ return unwrapAsAPIPromise(webhooksDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
+ }
+ /**
+ * Gets a specific Webhook.
+ */
+ get(id, params, options) {
+ return unwrapAsAPIPromise(webhooksGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
+ }
+ /**
+ * Updates an existing Webhook.
+ */
+ update(id, params, options) {
+ const _a = params !== null && params !== void 0 ? params : {}, { api_version, update_mask } = _a, body$body = __rest(_a, ["api_version", "update_mask"]);
+ const body = params === undefined || Object.keys(body$body).length === 0
+ ? undefined
+ : body$body;
+ return unwrapAsAPIPromise(webhooksUpdate(this, id, api_version, update_mask, body, options));
+ }
+ /**
+ * Sends a ping event to a Webhook.
+ */
+ ping(id, api_version, body, options) {
+ return unwrapAsAPIPromise(webhooksPing(this, id, api_version, body, options));
+ }
+ /**
+ * Generates a new signing secret for a Webhook.
+ */
+ rotateSigningSecret(id, api_version, body, options) {
+ return unwrapAsAPIPromise(webhooksRotateSigningSecret(this, id, api_version, body, options));
+ }
+}
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
+ get agents() {
+ var _a;
+ return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Agents(this._options)));
+ }
+ get environments() {
+ var _a;
+ return ((_a = this._environments) !== null && _a !== void 0 ? _a : (this._environments = new Environments(this._options)));
+ }
+ get interactions() {
+ var _a;
+ return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Interactions(this._options)));
+ }
+ get triggers() {
+ var _a;
+ return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Triggers(this._options)));
+ }
+ get webhooks() {
+ var _a;
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Webhooks(this._options)));
+ }
+};
+
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * g3-prettier-ignore-file
+ */
+const LEGACY_LYRIA_MODELS = new Set([
+ "lyria-3-pro-preview",
+ "lyria-3-clip-preview",
+]);
+function getGoogleGenAIServerURL(parentClient) {
+ const serverURL = parentClient.getBaseUrl();
+ if (!serverURL) {
+ throw new Error("Base URL must be set.");
+ }
+ return serverURL.replace(/\/+$/, "");
+}
+function getGoogleGenAIAPIVersion(parentClient) {
+ const apiVersion = trimSlashes(parentClient.getApiVersion());
+ const project = parentClient.getProject();
+ const location = parentClient.getLocation();
+ if (parentClient.isVertexAI() && apiVersion && project && location) {
+ return (`${apiVersion}/projects/${encodeURIComponent(project)}` +
+ `/locations/${encodeURIComponent(location)}`);
+ }
+ return apiVersion;
+}
+function buildGoogleGenAIClient(parentClient, options = {}) {
+ var _a, _b, _c, _d, _e;
+ const sdk = new GoogleGenAI$1(Object.assign(Object.assign({}, options), { api_version: (_a = options.api_version) !== null && _a !== void 0 ? _a : getGoogleGenAIAPIVersion(parentClient), security: (_b = options.security) !== null && _b !== void 0 ? _b : new GoogleGenAISecurityProvider({
+ defaultHeaders: Object.assign(Object.assign({}, (_c = parentClient.getDefaultHeaders) === null || _c === void 0 ? void 0 : _c.call(parentClient)), (_d = parentClient.getHeaders) === null || _d === void 0 ? void 0 : _d.call(parentClient)),
+ getAuthHeaders: (url) => parentClient.getAuthHeaders(url),
+ }), server_url: (_e = options.server_url) !== null && _e !== void 0 ? _e : getGoogleGenAIServerURL(parentClient) }));
+ return sdk;
+}
+class GeminiNextGenInteractions {
+ constructor(parentClient) {
+ this.parentClient = parentClient;
+ }
+ async create(params, options) {
+ const { api_version } = params, request = __rest(params, ["api_version"]);
+ if (request.stream === true) {
+ const response = await wrapSDKCall(() => this.getClient(api_version).interactions.create(Object.assign(Object.assign({}, request), { stream: true, api_version }), toGoogleGenAIRequestOptions(options, true)));
+ return wrapStreamErrors(response);
+ }
+ const response = await unwrapWithSdkHttpResponse(interactionsCreate(this.getClient(api_version), request, api_version, toGoogleGenAIRequestOptions(options)));
+ return addOutputPropertiesIfInteraction(response);
+ }
+ async get(id, params = {}, options) {
+ const { api_version, stream = false, last_event_id, include_input, } = params !== null && params !== void 0 ? params : {};
+ if (stream === true) {
+ const response = await wrapSDKCall(() => this.getClient(api_version).interactions.get(id, { stream, last_event_id, include_input, api_version }, toGoogleGenAIRequestOptions(options, true)));
+ return wrapStreamErrors(response);
+ }
+ const response = await unwrapWithSdkHttpResponse(interactionsGet(this.getClient(api_version), id, api_version, include_input, last_event_id, stream, toGoogleGenAIRequestOptions(options)));
+ return addOutputPropertiesIfInteraction(response);
+ }
+ async delete(id, params = {}, options) {
+ return wrapSDKCall(() => this.getClient(params === null || params === void 0 ? void 0 : params.api_version).interactions.delete(id, { api_version: params === null || params === void 0 ? void 0 : params.api_version }, toGoogleGenAIRequestOptions(options)));
+ }
+ async cancel(id, params = {}, options) {
+ return addOutputPropertiesIfInteraction(await unwrapWithSdkHttpResponse(interactionsCancel(this.getClient(params === null || params === void 0 ? void 0 : params.api_version), id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options))));
+ }
+ getClient(apiVersion) {
+ var _a;
+ if (apiVersion) {
+ return buildGoogleGenAIClient(this.parentClient, {
+ api_version: apiVersion,
+ });
+ }
+ (_a = this.sdk) !== null && _a !== void 0 ? _a : (this.sdk = buildGoogleGenAIClient(this.parentClient));
+ return this.sdk;
+ }
+}
+class GeminiNextGenAgents {
+ constructor(parentClient) {
+ this.parentClient = parentClient;
+ }
+ async create(params = {}, options) {
+ const _a = params !== null && params !== void 0 ? params : {}, { api_version } = _a, body = __rest(_a, ["api_version"]);
+ return unwrapWithSdkHttpResponse(agentsCreate(this.getClient(api_version), body, api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async list(params = {}, options) {
+ const { api_version, pageSize, pageToken, parent } = params !== null && params !== void 0 ? params : {};
+ return unwrapWithSdkHttpResponse(agentsList(this.getClient(api_version), api_version, pageSize, pageToken, parent, toGoogleGenAIRequestOptions(options)));
+ }
+ async get(id, params = {}, options) {
+ return unwrapWithSdkHttpResponse(agentsGet(this.getClient(params === null || params === void 0 ? void 0 : params.api_version), id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async delete(id, params = {}, options) {
+ return unwrapWithSdkHttpResponse(agentsDelete(this.getClient(params === null || params === void 0 ? void 0 : params.api_version), id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ getClient(apiVersion) {
+ var _a;
+ if (apiVersion) {
+ return buildGoogleGenAIClient(this.parentClient, {
+ api_version: apiVersion,
+ });
+ }
+ (_a = this.sdk) !== null && _a !== void 0 ? _a : (this.sdk = buildGoogleGenAIClient(this.parentClient));
+ return this.sdk;
+ }
+}
+class GeminiNextGenWebhooks {
+ constructor(parentClient) {
+ this.parentClient = parentClient;
+ }
+ async create(params, options) {
+ const { api_version } = params, body = __rest(params, ["api_version"]);
+ return unwrapWithSdkHttpResponse(webhooksCreate(this.getClient(), body, api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async list(params = {}, options) {
+ const { api_version, page_size, page_token } = params !== null && params !== void 0 ? params : {};
+ return unwrapWithSdkHttpResponse(webhooksList(this.getClient(), api_version, page_size, page_token, toGoogleGenAIRequestOptions(options)));
+ }
+ async get(id, params = {}, options) {
+ return unwrapWithSdkHttpResponse(webhooksGet(this.getClient(), id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async update(id, params = {}, options) {
+ const _a = params !== null && params !== void 0 ? params : {}, { api_version, update_mask } = _a, body = __rest(_a, ["api_version", "update_mask"]);
+ return unwrapWithSdkHttpResponse(webhooksUpdate(this.getClient(), id, api_version, update_mask, body, toGoogleGenAIRequestOptions(options)));
+ }
+ async delete(id, params = {}, options) {
+ return unwrapWithSdkHttpResponse(webhooksDelete(this.getClient(), id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async rotateSigningSecret(id, params = {}, options) {
+ const _a = params !== null && params !== void 0 ? params : {}, { api_version } = _a, body = __rest(_a, ["api_version"]);
+ return unwrapWithSdkHttpResponse(webhooksRotateSigningSecret(this.getClient(), id, api_version, body, toGoogleGenAIRequestOptions(options)));
+ }
+ async ping(id, params = undefined, options) {
+ const { api_version, body } = params !== null && params !== void 0 ? params : {};
+ return unwrapWithSdkHttpResponse(webhooksPing(this.getClient(), id, api_version, body, toGoogleGenAIRequestOptions(options)));
+ }
+ getClient() {
+ var _a;
+ (_a = this.sdk) !== null && _a !== void 0 ? _a : (this.sdk = buildGoogleGenAIClient(this.parentClient));
+ return this.sdk;
+ }
+}
+class GeminiNextGenTriggers {
+ constructor(parentClient) {
+ this.parentClient = parentClient;
+ }
+ async create(params, options) {
+ const { api_version } = params, body = __rest(params, ["api_version"]);
+ return unwrapWithSdkHttpResponse(triggersCreate(this.getClient(api_version), body, api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async list(params = {}, options) {
+ const { api_version, filter, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
+ return unwrapWithSdkHttpResponse(triggersList(this.getClient(api_version), api_version, filter, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
+ }
+ async get(id, params = {}, options) {
+ return unwrapWithSdkHttpResponse(triggersGet(this.getClient(params === null || params === void 0 ? void 0 : params.api_version), id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async update(id, params, options) {
+ const { api_version } = params, body = __rest(params, ["api_version"]);
+ return unwrapWithSdkHttpResponse(triggersUpdate(this.getClient(api_version), id, body, api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async delete(id, params = {}, options) {
+ return unwrapWithSdkHttpResponse(triggersDelete(this.getClient(params === null || params === void 0 ? void 0 : params.api_version), id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async run(trigger_id, params = {}, options) {
+ return unwrapWithSdkHttpResponse(triggersRun(this.getClient(params === null || params === void 0 ? void 0 : params.api_version), trigger_id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async listExecutions(trigger_id, params = {}, options) {
+ const { api_version, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
+ return unwrapWithSdkHttpResponse(triggersListExecutions(this.getClient(api_version), trigger_id, api_version, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
+ }
+ getClient(apiVersion) {
+ var _a;
+ if (apiVersion) {
+ return buildGoogleGenAIClient(this.parentClient, {
+ api_version: apiVersion,
+ });
+ }
+ (_a = this.sdk) !== null && _a !== void 0 ? _a : (this.sdk = buildGoogleGenAIClient(this.parentClient));
+ return this.sdk;
+ }
+}
+function trimSlashes(value) {
+ return value.replace(/^\/+|\/+$/g, "");
+}
+function toGoogleGenAIRequestOptions(options, streaming = false) {
+ var _a, _b, _c, _d;
+ if (!options && !streaming) {
+ return undefined;
+ }
+ const _e = options !== null && options !== void 0 ? options : {}, { timeout, maxRetries, defaultBaseURL, query, body, fetchOptions } = _e, rest = __rest(_e, ["timeout", "maxRetries", "defaultBaseURL", "query", "body", "fetchOptions"]);
+ const nextOptions = Object.assign({}, rest);
+ if (isPlainObject(query)) {
+ nextOptions.extra_query = query;
+ }
+ else {
+ warnIgnoredOption("query", query);
+ }
+ if (isPlainObject(body)) {
+ nextOptions.extra_body = body;
+ }
+ else {
+ warnIgnoredOption("body", body);
+ }
+ const fetch_options = (_a = rest.fetch_options) !== null && _a !== void 0 ? _a : fetchOptions;
+ if (fetch_options) {
+ nextOptions.fetch_options = fetch_options;
+ }
+ const server_url = (_b = rest.server_url) !== null && _b !== void 0 ? _b : defaultBaseURL;
+ if (server_url) {
+ nextOptions.server_url = server_url;
+ }
+ const timeout_ms = (_c = rest.timeout_ms) !== null && _c !== void 0 ? _c : timeout;
+ if (timeout_ms !== undefined) {
+ nextOptions.timeout_ms = timeout_ms;
+ }
+ if (maxRetries !== undefined) {
+ nextOptions.retries = {
+ strategy: "attempt-count-backoff",
+ retryConnectionErrors: true,
+ maxRetries,
+ };
+ }
+ if (streaming) {
+ const headers = new Headers((_d = nextOptions.headers) !== null && _d !== void 0 ? _d : fetch_options === null || fetch_options === void 0 ? void 0 : fetch_options.headers);
+ headers.set("Accept", "text/event-stream");
+ nextOptions.headers = headers;
+ }
+ return nextOptions;
+}
+function warnIgnoredOption(name, value) {
+ if (value !== undefined && value !== null) {
+ console.warn(`GoogleGenAI.interactions: request option ${name} is not supported by the Google GenAI interactions bridge and will be ignored.`);
+ }
+}
+async function unwrapWithSdkHttpResponse(promise) {
+ const [result, call] = await promise.$inspect();
+ if (!result.ok) {
+ throw wrapSDKError(result.error);
+ }
+ return attachSdkHttpResponse(result.value, call);
+}
+async function wrapSDKCall(operation) {
+ try {
+ return await operation();
+ }
+ catch (error) {
+ throw wrapSDKError(error);
+ }
+}
+function wrapStreamErrors(stream) {
+ const asyncIterable = stream;
+ return new Proxy(stream, {
+ get(target, property) {
+ if (property !== Symbol.asyncIterator) {
+ const value = Reflect.get(target, property, target);
+ return typeof value === "function" ? value.bind(target) : value;
+ }
+ return function wrappedAsyncIterator() {
+ const iterator = asyncIterable[Symbol.asyncIterator]();
+ return {
+ async next(...args) {
+ try {
+ return await iterator.next(...args);
+ }
+ catch (error) {
+ throw wrapSDKError(error);
+ }
+ },
+ async return(value) {
+ if (!iterator.return) {
+ return { done: true, value };
+ }
+ try {
+ return await iterator.return(value);
+ }
+ catch (error) {
+ throw wrapSDKError(error);
+ }
+ },
+ async throw(error) {
+ if (!iterator.throw) {
+ throw wrapSDKError(error);
+ }
+ try {
+ return await iterator.throw(error);
+ }
+ catch (caught) {
+ throw wrapSDKError(caught);
+ }
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ };
+ };
+ },
+ });
+}
+function attachSdkHttpResponse(value, call) {
+ if (!isPlainObject(value) || call.status !== "complete") {
+ return value;
+ }
+ return Object.assign(Object.assign({}, value), { sdkHttpResponse: createSdkHttpResponse(call.response, value) });
+}
+function createSdkHttpResponse(response, parsedBody) {
+ const headers = {};
+ for (const [key, value] of response.headers.entries()) {
+ headers[key] = value;
+ }
+ return {
+ headers,
+ responseInternal: response,
+ json: async () => parsedBody,
+ };
+}
+function addOutputPropertiesIfInteraction(value) {
+ const interaction = normalizeInteractionShape(value);
+ if (!interaction) {
+ return value;
+ }
+ return addOutputProperties(interaction);
+}
+function normalizeInteractionShape(value) {
+ if (!isPlainObject(value)) {
+ return undefined;
+ }
+ if (Array.isArray(value["steps"])) {
+ return value;
+ }
+ if (isLegacyLyriaInteraction(value)) {
+ const outputs = value["outputs"];
+ if (Array.isArray(outputs)) {
+ const { outputs: _outputs } = value, rest = __rest(value, ["outputs"]);
+ return Object.assign(Object.assign({}, rest), { steps: [{ type: "model_output", content: outputs }] });
+ }
+ }
+ // Every interaction response carries a steps array on the public surface
+ // even when the wire payload omits it (e.g. Lyria envelopes).
+ return Object.assign(Object.assign({}, value), { steps: [] });
+}
+function isLegacyLyriaInteraction(value) {
+ const model = value["model"];
+ return typeof model === "string" && LEGACY_LYRIA_MODELS.has(model);
+}
+function isPlainObject(value) {
+ return typeof value === "object" && value !== null && !Array.isArray(value);
+}
+function addOutputProperties(interaction) {
+ var _a, _b;
+ const normalized = normalizeInteractionDates(interaction);
+ const steps = (_a = normalized["steps"]) !== null && _a !== void 0 ? _a : [];
+ const textParts = [];
+ let collecting = false;
+ outer: for (let i = steps.length - 1; i >= 0; i--) {
+ const step = steps[i];
+ if (step.type === "user_input") {
+ break;
+ }
+ if (step.type !== "model_output" || !step.content) {
+ if (collecting) {
+ break;
+ }
+ continue;
+ }
+ const content = step.content;
+ for (let j = content.length - 1; j >= 0; j--) {
+ const item = content[j];
+ if (item.type === "text") {
+ collecting = true;
+ textParts.push((_b = item.text) !== null && _b !== void 0 ? _b : "");
+ }
+ else if (collecting) {
+ break outer;
+ }
+ }
+ }
+ let output_image;
+ let output_audio;
+ let output_video;
+ for (let i = steps.length - 1; i >= 0; i--) {
+ const step = steps[i];
+ if (step.type === "user_input") {
+ break;
+ }
+ if (step.type === "model_output" && step.content) {
+ for (let j = step.content.length - 1; j >= 0; j--) {
+ const content = step.content[j];
+ if (content.type === "image" && !output_image) {
+ output_image = content;
+ }
+ if (content.type === "audio" && !output_audio) {
+ output_audio = content;
+ }
+ if (content.type === "video" && !output_video) {
+ output_video = content;
+ }
+ }
+ }
+ }
+ const output_text = textParts.reverse().join("");
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, normalized), (output_text && { output_text })), (output_image ? { output_image } : {})), (output_audio ? { output_audio } : {})), (output_video ? { output_video } : {}));
+}
+function normalizeInteractionDates(interaction) {
+ return Object.assign(Object.assign({}, interaction), { created: normalizeDateLike(interaction["created"]), updated: normalizeDateLike(interaction["updated"]) });
+}
+function normalizeDateLike(value) {
+ return value instanceof Date ? value.toISOString() : value;
+}
+class GeminiNextGenEnvironmentFiles {
+ constructor(resolveClient) {
+ this.resolveClient = resolveClient;
+ }
+ async list(params, options) {
+ const { environment, path, page_size, page_token, recursive, api_version } = params;
+ return unwrapWithSdkHttpResponse(environmentsFilesList(this.resolveClient(api_version), environment, path, api_version, page_size, page_token, recursive, toGoogleGenAIRequestOptions(options)));
+ }
+}
+class GeminiNextGenEnvironments {
+ constructor(parentClient) {
+ this.parentClient = parentClient;
+ this.files = new GeminiNextGenEnvironmentFiles((apiVersion) => this.getClient(apiVersion));
+ }
+ async create(params, options) {
+ const { api_version } = params, body = __rest(params, ["api_version"]);
+ return unwrapWithSdkHttpResponse(environmentsCreateEnvironment(this.getClient(api_version), body, api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async list(params = {}, options) {
+ const { api_version, page_size, page_token } = params !== null && params !== void 0 ? params : {};
+ return unwrapWithSdkHttpResponse(environmentsListEnvironments(this.getClient(api_version), api_version, page_size, page_token, toGoogleGenAIRequestOptions(options)));
+ }
+ async get(id, params = {}, options) {
+ return unwrapWithSdkHttpResponse(environmentsGetEnvironment(this.getClient(params === null || params === void 0 ? void 0 : params.api_version), id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ async delete(id, params = {}, options) {
+ return unwrapWithSdkHttpResponse(environmentsDeleteEnvironment(this.getClient(params === null || params === void 0 ? void 0 : params.api_version), id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
+ }
+ getClient(apiVersion) {
+ var _a;
+ if (apiVersion) {
+ return buildGoogleGenAIClient(this.parentClient, {
+ api_version: apiVersion,
+ });
+ }
+ (_a = this.sdk) !== null && _a !== void 0 ? _a : (this.sdk = buildGoogleGenAIClient(this.parentClient));
+ return this.sdk;
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+const GOOGLE_API_KEY_HEADER = 'x-goog-api-key';
+const REQUIRED_VERTEX_AI_SCOPE = 'https://www.googleapis.com/auth/cloud-platform';
+class NodeAuth {
+ constructor(opts) {
+ if (opts.apiKey !== undefined) {
+ this.apiKey = opts.apiKey;
+ return;
+ }
+ const vertexAuthOptions = buildGoogleAuthOptions(opts.googleAuthOptions);
+ this.googleAuth = new src.GoogleAuth(vertexAuthOptions);
+ }
+ async addAuthHeaders(headers, url) {
+ if (this.apiKey !== undefined) {
+ if (this.apiKey.startsWith('auth_tokens/')) {
+ throw new Error('Ephemeral tokens are only supported by the live API.');
+ }
+ this.addKeyHeader(headers);
+ return;
+ }
+ return this.addGoogleAuthHeaders(headers, url);
+ }
+ addKeyHeader(headers) {
+ if (headers.get(GOOGLE_API_KEY_HEADER) !== null) {
+ return;
+ }
+ if (this.apiKey === undefined) {
+ // This should never happen, this method is only called
+ // when apiKey is set.
+ throw new Error('Trying to set API key header but apiKey is not set');
+ }
+ headers.append(GOOGLE_API_KEY_HEADER, this.apiKey);
+ }
+ async addGoogleAuthHeaders(headers, url) {
+ if (this.googleAuth === undefined) {
+ // This should never happen, addGoogleAuthHeaders should only be
+ // called when there is no apiKey set and in these cases googleAuth
+ // is set.
+ throw new Error('Trying to set google-auth headers but googleAuth is unset');
+ }
+ const authHeaders = await this.googleAuth.getRequestHeaders(url);
+ for (const [key, value] of authHeaders) {
+ if (headers.get(key) !== null) {
+ continue;
+ }
+ headers.append(key, value);
+ }
+ }
+}
+function buildGoogleAuthOptions(googleAuthOptions) {
+ let authOptions;
+ if (!googleAuthOptions) {
+ authOptions = {
+ scopes: [REQUIRED_VERTEX_AI_SCOPE],
+ };
+ return authOptions;
+ }
+ else {
+ authOptions = googleAuthOptions;
+ if (!authOptions.scopes) {
+ authOptions.scopes = [REQUIRED_VERTEX_AI_SCOPE];
+ return authOptions;
+ }
+ else if ((typeof authOptions.scopes === 'string' &&
+ authOptions.scopes !== REQUIRED_VERTEX_AI_SCOPE) ||
+ (Array.isArray(authOptions.scopes) &&
+ authOptions.scopes.indexOf(REQUIRED_VERTEX_AI_SCOPE) < 0)) {
+ throw new Error(`Invalid auth scopes. Scopes must include: ${REQUIRED_VERTEX_AI_SCOPE}`);
+ }
+ return authOptions;
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class NodeDownloader {
+ async download(params, apiClient) {
+ if (params.downloadPath) {
+ const response = await downloadFile(params, apiClient);
+ if (response instanceof HttpResponse) {
+ const writer = (0,external_fs_.createWriteStream)(params.downloadPath);
+ const body = external_node_stream_.Readable.fromWeb(response.responseInternal.body);
+ body.pipe(writer);
+ await (0,external_node_stream_promises_.finished)(writer);
+ }
+ else {
+ try {
+ await (0,promises_.writeFile)(params.downloadPath, response, {
+ encoding: 'base64',
+ });
+ }
+ catch (error) {
+ throw new Error(`Failed to write file to ${params.downloadPath}: ${error}`);
+ }
+ }
+ }
+ }
+}
+async function downloadFile(params, apiClient) {
+ var _a, _b, _c;
+ const name = tFileName(params.file);
+ if (name !== undefined) {
+ return await apiClient.request({
+ path: `files/${name}:download`,
+ httpMethod: 'GET',
+ queryParams: {
+ 'alt': 'media',
+ },
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ });
+ }
+ else if (isGeneratedVideo(params.file)) {
+ const videoBytes = (_c = params.file.video) === null || _c === void 0 ? void 0 : _c.videoBytes;
+ if (typeof videoBytes === 'string') {
+ return videoBytes;
+ }
+ else {
+ throw new Error('Failed to download generated video, Uri or videoBytes not found.');
+ }
+ }
+ else if (isVideo(params.file)) {
+ const videoBytes = params.file.videoBytes;
+ if (typeof videoBytes === 'string') {
+ return videoBytes;
+ }
+ else {
+ throw new Error('Failed to download video, Uri or videoBytes not found.');
+ }
+ }
+ else {
+ throw new Error('Unsupported file type');
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class NodeWebSocketFactory {
+ create(url, headers, callbacks) {
+ return new NodeWebSocket(url, headers, callbacks);
+ }
+}
+class NodeWebSocket {
+ constructor(url, headers, callbacks) {
+ this.url = url;
+ this.headers = headers;
+ this.callbacks = callbacks;
+ }
+ connect() {
+ this.ws = new websocket(this.url, { headers: this.headers });
+ this.ws.onopen = this.callbacks.onopen;
+ this.ws.onerror = this.callbacks.onerror;
+ this.ws.onclose = this.callbacks.onclose;
+ this.ws.onmessage = this.callbacks.onmessage;
+ }
+ send(message) {
+ if (this.ws === undefined) {
+ throw new Error('WebSocket is not connected');
+ }
+ this.ws.send(message);
+ }
+ close() {
+ if (this.ws === undefined) {
+ throw new Error('WebSocket is not connected');
+ }
+ this.ws.close();
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
+function cancelTuningJobParametersToMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], fromName);
+ }
+ return toObject;
+}
+function cancelTuningJobParametersToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], fromName);
+ }
+ return toObject;
+}
+function cancelTuningJobResponseFromMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ return toObject;
+}
+function cancelTuningJobResponseFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ return toObject;
+}
+function contentToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromParts = getValueByPath(fromObject, ['parts']);
+ if (fromParts != null) {
+ let transformedList = fromParts;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return partToVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['parts'], transformedList);
+ }
+ const fromRole = getValueByPath(fromObject, ['role']);
+ if (fromRole != null) {
+ setValueByPath(toObject, ['role'], fromRole);
+ }
+ return toObject;
+}
+function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['validationDataset']) !== undefined) {
+ throw new Error('validationDataset parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromTunedModelDisplayName = getValueByPath(fromObject, [
+ 'tunedModelDisplayName',
+ ]);
+ if (parentObject !== undefined && fromTunedModelDisplayName != null) {
+ setValueByPath(parentObject, ['displayName'], fromTunedModelDisplayName);
+ }
+ if (getValueByPath(fromObject, ['description']) !== undefined) {
+ throw new Error('description parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
+ if (parentObject !== undefined && fromEpochCount != null) {
+ setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'epochCount'], fromEpochCount);
+ }
+ const fromLearningRateMultiplier = getValueByPath(fromObject, [
+ 'learningRateMultiplier',
+ ]);
+ if (fromLearningRateMultiplier != null) {
+ setValueByPath(toObject, ['tuningTask', 'hyperparameters', 'learningRateMultiplier'], fromLearningRateMultiplier);
+ }
+ if (getValueByPath(fromObject, ['exportLastCheckpointOnly']) !==
+ undefined) {
+ throw new Error('exportLastCheckpointOnly parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['preTunedModelCheckpointId']) !==
+ undefined) {
+ throw new Error('preTunedModelCheckpointId parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['adapterSize']) !== undefined) {
+ throw new Error('adapterSize parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['tuningMode']) !== undefined) {
+ throw new Error('tuningMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['customBaseModel']) !== undefined) {
+ throw new Error('customBaseModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
+ if (parentObject !== undefined && fromBatchSize != null) {
+ setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'batchSize'], fromBatchSize);
+ }
+ const fromLearningRate = getValueByPath(fromObject, ['learningRate']);
+ if (parentObject !== undefined && fromLearningRate != null) {
+ setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'learningRate'], fromLearningRate);
+ }
+ if (getValueByPath(fromObject, ['labels']) !== undefined) {
+ throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['beta']) !== undefined) {
+ throw new Error('beta parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['baseTeacherModel']) !== undefined) {
+ throw new Error('baseTeacherModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['tunedTeacherModelSource']) !== undefined) {
+ throw new Error('tunedTeacherModelSource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['sftLossWeightMultiplier']) !== undefined) {
+ throw new Error('sftLossWeightMultiplier parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['outputUri']) !== undefined) {
+ throw new Error('outputUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['rewardConfig']) !== undefined) {
+ throw new Error('rewardConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['compositeRewardConfig']) !== undefined) {
+ throw new Error('compositeRewardConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['samplesPerPrompt']) !== undefined) {
+ throw new Error('samplesPerPrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['evaluateInterval']) !== undefined) {
+ throw new Error('evaluateInterval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['checkpointInterval']) !== undefined) {
+ throw new Error('checkpointInterval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['maxOutputTokens']) !== undefined) {
+ throw new Error('maxOutputTokens parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['thinkingLevel']) !== undefined) {
+ throw new Error('thinkingLevel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['validationDatasetUri']) !== undefined) {
+ throw new Error('validationDatasetUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['encryptionSpec']) !== undefined) {
+ throw new Error('encryptionSpec parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ return toObject;
+}
+function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
+ const toObject = {};
+ let discriminatorValidationDataset = getValueByPath(rootObject, [
+ 'config',
+ 'method',
+ ]);
+ if (discriminatorValidationDataset === undefined) {
+ discriminatorValidationDataset = 'SUPERVISED_FINE_TUNING';
+ }
+ if (discriminatorValidationDataset === 'SUPERVISED_FINE_TUNING') {
+ const fromValidationDataset = getValueByPath(fromObject, [
+ 'validationDataset',
+ ]);
+ if (parentObject !== undefined && fromValidationDataset != null) {
+ setValueByPath(parentObject, ['supervisedTuningSpec'], tuningValidationDatasetToVertex(fromValidationDataset));
+ }
+ }
+ else if (discriminatorValidationDataset === 'PREFERENCE_TUNING') {
+ const fromValidationDataset = getValueByPath(fromObject, [
+ 'validationDataset',
+ ]);
+ if (parentObject !== undefined && fromValidationDataset != null) {
+ setValueByPath(parentObject, ['preferenceOptimizationSpec'], tuningValidationDatasetToVertex(fromValidationDataset));
+ }
+ }
+ else if (discriminatorValidationDataset === 'DISTILLATION') {
+ const fromValidationDataset = getValueByPath(fromObject, [
+ 'validationDataset',
+ ]);
+ if (parentObject !== undefined && fromValidationDataset != null) {
+ setValueByPath(parentObject, ['distillationSpec'], tuningValidationDatasetToVertex(fromValidationDataset));
+ }
+ }
+ else if (discriminatorValidationDataset === 'REINFORCEMENT_TUNING') {
+ const fromValidationDataset = getValueByPath(fromObject, [
+ 'validationDataset',
+ ]);
+ if (parentObject !== undefined && fromValidationDataset != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec'], tuningValidationDatasetToVertex(fromValidationDataset));
+ }
+ }
+ const fromTunedModelDisplayName = getValueByPath(fromObject, [
+ 'tunedModelDisplayName',
+ ]);
+ if (parentObject !== undefined && fromTunedModelDisplayName != null) {
+ setValueByPath(parentObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
+ }
+ const fromDescription = getValueByPath(fromObject, ['description']);
+ if (parentObject !== undefined && fromDescription != null) {
+ setValueByPath(parentObject, ['description'], fromDescription);
+ }
+ let discriminatorEpochCount = getValueByPath(rootObject, [
+ 'config',
+ 'method',
+ ]);
+ if (discriminatorEpochCount === undefined) {
+ discriminatorEpochCount = 'SUPERVISED_FINE_TUNING';
+ }
+ if (discriminatorEpochCount === 'SUPERVISED_FINE_TUNING') {
+ const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
+ if (parentObject !== undefined && fromEpochCount != null) {
+ setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'epochCount'], fromEpochCount);
+ }
+ }
+ else if (discriminatorEpochCount === 'PREFERENCE_TUNING') {
+ const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
+ if (parentObject !== undefined && fromEpochCount != null) {
+ setValueByPath(parentObject, ['preferenceOptimizationSpec', 'hyperParameters', 'epochCount'], fromEpochCount);
+ }
+ }
+ else if (discriminatorEpochCount === 'DISTILLATION') {
+ const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
+ if (parentObject !== undefined && fromEpochCount != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'epochCount'], fromEpochCount);
+ }
+ }
+ else if (discriminatorEpochCount === 'REINFORCEMENT_TUNING') {
+ const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
+ if (parentObject !== undefined && fromEpochCount != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'hyperParameters', 'epochCount'], fromEpochCount);
+ }
+ }
+ let discriminatorLearningRateMultiplier = getValueByPath(rootObject, [
+ 'config',
+ 'method',
+ ]);
+ if (discriminatorLearningRateMultiplier === undefined) {
+ discriminatorLearningRateMultiplier = 'SUPERVISED_FINE_TUNING';
+ }
+ if (discriminatorLearningRateMultiplier === 'SUPERVISED_FINE_TUNING') {
+ const fromLearningRateMultiplier = getValueByPath(fromObject, [
+ 'learningRateMultiplier',
+ ]);
+ if (parentObject !== undefined && fromLearningRateMultiplier != null) {
+ setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'learningRateMultiplier'], fromLearningRateMultiplier);
+ }
+ }
+ else if (discriminatorLearningRateMultiplier === 'PREFERENCE_TUNING') {
+ const fromLearningRateMultiplier = getValueByPath(fromObject, [
+ 'learningRateMultiplier',
+ ]);
+ if (parentObject !== undefined && fromLearningRateMultiplier != null) {
+ setValueByPath(parentObject, [
+ 'preferenceOptimizationSpec',
+ 'hyperParameters',
+ 'learningRateMultiplier',
+ ], fromLearningRateMultiplier);
+ }
+ }
+ else if (discriminatorLearningRateMultiplier === 'DISTILLATION') {
+ const fromLearningRateMultiplier = getValueByPath(fromObject, [
+ 'learningRateMultiplier',
+ ]);
+ if (parentObject !== undefined && fromLearningRateMultiplier != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'learningRateMultiplier'], fromLearningRateMultiplier);
+ }
+ }
+ else if (discriminatorLearningRateMultiplier === 'REINFORCEMENT_TUNING') {
+ const fromLearningRateMultiplier = getValueByPath(fromObject, [
+ 'learningRateMultiplier',
+ ]);
+ if (parentObject !== undefined && fromLearningRateMultiplier != null) {
+ setValueByPath(parentObject, [
+ 'reinforcementTuningSpec',
+ 'hyperParameters',
+ 'learningRateMultiplier',
+ ], fromLearningRateMultiplier);
+ }
+ }
+ let discriminatorExportLastCheckpointOnly = getValueByPath(rootObject, ['config', 'method']);
+ if (discriminatorExportLastCheckpointOnly === undefined) {
+ discriminatorExportLastCheckpointOnly = 'SUPERVISED_FINE_TUNING';
+ }
+ if (discriminatorExportLastCheckpointOnly === 'SUPERVISED_FINE_TUNING') {
+ const fromExportLastCheckpointOnly = getValueByPath(fromObject, [
+ 'exportLastCheckpointOnly',
+ ]);
+ if (parentObject !== undefined && fromExportLastCheckpointOnly != null) {
+ setValueByPath(parentObject, ['supervisedTuningSpec', 'exportLastCheckpointOnly'], fromExportLastCheckpointOnly);
+ }
+ }
+ else if (discriminatorExportLastCheckpointOnly === 'PREFERENCE_TUNING') {
+ const fromExportLastCheckpointOnly = getValueByPath(fromObject, [
+ 'exportLastCheckpointOnly',
+ ]);
+ if (parentObject !== undefined && fromExportLastCheckpointOnly != null) {
+ setValueByPath(parentObject, ['preferenceOptimizationSpec', 'exportLastCheckpointOnly'], fromExportLastCheckpointOnly);
+ }
+ }
+ else if (discriminatorExportLastCheckpointOnly === 'DISTILLATION') {
+ const fromExportLastCheckpointOnly = getValueByPath(fromObject, [
+ 'exportLastCheckpointOnly',
+ ]);
+ if (parentObject !== undefined && fromExportLastCheckpointOnly != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'exportLastCheckpointOnly'], fromExportLastCheckpointOnly);
+ }
+ }
+ let discriminatorAdapterSize = getValueByPath(rootObject, [
+ 'config',
+ 'method',
+ ]);
+ if (discriminatorAdapterSize === undefined) {
+ discriminatorAdapterSize = 'SUPERVISED_FINE_TUNING';
+ }
+ if (discriminatorAdapterSize === 'SUPERVISED_FINE_TUNING') {
+ const fromAdapterSize = getValueByPath(fromObject, ['adapterSize']);
+ if (parentObject !== undefined && fromAdapterSize != null) {
+ setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'adapterSize'], fromAdapterSize);
+ }
+ }
+ else if (discriminatorAdapterSize === 'PREFERENCE_TUNING') {
+ const fromAdapterSize = getValueByPath(fromObject, ['adapterSize']);
+ if (parentObject !== undefined && fromAdapterSize != null) {
+ setValueByPath(parentObject, ['preferenceOptimizationSpec', 'hyperParameters', 'adapterSize'], fromAdapterSize);
+ }
+ }
+ else if (discriminatorAdapterSize === 'DISTILLATION') {
+ const fromAdapterSize = getValueByPath(fromObject, ['adapterSize']);
+ if (parentObject !== undefined && fromAdapterSize != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'adapterSize'], fromAdapterSize);
+ }
+ }
+ else if (discriminatorAdapterSize === 'REINFORCEMENT_TUNING') {
+ const fromAdapterSize = getValueByPath(fromObject, ['adapterSize']);
+ if (parentObject !== undefined && fromAdapterSize != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'hyperParameters', 'adapterSize'], fromAdapterSize);
+ }
+ }
+ let discriminatorTuningMode = getValueByPath(rootObject, [
+ 'config',
+ 'method',
+ ]);
+ if (discriminatorTuningMode === undefined) {
+ discriminatorTuningMode = 'SUPERVISED_FINE_TUNING';
+ }
+ if (discriminatorTuningMode === 'SUPERVISED_FINE_TUNING') {
+ const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
+ if (parentObject !== undefined && fromTuningMode != null) {
+ setValueByPath(parentObject, ['supervisedTuningSpec', 'tuningMode'], fromTuningMode);
+ }
+ }
+ else if (discriminatorTuningMode === 'DISTILLATION') {
+ const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
+ if (parentObject !== undefined && fromTuningMode != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'tuningMode'], fromTuningMode);
+ }
+ }
+ const fromCustomBaseModel = getValueByPath(fromObject, [
+ 'customBaseModel',
+ ]);
+ if (parentObject !== undefined && fromCustomBaseModel != null) {
+ setValueByPath(parentObject, ['customBaseModel'], fromCustomBaseModel);
+ }
+ let discriminatorBatchSize = getValueByPath(rootObject, [
+ 'config',
+ 'method',
+ ]);
+ if (discriminatorBatchSize === undefined) {
+ discriminatorBatchSize = 'SUPERVISED_FINE_TUNING';
+ }
+ if (discriminatorBatchSize === 'SUPERVISED_FINE_TUNING') {
+ const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
+ if (parentObject !== undefined && fromBatchSize != null) {
+ setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
+ }
+ }
+ else if (discriminatorBatchSize === 'DISTILLATION') {
+ const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
+ if (parentObject !== undefined && fromBatchSize != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
+ }
+ }
+ else if (discriminatorBatchSize === 'REINFORCEMENT_TUNING') {
+ const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
+ if (parentObject !== undefined && fromBatchSize != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
+ }
+ }
+ let discriminatorLearningRate = getValueByPath(rootObject, [
+ 'config',
+ 'method',
+ ]);
+ if (discriminatorLearningRate === undefined) {
+ discriminatorLearningRate = 'SUPERVISED_FINE_TUNING';
+ }
+ if (discriminatorLearningRate === 'SUPERVISED_FINE_TUNING') {
+ const fromLearningRate = getValueByPath(fromObject, [
+ 'learningRate',
+ ]);
+ if (parentObject !== undefined && fromLearningRate != null) {
+ setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
+ }
+ }
+ else if (discriminatorLearningRate === 'DISTILLATION') {
+ const fromLearningRate = getValueByPath(fromObject, [
+ 'learningRate',
+ ]);
+ if (parentObject !== undefined && fromLearningRate != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
+ }
+ }
+ const fromLabels = getValueByPath(fromObject, ['labels']);
+ if (parentObject !== undefined && fromLabels != null) {
+ setValueByPath(parentObject, ['labels'], fromLabels);
+ }
+ const fromBeta = getValueByPath(fromObject, ['beta']);
+ if (parentObject !== undefined && fromBeta != null) {
+ setValueByPath(parentObject, ['preferenceOptimizationSpec', 'hyperParameters', 'beta'], fromBeta);
+ }
+ const fromBaseTeacherModel = getValueByPath(fromObject, [
+ 'baseTeacherModel',
+ ]);
+ if (parentObject !== undefined && fromBaseTeacherModel != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'baseTeacherModel'], fromBaseTeacherModel);
+ }
+ const fromTunedTeacherModelSource = getValueByPath(fromObject, [
+ 'tunedTeacherModelSource',
+ ]);
+ if (parentObject !== undefined && fromTunedTeacherModelSource != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'tunedTeacherModelSource'], fromTunedTeacherModelSource);
+ }
+ const fromSftLossWeightMultiplier = getValueByPath(fromObject, [
+ 'sftLossWeightMultiplier',
+ ]);
+ if (parentObject !== undefined && fromSftLossWeightMultiplier != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'sftLossWeightMultiplier'], fromSftLossWeightMultiplier);
+ }
+ const fromOutputUri = getValueByPath(fromObject, ['outputUri']);
+ if (parentObject !== undefined && fromOutputUri != null) {
+ setValueByPath(parentObject, ['outputUri'], fromOutputUri);
+ }
+ const fromRewardConfig = getValueByPath(fromObject, ['rewardConfig']);
+ if (parentObject !== undefined && fromRewardConfig != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'singleRewardConfig'], fromRewardConfig);
+ }
+ const fromCompositeRewardConfig = getValueByPath(fromObject, [
+ 'compositeRewardConfig',
+ ]);
+ if (parentObject !== undefined && fromCompositeRewardConfig != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'compositeRewardConfig'], fromCompositeRewardConfig);
+ }
+ const fromSamplesPerPrompt = getValueByPath(fromObject, [
+ 'samplesPerPrompt',
+ ]);
+ if (parentObject !== undefined && fromSamplesPerPrompt != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'hyperParameters', 'samplesPerPrompt'], fromSamplesPerPrompt);
+ }
+ const fromEvaluateInterval = getValueByPath(fromObject, [
+ 'evaluateInterval',
+ ]);
+ if (parentObject !== undefined && fromEvaluateInterval != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'hyperParameters', 'evaluateInterval'], fromEvaluateInterval);
+ }
+ const fromCheckpointInterval = getValueByPath(fromObject, [
+ 'checkpointInterval',
+ ]);
+ if (parentObject !== undefined && fromCheckpointInterval != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'hyperParameters', 'checkpointInterval'], fromCheckpointInterval);
+ }
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
+ 'maxOutputTokens',
+ ]);
+ if (parentObject !== undefined && fromMaxOutputTokens != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'hyperParameters', 'maxOutputTokens'], fromMaxOutputTokens);
+ }
+ const fromThinkingLevel = getValueByPath(fromObject, [
+ 'thinkingLevel',
+ ]);
+ if (parentObject !== undefined && fromThinkingLevel != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'hyperParameters', 'thinkingLevel'], fromThinkingLevel);
+ }
+ const fromValidationDatasetUri = getValueByPath(fromObject, [
+ 'validationDatasetUri',
+ ]);
+ if (parentObject !== undefined && fromValidationDatasetUri != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'validationDatasetUri'], fromValidationDatasetUri);
+ }
+ const fromEncryptionSpec = getValueByPath(fromObject, [
+ 'encryptionSpec',
+ ]);
+ if (parentObject !== undefined && fromEncryptionSpec != null) {
+ setValueByPath(parentObject, ['encryptionSpec'], fromEncryptionSpec);
+ }
+ return toObject;
+}
+function createTuningJobParametersPrivateToMldev(fromObject, rootObject) {
+ const toObject = {};
+ const fromBaseModel = getValueByPath(fromObject, ['baseModel']);
+ if (fromBaseModel != null) {
+ setValueByPath(toObject, ['baseModel'], fromBaseModel);
+ }
+ const fromPreTunedModel = getValueByPath(fromObject, [
+ 'preTunedModel',
+ ]);
+ if (fromPreTunedModel != null) {
+ setValueByPath(toObject, ['preTunedModel'], fromPreTunedModel);
+ }
+ const fromTrainingDataset = getValueByPath(fromObject, [
+ 'trainingDataset',
+ ]);
+ if (fromTrainingDataset != null) {
+ tuningDatasetToMldev(fromTrainingDataset);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ createTuningJobConfigToMldev(fromConfig, toObject);
+ }
+ return toObject;
+}
+function createTuningJobParametersPrivateToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromBaseModel = getValueByPath(fromObject, ['baseModel']);
+ if (fromBaseModel != null) {
+ setValueByPath(toObject, ['baseModel'], fromBaseModel);
+ }
+ const fromPreTunedModel = getValueByPath(fromObject, [
+ 'preTunedModel',
+ ]);
+ if (fromPreTunedModel != null) {
+ setValueByPath(toObject, ['preTunedModel'], fromPreTunedModel);
+ }
+ const fromTrainingDataset = getValueByPath(fromObject, [
+ 'trainingDataset',
+ ]);
+ if (fromTrainingDataset != null) {
+ tuningDatasetToVertex(fromTrainingDataset, toObject, rootObject);
+ }
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ createTuningJobConfigToVertex(fromConfig, toObject, rootObject);
+ }
+ return toObject;
+}
+function distillationHyperParametersFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
+ if (fromEpochCount != null) {
+ setValueByPath(toObject, ['epochCount'], fromEpochCount);
+ }
+ const fromLearningRateMultiplier = getValueByPath(fromObject, [
+ 'learningRateMultiplier',
+ ]);
+ if (fromLearningRateMultiplier != null) {
+ setValueByPath(toObject, ['learningRateMultiplier'], fromLearningRateMultiplier);
+ }
+ const fromAdapterSize = getValueByPath(fromObject, ['adapterSize']);
+ if (fromAdapterSize != null) {
+ setValueByPath(toObject, ['adapterSize'], fromAdapterSize);
+ }
+ const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
+ if (fromBatchSize != null) {
+ setValueByPath(toObject, ['batchSize'], fromBatchSize);
+ }
+ const fromLearningRate = getValueByPath(fromObject, ['learningRate']);
+ if (fromLearningRate != null) {
+ setValueByPath(toObject, ['learningRate'], fromLearningRate);
+ }
+ const fromGenerationConfig = getValueByPath(fromObject, [
+ 'generationConfig',
+ ]);
+ if (fromGenerationConfig != null) {
+ setValueByPath(toObject, ['generationConfig'], generationConfigFromVertex(fromGenerationConfig));
+ }
+ return toObject;
+}
+function distillationSamplingSpecFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromPromptDatasetUri = getValueByPath(fromObject, [
+ 'promptDatasetUri',
+ ]);
+ if (fromPromptDatasetUri != null) {
+ setValueByPath(toObject, ['promptDatasetUri'], fromPromptDatasetUri);
+ }
+ const fromValidationDatasetUri = getValueByPath(fromObject, [
+ 'validationDatasetUri',
+ ]);
+ if (fromValidationDatasetUri != null) {
+ setValueByPath(toObject, ['validationDatasetUri'], fromValidationDatasetUri);
+ }
+ const fromBaseTeacherModel = getValueByPath(fromObject, [
+ 'baseTeacherModel',
+ ]);
+ if (fromBaseTeacherModel != null) {
+ setValueByPath(toObject, ['baseTeacherModel'], fromBaseTeacherModel);
+ }
+ const fromTunedTeacherModelSource = getValueByPath(fromObject, [
+ 'tunedTeacherModelSource',
+ ]);
+ if (fromTunedTeacherModelSource != null) {
+ setValueByPath(toObject, ['tunedTeacherModelSource'], fromTunedTeacherModelSource);
+ }
+ const fromHyperparameters = getValueByPath(fromObject, [
+ 'hyperparameters',
+ ]);
+ if (fromHyperparameters != null) {
+ setValueByPath(toObject, ['hyperparameters'], distillationHyperParametersFromVertex(fromHyperparameters));
+ }
+ return toObject;
+}
+function distillationSpecFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromBaseTeacherModel = getValueByPath(fromObject, [
+ 'baseTeacherModel',
+ ]);
+ if (fromBaseTeacherModel != null) {
+ setValueByPath(toObject, ['baseTeacherModel'], fromBaseTeacherModel);
+ }
+ const fromHyperParameters = getValueByPath(fromObject, [
+ 'hyperParameters',
+ ]);
+ if (fromHyperParameters != null) {
+ setValueByPath(toObject, ['hyperParameters'], distillationHyperParametersFromVertex(fromHyperParameters));
+ }
+ const fromPipelineRootDirectory = getValueByPath(fromObject, [
+ 'pipelineRootDirectory',
+ ]);
+ if (fromPipelineRootDirectory != null) {
+ setValueByPath(toObject, ['pipelineRootDirectory'], fromPipelineRootDirectory);
+ }
+ const fromPromptDatasetUri = getValueByPath(fromObject, [
+ 'promptDatasetUri',
+ ]);
+ if (fromPromptDatasetUri != null) {
+ setValueByPath(toObject, ['promptDatasetUri'], fromPromptDatasetUri);
+ }
+ const fromStudentModel = getValueByPath(fromObject, ['studentModel']);
+ if (fromStudentModel != null) {
+ setValueByPath(toObject, ['studentModel'], fromStudentModel);
+ }
+ const fromTrainingDatasetUri = getValueByPath(fromObject, [
+ 'trainingDatasetUri',
+ ]);
+ if (fromTrainingDatasetUri != null) {
+ setValueByPath(toObject, ['trainingDatasetUri'], fromTrainingDatasetUri);
+ }
+ const fromTunedTeacherModelSource = getValueByPath(fromObject, [
+ 'tunedTeacherModelSource',
+ ]);
+ if (fromTunedTeacherModelSource != null) {
+ setValueByPath(toObject, ['tunedTeacherModelSource'], fromTunedTeacherModelSource);
+ }
+ const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
+ if (fromTuningMode != null) {
+ setValueByPath(toObject, ['tuningMode'], fromTuningMode);
+ }
+ const fromValidationDatasetUri = getValueByPath(fromObject, [
+ 'validationDatasetUri',
+ ]);
+ if (fromValidationDatasetUri != null) {
+ setValueByPath(toObject, ['validationDatasetUri'], fromValidationDatasetUri);
+ }
+ return toObject;
+}
+function generationConfigFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromModelSelectionConfig = getValueByPath(fromObject, [
+ 'modelConfig',
+ ]);
+ if (fromModelSelectionConfig != null) {
+ setValueByPath(toObject, ['modelSelectionConfig'], fromModelSelectionConfig);
+ }
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
+ 'responseJsonSchema',
+ ]);
+ if (fromResponseJsonSchema != null) {
+ setValueByPath(toObject, ['responseJsonSchema'], tJsonSchema(fromResponseJsonSchema));
+ }
+ const fromAudioTranscriptionConfig = getValueByPath(fromObject, [
+ 'audioTranscriptionConfig',
+ ]);
+ if (fromAudioTranscriptionConfig != null) {
+ setValueByPath(toObject, ['audioTranscriptionConfig'], fromAudioTranscriptionConfig);
+ }
+ const fromAudioTimestamp = getValueByPath(fromObject, [
+ 'audioTimestamp',
+ ]);
+ if (fromAudioTimestamp != null) {
+ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);
+ }
+ const fromCandidateCount = getValueByPath(fromObject, [
+ 'candidateCount',
+ ]);
+ if (fromCandidateCount != null) {
+ setValueByPath(toObject, ['candidateCount'], fromCandidateCount);
+ }
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
+ 'enableAffectiveDialog',
+ ]);
+ if (fromEnableAffectiveDialog != null) {
+ setValueByPath(toObject, ['enableAffectiveDialog'], fromEnableAffectiveDialog);
+ }
+ const fromFrequencyPenalty = getValueByPath(fromObject, [
+ 'frequencyPenalty',
+ ]);
+ if (fromFrequencyPenalty != null) {
+ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);
+ }
+ const fromLogprobs = getValueByPath(fromObject, ['logprobs']);
+ if (fromLogprobs != null) {
+ setValueByPath(toObject, ['logprobs'], fromLogprobs);
+ }
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
+ 'maxOutputTokens',
+ ]);
+ if (fromMaxOutputTokens != null) {
+ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);
+ }
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ const fromPresencePenalty = getValueByPath(fromObject, [
+ 'presencePenalty',
+ ]);
+ if (fromPresencePenalty != null) {
+ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);
+ }
+ const fromResponseFormat = getValueByPath(fromObject, [
+ 'responseFormat',
+ ]);
+ if (fromResponseFormat != null) {
+ let transformedList = fromResponseFormat;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['responseFormat'], transformedList);
+ }
+ const fromResponseLogprobs = getValueByPath(fromObject, [
+ 'responseLogprobs',
+ ]);
+ if (fromResponseLogprobs != null) {
+ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);
+ }
+ const fromResponseMimeType = getValueByPath(fromObject, [
+ 'responseMimeType',
+ ]);
+ if (fromResponseMimeType != null) {
+ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);
+ }
+ const fromResponseModalities = getValueByPath(fromObject, [
+ 'responseModalities',
+ ]);
+ if (fromResponseModalities != null) {
+ setValueByPath(toObject, ['responseModalities'], fromResponseModalities);
+ }
+ const fromResponseSchema = getValueByPath(fromObject, [
+ 'responseSchema',
+ ]);
+ if (fromResponseSchema != null) {
+ setValueByPath(toObject, ['responseSchema'], fromResponseSchema);
+ }
+ const fromRoutingConfig = getValueByPath(fromObject, [
+ 'routingConfig',
+ ]);
+ if (fromRoutingConfig != null) {
+ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);
+ }
+ const fromSeed = getValueByPath(fromObject, ['seed']);
+ if (fromSeed != null) {
+ setValueByPath(toObject, ['seed'], fromSeed);
+ }
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
+ if (fromSpeechConfig != null) {
+ setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
+ }
+ const fromStopSequences = getValueByPath(fromObject, [
+ 'stopSequences',
+ ]);
+ if (fromStopSequences != null) {
+ setValueByPath(toObject, ['stopSequences'], fromStopSequences);
+ }
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
+ if (fromTemperature != null) {
+ setValueByPath(toObject, ['temperature'], fromTemperature);
+ }
+ const fromThinkingConfig = getValueByPath(fromObject, [
+ 'thinkingConfig',
+ ]);
+ if (fromThinkingConfig != null) {
+ setValueByPath(toObject, ['thinkingConfig'], fromThinkingConfig);
+ }
+ const fromTopK = getValueByPath(fromObject, ['topK']);
+ if (fromTopK != null) {
+ setValueByPath(toObject, ['topK'], fromTopK);
+ }
+ const fromTopP = getValueByPath(fromObject, ['topP']);
+ if (fromTopP != null) {
+ setValueByPath(toObject, ['topP'], fromTopP);
+ }
+ return toObject;
+}
+function getTuningJobParametersToMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], fromName);
+ }
+ return toObject;
+}
+function getTuningJobParametersToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['_url', 'name'], fromName);
+ }
+ return toObject;
+}
+function listTuningJobsConfigToVertex(fromObject, parentObject, _rootObject) {
+ const toObject = {};
+ const fromPageSize = getValueByPath(fromObject, ['pageSize']);
+ if (parentObject !== undefined && fromPageSize != null) {
+ setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
+ }
+ const fromPageToken = getValueByPath(fromObject, ['pageToken']);
+ if (parentObject !== undefined && fromPageToken != null) {
+ setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
+ }
+ const fromFilter = getValueByPath(fromObject, ['filter']);
+ if (parentObject !== undefined && fromFilter != null) {
+ setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
+ }
+ return toObject;
+}
+function listTuningJobsParametersToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromConfig = getValueByPath(fromObject, ['config']);
+ if (fromConfig != null) {
+ listTuningJobsConfigToVertex(fromConfig, toObject);
+ }
+ return toObject;
+}
+function listTuningJobsResponseFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromNextPageToken = getValueByPath(fromObject, [
+ 'nextPageToken',
+ ]);
+ if (fromNextPageToken != null) {
+ setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);
+ }
+ const fromTuningJobs = getValueByPath(fromObject, ['tuningJobs']);
+ if (fromTuningJobs != null) {
+ let transformedList = fromTuningJobs;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return tuningJobFromVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['tuningJobs'], transformedList);
+ }
+ return toObject;
+}
+function partToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromMediaResolution = getValueByPath(fromObject, [
+ 'mediaResolution',
+ ]);
+ if (fromMediaResolution != null) {
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
+ }
+ if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
+ throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
+ throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ const fromAudioTranscription = getValueByPath(fromObject, [
+ 'audioTranscription',
+ ]);
+ if (fromAudioTranscription != null) {
+ setValueByPath(toObject, ['audioTranscription'], fromAudioTranscription);
+ }
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
+ 'codeExecutionResult',
+ ]);
+ if (fromCodeExecutionResult != null) {
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
+ }
+ const fromExecutableCode = getValueByPath(fromObject, [
+ 'executableCode',
+ ]);
+ if (fromExecutableCode != null) {
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
+ }
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
+ if (fromFileData != null) {
+ setValueByPath(toObject, ['fileData'], fromFileData);
+ }
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
+ if (fromFunctionCall != null) {
+ setValueByPath(toObject, ['functionCall'], fromFunctionCall);
+ }
+ const fromFunctionResponse = getValueByPath(fromObject, [
+ 'functionResponse',
+ ]);
+ if (fromFunctionResponse != null) {
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
+ }
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
+ if (fromInlineData != null) {
+ setValueByPath(toObject, ['inlineData'], fromInlineData);
+ }
+ const fromText = getValueByPath(fromObject, ['text']);
+ if (fromText != null) {
+ setValueByPath(toObject, ['text'], fromText);
+ }
+ const fromThought = getValueByPath(fromObject, ['thought']);
+ if (fromThought != null) {
+ setValueByPath(toObject, ['thought'], fromThought);
+ }
+ const fromThoughtSignature = getValueByPath(fromObject, [
+ 'thoughtSignature',
+ ]);
+ if (fromThoughtSignature != null) {
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
+ }
+ const fromVideoMetadata = getValueByPath(fromObject, [
+ 'videoMetadata',
+ ]);
+ if (fromVideoMetadata != null) {
+ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
+ }
+ if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
+ throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ const fromMediaProcessing = getValueByPath(fromObject, [
+ 'mediaProcessing',
+ ]);
+ if (fromMediaProcessing != null) {
+ setValueByPath(toObject, ['mediaProcessing'], fromMediaProcessing);
+ }
+ return toObject;
+}
+function reinforcementTuningExampleToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromReferences = getValueByPath(fromObject, ['references']);
+ if (fromReferences != null) {
+ setValueByPath(toObject, ['references'], fromReferences);
+ }
+ const fromContents = getValueByPath(fromObject, ['contents']);
+ if (fromContents != null) {
+ let transformedList = fromContents;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return contentToVertex(item);
+ });
+ }
+ setValueByPath(toObject, ['contents'], transformedList);
+ }
+ const fromSystemInstruction = getValueByPath(fromObject, [
+ 'systemInstruction',
+ ]);
+ if (fromSystemInstruction != null) {
+ setValueByPath(toObject, ['systemInstruction'], contentToVertex(fromSystemInstruction));
+ }
+ return toObject;
+}
+function tunedModelFromMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromModel = getValueByPath(fromObject, ['name']);
+ if (fromModel != null) {
+ setValueByPath(toObject, ['model'], fromModel);
+ }
+ const fromEndpoint = getValueByPath(fromObject, ['name']);
+ if (fromEndpoint != null) {
+ setValueByPath(toObject, ['endpoint'], fromEndpoint);
+ }
+ return toObject;
+}
+function tuningDatasetToMldev(fromObject, _rootObject) {
+ const toObject = {};
+ if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
+ throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ if (getValueByPath(fromObject, ['vertexDatasetResource']) !== undefined) {
+ throw new Error('vertexDatasetResource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
+ }
+ const fromExamples = getValueByPath(fromObject, ['examples']);
+ if (fromExamples != null) {
+ let transformedList = fromExamples;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['examples', 'examples'], transformedList);
+ }
+ return toObject;
+}
+function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
+ const toObject = {};
+ let discriminatorGcsUri = getValueByPath(rootObject, [
+ 'config',
+ 'method',
+ ]);
+ if (discriminatorGcsUri === undefined) {
+ discriminatorGcsUri = 'SUPERVISED_FINE_TUNING';
+ }
+ if (discriminatorGcsUri === 'SUPERVISED_FINE_TUNING') {
+ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
+ if (parentObject !== undefined && fromGcsUri != null) {
+ setValueByPath(parentObject, ['supervisedTuningSpec', 'trainingDatasetUri'], fromGcsUri);
+ }
+ }
+ else if (discriminatorGcsUri === 'PREFERENCE_TUNING') {
+ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
+ if (parentObject !== undefined && fromGcsUri != null) {
+ setValueByPath(parentObject, ['preferenceOptimizationSpec', 'trainingDatasetUri'], fromGcsUri);
+ }
+ }
+ else if (discriminatorGcsUri === 'DISTILLATION') {
+ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
+ if (parentObject !== undefined && fromGcsUri != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'promptDatasetUri'], fromGcsUri);
+ }
+ }
+ else if (discriminatorGcsUri === 'REINFORCEMENT_TUNING') {
+ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
+ if (parentObject !== undefined && fromGcsUri != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'trainingDatasetUri'], fromGcsUri);
+ }
+ }
+ let discriminatorVertexDatasetResource = getValueByPath(rootObject, [
+ 'config',
+ 'method',
+ ]);
+ if (discriminatorVertexDatasetResource === undefined) {
+ discriminatorVertexDatasetResource = 'SUPERVISED_FINE_TUNING';
+ }
+ if (discriminatorVertexDatasetResource === 'SUPERVISED_FINE_TUNING') {
+ const fromVertexDatasetResource = getValueByPath(fromObject, [
+ 'vertexDatasetResource',
+ ]);
+ if (parentObject !== undefined && fromVertexDatasetResource != null) {
+ setValueByPath(parentObject, ['supervisedTuningSpec', 'trainingDatasetUri'], fromVertexDatasetResource);
+ }
+ }
+ else if (discriminatorVertexDatasetResource === 'PREFERENCE_TUNING') {
+ const fromVertexDatasetResource = getValueByPath(fromObject, [
+ 'vertexDatasetResource',
+ ]);
+ if (parentObject !== undefined && fromVertexDatasetResource != null) {
+ setValueByPath(parentObject, ['preferenceOptimizationSpec', 'trainingDatasetUri'], fromVertexDatasetResource);
+ }
+ }
+ else if (discriminatorVertexDatasetResource === 'DISTILLATION') {
+ const fromVertexDatasetResource = getValueByPath(fromObject, [
+ 'vertexDatasetResource',
+ ]);
+ if (parentObject !== undefined && fromVertexDatasetResource != null) {
+ setValueByPath(parentObject, ['distillationSpec', 'promptDatasetUri'], fromVertexDatasetResource);
+ }
+ }
+ else if (discriminatorVertexDatasetResource === 'REINFORCEMENT_TUNING') {
+ const fromVertexDatasetResource = getValueByPath(fromObject, [
+ 'vertexDatasetResource',
+ ]);
+ if (parentObject !== undefined && fromVertexDatasetResource != null) {
+ setValueByPath(parentObject, ['reinforcementTuningSpec', 'trainingDatasetUri'], fromVertexDatasetResource);
+ }
+ }
+ if (getValueByPath(fromObject, ['examples']) !== undefined) {
+ throw new Error('examples parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
+ }
+ return toObject;
+}
+function tuningJobFromMldev(fromObject, rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromState = getValueByPath(fromObject, ['state']);
+ if (fromState != null) {
+ setValueByPath(toObject, ['state'], tTuningJobStatus(fromState));
+ }
+ const fromCreateTime = getValueByPath(fromObject, ['createTime']);
+ if (fromCreateTime != null) {
+ setValueByPath(toObject, ['createTime'], fromCreateTime);
+ }
+ const fromStartTime = getValueByPath(fromObject, [
+ 'tuningTask',
+ 'startTime',
+ ]);
+ if (fromStartTime != null) {
+ setValueByPath(toObject, ['startTime'], fromStartTime);
+ }
+ const fromEndTime = getValueByPath(fromObject, [
+ 'tuningTask',
+ 'completeTime',
+ ]);
+ if (fromEndTime != null) {
+ setValueByPath(toObject, ['endTime'], fromEndTime);
+ }
+ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']);
+ if (fromUpdateTime != null) {
+ setValueByPath(toObject, ['updateTime'], fromUpdateTime);
+ }
+ const fromDescription = getValueByPath(fromObject, ['description']);
+ if (fromDescription != null) {
+ setValueByPath(toObject, ['description'], fromDescription);
+ }
+ const fromBaseModel = getValueByPath(fromObject, ['baseModel']);
+ if (fromBaseModel != null) {
+ setValueByPath(toObject, ['baseModel'], fromBaseModel);
+ }
+ const fromTunedModel = getValueByPath(fromObject, ['_self']);
+ if (fromTunedModel != null) {
+ setValueByPath(toObject, ['tunedModel'], tunedModelFromMldev(fromTunedModel));
+ }
+ return toObject;
+}
+function tuningJobFromVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromState = getValueByPath(fromObject, ['state']);
+ if (fromState != null) {
+ setValueByPath(toObject, ['state'], tTuningJobStatus(fromState));
+ }
+ const fromCreateTime = getValueByPath(fromObject, ['createTime']);
+ if (fromCreateTime != null) {
+ setValueByPath(toObject, ['createTime'], fromCreateTime);
+ }
+ const fromStartTime = getValueByPath(fromObject, ['startTime']);
+ if (fromStartTime != null) {
+ setValueByPath(toObject, ['startTime'], fromStartTime);
+ }
+ const fromEndTime = getValueByPath(fromObject, ['endTime']);
+ if (fromEndTime != null) {
+ setValueByPath(toObject, ['endTime'], fromEndTime);
+ }
+ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']);
+ if (fromUpdateTime != null) {
+ setValueByPath(toObject, ['updateTime'], fromUpdateTime);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ const fromDescription = getValueByPath(fromObject, ['description']);
+ if (fromDescription != null) {
+ setValueByPath(toObject, ['description'], fromDescription);
+ }
+ const fromBaseModel = getValueByPath(fromObject, ['baseModel']);
+ if (fromBaseModel != null) {
+ setValueByPath(toObject, ['baseModel'], fromBaseModel);
+ }
+ const fromTunedModel = getValueByPath(fromObject, ['tunedModel']);
+ if (fromTunedModel != null) {
+ setValueByPath(toObject, ['tunedModel'], fromTunedModel);
+ }
+ const fromPreTunedModel = getValueByPath(fromObject, [
+ 'preTunedModel',
+ ]);
+ if (fromPreTunedModel != null) {
+ setValueByPath(toObject, ['preTunedModel'], fromPreTunedModel);
+ }
+ const fromSupervisedTuningSpec = getValueByPath(fromObject, [
+ 'supervisedTuningSpec',
+ ]);
+ if (fromSupervisedTuningSpec != null) {
+ setValueByPath(toObject, ['supervisedTuningSpec'], fromSupervisedTuningSpec);
+ }
+ const fromPreferenceOptimizationSpec = getValueByPath(fromObject, [
+ 'preferenceOptimizationSpec',
+ ]);
+ if (fromPreferenceOptimizationSpec != null) {
+ setValueByPath(toObject, ['preferenceOptimizationSpec'], fromPreferenceOptimizationSpec);
+ }
+ const fromDistillationSamplingSpec = getValueByPath(fromObject, [
+ 'distillationSamplingSpec',
+ ]);
+ if (fromDistillationSamplingSpec != null) {
+ setValueByPath(toObject, ['distillationSamplingSpec'], distillationSamplingSpecFromVertex(fromDistillationSamplingSpec));
+ }
+ const fromDistillationSpec = getValueByPath(fromObject, [
+ 'distillationSpec',
+ ]);
+ if (fromDistillationSpec != null) {
+ setValueByPath(toObject, ['distillationSpec'], distillationSpecFromVertex(fromDistillationSpec));
+ }
+ const fromReinforcementTuningSpec = getValueByPath(fromObject, [
+ 'reinforcementTuningSpec',
+ ]);
+ if (fromReinforcementTuningSpec != null) {
+ setValueByPath(toObject, ['reinforcementTuningSpec'], fromReinforcementTuningSpec);
+ }
+ const fromTuningDataStats = getValueByPath(fromObject, [
+ 'tuningDataStats',
+ ]);
+ if (fromTuningDataStats != null) {
+ setValueByPath(toObject, ['tuningDataStats'], fromTuningDataStats);
+ }
+ const fromEncryptionSpec = getValueByPath(fromObject, [
+ 'encryptionSpec',
+ ]);
+ if (fromEncryptionSpec != null) {
+ setValueByPath(toObject, ['encryptionSpec'], fromEncryptionSpec);
+ }
+ const fromPartnerModelTuningSpec = getValueByPath(fromObject, [
+ 'partnerModelTuningSpec',
+ ]);
+ if (fromPartnerModelTuningSpec != null) {
+ setValueByPath(toObject, ['partnerModelTuningSpec'], fromPartnerModelTuningSpec);
+ }
+ const fromCustomBaseModel = getValueByPath(fromObject, [
+ 'customBaseModel',
+ ]);
+ if (fromCustomBaseModel != null) {
+ setValueByPath(toObject, ['customBaseModel'], fromCustomBaseModel);
+ }
+ const fromEvaluateDatasetRuns = getValueByPath(fromObject, [
+ 'evaluateDatasetRuns',
+ ]);
+ if (fromEvaluateDatasetRuns != null) {
+ let transformedList = fromEvaluateDatasetRuns;
+ if (Array.isArray(transformedList)) {
+ transformedList = transformedList.map((item) => {
+ return item;
+ });
+ }
+ setValueByPath(toObject, ['evaluateDatasetRuns'], transformedList);
+ }
+ const fromExperiment = getValueByPath(fromObject, ['experiment']);
+ if (fromExperiment != null) {
+ setValueByPath(toObject, ['experiment'], fromExperiment);
+ }
+ const fromFullFineTuningSpec = getValueByPath(fromObject, [
+ 'fullFineTuningSpec',
+ ]);
+ if (fromFullFineTuningSpec != null) {
+ setValueByPath(toObject, ['fullFineTuningSpec'], fromFullFineTuningSpec);
+ }
+ const fromLabels = getValueByPath(fromObject, ['labels']);
+ if (fromLabels != null) {
+ setValueByPath(toObject, ['labels'], fromLabels);
+ }
+ const fromOutputUri = getValueByPath(fromObject, ['outputUri']);
+ if (fromOutputUri != null) {
+ setValueByPath(toObject, ['outputUri'], fromOutputUri);
+ }
+ const fromPipelineJob = getValueByPath(fromObject, ['pipelineJob']);
+ if (fromPipelineJob != null) {
+ setValueByPath(toObject, ['pipelineJob'], fromPipelineJob);
+ }
+ const fromServiceAccount = getValueByPath(fromObject, [
+ 'serviceAccount',
+ ]);
+ if (fromServiceAccount != null) {
+ setValueByPath(toObject, ['serviceAccount'], fromServiceAccount);
+ }
+ const fromTunedModelDisplayName = getValueByPath(fromObject, [
+ 'tunedModelDisplayName',
+ ]);
+ if (fromTunedModelDisplayName != null) {
+ setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
+ }
+ const fromTuningJobMetadata = getValueByPath(fromObject, [
+ 'tuningJobMetadata',
+ ]);
+ if (fromTuningJobMetadata != null) {
+ setValueByPath(toObject, ['tuningJobMetadata'], fromTuningJobMetadata);
+ }
+ const fromTuningJobState = getValueByPath(fromObject, [
+ 'tuningJobState',
+ ]);
+ if (fromTuningJobState != null) {
+ setValueByPath(toObject, ['tuningJobState'], fromTuningJobState);
+ }
+ const fromVeoLoraTuningSpec = getValueByPath(fromObject, [
+ 'veoLoraTuningSpec',
+ ]);
+ if (fromVeoLoraTuningSpec != null) {
+ setValueByPath(toObject, ['veoLoraTuningSpec'], fromVeoLoraTuningSpec);
+ }
+ const fromVeoTuningSpec = getValueByPath(fromObject, [
+ 'veoTuningSpec',
+ ]);
+ if (fromVeoTuningSpec != null) {
+ setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
+ }
+ return toObject;
+}
+function tuningOperationFromMldev(fromObject, _rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromName = getValueByPath(fromObject, ['name']);
+ if (fromName != null) {
+ setValueByPath(toObject, ['name'], fromName);
+ }
+ const fromMetadata = getValueByPath(fromObject, ['metadata']);
+ if (fromMetadata != null) {
+ setValueByPath(toObject, ['metadata'], fromMetadata);
+ }
+ const fromDone = getValueByPath(fromObject, ['done']);
+ if (fromDone != null) {
+ setValueByPath(toObject, ['done'], fromDone);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ return toObject;
+}
+function tuningValidationDatasetToVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
+ if (fromGcsUri != null) {
+ setValueByPath(toObject, ['validationDatasetUri'], fromGcsUri);
+ }
+ const fromVertexDatasetResource = getValueByPath(fromObject, [
+ 'vertexDatasetResource',
+ ]);
+ if (fromVertexDatasetResource != null) {
+ setValueByPath(toObject, ['validationDatasetUri'], fromVertexDatasetResource);
+ }
+ return toObject;
+}
+function validateRewardParametersToVertex(fromObject, rootObject) {
+ const toObject = {};
+ const fromParent = getValueByPath(fromObject, ['parent']);
+ if (fromParent != null) {
+ setValueByPath(toObject, ['_url', 'parent'], fromParent);
+ }
+ const fromSampleResponse = getValueByPath(fromObject, [
+ 'sampleResponse',
+ ]);
+ if (fromSampleResponse != null) {
+ setValueByPath(toObject, ['sampleResponse'], contentToVertex(fromSampleResponse));
+ }
+ const fromExample = getValueByPath(fromObject, ['example']);
+ if (fromExample != null) {
+ setValueByPath(toObject, ['example'], reinforcementTuningExampleToVertex(fromExample));
+ }
+ const fromSingleRewardConfig = getValueByPath(fromObject, [
+ 'singleRewardConfig',
+ ]);
+ if (fromSingleRewardConfig != null) {
+ setValueByPath(toObject, ['singleRewardConfig'], fromSingleRewardConfig);
+ }
+ const fromCompositeRewardConfig = getValueByPath(fromObject, [
+ 'compositeRewardConfig',
+ ]);
+ if (fromCompositeRewardConfig != null) {
+ setValueByPath(toObject, ['compositeRewardConfig'], fromCompositeRewardConfig);
+ }
+ return toObject;
+}
+function validateRewardResponseFromVertex(fromObject, _rootObject) {
+ const toObject = {};
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
+ 'sdkHttpResponse',
+ ]);
+ if (fromSdkHttpResponse != null) {
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
+ }
+ const fromOverallReward = getValueByPath(fromObject, [
+ 'overallReward',
+ ]);
+ if (fromOverallReward != null) {
+ setValueByPath(toObject, ['overallReward'], fromOverallReward);
+ }
+ const fromError = getValueByPath(fromObject, ['error']);
+ if (fromError != null) {
+ setValueByPath(toObject, ['error'], fromError);
+ }
+ const fromRewardInfoDetails = getValueByPath(fromObject, [
+ 'rewardInfoDetails',
+ ]);
+ if (fromRewardInfoDetails != null) {
+ setValueByPath(toObject, ['rewardInfoDetails'], fromRewardInfoDetails);
+ }
+ return toObject;
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class Tunings extends BaseModule {
+ constructor(apiClient) {
+ super();
+ this.apiClient = apiClient;
+ /**
+ * Lists tuning jobs.
+ *
+ * @param params - The parameters for the list request.
+ * @return - A pager of tuning jobs.
+ *
+ * @example
+ * ```ts
+ * const tuningJobs = await ai.tunings.list({config: {'pageSize': 2}});
+ * for await (const tuningJob of tuningJobs) {
+ * console.log(tuningJob);
+ * }
+ * ```
+ */
+ this.list = async (params = {}) => {
+ return new Pager(PagedItem.PAGED_ITEM_TUNING_JOBS, (x) => this.listInternal(x), await this.listInternal(params), params);
+ };
+ /**
+ * Gets a TuningJob.
+ *
+ * @param name - The resource name of the tuning job.
+ * @return - A TuningJob object.
+ *
+ * @experimental - The SDK's tuning implementation is experimental, and may
+ * change in future versions.
+ */
+ this.get = async (params) => {
+ return await this.getInternal(params);
+ };
+ /**
+ * Creates a supervised fine-tuning job.
+ *
+ * @param params - The parameters for the tuning job.
+ * @return - A TuningJob operation.
+ *
+ * @experimental - The SDK's tuning implementation is experimental, and may
+ * change in future versions.
+ */
+ this.tune = async (params) => {
+ var _a;
+ if (this.apiClient.isVertexAI()) {
+ if (params.baseModel.startsWith('projects/')) {
+ const preTunedModel = {
+ tunedModelName: params.baseModel,
+ };
+ if ((_a = params.config) === null || _a === void 0 ? void 0 : _a.preTunedModelCheckpointId) {
+ preTunedModel.checkpointId = params.config.preTunedModelCheckpointId;
+ }
+ const paramsPrivate = Object.assign(Object.assign({}, params), { preTunedModel: preTunedModel });
+ paramsPrivate.baseModel = undefined;
+ return await this.tuneInternal(paramsPrivate);
+ }
+ else {
+ const paramsPrivate = Object.assign({}, params);
+ return await this.tuneInternal(paramsPrivate);
+ }
+ }
+ else {
+ const paramsPrivate = Object.assign({}, params);
+ const operation = await this.tuneMldevInternal(paramsPrivate);
+ let tunedModelName = '';
+ if (operation['metadata'] !== undefined &&
+ operation['metadata']['tunedModel'] !== undefined) {
+ tunedModelName = operation['metadata']['tunedModel'];
+ }
+ else if (operation['name'] !== undefined &&
+ operation['name'].includes('/operations/')) {
+ tunedModelName = operation['name'].split('/operations/')[0];
+ }
+ const tuningJob = {
+ name: tunedModelName,
+ state: JobState.JOB_STATE_QUEUED,
+ };
+ return tuningJob;
+ }
+ };
+ }
+ async getInternal(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = getTuningJobParametersToVertex(params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = tuningJobFromVertex(apiResponse);
+ return resp;
+ });
+ }
+ else {
+ const body = getTuningJobParametersToMldev(params);
+ path = formatMap('{name}', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = tuningJobFromMldev(apiResponse);
+ return resp;
+ });
+ }
+ }
+ async listInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = listTuningJobsParametersToVertex(params);
+ path = formatMap('tuningJobs', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'GET',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = listTuningJobsResponseFromVertex(apiResponse);
+ const typedResp = new ListTuningJobsResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ throw new Error('This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).');
+ }
+ }
+ /**
+ * Cancels a tuning job.
+ *
+ * @param params - The parameters for the cancel request.
+ * @return The empty response returned by the API.
+ *
+ * @example
+ * ```ts
+ * await ai.tunings.cancel({name: '...'}); // The server-generated resource name.
+ * ```
+ */
+ async cancel(params) {
+ var _a, _b, _c, _d;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = cancelTuningJobParametersToVertex(params);
+ path = formatMap('{name}:cancel', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = cancelTuningJobResponseFromVertex(apiResponse);
+ const typedResp = new CancelTuningJobResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ const body = cancelTuningJobParametersToMldev(params);
+ path = formatMap('{name}:cancel', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_c = params.config) === null || _c === void 0 ? void 0 : _c.httpOptions,
+ abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = cancelTuningJobResponseFromMldev(apiResponse);
+ const typedResp = new CancelTuningJobResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ }
+ async tuneInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = createTuningJobParametersPrivateToVertex(params, params);
+ path = formatMap('tuningJobs', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = tuningJobFromVertex(apiResponse);
+ return resp;
+ });
+ }
+ else {
+ throw new Error('This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).');
+ }
+ }
+ async tuneMldevInternal(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ throw new Error('This method is only supported by the Gemini Developer API.');
+ }
+ else {
+ const body = createTuningJobParametersPrivateToMldev(params);
+ path = formatMap('tunedModels', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = tuningOperationFromMldev(apiResponse);
+ return resp;
+ });
+ }
+ }
+ async validateReward(params) {
+ var _a, _b;
+ let response;
+ let path = '';
+ let queryParams = {};
+ if (this.apiClient.isVertexAI()) {
+ const body = validateRewardParametersToVertex(params);
+ path = formatMap('{parent}/tuningJobs:validateReinforcementTuningReward', body['_url']);
+ queryParams = body['_query'];
+ delete body['_url'];
+ delete body['_query'];
+ response = this.apiClient
+ .request({
+ path: path,
+ queryParams: queryParams,
+ body: JSON.stringify(body),
+ httpMethod: 'POST',
+ httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
+ abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
+ })
+ .then((httpResponse) => {
+ return httpResponse.json().then((jsonResponse) => {
+ const response = jsonResponse;
+ response.sdkHttpResponse = {
+ headers: httpResponse.headers,
+ };
+ return response;
+ });
+ });
+ return response.then((apiResponse) => {
+ const resp = validateRewardResponseFromVertex(apiResponse);
+ const typedResp = new ValidateRewardResponse();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ });
+ }
+ else {
+ throw new Error('This method is only supported by the Gemini Enterprise Agent Platform (previously known as Vertex AI).');
+ }
+ }
+}
+
+const MAX_CHUNK_SIZE = 1024 * 1024 * 8; // bytes
+const MAX_RETRY_COUNT = 3;
+const INITIAL_RETRY_DELAY_MS = 1000;
+const DELAY_MULTIPLIER = 2;
+const X_GOOG_UPLOAD_STATUS_HEADER_FIELD = 'x-goog-upload-status';
+async function uploadBlob(file, uploadUrl, apiClient, httpOptions) {
+ var _a;
+ const response = await uploadBlobInternal(file, uploadUrl, apiClient, httpOptions);
+ const responseJson = (await (response === null || response === void 0 ? void 0 : response.json()));
+ if (((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a[X_GOOG_UPLOAD_STATUS_HEADER_FIELD]) !== 'final') {
+ throw new Error('Failed to upload file: Upload status is not finalized.');
+ }
+ return responseJson['file'];
+}
+async function uploadBlobToFileSearchStore(file, uploadUrl, apiClient, httpOptions) {
+ var _a;
+ const response = await uploadBlobInternal(file, uploadUrl, apiClient, httpOptions);
+ const responseJson = (await (response === null || response === void 0 ? void 0 : response.json()));
+ if (((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a[X_GOOG_UPLOAD_STATUS_HEADER_FIELD]) !== 'final') {
+ throw new Error('Failed to upload file: Upload status is not finalized.');
+ }
+ const resp = uploadToFileSearchStoreOperationFromMldev(responseJson);
+ const typedResp = new UploadToFileSearchStoreOperation();
+ Object.assign(typedResp, resp);
+ return typedResp;
+}
+async function uploadBlobInternal(file, uploadUrl, apiClient, httpOptions) {
+ var _a, _b, _c;
+ let finalUrl = uploadUrl;
+ const effectiveBaseUrl = (httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.baseUrl) || ((_a = apiClient.clientOptions.httpOptions) === null || _a === void 0 ? void 0 : _a.baseUrl);
+ if (effectiveBaseUrl) {
+ const baseUri = new URL(effectiveBaseUrl);
+ const uploadUri = new URL(uploadUrl);
+ uploadUri.protocol = baseUri.protocol;
+ uploadUri.host = baseUri.host;
+ uploadUri.port = baseUri.port;
+ finalUrl = uploadUri.toString();
+ }
+ let fileSize = 0;
+ let offset = 0;
+ let response = new HttpResponse(new Response());
+ let uploadCommand = 'upload';
+ fileSize = file.size;
+ while (offset < fileSize) {
+ const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);
+ const chunk = file.slice(offset, offset + chunkSize);
+ if (offset + chunkSize >= fileSize) {
+ uploadCommand += ', finalize';
+ }
+ let retryCount = 0;
+ let currentDelayMs = INITIAL_RETRY_DELAY_MS;
+ while (retryCount < MAX_RETRY_COUNT) {
+ const mergedHeaders = Object.assign(Object.assign({}, ((httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.headers) || {})), { 'X-Goog-Upload-Command': uploadCommand, 'X-Goog-Upload-Offset': String(offset) });
+ response = await apiClient.request({
+ path: '',
+ body: chunk,
+ httpMethod: 'POST',
+ httpOptions: Object.assign(Object.assign({}, httpOptions), { apiVersion: '', baseUrl: finalUrl, headers: mergedHeaders }),
+ });
+ if ((_b = response === null || response === void 0 ? void 0 : response.headers) === null || _b === void 0 ? void 0 : _b[X_GOOG_UPLOAD_STATUS_HEADER_FIELD]) {
+ break;
+ }
+ retryCount++;
+ await sleep(currentDelayMs);
+ currentDelayMs = currentDelayMs * DELAY_MULTIPLIER;
+ }
+ offset += chunkSize;
+ // The `x-goog-upload-status` header field can be `active`, `final` and
+ //`cancelled` in resposne.
+ if (((_c = response === null || response === void 0 ? void 0 : response.headers) === null || _c === void 0 ? void 0 : _c[X_GOOG_UPLOAD_STATUS_HEADER_FIELD]) !== 'active') {
+ break;
+ }
+ // TODO(b/401391430) Investigate why the upload status is not finalized
+ // even though all content has been uploaded.
+ if (fileSize <= offset) {
+ throw new Error('All content has been uploaded, but the upload status is not finalized.');
+ }
+ }
+ return response;
+}
+async function getBlobStat(file) {
+ const fileStat = { size: file.size, type: file.type };
+ return fileStat;
+}
+function sleep(ms) {
+ return new Promise((resolvePromise) => setTimeout(resolvePromise, ms));
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class NodeUploader {
+ async stat(file) {
+ const fileStat = { size: 0, type: undefined };
+ if (typeof file === 'string') {
+ const originalStat = await promises_.stat(file);
+ fileStat.size = originalStat.size;
+ fileStat.type = this.inferMimeType(file);
+ return fileStat;
+ }
+ else {
+ return await getBlobStat(file);
+ }
+ }
+ async upload(file, uploadUrl, apiClient, httpOptions) {
+ if (typeof file === 'string') {
+ return await this.uploadFileFromPath(file, uploadUrl, apiClient, httpOptions);
+ }
+ else {
+ return uploadBlob(file, uploadUrl, apiClient, httpOptions);
+ }
+ }
+ async uploadToFileSearchStore(file, uploadUrl, apiClient, httpOptions) {
+ if (typeof file === 'string') {
+ return await this.uploadFileToFileSearchStoreFromPath(file, uploadUrl, apiClient, httpOptions);
+ }
+ else {
+ return uploadBlobToFileSearchStore(file, uploadUrl, apiClient, httpOptions);
+ }
+ }
+ /**
+ * Infers the MIME type of a file based on its extension.
+ *
+ * @param filePath The path to the file.
+ * @returns The MIME type of the file, or undefined if it cannot be inferred.
+ */
+ inferMimeType(filePath) {
+ // Get the file extension.
+ const fileExtension = filePath.slice(filePath.lastIndexOf('.') + 1);
+ // Create a map of file extensions to MIME types.
+ const mimeTypes = {
+ 'aac': 'audio/aac',
+ 'abw': 'application/x-abiword',
+ 'arc': 'application/x-freearc',
+ 'avi': 'video/x-msvideo',
+ 'azw': 'application/vnd.amazon.ebook',
+ 'bin': 'application/octet-stream',
+ 'bmp': 'image/bmp',
+ 'bz': 'application/x-bzip',
+ 'bz2': 'application/x-bzip2',
+ 'csh': 'application/x-csh',
+ 'css': 'text/css',
+ 'csv': 'text/csv',
+ 'doc': 'application/msword',
+ 'docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'eot': 'application/vnd.ms-fontobject',
+ 'epub': 'application/epub+zip',
+ 'gz': 'application/gzip',
+ 'gif': 'image/gif',
+ 'htm': 'text/html',
+ 'html': 'text/html',
+ 'ico': 'image/vnd.microsoft.icon',
+ 'ics': 'text/calendar',
+ 'jar': 'application/java-archive',
+ 'jpeg': 'image/jpeg',
+ 'jpg': 'image/jpeg',
+ 'js': 'text/javascript',
+ 'json': 'application/json',
+ 'jsonld': 'application/ld+json',
+ 'kml': 'application/vnd.google-earth.kml+xml',
+ 'kmz': 'application/vnd.google-earth.kmz+xml',
+ 'mjs': 'text/javascript',
+ 'mp3': 'audio/mpeg',
+ 'mp4': 'video/mp4',
+ 'mpeg': 'video/mpeg',
+ 'mpkg': 'application/vnd.apple.installer+xml',
+ 'odt': 'application/vnd.oasis.opendocument.text',
+ 'oga': 'audio/ogg',
+ 'ogv': 'video/ogg',
+ 'ogx': 'application/ogg',
+ 'opus': 'audio/opus',
+ 'otf': 'font/otf',
+ 'png': 'image/png',
+ 'pdf': 'application/pdf',
+ 'php': 'application/x-httpd-php',
+ 'ppt': 'application/vnd.ms-powerpoint',
+ 'pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ 'rar': 'application/vnd.rar',
+ 'rtf': 'application/rtf',
+ 'sh': 'application/x-sh',
+ 'svg': 'image/svg+xml',
+ 'swf': 'application/x-shockwave-flash',
+ 'tar': 'application/x-tar',
+ 'tif': 'image/tiff',
+ 'tiff': 'image/tiff',
+ 'ts': 'video/mp2t',
+ 'ttf': 'font/ttf',
+ 'txt': 'text/plain',
+ 'vsd': 'application/vnd.visio',
+ 'wav': 'audio/wav',
+ 'weba': 'audio/webm',
+ 'webm': 'video/webm',
+ 'webp': 'image/webp',
+ 'woff': 'font/woff',
+ 'woff2': 'font/woff2',
+ 'xhtml': 'application/xhtml+xml',
+ 'xls': 'application/vnd.ms-excel',
+ 'xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ 'xml': 'application/xml',
+ 'xul': 'application/vnd.mozilla.xul+xml',
+ 'zip': 'application/zip',
+ '3gp': 'video/3gpp',
+ '3g2': 'video/3gpp2',
+ '7z': 'application/x-7z-compressed',
+ };
+ // Look up the MIME type based on the file extension.
+ const mimeType = mimeTypes[fileExtension.toLowerCase()];
+ // Return the MIME type.
+ return mimeType;
+ }
+ async uploadFileFromPath(file, uploadUrl, apiClient, httpOptions) {
+ var _a;
+ const response = await this.uploadFileFromPathInternal(file, uploadUrl, apiClient, httpOptions);
+ const responseJson = (await (response === null || response === void 0 ? void 0 : response.json()));
+ if (((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a[X_GOOG_UPLOAD_STATUS_HEADER_FIELD]) !== 'final') {
+ throw new Error('Failed to upload file: Upload status is not finalized.');
+ }
+ return responseJson['file'];
+ }
+ async uploadFileToFileSearchStoreFromPath(file, uploadUrl, apiClient, httpOptions) {
+ var _a;
+ const response = await this.uploadFileFromPathInternal(file, uploadUrl, apiClient, httpOptions);
+ const responseJson = (await (response === null || response === void 0 ? void 0 : response.json()));
+ if (((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a[X_GOOG_UPLOAD_STATUS_HEADER_FIELD]) !== 'final') {
+ throw new Error('Failed to upload file: Upload status is not finalized.');
+ }
+ const resp = uploadToFileSearchStoreOperationFromMldev(responseJson);
+ const typedResp = new UploadToFileSearchStoreOperation();
+ Object.assign(typedResp, resp);
+ return typedResp;
+ }
+ async uploadFileFromPathInternal(file, uploadUrl, apiClient, httpOptions) {
+ var _a, _b, _c;
+ let finalUrl = uploadUrl;
+ const effectiveBaseUrl = (httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.baseUrl) || ((_a = apiClient.clientOptions.httpOptions) === null || _a === void 0 ? void 0 : _a.baseUrl);
+ if (effectiveBaseUrl) {
+ const baseUri = new URL(effectiveBaseUrl);
+ const uploadUri = new URL(uploadUrl);
+ uploadUri.protocol = baseUri.protocol;
+ uploadUri.host = baseUri.host;
+ uploadUri.port = baseUri.port;
+ finalUrl = uploadUri.toString();
+ }
+ let fileSize = 0;
+ let offset = 0;
+ let response = new HttpResponse(new Response());
+ let uploadCommand = 'upload';
+ let fileHandle;
+ const fileName = external_path_.basename(file);
+ try {
+ fileHandle = await promises_.open(file, 'r');
+ if (!fileHandle) {
+ throw new Error(`Failed to open file`);
+ }
+ fileSize = (await fileHandle.stat()).size;
+ while (offset < fileSize) {
+ const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);
+ if (offset + chunkSize >= fileSize) {
+ uploadCommand += ', finalize';
+ }
+ const buffer = new Uint8Array(chunkSize);
+ const { bytesRead: bytesRead } = await fileHandle.read(buffer, 0, chunkSize, offset);
+ if (bytesRead !== chunkSize) {
+ throw new Error(`Failed to read ${chunkSize} bytes from file at offset ${offset}. bytes actually read: ${bytesRead}`);
+ }
+ const chunk = new Blob([buffer]);
+ let retryCount = 0;
+ let currentDelayMs = INITIAL_RETRY_DELAY_MS;
+ while (retryCount < MAX_RETRY_COUNT) {
+ const mergedHeaders = Object.assign(Object.assign({}, ((httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.headers) || {})), { 'X-Goog-Upload-Command': uploadCommand, 'X-Goog-Upload-Offset': String(offset), 'X-Goog-Upload-File-Name': fileName });
+ response = await apiClient.request({
+ path: '',
+ body: chunk,
+ httpMethod: 'POST',
+ httpOptions: Object.assign(Object.assign({}, httpOptions), { apiVersion: '', baseUrl: finalUrl, headers: mergedHeaders }),
+ });
+ if ((_b = response === null || response === void 0 ? void 0 : response.headers) === null || _b === void 0 ? void 0 : _b[X_GOOG_UPLOAD_STATUS_HEADER_FIELD]) {
+ break;
+ }
+ retryCount++;
+ await sleep(currentDelayMs);
+ currentDelayMs = currentDelayMs * DELAY_MULTIPLIER;
+ }
+ offset += bytesRead;
+ // The `x-goog-upload-status` header field can be `active`, `final` and
+ //`cancelled` in resposne.
+ if (((_c = response === null || response === void 0 ? void 0 : response.headers) === null || _c === void 0 ? void 0 : _c[X_GOOG_UPLOAD_STATUS_HEADER_FIELD]) !== 'active') {
+ break;
+ }
+ if (fileSize <= offset) {
+ throw new Error('All content has been uploaded, but the upload status is not finalized.');
+ }
+ }
+ return response;
+ }
+ finally {
+ // Ensure the file handle is always closed
+ if (fileHandle) {
+ await fileHandle.close();
+ }
+ }
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+class NodeFiles extends Files$1 {
+ /**
+ * Registers Google Cloud Storage files for use with the API.
+ * This method is only available in Node.js environments.
+ */
+ async registerFiles(params) {
+ if (typeof process === 'undefined' ||
+ !process.versions ||
+ !process.versions.node) {
+ throw new Error('registerFiles is only supported in Node.js environments.');
+ }
+ const googleAuth = params.auth;
+ const authHeaders = await googleAuth.getRequestHeaders();
+ const config = params.config || {};
+ const httpOptions = config.httpOptions || {};
+ const headers = Object.assign({}, (httpOptions.headers || {}));
+ if (authHeaders) {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ if (typeof authHeaders[Symbol.iterator] === 'function') {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ for (const [key, value] of authHeaders) {
+ headers[key] = value;
+ }
+ }
+ else {
+ for (const [key, value] of Object.entries(authHeaders)) {
+ headers[key] = value;
+ }
+ }
+ }
+ return this._registerFiles({
+ uris: params.uris,
+ config: Object.assign(Object.assign({}, config), { httpOptions: Object.assign(Object.assign({}, httpOptions), { headers }) }),
+ });
+ }
+}
+
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+const LANGUAGE_LABEL_PREFIX = 'gl-node/';
+function resolveCloudFlag(options) {
+ var _a;
+ if (options &&
+ (options.enterprise !== undefined || options.vertexai !== undefined)) {
+ if (options.enterprise !== undefined &&
+ options.vertexai !== undefined &&
+ options.enterprise !== options.vertexai) {
+ throw new Error('enterprise and vertexAI flags have conflicting values, please set enterprise value only.');
+ }
+ return (_a = options.enterprise) !== null && _a !== void 0 ? _a : options.vertexai;
+ }
+ const envEnterpriseStr = getEnv('GOOGLE_GENAI_USE_ENTERPRISE');
+ const envVertexaiStr = getEnv('GOOGLE_GENAI_USE_VERTEXAI');
+ const useEnterpriseEnv = stringToBoolean(envEnterpriseStr);
+ const useVertexaiEnv = stringToBoolean(envVertexaiStr);
+ if (envEnterpriseStr !== undefined &&
+ envVertexaiStr !== undefined &&
+ useEnterpriseEnv !== useVertexaiEnv) {
+ console.warn('Warning: Both GOOGLE_GENAI_USE_ENTERPRISE and GOOGLE_GENAI_USE_VERTEXAI are set with conflicting values. The value of GOOGLE_GENAI_USE_ENTERPRISE will be used.');
+ }
+ if (envEnterpriseStr !== undefined) {
+ return useEnterpriseEnv;
+ }
+ if (envVertexaiStr !== undefined) {
+ return useVertexaiEnv;
+ }
+ return false;
+}
+/**
+ * The Google GenAI SDK.
+ *
+ * @remarks
+ * Provides access to the GenAI features through either the {@link
+ * https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} or
+ * the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI
+ * API}.
+ *
+ * The {@link GoogleGenAIOptions.vertexai} value determines which of the API
+ * services to use.
+ *
+ * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be
+ * set. When using Vertex AI, both {@link GoogleGenAIOptions.project} and {@link
+ * GoogleGenAIOptions.location} must be set, or a {@link
+ * GoogleGenAIOptions.apiKey} must be set when using Express Mode.
+ *
+ * Explicitly passed in values in {@link GoogleGenAIOptions} will always take
+ * precedence over environment variables. If both project/location and api_key
+ * exist in the environment variables, the project/location will be used.
+ *
+ * @example
+ * Initializing the SDK for using the Gemini API:
+ * ```ts
+ * import {GoogleGenAI} from '@google/genai';
+ * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});
+ * ```
+ *
+ * @example
+ * Initializing the SDK for using the Vertex AI API:
+ * ```ts
+ * import {GoogleGenAI} from '@google/genai';
+ * const ai = new GoogleGenAI({
+ * vertexai: true,
+ * project: 'PROJECT_ID',
+ * location: 'PROJECT_LOCATION'
+ * });
+ * ```
+ *
+ */
+class GoogleGenAI {
+ getNextGenClient() {
+ const httpOpts = this.httpOptions;
+ if (this._nextGenClient === undefined) {
+ this._nextGenClient = buildGoogleGenAIClient(this.apiClient, {
+ timeout_ms: httpOpts === null || httpOpts === void 0 ? void 0 : httpOpts.timeout,
+ });
+ }
+ if (httpOpts === null || httpOpts === void 0 ? void 0 : httpOpts.extraBody) {
+ console.warn('GoogleGenAI: Client level httpOptions.extraBody is not supported by the Gemini NextGen client and will be ignored.');
+ }
+ return this._nextGenClient;
+ }
+ get interactions() {
+ if (this._interactions !== undefined) {
+ return this._interactions;
+ }
+ this._interactions = new GeminiNextGenInteractions(this.apiClient);
+ return this._interactions;
+ }
+ get webhooks() {
+ if (this._webhooks !== undefined) {
+ return this._webhooks;
+ }
+ this._webhooks = new GeminiNextGenWebhooks(this.apiClient);
+ return this._webhooks;
+ }
+ get agents() {
+ if (this._agents !== undefined) {
+ return this._agents;
+ }
+ console.warn('GoogleGenAI.agents: Agents usage is experimental and may change in future versions.');
+ this._agents = new GeminiNextGenAgents(this.apiClient);
+ return this._agents;
+ }
+ get triggers() {
+ if (this._triggers !== undefined) {
+ return this._triggers;
+ }
+ console.warn('GoogleGenAI.triggers: Triggers usage is experimental and may change in future versions.');
+ this._triggers = new GeminiNextGenTriggers(this.apiClient);
+ return this._triggers;
+ }
+ get environments() {
+ if (this._environments !== undefined) {
+ return this._environments;
+ }
+ console.warn('GoogleGenAI.environments: Environments usage is experimental and may change in future versions.');
+ this._environments = new GeminiNextGenEnvironments(this.apiClient);
+ return this._environments;
+ }
+ constructor(options = {}) {
+ var _a, _b, _c, _d;
+ this.vertexai = resolveCloudFlag(options);
+ // Validate explicitly set initializer values.
+ if ((options.project || options.location) && !this.vertexai) {
+ throw new Error('Project and location are not supported for Gemini API backend.');
+ }
+ const envApiKey = getApiKeyFromEnv();
+ const envProject = getEnv('GOOGLE_CLOUD_PROJECT');
+ const envLocation = getEnv('GOOGLE_CLOUD_LOCATION');
+ this.apiKey = (_a = options.apiKey) !== null && _a !== void 0 ? _a : envApiKey;
+ this.project = (_b = options.project) !== null && _b !== void 0 ? _b : envProject;
+ this.location = (_c = options.location) !== null && _c !== void 0 ? _c : envLocation;
+ if (!this.vertexai && !this.apiKey) {
+ console.warn('API key should be set when using the Gemini API.');
+ }
+ // Handle when to use Vertex AI in express mode (api key)
+ if (this.vertexai) {
+ if ((_d = options.googleAuthOptions) === null || _d === void 0 ? void 0 : _d.credentials) {
+ // Explicit credentials take precedence over implicit api_key.
+ console.debug('The user provided Google Cloud credentials will take precedence' +
+ ' over the API key from the environment variable.');
+ this.apiKey = undefined;
+ }
+ if (!options.project &&
+ !options.location &&
+ (envProject || envLocation) &&
+ options.apiKey) {
+ // Explicit api_key takes precedence over implicit project/location.
+ console.debug('The user provided Vertex AI API key will take precedence over' +
+ ' the project/location from the environment variables.');
+ this.project = undefined;
+ this.location = undefined;
+ }
+ else if ((options.project || options.location) &&
+ !options.apiKey &&
+ envApiKey) {
+ // Explicit project/location takes precedence over implicit api_key.
+ console.debug('The user provided project/location will take precedence over' +
+ ' the API key from the environment variables.');
+ this.apiKey = undefined;
+ }
+ else if (!options.project &&
+ !options.location &&
+ !options.apiKey &&
+ (envProject || envLocation) &&
+ envApiKey) {
+ // Implicit project/location takes precedence over implicit api_key.
+ console.debug('The project/location from the environment variables will take' +
+ ' precedence over the API key from the environment variables.');
+ this.apiKey = undefined;
+ }
+ if (!this.location && !this.apiKey) {
+ this.location = 'global';
+ }
+ }
+ const baseUrl = getBaseUrl(options.httpOptions, this.vertexai, getEnv('GOOGLE_VERTEX_BASE_URL'), getEnv('GOOGLE_GEMINI_BASE_URL'));
+ if (baseUrl) {
+ if (options.httpOptions) {
+ options.httpOptions.baseUrl = baseUrl;
+ }
+ else {
+ options.httpOptions = { baseUrl: baseUrl };
+ }
+ }
+ this.apiVersion = options.apiVersion;
+ this.httpOptions = options.httpOptions;
+ const auth = new NodeAuth({
+ apiKey: this.apiKey,
+ googleAuthOptions: options.googleAuthOptions,
+ });
+ this.apiClient = new ApiClient({
+ auth: auth,
+ project: this.project,
+ location: this.location,
+ apiVersion: this.apiVersion,
+ apiKey: this.apiKey,
+ vertexai: this.vertexai,
+ httpOptions: this.httpOptions,
+ userAgentExtra: LANGUAGE_LABEL_PREFIX + process.version,
+ uploader: new NodeUploader(),
+ downloader: new NodeDownloader(),
+ });
+ this.models = new Models(this.apiClient);
+ this.live = new Live(this.apiClient, auth, new NodeWebSocketFactory());
+ this.batches = new Batches(this.apiClient);
+ this.chats = new Chats(this.models, this.apiClient);
+ this.caches = new Caches(this.apiClient);
+ this.files = new NodeFiles(this.apiClient);
+ this.operations = new Operations(this.apiClient);
+ this.authTokens = new Tokens(this.apiClient);
+ this.tunings = new Tunings(this.apiClient);
+ this.fileSearchStores = new FileSearchStores(this.apiClient);
+ }
+}
+function getEnv(env) {
+ var _a, _b, _c;
+ return (_c = (_b = (_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a[env]) === null || _b === void 0 ? void 0 : _b.trim()) !== null && _c !== void 0 ? _c : undefined;
+}
+function stringToBoolean(str) {
+ if (str === undefined) {
+ return false;
+ }
+ return str.toLowerCase() === 'true';
+}
+function getApiKeyFromEnv() {
+ const envGoogleApiKey = getEnv('GOOGLE_API_KEY');
+ const envGeminiApiKey = getEnv('GEMINI_API_KEY');
+ if (envGoogleApiKey && envGeminiApiKey) {
+ console.warn('Both GOOGLE_API_KEY and GEMINI_API_KEY are set. Using GOOGLE_API_KEY.');
+ }
+ return envGoogleApiKey || envGeminiApiKey || undefined;
+}
+
+
+//# sourceMappingURL=index.mjs.map
+
+
+/***/ }),
+
+/***/ 62598:
+/***/ ((module) => {
+
+module.exports = /*#__PURE__*/JSON.parse('{"name":"gaxios","version":"7.3.1","description":"A simple common HTTP client specifically for Google APIs and services.","main":"build/cjs/src/index.js","types":"build/cjs/src/index.d.ts","files":["build/"],"exports":{".":{"import":{"types":"./build/esm/src/index.d.ts","default":"./build/esm/src/index.js"},"require":{"types":"./build/cjs/src/index.d.ts","default":"./build/cjs/src/index.js"}}},"scripts":{"lint":"gts check --no-inline-config","test":"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000","compile":"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs","fix":"gts fix","prepare":"npm run compile","pretest":"npm run compile","webpack":"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js","docs":"jsdoc -c .jsdoc.js","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","prelint":"cd samples; npm link ../; npm install","clean":"gts clean"},"repository":{"type":"git","directory":"core/packages/gaxios","url":"https://github.com/googleapis/google-cloud-node.git"},"keywords":["google"],"engines":{"node":">=18"},"author":"Google, LLC","license":"Apache-2.0","devDependencies":{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.8","@types/node":"^24.0.0","@types/sinon":"^21.0.0","@types/tmp":"^0.2.6","assert":"^2.0.0","browserify":"^17.0.0","c8":"^10.1.3","cors":"^2.8.5","express":"^5.0.0","gts":"^6.0.2","is-docker":"^3.0.0","jsdoc":"^4.0.4","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.0","mocha":"^11.1.0","multiparty":"^4.2.1","mv":"^2.1.1","ncp":"^2.0.0","nock":"14.0.5","null-loader":"^4.0.1","pack-n-play":"^4.0.0","puppeteer":"^24.0.0","sinon":"21.0.3","stream-browserify":"^3.0.0","tmp":"0.2.7","ts-loader":"^9.5.2","typescript":"5.8.3","undici-types":"^7.24.1","webpack":"^5.97.1","webpack-cli":"^6.0.1"},"dependencies":{"extend":"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2"},"homepage":"https://github.com/googleapis/google-cloud-node/tree/main/core/packages/gaxios"}');
+
+/***/ }),
+
+/***/ 21930:
+/***/ ((module) => {
+
+module.exports = /*#__PURE__*/JSON.parse('{"name":"google-auth-library","version":"10.9.1","author":"Google Inc.","description":"Google APIs Authentication Client Library for Node.js","engines":{"node":">=18"},"main":"./build/src/index.js","types":"./build/src/index.d.ts","repository":{"type":"git","directory":"core/packages/google-auth-library-nodejs","url":"https://github.com/googleapis/google-cloud-node.git"},"keywords":["google","api","google apis","client","client library"],"dependencies":{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11","gaxios":"^7.1.4","gcp-metadata":"8.1.2","google-logging-utils":"1.1.3","jws":"^4.0.0"},"devDependencies":{"@types/base64-js":"^1.2.5","@types/jws":"^3.1.0","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.8","@types/node":"^24.0.0","@types/sinon":"^21.0.0","assert-rejects":"^1.0.0","c8":"^10.1.3","codecov":"^3.8.3","gts":"^6.0.2","is-docker":"^3.0.0","jsdoc":"^4.0.4","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1","keypair":"^1.0.4","mocha":"^11.1.0","mv":"^2.1.1","ncp":"^2.0.0","nock":"^14.0.5","null-loader":"^4.0.1","puppeteer":"^24.0.0","sinon":"21.0.3","ts-loader":"^9.5.2","typescript":"5.8.3","webpack":"^5.97.1","webpack-cli":"^6.0.1"},"files":["build/src","!build/src/**/*.map"],"scripts":{"test":"c8 mocha build/test","clean":"gts clean","prepare":"npm run compile","lint":"gts check --no-inline-config","compile":"tsc -p .","fix":"gts fix","pretest":"npm run compile -- --sourceMap","docs":"jsdoc -c .jsdoc.js","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap","webpack":"webpack","browser-test":"karma start","prelint":"cd samples; npm link ../; npm install"},"license":"Apache-2.0","homepage":"https://github.com/googleapis/google-cloud-node/tree/main/core/packages/google-auth-library-nodejs"}');
+
+/***/ })
+
+};
diff --git a/dist/action/833.index.js b/dist/action/833.index.js
new file mode 100644
index 000000000..f6fae28fe
--- /dev/null
+++ b/dist/action/833.index.js
@@ -0,0 +1,37808 @@
+export const id = 833;
+export const ids = [833];
+export const modules = {
+
+/***/ 36214:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var hljs = __webpack_require__(50795);
+
+hljs.registerLanguage('1c', __webpack_require__(76860));
+hljs.registerLanguage('abnf', __webpack_require__(53887));
+hljs.registerLanguage('accesslog', __webpack_require__(10846));
+hljs.registerLanguage('actionscript', __webpack_require__(97001));
+hljs.registerLanguage('ada', __webpack_require__(98614));
+hljs.registerLanguage('angelscript', __webpack_require__(11156));
+hljs.registerLanguage('apache', __webpack_require__(93934));
+hljs.registerLanguage('applescript', __webpack_require__(43673));
+hljs.registerLanguage('arcade', __webpack_require__(59452));
+hljs.registerLanguage('arduino', __webpack_require__(22202));
+hljs.registerLanguage('armasm', __webpack_require__(6337));
+hljs.registerLanguage('xml', __webpack_require__(95327));
+hljs.registerLanguage('asciidoc', __webpack_require__(3515));
+hljs.registerLanguage('aspectj', __webpack_require__(50436));
+hljs.registerLanguage('autohotkey', __webpack_require__(39381));
+hljs.registerLanguage('autoit', __webpack_require__(62694));
+hljs.registerLanguage('avrasm', __webpack_require__(74206));
+hljs.registerLanguage('awk', __webpack_require__(10327));
+hljs.registerLanguage('axapta', __webpack_require__(72171));
+hljs.registerLanguage('bash', __webpack_require__(23670));
+hljs.registerLanguage('basic', __webpack_require__(4720));
+hljs.registerLanguage('bnf', __webpack_require__(43120));
+hljs.registerLanguage('brainfuck', __webpack_require__(80249));
+hljs.registerLanguage('c-like', __webpack_require__(29315));
+hljs.registerLanguage('c', __webpack_require__(76663));
+hljs.registerLanguage('cal', __webpack_require__(12142));
+hljs.registerLanguage('capnproto', __webpack_require__(63346));
+hljs.registerLanguage('ceylon', __webpack_require__(72312));
+hljs.registerLanguage('clean', __webpack_require__(40583));
+hljs.registerLanguage('clojure', __webpack_require__(83926));
+hljs.registerLanguage('clojure-repl', __webpack_require__(8430));
+hljs.registerLanguage('cmake', __webpack_require__(95765));
+hljs.registerLanguage('coffeescript', __webpack_require__(12007));
+hljs.registerLanguage('coq', __webpack_require__(61083));
+hljs.registerLanguage('cos', __webpack_require__(25501));
+hljs.registerLanguage('cpp', __webpack_require__(39767));
+hljs.registerLanguage('crmsh', __webpack_require__(61309));
+hljs.registerLanguage('crystal', __webpack_require__(5356));
+hljs.registerLanguage('csharp', __webpack_require__(39403));
+hljs.registerLanguage('csp', __webpack_require__(22216));
+hljs.registerLanguage('css', __webpack_require__(40961));
+hljs.registerLanguage('d', __webpack_require__(1782));
+hljs.registerLanguage('markdown', __webpack_require__(83745));
+hljs.registerLanguage('dart', __webpack_require__(27341));
+hljs.registerLanguage('delphi', __webpack_require__(5732));
+hljs.registerLanguage('diff', __webpack_require__(90775));
+hljs.registerLanguage('django', __webpack_require__(46019));
+hljs.registerLanguage('dns', __webpack_require__(86057));
+hljs.registerLanguage('dockerfile', __webpack_require__(1534));
+hljs.registerLanguage('dos', __webpack_require__(88620));
+hljs.registerLanguage('dsconfig', __webpack_require__(15259));
+hljs.registerLanguage('dts', __webpack_require__(43991));
+hljs.registerLanguage('dust', __webpack_require__(32188));
+hljs.registerLanguage('ebnf', __webpack_require__(35603));
+hljs.registerLanguage('elixir', __webpack_require__(61755));
+hljs.registerLanguage('elm', __webpack_require__(79046));
+hljs.registerLanguage('ruby', __webpack_require__(31176));
+hljs.registerLanguage('erb', __webpack_require__(36193));
+hljs.registerLanguage('erlang-repl', __webpack_require__(37497));
+hljs.registerLanguage('erlang', __webpack_require__(89843));
+hljs.registerLanguage('excel', __webpack_require__(8553));
+hljs.registerLanguage('fix', __webpack_require__(56137));
+hljs.registerLanguage('flix', __webpack_require__(94215));
+hljs.registerLanguage('fortran', __webpack_require__(79368));
+hljs.registerLanguage('fsharp', __webpack_require__(990));
+hljs.registerLanguage('gams', __webpack_require__(18916));
+hljs.registerLanguage('gauss', __webpack_require__(25875));
+hljs.registerLanguage('gcode', __webpack_require__(83306));
+hljs.registerLanguage('gherkin', __webpack_require__(20412));
+hljs.registerLanguage('glsl', __webpack_require__(76836));
+hljs.registerLanguage('gml', __webpack_require__(27646));
+hljs.registerLanguage('go', __webpack_require__(29762));
+hljs.registerLanguage('golo', __webpack_require__(46831));
+hljs.registerLanguage('gradle', __webpack_require__(41787));
+hljs.registerLanguage('groovy', __webpack_require__(98570));
+hljs.registerLanguage('haml', __webpack_require__(90458));
+hljs.registerLanguage('handlebars', __webpack_require__(77168));
+hljs.registerLanguage('haskell', __webpack_require__(84994));
+hljs.registerLanguage('haxe', __webpack_require__(50428));
+hljs.registerLanguage('hsp', __webpack_require__(99053));
+hljs.registerLanguage('htmlbars', __webpack_require__(44683));
+hljs.registerLanguage('http', __webpack_require__(66376));
+hljs.registerLanguage('hy', __webpack_require__(52327));
+hljs.registerLanguage('inform7', __webpack_require__(89928));
+hljs.registerLanguage('ini', __webpack_require__(35856));
+hljs.registerLanguage('irpf90', __webpack_require__(42084));
+hljs.registerLanguage('isbl', __webpack_require__(73162));
+hljs.registerLanguage('java', __webpack_require__(61192));
+hljs.registerLanguage('javascript', __webpack_require__(92963));
+hljs.registerLanguage('jboss-cli', __webpack_require__(30482));
+hljs.registerLanguage('json', __webpack_require__(7802));
+hljs.registerLanguage('julia', __webpack_require__(89879));
+hljs.registerLanguage('julia-repl', __webpack_require__(64109));
+hljs.registerLanguage('kotlin', __webpack_require__(56254));
+hljs.registerLanguage('lasso', __webpack_require__(17084));
+hljs.registerLanguage('latex', __webpack_require__(71302));
+hljs.registerLanguage('ldif', __webpack_require__(94711));
+hljs.registerLanguage('leaf', __webpack_require__(22796));
+hljs.registerLanguage('less', __webpack_require__(35665));
+hljs.registerLanguage('lisp', __webpack_require__(81388));
+hljs.registerLanguage('livecodeserver', __webpack_require__(57232));
+hljs.registerLanguage('livescript', __webpack_require__(79369));
+hljs.registerLanguage('llvm', __webpack_require__(64881));
+hljs.registerLanguage('lsl', __webpack_require__(38477));
+hljs.registerLanguage('lua', __webpack_require__(27112));
+hljs.registerLanguage('makefile', __webpack_require__(11388));
+hljs.registerLanguage('mathematica', __webpack_require__(92982));
+hljs.registerLanguage('matlab', __webpack_require__(91313));
+hljs.registerLanguage('maxima', __webpack_require__(89887));
+hljs.registerLanguage('mel', __webpack_require__(62872));
+hljs.registerLanguage('mercury', __webpack_require__(19763));
+hljs.registerLanguage('mipsasm', __webpack_require__(52340));
+hljs.registerLanguage('mizar', __webpack_require__(14825));
+hljs.registerLanguage('perl', __webpack_require__(80045));
+hljs.registerLanguage('mojolicious', __webpack_require__(29027));
+hljs.registerLanguage('monkey', __webpack_require__(9853));
+hljs.registerLanguage('moonscript', __webpack_require__(15250));
+hljs.registerLanguage('n1ql', __webpack_require__(74620));
+hljs.registerLanguage('nginx', __webpack_require__(27158));
+hljs.registerLanguage('nim', __webpack_require__(52478));
+hljs.registerLanguage('nix', __webpack_require__(57041));
+hljs.registerLanguage('node-repl', __webpack_require__(14608));
+hljs.registerLanguage('nsis', __webpack_require__(76035));
+hljs.registerLanguage('objectivec', __webpack_require__(92748));
+hljs.registerLanguage('ocaml', __webpack_require__(8590));
+hljs.registerLanguage('openscad', __webpack_require__(76055));
+hljs.registerLanguage('oxygene', __webpack_require__(51333));
+hljs.registerLanguage('parser3', __webpack_require__(70990));
+hljs.registerLanguage('pf', __webpack_require__(93238));
+hljs.registerLanguage('pgsql', __webpack_require__(21257));
+hljs.registerLanguage('php', __webpack_require__(8490));
+hljs.registerLanguage('php-template', __webpack_require__(16425));
+hljs.registerLanguage('plaintext', __webpack_require__(87241));
+hljs.registerLanguage('pony', __webpack_require__(35412));
+hljs.registerLanguage('powershell', __webpack_require__(47521));
+hljs.registerLanguage('processing', __webpack_require__(74063));
+hljs.registerLanguage('profile', __webpack_require__(47643));
+hljs.registerLanguage('prolog', __webpack_require__(80127));
+hljs.registerLanguage('properties', __webpack_require__(9309));
+hljs.registerLanguage('protobuf', __webpack_require__(61719));
+hljs.registerLanguage('puppet', __webpack_require__(29854));
+hljs.registerLanguage('purebasic', __webpack_require__(30006));
+hljs.registerLanguage('python', __webpack_require__(52606));
+hljs.registerLanguage('python-repl', __webpack_require__(7078));
+hljs.registerLanguage('q', __webpack_require__(16201));
+hljs.registerLanguage('qml', __webpack_require__(32348));
+hljs.registerLanguage('r', __webpack_require__(40720));
+hljs.registerLanguage('reasonml', __webpack_require__(36889));
+hljs.registerLanguage('rib', __webpack_require__(38035));
+hljs.registerLanguage('roboconf', __webpack_require__(16826));
+hljs.registerLanguage('routeros', __webpack_require__(13071));
+hljs.registerLanguage('rsl', __webpack_require__(17355));
+hljs.registerLanguage('ruleslanguage', __webpack_require__(52663));
+hljs.registerLanguage('rust', __webpack_require__(56726));
+hljs.registerLanguage('sas', __webpack_require__(48775));
+hljs.registerLanguage('scala', __webpack_require__(37700));
+hljs.registerLanguage('scheme', __webpack_require__(77359));
+hljs.registerLanguage('scilab', __webpack_require__(10348));
+hljs.registerLanguage('scss', __webpack_require__(69908));
+hljs.registerLanguage('shell', __webpack_require__(52836));
+hljs.registerLanguage('smali', __webpack_require__(62602));
+hljs.registerLanguage('smalltalk', __webpack_require__(70787));
+hljs.registerLanguage('sml', __webpack_require__(92002));
+hljs.registerLanguage('sqf', __webpack_require__(11516));
+hljs.registerLanguage('sql_more', __webpack_require__(21420));
+hljs.registerLanguage('sql', __webpack_require__(42318));
+hljs.registerLanguage('stan', __webpack_require__(16272));
+hljs.registerLanguage('stata', __webpack_require__(53727));
+hljs.registerLanguage('step21', __webpack_require__(99191));
+hljs.registerLanguage('stylus', __webpack_require__(49614));
+hljs.registerLanguage('subunit', __webpack_require__(32798));
+hljs.registerLanguage('swift', __webpack_require__(93073));
+hljs.registerLanguage('taggerscript', __webpack_require__(73269));
+hljs.registerLanguage('yaml', __webpack_require__(51467));
+hljs.registerLanguage('tap', __webpack_require__(73675));
+hljs.registerLanguage('tcl', __webpack_require__(49717));
+hljs.registerLanguage('thrift', __webpack_require__(12287));
+hljs.registerLanguage('tp', __webpack_require__(6180));
+hljs.registerLanguage('twig', __webpack_require__(53201));
+hljs.registerLanguage('typescript', __webpack_require__(36043));
+hljs.registerLanguage('vala', __webpack_require__(89938));
+hljs.registerLanguage('vbnet', __webpack_require__(76053));
+hljs.registerLanguage('vbscript', __webpack_require__(38111));
+hljs.registerLanguage('vbscript-html', __webpack_require__(97589));
+hljs.registerLanguage('verilog', __webpack_require__(53508));
+hljs.registerLanguage('vhdl', __webpack_require__(60326));
+hljs.registerLanguage('vim', __webpack_require__(33510));
+hljs.registerLanguage('x86asm', __webpack_require__(19085));
+hljs.registerLanguage('xl', __webpack_require__(85852));
+hljs.registerLanguage('xquery', __webpack_require__(47412));
+hljs.registerLanguage('zephir', __webpack_require__(89994));
+
+module.exports = hljs;
+
+/***/ }),
+
+/***/ 76860:
+/***/ ((module) => {
+
+/*
+Language: 1C:Enterprise
+Author: Stanislav Belov
+Description: built-in language 1C:Enterprise (v7, v8)
+Category: enterprise
+*/
+
+function _1c(hljs) {
+
+ // общий паттерн для определения идентификаторов
+ var UNDERSCORE_IDENT_RE = '[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+';
+
+ // v7 уникальные ключевые слова, отсутствующие в v8 ==> keyword
+ var v7_keywords =
+ 'далее ';
+
+ // v8 ключевые слова ==> keyword
+ var v8_keywords =
+ 'возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли ' +
+ 'конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ';
+
+ // keyword : ключевые слова
+ var KEYWORD = v7_keywords + v8_keywords;
+
+ // v7 уникальные директивы, отсутствующие в v8 ==> meta-keyword
+ var v7_meta_keywords =
+ 'загрузитьизфайла ';
+
+ // v8 ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях ==> meta-keyword
+ var v8_meta_keywords =
+ 'вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер ' +
+ 'наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед ' +
+ 'после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент ';
+
+ // meta-keyword : ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях
+ var METAKEYWORD = v7_meta_keywords + v8_meta_keywords;
+
+ // v7 системные константы ==> built_in
+ var v7_system_constants =
+ 'разделительстраниц разделительстрок символтабуляции ';
+
+ // v7 уникальные методы глобального контекста, отсутствующие в v8 ==> built_in
+ var v7_global_context_methods =
+ 'ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов ' +
+ 'датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя ' +
+ 'кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца ' +
+ 'коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид ' +
+ 'назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца ' +
+ 'начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов ' +
+ 'основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута ' +
+ 'получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта ' +
+ 'префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына ' +
+ 'рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента ' +
+ 'счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон ';
+
+ // v8 методы глобального контекста ==> built_in
+ var v8_global_context_methods =
+ 'acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока ' +
+ 'xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ' +
+ 'ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации ' +
+ 'выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода ' +
+ 'деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы ' +
+ 'загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации ' +
+ 'заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию ' +
+ 'значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла ' +
+ 'изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке ' +
+ 'каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку ' +
+ 'кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты ' +
+ 'конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы ' +
+ 'копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти ' +
+ 'найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы ' +
+ 'началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя ' +
+ 'начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты ' +
+ 'начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов ' +
+ 'начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя ' +
+ 'начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога ' +
+ 'начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией ' +
+ 'начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы ' +
+ 'номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения ' +
+ 'обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении ' +
+ 'отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения ' +
+ 'открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально ' +
+ 'отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа ' +
+ 'перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту ' +
+ 'подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения ' +
+ 'подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки ' +
+ 'показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение ' +
+ 'показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя ' +
+ 'получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса ' +
+ 'получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора ' +
+ 'получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса ' +
+ 'получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации ' +
+ 'получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла ' +
+ 'получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации ' +
+ 'получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления ' +
+ 'получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу ' +
+ 'получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы ' +
+ 'получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет ' +
+ 'получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима ' +
+ 'получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения ' +
+ 'получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути ' +
+ 'получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы ' +
+ 'получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю ' +
+ 'получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных ' +
+ 'получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию ' +
+ 'получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище ' +
+ 'поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода ' +
+ 'представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение ' +
+ 'прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока ' +
+ 'рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных ' +
+ 'раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени ' +
+ 'смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить ' +
+ 'состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс ' +
+ 'строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений '+
+ 'стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах ' +
+ 'текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации ' +
+ 'текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы ' +
+ 'удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим ' +
+ 'установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту ' +
+ 'установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных ' +
+ 'установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации ' +
+ 'установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения ' +
+ 'установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования ' +
+ 'установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима ' +
+ 'установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим ' +
+ 'установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией ' +
+ 'установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы ' +
+ 'установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса ' +
+ 'формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища ';
+
+ // v8 свойства глобального контекста ==> built_in
+ var v8_global_context_property =
+ 'wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы ' +
+ 'внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль ' +
+ 'документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты ' +
+ 'историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений ' +
+ 'отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик ' +
+ 'планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок ' +
+ 'рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений ' +
+ 'регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа ' +
+ 'средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек ' +
+ 'хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков ' +
+ 'хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ';
+
+ // built_in : встроенные или библиотечные объекты (константы, классы, функции)
+ var BUILTIN =
+ v7_system_constants +
+ v7_global_context_methods + v8_global_context_methods +
+ v8_global_context_property;
+
+ // v8 системные наборы значений ==> class
+ var v8_system_sets_of_values =
+ 'webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля ';
+
+ // v8 системные перечисления - интерфейсные ==> class
+ var v8_system_enums_interface =
+ 'автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий ' +
+ 'анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы ' +
+ 'вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы ' +
+ 'виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя ' +
+ 'видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение ' +
+ 'горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы ' +
+ 'группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания ' +
+ 'интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки ' +
+ 'используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы ' +
+ 'источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева ' +
+ 'начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ' +
+ 'ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме ' +
+ 'отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы ' +
+ 'отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы ' +
+ 'отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы ' +
+ 'отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска ' +
+ 'отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования ' +
+ 'отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта ' +
+ 'отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы ' +
+ 'поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы ' +
+ 'поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы ' +
+ 'положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы ' +
+ 'положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы ' +
+ 'положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском ' +
+ 'положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы ' +
+ 'размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта ' +
+ 'режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты ' +
+ 'режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения ' +
+ 'режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра ' +
+ 'режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения ' +
+ 'режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы ' +
+ 'режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки ' +
+ 'режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание ' +
+ 'сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы ' +
+ 'способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление ' +
+ 'статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы ' +
+ 'типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы ' +
+ 'типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления ' +
+ 'типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы ' +
+ 'типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы ' +
+ 'типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений ' +
+ 'типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы ' +
+ 'типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы ' +
+ 'типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы ' +
+ 'факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени ' +
+ 'форматкартинки ширинаподчиненныхэлементовформы ';
+
+ // v8 системные перечисления - свойства прикладных объектов ==> class
+ var v8_system_enums_objects_properties =
+ 'виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса ' +
+ 'использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения ' +
+ 'использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента ';
+
+ // v8 системные перечисления - планы обмена ==> class
+ var v8_system_enums_exchange_plans =
+ 'авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных ';
+
+ // v8 системные перечисления - табличный документ ==> class
+ var v8_system_enums_tabular_document =
+ 'использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы ' +
+ 'положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента ' +
+ 'способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента ' +
+ 'типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента ' +
+ 'типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы ' +
+ 'типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента ' +
+ 'типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц ';
+
+ // v8 системные перечисления - планировщик ==> class
+ var v8_system_enums_sheduler =
+ 'отображениевремениэлементовпланировщика ';
+
+ // v8 системные перечисления - форматированный документ ==> class
+ var v8_system_enums_formatted_document =
+ 'типфайлаформатированногодокумента ';
+
+ // v8 системные перечисления - запрос ==> class
+ var v8_system_enums_query =
+ 'обходрезультатазапроса типзаписизапроса ';
+
+ // v8 системные перечисления - построитель отчета ==> class
+ var v8_system_enums_report_builder =
+ 'видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов ';
+
+ // v8 системные перечисления - работа с файлами ==> class
+ var v8_system_enums_files =
+ 'доступкфайлу режимдиалогавыборафайла режимоткрытияфайла ';
+
+ // v8 системные перечисления - построитель запроса ==> class
+ var v8_system_enums_query_builder =
+ 'типизмеренияпостроителязапроса ';
+
+ // v8 системные перечисления - анализ данных ==> class
+ var v8_system_enums_data_analysis =
+ 'видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных ' +
+ 'типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений ' +
+ 'типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций ' +
+ 'типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных ' +
+ 'типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных ' +
+ 'типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений ';
+
+ // v8 системные перечисления - xml, json, xs, dom, xdto, web-сервисы ==> class
+ var v8_system_enums_xml_json_xs_dom_xdto_ws =
+ 'wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto ' +
+ 'действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs ' +
+ 'исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs ' +
+ 'методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ' +
+ 'ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson ' +
+ 'типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs ' +
+ 'форматдатыjson экранированиесимволовjson ';
+
+ // v8 системные перечисления - система компоновки данных ==> class
+ var v8_system_enums_data_composition_system =
+ 'видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных ' +
+ 'расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных ' +
+ 'расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных ' +
+ 'расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных ' +
+ 'типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных ' +
+ 'типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных ' +
+ 'типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных ' +
+ 'расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных ' +
+ 'режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных ' +
+ 'режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных '+
+ 'вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных ' +
+ 'использованиеусловногооформлениякомпоновкиданных ';
+
+ // v8 системные перечисления - почта ==> class
+ var v8_system_enums_email =
+ 'важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения ' +
+ 'способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты ' +
+ 'статусразборапочтовогосообщения ';
+
+ // v8 системные перечисления - журнал регистрации ==> class
+ var v8_system_enums_logbook =
+ 'режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации ';
+
+ // v8 системные перечисления - криптография ==> class
+ var v8_system_enums_cryptography =
+ 'расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии ' +
+ 'типхранилищасертификатовкриптографии ';
+
+ // v8 системные перечисления - ZIP ==> class
+ var v8_system_enums_zip =
+ 'кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip ' +
+ 'режимсохраненияпутейzip уровеньсжатияzip ';
+
+ // v8 системные перечисления -
+ // Блокировка данных, Фоновые задания, Автоматизированное тестирование,
+ // Доставляемые уведомления, Встроенные покупки, Интернет, Работа с двоичными данными ==> class
+ var v8_system_enums_other =
+ 'звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных ' +
+ 'сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp ';
+
+ // v8 системные перечисления - схема запроса ==> class
+ var v8_system_enums_request_schema =
+ 'направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса ' +
+ 'типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса ';
+
+ // v8 системные перечисления - свойства объектов метаданных ==> class
+ var v8_system_enums_properties_of_metadata_objects =
+ 'httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления ' +
+ 'видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование ' +
+ 'использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения ' +
+ 'использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита ' +
+ 'назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных ' +
+ 'оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи ' +
+ 'основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении ' +
+ 'периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений ' +
+ 'повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение ' +
+ 'разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита '+
+ 'режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности ' +
+ 'режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов ' +
+ 'режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса ' +
+ 'режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов ' +
+ 'сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования ' +
+ 'типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса ' +
+ 'типномерадокумента типномеразадачи типформы удалениедвижений ';
+
+ // v8 системные перечисления - разные ==> class
+ var v8_system_enums_differents =
+ 'важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения ' +
+ 'вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки ' +
+ 'видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак ' +
+ 'использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога ' +
+ 'кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных ' +
+ 'отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения ' +
+ 'режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных ' +
+ 'способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter ' +
+ 'типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты';
+
+ // class: встроенные наборы значений, системные перечисления (содержат дочерние значения, обращения к которым через разыменование)
+ var CLASS =
+ v8_system_sets_of_values +
+ v8_system_enums_interface +
+ v8_system_enums_objects_properties +
+ v8_system_enums_exchange_plans +
+ v8_system_enums_tabular_document +
+ v8_system_enums_sheduler +
+ v8_system_enums_formatted_document +
+ v8_system_enums_query +
+ v8_system_enums_report_builder +
+ v8_system_enums_files +
+ v8_system_enums_query_builder +
+ v8_system_enums_data_analysis +
+ v8_system_enums_xml_json_xs_dom_xdto_ws +
+ v8_system_enums_data_composition_system +
+ v8_system_enums_email +
+ v8_system_enums_logbook +
+ v8_system_enums_cryptography +
+ v8_system_enums_zip +
+ v8_system_enums_other +
+ v8_system_enums_request_schema +
+ v8_system_enums_properties_of_metadata_objects +
+ v8_system_enums_differents;
+
+ // v8 общие объекты (у объектов есть конструктор, экземпляры создаются методом НОВЫЙ) ==> type
+ var v8_shared_object =
+ 'comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs ' +
+ 'блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема ' +
+ 'географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма ' +
+ 'диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания ' +
+ 'диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление ' +
+ 'записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom ' +
+ 'запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта ' +
+ 'интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs ' +
+ 'использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных ' +
+ 'итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла ' +
+ 'компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных ' +
+ 'конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных ' +
+ 'макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson ' +
+ 'обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs ' +
+ 'объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации ' +
+ 'описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных ' +
+ 'описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs ' +
+ 'определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom ' +
+ 'определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных ' +
+ 'параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных ' +
+ 'полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных ' +
+ 'построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml ' +
+ 'процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент ' +
+ 'процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml ' +
+ 'результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto ' +
+ 'сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows ' +
+ 'сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш ' +
+ 'сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент ' +
+ 'текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток ' +
+ 'фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs ' +
+ 'фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs ' +
+ 'фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs ' +
+ 'фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент ' +
+ 'фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла ' +
+ 'чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных ';
+
+ // v8 универсальные коллекции значений ==> type
+ var v8_universal_collection =
+ 'comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура ' +
+ 'фиксированноесоответствие фиксированныймассив ';
+
+ // type : встроенные типы
+ var TYPE =
+ v8_shared_object +
+ v8_universal_collection;
+
+ // literal : примитивные типы
+ var LITERAL = 'null истина ложь неопределено';
+
+ // number : числа
+ var NUMBERS = hljs.inherit(hljs.NUMBER_MODE);
+
+ // string : строки
+ var STRINGS = {
+ className: 'string',
+ begin: '"|\\|', end: '"|$',
+ contains: [{begin: '""'}]
+ };
+
+ // number : даты
+ var DATE = {
+ begin: "'", end: "'", excludeBegin: true, excludeEnd: true,
+ contains: [
+ {
+ className: 'number',
+ begin: '\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}'
+ }
+ ]
+ };
+
+ // comment : комментарии
+ var COMMENTS = hljs.inherit(hljs.C_LINE_COMMENT_MODE);
+
+ // meta : инструкции препроцессора, директивы компиляции
+ var META = {
+ className: 'meta',
+
+ begin: '#|&', end: '$',
+ keywords: {
+ $pattern: UNDERSCORE_IDENT_RE,
+ 'meta-keyword': KEYWORD + METAKEYWORD
+ },
+ contains: [
+ COMMENTS
+ ]
+ };
+
+ // symbol : метка goto
+ var SYMBOL = {
+ className: 'symbol',
+ begin: '~', end: ';|:', excludeEnd: true
+ };
+
+ // function : объявление процедур и функций
+ var FUNCTION = {
+ className: 'function',
+ variants: [
+ {begin: 'процедура|функция', end: '\\)', keywords: 'процедура функция'},
+ {begin: 'конецпроцедуры|конецфункции', keywords: 'конецпроцедуры конецфункции'}
+ ],
+ contains: [
+ {
+ begin: '\\(', end: '\\)', endsParent : true,
+ contains: [
+ {
+ className: 'params',
+ begin: UNDERSCORE_IDENT_RE, end: ',', excludeEnd: true, endsWithParent: true,
+ keywords: {
+ $pattern: UNDERSCORE_IDENT_RE,
+ keyword: 'знач',
+ literal: LITERAL
+ },
+ contains: [
+ NUMBERS,
+ STRINGS,
+ DATE
+ ]
+ },
+ COMMENTS
+ ]
+ },
+ hljs.inherit(hljs.TITLE_MODE, {begin: UNDERSCORE_IDENT_RE})
+ ]
+ };
+
+ return {
+ name: '1C:Enterprise',
+ case_insensitive: true,
+ keywords: {
+ $pattern: UNDERSCORE_IDENT_RE,
+ keyword: KEYWORD,
+ built_in: BUILTIN,
+ class: CLASS,
+ type: TYPE,
+ literal: LITERAL
+ },
+ contains: [
+ META,
+ FUNCTION,
+ COMMENTS,
+ SYMBOL,
+ NUMBERS,
+ STRINGS,
+ DATE
+ ]
+ };
+}
+
+module.exports = _1c;
+
+
+/***/ }),
+
+/***/ 53887:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: Augmented Backus-Naur Form
+Author: Alex McKibben
+Website: https://tools.ietf.org/html/rfc5234
+Audit: 2020
+*/
+
+/** @type LanguageFn */
+function abnf(hljs) {
+ const regexes = {
+ ruleDeclaration: /^[a-zA-Z][a-zA-Z0-9-]*/,
+ unexpectedChars: /[!@#$^&',?+~`|:]/
+ };
+
+ const keywords = [
+ "ALPHA",
+ "BIT",
+ "CHAR",
+ "CR",
+ "CRLF",
+ "CTL",
+ "DIGIT",
+ "DQUOTE",
+ "HEXDIG",
+ "HTAB",
+ "LF",
+ "LWSP",
+ "OCTET",
+ "SP",
+ "VCHAR",
+ "WSP"
+ ];
+
+ const commentMode = hljs.COMMENT(/;/, /$/);
+
+ const terminalBinaryMode = {
+ className: "symbol",
+ begin: /%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/
+ };
+
+ const terminalDecimalMode = {
+ className: "symbol",
+ begin: /%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/
+ };
+
+ const terminalHexadecimalMode = {
+ className: "symbol",
+ begin: /%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/
+ };
+
+ const caseSensitivityIndicatorMode = {
+ className: "symbol",
+ begin: /%[si]/
+ };
+
+ const ruleDeclarationMode = {
+ className: "attribute",
+ begin: concat(regexes.ruleDeclaration, /(?=\s*=)/)
+ };
+
+ return {
+ name: 'Augmented Backus-Naur Form',
+ illegal: regexes.unexpectedChars,
+ keywords: keywords,
+ contains: [
+ ruleDeclarationMode,
+ commentMode,
+ terminalBinaryMode,
+ terminalDecimalMode,
+ terminalHexadecimalMode,
+ caseSensitivityIndicatorMode,
+ hljs.QUOTE_STRING_MODE,
+ hljs.NUMBER_MODE
+ ]
+ };
+}
+
+module.exports = abnf;
+
+
+/***/ }),
+
+/***/ 10846:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/**
+ * Any of the passed expresssions may match
+ *
+ * Creates a huge this | this | that | that match
+ * @param {(RegExp | string)[] } args
+ * @returns {string}
+ */
+function either(...args) {
+ const joined = '(' + args.map((x) => source(x)).join("|") + ")";
+ return joined;
+}
+
+/*
+ Language: Apache Access Log
+ Author: Oleg Efimov
+ Description: Apache/Nginx Access Logs
+ Website: https://httpd.apache.org/docs/2.4/logs.html#accesslog
+ Audit: 2020
+ */
+
+/** @type LanguageFn */
+function accesslog(_hljs) {
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
+ const HTTP_VERBS = [
+ "GET",
+ "POST",
+ "HEAD",
+ "PUT",
+ "DELETE",
+ "CONNECT",
+ "OPTIONS",
+ "PATCH",
+ "TRACE"
+ ];
+ return {
+ name: 'Apache Access Log',
+ contains: [
+ // IP
+ {
+ className: 'number',
+ begin: /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b/,
+ relevance: 5
+ },
+ // Other numbers
+ {
+ className: 'number',
+ begin: /\b\d+\b/,
+ relevance: 0
+ },
+ // Requests
+ {
+ className: 'string',
+ begin: concat(/"/, either(...HTTP_VERBS)),
+ end: /"/,
+ keywords: HTTP_VERBS,
+ illegal: /\n/,
+ relevance: 5,
+ contains: [
+ {
+ begin: /HTTP\/[12]\.\d'/,
+ relevance: 5
+ }
+ ]
+ },
+ // Dates
+ {
+ className: 'string',
+ // dates must have a certain length, this prevents matching
+ // simple array accesses a[123] and [] and other common patterns
+ // found in other languages
+ begin: /\[\d[^\]\n]{8,}\]/,
+ illegal: /\n/,
+ relevance: 1
+ },
+ {
+ className: 'string',
+ begin: /\[/,
+ end: /\]/,
+ illegal: /\n/,
+ relevance: 0
+ },
+ // User agent / relevance boost
+ {
+ className: 'string',
+ begin: /"Mozilla\/\d\.\d \(/,
+ end: /"/,
+ illegal: /\n/,
+ relevance: 3
+ },
+ // Strings
+ {
+ className: 'string',
+ begin: /"/,
+ end: /"/,
+ illegal: /\n/,
+ relevance: 0
+ }
+ ]
+ };
+}
+
+module.exports = accesslog;
+
+
+/***/ }),
+
+/***/ 97001:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: ActionScript
+Author: Alexander Myadzel
+Category: scripting
+Audit: 2020
+*/
+
+/** @type LanguageFn */
+function actionscript(hljs) {
+ const IDENT_RE = /[a-zA-Z_$][a-zA-Z0-9_$]*/;
+ const IDENT_FUNC_RETURN_TYPE_RE = /([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)/;
+
+ const AS3_REST_ARG_MODE = {
+ className: 'rest_arg',
+ begin: /[.]{3}/,
+ end: IDENT_RE,
+ relevance: 10
+ };
+
+ return {
+ name: 'ActionScript',
+ aliases: [ 'as' ],
+ keywords: {
+ keyword: 'as break case catch class const continue default delete do dynamic each ' +
+ 'else extends final finally for function get if implements import in include ' +
+ 'instanceof interface internal is namespace native new override package private ' +
+ 'protected public return set static super switch this throw try typeof use var void ' +
+ 'while with',
+ literal: 'true false null undefined'
+ },
+ contains: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'class',
+ beginKeywords: 'package',
+ end: /\{/,
+ contains: [ hljs.TITLE_MODE ]
+ },
+ {
+ className: 'class',
+ beginKeywords: 'class interface',
+ end: /\{/,
+ excludeEnd: true,
+ contains: [
+ { beginKeywords: 'extends implements' },
+ hljs.TITLE_MODE
+ ]
+ },
+ {
+ className: 'meta',
+ beginKeywords: 'import include',
+ end: /;/,
+ keywords: { 'meta-keyword': 'import include' }
+ },
+ {
+ className: 'function',
+ beginKeywords: 'function',
+ end: /[{;]/,
+ excludeEnd: true,
+ illegal: /\S/,
+ contains: [
+ hljs.TITLE_MODE,
+ {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ contains: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ AS3_REST_ARG_MODE
+ ]
+ },
+ { begin: concat(/:\s*/, IDENT_FUNC_RETURN_TYPE_RE) }
+ ]
+ },
+ hljs.METHOD_GUARD
+ ],
+ illegal: /#/
+ };
+}
+
+module.exports = actionscript;
+
+
+/***/ }),
+
+/***/ 98614:
+/***/ ((module) => {
+
+/*
+Language: Ada
+Author: Lars Schulna
+Description: Ada is a general-purpose programming language that has great support for saftey critical and real-time applications.
+ It has been developed by the DoD and thus has been used in military and safety-critical applications (like civil aviation).
+ The first version appeared in the 80s, but it's still actively developed today with
+ the newest standard being Ada2012.
+*/
+
+// We try to support full Ada2012
+//
+// We highlight all appearances of types, keywords, literals (string, char, number, bool)
+// and titles (user defined function/procedure/package)
+// CSS classes are set accordingly
+//
+// Languages causing problems for language detection:
+// xml (broken by Foo : Bar type), elm (broken by Foo : Bar type), vbscript-html (broken by body keyword)
+// sql (ada default.txt has a lot of sql keywords)
+
+/** @type LanguageFn */
+function ada(hljs) {
+ // Regular expression for Ada numeric literals.
+ // stolen form the VHDL highlighter
+
+ // Decimal literal:
+ const INTEGER_RE = '\\d(_|\\d)*';
+ const EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;
+ const DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';
+
+ // Based literal:
+ const BASED_INTEGER_RE = '\\w+';
+ const BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';
+
+ const NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';
+
+ // Identifier regex
+ const ID_REGEX = '[A-Za-z](_?[A-Za-z0-9.])*';
+
+ // bad chars, only allowed in literals
+ const BAD_CHARS = `[]\\{\\}%#'"`;
+
+ // Ada doesn't have block comments, only line comments
+ const COMMENTS = hljs.COMMENT('--', '$');
+
+ // variable declarations of the form
+ // Foo : Bar := Baz;
+ // where only Bar will be highlighted
+ const VAR_DECLS = {
+ // TODO: These spaces are not required by the Ada syntax
+ // however, I have yet to see handwritten Ada code where
+ // someone does not put spaces around :
+ begin: '\\s+:\\s+',
+ end: '\\s*(:=|;|\\)|=>|$)',
+ // endsWithParent: true,
+ // returnBegin: true,
+ illegal: BAD_CHARS,
+ contains: [
+ {
+ // workaround to avoid highlighting
+ // named loops and declare blocks
+ beginKeywords: 'loop for declare others',
+ endsParent: true
+ },
+ {
+ // properly highlight all modifiers
+ className: 'keyword',
+ beginKeywords: 'not null constant access function procedure in out aliased exception'
+ },
+ {
+ className: 'type',
+ begin: ID_REGEX,
+ endsParent: true,
+ relevance: 0
+ }
+ ]
+ };
+
+ return {
+ name: 'Ada',
+ case_insensitive: true,
+ keywords: {
+ keyword:
+ 'abort else new return abs elsif not reverse abstract end ' +
+ 'accept entry select access exception of separate aliased exit or some ' +
+ 'all others subtype and for out synchronized array function overriding ' +
+ 'at tagged generic package task begin goto pragma terminate ' +
+ 'body private then if procedure type case in protected constant interface ' +
+ 'is raise use declare range delay limited record when delta loop rem while ' +
+ 'digits renames with do mod requeue xor',
+ literal:
+ 'True False'
+ },
+ contains: [
+ COMMENTS,
+ // strings "foobar"
+ {
+ className: 'string',
+ begin: /"/,
+ end: /"/,
+ contains: [{
+ begin: /""/,
+ relevance: 0
+ }]
+ },
+ // characters ''
+ {
+ // character literals always contain one char
+ className: 'string',
+ begin: /'.'/
+ },
+ {
+ // number literals
+ className: 'number',
+ begin: NUMBER_RE,
+ relevance: 0
+ },
+ {
+ // Attributes
+ className: 'symbol',
+ begin: "'" + ID_REGEX
+ },
+ {
+ // package definition, maybe inside generic
+ className: 'title',
+ begin: '(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?',
+ end: '(is|$)',
+ keywords: 'package body',
+ excludeBegin: true,
+ excludeEnd: true,
+ illegal: BAD_CHARS
+ },
+ {
+ // function/procedure declaration/definition
+ // maybe inside generic
+ begin: '(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+',
+ end: '(\\bis|\\bwith|\\brenames|\\)\\s*;)',
+ keywords: 'overriding function procedure with is renames return',
+ // we need to re-match the 'function' keyword, so that
+ // the title mode below matches only exactly once
+ returnBegin: true,
+ contains:
+ [
+ COMMENTS,
+ {
+ // name of the function/procedure
+ className: 'title',
+ begin: '(\\bwith\\s+)?\\b(function|procedure)\\s+',
+ end: '(\\(|\\s+|$)',
+ excludeBegin: true,
+ excludeEnd: true,
+ illegal: BAD_CHARS
+ },
+ // 'self'
+ // // parameter types
+ VAR_DECLS,
+ {
+ // return type
+ className: 'type',
+ begin: '\\breturn\\s+',
+ end: '(\\s+|;|$)',
+ keywords: 'return',
+ excludeBegin: true,
+ excludeEnd: true,
+ // we are done with functions
+ endsParent: true,
+ illegal: BAD_CHARS
+
+ }
+ ]
+ },
+ {
+ // new type declarations
+ // maybe inside generic
+ className: 'type',
+ begin: '\\b(sub)?type\\s+',
+ end: '\\s+',
+ keywords: 'type',
+ excludeBegin: true,
+ illegal: BAD_CHARS
+ },
+
+ // see comment above the definition
+ VAR_DECLS
+
+ // no markup
+ // relevance boosters for small snippets
+ // {begin: '\\s*=>\\s*'},
+ // {begin: '\\s*:=\\s*'},
+ // {begin: '\\s+:=\\s+'},
+ ]
+ };
+}
+
+module.exports = ada;
+
+
+/***/ }),
+
+/***/ 11156:
+/***/ ((module) => {
+
+/*
+Language: AngelScript
+Author: Melissa Geels
+Category: scripting
+Website: https://www.angelcode.com/angelscript/
+*/
+
+/** @type LanguageFn */
+function angelscript(hljs) {
+ var builtInTypeMode = {
+ className: 'built_in',
+ begin: '\\b(void|bool|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|string|ref|array|double|float|auto|dictionary)'
+ };
+
+ var objectHandleMode = {
+ className: 'symbol',
+ begin: '[a-zA-Z0-9_]+@'
+ };
+
+ var genericMode = {
+ className: 'keyword',
+ begin: '<', end: '>',
+ contains: [ builtInTypeMode, objectHandleMode ]
+ };
+
+ builtInTypeMode.contains = [ genericMode ];
+ objectHandleMode.contains = [ genericMode ];
+
+ return {
+ name: 'AngelScript',
+ aliases: ['asc'],
+
+ keywords:
+ 'for in|0 break continue while do|0 return if else case switch namespace is cast ' +
+ 'or and xor not get|0 in inout|10 out override set|0 private public const default|0 ' +
+ 'final shared external mixin|10 enum typedef funcdef this super import from interface ' +
+ 'abstract|0 try catch protected explicit property',
+
+ // avoid close detection with C# and JS
+ illegal: '(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])',
+
+ contains: [
+ { // 'strings'
+ className: 'string',
+ begin: '\'', end: '\'',
+ illegal: '\\n',
+ contains: [ hljs.BACKSLASH_ESCAPE ],
+ relevance: 0
+ },
+
+ // """heredoc strings"""
+ {
+ className: 'string',
+ begin: '"""', end: '"""'
+ },
+
+ { // "strings"
+ className: 'string',
+ begin: '"', end: '"',
+ illegal: '\\n',
+ contains: [ hljs.BACKSLASH_ESCAPE ],
+ relevance: 0
+ },
+
+ hljs.C_LINE_COMMENT_MODE, // single-line comments
+ hljs.C_BLOCK_COMMENT_MODE, // comment blocks
+
+ { // metadata
+ className: 'string',
+ begin: '^\\s*\\[', end: '\\]',
+ },
+
+ { // interface or namespace declaration
+ beginKeywords: 'interface namespace', end: /\{/,
+ illegal: '[;.\\-]',
+ contains: [
+ { // interface or namespace name
+ className: 'symbol',
+ begin: '[a-zA-Z0-9_]+'
+ }
+ ]
+ },
+
+ { // class declaration
+ beginKeywords: 'class', end: /\{/,
+ illegal: '[;.\\-]',
+ contains: [
+ { // class name
+ className: 'symbol',
+ begin: '[a-zA-Z0-9_]+',
+ contains: [
+ {
+ begin: '[:,]\\s*',
+ contains: [
+ {
+ className: 'symbol',
+ begin: '[a-zA-Z0-9_]+'
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+
+ builtInTypeMode, // built-in types
+ objectHandleMode, // object handles
+
+ { // literals
+ className: 'literal',
+ begin: '\\b(null|true|false)'
+ },
+
+ { // numbers
+ className: 'number',
+ relevance: 0,
+ begin: '(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)'
+ }
+ ]
+ };
+}
+
+module.exports = angelscript;
+
+
+/***/ }),
+
+/***/ 93934:
+/***/ ((module) => {
+
+/*
+Language: Apache config
+Author: Ruslan Keba
+Contributors: Ivan Sagalaev
+Website: https://httpd.apache.org
+Description: language definition for Apache configuration files (httpd.conf & .htaccess)
+Category: common, config
+Audit: 2020
+*/
+
+/** @type LanguageFn */
+function apache(hljs) {
+ const NUMBER_REF = {
+ className: 'number',
+ begin: /[$%]\d+/
+ };
+ const NUMBER = {
+ className: 'number',
+ begin: /\d+/
+ };
+ const IP_ADDRESS = {
+ className: "number",
+ begin: /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/
+ };
+ const PORT_NUMBER = {
+ className: "number",
+ begin: /:\d{1,5}/
+ };
+ return {
+ name: 'Apache config',
+ aliases: [ 'apacheconf' ],
+ case_insensitive: true,
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ {
+ className: 'section',
+ begin: /<\/?/,
+ end: />/,
+ contains: [
+ IP_ADDRESS,
+ PORT_NUMBER,
+ // low relevance prevents us from claming XML/HTML where this rule would
+ // match strings inside of XML tags
+ hljs.inherit(hljs.QUOTE_STRING_MODE, { relevance: 0 })
+ ]
+ },
+ {
+ className: 'attribute',
+ begin: /\w+/,
+ relevance: 0,
+ // keywords aren’t needed for highlighting per se, they only boost relevance
+ // for a very generally defined mode (starts with a word, ends with line-end
+ keywords: {
+ nomarkup:
+ 'order deny allow setenv rewriterule rewriteengine rewritecond documentroot ' +
+ 'sethandler errordocument loadmodule options header listen serverroot ' +
+ 'servername'
+ },
+ starts: {
+ end: /$/,
+ relevance: 0,
+ keywords: { literal: 'on off all deny allow' },
+ contains: [
+ {
+ className: 'meta',
+ begin: /\s\[/,
+ end: /\]$/
+ },
+ {
+ className: 'variable',
+ begin: /[\$%]\{/,
+ end: /\}/,
+ contains: [
+ 'self',
+ NUMBER_REF
+ ]
+ },
+ IP_ADDRESS,
+ NUMBER,
+ hljs.QUOTE_STRING_MODE
+ ]
+ }
+ }
+ ],
+ illegal: /\S/
+ };
+}
+
+module.exports = apache;
+
+
+/***/ }),
+
+/***/ 43673:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/**
+ * Any of the passed expresssions may match
+ *
+ * Creates a huge this | this | that | that match
+ * @param {(RegExp | string)[] } args
+ * @returns {string}
+ */
+function either(...args) {
+ const joined = '(' + args.map((x) => source(x)).join("|") + ")";
+ return joined;
+}
+
+/*
+Language: AppleScript
+Authors: Nathan Grigg , Dr. Drang
+Category: scripting
+Website: https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html
+Audit: 2020
+*/
+
+/** @type LanguageFn */
+function applescript(hljs) {
+ const STRING = hljs.inherit(
+ hljs.QUOTE_STRING_MODE, {
+ illegal: null
+ });
+ const PARAMS = {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ contains: [
+ 'self',
+ hljs.C_NUMBER_MODE,
+ STRING
+ ]
+ };
+ const COMMENT_MODE_1 = hljs.COMMENT(/--/, /$/);
+ const COMMENT_MODE_2 = hljs.COMMENT(
+ /\(\*/,
+ /\*\)/,
+ {
+ contains: [
+ 'self', // allow nesting
+ COMMENT_MODE_1
+ ]
+ }
+ );
+ const COMMENTS = [
+ COMMENT_MODE_1,
+ COMMENT_MODE_2,
+ hljs.HASH_COMMENT_MODE
+ ];
+
+ const KEYWORD_PATTERNS = [
+ /apart from/,
+ /aside from/,
+ /instead of/,
+ /out of/,
+ /greater than/,
+ /isn't|(doesn't|does not) (equal|come before|come after|contain)/,
+ /(greater|less) than( or equal)?/,
+ /(starts?|ends|begins?) with/,
+ /contained by/,
+ /comes (before|after)/,
+ /a (ref|reference)/,
+ /POSIX (file|path)/,
+ /(date|time) string/,
+ /quoted form/
+ ];
+
+ const BUILT_IN_PATTERNS = [
+ /clipboard info/,
+ /the clipboard/,
+ /info for/,
+ /list (disks|folder)/,
+ /mount volume/,
+ /path to/,
+ /(close|open for) access/,
+ /(get|set) eof/,
+ /current date/,
+ /do shell script/,
+ /get volume settings/,
+ /random number/,
+ /set volume/,
+ /system attribute/,
+ /system info/,
+ /time to GMT/,
+ /(load|run|store) script/,
+ /scripting components/,
+ /ASCII (character|number)/,
+ /localized string/,
+ /choose (application|color|file|file name|folder|from list|remote application|URL)/,
+ /display (alert|dialog)/
+ ];
+
+ return {
+ name: 'AppleScript',
+ aliases: [ 'osascript' ],
+ keywords: {
+ keyword:
+ 'about above after against and around as at back before beginning ' +
+ 'behind below beneath beside between but by considering ' +
+ 'contain contains continue copy div does eighth else end equal ' +
+ 'equals error every exit fifth first for fourth from front ' +
+ 'get given global if ignoring in into is it its last local me ' +
+ 'middle mod my ninth not of on onto or over prop property put ref ' +
+ 'reference repeat returning script second set seventh since ' +
+ 'sixth some tell tenth that the|0 then third through thru ' +
+ 'timeout times to transaction try until where while whose with ' +
+ 'without',
+ literal:
+ 'AppleScript false linefeed return pi quote result space tab true',
+ built_in:
+ 'alias application boolean class constant date file integer list ' +
+ 'number real record string text ' +
+ 'activate beep count delay launch log offset read round ' +
+ 'run say summarize write ' +
+ 'character characters contents day frontmost id item length ' +
+ 'month name paragraph paragraphs rest reverse running time version ' +
+ 'weekday word words year'
+ },
+ contains: [
+ STRING,
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'built_in',
+ begin: concat(
+ /\b/,
+ either(...BUILT_IN_PATTERNS),
+ /\b/
+ )
+ },
+ {
+ className: 'built_in',
+ begin: /^\s*return\b/
+ },
+ {
+ className: 'literal',
+ begin:
+ /\b(text item delimiters|current application|missing value)\b/
+ },
+ {
+ className: 'keyword',
+ begin: concat(
+ /\b/,
+ either(...KEYWORD_PATTERNS),
+ /\b/
+ )
+ },
+ {
+ beginKeywords: 'on',
+ illegal: /[${=;\n]/,
+ contains: [
+ hljs.UNDERSCORE_TITLE_MODE,
+ PARAMS
+ ]
+ },
+ ...COMMENTS
+ ],
+ illegal: /\/\/|->|=>|\[\[/
+ };
+}
+
+module.exports = applescript;
+
+
+/***/ }),
+
+/***/ 59452:
+/***/ ((module) => {
+
+/*
+ Language: ArcGIS Arcade
+ Category: scripting
+ Author: John Foster
+ Website: https://developers.arcgis.com/arcade/
+ Description: ArcGIS Arcade is an expression language used in many Esri ArcGIS products such as Pro, Online, Server, Runtime, JavaScript, and Python
+*/
+
+/** @type LanguageFn */
+function arcade(hljs) {
+ const IDENT_RE = '[A-Za-z_][0-9A-Za-z_]*';
+ const KEYWORDS = {
+ keyword:
+ 'if for while var new function do return void else break',
+ literal:
+ 'BackSlash DoubleQuote false ForwardSlash Infinity NaN NewLine null PI SingleQuote Tab TextFormatting true undefined',
+ built_in:
+ 'Abs Acos Angle Attachments Area AreaGeodetic Asin Atan Atan2 Average Bearing Boolean Buffer BufferGeodetic ' +
+ 'Ceil Centroid Clip Console Constrain Contains Cos Count Crosses Cut Date DateAdd ' +
+ 'DateDiff Day Decode DefaultValue Dictionary Difference Disjoint Distance DistanceGeodetic Distinct ' +
+ 'DomainCode DomainName Equals Exp Extent Feature FeatureSet FeatureSetByAssociation FeatureSetById FeatureSetByPortalItem ' +
+ 'FeatureSetByRelationshipName FeatureSetByTitle FeatureSetByUrl Filter First Floor Geometry GroupBy Guid HasKey Hour IIf IndexOf ' +
+ 'Intersection Intersects IsEmpty IsNan IsSelfIntersecting Length LengthGeodetic Log Max Mean Millisecond Min Minute Month ' +
+ 'MultiPartToSinglePart Multipoint NextSequenceValue Now Number OrderBy Overlaps Point Polygon ' +
+ 'Polyline Portal Pow Random Relate Reverse RingIsClockWise Round Second SetGeometry Sin Sort Sqrt Stdev Sum ' +
+ 'SymmetricDifference Tan Text Timestamp Today ToLocal Top Touches ToUTC TrackCurrentTime ' +
+ 'TrackGeometryWindow TrackIndex TrackStartTime TrackWindow TypeOf Union UrlEncode Variance ' +
+ 'Weekday When Within Year '
+ };
+ const SYMBOL = {
+ className: 'symbol',
+ begin: '\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+'
+ };
+ const NUMBER = {
+ className: 'number',
+ variants: [
+ {
+ begin: '\\b(0[bB][01]+)'
+ },
+ {
+ begin: '\\b(0[oO][0-7]+)'
+ },
+ {
+ begin: hljs.C_NUMBER_RE
+ }
+ ],
+ relevance: 0
+ };
+ const SUBST = {
+ className: 'subst',
+ begin: '\\$\\{',
+ end: '\\}',
+ keywords: KEYWORDS,
+ contains: [] // defined later
+ };
+ const TEMPLATE_STRING = {
+ className: 'string',
+ begin: '`',
+ end: '`',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST
+ ]
+ };
+ SUBST.contains = [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ TEMPLATE_STRING,
+ NUMBER,
+ hljs.REGEXP_MODE
+ ];
+ const PARAMS_CONTAINS = SUBST.contains.concat([
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.C_LINE_COMMENT_MODE
+ ]);
+
+ return {
+ name: 'ArcGIS Arcade',
+ keywords: KEYWORDS,
+ contains: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ TEMPLATE_STRING,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ SYMBOL,
+ NUMBER,
+ { // object attr container
+ begin: /[{,]\s*/,
+ relevance: 0,
+ contains: [{
+ begin: IDENT_RE + '\\s*:',
+ returnBegin: true,
+ relevance: 0,
+ contains: [{
+ className: 'attr',
+ begin: IDENT_RE,
+ relevance: 0
+ }]
+ }]
+ },
+ { // "value" container
+ begin: '(' + hljs.RE_STARTERS_RE + '|\\b(return)\\b)\\s*',
+ keywords: 'return',
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.REGEXP_MODE,
+ {
+ className: 'function',
+ begin: '(\\(.*?\\)|' + IDENT_RE + ')\\s*=>',
+ returnBegin: true,
+ end: '\\s*=>',
+ contains: [{
+ className: 'params',
+ variants: [
+ {
+ begin: IDENT_RE
+ },
+ {
+ begin: /\(\s*\)/
+ },
+ {
+ begin: /\(/,
+ end: /\)/,
+ excludeBegin: true,
+ excludeEnd: true,
+ keywords: KEYWORDS,
+ contains: PARAMS_CONTAINS
+ }
+ ]
+ }]
+ }
+ ],
+ relevance: 0
+ },
+ {
+ className: 'function',
+ beginKeywords: 'function',
+ end: /\{/,
+ excludeEnd: true,
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: IDENT_RE
+ }),
+ {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ excludeBegin: true,
+ excludeEnd: true,
+ contains: PARAMS_CONTAINS
+ }
+ ],
+ illegal: /\[|%/
+ },
+ {
+ begin: /\$[(.]/
+ }
+ ],
+ illegal: /#(?!!)/
+ };
+}
+
+module.exports = arcade;
+
+
+/***/ }),
+
+/***/ 22202:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function lookahead(re) {
+ return concat('(?=', re, ')');
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function optional(re) {
+ return concat('(', re, ')?');
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: C++
+Category: common, system
+Website: https://isocpp.org
+*/
+
+/** @type LanguageFn */
+function cPlusPlus(hljs) {
+ // added for historic reasons because `hljs.C_LINE_COMMENT_MODE` does
+ // not include such support nor can we be sure all the grammars depending
+ // on it would desire this behavior
+ const C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', {
+ contains: [
+ {
+ begin: /\\\n/
+ }
+ ]
+ });
+ const DECLTYPE_AUTO_RE = 'decltype\\(auto\\)';
+ const NAMESPACE_RE = '[a-zA-Z_]\\w*::';
+ const TEMPLATE_ARGUMENT_RE = '<[^<>]+>';
+ const FUNCTION_TYPE_RE = '(' +
+ DECLTYPE_AUTO_RE + '|' +
+ optional(NAMESPACE_RE) +
+ '[a-zA-Z_]\\w*' + optional(TEMPLATE_ARGUMENT_RE) +
+ ')';
+ const CPP_PRIMITIVE_TYPES = {
+ className: 'keyword',
+ begin: '\\b[a-z\\d_]*_t\\b'
+ };
+
+ // https://en.cppreference.com/w/cpp/language/escape
+ // \\ \x \xFF \u2837 \u00323747 \374
+ const CHARACTER_ESCAPES = '\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)';
+ const STRINGS = {
+ className: 'string',
+ variants: [
+ {
+ begin: '(u8?|U|L)?"',
+ end: '"',
+ illegal: '\\n',
+ contains: [ hljs.BACKSLASH_ESCAPE ]
+ },
+ {
+ begin: '(u8?|U|L)?\'(' + CHARACTER_ESCAPES + "|.)",
+ end: '\'',
+ illegal: '.'
+ },
+ hljs.END_SAME_AS_BEGIN({
+ begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,
+ end: /\)([^()\\ ]{0,16})"/
+ })
+ ]
+ };
+
+ const NUMBERS = {
+ className: 'number',
+ variants: [
+ {
+ begin: '\\b(0b[01\']+)'
+ },
+ {
+ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)'
+ },
+ {
+ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)'
+ }
+ ],
+ relevance: 0
+ };
+
+ const PREPROCESSOR = {
+ className: 'meta',
+ begin: /#\s*[a-z]+\b/,
+ end: /$/,
+ keywords: {
+ 'meta-keyword':
+ 'if else elif endif define undef warning error line ' +
+ 'pragma _Pragma ifdef ifndef include'
+ },
+ contains: [
+ {
+ begin: /\\\n/,
+ relevance: 0
+ },
+ hljs.inherit(STRINGS, {
+ className: 'meta-string'
+ }),
+ {
+ className: 'meta-string',
+ begin: /<.*?>/
+ },
+ C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ };
+
+ const TITLE_MODE = {
+ className: 'title',
+ begin: optional(NAMESPACE_RE) + hljs.IDENT_RE,
+ relevance: 0
+ };
+
+ const FUNCTION_TITLE = optional(NAMESPACE_RE) + hljs.IDENT_RE + '\\s*\\(';
+
+ const COMMON_CPP_HINTS = [
+ 'asin',
+ 'atan2',
+ 'atan',
+ 'calloc',
+ 'ceil',
+ 'cosh',
+ 'cos',
+ 'exit',
+ 'exp',
+ 'fabs',
+ 'floor',
+ 'fmod',
+ 'fprintf',
+ 'fputs',
+ 'free',
+ 'frexp',
+ 'auto_ptr',
+ 'deque',
+ 'list',
+ 'queue',
+ 'stack',
+ 'vector',
+ 'map',
+ 'set',
+ 'pair',
+ 'bitset',
+ 'multiset',
+ 'multimap',
+ 'unordered_set',
+ 'fscanf',
+ 'future',
+ 'isalnum',
+ 'isalpha',
+ 'iscntrl',
+ 'isdigit',
+ 'isgraph',
+ 'islower',
+ 'isprint',
+ 'ispunct',
+ 'isspace',
+ 'isupper',
+ 'isxdigit',
+ 'tolower',
+ 'toupper',
+ 'labs',
+ 'ldexp',
+ 'log10',
+ 'log',
+ 'malloc',
+ 'realloc',
+ 'memchr',
+ 'memcmp',
+ 'memcpy',
+ 'memset',
+ 'modf',
+ 'pow',
+ 'printf',
+ 'putchar',
+ 'puts',
+ 'scanf',
+ 'sinh',
+ 'sin',
+ 'snprintf',
+ 'sprintf',
+ 'sqrt',
+ 'sscanf',
+ 'strcat',
+ 'strchr',
+ 'strcmp',
+ 'strcpy',
+ 'strcspn',
+ 'strlen',
+ 'strncat',
+ 'strncmp',
+ 'strncpy',
+ 'strpbrk',
+ 'strrchr',
+ 'strspn',
+ 'strstr',
+ 'tanh',
+ 'tan',
+ 'unordered_map',
+ 'unordered_multiset',
+ 'unordered_multimap',
+ 'priority_queue',
+ 'make_pair',
+ 'array',
+ 'shared_ptr',
+ 'abort',
+ 'terminate',
+ 'abs',
+ 'acos',
+ 'vfprintf',
+ 'vprintf',
+ 'vsprintf',
+ 'endl',
+ 'initializer_list',
+ 'unique_ptr',
+ 'complex',
+ 'imaginary',
+ 'std',
+ 'string',
+ 'wstring',
+ 'cin',
+ 'cout',
+ 'cerr',
+ 'clog',
+ 'stdin',
+ 'stdout',
+ 'stderr',
+ 'stringstream',
+ 'istringstream',
+ 'ostringstream'
+ ];
+
+ const CPP_KEYWORDS = {
+ keyword: 'int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof ' +
+ 'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' +
+ 'unsigned long volatile static protected bool template mutable if public friend ' +
+ 'do goto auto void enum else break extern using asm case typeid wchar_t ' +
+ 'short reinterpret_cast|10 default double register explicit signed typename try this ' +
+ 'switch continue inline delete alignas alignof constexpr consteval constinit decltype ' +
+ 'concept co_await co_return co_yield requires ' +
+ 'noexcept static_assert thread_local restrict final override ' +
+ 'atomic_bool atomic_char atomic_schar ' +
+ 'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +
+ 'atomic_ullong new throw return ' +
+ 'and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq',
+ built_in: '_Bool _Complex _Imaginary',
+ _relevance_hints: COMMON_CPP_HINTS,
+ literal: 'true false nullptr NULL'
+ };
+
+ const FUNCTION_DISPATCH = {
+ className: "function.dispatch",
+ relevance: 0,
+ keywords: CPP_KEYWORDS,
+ begin: concat(
+ /\b/,
+ /(?!decltype)/,
+ /(?!if)/,
+ /(?!for)/,
+ /(?!while)/,
+ hljs.IDENT_RE,
+ lookahead(/\s*\(/))
+ };
+
+ const EXPRESSION_CONTAINS = [
+ FUNCTION_DISPATCH,
+ PREPROCESSOR,
+ CPP_PRIMITIVE_TYPES,
+ C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ NUMBERS,
+ STRINGS
+ ];
+
+
+ const EXPRESSION_CONTEXT = {
+ // This mode covers expression context where we can't expect a function
+ // definition and shouldn't highlight anything that looks like one:
+ // `return some()`, `else if()`, `(x*sum(1, 2))`
+ variants: [
+ {
+ begin: /=/,
+ end: /;/
+ },
+ {
+ begin: /\(/,
+ end: /\)/
+ },
+ {
+ beginKeywords: 'new throw return else',
+ end: /;/
+ }
+ ],
+ keywords: CPP_KEYWORDS,
+ contains: EXPRESSION_CONTAINS.concat([
+ {
+ begin: /\(/,
+ end: /\)/,
+ keywords: CPP_KEYWORDS,
+ contains: EXPRESSION_CONTAINS.concat([ 'self' ]),
+ relevance: 0
+ }
+ ]),
+ relevance: 0
+ };
+
+ const FUNCTION_DECLARATION = {
+ className: 'function',
+ begin: '(' + FUNCTION_TYPE_RE + '[\\*&\\s]+)+' + FUNCTION_TITLE,
+ returnBegin: true,
+ end: /[{;=]/,
+ excludeEnd: true,
+ keywords: CPP_KEYWORDS,
+ illegal: /[^\w\s\*&:<>.]/,
+ contains: [
+ { // to prevent it from being confused as the function title
+ begin: DECLTYPE_AUTO_RE,
+ keywords: CPP_KEYWORDS,
+ relevance: 0
+ },
+ {
+ begin: FUNCTION_TITLE,
+ returnBegin: true,
+ contains: [ TITLE_MODE ],
+ relevance: 0
+ },
+ // needed because we do not have look-behind on the below rule
+ // to prevent it from grabbing the final : in a :: pair
+ {
+ begin: /::/,
+ relevance: 0
+ },
+ // initializers
+ {
+ begin: /:/,
+ endsWithParent: true,
+ contains: [
+ STRINGS,
+ NUMBERS
+ ]
+ },
+ {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ keywords: CPP_KEYWORDS,
+ relevance: 0,
+ contains: [
+ C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ STRINGS,
+ NUMBERS,
+ CPP_PRIMITIVE_TYPES,
+ // Count matching parentheses.
+ {
+ begin: /\(/,
+ end: /\)/,
+ keywords: CPP_KEYWORDS,
+ relevance: 0,
+ contains: [
+ 'self',
+ C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ STRINGS,
+ NUMBERS,
+ CPP_PRIMITIVE_TYPES
+ ]
+ }
+ ]
+ },
+ CPP_PRIMITIVE_TYPES,
+ C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ PREPROCESSOR
+ ]
+ };
+
+ return {
+ name: 'C++',
+ aliases: [
+ 'cc',
+ 'c++',
+ 'h++',
+ 'hpp',
+ 'hh',
+ 'hxx',
+ 'cxx'
+ ],
+ keywords: CPP_KEYWORDS,
+ illegal: '',
+ classNameAliases: {
+ "function.dispatch": "built_in"
+ },
+ contains: [].concat(
+ EXPRESSION_CONTEXT,
+ FUNCTION_DECLARATION,
+ FUNCTION_DISPATCH,
+ EXPRESSION_CONTAINS,
+ [
+ PREPROCESSOR,
+ { // containers: ie, `vector rooms (9);`
+ begin: '\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<',
+ end: '>',
+ keywords: CPP_KEYWORDS,
+ contains: [
+ 'self',
+ CPP_PRIMITIVE_TYPES
+ ]
+ },
+ {
+ begin: hljs.IDENT_RE + '::',
+ keywords: CPP_KEYWORDS
+ },
+ {
+ className: 'class',
+ beginKeywords: 'enum class struct union',
+ end: /[{;:<>=]/,
+ contains: [
+ {
+ beginKeywords: "final class struct"
+ },
+ hljs.TITLE_MODE
+ ]
+ }
+ ]),
+ exports: {
+ preprocessor: PREPROCESSOR,
+ strings: STRINGS,
+ keywords: CPP_KEYWORDS
+ }
+ };
+}
+
+/*
+Language: Arduino
+Author: Stefania Mellai
+Description: The Arduino® Language is a superset of C++. This rules are designed to highlight the Arduino® source code. For info about language see http://www.arduino.cc.
+Website: https://www.arduino.cc
+*/
+
+/** @type LanguageFn */
+function arduino(hljs) {
+ const ARDUINO_KW = {
+ keyword:
+ 'boolean byte word String',
+ built_in:
+ 'KeyboardController MouseController SoftwareSerial ' +
+ 'EthernetServer EthernetClient LiquidCrystal ' +
+ 'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' +
+ 'HttpClient RobotMotor WiFiClient GSMScanner ' +
+ 'FileSystem Scheduler GSMServer YunClient YunServer ' +
+ 'IPAddress GSMClient GSMModem Keyboard Ethernet ' +
+ 'Console GSMBand Esplora Stepper Process ' +
+ 'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' +
+ 'Client Server GSMPIN FileIO Bridge Serial ' +
+ 'EEPROM Stream Mouse Audio Servo File Task ' +
+ 'GPRS WiFi Wire TFT GSM SPI SD ',
+ _:
+ 'setup loop ' +
+ 'runShellCommandAsynchronously analogWriteResolution ' +
+ 'retrieveCallingNumber printFirmwareVersion ' +
+ 'analogReadResolution sendDigitalPortPair ' +
+ 'noListenOnLocalhost readJoystickButton setFirmwareVersion ' +
+ 'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' +
+ 'scrollDisplayLeft writeMicroseconds delayMicroseconds ' +
+ 'beginTransmission getSignalStrength runAsynchronously ' +
+ 'getAsynchronously listenOnLocalhost getCurrentCarrier ' +
+ 'readAccelerometer messageAvailable sendDigitalPorts ' +
+ 'lineFollowConfig countryNameWrite runShellCommand ' +
+ 'readStringUntil rewindDirectory readTemperature ' +
+ 'setClockDivider readLightSensor endTransmission ' +
+ 'analogReference detachInterrupt countryNameRead ' +
+ 'attachInterrupt encryptionType readBytesUntil ' +
+ 'robotNameWrite readMicrophone robotNameRead cityNameWrite ' +
+ 'userNameWrite readJoystickY readJoystickX mouseReleased ' +
+ 'openNextFile scanNetworks noInterrupts digitalWrite ' +
+ 'beginSpeaker mousePressed isActionDone mouseDragged ' +
+ 'displayLogos noAutoscroll addParameter remoteNumber ' +
+ 'getModifiers keyboardRead userNameRead waitContinue ' +
+ 'processInput parseCommand printVersion readNetworks ' +
+ 'writeMessage blinkVersion cityNameRead readMessage ' +
+ 'setDataMode parsePacket isListening setBitOrder ' +
+ 'beginPacket isDirectory motorsWrite drawCompass ' +
+ 'digitalRead clearScreen serialEvent rightToLeft ' +
+ 'setTextSize leftToRight requestFrom keyReleased ' +
+ 'compassRead analogWrite interrupts WiFiServer ' +
+ 'disconnect playMelody parseFloat autoscroll ' +
+ 'getPINUsed setPINUsed setTimeout sendAnalog ' +
+ 'readSlider analogRead beginWrite createChar ' +
+ 'motorsStop keyPressed tempoWrite readButton ' +
+ 'subnetMask debugPrint macAddress writeGreen ' +
+ 'randomSeed attachGPRS readString sendString ' +
+ 'remotePort releaseAll mouseMoved background ' +
+ 'getXChange getYChange answerCall getResult ' +
+ 'voiceCall endPacket constrain getSocket writeJSON ' +
+ 'getButton available connected findUntil readBytes ' +
+ 'exitValue readGreen writeBlue startLoop IPAddress ' +
+ 'isPressed sendSysex pauseMode gatewayIP setCursor ' +
+ 'getOemKey tuneWrite noDisplay loadImage switchPIN ' +
+ 'onRequest onReceive changePIN playFile noBuffer ' +
+ 'parseInt overflow checkPIN knobRead beginTFT ' +
+ 'bitClear updateIR bitWrite position writeRGB ' +
+ 'highByte writeRed setSpeed readBlue noStroke ' +
+ 'remoteIP transfer shutdown hangCall beginSMS ' +
+ 'endWrite attached maintain noCursor checkReg ' +
+ 'checkPUK shiftOut isValid shiftIn pulseIn ' +
+ 'connect println localIP pinMode getIMEI ' +
+ 'display noBlink process getBand running beginSD ' +
+ 'drawBMP lowByte setBand release bitRead prepare ' +
+ 'pointTo readRed setMode noFill remove listen ' +
+ 'stroke detach attach noTone exists buffer ' +
+ 'height bitSet circle config cursor random ' +
+ 'IRread setDNS endSMS getKey micros ' +
+ 'millis begin print write ready flush width ' +
+ 'isPIN blink clear press mkdir rmdir close ' +
+ 'point yield image BSSID click delay ' +
+ 'read text move peek beep rect line open ' +
+ 'seek fill size turn stop home find ' +
+ 'step tone sqrt RSSI SSID ' +
+ 'end bit tan cos sin pow map abs max ' +
+ 'min get run put',
+ literal:
+ 'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' +
+ 'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' +
+ 'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' +
+ 'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' +
+ 'DEFAULT OUTPUT INPUT HIGH LOW'
+ };
+
+ const ARDUINO = cPlusPlus(hljs);
+
+ const kws = /** @type {Record} */ (ARDUINO.keywords);
+
+ kws.keyword += ' ' + ARDUINO_KW.keyword;
+ kws.literal += ' ' + ARDUINO_KW.literal;
+ kws.built_in += ' ' + ARDUINO_KW.built_in;
+ kws._ += ' ' + ARDUINO_KW._;
+
+ ARDUINO.name = 'Arduino';
+ ARDUINO.aliases = ['ino'];
+ ARDUINO.supersetOf = "cpp";
+
+ return ARDUINO;
+}
+
+module.exports = arduino;
+
+
+/***/ }),
+
+/***/ 6337:
+/***/ ((module) => {
+
+/*
+Language: ARM Assembly
+Author: Dan Panzarella
+Description: ARM Assembly including Thumb and Thumb2 instructions
+Category: assembler
+*/
+
+/** @type LanguageFn */
+function armasm(hljs) {
+ // local labels: %?[FB]?[AT]?\d{1,2}\w+
+
+ const COMMENT = {
+ variants: [
+ hljs.COMMENT('^[ \\t]*(?=#)', '$', {
+ relevance: 0,
+ excludeBegin: true
+ }),
+ hljs.COMMENT('[;@]', '$', {
+ relevance: 0
+ }),
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ };
+
+ return {
+ name: 'ARM Assembly',
+ case_insensitive: true,
+ aliases: ['arm'],
+ keywords: {
+ $pattern: '\\.?' + hljs.IDENT_RE,
+ meta:
+ // GNU preprocs
+ '.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ' +
+ // ARM directives
+ 'ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ',
+ built_in:
+ 'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 ' + // standard registers
+ 'pc lr sp ip sl sb fp ' + // typical regs plus backward compatibility
+ 'a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 ' + // more regs and fp
+ 'p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 ' + // coprocessor regs
+ 'c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 ' + // more coproc
+ 'q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 ' + // advanced SIMD NEON regs
+
+ // program status registers
+ 'cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf ' +
+ 'spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf ' +
+
+ // NEON and VFP registers
+ 's0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 ' +
+ 's16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 ' +
+ 'd0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 ' +
+ 'd16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ' +
+
+ '{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @'
+ },
+ contains: [
+ {
+ className: 'keyword',
+ begin: '\\b(' + // mnemonics
+ 'adc|' +
+ '(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|' +
+ 'and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|' +
+ 'bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|' +
+ 'setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|' +
+ 'ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|' +
+ 'mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|' +
+ 'mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|' +
+ 'mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|' +
+ 'rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|' +
+ 'stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|' +
+ '[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|' +
+ 'wfe|wfi|yield' +
+ ')' +
+ '(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?' + // condition codes
+ '[sptrx]?' + // legal postfixes
+ '(?=\\s)' // followed by space
+ },
+ COMMENT,
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'string',
+ begin: '\'',
+ end: '[^\\\\]\'',
+ relevance: 0
+ },
+ {
+ className: 'title',
+ begin: '\\|',
+ end: '\\|',
+ illegal: '\\n',
+ relevance: 0
+ },
+ {
+ className: 'number',
+ variants: [
+ { // hex
+ begin: '[#$=]?0x[0-9a-f]+'
+ },
+ { // bin
+ begin: '[#$=]?0b[01]+'
+ },
+ { // literal
+ begin: '[#$=]\\d+'
+ },
+ { // bare number
+ begin: '\\b\\d+'
+ }
+ ],
+ relevance: 0
+ },
+ {
+ className: 'symbol',
+ variants: [
+ { // GNU ARM syntax
+ begin: '^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:'
+ },
+ { // ARM syntax
+ begin: '^[a-z_\\.\\$][a-z0-9_\\.\\$]+'
+ },
+ { // label reference
+ begin: '[=#]\\w+'
+ }
+ ],
+ relevance: 0
+ }
+ ]
+ };
+}
+
+module.exports = armasm;
+
+
+/***/ }),
+
+/***/ 3515:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: AsciiDoc
+Requires: xml.js
+Author: Dan Allen
+Website: http://asciidoc.org
+Description: A semantic, text-based document format that can be exported to HTML, DocBook and other backends.
+Category: markup
+*/
+
+/** @type LanguageFn */
+function asciidoc(hljs) {
+ const HORIZONTAL_RULE = {
+ begin: '^\'{3,}[ \\t]*$',
+ relevance: 10
+ };
+ const ESCAPED_FORMATTING = [
+ // escaped constrained formatting marks (i.e., \* \_ or \`)
+ {
+ begin: /\\[*_`]/
+ },
+ // escaped unconstrained formatting marks (i.e., \\** \\__ or \\``)
+ // must ignore until the next formatting marks
+ // this rule might not be 100% compliant with Asciidoctor 2.0 but we are entering undefined behavior territory...
+ {
+ begin: /\\\\\*{2}[^\n]*?\*{2}/
+ },
+ {
+ begin: /\\\\_{2}[^\n]*_{2}/
+ },
+ {
+ begin: /\\\\`{2}[^\n]*`{2}/
+ },
+ // guard: constrained formatting mark may not be preceded by ":", ";" or
+ // "}". match these so the constrained rule doesn't see them
+ {
+ begin: /[:;}][*_`](?![*_`])/
+ }
+ ];
+ const STRONG = [
+ // inline unconstrained strong (single line)
+ {
+ className: 'strong',
+ begin: /\*{2}([^\n]+?)\*{2}/
+ },
+ // inline unconstrained strong (multi-line)
+ {
+ className: 'strong',
+ begin: concat(
+ /\*\*/,
+ /((\*(?!\*)|\\[^\n]|[^*\n\\])+\n)+/,
+ /(\*(?!\*)|\\[^\n]|[^*\n\\])*/,
+ /\*\*/
+ ),
+ relevance: 0
+ },
+ // inline constrained strong (single line)
+ {
+ className: 'strong',
+ // must not precede or follow a word character
+ begin: /\B\*(\S|\S[^\n]*?\S)\*(?!\w)/
+ },
+ // inline constrained strong (multi-line)
+ {
+ className: 'strong',
+ // must not precede or follow a word character
+ begin: /\*[^\s]([^\n]+\n)+([^\n]+)\*/
+ }
+ ];
+ const EMPHASIS = [
+ // inline unconstrained emphasis (single line)
+ {
+ className: 'emphasis',
+ begin: /_{2}([^\n]+?)_{2}/
+ },
+ // inline unconstrained emphasis (multi-line)
+ {
+ className: 'emphasis',
+ begin: concat(
+ /__/,
+ /((_(?!_)|\\[^\n]|[^_\n\\])+\n)+/,
+ /(_(?!_)|\\[^\n]|[^_\n\\])*/,
+ /__/
+ ),
+ relevance: 0
+ },
+ // inline constrained emphasis (single line)
+ {
+ className: 'emphasis',
+ // must not precede or follow a word character
+ begin: /\b_(\S|\S[^\n]*?\S)_(?!\w)/
+ },
+ // inline constrained emphasis (multi-line)
+ {
+ className: 'emphasis',
+ // must not precede or follow a word character
+ begin: /_[^\s]([^\n]+\n)+([^\n]+)_/
+ },
+ // inline constrained emphasis using single quote (legacy)
+ {
+ className: 'emphasis',
+ // must not follow a word character or be followed by a single quote or space
+ begin: '\\B\'(?![\'\\s])',
+ end: '(\\n{2}|\')',
+ // allow escaped single quote followed by word char
+ contains: [{
+ begin: '\\\\\'\\w',
+ relevance: 0
+ }],
+ relevance: 0
+ }
+ ];
+ const ADMONITION = {
+ className: 'symbol',
+ begin: '^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+',
+ relevance: 10
+ };
+ const BULLET_LIST = {
+ className: 'bullet',
+ begin: '^(\\*+|-+|\\.+|[^\\n]+?::)\\s+'
+ };
+
+ return {
+ name: 'AsciiDoc',
+ aliases: ['adoc'],
+ contains: [
+ // block comment
+ hljs.COMMENT(
+ '^/{4,}\\n',
+ '\\n/{4,}$',
+ // can also be done as...
+ // '^/{4,}$',
+ // '^/{4,}$',
+ {
+ relevance: 10
+ }
+ ),
+ // line comment
+ hljs.COMMENT(
+ '^//',
+ '$',
+ {
+ relevance: 0
+ }
+ ),
+ // title
+ {
+ className: 'title',
+ begin: '^\\.\\w.*$'
+ },
+ // example, admonition & sidebar blocks
+ {
+ begin: '^[=\\*]{4,}\\n',
+ end: '\\n^[=\\*]{4,}$',
+ relevance: 10
+ },
+ // headings
+ {
+ className: 'section',
+ relevance: 10,
+ variants: [
+ {
+ begin: '^(={1,6})[ \t].+?([ \t]\\1)?$'
+ },
+ {
+ begin: '^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$'
+ }
+ ]
+ },
+ // document attributes
+ {
+ className: 'meta',
+ begin: '^:.+?:',
+ end: '\\s',
+ excludeEnd: true,
+ relevance: 10
+ },
+ // block attributes
+ {
+ className: 'meta',
+ begin: '^\\[.+?\\]$',
+ relevance: 0
+ },
+ // quoteblocks
+ {
+ className: 'quote',
+ begin: '^_{4,}\\n',
+ end: '\\n_{4,}$',
+ relevance: 10
+ },
+ // listing and literal blocks
+ {
+ className: 'code',
+ begin: '^[\\-\\.]{4,}\\n',
+ end: '\\n[\\-\\.]{4,}$',
+ relevance: 10
+ },
+ // passthrough blocks
+ {
+ begin: '^\\+{4,}\\n',
+ end: '\\n\\+{4,}$',
+ contains: [{
+ begin: '<',
+ end: '>',
+ subLanguage: 'xml',
+ relevance: 0
+ }],
+ relevance: 10
+ },
+
+ BULLET_LIST,
+ ADMONITION,
+ ...ESCAPED_FORMATTING,
+ ...STRONG,
+ ...EMPHASIS,
+
+ // inline smart quotes
+ {
+ className: 'string',
+ variants: [
+ {
+ begin: "``.+?''"
+ },
+ {
+ begin: "`.+?'"
+ }
+ ]
+ },
+ // inline unconstrained emphasis
+ {
+ className: 'code',
+ begin: /`{2}/,
+ end: /(\n{2}|`{2})/
+ },
+ // inline code snippets (TODO should get same treatment as strong and emphasis)
+ {
+ className: 'code',
+ begin: '(`.+?`|\\+.+?\\+)',
+ relevance: 0
+ },
+ // indented literal block
+ {
+ className: 'code',
+ begin: '^[ \\t]',
+ end: '$',
+ relevance: 0
+ },
+ HORIZONTAL_RULE,
+ // images and links
+ {
+ begin: '(link:)?(http|https|ftp|file|irc|image:?):\\S+?\\[[^[]*?\\]',
+ returnBegin: true,
+ contains: [
+ {
+ begin: '(link|image:?):',
+ relevance: 0
+ },
+ {
+ className: 'link',
+ begin: '\\w',
+ end: '[^\\[]+',
+ relevance: 0
+ },
+ {
+ className: 'string',
+ begin: '\\[',
+ end: '\\]',
+ excludeBegin: true,
+ excludeEnd: true,
+ relevance: 0
+ }
+ ],
+ relevance: 10
+ }
+ ]
+ };
+}
+
+module.exports = asciidoc;
+
+
+/***/ }),
+
+/***/ 50436:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: AspectJ
+Author: Hakan Ozler
+Website: https://www.eclipse.org/aspectj/
+Description: Syntax Highlighting for the AspectJ Language which is a general-purpose aspect-oriented extension to the Java programming language.
+Audit: 2020
+*/
+
+/** @type LanguageFn */
+function aspectj(hljs) {
+ const KEYWORDS =
+ 'false synchronized int abstract float private char boolean static null if const ' +
+ 'for true while long throw strictfp finally protected import native final return void ' +
+ 'enum else extends implements break transient new catch instanceof byte super volatile case ' +
+ 'assert short package default double public try this switch continue throws privileged ' +
+ 'aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization ' +
+ 'staticinitialization withincode target within execution getWithinTypeName handler ' +
+ 'thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents ' +
+ 'warning error soft precedence thisAspectInstance';
+ const SHORTKEYS = 'get set args call';
+
+ return {
+ name: 'AspectJ',
+ keywords: KEYWORDS,
+ illegal: /<\/|#/,
+ contains: [
+ hljs.COMMENT(
+ /\/\*\*/,
+ /\*\//,
+ {
+ relevance: 0,
+ contains: [
+ {
+ // eat up @'s in emails to prevent them to be recognized as doctags
+ begin: /\w+@/,
+ relevance: 0
+ },
+ {
+ className: 'doctag',
+ begin: /@[A-Za-z]+/
+ }
+ ]
+ }
+ ),
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'class',
+ beginKeywords: 'aspect',
+ end: /[{;=]/,
+ excludeEnd: true,
+ illegal: /[:;"\[\]]/,
+ contains: [
+ {
+ beginKeywords: 'extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton'
+ },
+ hljs.UNDERSCORE_TITLE_MODE,
+ {
+ begin: /\([^\)]*/,
+ end: /[)]+/,
+ keywords: KEYWORDS + ' ' + SHORTKEYS,
+ excludeEnd: false
+ }
+ ]
+ },
+ {
+ className: 'class',
+ beginKeywords: 'class interface',
+ end: /[{;=]/,
+ excludeEnd: true,
+ relevance: 0,
+ keywords: 'class interface',
+ illegal: /[:"\[\]]/,
+ contains: [
+ {
+ beginKeywords: 'extends implements'
+ },
+ hljs.UNDERSCORE_TITLE_MODE
+ ]
+ },
+ {
+ // AspectJ Constructs
+ beginKeywords: 'pointcut after before around throwing returning',
+ end: /[)]/,
+ excludeEnd: false,
+ illegal: /["\[\]]/,
+ contains: [
+ {
+ begin: concat(hljs.UNDERSCORE_IDENT_RE, /\s*\(/),
+ returnBegin: true,
+ contains: [ hljs.UNDERSCORE_TITLE_MODE ]
+ }
+ ]
+ },
+ {
+ begin: /[:]/,
+ returnBegin: true,
+ end: /[{;]/,
+ relevance: 0,
+ excludeEnd: false,
+ keywords: KEYWORDS,
+ illegal: /["\[\]]/,
+ contains: [
+ {
+ begin: concat(hljs.UNDERSCORE_IDENT_RE, /\s*\(/),
+ keywords: KEYWORDS + ' ' + SHORTKEYS,
+ relevance: 0
+ },
+ hljs.QUOTE_STRING_MODE
+ ]
+ },
+ {
+ // this prevents 'new Name(...), or throw ...' from being recognized as a function definition
+ beginKeywords: 'new throw',
+ relevance: 0
+ },
+ {
+ // the function class is a bit different for AspectJ compared to the Java language
+ className: 'function',
+ begin: /\w+ +\w+(\.\w+)?\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,
+ returnBegin: true,
+ end: /[{;=]/,
+ keywords: KEYWORDS,
+ excludeEnd: true,
+ contains: [
+ {
+ begin: concat(hljs.UNDERSCORE_IDENT_RE, /\s*\(/),
+ returnBegin: true,
+ relevance: 0,
+ contains: [ hljs.UNDERSCORE_TITLE_MODE ]
+ },
+ {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ relevance: 0,
+ keywords: KEYWORDS,
+ contains: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ },
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ },
+ hljs.C_NUMBER_MODE,
+ {
+ // annotation is also used in this language
+ className: 'meta',
+ begin: /@[A-Za-z]+/
+ }
+ ]
+ };
+}
+
+module.exports = aspectj;
+
+
+/***/ }),
+
+/***/ 39381:
+/***/ ((module) => {
+
+/*
+Language: AutoHotkey
+Author: Seongwon Lee
+Description: AutoHotkey language definition
+Category: scripting
+*/
+
+/** @type LanguageFn */
+function autohotkey(hljs) {
+ const BACKTICK_ESCAPE = {
+ begin: '`[\\s\\S]'
+ };
+
+ return {
+ name: 'AutoHotkey',
+ case_insensitive: true,
+ aliases: ['ahk'],
+ keywords: {
+ keyword: 'Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group',
+ literal: 'true false NOT AND OR',
+ built_in: 'ComSpec Clipboard ClipboardAll ErrorLevel'
+ },
+ contains: [
+ BACKTICK_ESCAPE,
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ contains: [BACKTICK_ESCAPE]
+ }),
+ hljs.COMMENT(';', '$', {
+ relevance: 0
+ }),
+ hljs.C_BLOCK_COMMENT_MODE,
+ {
+ className: 'number',
+ begin: hljs.NUMBER_RE,
+ relevance: 0
+ },
+ {
+ // subst would be the most accurate however fails the point of
+ // highlighting. variable is comparably the most accurate that actually
+ // has some effect
+ className: 'variable',
+ begin: '%[a-zA-Z0-9#_$@]+%'
+ },
+ {
+ className: 'built_in',
+ begin: '^\\s*\\w+\\s*(,|%)'
+ // I don't really know if this is totally relevant
+ },
+ {
+ // symbol would be most accurate however is highlighted just like
+ // built_in and that makes up a lot of AutoHotkey code meaning that it
+ // would fail to highlight anything
+ className: 'title',
+ variants: [
+ {
+ begin: '^[^\\n";]+::(?!=)'
+ },
+ {
+ begin: '^[^\\n";]+:(?!=)',
+ // zero relevance as it catches a lot of things
+ // followed by a single ':' in many languages
+ relevance: 0
+ }
+ ]
+ },
+ {
+ className: 'meta',
+ begin: '^\\s*#\\w+',
+ end: '$',
+ relevance: 0
+ },
+ {
+ className: 'built_in',
+ begin: 'A_[a-zA-Z0-9]+'
+ },
+ {
+ // consecutive commas, not for highlighting but just for relevance
+ begin: ',\\s*,'
+ }
+ ]
+ };
+}
+
+module.exports = autohotkey;
+
+
+/***/ }),
+
+/***/ 62694:
+/***/ ((module) => {
+
+/*
+Language: AutoIt
+Author: Manh Tuan
+Description: AutoIt language definition
+Category: scripting
+*/
+
+/** @type LanguageFn */
+function autoit(hljs) {
+ const KEYWORDS = 'ByRef Case Const ContinueCase ContinueLoop ' +
+ 'Dim Do Else ElseIf EndFunc EndIf EndSelect ' +
+ 'EndSwitch EndWith Enum Exit ExitLoop For Func ' +
+ 'Global If In Local Next ReDim Return Select Static ' +
+ 'Step Switch Then To Until Volatile WEnd While With';
+
+ const DIRECTIVES = [
+ "EndRegion",
+ "forcedef",
+ "forceref",
+ "ignorefunc",
+ "include",
+ "include-once",
+ "NoTrayIcon",
+ "OnAutoItStartRegister",
+ "pragma",
+ "Region",
+ "RequireAdmin",
+ "Tidy_Off",
+ "Tidy_On",
+ "Tidy_Parameters"
+ ];
+
+ const LITERAL = 'True False And Null Not Or Default';
+
+ const BUILT_IN
+ = 'Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive';
+
+ const COMMENT = {
+ variants: [
+ hljs.COMMENT(';', '$', {
+ relevance: 0
+ }),
+ hljs.COMMENT('#cs', '#ce'),
+ hljs.COMMENT('#comments-start', '#comments-end')
+ ]
+ };
+
+ const VARIABLE = {
+ begin: '\\$[A-z0-9_]+'
+ };
+
+ const STRING = {
+ className: 'string',
+ variants: [
+ {
+ begin: /"/,
+ end: /"/,
+ contains: [{
+ begin: /""/,
+ relevance: 0
+ }]
+ },
+ {
+ begin: /'/,
+ end: /'/,
+ contains: [{
+ begin: /''/,
+ relevance: 0
+ }]
+ }
+ ]
+ };
+
+ const NUMBER = {
+ variants: [
+ hljs.BINARY_NUMBER_MODE,
+ hljs.C_NUMBER_MODE
+ ]
+ };
+
+ const PREPROCESSOR = {
+ className: 'meta',
+ begin: '#',
+ end: '$',
+ keywords: {
+ 'meta-keyword': DIRECTIVES
+ },
+ contains: [
+ {
+ begin: /\\\n/,
+ relevance: 0
+ },
+ {
+ beginKeywords: 'include',
+ keywords: {
+ 'meta-keyword': 'include'
+ },
+ end: '$',
+ contains: [
+ STRING,
+ {
+ className: 'meta-string',
+ variants: [
+ {
+ begin: '<',
+ end: '>'
+ },
+ {
+ begin: /"/,
+ end: /"/,
+ contains: [{
+ begin: /""/,
+ relevance: 0
+ }]
+ },
+ {
+ begin: /'/,
+ end: /'/,
+ contains: [{
+ begin: /''/,
+ relevance: 0
+ }]
+ }
+ ]
+ }
+ ]
+ },
+ STRING,
+ COMMENT
+ ]
+ };
+
+ const CONSTANT = {
+ className: 'symbol',
+ // begin: '@',
+ // end: '$',
+ // keywords: 'AppDataCommonDir AppDataDir AutoItExe AutoItPID AutoItVersion AutoItX64 COM_EventObj CommonFilesDir Compiled ComputerName ComSpec CPUArch CR CRLF DesktopCommonDir DesktopDepth DesktopDir DesktopHeight DesktopRefresh DesktopWidth DocumentsCommonDir error exitCode exitMethod extended FavoritesCommonDir FavoritesDir GUI_CtrlHandle GUI_CtrlId GUI_DragFile GUI_DragId GUI_DropId GUI_WinHandle HomeDrive HomePath HomeShare HotKeyPressed HOUR IPAddress1 IPAddress2 IPAddress3 IPAddress4 KBLayout LF LocalAppDataDir LogonDNSDomain LogonDomain LogonServer MDAY MIN MON MSEC MUILang MyDocumentsDir NumParams OSArch OSBuild OSLang OSServicePack OSType OSVersion ProgramFilesDir ProgramsCommonDir ProgramsDir ScriptDir ScriptFullPath ScriptLineNumber ScriptName SEC StartMenuCommonDir StartMenuDir StartupCommonDir StartupDir SW_DISABLE SW_ENABLE SW_HIDE SW_LOCK SW_MAXIMIZE SW_MINIMIZE SW_RESTORE SW_SHOW SW_SHOWDEFAULT SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_SHOWMINNOACTIVE SW_SHOWNA SW_SHOWNOACTIVATE SW_SHOWNORMAL SW_UNLOCK SystemDir TAB TempDir TRAY_ID TrayIconFlashing TrayIconVisible UserName UserProfileDir WDAY WindowsDir WorkingDir YDAY YEAR',
+ // relevance: 5
+ begin: '@[A-z0-9_]+'
+ };
+
+ const FUNCTION = {
+ className: 'function',
+ beginKeywords: 'Func',
+ end: '$',
+ illegal: '\\$|\\[|%',
+ contains: [
+ hljs.UNDERSCORE_TITLE_MODE,
+ {
+ className: 'params',
+ begin: '\\(',
+ end: '\\)',
+ contains: [
+ VARIABLE,
+ STRING,
+ NUMBER
+ ]
+ }
+ ]
+ };
+
+ return {
+ name: 'AutoIt',
+ case_insensitive: true,
+ illegal: /\/\*/,
+ keywords: {
+ keyword: KEYWORDS,
+ built_in: BUILT_IN,
+ literal: LITERAL
+ },
+ contains: [
+ COMMENT,
+ VARIABLE,
+ STRING,
+ NUMBER,
+ PREPROCESSOR,
+ CONSTANT,
+ FUNCTION
+ ]
+ };
+}
+
+module.exports = autoit;
+
+
+/***/ }),
+
+/***/ 74206:
+/***/ ((module) => {
+
+/*
+Language: AVR Assembly
+Author: Vladimir Ermakov
+Category: assembler
+Website: https://www.microchip.com/webdoc/avrassembler/avrassembler.wb_instruction_list.html
+*/
+
+/** @type LanguageFn */
+function avrasm(hljs) {
+ return {
+ name: 'AVR Assembly',
+ case_insensitive: true,
+ keywords: {
+ $pattern: '\\.?' + hljs.IDENT_RE,
+ keyword:
+ /* mnemonic */
+ 'adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs ' +
+ 'brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr ' +
+ 'clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor ' +
+ 'fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul ' +
+ 'muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs ' +
+ 'sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub ' +
+ 'subi swap tst wdr',
+ built_in:
+ /* general purpose registers */
+ 'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 ' +
+ 'r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ' +
+ /* IO Registers (ATMega128) */
+ 'ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h ' +
+ 'tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ' +
+ 'ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ' +
+ 'ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk ' +
+ 'tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ' +
+ 'ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr ' +
+ 'porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ' +
+ 'ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf',
+ meta:
+ '.byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list ' +
+ '.listmac .macro .nolist .org .set'
+ },
+ contains: [
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.COMMENT(
+ ';',
+ '$',
+ {
+ relevance: 0
+ }
+ ),
+ hljs.C_NUMBER_MODE, // 0x..., decimal, float
+ hljs.BINARY_NUMBER_MODE, // 0b...
+ {
+ className: 'number',
+ begin: '\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)' // $..., 0o...
+ },
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'string',
+ begin: '\'',
+ end: '[^\\\\]\'',
+ illegal: '[^\\\\][^\']'
+ },
+ {
+ className: 'symbol',
+ begin: '^[A-Za-z0-9_.$]+:'
+ },
+ {
+ className: 'meta',
+ begin: '#',
+ end: '$'
+ },
+ { // substitution within a macro
+ className: 'subst',
+ begin: '@[0-9]+'
+ }
+ ]
+ };
+}
+
+module.exports = avrasm;
+
+
+/***/ }),
+
+/***/ 10327:
+/***/ ((module) => {
+
+/*
+Language: Awk
+Author: Matthew Daly
+Website: https://www.gnu.org/software/gawk/manual/gawk.html
+Description: language definition for Awk scripts
+*/
+
+/** @type LanguageFn */
+function awk(hljs) {
+ const VARIABLE = {
+ className: 'variable',
+ variants: [
+ {
+ begin: /\$[\w\d#@][\w\d_]*/
+ },
+ {
+ begin: /\$\{(.*?)\}/
+ }
+ ]
+ };
+ const KEYWORDS = 'BEGIN END if else while do for in break continue delete next nextfile function func exit|10';
+ const STRING = {
+ className: 'string',
+ contains: [hljs.BACKSLASH_ESCAPE],
+ variants: [
+ {
+ begin: /(u|b)?r?'''/,
+ end: /'''/,
+ relevance: 10
+ },
+ {
+ begin: /(u|b)?r?"""/,
+ end: /"""/,
+ relevance: 10
+ },
+ {
+ begin: /(u|r|ur)'/,
+ end: /'/,
+ relevance: 10
+ },
+ {
+ begin: /(u|r|ur)"/,
+ end: /"/,
+ relevance: 10
+ },
+ {
+ begin: /(b|br)'/,
+ end: /'/
+ },
+ {
+ begin: /(b|br)"/,
+ end: /"/
+ },
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE
+ ]
+ };
+ return {
+ name: 'Awk',
+ keywords: {
+ keyword: KEYWORDS
+ },
+ contains: [
+ VARIABLE,
+ STRING,
+ hljs.REGEXP_MODE,
+ hljs.HASH_COMMENT_MODE,
+ hljs.NUMBER_MODE
+ ]
+ };
+}
+
+module.exports = awk;
+
+
+/***/ }),
+
+/***/ 72171:
+/***/ ((module) => {
+
+/*
+Language: Microsoft X++
+Description: X++ is a language used in Microsoft Dynamics 365, Dynamics AX, and Axapta.
+Author: Dmitri Roudakov
+Website: https://dynamics.microsoft.com/en-us/ax-overview/
+Category: enterprise
+*/
+
+/** @type LanguageFn */
+function axapta(hljs) {
+ const BUILT_IN_KEYWORDS = [
+ 'anytype',
+ 'boolean',
+ 'byte',
+ 'char',
+ 'container',
+ 'date',
+ 'double',
+ 'enum',
+ 'guid',
+ 'int',
+ 'int64',
+ 'long',
+ 'real',
+ 'short',
+ 'str',
+ 'utcdatetime',
+ 'var'
+ ];
+
+ const LITERAL_KEYWORDS = [
+ 'default',
+ 'false',
+ 'null',
+ 'true'
+ ];
+
+ const NORMAL_KEYWORDS = [
+ 'abstract',
+ 'as',
+ 'asc',
+ 'avg',
+ 'break',
+ 'breakpoint',
+ 'by',
+ 'byref',
+ 'case',
+ 'catch',
+ 'changecompany',
+ 'class',
+ 'client',
+ 'client',
+ 'common',
+ 'const',
+ 'continue',
+ 'count',
+ 'crosscompany',
+ 'delegate',
+ 'delete_from',
+ 'desc',
+ 'display',
+ 'div',
+ 'do',
+ 'edit',
+ 'else',
+ 'eventhandler',
+ 'exists',
+ 'extends',
+ 'final',
+ 'finally',
+ 'firstfast',
+ 'firstonly',
+ 'firstonly1',
+ 'firstonly10',
+ 'firstonly100',
+ 'firstonly1000',
+ 'flush',
+ 'for',
+ 'forceliterals',
+ 'forcenestedloop',
+ 'forceplaceholders',
+ 'forceselectorder',
+ 'forupdate',
+ 'from',
+ 'generateonly',
+ 'group',
+ 'hint',
+ 'if',
+ 'implements',
+ 'in',
+ 'index',
+ 'insert_recordset',
+ 'interface',
+ 'internal',
+ 'is',
+ 'join',
+ 'like',
+ 'maxof',
+ 'minof',
+ 'mod',
+ 'namespace',
+ 'new',
+ 'next',
+ 'nofetch',
+ 'notexists',
+ 'optimisticlock',
+ 'order',
+ 'outer',
+ 'pessimisticlock',
+ 'print',
+ 'private',
+ 'protected',
+ 'public',
+ 'readonly',
+ 'repeatableread',
+ 'retry',
+ 'return',
+ 'reverse',
+ 'select',
+ 'server',
+ 'setting',
+ 'static',
+ 'sum',
+ 'super',
+ 'switch',
+ 'this',
+ 'throw',
+ 'try',
+ 'ttsabort',
+ 'ttsbegin',
+ 'ttscommit',
+ 'unchecked',
+ 'update_recordset',
+ 'using',
+ 'validtimestate',
+ 'void',
+ 'where',
+ 'while'
+ ];
+
+ const KEYWORDS = {
+ keyword: NORMAL_KEYWORDS,
+ built_in: BUILT_IN_KEYWORDS,
+ literal: LITERAL_KEYWORDS
+ };
+
+ return {
+ name: 'X++',
+ aliases: ['x++'],
+ keywords: KEYWORDS,
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'meta',
+ begin: '#',
+ end: '$'
+ },
+ {
+ className: 'class',
+ beginKeywords: 'class interface',
+ end: /\{/,
+ excludeEnd: true,
+ illegal: ':',
+ contains: [
+ {
+ beginKeywords: 'extends implements'
+ },
+ hljs.UNDERSCORE_TITLE_MODE
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = axapta;
+
+
+/***/ }),
+
+/***/ 4720:
+/***/ ((module) => {
+
+/*
+Language: BASIC
+Author: Raphaël Assénat
+Description: Based on the BASIC reference from the Tandy 1000 guide
+Website: https://en.wikipedia.org/wiki/Tandy_1000
+*/
+
+/** @type LanguageFn */
+function basic(hljs) {
+ return {
+ name: 'BASIC',
+ case_insensitive: true,
+ illegal: '^\.',
+ // Support explicitly typed variables that end with $%! or #.
+ keywords: {
+ $pattern: '[a-zA-Z][a-zA-Z0-9_$%!#]*',
+ keyword:
+ 'ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE ' +
+ 'CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ ' +
+ 'DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ ' +
+ 'EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO ' +
+ 'HEX$ IF THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON ' +
+ 'OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET ' +
+ 'MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION ' +
+ 'BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET ' +
+ 'PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET ' +
+ 'RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP ' +
+ 'SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE ' +
+ 'WEND WIDTH WINDOW WRITE XOR'
+ },
+ contains: [
+ hljs.QUOTE_STRING_MODE,
+ hljs.COMMENT('REM', '$', {
+ relevance: 10
+ }),
+ hljs.COMMENT('\'', '$', {
+ relevance: 0
+ }),
+ {
+ // Match line numbers
+ className: 'symbol',
+ begin: '^[0-9]+ ',
+ relevance: 10
+ },
+ {
+ // Match typed numeric constants (1000, 12.34!, 1.2e5, 1.5#, 1.2D2)
+ className: 'number',
+ begin: '\\b\\d+(\\.\\d+)?([edED]\\d+)?[#\!]?',
+ relevance: 0
+ },
+ {
+ // Match hexadecimal numbers (&Hxxxx)
+ className: 'number',
+ begin: '(&[hH][0-9a-fA-F]{1,4})'
+ },
+ {
+ // Match octal numbers (&Oxxxxxx)
+ className: 'number',
+ begin: '(&[oO][0-7]{1,6})'
+ }
+ ]
+ };
+}
+
+module.exports = basic;
+
+
+/***/ }),
+
+/***/ 43120:
+/***/ ((module) => {
+
+/*
+Language: Backus–Naur Form
+Website: https://en.wikipedia.org/wiki/Backus–Naur_form
+Author: Oleg Efimov
+*/
+
+/** @type LanguageFn */
+function bnf(hljs) {
+ return {
+ name: 'Backus–Naur Form',
+ contains: [
+ // Attribute
+ {
+ className: 'attribute',
+ begin: /,
+ end: />/
+ },
+ // Specific
+ {
+ begin: /::=/,
+ end: /$/,
+ contains: [
+ {
+ begin: /,
+ end: />/
+ },
+ // Common
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = bnf;
+
+
+/***/ }),
+
+/***/ 80249:
+/***/ ((module) => {
+
+/*
+Language: Brainfuck
+Author: Evgeny Stepanischev
+Website: https://esolangs.org/wiki/Brainfuck
+*/
+
+/** @type LanguageFn */
+function brainfuck(hljs) {
+ const LITERAL = {
+ className: 'literal',
+ begin: /[+-]/,
+ relevance: 0
+ };
+ return {
+ name: 'Brainfuck',
+ aliases: ['bf'],
+ contains: [
+ hljs.COMMENT(
+ '[^\\[\\]\\.,\\+\\-<> \r\n]',
+ '[\\[\\]\\.,\\+\\-<> \r\n]',
+ {
+ returnEnd: true,
+ relevance: 0
+ }
+ ),
+ {
+ className: 'title',
+ begin: '[\\[\\]]',
+ relevance: 0
+ },
+ {
+ className: 'string',
+ begin: '[\\.,]',
+ relevance: 0
+ },
+ {
+ // this mode works as the only relevance counter
+ begin: /(?:\+\+|--)/,
+ contains: [LITERAL]
+ },
+ LITERAL
+ ]
+ };
+}
+
+module.exports = brainfuck;
+
+
+/***/ }),
+
+/***/ 29315:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function lookahead(re) {
+ return concat('(?=', re, ')');
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function optional(re) {
+ return concat('(', re, ')?');
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: C++
+Category: common, system
+Website: https://isocpp.org
+*/
+
+/** @type LanguageFn */
+function cPlusPlus(hljs) {
+ // added for historic reasons because `hljs.C_LINE_COMMENT_MODE` does
+ // not include such support nor can we be sure all the grammars depending
+ // on it would desire this behavior
+ const C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', {
+ contains: [
+ {
+ begin: /\\\n/
+ }
+ ]
+ });
+ const DECLTYPE_AUTO_RE = 'decltype\\(auto\\)';
+ const NAMESPACE_RE = '[a-zA-Z_]\\w*::';
+ const TEMPLATE_ARGUMENT_RE = '<[^<>]+>';
+ const FUNCTION_TYPE_RE = '(' +
+ DECLTYPE_AUTO_RE + '|' +
+ optional(NAMESPACE_RE) +
+ '[a-zA-Z_]\\w*' + optional(TEMPLATE_ARGUMENT_RE) +
+ ')';
+ const CPP_PRIMITIVE_TYPES = {
+ className: 'keyword',
+ begin: '\\b[a-z\\d_]*_t\\b'
+ };
+
+ // https://en.cppreference.com/w/cpp/language/escape
+ // \\ \x \xFF \u2837 \u00323747 \374
+ const CHARACTER_ESCAPES = '\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)';
+ const STRINGS = {
+ className: 'string',
+ variants: [
+ {
+ begin: '(u8?|U|L)?"',
+ end: '"',
+ illegal: '\\n',
+ contains: [ hljs.BACKSLASH_ESCAPE ]
+ },
+ {
+ begin: '(u8?|U|L)?\'(' + CHARACTER_ESCAPES + "|.)",
+ end: '\'',
+ illegal: '.'
+ },
+ hljs.END_SAME_AS_BEGIN({
+ begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,
+ end: /\)([^()\\ ]{0,16})"/
+ })
+ ]
+ };
+
+ const NUMBERS = {
+ className: 'number',
+ variants: [
+ {
+ begin: '\\b(0b[01\']+)'
+ },
+ {
+ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)'
+ },
+ {
+ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)'
+ }
+ ],
+ relevance: 0
+ };
+
+ const PREPROCESSOR = {
+ className: 'meta',
+ begin: /#\s*[a-z]+\b/,
+ end: /$/,
+ keywords: {
+ 'meta-keyword':
+ 'if else elif endif define undef warning error line ' +
+ 'pragma _Pragma ifdef ifndef include'
+ },
+ contains: [
+ {
+ begin: /\\\n/,
+ relevance: 0
+ },
+ hljs.inherit(STRINGS, {
+ className: 'meta-string'
+ }),
+ {
+ className: 'meta-string',
+ begin: /<.*?>/
+ },
+ C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ };
+
+ const TITLE_MODE = {
+ className: 'title',
+ begin: optional(NAMESPACE_RE) + hljs.IDENT_RE,
+ relevance: 0
+ };
+
+ const FUNCTION_TITLE = optional(NAMESPACE_RE) + hljs.IDENT_RE + '\\s*\\(';
+
+ const COMMON_CPP_HINTS = [
+ 'asin',
+ 'atan2',
+ 'atan',
+ 'calloc',
+ 'ceil',
+ 'cosh',
+ 'cos',
+ 'exit',
+ 'exp',
+ 'fabs',
+ 'floor',
+ 'fmod',
+ 'fprintf',
+ 'fputs',
+ 'free',
+ 'frexp',
+ 'auto_ptr',
+ 'deque',
+ 'list',
+ 'queue',
+ 'stack',
+ 'vector',
+ 'map',
+ 'set',
+ 'pair',
+ 'bitset',
+ 'multiset',
+ 'multimap',
+ 'unordered_set',
+ 'fscanf',
+ 'future',
+ 'isalnum',
+ 'isalpha',
+ 'iscntrl',
+ 'isdigit',
+ 'isgraph',
+ 'islower',
+ 'isprint',
+ 'ispunct',
+ 'isspace',
+ 'isupper',
+ 'isxdigit',
+ 'tolower',
+ 'toupper',
+ 'labs',
+ 'ldexp',
+ 'log10',
+ 'log',
+ 'malloc',
+ 'realloc',
+ 'memchr',
+ 'memcmp',
+ 'memcpy',
+ 'memset',
+ 'modf',
+ 'pow',
+ 'printf',
+ 'putchar',
+ 'puts',
+ 'scanf',
+ 'sinh',
+ 'sin',
+ 'snprintf',
+ 'sprintf',
+ 'sqrt',
+ 'sscanf',
+ 'strcat',
+ 'strchr',
+ 'strcmp',
+ 'strcpy',
+ 'strcspn',
+ 'strlen',
+ 'strncat',
+ 'strncmp',
+ 'strncpy',
+ 'strpbrk',
+ 'strrchr',
+ 'strspn',
+ 'strstr',
+ 'tanh',
+ 'tan',
+ 'unordered_map',
+ 'unordered_multiset',
+ 'unordered_multimap',
+ 'priority_queue',
+ 'make_pair',
+ 'array',
+ 'shared_ptr',
+ 'abort',
+ 'terminate',
+ 'abs',
+ 'acos',
+ 'vfprintf',
+ 'vprintf',
+ 'vsprintf',
+ 'endl',
+ 'initializer_list',
+ 'unique_ptr',
+ 'complex',
+ 'imaginary',
+ 'std',
+ 'string',
+ 'wstring',
+ 'cin',
+ 'cout',
+ 'cerr',
+ 'clog',
+ 'stdin',
+ 'stdout',
+ 'stderr',
+ 'stringstream',
+ 'istringstream',
+ 'ostringstream'
+ ];
+
+ const CPP_KEYWORDS = {
+ keyword: 'int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof ' +
+ 'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' +
+ 'unsigned long volatile static protected bool template mutable if public friend ' +
+ 'do goto auto void enum else break extern using asm case typeid wchar_t ' +
+ 'short reinterpret_cast|10 default double register explicit signed typename try this ' +
+ 'switch continue inline delete alignas alignof constexpr consteval constinit decltype ' +
+ 'concept co_await co_return co_yield requires ' +
+ 'noexcept static_assert thread_local restrict final override ' +
+ 'atomic_bool atomic_char atomic_schar ' +
+ 'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +
+ 'atomic_ullong new throw return ' +
+ 'and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq',
+ built_in: '_Bool _Complex _Imaginary',
+ _relevance_hints: COMMON_CPP_HINTS,
+ literal: 'true false nullptr NULL'
+ };
+
+ const FUNCTION_DISPATCH = {
+ className: "function.dispatch",
+ relevance: 0,
+ keywords: CPP_KEYWORDS,
+ begin: concat(
+ /\b/,
+ /(?!decltype)/,
+ /(?!if)/,
+ /(?!for)/,
+ /(?!while)/,
+ hljs.IDENT_RE,
+ lookahead(/\s*\(/))
+ };
+
+ const EXPRESSION_CONTAINS = [
+ FUNCTION_DISPATCH,
+ PREPROCESSOR,
+ CPP_PRIMITIVE_TYPES,
+ C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ NUMBERS,
+ STRINGS
+ ];
+
+
+ const EXPRESSION_CONTEXT = {
+ // This mode covers expression context where we can't expect a function
+ // definition and shouldn't highlight anything that looks like one:
+ // `return some()`, `else if()`, `(x*sum(1, 2))`
+ variants: [
+ {
+ begin: /=/,
+ end: /;/
+ },
+ {
+ begin: /\(/,
+ end: /\)/
+ },
+ {
+ beginKeywords: 'new throw return else',
+ end: /;/
+ }
+ ],
+ keywords: CPP_KEYWORDS,
+ contains: EXPRESSION_CONTAINS.concat([
+ {
+ begin: /\(/,
+ end: /\)/,
+ keywords: CPP_KEYWORDS,
+ contains: EXPRESSION_CONTAINS.concat([ 'self' ]),
+ relevance: 0
+ }
+ ]),
+ relevance: 0
+ };
+
+ const FUNCTION_DECLARATION = {
+ className: 'function',
+ begin: '(' + FUNCTION_TYPE_RE + '[\\*&\\s]+)+' + FUNCTION_TITLE,
+ returnBegin: true,
+ end: /[{;=]/,
+ excludeEnd: true,
+ keywords: CPP_KEYWORDS,
+ illegal: /[^\w\s\*&:<>.]/,
+ contains: [
+ { // to prevent it from being confused as the function title
+ begin: DECLTYPE_AUTO_RE,
+ keywords: CPP_KEYWORDS,
+ relevance: 0
+ },
+ {
+ begin: FUNCTION_TITLE,
+ returnBegin: true,
+ contains: [ TITLE_MODE ],
+ relevance: 0
+ },
+ // needed because we do not have look-behind on the below rule
+ // to prevent it from grabbing the final : in a :: pair
+ {
+ begin: /::/,
+ relevance: 0
+ },
+ // initializers
+ {
+ begin: /:/,
+ endsWithParent: true,
+ contains: [
+ STRINGS,
+ NUMBERS
+ ]
+ },
+ {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ keywords: CPP_KEYWORDS,
+ relevance: 0,
+ contains: [
+ C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ STRINGS,
+ NUMBERS,
+ CPP_PRIMITIVE_TYPES,
+ // Count matching parentheses.
+ {
+ begin: /\(/,
+ end: /\)/,
+ keywords: CPP_KEYWORDS,
+ relevance: 0,
+ contains: [
+ 'self',
+ C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ STRINGS,
+ NUMBERS,
+ CPP_PRIMITIVE_TYPES
+ ]
+ }
+ ]
+ },
+ CPP_PRIMITIVE_TYPES,
+ C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ PREPROCESSOR
+ ]
+ };
+
+ return {
+ name: 'C++',
+ aliases: [
+ 'cc',
+ 'c++',
+ 'h++',
+ 'hpp',
+ 'hh',
+ 'hxx',
+ 'cxx'
+ ],
+ keywords: CPP_KEYWORDS,
+ illegal: '',
+ classNameAliases: {
+ "function.dispatch": "built_in"
+ },
+ contains: [].concat(
+ EXPRESSION_CONTEXT,
+ FUNCTION_DECLARATION,
+ FUNCTION_DISPATCH,
+ EXPRESSION_CONTAINS,
+ [
+ PREPROCESSOR,
+ { // containers: ie, `vector rooms (9);`
+ begin: '\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<',
+ end: '>',
+ keywords: CPP_KEYWORDS,
+ contains: [
+ 'self',
+ CPP_PRIMITIVE_TYPES
+ ]
+ },
+ {
+ begin: hljs.IDENT_RE + '::',
+ keywords: CPP_KEYWORDS
+ },
+ {
+ className: 'class',
+ beginKeywords: 'enum class struct union',
+ end: /[{;:<>=]/,
+ contains: [
+ {
+ beginKeywords: "final class struct"
+ },
+ hljs.TITLE_MODE
+ ]
+ }
+ ]),
+ exports: {
+ preprocessor: PREPROCESSOR,
+ strings: STRINGS,
+ keywords: CPP_KEYWORDS
+ }
+ };
+}
+
+/*
+Language: C-like (deprecated, use C and C++ instead)
+Author: Ivan Sagalaev
+Contributors: Evgeny Stepanischev , Zaven Muradyan , Roel Deckers , Sam Wu , Jordi Petit , Pieter Vantorre , Google Inc. (David Benjamin)
+*/
+
+/** @type LanguageFn */
+function cLike(hljs) {
+ const lang = cPlusPlus(hljs);
+
+ const C_ALIASES = [
+ "c",
+ "h"
+ ];
+
+ const CPP_ALIASES = [
+ 'cc',
+ 'c++',
+ 'h++',
+ 'hpp',
+ 'hh',
+ 'hxx',
+ 'cxx'
+ ];
+
+ lang.disableAutodetect = true;
+ lang.aliases = [];
+ // support users only loading c-like (legacy)
+ if (!hljs.getLanguage("c")) lang.aliases.push(...C_ALIASES);
+ if (!hljs.getLanguage("cpp")) lang.aliases.push(...CPP_ALIASES);
+
+ // if c and cpp are loaded after then they will reclaim these
+ // aliases for themselves
+
+ return lang;
+}
+
+module.exports = cLike;
+
+
+/***/ }),
+
+/***/ 12142:
+/***/ ((module) => {
+
+/*
+Language: C/AL
+Author: Kenneth Fuglsang Christensen
+Description: Provides highlighting of Microsoft Dynamics NAV C/AL code files
+Website: https://docs.microsoft.com/en-us/dynamics-nav/programming-in-c-al
+*/
+
+/** @type LanguageFn */
+function cal(hljs) {
+ const KEYWORDS =
+ 'div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to ' +
+ 'until while with var';
+ const LITERALS = 'false true';
+ const COMMENT_MODES = [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.COMMENT(
+ /\{/,
+ /\}/,
+ {
+ relevance: 0
+ }
+ ),
+ hljs.COMMENT(
+ /\(\*/,
+ /\*\)/,
+ {
+ relevance: 10
+ }
+ )
+ ];
+ const STRING = {
+ className: 'string',
+ begin: /'/,
+ end: /'/,
+ contains: [{
+ begin: /''/
+ }]
+ };
+ const CHAR_STRING = {
+ className: 'string',
+ begin: /(#\d+)+/
+ };
+ const DATE = {
+ className: 'number',
+ begin: '\\b\\d+(\\.\\d+)?(DT|D|T)',
+ relevance: 0
+ };
+ const DBL_QUOTED_VARIABLE = {
+ className: 'string', // not a string technically but makes sense to be highlighted in the same style
+ begin: '"',
+ end: '"'
+ };
+
+ const PROCEDURE = {
+ className: 'function',
+ beginKeywords: 'procedure',
+ end: /[:;]/,
+ keywords: 'procedure|10',
+ contains: [
+ hljs.TITLE_MODE,
+ {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ keywords: KEYWORDS,
+ contains: [
+ STRING,
+ CHAR_STRING
+ ]
+ }
+ ].concat(COMMENT_MODES)
+ };
+
+ const OBJECT = {
+ className: 'class',
+ begin: 'OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)',
+ returnBegin: true,
+ contains: [
+ hljs.TITLE_MODE,
+ PROCEDURE
+ ]
+ };
+
+ return {
+ name: 'C/AL',
+ case_insensitive: true,
+ keywords: {
+ keyword: KEYWORDS,
+ literal: LITERALS
+ },
+ illegal: /\/\*/,
+ contains: [
+ STRING,
+ CHAR_STRING,
+ DATE,
+ DBL_QUOTED_VARIABLE,
+ hljs.NUMBER_MODE,
+ OBJECT,
+ PROCEDURE
+ ]
+ };
+}
+
+module.exports = cal;
+
+
+/***/ }),
+
+/***/ 63346:
+/***/ ((module) => {
+
+/*
+Language: Cap’n Proto
+Author: Oleg Efimov
+Description: Cap’n Proto message definition format
+Website: https://capnproto.org/capnp-tool.html
+Category: protocols
+*/
+
+/** @type LanguageFn */
+function capnproto(hljs) {
+ return {
+ name: 'Cap’n Proto',
+ aliases: ['capnp'],
+ keywords: {
+ keyword:
+ 'struct enum interface union group import using const annotation extends in of on as with from fixed',
+ built_in:
+ 'Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 ' +
+ 'Text Data AnyPointer AnyStruct Capability List',
+ literal:
+ 'true false'
+ },
+ contains: [
+ hljs.QUOTE_STRING_MODE,
+ hljs.NUMBER_MODE,
+ hljs.HASH_COMMENT_MODE,
+ {
+ className: 'meta',
+ begin: /@0x[\w\d]{16};/,
+ illegal: /\n/
+ },
+ {
+ className: 'symbol',
+ begin: /@\d+\b/
+ },
+ {
+ className: 'class',
+ beginKeywords: 'struct enum',
+ end: /\{/,
+ illegal: /\n/,
+ contains: [hljs.inherit(hljs.TITLE_MODE, {
+ starts: {
+ endsWithParent: true,
+ excludeEnd: true
+ } // hack: eating everything after the first title
+ })]
+ },
+ {
+ className: 'class',
+ beginKeywords: 'interface',
+ end: /\{/,
+ illegal: /\n/,
+ contains: [hljs.inherit(hljs.TITLE_MODE, {
+ starts: {
+ endsWithParent: true,
+ excludeEnd: true
+ } // hack: eating everything after the first title
+ })]
+ }
+ ]
+ };
+}
+
+module.exports = capnproto;
+
+
+/***/ }),
+
+/***/ 72312:
+/***/ ((module) => {
+
+/*
+Language: Ceylon
+Author: Lucas Werkmeister
+Website: https://ceylon-lang.org
+*/
+
+/** @type LanguageFn */
+function ceylon(hljs) {
+ // 2.3. Identifiers and keywords
+ const KEYWORDS =
+ 'assembly module package import alias class interface object given value ' +
+ 'assign void function new of extends satisfies abstracts in out return ' +
+ 'break continue throw assert dynamic if else switch case for while try ' +
+ 'catch finally then let this outer super is exists nonempty';
+ // 7.4.1 Declaration Modifiers
+ const DECLARATION_MODIFIERS =
+ 'shared abstract formal default actual variable late native deprecated ' +
+ 'final sealed annotation suppressWarnings small';
+ // 7.4.2 Documentation
+ const DOCUMENTATION =
+ 'doc by license see throws tagged';
+ const SUBST = {
+ className: 'subst',
+ excludeBegin: true,
+ excludeEnd: true,
+ begin: /``/,
+ end: /``/,
+ keywords: KEYWORDS,
+ relevance: 10
+ };
+ const EXPRESSIONS = [
+ {
+ // verbatim string
+ className: 'string',
+ begin: '"""',
+ end: '"""',
+ relevance: 10
+ },
+ {
+ // string literal or template
+ className: 'string',
+ begin: '"',
+ end: '"',
+ contains: [SUBST]
+ },
+ {
+ // character literal
+ className: 'string',
+ begin: "'",
+ end: "'"
+ },
+ {
+ // numeric literal
+ className: 'number',
+ begin: '#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?',
+ relevance: 0
+ }
+ ];
+ SUBST.contains = EXPRESSIONS;
+
+ return {
+ name: 'Ceylon',
+ keywords: {
+ keyword: KEYWORDS + ' ' + DECLARATION_MODIFIERS,
+ meta: DOCUMENTATION
+ },
+ illegal: '\\$[^01]|#[^0-9a-fA-F]',
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.COMMENT('/\\*', '\\*/', {
+ contains: ['self']
+ }),
+ {
+ // compiler annotation
+ className: 'meta',
+ begin: '@[a-z]\\w*(?::"[^"]*")?'
+ }
+ ].concat(EXPRESSIONS)
+ };
+}
+
+module.exports = ceylon;
+
+
+/***/ }),
+
+/***/ 40583:
+/***/ ((module) => {
+
+/*
+Language: Clean
+Author: Camil Staps
+Category: functional
+Website: http://clean.cs.ru.nl
+*/
+
+/** @type LanguageFn */
+function clean(hljs) {
+ return {
+ name: 'Clean',
+ aliases: [
+ 'icl',
+ 'dcl'
+ ],
+ keywords: {
+ keyword:
+ 'if let in with where case of class instance otherwise ' +
+ 'implementation definition system module from import qualified as ' +
+ 'special code inline foreign export ccall stdcall generic derive ' +
+ 'infix infixl infixr',
+ built_in:
+ 'Int Real Char Bool',
+ literal:
+ 'True False'
+ },
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE,
+ { // relevance booster
+ begin: '->|<-[|:]?|#!?|>>=|\\{\\||\\|\\}|:==|=:|<>'
+ }
+ ]
+ };
+}
+
+module.exports = clean;
+
+
+/***/ }),
+
+/***/ 8430:
+/***/ ((module) => {
+
+/*
+Language: Clojure REPL
+Description: Clojure REPL sessions
+Author: Ivan Sagalaev
+Requires: clojure.js
+Website: https://clojure.org
+Category: lisp
+*/
+
+/** @type LanguageFn */
+function clojureRepl(hljs) {
+ return {
+ name: 'Clojure REPL',
+ contains: [
+ {
+ className: 'meta',
+ begin: /^([\w.-]+|\s*#_)?=>/,
+ starts: {
+ end: /$/,
+ subLanguage: 'clojure'
+ }
+ }
+ ]
+ };
+}
+
+module.exports = clojureRepl;
+
+
+/***/ }),
+
+/***/ 83926:
+/***/ ((module) => {
+
+/*
+Language: Clojure
+Description: Clojure syntax (based on lisp.js)
+Author: mfornos
+Website: https://clojure.org
+Category: lisp
+*/
+
+/** @type LanguageFn */
+function clojure(hljs) {
+ const SYMBOLSTART = 'a-zA-Z_\\-!.?+*=<>\'';
+ const SYMBOL_RE = '[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:]*';
+ const globals = 'def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord';
+ const keywords = {
+ $pattern: SYMBOL_RE,
+ 'builtin-name':
+ // Clojure keywords
+ globals + ' ' +
+ 'cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem ' +
+ 'quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? ' +
+ 'set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? ' +
+ 'class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? ' +
+ 'string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . ' +
+ 'inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last ' +
+ 'drop-while while intern condp case reduced cycle split-at split-with repeat replicate ' +
+ 'iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext ' +
+ 'nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends ' +
+ 'add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler ' +
+ 'set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter ' +
+ 'monitor-exit macroexpand macroexpand-1 for dosync and or ' +
+ 'when when-not when-let comp juxt partial sequence memoize constantly complement identity assert ' +
+ 'peek pop doto proxy first rest cons cast coll last butlast ' +
+ 'sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import ' +
+ 'refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! ' +
+ 'assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger ' +
+ 'bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline ' +
+ 'flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking ' +
+ 'assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! ' +
+ 'reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! ' +
+ 'new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty ' +
+ 'hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list ' +
+ 'disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer ' +
+ 'chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate ' +
+ 'unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta ' +
+ 'lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize'
+ };
+
+ const SIMPLE_NUMBER_RE = '[-+]?\\d+(\\.\\d+)?';
+
+ const SYMBOL = {
+ begin: SYMBOL_RE,
+ relevance: 0
+ };
+ const NUMBER = {
+ className: 'number',
+ begin: SIMPLE_NUMBER_RE,
+ relevance: 0
+ };
+ const STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ illegal: null
+ });
+ const COMMENT = hljs.COMMENT(
+ ';',
+ '$',
+ {
+ relevance: 0
+ }
+ );
+ const LITERAL = {
+ className: 'literal',
+ begin: /\b(true|false|nil)\b/
+ };
+ const COLLECTION = {
+ begin: '[\\[\\{]',
+ end: '[\\]\\}]'
+ };
+ const HINT = {
+ className: 'comment',
+ begin: '\\^' + SYMBOL_RE
+ };
+ const HINT_COL = hljs.COMMENT('\\^\\{', '\\}');
+ const KEY = {
+ className: 'symbol',
+ begin: '[:]{1,2}' + SYMBOL_RE
+ };
+ const LIST = {
+ begin: '\\(',
+ end: '\\)'
+ };
+ const BODY = {
+ endsWithParent: true,
+ relevance: 0
+ };
+ const NAME = {
+ keywords: keywords,
+ className: 'name',
+ begin: SYMBOL_RE,
+ relevance: 0,
+ starts: BODY
+ };
+ const DEFAULT_CONTAINS = [
+ LIST,
+ STRING,
+ HINT,
+ HINT_COL,
+ COMMENT,
+ KEY,
+ COLLECTION,
+ NUMBER,
+ LITERAL,
+ SYMBOL
+ ];
+
+ const GLOBAL = {
+ beginKeywords: globals,
+ lexemes: SYMBOL_RE,
+ end: '(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',
+ contains: [
+ {
+ className: 'title',
+ begin: SYMBOL_RE,
+ relevance: 0,
+ excludeEnd: true,
+ // we can only have a single title
+ endsParent: true
+ }
+ ].concat(DEFAULT_CONTAINS)
+ };
+
+ LIST.contains = [
+ hljs.COMMENT('comment', ''),
+ GLOBAL,
+ NAME,
+ BODY
+ ];
+ BODY.contains = DEFAULT_CONTAINS;
+ COLLECTION.contains = DEFAULT_CONTAINS;
+ HINT_COL.contains = [ COLLECTION ];
+
+ return {
+ name: 'Clojure',
+ aliases: [ 'clj' ],
+ illegal: /\S/,
+ contains: [
+ LIST,
+ STRING,
+ HINT,
+ HINT_COL,
+ COMMENT,
+ KEY,
+ COLLECTION,
+ NUMBER,
+ LITERAL
+ ]
+ };
+}
+
+module.exports = clojure;
+
+
+/***/ }),
+
+/***/ 95765:
+/***/ ((module) => {
+
+/*
+Language: CMake
+Description: CMake is an open-source cross-platform system for build automation.
+Author: Igor Kalnitsky
+Website: https://cmake.org
+*/
+
+/** @type LanguageFn */
+function cmake(hljs) {
+ return {
+ name: 'CMake',
+ aliases: ['cmake.in'],
+ case_insensitive: true,
+ keywords: {
+ keyword:
+ // scripting commands
+ 'break cmake_host_system_information cmake_minimum_required cmake_parse_arguments ' +
+ 'cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro ' +
+ 'endwhile execute_process file find_file find_library find_package find_path ' +
+ 'find_program foreach function get_cmake_property get_directory_property ' +
+ 'get_filename_component get_property if include include_guard list macro ' +
+ 'mark_as_advanced math message option return separate_arguments ' +
+ 'set_directory_properties set_property set site_name string unset variable_watch while ' +
+ // project commands
+ 'add_compile_definitions add_compile_options add_custom_command add_custom_target ' +
+ 'add_definitions add_dependencies add_executable add_library add_link_options ' +
+ 'add_subdirectory add_test aux_source_directory build_command create_test_sourcelist ' +
+ 'define_property enable_language enable_testing export fltk_wrap_ui ' +
+ 'get_source_file_property get_target_property get_test_property include_directories ' +
+ 'include_external_msproject include_regular_expression install link_directories ' +
+ 'link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions ' +
+ 'set_source_files_properties set_target_properties set_tests_properties source_group ' +
+ 'target_compile_definitions target_compile_features target_compile_options ' +
+ 'target_include_directories target_link_directories target_link_libraries ' +
+ 'target_link_options target_sources try_compile try_run ' +
+ // CTest commands
+ 'ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ' +
+ 'ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ' +
+ 'ctest_test ctest_update ctest_upload ' +
+ // deprecated commands
+ 'build_name exec_program export_library_dependencies install_files install_programs ' +
+ 'install_targets load_command make_directory output_required_files remove ' +
+ 'subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file ' +
+ 'qt5_use_modules qt5_use_package qt5_wrap_cpp ' +
+ // core keywords
+ 'on off true false and or not command policy target test exists is_newer_than ' +
+ 'is_directory is_symlink is_absolute matches less greater equal less_equal ' +
+ 'greater_equal strless strgreater strequal strless_equal strgreater_equal version_less ' +
+ 'version_greater version_equal version_less_equal version_greater_equal in_list defined'
+ },
+ contains: [
+ {
+ className: 'variable',
+ begin: /\$\{/,
+ end: /\}/
+ },
+ hljs.HASH_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.NUMBER_MODE
+ ]
+ };
+}
+
+module.exports = cmake;
+
+
+/***/ }),
+
+/***/ 12007:
+/***/ ((module) => {
+
+const KEYWORDS = [
+ "as", // for exports
+ "in",
+ "of",
+ "if",
+ "for",
+ "while",
+ "finally",
+ "var",
+ "new",
+ "function",
+ "do",
+ "return",
+ "void",
+ "else",
+ "break",
+ "catch",
+ "instanceof",
+ "with",
+ "throw",
+ "case",
+ "default",
+ "try",
+ "switch",
+ "continue",
+ "typeof",
+ "delete",
+ "let",
+ "yield",
+ "const",
+ "class",
+ // JS handles these with a special rule
+ // "get",
+ // "set",
+ "debugger",
+ "async",
+ "await",
+ "static",
+ "import",
+ "from",
+ "export",
+ "extends"
+];
+const LITERALS = [
+ "true",
+ "false",
+ "null",
+ "undefined",
+ "NaN",
+ "Infinity"
+];
+
+const TYPES = [
+ "Intl",
+ "DataView",
+ "Number",
+ "Math",
+ "Date",
+ "String",
+ "RegExp",
+ "Object",
+ "Function",
+ "Boolean",
+ "Error",
+ "Symbol",
+ "Set",
+ "Map",
+ "WeakSet",
+ "WeakMap",
+ "Proxy",
+ "Reflect",
+ "JSON",
+ "Promise",
+ "Float64Array",
+ "Int16Array",
+ "Int32Array",
+ "Int8Array",
+ "Uint16Array",
+ "Uint32Array",
+ "Float32Array",
+ "Array",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "ArrayBuffer",
+ "BigInt64Array",
+ "BigUint64Array",
+ "BigInt"
+];
+
+const ERROR_TYPES = [
+ "EvalError",
+ "InternalError",
+ "RangeError",
+ "ReferenceError",
+ "SyntaxError",
+ "TypeError",
+ "URIError"
+];
+
+const BUILT_IN_GLOBALS = [
+ "setInterval",
+ "setTimeout",
+ "clearInterval",
+ "clearTimeout",
+
+ "require",
+ "exports",
+
+ "eval",
+ "isFinite",
+ "isNaN",
+ "parseFloat",
+ "parseInt",
+ "decodeURI",
+ "decodeURIComponent",
+ "encodeURI",
+ "encodeURIComponent",
+ "escape",
+ "unescape"
+];
+
+const BUILT_IN_VARIABLES = [
+ "arguments",
+ "this",
+ "super",
+ "console",
+ "window",
+ "document",
+ "localStorage",
+ "module",
+ "global" // Node.js
+];
+
+const BUILT_INS = [].concat(
+ BUILT_IN_GLOBALS,
+ BUILT_IN_VARIABLES,
+ TYPES,
+ ERROR_TYPES
+);
+
+/*
+Language: CoffeeScript
+Author: Dmytrii Nagirniak
+Contributors: Oleg Efimov , Cédric Néhémie
+Description: CoffeeScript is a programming language that transcompiles to JavaScript. For info about language see http://coffeescript.org/
+Category: common, scripting
+Website: https://coffeescript.org
+*/
+
+/** @type LanguageFn */
+function coffeescript(hljs) {
+ const COFFEE_BUILT_INS = [
+ 'npm',
+ 'print'
+ ];
+ const COFFEE_LITERALS = [
+ 'yes',
+ 'no',
+ 'on',
+ 'off'
+ ];
+ const COFFEE_KEYWORDS = [
+ 'then',
+ 'unless',
+ 'until',
+ 'loop',
+ 'by',
+ 'when',
+ 'and',
+ 'or',
+ 'is',
+ 'isnt',
+ 'not'
+ ];
+ const NOT_VALID_KEYWORDS = [
+ "var",
+ "const",
+ "let",
+ "function",
+ "static"
+ ];
+ const excluding = (list) =>
+ (kw) => !list.includes(kw);
+ const KEYWORDS$1 = {
+ keyword: KEYWORDS.concat(COFFEE_KEYWORDS).filter(excluding(NOT_VALID_KEYWORDS)),
+ literal: LITERALS.concat(COFFEE_LITERALS),
+ built_in: BUILT_INS.concat(COFFEE_BUILT_INS)
+ };
+ const JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
+ const SUBST = {
+ className: 'subst',
+ begin: /#\{/,
+ end: /\}/,
+ keywords: KEYWORDS$1
+ };
+ const EXPRESSIONS = [
+ hljs.BINARY_NUMBER_MODE,
+ hljs.inherit(hljs.C_NUMBER_MODE, {
+ starts: {
+ end: '(\\s*/)?',
+ relevance: 0
+ }
+ }), // a number tries to eat the following slash to prevent treating it as a regexp
+ {
+ className: 'string',
+ variants: [
+ {
+ begin: /'''/,
+ end: /'''/,
+ contains: [hljs.BACKSLASH_ESCAPE]
+ },
+ {
+ begin: /'/,
+ end: /'/,
+ contains: [hljs.BACKSLASH_ESCAPE]
+ },
+ {
+ begin: /"""/,
+ end: /"""/,
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST
+ ]
+ },
+ {
+ begin: /"/,
+ end: /"/,
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST
+ ]
+ }
+ ]
+ },
+ {
+ className: 'regexp',
+ variants: [
+ {
+ begin: '///',
+ end: '///',
+ contains: [
+ SUBST,
+ hljs.HASH_COMMENT_MODE
+ ]
+ },
+ {
+ begin: '//[gim]{0,3}(?=\\W)',
+ relevance: 0
+ },
+ {
+ // regex can't start with space to parse x / 2 / 3 as two divisions
+ // regex can't start with *, and it supports an "illegal" in the main mode
+ begin: /\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/
+ }
+ ]
+ },
+ {
+ begin: '@' + JS_IDENT_RE // relevance booster
+ },
+ {
+ subLanguage: 'javascript',
+ excludeBegin: true,
+ excludeEnd: true,
+ variants: [
+ {
+ begin: '```',
+ end: '```'
+ },
+ {
+ begin: '`',
+ end: '`'
+ }
+ ]
+ }
+ ];
+ SUBST.contains = EXPRESSIONS;
+
+ const TITLE = hljs.inherit(hljs.TITLE_MODE, {
+ begin: JS_IDENT_RE
+ });
+ const POSSIBLE_PARAMS_RE = '(\\(.*\\)\\s*)?\\B[-=]>';
+ const PARAMS = {
+ className: 'params',
+ begin: '\\([^\\(]',
+ returnBegin: true,
+ /* We need another contained nameless mode to not have every nested
+ pair of parens to be called "params" */
+ contains: [{
+ begin: /\(/,
+ end: /\)/,
+ keywords: KEYWORDS$1,
+ contains: ['self'].concat(EXPRESSIONS)
+ }]
+ };
+
+ return {
+ name: 'CoffeeScript',
+ aliases: [
+ 'coffee',
+ 'cson',
+ 'iced'
+ ],
+ keywords: KEYWORDS$1,
+ illegal: /\/\*/,
+ contains: EXPRESSIONS.concat([
+ hljs.COMMENT('###', '###'),
+ hljs.HASH_COMMENT_MODE,
+ {
+ className: 'function',
+ begin: '^\\s*' + JS_IDENT_RE + '\\s*=\\s*' + POSSIBLE_PARAMS_RE,
+ end: '[-=]>',
+ returnBegin: true,
+ contains: [
+ TITLE,
+ PARAMS
+ ]
+ },
+ {
+ // anonymous function start
+ begin: /[:\(,=]\s*/,
+ relevance: 0,
+ contains: [{
+ className: 'function',
+ begin: POSSIBLE_PARAMS_RE,
+ end: '[-=]>',
+ returnBegin: true,
+ contains: [PARAMS]
+ }]
+ },
+ {
+ className: 'class',
+ beginKeywords: 'class',
+ end: '$',
+ illegal: /[:="\[\]]/,
+ contains: [
+ {
+ beginKeywords: 'extends',
+ endsWithParent: true,
+ illegal: /[:="\[\]]/,
+ contains: [TITLE]
+ },
+ TITLE
+ ]
+ },
+ {
+ begin: JS_IDENT_RE + ':',
+ end: ':',
+ returnBegin: true,
+ returnEnd: true,
+ relevance: 0
+ }
+ ])
+ };
+}
+
+module.exports = coffeescript;
+
+
+/***/ }),
+
+/***/ 61083:
+/***/ ((module) => {
+
+/*
+Language: Coq
+Author: Stephan Boyer
+Category: functional
+Website: https://coq.inria.fr
+*/
+
+/** @type LanguageFn */
+function coq(hljs) {
+ return {
+ name: 'Coq',
+ keywords: {
+ keyword:
+ '_|0 as at cofix else end exists exists2 fix for forall fun if IF in let ' +
+ 'match mod Prop return Set then Type using where with ' +
+ 'Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo ' +
+ 'Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion ' +
+ 'Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture ' +
+ 'Conjectures Constant constr Constraint Constructors Context Corollary ' +
+ 'CreateHintDb Cut Declare Defined Definition Delimit Dependencies Dependent ' +
+ 'Derive Drop eauto End Equality Eval Example Existential Existentials ' +
+ 'Existing Export exporting Extern Extract Extraction Fact Field Fields File ' +
+ 'Fixpoint Focus for From Function Functional Generalizable Global Goal Grab ' +
+ 'Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident ' +
+ 'Identity If Immediate Implicit Import Include Inductive Infix Info Initial ' +
+ 'Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear ' +
+ 'Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML ' +
+ 'Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation ' +
+ 'Obligations Opaque Open Optimize Options Parameter Parameters Parametric ' +
+ 'Path Paths pattern Polymorphic Preterm Print Printing Program Projections ' +
+ 'Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark ' +
+ 'Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save ' +
+ 'Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern ' +
+ 'SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies ' +
+ 'Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time ' +
+ 'Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused ' +
+ 'Unfold Universe Universes Unset Unshelve using Variable Variables Variant ' +
+ 'Verbose Visibility where with',
+ built_in:
+ 'abstract absurd admit after apply as assert assumption at auto autorewrite ' +
+ 'autounfold before bottom btauto by case case_eq cbn cbv change ' +
+ 'classical_left classical_right clear clearbody cofix compare compute ' +
+ 'congruence constr_eq constructor contradict contradiction cut cutrewrite ' +
+ 'cycle decide decompose dependent destruct destruction dintuition ' +
+ 'discriminate discrR do double dtauto eapply eassumption eauto ecase ' +
+ 'econstructor edestruct ediscriminate eelim eexact eexists einduction ' +
+ 'einjection eleft elim elimtype enough equality erewrite eright ' +
+ 'esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail ' +
+ 'field field_simplify field_simplify_eq first firstorder fix fold fourier ' +
+ 'functional generalize generalizing gfail give_up has_evar hnf idtac in ' +
+ 'induction injection instantiate intro intro_pattern intros intuition ' +
+ 'inversion inversion_clear is_evar is_var lapply lazy left lia lra move ' +
+ 'native_compute nia nsatz omega once pattern pose progress proof psatz quote ' +
+ 'record red refine reflexivity remember rename repeat replace revert ' +
+ 'revgoals rewrite rewrite_strat right ring ring_simplify rtauto set ' +
+ 'setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry ' +
+ 'setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve ' +
+ 'specialize split split_Rabs split_Rmult stepl stepr subst sum swap ' +
+ 'symmetry tactic tauto time timeout top transitivity trivial try tryif ' +
+ 'unfold unify until using vm_compute with'
+ },
+ contains: [
+ hljs.QUOTE_STRING_MODE,
+ hljs.COMMENT('\\(\\*', '\\*\\)'),
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'type',
+ excludeBegin: true,
+ begin: '\\|\\s*',
+ end: '\\w+'
+ },
+ { // relevance booster
+ begin: /[-=]>/
+ }
+ ]
+ };
+}
+
+module.exports = coq;
+
+
+/***/ }),
+
+/***/ 25501:
+/***/ ((module) => {
+
+/*
+Language: Caché Object Script
+Author: Nikita Savchenko
+Category: enterprise, scripting
+Website: https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls
+*/
+
+/** @type LanguageFn */
+function cos(hljs) {
+ const STRINGS = {
+ className: 'string',
+ variants: [{
+ begin: '"',
+ end: '"',
+ contains: [{ // escaped
+ begin: "\"\"",
+ relevance: 0
+ }]
+ }]
+ };
+
+ const NUMBERS = {
+ className: "number",
+ begin: "\\b(\\d+(\\.\\d*)?|\\.\\d+)",
+ relevance: 0
+ };
+
+ const COS_KEYWORDS =
+ 'property parameter class classmethod clientmethod extends as break ' +
+ 'catch close continue do d|0 else elseif for goto halt hang h|0 if job ' +
+ 'j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 ' +
+ 'tcommit throw trollback try tstart use view while write w|0 xecute x|0 ' +
+ 'zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert ' +
+ 'zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit ' +
+ 'zsync ascii';
+
+ // registered function - no need in them due to all functions are highlighted,
+ // but I'll just leave this here.
+
+ // "$bit", "$bitcount",
+ // "$bitfind", "$bitlogic", "$case", "$char", "$classmethod", "$classname",
+ // "$compile", "$data", "$decimal", "$double", "$extract", "$factor",
+ // "$find", "$fnumber", "$get", "$increment", "$inumber", "$isobject",
+ // "$isvaliddouble", "$isvalidnum", "$justify", "$length", "$list",
+ // "$listbuild", "$listdata", "$listfind", "$listfromstring", "$listget",
+ // "$listlength", "$listnext", "$listsame", "$listtostring", "$listvalid",
+ // "$locate", "$match", "$method", "$name", "$nconvert", "$next",
+ // "$normalize", "$now", "$number", "$order", "$parameter", "$piece",
+ // "$prefetchoff", "$prefetchon", "$property", "$qlength", "$qsubscript",
+ // "$query", "$random", "$replace", "$reverse", "$sconvert", "$select",
+ // "$sortbegin", "$sortend", "$stack", "$text", "$translate", "$view",
+ // "$wascii", "$wchar", "$wextract", "$wfind", "$wiswide", "$wlength",
+ // "$wreverse", "$xecute", "$zabs", "$zarccos", "$zarcsin", "$zarctan",
+ // "$zcos", "$zcot", "$zcsc", "$zdate", "$zdateh", "$zdatetime",
+ // "$zdatetimeh", "$zexp", "$zhex", "$zln", "$zlog", "$zpower", "$zsec",
+ // "$zsin", "$zsqr", "$ztan", "$ztime", "$ztimeh", "$zboolean",
+ // "$zconvert", "$zcrc", "$zcyc", "$zdascii", "$zdchar", "$zf",
+ // "$ziswide", "$zlascii", "$zlchar", "$zname", "$zposition", "$zqascii",
+ // "$zqchar", "$zsearch", "$zseek", "$zstrip", "$zwascii", "$zwchar",
+ // "$zwidth", "$zwpack", "$zwbpack", "$zwunpack", "$zwbunpack", "$zzenkaku",
+ // "$change", "$mv", "$mvat", "$mvfmt", "$mvfmts", "$mviconv",
+ // "$mviconvs", "$mvinmat", "$mvlover", "$mvoconv", "$mvoconvs", "$mvraise",
+ // "$mvtrans", "$mvv", "$mvname", "$zbitand", "$zbitcount", "$zbitfind",
+ // "$zbitget", "$zbitlen", "$zbitnot", "$zbitor", "$zbitset", "$zbitstr",
+ // "$zbitxor", "$zincrement", "$znext", "$zorder", "$zprevious", "$zsort",
+ // "device", "$ecode", "$estack", "$etrap", "$halt", "$horolog",
+ // "$io", "$job", "$key", "$namespace", "$principal", "$quit", "$roles",
+ // "$storage", "$system", "$test", "$this", "$tlevel", "$username",
+ // "$x", "$y", "$za", "$zb", "$zchild", "$zeof", "$zeos", "$zerror",
+ // "$zhorolog", "$zio", "$zjob", "$zmode", "$znspace", "$zparent", "$zpi",
+ // "$zpos", "$zreference", "$zstorage", "$ztimestamp", "$ztimezone",
+ // "$ztrap", "$zversion"
+
+ return {
+ name: 'Caché Object Script',
+ case_insensitive: true,
+ aliases: [
+ "cls"
+ ],
+ keywords: COS_KEYWORDS,
+ contains: [
+ NUMBERS,
+ STRINGS,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ {
+ className: "comment",
+ begin: /;/,
+ end: "$",
+ relevance: 0
+ },
+ { // Functions and user-defined functions: write $ztime(60*60*3), $$myFunc(10), $$^Val(1)
+ className: "built_in",
+ begin: /(?:\$\$?|\.\.)\^?[a-zA-Z]+/
+ },
+ { // Macro command: quit $$$OK
+ className: "built_in",
+ begin: /\$\$\$[a-zA-Z]+/
+ },
+ { // Special (global) variables: write %request.Content; Built-in classes: %Library.Integer
+ className: "built_in",
+ begin: /%[a-z]+(?:\.[a-z]+)*/
+ },
+ { // Global variable: set ^globalName = 12 write ^globalName
+ className: "symbol",
+ begin: /\^%?[a-zA-Z][\w]*/
+ },
+ { // Some control constructions: do ##class(Package.ClassName).Method(), ##super()
+ className: "keyword",
+ begin: /##class|##super|#define|#dim/
+ },
+ // sub-languages: are not fully supported by hljs by 11/15/2015
+ // left for the future implementation.
+ {
+ begin: /&sql\(/,
+ end: /\)/,
+ excludeBegin: true,
+ excludeEnd: true,
+ subLanguage: "sql"
+ },
+ {
+ begin: /&(js|jscript|javascript),
+ end: />/,
+ excludeBegin: true,
+ excludeEnd: true,
+ subLanguage: "javascript"
+ },
+ {
+ // this brakes first and last tag, but this is the only way to embed a valid html
+ begin: /&html<\s*,
+ end: />\s*>/,
+ subLanguage: "xml"
+ }
+ ]
+ };
+}
+
+module.exports = cos;
+
+
+/***/ }),
+
+/***/ 61309:
+/***/ ((module) => {
+
+/*
+Language: crmsh
+Author: Kristoffer Gronlund
+Website: http://crmsh.github.io
+Description: Syntax Highlighting for the crmsh DSL
+Category: config
+*/
+
+/** @type LanguageFn */
+function crmsh(hljs) {
+ const RESOURCES = 'primitive rsc_template';
+ const COMMANDS = 'group clone ms master location colocation order fencing_topology ' +
+ 'rsc_ticket acl_target acl_group user role ' +
+ 'tag xml';
+ const PROPERTY_SETS = 'property rsc_defaults op_defaults';
+ const KEYWORDS = 'params meta operations op rule attributes utilization';
+ const OPERATORS = 'read write deny defined not_defined in_range date spec in ' +
+ 'ref reference attribute type xpath version and or lt gt tag ' +
+ 'lte gte eq ne \\';
+ const TYPES = 'number string';
+ const LITERALS = 'Master Started Slave Stopped start promote demote stop monitor true false';
+
+ return {
+ name: 'crmsh',
+ aliases: [
+ 'crm',
+ 'pcmk'
+ ],
+ case_insensitive: true,
+ keywords: {
+ keyword: KEYWORDS + ' ' + OPERATORS + ' ' + TYPES,
+ literal: LITERALS
+ },
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ {
+ beginKeywords: 'node',
+ starts: {
+ end: '\\s*([\\w_-]+:)?',
+ starts: {
+ className: 'title',
+ end: '\\s*[\\$\\w_][\\w_-]*'
+ }
+ }
+ },
+ {
+ beginKeywords: RESOURCES,
+ starts: {
+ className: 'title',
+ end: '\\s*[\\$\\w_][\\w_-]*',
+ starts: {
+ end: '\\s*@?[\\w_][\\w_\\.:-]*'
+ }
+ }
+ },
+ {
+ begin: '\\b(' + COMMANDS.split(' ').join('|') + ')\\s+',
+ keywords: COMMANDS,
+ starts: {
+ className: 'title',
+ end: '[\\$\\w_][\\w_-]*'
+ }
+ },
+ {
+ beginKeywords: PROPERTY_SETS,
+ starts: {
+ className: 'title',
+ end: '\\s*([\\w_-]+:)?'
+ }
+ },
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'meta',
+ begin: '(ocf|systemd|service|lsb):[\\w_:-]+',
+ relevance: 0
+ },
+ {
+ className: 'number',
+ begin: '\\b\\d+(\\.\\d+)?(ms|s|h|m)?',
+ relevance: 0
+ },
+ {
+ className: 'literal',
+ begin: '[-]?(infinity|inf)',
+ relevance: 0
+ },
+ {
+ className: 'attr',
+ begin: /([A-Za-z$_#][\w_-]+)=/,
+ relevance: 0
+ },
+ {
+ className: 'tag',
+ begin: '?',
+ end: '/?>',
+ relevance: 0
+ }
+ ]
+ };
+}
+
+module.exports = crmsh;
+
+
+/***/ }),
+
+/***/ 5356:
+/***/ ((module) => {
+
+/*
+Language: Crystal
+Author: TSUYUSATO Kitsune
+Website: https://crystal-lang.org
+*/
+
+/** @type LanguageFn */
+function crystal(hljs) {
+ const INT_SUFFIX = '(_?[ui](8|16|32|64|128))?';
+ const FLOAT_SUFFIX = '(_?f(32|64))?';
+ const CRYSTAL_IDENT_RE = '[a-zA-Z_]\\w*[!?=]?';
+ const CRYSTAL_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?';
+ const CRYSTAL_PATH_RE = '[A-Za-z_]\\w*(::\\w+)*(\\?|!)?';
+ const CRYSTAL_KEYWORDS = {
+ $pattern: CRYSTAL_IDENT_RE,
+ keyword:
+ 'abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if ' +
+ 'include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? ' +
+ 'return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield ' +
+ '__DIR__ __END_LINE__ __FILE__ __LINE__',
+ literal: 'false nil true'
+ };
+ const SUBST = {
+ className: 'subst',
+ begin: /#\{/,
+ end: /\}/,
+ keywords: CRYSTAL_KEYWORDS
+ };
+ const EXPANSION = {
+ className: 'template-variable',
+ variants: [
+ {
+ begin: '\\{\\{',
+ end: '\\}\\}'
+ },
+ {
+ begin: '\\{%',
+ end: '%\\}'
+ }
+ ],
+ keywords: CRYSTAL_KEYWORDS
+ };
+
+ function recursiveParen(begin, end) {
+ const
+ contains = [
+ {
+ begin: begin,
+ end: end
+ }
+ ];
+ contains[0].contains = contains;
+ return contains;
+ }
+ const STRING = {
+ className: 'string',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST
+ ],
+ variants: [
+ {
+ begin: /'/,
+ end: /'/
+ },
+ {
+ begin: /"/,
+ end: /"/
+ },
+ {
+ begin: /`/,
+ end: /`/
+ },
+ {
+ begin: '%[Qwi]?\\(',
+ end: '\\)',
+ contains: recursiveParen('\\(', '\\)')
+ },
+ {
+ begin: '%[Qwi]?\\[',
+ end: '\\]',
+ contains: recursiveParen('\\[', '\\]')
+ },
+ {
+ begin: '%[Qwi]?\\{',
+ end: /\}/,
+ contains: recursiveParen(/\{/, /\}/)
+ },
+ {
+ begin: '%[Qwi]?<',
+ end: '>',
+ contains: recursiveParen('<', '>')
+ },
+ {
+ begin: '%[Qwi]?\\|',
+ end: '\\|'
+ },
+ {
+ begin: /<<-\w+$/,
+ end: /^\s*\w+$/
+ }
+ ],
+ relevance: 0
+ };
+ const Q_STRING = {
+ className: 'string',
+ variants: [
+ {
+ begin: '%q\\(',
+ end: '\\)',
+ contains: recursiveParen('\\(', '\\)')
+ },
+ {
+ begin: '%q\\[',
+ end: '\\]',
+ contains: recursiveParen('\\[', '\\]')
+ },
+ {
+ begin: '%q\\{',
+ end: /\}/,
+ contains: recursiveParen(/\{/, /\}/)
+ },
+ {
+ begin: '%q<',
+ end: '>',
+ contains: recursiveParen('<', '>')
+ },
+ {
+ begin: '%q\\|',
+ end: '\\|'
+ },
+ {
+ begin: /<<-'\w+'$/,
+ end: /^\s*\w+$/
+ }
+ ],
+ relevance: 0
+ };
+ const REGEXP = {
+ begin: '(?!%\\})(' + hljs.RE_STARTERS_RE + '|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*',
+ keywords: 'case if select unless until when while',
+ contains: [
+ {
+ className: 'regexp',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST
+ ],
+ variants: [
+ {
+ begin: '//[a-z]*',
+ relevance: 0
+ },
+ {
+ begin: '/(?!\\/)',
+ end: '/[a-z]*'
+ }
+ ]
+ }
+ ],
+ relevance: 0
+ };
+ const REGEXP2 = {
+ className: 'regexp',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST
+ ],
+ variants: [
+ {
+ begin: '%r\\(',
+ end: '\\)',
+ contains: recursiveParen('\\(', '\\)')
+ },
+ {
+ begin: '%r\\[',
+ end: '\\]',
+ contains: recursiveParen('\\[', '\\]')
+ },
+ {
+ begin: '%r\\{',
+ end: /\}/,
+ contains: recursiveParen(/\{/, /\}/)
+ },
+ {
+ begin: '%r<',
+ end: '>',
+ contains: recursiveParen('<', '>')
+ },
+ {
+ begin: '%r\\|',
+ end: '\\|'
+ }
+ ],
+ relevance: 0
+ };
+ const ATTRIBUTE = {
+ className: 'meta',
+ begin: '@\\[',
+ end: '\\]',
+ contains: [
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ className: 'meta-string'
+ })
+ ]
+ };
+ const CRYSTAL_DEFAULT_CONTAINS = [
+ EXPANSION,
+ STRING,
+ Q_STRING,
+ REGEXP2,
+ REGEXP,
+ ATTRIBUTE,
+ hljs.HASH_COMMENT_MODE,
+ {
+ className: 'class',
+ beginKeywords: 'class module struct',
+ end: '$|;',
+ illegal: /=/,
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: CRYSTAL_PATH_RE
+ }),
+ { // relevance booster for inheritance
+ begin: '<'
+ }
+ ]
+ },
+ {
+ className: 'class',
+ beginKeywords: 'lib enum union',
+ end: '$|;',
+ illegal: /=/,
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: CRYSTAL_PATH_RE
+ })
+ ]
+ },
+ {
+ beginKeywords: 'annotation',
+ end: '$|;',
+ illegal: /=/,
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: CRYSTAL_PATH_RE
+ })
+ ],
+ relevance: 2
+ },
+ {
+ className: 'function',
+ beginKeywords: 'def',
+ end: /\B\b/,
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: CRYSTAL_METHOD_RE,
+ endsParent: true
+ })
+ ]
+ },
+ {
+ className: 'function',
+ beginKeywords: 'fun macro',
+ end: /\B\b/,
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: CRYSTAL_METHOD_RE,
+ endsParent: true
+ })
+ ],
+ relevance: 2
+ },
+ {
+ className: 'symbol',
+ begin: hljs.UNDERSCORE_IDENT_RE + '(!|\\?)?:',
+ relevance: 0
+ },
+ {
+ className: 'symbol',
+ begin: ':',
+ contains: [
+ STRING,
+ {
+ begin: CRYSTAL_METHOD_RE
+ }
+ ],
+ relevance: 0
+ },
+ {
+ className: 'number',
+ variants: [
+ {
+ begin: '\\b0b([01_]+)' + INT_SUFFIX
+ },
+ {
+ begin: '\\b0o([0-7_]+)' + INT_SUFFIX
+ },
+ {
+ begin: '\\b0x([A-Fa-f0-9_]+)' + INT_SUFFIX
+ },
+ {
+ begin: '\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?' + FLOAT_SUFFIX + '(?!_)'
+ },
+ {
+ begin: '\\b([1-9][0-9_]*|0)' + INT_SUFFIX
+ }
+ ],
+ relevance: 0
+ }
+ ];
+ SUBST.contains = CRYSTAL_DEFAULT_CONTAINS;
+ EXPANSION.contains = CRYSTAL_DEFAULT_CONTAINS.slice(1); // without EXPANSION
+
+ return {
+ name: 'Crystal',
+ aliases: [ 'cr' ],
+ keywords: CRYSTAL_KEYWORDS,
+ contains: CRYSTAL_DEFAULT_CONTAINS
+ };
+}
+
+module.exports = crystal;
+
+
+/***/ }),
+
+/***/ 22216:
+/***/ ((module) => {
+
+/*
+Language: CSP
+Description: Content Security Policy definition highlighting
+Author: Taras
+Website: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
+
+vim: ts=2 sw=2 st=2
+*/
+
+/** @type LanguageFn */
+function csp(hljs) {
+ return {
+ name: 'CSP',
+ case_insensitive: false,
+ keywords: {
+ $pattern: '[a-zA-Z][a-zA-Z0-9_-]*',
+ keyword: 'base-uri child-src connect-src default-src font-src form-action ' +
+ 'frame-ancestors frame-src img-src media-src object-src plugin-types ' +
+ 'report-uri sandbox script-src style-src'
+ },
+ contains: [
+ {
+ className: 'string',
+ begin: "'",
+ end: "'"
+ },
+ {
+ className: 'attribute',
+ begin: '^Content',
+ end: ':',
+ excludeEnd: true
+ }
+ ]
+ };
+}
+
+module.exports = csp;
+
+
+/***/ }),
+
+/***/ 40961:
+/***/ ((module) => {
+
+const MODES = (hljs) => {
+ return {
+ IMPORTANT: {
+ className: 'meta',
+ begin: '!important'
+ },
+ HEXCOLOR: {
+ className: 'number',
+ begin: '#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})'
+ },
+ ATTRIBUTE_SELECTOR_MODE: {
+ className: 'selector-attr',
+ begin: /\[/,
+ end: /\]/,
+ illegal: '$',
+ contains: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE
+ ]
+ }
+ };
+};
+
+const TAGS = [
+ 'a',
+ 'abbr',
+ 'address',
+ 'article',
+ 'aside',
+ 'audio',
+ 'b',
+ 'blockquote',
+ 'body',
+ 'button',
+ 'canvas',
+ 'caption',
+ 'cite',
+ 'code',
+ 'dd',
+ 'del',
+ 'details',
+ 'dfn',
+ 'div',
+ 'dl',
+ 'dt',
+ 'em',
+ 'fieldset',
+ 'figcaption',
+ 'figure',
+ 'footer',
+ 'form',
+ 'h1',
+ 'h2',
+ 'h3',
+ 'h4',
+ 'h5',
+ 'h6',
+ 'header',
+ 'hgroup',
+ 'html',
+ 'i',
+ 'iframe',
+ 'img',
+ 'input',
+ 'ins',
+ 'kbd',
+ 'label',
+ 'legend',
+ 'li',
+ 'main',
+ 'mark',
+ 'menu',
+ 'nav',
+ 'object',
+ 'ol',
+ 'p',
+ 'q',
+ 'quote',
+ 'samp',
+ 'section',
+ 'span',
+ 'strong',
+ 'summary',
+ 'sup',
+ 'table',
+ 'tbody',
+ 'td',
+ 'textarea',
+ 'tfoot',
+ 'th',
+ 'thead',
+ 'time',
+ 'tr',
+ 'ul',
+ 'var',
+ 'video'
+];
+
+const MEDIA_FEATURES = [
+ 'any-hover',
+ 'any-pointer',
+ 'aspect-ratio',
+ 'color',
+ 'color-gamut',
+ 'color-index',
+ 'device-aspect-ratio',
+ 'device-height',
+ 'device-width',
+ 'display-mode',
+ 'forced-colors',
+ 'grid',
+ 'height',
+ 'hover',
+ 'inverted-colors',
+ 'monochrome',
+ 'orientation',
+ 'overflow-block',
+ 'overflow-inline',
+ 'pointer',
+ 'prefers-color-scheme',
+ 'prefers-contrast',
+ 'prefers-reduced-motion',
+ 'prefers-reduced-transparency',
+ 'resolution',
+ 'scan',
+ 'scripting',
+ 'update',
+ 'width',
+ // TODO: find a better solution?
+ 'min-width',
+ 'max-width',
+ 'min-height',
+ 'max-height'
+];
+
+// https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes
+const PSEUDO_CLASSES = [
+ 'active',
+ 'any-link',
+ 'blank',
+ 'checked',
+ 'current',
+ 'default',
+ 'defined',
+ 'dir', // dir()
+ 'disabled',
+ 'drop',
+ 'empty',
+ 'enabled',
+ 'first',
+ 'first-child',
+ 'first-of-type',
+ 'fullscreen',
+ 'future',
+ 'focus',
+ 'focus-visible',
+ 'focus-within',
+ 'has', // has()
+ 'host', // host or host()
+ 'host-context', // host-context()
+ 'hover',
+ 'indeterminate',
+ 'in-range',
+ 'invalid',
+ 'is', // is()
+ 'lang', // lang()
+ 'last-child',
+ 'last-of-type',
+ 'left',
+ 'link',
+ 'local-link',
+ 'not', // not()
+ 'nth-child', // nth-child()
+ 'nth-col', // nth-col()
+ 'nth-last-child', // nth-last-child()
+ 'nth-last-col', // nth-last-col()
+ 'nth-last-of-type', //nth-last-of-type()
+ 'nth-of-type', //nth-of-type()
+ 'only-child',
+ 'only-of-type',
+ 'optional',
+ 'out-of-range',
+ 'past',
+ 'placeholder-shown',
+ 'read-only',
+ 'read-write',
+ 'required',
+ 'right',
+ 'root',
+ 'scope',
+ 'target',
+ 'target-within',
+ 'user-invalid',
+ 'valid',
+ 'visited',
+ 'where' // where()
+];
+
+// https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements
+const PSEUDO_ELEMENTS = [
+ 'after',
+ 'backdrop',
+ 'before',
+ 'cue',
+ 'cue-region',
+ 'first-letter',
+ 'first-line',
+ 'grammar-error',
+ 'marker',
+ 'part',
+ 'placeholder',
+ 'selection',
+ 'slotted',
+ 'spelling-error'
+];
+
+const ATTRIBUTES = [
+ 'align-content',
+ 'align-items',
+ 'align-self',
+ 'animation',
+ 'animation-delay',
+ 'animation-direction',
+ 'animation-duration',
+ 'animation-fill-mode',
+ 'animation-iteration-count',
+ 'animation-name',
+ 'animation-play-state',
+ 'animation-timing-function',
+ 'auto',
+ 'backface-visibility',
+ 'background',
+ 'background-attachment',
+ 'background-clip',
+ 'background-color',
+ 'background-image',
+ 'background-origin',
+ 'background-position',
+ 'background-repeat',
+ 'background-size',
+ 'border',
+ 'border-bottom',
+ 'border-bottom-color',
+ 'border-bottom-left-radius',
+ 'border-bottom-right-radius',
+ 'border-bottom-style',
+ 'border-bottom-width',
+ 'border-collapse',
+ 'border-color',
+ 'border-image',
+ 'border-image-outset',
+ 'border-image-repeat',
+ 'border-image-slice',
+ 'border-image-source',
+ 'border-image-width',
+ 'border-left',
+ 'border-left-color',
+ 'border-left-style',
+ 'border-left-width',
+ 'border-radius',
+ 'border-right',
+ 'border-right-color',
+ 'border-right-style',
+ 'border-right-width',
+ 'border-spacing',
+ 'border-style',
+ 'border-top',
+ 'border-top-color',
+ 'border-top-left-radius',
+ 'border-top-right-radius',
+ 'border-top-style',
+ 'border-top-width',
+ 'border-width',
+ 'bottom',
+ 'box-decoration-break',
+ 'box-shadow',
+ 'box-sizing',
+ 'break-after',
+ 'break-before',
+ 'break-inside',
+ 'caption-side',
+ 'clear',
+ 'clip',
+ 'clip-path',
+ 'color',
+ 'column-count',
+ 'column-fill',
+ 'column-gap',
+ 'column-rule',
+ 'column-rule-color',
+ 'column-rule-style',
+ 'column-rule-width',
+ 'column-span',
+ 'column-width',
+ 'columns',
+ 'content',
+ 'counter-increment',
+ 'counter-reset',
+ 'cursor',
+ 'direction',
+ 'display',
+ 'empty-cells',
+ 'filter',
+ 'flex',
+ 'flex-basis',
+ 'flex-direction',
+ 'flex-flow',
+ 'flex-grow',
+ 'flex-shrink',
+ 'flex-wrap',
+ 'float',
+ 'font',
+ 'font-display',
+ 'font-family',
+ 'font-feature-settings',
+ 'font-kerning',
+ 'font-language-override',
+ 'font-size',
+ 'font-size-adjust',
+ 'font-smoothing',
+ 'font-stretch',
+ 'font-style',
+ 'font-variant',
+ 'font-variant-ligatures',
+ 'font-variation-settings',
+ 'font-weight',
+ 'height',
+ 'hyphens',
+ 'icon',
+ 'image-orientation',
+ 'image-rendering',
+ 'image-resolution',
+ 'ime-mode',
+ 'inherit',
+ 'initial',
+ 'justify-content',
+ 'left',
+ 'letter-spacing',
+ 'line-height',
+ 'list-style',
+ 'list-style-image',
+ 'list-style-position',
+ 'list-style-type',
+ 'margin',
+ 'margin-bottom',
+ 'margin-left',
+ 'margin-right',
+ 'margin-top',
+ 'marks',
+ 'mask',
+ 'max-height',
+ 'max-width',
+ 'min-height',
+ 'min-width',
+ 'nav-down',
+ 'nav-index',
+ 'nav-left',
+ 'nav-right',
+ 'nav-up',
+ 'none',
+ 'normal',
+ 'object-fit',
+ 'object-position',
+ 'opacity',
+ 'order',
+ 'orphans',
+ 'outline',
+ 'outline-color',
+ 'outline-offset',
+ 'outline-style',
+ 'outline-width',
+ 'overflow',
+ 'overflow-wrap',
+ 'overflow-x',
+ 'overflow-y',
+ 'padding',
+ 'padding-bottom',
+ 'padding-left',
+ 'padding-right',
+ 'padding-top',
+ 'page-break-after',
+ 'page-break-before',
+ 'page-break-inside',
+ 'perspective',
+ 'perspective-origin',
+ 'pointer-events',
+ 'position',
+ 'quotes',
+ 'resize',
+ 'right',
+ 'src', // @font-face
+ 'tab-size',
+ 'table-layout',
+ 'text-align',
+ 'text-align-last',
+ 'text-decoration',
+ 'text-decoration-color',
+ 'text-decoration-line',
+ 'text-decoration-style',
+ 'text-indent',
+ 'text-overflow',
+ 'text-rendering',
+ 'text-shadow',
+ 'text-transform',
+ 'text-underline-position',
+ 'top',
+ 'transform',
+ 'transform-origin',
+ 'transform-style',
+ 'transition',
+ 'transition-delay',
+ 'transition-duration',
+ 'transition-property',
+ 'transition-timing-function',
+ 'unicode-bidi',
+ 'vertical-align',
+ 'visibility',
+ 'white-space',
+ 'widows',
+ 'width',
+ 'word-break',
+ 'word-spacing',
+ 'word-wrap',
+ 'z-index'
+ // reverse makes sure longer attributes `font-weight` are matched fully
+ // instead of getting false positives on say `font`
+].reverse();
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function lookahead(re) {
+ return concat('(?=', re, ')');
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: CSS
+Category: common, css
+Website: https://developer.mozilla.org/en-US/docs/Web/CSS
+*/
+
+/** @type LanguageFn */
+function css(hljs) {
+ const modes = MODES(hljs);
+ const FUNCTION_DISPATCH = {
+ className: "built_in",
+ begin: /[\w-]+(?=\()/
+ };
+ const VENDOR_PREFIX = {
+ begin: /-(webkit|moz|ms|o)-(?=[a-z])/
+ };
+ const AT_MODIFIERS = "and or not only";
+ const AT_PROPERTY_RE = /@-?\w[\w]*(-\w+)*/; // @-webkit-keyframes
+ const IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';
+ const STRINGS = [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE
+ ];
+
+ return {
+ name: 'CSS',
+ case_insensitive: true,
+ illegal: /[=|'\$]/,
+ keywords: {
+ keyframePosition: "from to"
+ },
+ classNameAliases: {
+ // for visual continuity with `tag {}` and because we
+ // don't have a great class for this?
+ keyframePosition: "selector-tag"
+ },
+ contains: [
+ hljs.C_BLOCK_COMMENT_MODE,
+ VENDOR_PREFIX,
+ // to recognize keyframe 40% etc which are outside the scope of our
+ // attribute value mode
+ hljs.CSS_NUMBER_MODE,
+ {
+ className: 'selector-id',
+ begin: /#[A-Za-z0-9_-]+/,
+ relevance: 0
+ },
+ {
+ className: 'selector-class',
+ begin: '\\.' + IDENT_RE,
+ relevance: 0
+ },
+ modes.ATTRIBUTE_SELECTOR_MODE,
+ {
+ className: 'selector-pseudo',
+ variants: [
+ {
+ begin: ':(' + PSEUDO_CLASSES.join('|') + ')'
+ },
+ {
+ begin: '::(' + PSEUDO_ELEMENTS.join('|') + ')'
+ }
+ ]
+ },
+ // we may actually need this (12/2020)
+ // { // pseudo-selector params
+ // begin: /\(/,
+ // end: /\)/,
+ // contains: [ hljs.CSS_NUMBER_MODE ]
+ // },
+ {
+ className: 'attribute',
+ begin: '\\b(' + ATTRIBUTES.join('|') + ')\\b'
+ },
+ // attribute values
+ {
+ begin: ':',
+ end: '[;}]',
+ contains: [
+ modes.HEXCOLOR,
+ modes.IMPORTANT,
+ hljs.CSS_NUMBER_MODE,
+ ...STRINGS,
+ // needed to highlight these as strings and to avoid issues with
+ // illegal characters that might be inside urls that would tigger the
+ // languages illegal stack
+ {
+ begin: /(url|data-uri)\(/,
+ end: /\)/,
+ relevance: 0, // from keywords
+ keywords: {
+ built_in: "url data-uri"
+ },
+ contains: [
+ {
+ className: "string",
+ // any character other than `)` as in `url()` will be the start
+ // of a string, which ends with `)` (from the parent mode)
+ begin: /[^)]/,
+ endsWithParent: true,
+ excludeEnd: true
+ }
+ ]
+ },
+ FUNCTION_DISPATCH
+ ]
+ },
+ {
+ begin: lookahead(/@/),
+ end: '[{;]',
+ relevance: 0,
+ illegal: /:/, // break on Less variables @var: ...
+ contains: [
+ {
+ className: 'keyword',
+ begin: AT_PROPERTY_RE
+ },
+ {
+ begin: /\s/,
+ endsWithParent: true,
+ excludeEnd: true,
+ relevance: 0,
+ keywords: {
+ $pattern: /[a-z-]+/,
+ keyword: AT_MODIFIERS,
+ attribute: MEDIA_FEATURES.join(" ")
+ },
+ contains: [
+ {
+ begin: /[a-z-]+(?=:)/,
+ className: "attribute"
+ },
+ ...STRINGS,
+ hljs.CSS_NUMBER_MODE
+ ]
+ }
+ ]
+ },
+ {
+ className: 'selector-tag',
+ begin: '\\b(' + TAGS.join('|') + ')\\b'
+ }
+ ]
+ };
+}
+
+module.exports = css;
+
+
+/***/ }),
+
+/***/ 1782:
+/***/ ((module) => {
+
+/*
+Language: D
+Author: Aleksandar Ruzicic
+Description: D is a language with C-like syntax and static typing. It pragmatically combines efficiency, control, and modeling power, with safety and programmer productivity.
+Version: 1.0a
+Website: https://dlang.org
+Date: 2012-04-08
+*/
+
+/**
+ * Known issues:
+ *
+ * - invalid hex string literals will be recognized as a double quoted strings
+ * but 'x' at the beginning of string will not be matched
+ *
+ * - delimited string literals are not checked for matching end delimiter
+ * (not possible to do with js regexp)
+ *
+ * - content of token string is colored as a string (i.e. no keyword coloring inside a token string)
+ * also, content of token string is not validated to contain only valid D tokens
+ *
+ * - special token sequence rule is not strictly following D grammar (anything following #line
+ * up to the end of line is matched as special token sequence)
+ */
+
+/** @type LanguageFn */
+function d(hljs) {
+ /**
+ * Language keywords
+ *
+ * @type {Object}
+ */
+ const D_KEYWORDS = {
+ $pattern: hljs.UNDERSCORE_IDENT_RE,
+ keyword:
+ 'abstract alias align asm assert auto body break byte case cast catch class ' +
+ 'const continue debug default delete deprecated do else enum export extern final ' +
+ 'finally for foreach foreach_reverse|10 goto if immutable import in inout int ' +
+ 'interface invariant is lazy macro mixin module new nothrow out override package ' +
+ 'pragma private protected public pure ref return scope shared static struct ' +
+ 'super switch synchronized template this throw try typedef typeid typeof union ' +
+ 'unittest version void volatile while with __FILE__ __LINE__ __gshared|10 ' +
+ '__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__',
+ built_in:
+ 'bool cdouble cent cfloat char creal dchar delegate double dstring float function ' +
+ 'idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar ' +
+ 'wstring',
+ literal:
+ 'false null true'
+ };
+
+ /**
+ * Number literal regexps
+ *
+ * @type {String}
+ */
+ const decimal_integer_re = '(0|[1-9][\\d_]*)';
+ const decimal_integer_nosus_re = '(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)';
+ const binary_integer_re = '0[bB][01_]+';
+ const hexadecimal_digits_re = '([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)';
+ const hexadecimal_integer_re = '0[xX]' + hexadecimal_digits_re;
+
+ const decimal_exponent_re = '([eE][+-]?' + decimal_integer_nosus_re + ')';
+ const decimal_float_re = '(' + decimal_integer_nosus_re + '(\\.\\d*|' + decimal_exponent_re + ')|' +
+ '\\d+\\.' + decimal_integer_nosus_re + '|' +
+ '\\.' + decimal_integer_re + decimal_exponent_re + '?' +
+ ')';
+ const hexadecimal_float_re = '(0[xX](' +
+ hexadecimal_digits_re + '\\.' + hexadecimal_digits_re + '|' +
+ '\\.?' + hexadecimal_digits_re +
+ ')[pP][+-]?' + decimal_integer_nosus_re + ')';
+
+ const integer_re = '(' +
+ decimal_integer_re + '|' +
+ binary_integer_re + '|' +
+ hexadecimal_integer_re +
+ ')';
+
+ const float_re = '(' +
+ hexadecimal_float_re + '|' +
+ decimal_float_re +
+ ')';
+
+ /**
+ * Escape sequence supported in D string and character literals
+ *
+ * @type {String}
+ */
+ const escape_sequence_re = '\\\\(' +
+ '[\'"\\?\\\\abfnrtv]|' + // common escapes
+ 'u[\\dA-Fa-f]{4}|' + // four hex digit unicode codepoint
+ '[0-7]{1,3}|' + // one to three octal digit ascii char code
+ 'x[\\dA-Fa-f]{2}|' + // two hex digit ascii char code
+ 'U[\\dA-Fa-f]{8}' + // eight hex digit unicode codepoint
+ ')|' +
+ '&[a-zA-Z\\d]{2,};'; // named character entity
+
+ /**
+ * D integer number literals
+ *
+ * @type {Object}
+ */
+ const D_INTEGER_MODE = {
+ className: 'number',
+ begin: '\\b' + integer_re + '(L|u|U|Lu|LU|uL|UL)?',
+ relevance: 0
+ };
+
+ /**
+ * [D_FLOAT_MODE description]
+ * @type {Object}
+ */
+ const D_FLOAT_MODE = {
+ className: 'number',
+ begin: '\\b(' +
+ float_re + '([fF]|L|i|[fF]i|Li)?|' +
+ integer_re + '(i|[fF]i|Li)' +
+ ')',
+ relevance: 0
+ };
+
+ /**
+ * D character literal
+ *
+ * @type {Object}
+ */
+ const D_CHARACTER_MODE = {
+ className: 'string',
+ begin: '\'(' + escape_sequence_re + '|.)',
+ end: '\'',
+ illegal: '.'
+ };
+
+ /**
+ * D string escape sequence
+ *
+ * @type {Object}
+ */
+ const D_ESCAPE_SEQUENCE = {
+ begin: escape_sequence_re,
+ relevance: 0
+ };
+
+ /**
+ * D double quoted string literal
+ *
+ * @type {Object}
+ */
+ const D_STRING_MODE = {
+ className: 'string',
+ begin: '"',
+ contains: [D_ESCAPE_SEQUENCE],
+ end: '"[cwd]?'
+ };
+
+ /**
+ * D wysiwyg and delimited string literals
+ *
+ * @type {Object}
+ */
+ const D_WYSIWYG_DELIMITED_STRING_MODE = {
+ className: 'string',
+ begin: '[rq]"',
+ end: '"[cwd]?',
+ relevance: 5
+ };
+
+ /**
+ * D alternate wysiwyg string literal
+ *
+ * @type {Object}
+ */
+ const D_ALTERNATE_WYSIWYG_STRING_MODE = {
+ className: 'string',
+ begin: '`',
+ end: '`[cwd]?'
+ };
+
+ /**
+ * D hexadecimal string literal
+ *
+ * @type {Object}
+ */
+ const D_HEX_STRING_MODE = {
+ className: 'string',
+ begin: 'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',
+ relevance: 10
+ };
+
+ /**
+ * D delimited string literal
+ *
+ * @type {Object}
+ */
+ const D_TOKEN_STRING_MODE = {
+ className: 'string',
+ begin: 'q"\\{',
+ end: '\\}"'
+ };
+
+ /**
+ * Hashbang support
+ *
+ * @type {Object}
+ */
+ const D_HASHBANG_MODE = {
+ className: 'meta',
+ begin: '^#!',
+ end: '$',
+ relevance: 5
+ };
+
+ /**
+ * D special token sequence
+ *
+ * @type {Object}
+ */
+ const D_SPECIAL_TOKEN_SEQUENCE_MODE = {
+ className: 'meta',
+ begin: '#(line)',
+ end: '$',
+ relevance: 5
+ };
+
+ /**
+ * D attributes
+ *
+ * @type {Object}
+ */
+ const D_ATTRIBUTE_MODE = {
+ className: 'keyword',
+ begin: '@[a-zA-Z_][a-zA-Z_\\d]*'
+ };
+
+ /**
+ * D nesting comment
+ *
+ * @type {Object}
+ */
+ const D_NESTING_COMMENT_MODE = hljs.COMMENT(
+ '\\/\\+',
+ '\\+\\/',
+ {
+ contains: ['self'],
+ relevance: 10
+ }
+ );
+
+ return {
+ name: 'D',
+ keywords: D_KEYWORDS,
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ D_NESTING_COMMENT_MODE,
+ D_HEX_STRING_MODE,
+ D_STRING_MODE,
+ D_WYSIWYG_DELIMITED_STRING_MODE,
+ D_ALTERNATE_WYSIWYG_STRING_MODE,
+ D_TOKEN_STRING_MODE,
+ D_FLOAT_MODE,
+ D_INTEGER_MODE,
+ D_CHARACTER_MODE,
+ D_HASHBANG_MODE,
+ D_SPECIAL_TOKEN_SEQUENCE_MODE,
+ D_ATTRIBUTE_MODE
+ ]
+ };
+}
+
+module.exports = d;
+
+
+/***/ }),
+
+/***/ 5732:
+/***/ ((module) => {
+
+/*
+Language: Delphi
+Website: https://www.embarcadero.com/products/delphi
+*/
+
+/** @type LanguageFn */
+function delphi(hljs) {
+ const KEYWORDS =
+ 'exports register file shl array record property for mod while set ally label uses raise not ' +
+ 'stored class safecall var interface or private static exit index inherited to else stdcall ' +
+ 'override shr asm far resourcestring finalization packed virtual out and protected library do ' +
+ 'xorwrite goto near function end div overload object unit begin string on inline repeat until ' +
+ 'destructor write message program with read initialization except default nil if case cdecl in ' +
+ 'downto threadvar of try pascal const external constructor type public then implementation ' +
+ 'finally published procedure absolute reintroduce operator as is abstract alias assembler ' +
+ 'bitpacked break continue cppdecl cvar enumerator experimental platform deprecated ' +
+ 'unimplemented dynamic export far16 forward generic helper implements interrupt iochecks ' +
+ 'local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat ' +
+ 'specialize strict unaligned varargs ';
+ const COMMENT_MODES = [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.COMMENT(/\{/, /\}/, {
+ relevance: 0
+ }),
+ hljs.COMMENT(/\(\*/, /\*\)/, {
+ relevance: 10
+ })
+ ];
+ const DIRECTIVE = {
+ className: 'meta',
+ variants: [
+ {
+ begin: /\{\$/,
+ end: /\}/
+ },
+ {
+ begin: /\(\*\$/,
+ end: /\*\)/
+ }
+ ]
+ };
+ const STRING = {
+ className: 'string',
+ begin: /'/,
+ end: /'/,
+ contains: [{
+ begin: /''/
+ }]
+ };
+ const NUMBER = {
+ className: 'number',
+ relevance: 0,
+ // Source: https://www.freepascal.org/docs-html/ref/refse6.html
+ variants: [
+ {
+ // Hexadecimal notation, e.g., $7F.
+ begin: '\\$[0-9A-Fa-f]+'
+ },
+ {
+ // Octal notation, e.g., &42.
+ begin: '&[0-7]+'
+ },
+ {
+ // Binary notation, e.g., %1010.
+ begin: '%[01]+'
+ }
+ ]
+ };
+ const CHAR_STRING = {
+ className: 'string',
+ begin: /(#\d+)+/
+ };
+ const CLASS = {
+ begin: hljs.IDENT_RE + '\\s*=\\s*class\\s*\\(',
+ returnBegin: true,
+ contains: [hljs.TITLE_MODE]
+ };
+ const FUNCTION = {
+ className: 'function',
+ beginKeywords: 'function constructor destructor procedure',
+ end: /[:;]/,
+ keywords: 'function constructor|10 destructor|10 procedure|10',
+ contains: [
+ hljs.TITLE_MODE,
+ {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ keywords: KEYWORDS,
+ contains: [
+ STRING,
+ CHAR_STRING,
+ DIRECTIVE
+ ].concat(COMMENT_MODES)
+ },
+ DIRECTIVE
+ ].concat(COMMENT_MODES)
+ };
+ return {
+ name: 'Delphi',
+ aliases: [
+ 'dpr',
+ 'dfm',
+ 'pas',
+ 'pascal',
+ 'freepascal',
+ 'lazarus',
+ 'lpr',
+ 'lfm'
+ ],
+ case_insensitive: true,
+ keywords: KEYWORDS,
+ illegal: /"|\$[G-Zg-z]|\/\*|<\/|\|/,
+ contains: [
+ STRING,
+ CHAR_STRING,
+ hljs.NUMBER_MODE,
+ NUMBER,
+ CLASS,
+ FUNCTION,
+ DIRECTIVE
+ ].concat(COMMENT_MODES)
+ };
+}
+
+module.exports = delphi;
+
+
+/***/ }),
+
+/***/ 90775:
+/***/ ((module) => {
+
+/*
+Language: Diff
+Description: Unified and context diff
+Author: Vasily Polovnyov
+Website: https://www.gnu.org/software/diffutils/
+Category: common
+*/
+
+/** @type LanguageFn */
+function diff(hljs) {
+ return {
+ name: 'Diff',
+ aliases: ['patch'],
+ contains: [
+ {
+ className: 'meta',
+ relevance: 10,
+ variants: [
+ {
+ begin: /^@@ +-\d+,\d+ +\+\d+,\d+ +@@/
+ },
+ {
+ begin: /^\*\*\* +\d+,\d+ +\*\*\*\*$/
+ },
+ {
+ begin: /^--- +\d+,\d+ +----$/
+ }
+ ]
+ },
+ {
+ className: 'comment',
+ variants: [
+ {
+ begin: /Index: /,
+ end: /$/
+ },
+ {
+ begin: /^index/,
+ end: /$/
+ },
+ {
+ begin: /={3,}/,
+ end: /$/
+ },
+ {
+ begin: /^-{3}/,
+ end: /$/
+ },
+ {
+ begin: /^\*{3} /,
+ end: /$/
+ },
+ {
+ begin: /^\+{3}/,
+ end: /$/
+ },
+ {
+ begin: /^\*{15}$/
+ },
+ {
+ begin: /^diff --git/,
+ end: /$/
+ }
+ ]
+ },
+ {
+ className: 'addition',
+ begin: /^\+/,
+ end: /$/
+ },
+ {
+ className: 'deletion',
+ begin: /^-/,
+ end: /$/
+ },
+ {
+ className: 'addition',
+ begin: /^!/,
+ end: /$/
+ }
+ ]
+ };
+}
+
+module.exports = diff;
+
+
+/***/ }),
+
+/***/ 46019:
+/***/ ((module) => {
+
+/*
+Language: Django
+Description: Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
+Requires: xml.js
+Author: Ivan Sagalaev
+Contributors: Ilya Baryshev
+Website: https://www.djangoproject.com
+Category: template
+*/
+
+/** @type LanguageFn */
+function django(hljs) {
+ const FILTER = {
+ begin: /\|[A-Za-z]+:?/,
+ keywords: {
+ name:
+ 'truncatewords removetags linebreaksbr yesno get_digit timesince random striptags ' +
+ 'filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands ' +
+ 'title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode ' +
+ 'timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort ' +
+ 'dictsortreversed default_if_none pluralize lower join center default ' +
+ 'truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first ' +
+ 'escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize ' +
+ 'localtime utc timezone'
+ },
+ contains: [
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE
+ ]
+ };
+
+ return {
+ name: 'Django',
+ aliases: ['jinja'],
+ case_insensitive: true,
+ subLanguage: 'xml',
+ contains: [
+ hljs.COMMENT(/\{%\s*comment\s*%\}/, /\{%\s*endcomment\s*%\}/),
+ hljs.COMMENT(/\{#/, /#\}/),
+ {
+ className: 'template-tag',
+ begin: /\{%/,
+ end: /%\}/,
+ contains: [{
+ className: 'name',
+ begin: /\w+/,
+ keywords: {
+ name:
+ 'comment endcomment load templatetag ifchanged endifchanged if endif firstof for ' +
+ 'endfor ifnotequal endifnotequal widthratio extends include spaceless ' +
+ 'endspaceless regroup ifequal endifequal ssi now with cycle url filter ' +
+ 'endfilter debug block endblock else autoescape endautoescape csrf_token empty elif ' +
+ 'endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix ' +
+ 'plural get_current_language language get_available_languages ' +
+ 'get_current_language_bidi get_language_info get_language_info_list localize ' +
+ 'endlocalize localtime endlocaltime timezone endtimezone get_current_timezone ' +
+ 'verbatim'
+ },
+ starts: {
+ endsWithParent: true,
+ keywords: 'in by as',
+ contains: [FILTER],
+ relevance: 0
+ }
+ }]
+ },
+ {
+ className: 'template-variable',
+ begin: /\{\{/,
+ end: /\}\}/,
+ contains: [FILTER]
+ }
+ ]
+ };
+}
+
+module.exports = django;
+
+
+/***/ }),
+
+/***/ 86057:
+/***/ ((module) => {
+
+/*
+Language: DNS Zone
+Author: Tim Schumacher
+Category: config
+Website: https://en.wikipedia.org/wiki/Zone_file
+*/
+
+/** @type LanguageFn */
+function dns(hljs) {
+ return {
+ name: 'DNS Zone',
+ aliases: [
+ 'bind',
+ 'zone'
+ ],
+ keywords: {
+ keyword:
+ 'IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX ' +
+ 'LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT'
+ },
+ contains: [
+ hljs.COMMENT(';', '$', {
+ relevance: 0
+ }),
+ {
+ className: 'meta',
+ begin: /^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/
+ },
+ // IPv6
+ {
+ className: 'number',
+ begin: '((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b'
+ },
+ // IPv4
+ {
+ className: 'number',
+ begin: '((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b'
+ },
+ hljs.inherit(hljs.NUMBER_MODE, {
+ begin: /\b\d+[dhwm]?/
+ })
+ ]
+ };
+}
+
+module.exports = dns;
+
+
+/***/ }),
+
+/***/ 1534:
+/***/ ((module) => {
+
+/*
+Language: Dockerfile
+Requires: bash.js
+Author: Alexis Hénaut
+Description: language definition for Dockerfile files
+Website: https://docs.docker.com/engine/reference/builder/
+Category: config
+*/
+
+/** @type LanguageFn */
+function dockerfile(hljs) {
+ return {
+ name: 'Dockerfile',
+ aliases: ['docker'],
+ case_insensitive: true,
+ keywords: 'from maintainer expose env arg user onbuild stopsignal',
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.NUMBER_MODE,
+ {
+ beginKeywords: 'run cmd entrypoint volume add copy workdir label healthcheck shell',
+ starts: {
+ end: /[^\\]$/,
+ subLanguage: 'bash'
+ }
+ }
+ ],
+ illegal: ''
+ };
+}
+
+module.exports = dockerfile;
+
+
+/***/ }),
+
+/***/ 88620:
+/***/ ((module) => {
+
+/*
+Language: Batch file (DOS)
+Author: Alexander Makarov
+Contributors: Anton Kochkov
+Website: https://en.wikipedia.org/wiki/Batch_file
+*/
+
+/** @type LanguageFn */
+function dos(hljs) {
+ const COMMENT = hljs.COMMENT(
+ /^\s*@?rem\b/, /$/,
+ {
+ relevance: 10
+ }
+ );
+ const LABEL = {
+ className: 'symbol',
+ begin: '^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)',
+ relevance: 0
+ };
+ return {
+ name: 'Batch file (DOS)',
+ aliases: [
+ 'bat',
+ 'cmd'
+ ],
+ case_insensitive: true,
+ illegal: /\/\*/,
+ keywords: {
+ keyword:
+ 'if else goto for in do call exit not exist errorlevel defined ' +
+ 'equ neq lss leq gtr geq',
+ built_in:
+ 'prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux ' +
+ 'shift cd dir echo setlocal endlocal set pause copy ' +
+ 'append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color ' +
+ 'comp compact convert date dir diskcomp diskcopy doskey erase fs ' +
+ 'find findstr format ftype graftabl help keyb label md mkdir mode more move path ' +
+ 'pause print popd pushd promt rd recover rem rename replace restore rmdir shift ' +
+ 'sort start subst time title tree type ver verify vol ' +
+ // winutils
+ 'ping net ipconfig taskkill xcopy ren del'
+ },
+ contains: [
+ {
+ className: 'variable',
+ begin: /%%[^ ]|%[^ ]+?%|![^ ]+?!/
+ },
+ {
+ className: 'function',
+ begin: LABEL.begin,
+ end: 'goto:eof',
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: '([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*'
+ }),
+ COMMENT
+ ]
+ },
+ {
+ className: 'number',
+ begin: '\\b\\d+',
+ relevance: 0
+ },
+ COMMENT
+ ]
+ };
+}
+
+module.exports = dos;
+
+
+/***/ }),
+
+/***/ 15259:
+/***/ ((module) => {
+
+/*
+ Language: dsconfig
+ Description: dsconfig batch configuration language for LDAP directory servers
+ Contributors: Jacob Childress
+ Category: enterprise, config
+ */
+
+ /** @type LanguageFn */
+function dsconfig(hljs) {
+ const QUOTED_PROPERTY = {
+ className: 'string',
+ begin: /"/,
+ end: /"/
+ };
+ const APOS_PROPERTY = {
+ className: 'string',
+ begin: /'/,
+ end: /'/
+ };
+ const UNQUOTED_PROPERTY = {
+ className: 'string',
+ begin: /[\w\-?]+:\w+/,
+ end: /\W/,
+ relevance: 0
+ };
+ const VALUELESS_PROPERTY = {
+ className: 'string',
+ begin: /\w+(\-\w+)*/,
+ end: /(?=\W)/,
+ relevance: 0
+ };
+
+ return {
+ keywords: 'dsconfig',
+ contains: [
+ {
+ className: 'keyword',
+ begin: '^dsconfig',
+ end: /\s/,
+ excludeEnd: true,
+ relevance: 10
+ },
+ {
+ className: 'built_in',
+ begin: /(list|create|get|set|delete)-(\w+)/,
+ end: /\s/,
+ excludeEnd: true,
+ illegal: '!@#$%^&*()',
+ relevance: 10
+ },
+ {
+ className: 'built_in',
+ begin: /--(\w+)/,
+ end: /\s/,
+ excludeEnd: true
+ },
+ QUOTED_PROPERTY,
+ APOS_PROPERTY,
+ UNQUOTED_PROPERTY,
+ VALUELESS_PROPERTY,
+ hljs.HASH_COMMENT_MODE
+ ]
+ };
+}
+
+module.exports = dsconfig;
+
+
+/***/ }),
+
+/***/ 43991:
+/***/ ((module) => {
+
+/*
+Language: Device Tree
+Description: *.dts files used in the Linux kernel
+Author: Martin Braun , Moritz Fischer
+Website: https://elinux.org/Device_Tree_Reference
+Category: config
+*/
+
+/** @type LanguageFn */
+function dts(hljs) {
+ const STRINGS = {
+ className: 'string',
+ variants: [
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ begin: '((u8?|U)|L)?"'
+ }),
+ {
+ begin: '(u8?|U)?R"',
+ end: '"',
+ contains: [hljs.BACKSLASH_ESCAPE]
+ },
+ {
+ begin: '\'\\\\?.',
+ end: '\'',
+ illegal: '.'
+ }
+ ]
+ };
+
+ const NUMBERS = {
+ className: 'number',
+ variants: [
+ {
+ begin: '\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)'
+ },
+ {
+ begin: hljs.C_NUMBER_RE
+ }
+ ],
+ relevance: 0
+ };
+
+ const PREPROCESSOR = {
+ className: 'meta',
+ begin: '#',
+ end: '$',
+ keywords: {
+ 'meta-keyword': 'if else elif endif define undef ifdef ifndef'
+ },
+ contains: [
+ {
+ begin: /\\\n/,
+ relevance: 0
+ },
+ {
+ beginKeywords: 'include',
+ end: '$',
+ keywords: {
+ 'meta-keyword': 'include'
+ },
+ contains: [
+ hljs.inherit(STRINGS, {
+ className: 'meta-string'
+ }),
+ {
+ className: 'meta-string',
+ begin: '<',
+ end: '>',
+ illegal: '\\n'
+ }
+ ]
+ },
+ STRINGS,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ };
+
+ const DTS_REFERENCE = {
+ className: 'variable',
+ begin: /&[a-z\d_]*\b/
+ };
+
+ const DTS_KEYWORD = {
+ className: 'meta-keyword',
+ begin: '/[a-z][a-z\\d-]*/'
+ };
+
+ const DTS_LABEL = {
+ className: 'symbol',
+ begin: '^\\s*[a-zA-Z_][a-zA-Z\\d_]*:'
+ };
+
+ const DTS_CELL_PROPERTY = {
+ className: 'params',
+ begin: '<',
+ end: '>',
+ contains: [
+ NUMBERS,
+ DTS_REFERENCE
+ ]
+ };
+
+ const DTS_NODE = {
+ className: 'class',
+ begin: /[a-zA-Z_][a-zA-Z\d_@]*\s\{/,
+ end: /[{;=]/,
+ returnBegin: true,
+ excludeEnd: true
+ };
+
+ const DTS_ROOT_NODE = {
+ className: 'class',
+ begin: '/\\s*\\{',
+ end: /\};/,
+ relevance: 10,
+ contains: [
+ DTS_REFERENCE,
+ DTS_KEYWORD,
+ DTS_LABEL,
+ DTS_NODE,
+ DTS_CELL_PROPERTY,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ NUMBERS,
+ STRINGS
+ ]
+ };
+
+ return {
+ name: 'Device Tree',
+ keywords: "",
+ contains: [
+ DTS_ROOT_NODE,
+ DTS_REFERENCE,
+ DTS_KEYWORD,
+ DTS_LABEL,
+ DTS_NODE,
+ DTS_CELL_PROPERTY,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ NUMBERS,
+ STRINGS,
+ PREPROCESSOR,
+ {
+ begin: hljs.IDENT_RE + '::',
+ keywords: ""
+ }
+ ]
+ };
+}
+
+module.exports = dts;
+
+
+/***/ }),
+
+/***/ 32188:
+/***/ ((module) => {
+
+/*
+Language: Dust
+Requires: xml.js
+Author: Michael Allen
+Description: Matcher for dust.js templates.
+Website: https://www.dustjs.com
+Category: template
+*/
+
+/** @type LanguageFn */
+function dust(hljs) {
+ const EXPRESSION_KEYWORDS = 'if eq ne lt lte gt gte select default math sep';
+ return {
+ name: 'Dust',
+ aliases: ['dst'],
+ case_insensitive: true,
+ subLanguage: 'xml',
+ contains: [
+ {
+ className: 'template-tag',
+ begin: /\{[#\/]/,
+ end: /\}/,
+ illegal: /;/,
+ contains: [{
+ className: 'name',
+ begin: /[a-zA-Z\.-]+/,
+ starts: {
+ endsWithParent: true,
+ relevance: 0,
+ contains: [hljs.QUOTE_STRING_MODE]
+ }
+ }]
+ },
+ {
+ className: 'template-variable',
+ begin: /\{/,
+ end: /\}/,
+ illegal: /;/,
+ keywords: EXPRESSION_KEYWORDS
+ }
+ ]
+ };
+}
+
+module.exports = dust;
+
+
+/***/ }),
+
+/***/ 35603:
+/***/ ((module) => {
+
+/*
+Language: Extended Backus-Naur Form
+Author: Alex McKibben
+Website: https://en.wikipedia.org/wiki/Extended_Backus–Naur_form
+*/
+
+/** @type LanguageFn */
+function ebnf(hljs) {
+ const commentMode = hljs.COMMENT(/\(\*/, /\*\)/);
+
+ const nonTerminalMode = {
+ className: "attribute",
+ begin: /^[ ]*[a-zA-Z]+([\s_-]+[a-zA-Z]+)*/
+ };
+
+ const specialSequenceMode = {
+ className: "meta",
+ begin: /\?.*\?/
+ };
+
+ const ruleBodyMode = {
+ begin: /=/,
+ end: /[.;]/,
+ contains: [
+ commentMode,
+ specialSequenceMode,
+ {
+ // terminals
+ className: 'string',
+ variants: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ {
+ begin: '`',
+ end: '`'
+ }
+ ]
+ }
+ ]
+ };
+
+ return {
+ name: 'Extended Backus-Naur Form',
+ illegal: /\S/,
+ contains: [
+ commentMode,
+ nonTerminalMode,
+ ruleBodyMode
+ ]
+ };
+}
+
+module.exports = ebnf;
+
+
+/***/ }),
+
+/***/ 61755:
+/***/ ((module) => {
+
+/*
+Language: Elixir
+Author: Josh Adams
+Description: language definition for Elixir source code files (.ex and .exs). Based on ruby language support.
+Category: functional
+Website: https://elixir-lang.org
+*/
+
+/** @type LanguageFn */
+function elixir(hljs) {
+ const ELIXIR_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?';
+ const ELIXIR_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?';
+ const ELIXIR_KEYWORDS = {
+ $pattern: ELIXIR_IDENT_RE,
+ keyword: 'and false then defined module in return redo retry end for true self when ' +
+ 'next until do begin unless nil break not case cond alias while ensure or ' +
+ 'include use alias fn quote require import with|0'
+ };
+ const SUBST = {
+ className: 'subst',
+ begin: /#\{/,
+ end: /\}/,
+ keywords: ELIXIR_KEYWORDS
+ };
+ const NUMBER = {
+ className: 'number',
+ begin: '(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[1-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)',
+ relevance: 0
+ };
+ const SIGIL_DELIMITERS = '[/|([{<"\']';
+ const LOWERCASE_SIGIL = {
+ className: 'string',
+ begin: '~[a-z]' + '(?=' + SIGIL_DELIMITERS + ')',
+ contains: [
+ {
+ endsParent: true,
+ contains: [
+ {
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST
+ ],
+ variants: [
+ {
+ begin: /"/,
+ end: /"/
+ },
+ {
+ begin: /'/,
+ end: /'/
+ },
+ {
+ begin: /\//,
+ end: /\//
+ },
+ {
+ begin: /\|/,
+ end: /\|/
+ },
+ {
+ begin: /\(/,
+ end: /\)/
+ },
+ {
+ begin: /\[/,
+ end: /\]/
+ },
+ {
+ begin: /\{/,
+ end: /\}/
+ },
+ {
+ begin: /,
+ end: />/
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ };
+
+ const UPCASE_SIGIL = {
+ className: 'string',
+ begin: '~[A-Z]' + '(?=' + SIGIL_DELIMITERS + ')',
+ contains: [
+ {
+ begin: /"/,
+ end: /"/
+ },
+ {
+ begin: /'/,
+ end: /'/
+ },
+ {
+ begin: /\//,
+ end: /\//
+ },
+ {
+ begin: /\|/,
+ end: /\|/
+ },
+ {
+ begin: /\(/,
+ end: /\)/
+ },
+ {
+ begin: /\[/,
+ end: /\]/
+ },
+ {
+ begin: /\{/,
+ end: /\}/
+ },
+ {
+ begin: /,
+ end: />/
+ }
+ ]
+ };
+
+ const STRING = {
+ className: 'string',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST
+ ],
+ variants: [
+ {
+ begin: /"""/,
+ end: /"""/
+ },
+ {
+ begin: /'''/,
+ end: /'''/
+ },
+ {
+ begin: /~S"""/,
+ end: /"""/,
+ contains: [] // override default
+ },
+ {
+ begin: /~S"/,
+ end: /"/,
+ contains: [] // override default
+ },
+ {
+ begin: /~S'''/,
+ end: /'''/,
+ contains: [] // override default
+ },
+ {
+ begin: /~S'/,
+ end: /'/,
+ contains: [] // override default
+ },
+ {
+ begin: /'/,
+ end: /'/
+ },
+ {
+ begin: /"/,
+ end: /"/
+ }
+ ]
+ };
+ const FUNCTION = {
+ className: 'function',
+ beginKeywords: 'def defp defmacro',
+ end: /\B\b/, // the mode is ended by the title
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: ELIXIR_IDENT_RE,
+ endsParent: true
+ })
+ ]
+ };
+ const CLASS = hljs.inherit(FUNCTION, {
+ className: 'class',
+ beginKeywords: 'defimpl defmodule defprotocol defrecord',
+ end: /\bdo\b|$|;/
+ });
+ const ELIXIR_DEFAULT_CONTAINS = [
+ STRING,
+ UPCASE_SIGIL,
+ LOWERCASE_SIGIL,
+ hljs.HASH_COMMENT_MODE,
+ CLASS,
+ FUNCTION,
+ {
+ begin: '::'
+ },
+ {
+ className: 'symbol',
+ begin: ':(?![\\s:])',
+ contains: [
+ STRING,
+ {
+ begin: ELIXIR_METHOD_RE
+ }
+ ],
+ relevance: 0
+ },
+ {
+ className: 'symbol',
+ begin: ELIXIR_IDENT_RE + ':(?!:)',
+ relevance: 0
+ },
+ NUMBER,
+ {
+ className: 'variable',
+ begin: '(\\$\\W)|((\\$|@@?)(\\w+))'
+ },
+ {
+ begin: '->'
+ },
+ { // regexp container
+ begin: '(' + hljs.RE_STARTERS_RE + ')\\s*',
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ {
+ // to prevent false regex triggers for the division function:
+ // /:
+ begin: /\/: (?=\d+\s*[,\]])/,
+ relevance: 0,
+ contains: [NUMBER]
+ },
+ {
+ className: 'regexp',
+ illegal: '\\n',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST
+ ],
+ variants: [
+ {
+ begin: '/',
+ end: '/[a-z]*'
+ },
+ {
+ begin: '%r\\[',
+ end: '\\][a-z]*'
+ }
+ ]
+ }
+ ],
+ relevance: 0
+ }
+ ];
+ SUBST.contains = ELIXIR_DEFAULT_CONTAINS;
+
+ return {
+ name: 'Elixir',
+ keywords: ELIXIR_KEYWORDS,
+ contains: ELIXIR_DEFAULT_CONTAINS
+ };
+}
+
+module.exports = elixir;
+
+
+/***/ }),
+
+/***/ 79046:
+/***/ ((module) => {
+
+/*
+Language: Elm
+Author: Janis Voigtlaender
+Website: https://elm-lang.org
+Category: functional
+*/
+
+/** @type LanguageFn */
+function elm(hljs) {
+ const COMMENT = {
+ variants: [
+ hljs.COMMENT('--', '$'),
+ hljs.COMMENT(
+ /\{-/,
+ /-\}/,
+ {
+ contains: ['self']
+ }
+ )
+ ]
+ };
+
+ const CONSTRUCTOR = {
+ className: 'type',
+ begin: '\\b[A-Z][\\w\']*', // TODO: other constructors (built-in, infix).
+ relevance: 0
+ };
+
+ const LIST = {
+ begin: '\\(',
+ end: '\\)',
+ illegal: '"',
+ contains: [
+ {
+ className: 'type',
+ begin: '\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?'
+ },
+ COMMENT
+ ]
+ };
+
+ const RECORD = {
+ begin: /\{/,
+ end: /\}/,
+ contains: LIST.contains
+ };
+
+ const CHARACTER = {
+ className: 'string',
+ begin: '\'\\\\?.',
+ end: '\'',
+ illegal: '.'
+ };
+
+ return {
+ name: 'Elm',
+ keywords:
+ 'let in if then else case of where module import exposing ' +
+ 'type alias as infix infixl infixr port effect command subscription',
+ contains: [
+
+ // Top-level constructions.
+
+ {
+ beginKeywords: 'port effect module',
+ end: 'exposing',
+ keywords: 'port effect module where command subscription exposing',
+ contains: [
+ LIST,
+ COMMENT
+ ],
+ illegal: '\\W\\.|;'
+ },
+ {
+ begin: 'import',
+ end: '$',
+ keywords: 'import as exposing',
+ contains: [
+ LIST,
+ COMMENT
+ ],
+ illegal: '\\W\\.|;'
+ },
+ {
+ begin: 'type',
+ end: '$',
+ keywords: 'type alias',
+ contains: [
+ CONSTRUCTOR,
+ LIST,
+ RECORD,
+ COMMENT
+ ]
+ },
+ {
+ beginKeywords: 'infix infixl infixr',
+ end: '$',
+ contains: [
+ hljs.C_NUMBER_MODE,
+ COMMENT
+ ]
+ },
+ {
+ begin: 'port',
+ end: '$',
+ keywords: 'port',
+ contains: [COMMENT]
+ },
+
+ // Literals and names.
+
+ CHARACTER,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE,
+ CONSTRUCTOR,
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: '^[_a-z][\\w\']*'
+ }),
+ COMMENT,
+
+ {
+ begin: '->|<-'
+ } // No markup, relevance booster
+ ],
+ illegal: /;/
+ };
+}
+
+module.exports = elm;
+
+
+/***/ }),
+
+/***/ 36193:
+/***/ ((module) => {
+
+/*
+Language: ERB (Embedded Ruby)
+Requires: xml.js, ruby.js
+Author: Lucas Mazza
+Contributors: Kassio Borges
+Description: "Bridge" language defining fragments of Ruby in HTML within <% .. %>
+Website: https://ruby-doc.org/stdlib-2.6.5/libdoc/erb/rdoc/ERB.html
+Category: template
+*/
+
+/** @type LanguageFn */
+function erb(hljs) {
+ return {
+ name: 'ERB',
+ subLanguage: 'xml',
+ contains: [
+ hljs.COMMENT('<%#', '%>'),
+ {
+ begin: '<%[%=-]?',
+ end: '[%-]?%>',
+ subLanguage: 'ruby',
+ excludeBegin: true,
+ excludeEnd: true
+ }
+ ]
+ };
+}
+
+module.exports = erb;
+
+
+/***/ }),
+
+/***/ 37497:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: Erlang REPL
+Author: Sergey Ignatov
+Website: https://www.erlang.org
+Category: functional
+*/
+
+/** @type LanguageFn */
+function erlangRepl(hljs) {
+ return {
+ name: 'Erlang REPL',
+ keywords: {
+ built_in:
+ 'spawn spawn_link self',
+ keyword:
+ 'after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if ' +
+ 'let not of or orelse|10 query receive rem try when xor'
+ },
+ contains: [
+ {
+ className: 'meta',
+ begin: '^[0-9]+> ',
+ relevance: 10
+ },
+ hljs.COMMENT('%', '$'),
+ {
+ className: 'number',
+ begin: '\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)',
+ relevance: 0
+ },
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ {
+ begin: concat(
+ /\?(::)?/,
+ /([A-Z]\w*)/, // at least one identifier
+ /((::)[A-Z]\w*)*/ // perhaps more
+ )
+ },
+ {
+ begin: '->'
+ },
+ {
+ begin: 'ok'
+ },
+ {
+ begin: '!'
+ },
+ {
+ begin: '(\\b[a-z\'][a-zA-Z0-9_\']*:[a-z\'][a-zA-Z0-9_\']*)|(\\b[a-z\'][a-zA-Z0-9_\']*)',
+ relevance: 0
+ },
+ {
+ begin: '[A-Z][a-zA-Z0-9_\']*',
+ relevance: 0
+ }
+ ]
+ };
+}
+
+module.exports = erlangRepl;
+
+
+/***/ }),
+
+/***/ 89843:
+/***/ ((module) => {
+
+/*
+Language: Erlang
+Description: Erlang is a general-purpose functional language, with strict evaluation, single assignment, and dynamic typing.
+Author: Nikolay Zakharov , Dmitry Kovega
+Website: https://www.erlang.org
+Category: functional
+*/
+
+/** @type LanguageFn */
+function erlang(hljs) {
+ const BASIC_ATOM_RE = '[a-z\'][a-zA-Z0-9_\']*';
+ const FUNCTION_NAME_RE = '(' + BASIC_ATOM_RE + ':' + BASIC_ATOM_RE + '|' + BASIC_ATOM_RE + ')';
+ const ERLANG_RESERVED = {
+ keyword:
+ 'after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if ' +
+ 'let not of orelse|10 query receive rem try when xor',
+ literal:
+ 'false true'
+ };
+
+ const COMMENT = hljs.COMMENT('%', '$');
+ const NUMBER = {
+ className: 'number',
+ begin: '\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)',
+ relevance: 0
+ };
+ const NAMED_FUN = {
+ begin: 'fun\\s+' + BASIC_ATOM_RE + '/\\d+'
+ };
+ const FUNCTION_CALL = {
+ begin: FUNCTION_NAME_RE + '\\(',
+ end: '\\)',
+ returnBegin: true,
+ relevance: 0,
+ contains: [
+ {
+ begin: FUNCTION_NAME_RE,
+ relevance: 0
+ },
+ {
+ begin: '\\(',
+ end: '\\)',
+ endsWithParent: true,
+ returnEnd: true,
+ relevance: 0
+ // "contains" defined later
+ }
+ ]
+ };
+ const TUPLE = {
+ begin: /\{/,
+ end: /\}/,
+ relevance: 0
+ // "contains" defined later
+ };
+ const VAR1 = {
+ begin: '\\b_([A-Z][A-Za-z0-9_]*)?',
+ relevance: 0
+ };
+ const VAR2 = {
+ begin: '[A-Z][a-zA-Z0-9_]*',
+ relevance: 0
+ };
+ const RECORD_ACCESS = {
+ begin: '#' + hljs.UNDERSCORE_IDENT_RE,
+ relevance: 0,
+ returnBegin: true,
+ contains: [
+ {
+ begin: '#' + hljs.UNDERSCORE_IDENT_RE,
+ relevance: 0
+ },
+ {
+ begin: /\{/,
+ end: /\}/,
+ relevance: 0
+ // "contains" defined later
+ }
+ ]
+ };
+
+ const BLOCK_STATEMENTS = {
+ beginKeywords: 'fun receive if try case',
+ end: 'end',
+ keywords: ERLANG_RESERVED
+ };
+ BLOCK_STATEMENTS.contains = [
+ COMMENT,
+ NAMED_FUN,
+ hljs.inherit(hljs.APOS_STRING_MODE, {
+ className: ''
+ }),
+ BLOCK_STATEMENTS,
+ FUNCTION_CALL,
+ hljs.QUOTE_STRING_MODE,
+ NUMBER,
+ TUPLE,
+ VAR1,
+ VAR2,
+ RECORD_ACCESS
+ ];
+
+ const BASIC_MODES = [
+ COMMENT,
+ NAMED_FUN,
+ BLOCK_STATEMENTS,
+ FUNCTION_CALL,
+ hljs.QUOTE_STRING_MODE,
+ NUMBER,
+ TUPLE,
+ VAR1,
+ VAR2,
+ RECORD_ACCESS
+ ];
+ FUNCTION_CALL.contains[1].contains = BASIC_MODES;
+ TUPLE.contains = BASIC_MODES;
+ RECORD_ACCESS.contains[1].contains = BASIC_MODES;
+
+ const DIRECTIVES = [
+ "-module",
+ "-record",
+ "-undef",
+ "-export",
+ "-ifdef",
+ "-ifndef",
+ "-author",
+ "-copyright",
+ "-doc",
+ "-vsn",
+ "-import",
+ "-include",
+ "-include_lib",
+ "-compile",
+ "-define",
+ "-else",
+ "-endif",
+ "-file",
+ "-behaviour",
+ "-behavior",
+ "-spec"
+ ];
+
+ const PARAMS = {
+ className: 'params',
+ begin: '\\(',
+ end: '\\)',
+ contains: BASIC_MODES
+ };
+ return {
+ name: 'Erlang',
+ aliases: ['erl'],
+ keywords: ERLANG_RESERVED,
+ illegal: '(|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))',
+ contains: [
+ {
+ className: 'function',
+ begin: '^' + BASIC_ATOM_RE + '\\s*\\(',
+ end: '->',
+ returnBegin: true,
+ illegal: '\\(|#|//|/\\*|\\\\|:|;',
+ contains: [
+ PARAMS,
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: BASIC_ATOM_RE
+ })
+ ],
+ starts: {
+ end: ';|\\.',
+ keywords: ERLANG_RESERVED,
+ contains: BASIC_MODES
+ }
+ },
+ COMMENT,
+ {
+ begin: '^-',
+ end: '\\.',
+ relevance: 0,
+ excludeEnd: true,
+ returnBegin: true,
+ keywords: {
+ $pattern: '-' + hljs.IDENT_RE,
+ keyword: DIRECTIVES.map(x => `${x}|1.5`).join(" ")
+ },
+ contains: [PARAMS]
+ },
+ NUMBER,
+ hljs.QUOTE_STRING_MODE,
+ RECORD_ACCESS,
+ VAR1,
+ VAR2,
+ TUPLE,
+ {
+ begin: /\.$/
+ } // relevance booster
+ ]
+ };
+}
+
+module.exports = erlang;
+
+
+/***/ }),
+
+/***/ 8553:
+/***/ ((module) => {
+
+/*
+Language: Excel formulae
+Author: Victor Zhou
+Description: Excel formulae
+Website: https://products.office.com/en-us/excel/
+*/
+
+/** @type LanguageFn */
+function excel(hljs) {
+ return {
+ name: 'Excel formulae',
+ aliases: [
+ 'xlsx',
+ 'xls'
+ ],
+ case_insensitive: true,
+ // built-in functions imported from https://web.archive.org/web/20160513042710/https://support.office.com/en-us/article/Excel-functions-alphabetical-b3944572-255d-4efb-bb96-c6d90033e188
+ keywords: {
+ $pattern: /[a-zA-Z][\w\.]*/,
+ built_in: 'ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST'
+ },
+ contains: [
+ {
+ /* matches a beginning equal sign found in Excel formula examples */
+ begin: /^=/,
+ end: /[^=]/,
+ returnEnd: true,
+ illegal: /=/, /* only allow single equal sign at front of line */
+ relevance: 10
+ },
+ /* technically, there can be more than 2 letters in column names, but this prevents conflict with some keywords */
+ {
+ /* matches a reference to a single cell */
+ className: 'symbol',
+ begin: /\b[A-Z]{1,2}\d+\b/,
+ end: /[^\d]/,
+ excludeEnd: true,
+ relevance: 0
+ },
+ {
+ /* matches a reference to a range of cells */
+ className: 'symbol',
+ begin: /[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,
+ relevance: 0
+ },
+ hljs.BACKSLASH_ESCAPE,
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'number',
+ begin: hljs.NUMBER_RE + '(%)?',
+ relevance: 0
+ },
+ /* Excel formula comments are done by putting the comment in a function call to N() */
+ hljs.COMMENT(/\bN\(/, /\)/,
+ {
+ excludeBegin: true,
+ excludeEnd: true,
+ illegal: /\n/
+ })
+ ]
+ };
+}
+
+module.exports = excel;
+
+
+/***/ }),
+
+/***/ 56137:
+/***/ ((module) => {
+
+/*
+Language: FIX
+Author: Brent Bradbury
+*/
+
+/** @type LanguageFn */
+function fix(hljs) {
+ return {
+ name: 'FIX',
+ contains: [{
+ begin: /[^\u2401\u0001]+/,
+ end: /[\u2401\u0001]/,
+ excludeEnd: true,
+ returnBegin: true,
+ returnEnd: false,
+ contains: [
+ {
+ begin: /([^\u2401\u0001=]+)/,
+ end: /=([^\u2401\u0001=]+)/,
+ returnEnd: true,
+ returnBegin: false,
+ className: 'attr'
+ },
+ {
+ begin: /=/,
+ end: /([\u2401\u0001])/,
+ excludeEnd: true,
+ excludeBegin: true,
+ className: 'string'
+ }
+ ]
+ }],
+ case_insensitive: true
+ };
+}
+
+module.exports = fix;
+
+
+/***/ }),
+
+/***/ 94215:
+/***/ ((module) => {
+
+/*
+ Language: Flix
+ Category: functional
+ Author: Magnus Madsen
+ Website: https://flix.dev/
+ */
+
+ /** @type LanguageFn */
+function flix(hljs) {
+ const CHAR = {
+ className: 'string',
+ begin: /'(.|\\[xXuU][a-zA-Z0-9]+)'/
+ };
+
+ const STRING = {
+ className: 'string',
+ variants: [{
+ begin: '"',
+ end: '"'
+ }]
+ };
+
+ const NAME = {
+ className: 'title',
+ relevance: 0,
+ begin: /[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/
+ };
+
+ const METHOD = {
+ className: 'function',
+ beginKeywords: 'def',
+ end: /[:={\[(\n;]/,
+ excludeEnd: true,
+ contains: [NAME]
+ };
+
+ return {
+ name: 'Flix',
+ keywords: {
+ literal: 'true false',
+ keyword: 'case class def else enum if impl import in lat rel index let match namespace switch type yield with'
+ },
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ CHAR,
+ STRING,
+ METHOD,
+ hljs.C_NUMBER_MODE
+ ]
+ };
+}
+
+module.exports = flix;
+
+
+/***/ }),
+
+/***/ 79368:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: Fortran
+Author: Anthony Scemama
+Website: https://en.wikipedia.org/wiki/Fortran
+Category: scientific
+*/
+
+/** @type LanguageFn */
+function fortran(hljs) {
+ const PARAMS = {
+ className: 'params',
+ begin: '\\(',
+ end: '\\)'
+ };
+
+ const COMMENT = {
+ variants: [
+ hljs.COMMENT('!', '$', {
+ relevance: 0
+ }),
+ // allow FORTRAN 77 style comments
+ hljs.COMMENT('^C[ ]', '$', {
+ relevance: 0
+ }),
+ hljs.COMMENT('^C$', '$', {
+ relevance: 0
+ })
+ ]
+ };
+
+ // regex in both fortran and irpf90 should match
+ const OPTIONAL_NUMBER_SUFFIX = /(_[a-z_\d]+)?/;
+ const OPTIONAL_NUMBER_EXP = /([de][+-]?\d+)?/;
+ const NUMBER = {
+ className: 'number',
+ variants: [
+ {
+ begin: concat(/\b\d+/, /\.(\d*)/, OPTIONAL_NUMBER_EXP, OPTIONAL_NUMBER_SUFFIX)
+ },
+ {
+ begin: concat(/\b\d+/, OPTIONAL_NUMBER_EXP, OPTIONAL_NUMBER_SUFFIX)
+ },
+ {
+ begin: concat(/\.\d+/, OPTIONAL_NUMBER_EXP, OPTIONAL_NUMBER_SUFFIX)
+ }
+ ],
+ relevance: 0
+ };
+
+ const FUNCTION_DEF = {
+ className: 'function',
+ beginKeywords: 'subroutine function program',
+ illegal: '[${=\\n]',
+ contains: [
+ hljs.UNDERSCORE_TITLE_MODE,
+ PARAMS
+ ]
+ };
+
+ const STRING = {
+ className: 'string',
+ relevance: 0,
+ variants: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE
+ ]
+ };
+
+ const KEYWORDS = {
+ literal: '.False. .True.',
+ keyword: 'kind do concurrent local shared while private call intrinsic where elsewhere ' +
+ 'type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then block endblock endassociate ' +
+ 'public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. ' +
+ 'goto save else use module select case ' +
+ 'access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit ' +
+ 'continue format pause cycle exit ' +
+ 'c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg ' +
+ 'synchronous nopass non_overridable pass protected volatile abstract extends import ' +
+ 'non_intrinsic value deferred generic final enumerator class associate bind enum ' +
+ 'c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t ' +
+ 'c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double ' +
+ 'c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr ' +
+ 'c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer ' +
+ 'c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor ' +
+ 'numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ' +
+ 'ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive ' +
+ 'pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure impure ' +
+ 'integer real character complex logical codimension dimension allocatable|10 parameter ' +
+ 'external implicit|10 none double precision assign intent optional pointer ' +
+ 'target in out common equivalence data',
+ built_in: 'alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint ' +
+ 'dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl ' +
+ 'algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama ' +
+ 'iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod ' +
+ 'qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log ' +
+ 'log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate ' +
+ 'adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product ' +
+ 'eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul ' +
+ 'maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product ' +
+ 'radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind ' +
+ 'set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer ' +
+ 'dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ' +
+ 'ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode ' +
+ 'is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of ' +
+ 'acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 ' +
+ 'atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits ' +
+ 'bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr ' +
+ 'num_images parity popcnt poppar shifta shiftl shiftr this_image sync change team co_broadcast co_max co_min co_sum co_reduce'
+ };
+ return {
+ name: 'Fortran',
+ case_insensitive: true,
+ aliases: [
+ 'f90',
+ 'f95'
+ ],
+ keywords: KEYWORDS,
+ illegal: /\/\*/,
+ contains: [
+ STRING,
+ FUNCTION_DEF,
+ // allow `C = value` for assignments so they aren't misdetected
+ // as Fortran 77 style comments
+ {
+ begin: /^C\s*=(?!=)/,
+ relevance: 0
+ },
+ COMMENT,
+ NUMBER
+ ]
+ };
+}
+
+module.exports = fortran;
+
+
+/***/ }),
+
+/***/ 990:
+/***/ ((module) => {
+
+/*
+Language: F#
+Author: Jonas Follesø
+Contributors: Troy Kershaw , Henrik Feldt
+Website: https://docs.microsoft.com/en-us/dotnet/fsharp/
+Category: functional
+*/
+
+/** @type LanguageFn */
+function fsharp(hljs) {
+ const TYPEPARAM = {
+ begin: '<',
+ end: '>',
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: /'[a-zA-Z0-9_]+/
+ })
+ ]
+ };
+
+ return {
+ name: 'F#',
+ aliases: ['fs'],
+ keywords:
+ 'abstract and as assert base begin class default delegate do done ' +
+ 'downcast downto elif else end exception extern false finally for ' +
+ 'fun function global if in inherit inline interface internal lazy let ' +
+ 'match member module mutable namespace new null of open or ' +
+ 'override private public rec return sig static struct then to ' +
+ 'true try type upcast use val void when while with yield',
+ illegal: /\/\*/,
+ contains: [
+ {
+ // monad builder keywords (matches before non-bang kws)
+ className: 'keyword',
+ begin: /\b(yield|return|let|do)!/
+ },
+ {
+ className: 'string',
+ begin: '@"',
+ end: '"',
+ contains: [
+ {
+ begin: '""'
+ }
+ ]
+ },
+ {
+ className: 'string',
+ begin: '"""',
+ end: '"""'
+ },
+ hljs.COMMENT('\\(\\*(\\s)', '\\*\\)', {
+ contains: ["self"]
+ }),
+ {
+ className: 'class',
+ beginKeywords: 'type',
+ end: '\\(|=|$',
+ excludeEnd: true,
+ contains: [
+ hljs.UNDERSCORE_TITLE_MODE,
+ TYPEPARAM
+ ]
+ },
+ {
+ className: 'meta',
+ begin: '\\[<',
+ end: '>\\]',
+ relevance: 10
+ },
+ {
+ className: 'symbol',
+ begin: '\\B(\'[A-Za-z])\\b',
+ contains: [hljs.BACKSLASH_ESCAPE]
+ },
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ illegal: null
+ }),
+ hljs.C_NUMBER_MODE
+ ]
+ };
+}
+
+module.exports = fsharp;
+
+
+/***/ }),
+
+/***/ 18916:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function anyNumberOfTimes(re) {
+ return concat('(', re, ')*');
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/** @type LanguageFn */
+function gams(hljs) {
+ const KEYWORDS = {
+ keyword:
+ 'abort acronym acronyms alias all and assign binary card diag display ' +
+ 'else eq file files for free ge gt if integer le loop lt maximizing ' +
+ 'minimizing model models ne negative no not option options or ord ' +
+ 'positive prod put putpage puttl repeat sameas semicont semiint smax ' +
+ 'smin solve sos1 sos2 sum system table then until using while xor yes',
+ literal:
+ 'eps inf na',
+ built_in:
+ 'abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy ' +
+ 'cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact ' +
+ 'floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max ' +
+ 'min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power ' +
+ 'randBinomial randLinear randTriangle round rPower sigmoid sign ' +
+ 'signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt ' +
+ 'tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp ' +
+ 'bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt ' +
+ 'rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear ' +
+ 'jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion ' +
+ 'handleCollect handleDelete handleStatus handleSubmit heapFree ' +
+ 'heapLimit heapSize jobHandle jobKill jobStatus jobTerminate ' +
+ 'licenseLevel licenseStatus maxExecError sleep timeClose timeComp ' +
+ 'timeElapsed timeExec timeStart'
+ };
+ const PARAMS = {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ excludeBegin: true,
+ excludeEnd: true
+ };
+ const SYMBOLS = {
+ className: 'symbol',
+ variants: [
+ {
+ begin: /=[lgenxc]=/
+ },
+ {
+ begin: /\$/
+ }
+ ]
+ };
+ const QSTR = { // One-line quoted comment string
+ className: 'comment',
+ variants: [
+ {
+ begin: '\'',
+ end: '\''
+ },
+ {
+ begin: '"',
+ end: '"'
+ }
+ ],
+ illegal: '\\n',
+ contains: [hljs.BACKSLASH_ESCAPE]
+ };
+ const ASSIGNMENT = {
+ begin: '/',
+ end: '/',
+ keywords: KEYWORDS,
+ contains: [
+ QSTR,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.C_NUMBER_MODE
+ ]
+ };
+ const COMMENT_WORD = /[a-z0-9*=?@\\><:,()$[\]_.{}!+%^-]+/;
+ const DESCTEXT = { // Parameter/set/variable description text
+ begin: /[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,
+ excludeBegin: true,
+ end: '$',
+ endsWithParent: true,
+ contains: [
+ QSTR,
+ ASSIGNMENT,
+ {
+ className: 'comment',
+ // one comment word, then possibly more
+ begin: concat(
+ COMMENT_WORD,
+ // [ ] because \s would be too broad (matching newlines)
+ anyNumberOfTimes(concat(/[ ]+/, COMMENT_WORD))
+ ),
+ relevance: 0
+ }
+ ]
+ };
+
+ return {
+ name: 'GAMS',
+ aliases: ['gms'],
+ case_insensitive: true,
+ keywords: KEYWORDS,
+ contains: [
+ hljs.COMMENT(/^\$ontext/, /^\$offtext/),
+ {
+ className: 'meta',
+ begin: '^\\$[a-z0-9]+',
+ end: '$',
+ returnBegin: true,
+ contains: [
+ {
+ className: 'meta-keyword',
+ begin: '^\\$[a-z0-9]+'
+ }
+ ]
+ },
+ hljs.COMMENT('^\\*', '$'),
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ // Declarations
+ {
+ beginKeywords:
+ 'set sets parameter parameters variable variables ' +
+ 'scalar scalars equation equations',
+ end: ';',
+ contains: [
+ hljs.COMMENT('^\\*', '$'),
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ ASSIGNMENT,
+ DESCTEXT
+ ]
+ },
+ { // table environment
+ beginKeywords: 'table',
+ end: ';',
+ returnBegin: true,
+ contains: [
+ { // table header row
+ beginKeywords: 'table',
+ end: '$',
+ contains: [DESCTEXT]
+ },
+ hljs.COMMENT('^\\*', '$'),
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.C_NUMBER_MODE
+ // Table does not contain DESCTEXT or ASSIGNMENT
+ ]
+ },
+ // Function definitions
+ {
+ className: 'function',
+ begin: /^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,
+ returnBegin: true,
+ contains: [
+ { // Function title
+ className: 'title',
+ begin: /^[a-z0-9_]+/
+ },
+ PARAMS,
+ SYMBOLS
+ ]
+ },
+ hljs.C_NUMBER_MODE,
+ SYMBOLS
+ ]
+ };
+}
+
+module.exports = gams;
+
+
+/***/ }),
+
+/***/ 25875:
+/***/ ((module) => {
+
+/*
+Language: GAUSS
+Author: Matt Evans
+Description: GAUSS Mathematical and Statistical language
+Website: https://www.aptech.com
+Category: scientific
+*/
+function gauss(hljs) {
+ const KEYWORDS = {
+ keyword: 'bool break call callexe checkinterrupt clear clearg closeall cls comlog compile ' +
+ 'continue create debug declare delete disable dlibrary dllcall do dos ed edit else ' +
+ 'elseif enable end endfor endif endp endo errorlog errorlogat expr external fn ' +
+ 'for format goto gosub graph if keyword let lib library line load loadarray loadexe ' +
+ 'loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow ' +
+ 'matrix msym ndpclex new open output outwidth plot plotsym pop prcsn print ' +
+ 'printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen ' +
+ 'scroll setarray show sparse stop string struct system trace trap threadfor ' +
+ 'threadendfor threadbegin threadjoin threadstat threadend until use while winprint ' +
+ 'ne ge le gt lt and xor or not eq eqv',
+ built_in: 'abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol ' +
+ 'AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks ' +
+ 'AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults ' +
+ 'annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness ' +
+ 'annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd ' +
+ 'astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar ' +
+ 'base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 ' +
+ 'cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv ' +
+ 'cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn ' +
+ 'cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi ' +
+ 'cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ' +
+ 'ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated ' +
+ 'complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs ' +
+ 'cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos ' +
+ 'datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd ' +
+ 'dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName ' +
+ 'dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy ' +
+ 'dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen ' +
+ 'dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA ' +
+ 'dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField ' +
+ 'dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition ' +
+ 'dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows ' +
+ 'dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly ' +
+ 'dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy ' +
+ 'dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl ' +
+ 'dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt ' +
+ 'dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday ' +
+ 'dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays ' +
+ 'endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error ' +
+ 'etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut ' +
+ 'EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol ' +
+ 'EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq ' +
+ 'feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt ' +
+ 'floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC ' +
+ 'gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders ' +
+ 'gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse ' +
+ 'gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray ' +
+ 'getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders ' +
+ 'getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT ' +
+ 'gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm ' +
+ 'hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 ' +
+ 'indicesf indicesfn indnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 ' +
+ 'inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf ' +
+ 'isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv ' +
+ 'lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn ' +
+ 'lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind ' +
+ 'loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars ' +
+ 'makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli ' +
+ 'mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave ' +
+ 'movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate ' +
+ 'olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto ' +
+ 'pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox ' +
+ 'plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea ' +
+ 'plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout ' +
+ 'plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill ' +
+ 'plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol ' +
+ 'plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange ' +
+ 'plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel ' +
+ 'plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot ' +
+ 'pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames ' +
+ 'pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector ' +
+ 'pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate ' +
+ 'qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr ' +
+ 'real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn ' +
+ 'rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel ' +
+ 'rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn ' +
+ 'rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh ' +
+ 'rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind ' +
+ 'scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa ' +
+ 'setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind ' +
+ 'sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL ' +
+ 'spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense ' +
+ 'spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet ' +
+ 'sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt ' +
+ 'strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr ' +
+ 'surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname ' +
+ 'time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk ' +
+ 'trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt ' +
+ 'utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs ' +
+ 'vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window ' +
+ 'writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM ' +
+ 'xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribute ' +
+ 'h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels ' +
+ 'plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin sylvester ' +
+ 'strtrim',
+ literal: 'DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS ' +
+ 'DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 ' +
+ 'DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS ' +
+ 'DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES ' +
+ 'DB_TRANSACTIONS DB_UNICODE DB_VIEWS __STDIN __STDOUT __STDERR __FILE_DIR'
+ };
+
+ const AT_COMMENT_MODE = hljs.COMMENT('@', '@');
+
+ const PREPROCESSOR =
+ {
+ className: 'meta',
+ begin: '#',
+ end: '$',
+ keywords: {
+ 'meta-keyword': 'define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline'
+ },
+ contains: [
+ {
+ begin: /\\\n/,
+ relevance: 0
+ },
+ {
+ beginKeywords: 'include',
+ end: '$',
+ keywords: {
+ 'meta-keyword': 'include'
+ },
+ contains: [
+ {
+ className: 'meta-string',
+ begin: '"',
+ end: '"',
+ illegal: '\\n'
+ }
+ ]
+ },
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ AT_COMMENT_MODE
+ ]
+ };
+
+ const STRUCT_TYPE =
+ {
+ begin: /\bstruct\s+/,
+ end: /\s/,
+ keywords: "struct",
+ contains: [
+ {
+ className: "type",
+ begin: hljs.UNDERSCORE_IDENT_RE,
+ relevance: 0
+ }
+ ]
+ };
+
+ // only for definitions
+ const PARSE_PARAMS = [
+ {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ excludeBegin: true,
+ excludeEnd: true,
+ endsWithParent: true,
+ relevance: 0,
+ contains: [
+ { // dots
+ className: 'literal',
+ begin: /\.\.\./
+ },
+ hljs.C_NUMBER_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ AT_COMMENT_MODE,
+ STRUCT_TYPE
+ ]
+ }
+ ];
+
+ const FUNCTION_DEF =
+ {
+ className: "title",
+ begin: hljs.UNDERSCORE_IDENT_RE,
+ relevance: 0
+ };
+
+ const DEFINITION = function(beginKeywords, end, inherits) {
+ const mode = hljs.inherit(
+ {
+ className: "function",
+ beginKeywords: beginKeywords,
+ end: end,
+ excludeEnd: true,
+ contains: [].concat(PARSE_PARAMS)
+ },
+ inherits || {}
+ );
+ mode.contains.push(FUNCTION_DEF);
+ mode.contains.push(hljs.C_NUMBER_MODE);
+ mode.contains.push(hljs.C_BLOCK_COMMENT_MODE);
+ mode.contains.push(AT_COMMENT_MODE);
+ return mode;
+ };
+
+ const BUILT_IN_REF =
+ { // these are explicitly named internal function calls
+ className: 'built_in',
+ begin: '\\b(' + KEYWORDS.built_in.split(' ').join('|') + ')\\b'
+ };
+
+ const STRING_REF =
+ {
+ className: 'string',
+ begin: '"',
+ end: '"',
+ contains: [hljs.BACKSLASH_ESCAPE],
+ relevance: 0
+ };
+
+ const FUNCTION_REF =
+ {
+ // className: "fn_ref",
+ begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
+ returnBegin: true,
+ keywords: KEYWORDS,
+ relevance: 0,
+ contains: [
+ {
+ beginKeywords: KEYWORDS.keyword
+ },
+ BUILT_IN_REF,
+ { // ambiguously named function calls get a relevance of 0
+ className: 'built_in',
+ begin: hljs.UNDERSCORE_IDENT_RE,
+ relevance: 0
+ }
+ ]
+ };
+
+ const FUNCTION_REF_PARAMS =
+ {
+ // className: "fn_ref_params",
+ begin: /\(/,
+ end: /\)/,
+ relevance: 0,
+ keywords: {
+ built_in: KEYWORDS.built_in,
+ literal: KEYWORDS.literal
+ },
+ contains: [
+ hljs.C_NUMBER_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ AT_COMMENT_MODE,
+ BUILT_IN_REF,
+ FUNCTION_REF,
+ STRING_REF,
+ 'self'
+ ]
+ };
+
+ FUNCTION_REF.contains.push(FUNCTION_REF_PARAMS);
+
+ return {
+ name: 'GAUSS',
+ aliases: ['gss'],
+ case_insensitive: true, // language is case-insensitive
+ keywords: KEYWORDS,
+ illegal: /(\{[%#]|[%#]\}| <- )/,
+ contains: [
+ hljs.C_NUMBER_MODE,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ AT_COMMENT_MODE,
+ STRING_REF,
+ PREPROCESSOR,
+ {
+ className: 'keyword',
+ begin: /\bexternal (matrix|string|array|sparse matrix|struct|proc|keyword|fn)/
+ },
+ DEFINITION('proc keyword', ';'),
+ DEFINITION('fn', '='),
+ {
+ beginKeywords: 'for threadfor',
+ end: /;/,
+ // end: /\(/,
+ relevance: 0,
+ contains: [
+ hljs.C_BLOCK_COMMENT_MODE,
+ AT_COMMENT_MODE,
+ FUNCTION_REF_PARAMS
+ ]
+ },
+ { // custom method guard
+ // excludes method names from keyword processing
+ variants: [
+ {
+ begin: hljs.UNDERSCORE_IDENT_RE + '\\.' + hljs.UNDERSCORE_IDENT_RE
+ },
+ {
+ begin: hljs.UNDERSCORE_IDENT_RE + '\\s*='
+ }
+ ],
+ relevance: 0
+ },
+ FUNCTION_REF,
+ STRUCT_TYPE
+ ]
+ };
+}
+
+module.exports = gauss;
+
+
+/***/ }),
+
+/***/ 83306:
+/***/ ((module) => {
+
+/*
+ Language: G-code (ISO 6983)
+ Contributors: Adam Joseph Cook
+ Description: G-code syntax highlighter for Fanuc and other common CNC machine tool controls.
+ Website: https://www.sis.se/api/document/preview/911952/
+ */
+
+function gcode(hljs) {
+ const GCODE_IDENT_RE = '[A-Z_][A-Z0-9_.]*';
+ const GCODE_CLOSE_RE = '%';
+ const GCODE_KEYWORDS = {
+ $pattern: GCODE_IDENT_RE,
+ keyword: 'IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT ' +
+ 'EQ LT GT NE GE LE OR XOR'
+ };
+ const GCODE_START = {
+ className: 'meta',
+ begin: '([O])([0-9]+)'
+ };
+ const NUMBER = hljs.inherit(hljs.C_NUMBER_MODE, {
+ begin: '([-+]?((\\.\\d+)|(\\d+)(\\.\\d*)?))|' + hljs.C_NUMBER_RE
+ });
+ const GCODE_CODE = [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.COMMENT(/\(/, /\)/),
+ NUMBER,
+ hljs.inherit(hljs.APOS_STRING_MODE, {
+ illegal: null
+ }),
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ illegal: null
+ }),
+ {
+ className: 'name',
+ begin: '([G])([0-9]+\\.?[0-9]?)'
+ },
+ {
+ className: 'name',
+ begin: '([M])([0-9]+\\.?[0-9]?)'
+ },
+ {
+ className: 'attr',
+ begin: '(VC|VS|#)',
+ end: '(\\d+)'
+ },
+ {
+ className: 'attr',
+ begin: '(VZOFX|VZOFY|VZOFZ)'
+ },
+ {
+ className: 'built_in',
+ begin: '(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)',
+ contains: [
+ NUMBER
+ ],
+ end: '\\]'
+ },
+ {
+ className: 'symbol',
+ variants: [
+ {
+ begin: 'N',
+ end: '\\d+',
+ illegal: '\\W'
+ }
+ ]
+ }
+ ];
+
+ return {
+ name: 'G-code (ISO 6983)',
+ aliases: ['nc'],
+ // Some implementations (CNC controls) of G-code are interoperable with uppercase and lowercase letters seamlessly.
+ // However, most prefer all uppercase and uppercase is customary.
+ case_insensitive: true,
+ keywords: GCODE_KEYWORDS,
+ contains: [
+ {
+ className: 'meta',
+ begin: GCODE_CLOSE_RE
+ },
+ GCODE_START
+ ].concat(GCODE_CODE)
+ };
+}
+
+module.exports = gcode;
+
+
+/***/ }),
+
+/***/ 20412:
+/***/ ((module) => {
+
+/*
+ Language: Gherkin
+ Author: Sam Pikesley (@pikesley)
+ Description: Gherkin is the format for cucumber specifications. It is a domain specific language which helps you to describe business behavior without the need to go into detail of implementation.
+ Website: https://cucumber.io/docs/gherkin/
+ */
+
+function gherkin(hljs) {
+ return {
+ name: 'Gherkin',
+ aliases: ['feature'],
+ keywords: 'Feature Background Ability Business\ Need Scenario Scenarios Scenario\ Outline Scenario\ Template Examples Given And Then But When',
+ contains: [
+ {
+ className: 'symbol',
+ begin: '\\*',
+ relevance: 0
+ },
+ {
+ className: 'meta',
+ begin: '@[^@\\s]+'
+ },
+ {
+ begin: '\\|',
+ end: '\\|\\w*$',
+ contains: [
+ {
+ className: 'string',
+ begin: '[^|]+'
+ }
+ ]
+ },
+ {
+ className: 'variable',
+ begin: '<',
+ end: '>'
+ },
+ hljs.HASH_COMMENT_MODE,
+ {
+ className: 'string',
+ begin: '"""',
+ end: '"""'
+ },
+ hljs.QUOTE_STRING_MODE
+ ]
+ };
+}
+
+module.exports = gherkin;
+
+
+/***/ }),
+
+/***/ 76836:
+/***/ ((module) => {
+
+/*
+Language: GLSL
+Description: OpenGL Shading Language
+Author: Sergey Tikhomirov
+Website: https://en.wikipedia.org/wiki/OpenGL_Shading_Language
+Category: graphics
+*/
+
+function glsl(hljs) {
+ return {
+ name: 'GLSL',
+ keywords: {
+ keyword:
+ // Statements
+ 'break continue discard do else for if return while switch case default ' +
+ // Qualifiers
+ 'attribute binding buffer ccw centroid centroid varying coherent column_major const cw ' +
+ 'depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing ' +
+ 'flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant ' +
+ 'invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y ' +
+ 'local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left ' +
+ 'out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f ' +
+ 'r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict ' +
+ 'rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 ' +
+ 'rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 ' +
+ 'rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip ' +
+ 'triangles triangles_adjacency uniform varying vertices volatile writeonly',
+ type:
+ 'atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 ' +
+ 'dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray ' +
+ 'iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer ' +
+ 'iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray ' +
+ 'image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray ' +
+ 'isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D ' +
+ 'isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 ' +
+ 'mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray ' +
+ 'sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow ' +
+ 'sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D ' +
+ 'samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow ' +
+ 'image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect ' +
+ 'uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray ' +
+ 'usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D ' +
+ 'samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void',
+ built_in:
+ // Constants
+ 'gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes ' +
+ 'gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms ' +
+ 'gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers ' +
+ 'gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits ' +
+ 'gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize ' +
+ 'gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters ' +
+ 'gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors ' +
+ 'gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers ' +
+ 'gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents ' +
+ 'gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits ' +
+ 'gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents ' +
+ 'gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset ' +
+ 'gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms ' +
+ 'gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits ' +
+ 'gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents ' +
+ 'gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters ' +
+ 'gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents ' +
+ 'gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents ' +
+ 'gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits ' +
+ 'gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors ' +
+ 'gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms ' +
+ 'gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits ' +
+ 'gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset ' +
+ // Variables
+ 'gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial ' +
+ 'gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color ' +
+ 'gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord ' +
+ 'gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor ' +
+ 'gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial ' +
+ 'gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel ' +
+ 'gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix ' +
+ 'gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose ' +
+ 'gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose ' +
+ 'gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 ' +
+ 'gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 ' +
+ 'gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ ' +
+ 'gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord ' +
+ 'gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse ' +
+ 'gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask ' +
+ 'gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter ' +
+ 'gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose ' +
+ 'gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out ' +
+ // Functions
+ 'EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin ' +
+ 'asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement ' +
+ 'atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier ' +
+ 'bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross ' +
+ 'dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB ' +
+ 'floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan ' +
+ 'greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap ' +
+ 'imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad ' +
+ 'imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset ' +
+ 'interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log ' +
+ 'log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer ' +
+ 'memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 ' +
+ 'normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 ' +
+ 'packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod ' +
+ 'shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh ' +
+ 'smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod ' +
+ 'texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod ' +
+ 'texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod ' +
+ 'textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset ' +
+ 'textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset ' +
+ 'textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod ' +
+ 'textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 ' +
+ 'unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow',
+ literal: 'true false'
+ },
+ illegal: '"',
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'meta',
+ begin: '#',
+ end: '$'
+ }
+ ]
+ };
+}
+
+module.exports = glsl;
+
+
+/***/ }),
+
+/***/ 27646:
+/***/ ((module) => {
+
+/*
+Language: GML
+Author: Meseta
+Description: Game Maker Language for GameMaker Studio 2
+Website: https://docs2.yoyogames.com
+Category: scripting
+*/
+
+function gml(hljs) {
+ const GML_KEYWORDS = {
+ keyword: 'begin end if then else while do for break continue with until ' +
+ 'repeat exit and or xor not return mod div switch case default var ' +
+ 'globalvar enum function constructor delete #macro #region #endregion',
+ built_in: 'is_real is_string is_array is_undefined is_int32 is_int64 is_ptr ' +
+ 'is_vec3 is_vec4 is_matrix is_bool is_method is_struct is_infinity is_nan ' +
+ 'is_numeric typeof variable_global_exists variable_global_get variable_global_set ' +
+ 'variable_instance_exists variable_instance_get variable_instance_set ' +
+ 'variable_instance_get_names variable_struct_exists variable_struct_get ' +
+ 'variable_struct_get_names variable_struct_names_count variable_struct_remove ' +
+ 'variable_struct_set array_delete array_insert array_length array_length_1d ' +
+ 'array_length_2d array_height_2d array_equals array_create ' +
+ 'array_copy array_pop array_push array_resize array_sort ' +
+ 'random random_range irandom irandom_range random_set_seed random_get_seed ' +
+ 'randomize randomise choose abs round floor ceil sign frac sqrt sqr ' +
+ 'exp ln log2 log10 sin cos tan arcsin arccos arctan arctan2 dsin dcos ' +
+ 'dtan darcsin darccos darctan darctan2 degtorad radtodeg power logn ' +
+ 'min max mean median clamp lerp dot_product dot_product_3d ' +
+ 'dot_product_normalised dot_product_3d_normalised ' +
+ 'dot_product_normalized dot_product_3d_normalized math_set_epsilon ' +
+ 'math_get_epsilon angle_difference point_distance_3d point_distance ' +
+ 'point_direction lengthdir_x lengthdir_y real string int64 ptr ' +
+ 'string_format chr ansi_char ord string_length string_byte_length ' +
+ 'string_pos string_copy string_char_at string_ord_at string_byte_at ' +
+ 'string_set_byte_at string_delete string_insert string_lower ' +
+ 'string_upper string_repeat string_letters string_digits ' +
+ 'string_lettersdigits string_replace string_replace_all string_count ' +
+ 'string_hash_to_newline clipboard_has_text clipboard_set_text ' +
+ 'clipboard_get_text date_current_datetime date_create_datetime ' +
+ 'date_valid_datetime date_inc_year date_inc_month date_inc_week ' +
+ 'date_inc_day date_inc_hour date_inc_minute date_inc_second ' +
+ 'date_get_year date_get_month date_get_week date_get_day ' +
+ 'date_get_hour date_get_minute date_get_second date_get_weekday ' +
+ 'date_get_day_of_year date_get_hour_of_year date_get_minute_of_year ' +
+ 'date_get_second_of_year date_year_span date_month_span ' +
+ 'date_week_span date_day_span date_hour_span date_minute_span ' +
+ 'date_second_span date_compare_datetime date_compare_date ' +
+ 'date_compare_time date_date_of date_time_of date_datetime_string ' +
+ 'date_date_string date_time_string date_days_in_month ' +
+ 'date_days_in_year date_leap_year date_is_today date_set_timezone ' +
+ 'date_get_timezone game_set_speed game_get_speed motion_set ' +
+ 'motion_add place_free place_empty place_meeting place_snapped ' +
+ 'move_random move_snap move_towards_point move_contact_solid ' +
+ 'move_contact_all move_outside_solid move_outside_all ' +
+ 'move_bounce_solid move_bounce_all move_wrap distance_to_point ' +
+ 'distance_to_object position_empty position_meeting path_start ' +
+ 'path_end mp_linear_step mp_potential_step mp_linear_step_object ' +
+ 'mp_potential_step_object mp_potential_settings mp_linear_path ' +
+ 'mp_potential_path mp_linear_path_object mp_potential_path_object ' +
+ 'mp_grid_create mp_grid_destroy mp_grid_clear_all mp_grid_clear_cell ' +
+ 'mp_grid_clear_rectangle mp_grid_add_cell mp_grid_get_cell ' +
+ 'mp_grid_add_rectangle mp_grid_add_instances mp_grid_path ' +
+ 'mp_grid_draw mp_grid_to_ds_grid collision_point collision_rectangle ' +
+ 'collision_circle collision_ellipse collision_line ' +
+ 'collision_point_list collision_rectangle_list collision_circle_list ' +
+ 'collision_ellipse_list collision_line_list instance_position_list ' +
+ 'instance_place_list point_in_rectangle ' +
+ 'point_in_triangle point_in_circle rectangle_in_rectangle ' +
+ 'rectangle_in_triangle rectangle_in_circle instance_find ' +
+ 'instance_exists instance_number instance_position instance_nearest ' +
+ 'instance_furthest instance_place instance_create_depth ' +
+ 'instance_create_layer instance_copy instance_change instance_destroy ' +
+ 'position_destroy position_change instance_id_get ' +
+ 'instance_deactivate_all instance_deactivate_object ' +
+ 'instance_deactivate_region instance_activate_all ' +
+ 'instance_activate_object instance_activate_region room_goto ' +
+ 'room_goto_previous room_goto_next room_previous room_next ' +
+ 'room_restart game_end game_restart game_load game_save ' +
+ 'game_save_buffer game_load_buffer event_perform event_user ' +
+ 'event_perform_object event_inherited show_debug_message ' +
+ 'show_debug_overlay debug_event debug_get_callstack alarm_get ' +
+ 'alarm_set font_texture_page_size keyboard_set_map keyboard_get_map ' +
+ 'keyboard_unset_map keyboard_check keyboard_check_pressed ' +
+ 'keyboard_check_released keyboard_check_direct keyboard_get_numlock ' +
+ 'keyboard_set_numlock keyboard_key_press keyboard_key_release ' +
+ 'keyboard_clear io_clear mouse_check_button ' +
+ 'mouse_check_button_pressed mouse_check_button_released ' +
+ 'mouse_wheel_up mouse_wheel_down mouse_clear draw_self draw_sprite ' +
+ 'draw_sprite_pos draw_sprite_ext draw_sprite_stretched ' +
+ 'draw_sprite_stretched_ext draw_sprite_tiled draw_sprite_tiled_ext ' +
+ 'draw_sprite_part draw_sprite_part_ext draw_sprite_general draw_clear ' +
+ 'draw_clear_alpha draw_point draw_line draw_line_width draw_rectangle ' +
+ 'draw_roundrect draw_roundrect_ext draw_triangle draw_circle ' +
+ 'draw_ellipse draw_set_circle_precision draw_arrow draw_button ' +
+ 'draw_path draw_healthbar draw_getpixel draw_getpixel_ext ' +
+ 'draw_set_colour draw_set_color draw_set_alpha draw_get_colour ' +
+ 'draw_get_color draw_get_alpha merge_colour make_colour_rgb ' +
+ 'make_colour_hsv colour_get_red colour_get_green colour_get_blue ' +
+ 'colour_get_hue colour_get_saturation colour_get_value merge_color ' +
+ 'make_color_rgb make_color_hsv color_get_red color_get_green ' +
+ 'color_get_blue color_get_hue color_get_saturation color_get_value ' +
+ 'merge_color screen_save screen_save_part draw_set_font ' +
+ 'draw_set_halign draw_set_valign draw_text draw_text_ext string_width ' +
+ 'string_height string_width_ext string_height_ext ' +
+ 'draw_text_transformed draw_text_ext_transformed draw_text_colour ' +
+ 'draw_text_ext_colour draw_text_transformed_colour ' +
+ 'draw_text_ext_transformed_colour draw_text_color draw_text_ext_color ' +
+ 'draw_text_transformed_color draw_text_ext_transformed_color ' +
+ 'draw_point_colour draw_line_colour draw_line_width_colour ' +
+ 'draw_rectangle_colour draw_roundrect_colour ' +
+ 'draw_roundrect_colour_ext draw_triangle_colour draw_circle_colour ' +
+ 'draw_ellipse_colour draw_point_color draw_line_color ' +
+ 'draw_line_width_color draw_rectangle_color draw_roundrect_color ' +
+ 'draw_roundrect_color_ext draw_triangle_color draw_circle_color ' +
+ 'draw_ellipse_color draw_primitive_begin draw_vertex ' +
+ 'draw_vertex_colour draw_vertex_color draw_primitive_end ' +
+ 'sprite_get_uvs font_get_uvs sprite_get_texture font_get_texture ' +
+ 'texture_get_width texture_get_height texture_get_uvs ' +
+ 'draw_primitive_begin_texture draw_vertex_texture ' +
+ 'draw_vertex_texture_colour draw_vertex_texture_color ' +
+ 'texture_global_scale surface_create surface_create_ext ' +
+ 'surface_resize surface_free surface_exists surface_get_width ' +
+ 'surface_get_height surface_get_texture surface_set_target ' +
+ 'surface_set_target_ext surface_reset_target surface_depth_disable ' +
+ 'surface_get_depth_disable draw_surface draw_surface_stretched ' +
+ 'draw_surface_tiled draw_surface_part draw_surface_ext ' +
+ 'draw_surface_stretched_ext draw_surface_tiled_ext ' +
+ 'draw_surface_part_ext draw_surface_general surface_getpixel ' +
+ 'surface_getpixel_ext surface_save surface_save_part surface_copy ' +
+ 'surface_copy_part application_surface_draw_enable ' +
+ 'application_get_position application_surface_enable ' +
+ 'application_surface_is_enabled display_get_width display_get_height ' +
+ 'display_get_orientation display_get_gui_width display_get_gui_height ' +
+ 'display_reset display_mouse_get_x display_mouse_get_y ' +
+ 'display_mouse_set display_set_ui_visibility ' +
+ 'window_set_fullscreen window_get_fullscreen ' +
+ 'window_set_caption window_set_min_width window_set_max_width ' +
+ 'window_set_min_height window_set_max_height window_get_visible_rects ' +
+ 'window_get_caption window_set_cursor window_get_cursor ' +
+ 'window_set_colour window_get_colour window_set_color ' +
+ 'window_get_color window_set_position window_set_size ' +
+ 'window_set_rectangle window_center window_get_x window_get_y ' +
+ 'window_get_width window_get_height window_mouse_get_x ' +
+ 'window_mouse_get_y window_mouse_set window_view_mouse_get_x ' +
+ 'window_view_mouse_get_y window_views_mouse_get_x ' +
+ 'window_views_mouse_get_y audio_listener_position ' +
+ 'audio_listener_velocity audio_listener_orientation ' +
+ 'audio_emitter_position audio_emitter_create audio_emitter_free ' +
+ 'audio_emitter_exists audio_emitter_pitch audio_emitter_velocity ' +
+ 'audio_emitter_falloff audio_emitter_gain audio_play_sound ' +
+ 'audio_play_sound_on audio_play_sound_at audio_stop_sound ' +
+ 'audio_resume_music audio_music_is_playing audio_resume_sound ' +
+ 'audio_pause_sound audio_pause_music audio_channel_num ' +
+ 'audio_sound_length audio_get_type audio_falloff_set_model ' +
+ 'audio_play_music audio_stop_music audio_master_gain audio_music_gain ' +
+ 'audio_sound_gain audio_sound_pitch audio_stop_all audio_resume_all ' +
+ 'audio_pause_all audio_is_playing audio_is_paused audio_exists ' +
+ 'audio_sound_set_track_position audio_sound_get_track_position ' +
+ 'audio_emitter_get_gain audio_emitter_get_pitch audio_emitter_get_x ' +
+ 'audio_emitter_get_y audio_emitter_get_z audio_emitter_get_vx ' +
+ 'audio_emitter_get_vy audio_emitter_get_vz ' +
+ 'audio_listener_set_position audio_listener_set_velocity ' +
+ 'audio_listener_set_orientation audio_listener_get_data ' +
+ 'audio_set_master_gain audio_get_master_gain audio_sound_get_gain ' +
+ 'audio_sound_get_pitch audio_get_name audio_sound_set_track_position ' +
+ 'audio_sound_get_track_position audio_create_stream ' +
+ 'audio_destroy_stream audio_create_sync_group ' +
+ 'audio_destroy_sync_group audio_play_in_sync_group ' +
+ 'audio_start_sync_group audio_stop_sync_group audio_pause_sync_group ' +
+ 'audio_resume_sync_group audio_sync_group_get_track_pos ' +
+ 'audio_sync_group_debug audio_sync_group_is_playing audio_debug ' +
+ 'audio_group_load audio_group_unload audio_group_is_loaded ' +
+ 'audio_group_load_progress audio_group_name audio_group_stop_all ' +
+ 'audio_group_set_gain audio_create_buffer_sound ' +
+ 'audio_free_buffer_sound audio_create_play_queue ' +
+ 'audio_free_play_queue audio_queue_sound audio_get_recorder_count ' +
+ 'audio_get_recorder_info audio_start_recording audio_stop_recording ' +
+ 'audio_sound_get_listener_mask audio_emitter_get_listener_mask ' +
+ 'audio_get_listener_mask audio_sound_set_listener_mask ' +
+ 'audio_emitter_set_listener_mask audio_set_listener_mask ' +
+ 'audio_get_listener_count audio_get_listener_info audio_system ' +
+ 'show_message show_message_async clickable_add clickable_add_ext ' +
+ 'clickable_change clickable_change_ext clickable_delete ' +
+ 'clickable_exists clickable_set_style show_question ' +
+ 'show_question_async get_integer get_string get_integer_async ' +
+ 'get_string_async get_login_async get_open_filename get_save_filename ' +
+ 'get_open_filename_ext get_save_filename_ext show_error ' +
+ 'highscore_clear highscore_add highscore_value highscore_name ' +
+ 'draw_highscore sprite_exists sprite_get_name sprite_get_number ' +
+ 'sprite_get_width sprite_get_height sprite_get_xoffset ' +
+ 'sprite_get_yoffset sprite_get_bbox_left sprite_get_bbox_right ' +
+ 'sprite_get_bbox_top sprite_get_bbox_bottom sprite_save ' +
+ 'sprite_save_strip sprite_set_cache_size sprite_set_cache_size_ext ' +
+ 'sprite_get_tpe sprite_prefetch sprite_prefetch_multi sprite_flush ' +
+ 'sprite_flush_multi sprite_set_speed sprite_get_speed_type ' +
+ 'sprite_get_speed font_exists font_get_name font_get_fontname ' +
+ 'font_get_bold font_get_italic font_get_first font_get_last ' +
+ 'font_get_size font_set_cache_size path_exists path_get_name ' +
+ 'path_get_length path_get_time path_get_kind path_get_closed ' +
+ 'path_get_precision path_get_number path_get_point_x path_get_point_y ' +
+ 'path_get_point_speed path_get_x path_get_y path_get_speed ' +
+ 'script_exists script_get_name timeline_add timeline_delete ' +
+ 'timeline_clear timeline_exists timeline_get_name ' +
+ 'timeline_moment_clear timeline_moment_add_script timeline_size ' +
+ 'timeline_max_moment object_exists object_get_name object_get_sprite ' +
+ 'object_get_solid object_get_visible object_get_persistent ' +
+ 'object_get_mask object_get_parent object_get_physics ' +
+ 'object_is_ancestor room_exists room_get_name sprite_set_offset ' +
+ 'sprite_duplicate sprite_assign sprite_merge sprite_add ' +
+ 'sprite_replace sprite_create_from_surface sprite_add_from_surface ' +
+ 'sprite_delete sprite_set_alpha_from_sprite sprite_collision_mask ' +
+ 'font_add_enable_aa font_add_get_enable_aa font_add font_add_sprite ' +
+ 'font_add_sprite_ext font_replace font_replace_sprite ' +
+ 'font_replace_sprite_ext font_delete path_set_kind path_set_closed ' +
+ 'path_set_precision path_add path_assign path_duplicate path_append ' +
+ 'path_delete path_add_point path_insert_point path_change_point ' +
+ 'path_delete_point path_clear_points path_reverse path_mirror ' +
+ 'path_flip path_rotate path_rescale path_shift script_execute ' +
+ 'object_set_sprite object_set_solid object_set_visible ' +
+ 'object_set_persistent object_set_mask room_set_width room_set_height ' +
+ 'room_set_persistent room_set_background_colour ' +
+ 'room_set_background_color room_set_view room_set_viewport ' +
+ 'room_get_viewport room_set_view_enabled room_add room_duplicate ' +
+ 'room_assign room_instance_add room_instance_clear room_get_camera ' +
+ 'room_set_camera asset_get_index asset_get_type ' +
+ 'file_text_open_from_string file_text_open_read file_text_open_write ' +
+ 'file_text_open_append file_text_close file_text_write_string ' +
+ 'file_text_write_real file_text_writeln file_text_read_string ' +
+ 'file_text_read_real file_text_readln file_text_eof file_text_eoln ' +
+ 'file_exists file_delete file_rename file_copy directory_exists ' +
+ 'directory_create directory_destroy file_find_first file_find_next ' +
+ 'file_find_close file_attributes filename_name filename_path ' +
+ 'filename_dir filename_drive filename_ext filename_change_ext ' +
+ 'file_bin_open file_bin_rewrite file_bin_close file_bin_position ' +
+ 'file_bin_size file_bin_seek file_bin_write_byte file_bin_read_byte ' +
+ 'parameter_count parameter_string environment_get_variable ' +
+ 'ini_open_from_string ini_open ini_close ini_read_string ' +
+ 'ini_read_real ini_write_string ini_write_real ini_key_exists ' +
+ 'ini_section_exists ini_key_delete ini_section_delete ' +
+ 'ds_set_precision ds_exists ds_stack_create ds_stack_destroy ' +
+ 'ds_stack_clear ds_stack_copy ds_stack_size ds_stack_empty ' +
+ 'ds_stack_push ds_stack_pop ds_stack_top ds_stack_write ds_stack_read ' +
+ 'ds_queue_create ds_queue_destroy ds_queue_clear ds_queue_copy ' +
+ 'ds_queue_size ds_queue_empty ds_queue_enqueue ds_queue_dequeue ' +
+ 'ds_queue_head ds_queue_tail ds_queue_write ds_queue_read ' +
+ 'ds_list_create ds_list_destroy ds_list_clear ds_list_copy ' +
+ 'ds_list_size ds_list_empty ds_list_add ds_list_insert ' +
+ 'ds_list_replace ds_list_delete ds_list_find_index ds_list_find_value ' +
+ 'ds_list_mark_as_list ds_list_mark_as_map ds_list_sort ' +
+ 'ds_list_shuffle ds_list_write ds_list_read ds_list_set ds_map_create ' +
+ 'ds_map_destroy ds_map_clear ds_map_copy ds_map_size ds_map_empty ' +
+ 'ds_map_add ds_map_add_list ds_map_add_map ds_map_replace ' +
+ 'ds_map_replace_map ds_map_replace_list ds_map_delete ds_map_exists ' +
+ 'ds_map_find_value ds_map_find_previous ds_map_find_next ' +
+ 'ds_map_find_first ds_map_find_last ds_map_write ds_map_read ' +
+ 'ds_map_secure_save ds_map_secure_load ds_map_secure_load_buffer ' +
+ 'ds_map_secure_save_buffer ds_map_set ds_priority_create ' +
+ 'ds_priority_destroy ds_priority_clear ds_priority_copy ' +
+ 'ds_priority_size ds_priority_empty ds_priority_add ' +
+ 'ds_priority_change_priority ds_priority_find_priority ' +
+ 'ds_priority_delete_value ds_priority_delete_min ds_priority_find_min ' +
+ 'ds_priority_delete_max ds_priority_find_max ds_priority_write ' +
+ 'ds_priority_read ds_grid_create ds_grid_destroy ds_grid_copy ' +
+ 'ds_grid_resize ds_grid_width ds_grid_height ds_grid_clear ' +
+ 'ds_grid_set ds_grid_add ds_grid_multiply ds_grid_set_region ' +
+ 'ds_grid_add_region ds_grid_multiply_region ds_grid_set_disk ' +
+ 'ds_grid_add_disk ds_grid_multiply_disk ds_grid_set_grid_region ' +
+ 'ds_grid_add_grid_region ds_grid_multiply_grid_region ds_grid_get ' +
+ 'ds_grid_get_sum ds_grid_get_max ds_grid_get_min ds_grid_get_mean ' +
+ 'ds_grid_get_disk_sum ds_grid_get_disk_min ds_grid_get_disk_max ' +
+ 'ds_grid_get_disk_mean ds_grid_value_exists ds_grid_value_x ' +
+ 'ds_grid_value_y ds_grid_value_disk_exists ds_grid_value_disk_x ' +
+ 'ds_grid_value_disk_y ds_grid_shuffle ds_grid_write ds_grid_read ' +
+ 'ds_grid_sort ds_grid_set ds_grid_get effect_create_below ' +
+ 'effect_create_above effect_clear part_type_create part_type_destroy ' +
+ 'part_type_exists part_type_clear part_type_shape part_type_sprite ' +
+ 'part_type_size part_type_scale part_type_orientation part_type_life ' +
+ 'part_type_step part_type_death part_type_speed part_type_direction ' +
+ 'part_type_gravity part_type_colour1 part_type_colour2 ' +
+ 'part_type_colour3 part_type_colour_mix part_type_colour_rgb ' +
+ 'part_type_colour_hsv part_type_color1 part_type_color2 ' +
+ 'part_type_color3 part_type_color_mix part_type_color_rgb ' +
+ 'part_type_color_hsv part_type_alpha1 part_type_alpha2 ' +
+ 'part_type_alpha3 part_type_blend part_system_create ' +
+ 'part_system_create_layer part_system_destroy part_system_exists ' +
+ 'part_system_clear part_system_draw_order part_system_depth ' +
+ 'part_system_position part_system_automatic_update ' +
+ 'part_system_automatic_draw part_system_update part_system_drawit ' +
+ 'part_system_get_layer part_system_layer part_particles_create ' +
+ 'part_particles_create_colour part_particles_create_color ' +
+ 'part_particles_clear part_particles_count part_emitter_create ' +
+ 'part_emitter_destroy part_emitter_destroy_all part_emitter_exists ' +
+ 'part_emitter_clear part_emitter_region part_emitter_burst ' +
+ 'part_emitter_stream external_call external_define external_free ' +
+ 'window_handle window_device matrix_get matrix_set ' +
+ 'matrix_build_identity matrix_build matrix_build_lookat ' +
+ 'matrix_build_projection_ortho matrix_build_projection_perspective ' +
+ 'matrix_build_projection_perspective_fov matrix_multiply ' +
+ 'matrix_transform_vertex matrix_stack_push matrix_stack_pop ' +
+ 'matrix_stack_multiply matrix_stack_set matrix_stack_clear ' +
+ 'matrix_stack_top matrix_stack_is_empty browser_input_capture ' +
+ 'os_get_config os_get_info os_get_language os_get_region ' +
+ 'os_lock_orientation display_get_dpi_x display_get_dpi_y ' +
+ 'display_set_gui_size display_set_gui_maximise ' +
+ 'display_set_gui_maximize device_mouse_dbclick_enable ' +
+ 'display_set_timing_method display_get_timing_method ' +
+ 'display_set_sleep_margin display_get_sleep_margin virtual_key_add ' +
+ 'virtual_key_hide virtual_key_delete virtual_key_show ' +
+ 'draw_enable_drawevent draw_enable_swf_aa draw_set_swf_aa_level ' +
+ 'draw_get_swf_aa_level draw_texture_flush draw_flush ' +
+ 'gpu_set_blendenable gpu_set_ztestenable gpu_set_zfunc ' +
+ 'gpu_set_zwriteenable gpu_set_lightingenable gpu_set_fog ' +
+ 'gpu_set_cullmode gpu_set_blendmode gpu_set_blendmode_ext ' +
+ 'gpu_set_blendmode_ext_sepalpha gpu_set_colorwriteenable ' +
+ 'gpu_set_colourwriteenable gpu_set_alphatestenable ' +
+ 'gpu_set_alphatestref gpu_set_alphatestfunc gpu_set_texfilter ' +
+ 'gpu_set_texfilter_ext gpu_set_texrepeat gpu_set_texrepeat_ext ' +
+ 'gpu_set_tex_filter gpu_set_tex_filter_ext gpu_set_tex_repeat ' +
+ 'gpu_set_tex_repeat_ext gpu_set_tex_mip_filter ' +
+ 'gpu_set_tex_mip_filter_ext gpu_set_tex_mip_bias ' +
+ 'gpu_set_tex_mip_bias_ext gpu_set_tex_min_mip gpu_set_tex_min_mip_ext ' +
+ 'gpu_set_tex_max_mip gpu_set_tex_max_mip_ext gpu_set_tex_max_aniso ' +
+ 'gpu_set_tex_max_aniso_ext gpu_set_tex_mip_enable ' +
+ 'gpu_set_tex_mip_enable_ext gpu_get_blendenable gpu_get_ztestenable ' +
+ 'gpu_get_zfunc gpu_get_zwriteenable gpu_get_lightingenable ' +
+ 'gpu_get_fog gpu_get_cullmode gpu_get_blendmode gpu_get_blendmode_ext ' +
+ 'gpu_get_blendmode_ext_sepalpha gpu_get_blendmode_src ' +
+ 'gpu_get_blendmode_dest gpu_get_blendmode_srcalpha ' +
+ 'gpu_get_blendmode_destalpha gpu_get_colorwriteenable ' +
+ 'gpu_get_colourwriteenable gpu_get_alphatestenable ' +
+ 'gpu_get_alphatestref gpu_get_alphatestfunc gpu_get_texfilter ' +
+ 'gpu_get_texfilter_ext gpu_get_texrepeat gpu_get_texrepeat_ext ' +
+ 'gpu_get_tex_filter gpu_get_tex_filter_ext gpu_get_tex_repeat ' +
+ 'gpu_get_tex_repeat_ext gpu_get_tex_mip_filter ' +
+ 'gpu_get_tex_mip_filter_ext gpu_get_tex_mip_bias ' +
+ 'gpu_get_tex_mip_bias_ext gpu_get_tex_min_mip gpu_get_tex_min_mip_ext ' +
+ 'gpu_get_tex_max_mip gpu_get_tex_max_mip_ext gpu_get_tex_max_aniso ' +
+ 'gpu_get_tex_max_aniso_ext gpu_get_tex_mip_enable ' +
+ 'gpu_get_tex_mip_enable_ext gpu_push_state gpu_pop_state ' +
+ 'gpu_get_state gpu_set_state draw_light_define_ambient ' +
+ 'draw_light_define_direction draw_light_define_point ' +
+ 'draw_light_enable draw_set_lighting draw_light_get_ambient ' +
+ 'draw_light_get draw_get_lighting shop_leave_rating url_get_domain ' +
+ 'url_open url_open_ext url_open_full get_timer achievement_login ' +
+ 'achievement_logout achievement_post achievement_increment ' +
+ 'achievement_post_score achievement_available ' +
+ 'achievement_show_achievements achievement_show_leaderboards ' +
+ 'achievement_load_friends achievement_load_leaderboard ' +
+ 'achievement_send_challenge achievement_load_progress ' +
+ 'achievement_reset achievement_login_status achievement_get_pic ' +
+ 'achievement_show_challenge_notifications achievement_get_challenges ' +
+ 'achievement_event achievement_show achievement_get_info ' +
+ 'cloud_file_save cloud_string_save cloud_synchronise ads_enable ' +
+ 'ads_disable ads_setup ads_engagement_launch ads_engagement_available ' +
+ 'ads_engagement_active ads_event ads_event_preload ' +
+ 'ads_set_reward_callback ads_get_display_height ads_get_display_width ' +
+ 'ads_move ads_interstitial_available ads_interstitial_display ' +
+ 'device_get_tilt_x device_get_tilt_y device_get_tilt_z ' +
+ 'device_is_keypad_open device_mouse_check_button ' +
+ 'device_mouse_check_button_pressed device_mouse_check_button_released ' +
+ 'device_mouse_x device_mouse_y device_mouse_raw_x device_mouse_raw_y ' +
+ 'device_mouse_x_to_gui device_mouse_y_to_gui iap_activate iap_status ' +
+ 'iap_enumerate_products iap_restore_all iap_acquire iap_consume ' +
+ 'iap_product_details iap_purchase_details facebook_init ' +
+ 'facebook_login facebook_status facebook_graph_request ' +
+ 'facebook_dialog facebook_logout facebook_launch_offerwall ' +
+ 'facebook_post_message facebook_send_invite facebook_user_id ' +
+ 'facebook_accesstoken facebook_check_permission ' +
+ 'facebook_request_read_permissions ' +
+ 'facebook_request_publish_permissions gamepad_is_supported ' +
+ 'gamepad_get_device_count gamepad_is_connected ' +
+ 'gamepad_get_description gamepad_get_button_threshold ' +
+ 'gamepad_set_button_threshold gamepad_get_axis_deadzone ' +
+ 'gamepad_set_axis_deadzone gamepad_button_count gamepad_button_check ' +
+ 'gamepad_button_check_pressed gamepad_button_check_released ' +
+ 'gamepad_button_value gamepad_axis_count gamepad_axis_value ' +
+ 'gamepad_set_vibration gamepad_set_colour gamepad_set_color ' +
+ 'os_is_paused window_has_focus code_is_compiled http_get ' +
+ 'http_get_file http_post_string http_request json_encode json_decode ' +
+ 'zip_unzip load_csv base64_encode base64_decode md5_string_unicode ' +
+ 'md5_string_utf8 md5_file os_is_network_connected sha1_string_unicode ' +
+ 'sha1_string_utf8 sha1_file os_powersave_enable analytics_event ' +
+ 'analytics_event_ext win8_livetile_tile_notification ' +
+ 'win8_livetile_tile_clear win8_livetile_badge_notification ' +
+ 'win8_livetile_badge_clear win8_livetile_queue_enable ' +
+ 'win8_secondarytile_pin win8_secondarytile_badge_notification ' +
+ 'win8_secondarytile_delete win8_livetile_notification_begin ' +
+ 'win8_livetile_notification_secondary_begin ' +
+ 'win8_livetile_notification_expiry win8_livetile_notification_tag ' +
+ 'win8_livetile_notification_text_add ' +
+ 'win8_livetile_notification_image_add win8_livetile_notification_end ' +
+ 'win8_appbar_enable win8_appbar_add_element ' +
+ 'win8_appbar_remove_element win8_settingscharm_add_entry ' +
+ 'win8_settingscharm_add_html_entry win8_settingscharm_add_xaml_entry ' +
+ 'win8_settingscharm_set_xaml_property ' +
+ 'win8_settingscharm_get_xaml_property win8_settingscharm_remove_entry ' +
+ 'win8_share_image win8_share_screenshot win8_share_file ' +
+ 'win8_share_url win8_share_text win8_search_enable ' +
+ 'win8_search_disable win8_search_add_suggestions ' +
+ 'win8_device_touchscreen_available win8_license_initialize_sandbox ' +
+ 'win8_license_trial_version winphone_license_trial_version ' +
+ 'winphone_tile_title winphone_tile_count winphone_tile_back_title ' +
+ 'winphone_tile_back_content winphone_tile_back_content_wide ' +
+ 'winphone_tile_front_image winphone_tile_front_image_small ' +
+ 'winphone_tile_front_image_wide winphone_tile_back_image ' +
+ 'winphone_tile_back_image_wide winphone_tile_background_colour ' +
+ 'winphone_tile_background_color winphone_tile_icon_image ' +
+ 'winphone_tile_small_icon_image winphone_tile_wide_content ' +
+ 'winphone_tile_cycle_images winphone_tile_small_background_image ' +
+ 'physics_world_create physics_world_gravity ' +
+ 'physics_world_update_speed physics_world_update_iterations ' +
+ 'physics_world_draw_debug physics_pause_enable physics_fixture_create ' +
+ 'physics_fixture_set_kinematic physics_fixture_set_density ' +
+ 'physics_fixture_set_awake physics_fixture_set_restitution ' +
+ 'physics_fixture_set_friction physics_fixture_set_collision_group ' +
+ 'physics_fixture_set_sensor physics_fixture_set_linear_damping ' +
+ 'physics_fixture_set_angular_damping physics_fixture_set_circle_shape ' +
+ 'physics_fixture_set_box_shape physics_fixture_set_edge_shape ' +
+ 'physics_fixture_set_polygon_shape physics_fixture_set_chain_shape ' +
+ 'physics_fixture_add_point physics_fixture_bind ' +
+ 'physics_fixture_bind_ext physics_fixture_delete physics_apply_force ' +
+ 'physics_apply_impulse physics_apply_angular_impulse ' +
+ 'physics_apply_local_force physics_apply_local_impulse ' +
+ 'physics_apply_torque physics_mass_properties physics_draw_debug ' +
+ 'physics_test_overlap physics_remove_fixture physics_set_friction ' +
+ 'physics_set_density physics_set_restitution physics_get_friction ' +
+ 'physics_get_density physics_get_restitution ' +
+ 'physics_joint_distance_create physics_joint_rope_create ' +
+ 'physics_joint_revolute_create physics_joint_prismatic_create ' +
+ 'physics_joint_pulley_create physics_joint_wheel_create ' +
+ 'physics_joint_weld_create physics_joint_friction_create ' +
+ 'physics_joint_gear_create physics_joint_enable_motor ' +
+ 'physics_joint_get_value physics_joint_set_value physics_joint_delete ' +
+ 'physics_particle_create physics_particle_delete ' +
+ 'physics_particle_delete_region_circle ' +
+ 'physics_particle_delete_region_box ' +
+ 'physics_particle_delete_region_poly physics_particle_set_flags ' +
+ 'physics_particle_set_category_flags physics_particle_draw ' +
+ 'physics_particle_draw_ext physics_particle_count ' +
+ 'physics_particle_get_data physics_particle_get_data_particle ' +
+ 'physics_particle_group_begin physics_particle_group_circle ' +
+ 'physics_particle_group_box physics_particle_group_polygon ' +
+ 'physics_particle_group_add_point physics_particle_group_end ' +
+ 'physics_particle_group_join physics_particle_group_delete ' +
+ 'physics_particle_group_count physics_particle_group_get_data ' +
+ 'physics_particle_group_get_mass physics_particle_group_get_inertia ' +
+ 'physics_particle_group_get_centre_x ' +
+ 'physics_particle_group_get_centre_y physics_particle_group_get_vel_x ' +
+ 'physics_particle_group_get_vel_y physics_particle_group_get_ang_vel ' +
+ 'physics_particle_group_get_x physics_particle_group_get_y ' +
+ 'physics_particle_group_get_angle physics_particle_set_group_flags ' +
+ 'physics_particle_get_group_flags physics_particle_get_max_count ' +
+ 'physics_particle_get_radius physics_particle_get_density ' +
+ 'physics_particle_get_damping physics_particle_get_gravity_scale ' +
+ 'physics_particle_set_max_count physics_particle_set_radius ' +
+ 'physics_particle_set_density physics_particle_set_damping ' +
+ 'physics_particle_set_gravity_scale network_create_socket ' +
+ 'network_create_socket_ext network_create_server ' +
+ 'network_create_server_raw network_connect network_connect_raw ' +
+ 'network_send_packet network_send_raw network_send_broadcast ' +
+ 'network_send_udp network_send_udp_raw network_set_timeout ' +
+ 'network_set_config network_resolve network_destroy buffer_create ' +
+ 'buffer_write buffer_read buffer_seek buffer_get_surface ' +
+ 'buffer_set_surface buffer_delete buffer_exists buffer_get_type ' +
+ 'buffer_get_alignment buffer_poke buffer_peek buffer_save ' +
+ 'buffer_save_ext buffer_load buffer_load_ext buffer_load_partial ' +
+ 'buffer_copy buffer_fill buffer_get_size buffer_tell buffer_resize ' +
+ 'buffer_md5 buffer_sha1 buffer_base64_encode buffer_base64_decode ' +
+ 'buffer_base64_decode_ext buffer_sizeof buffer_get_address ' +
+ 'buffer_create_from_vertex_buffer ' +
+ 'buffer_create_from_vertex_buffer_ext buffer_copy_from_vertex_buffer ' +
+ 'buffer_async_group_begin buffer_async_group_option ' +
+ 'buffer_async_group_end buffer_load_async buffer_save_async ' +
+ 'gml_release_mode gml_pragma steam_activate_overlay ' +
+ 'steam_is_overlay_enabled steam_is_overlay_activated ' +
+ 'steam_get_persona_name steam_initialised ' +
+ 'steam_is_cloud_enabled_for_app steam_is_cloud_enabled_for_account ' +
+ 'steam_file_persisted steam_get_quota_total steam_get_quota_free ' +
+ 'steam_file_write steam_file_write_file steam_file_read ' +
+ 'steam_file_delete steam_file_exists steam_file_size steam_file_share ' +
+ 'steam_is_screenshot_requested steam_send_screenshot ' +
+ 'steam_is_user_logged_on steam_get_user_steam_id steam_user_owns_dlc ' +
+ 'steam_user_installed_dlc steam_set_achievement steam_get_achievement ' +
+ 'steam_clear_achievement steam_set_stat_int steam_set_stat_float ' +
+ 'steam_set_stat_avg_rate steam_get_stat_int steam_get_stat_float ' +
+ 'steam_get_stat_avg_rate steam_reset_all_stats ' +
+ 'steam_reset_all_stats_achievements steam_stats_ready ' +
+ 'steam_create_leaderboard steam_upload_score steam_upload_score_ext ' +
+ 'steam_download_scores_around_user steam_download_scores ' +
+ 'steam_download_friends_scores steam_upload_score_buffer ' +
+ 'steam_upload_score_buffer_ext steam_current_game_language ' +
+ 'steam_available_languages steam_activate_overlay_browser ' +
+ 'steam_activate_overlay_user steam_activate_overlay_store ' +
+ 'steam_get_user_persona_name steam_get_app_id ' +
+ 'steam_get_user_account_id steam_ugc_download steam_ugc_create_item ' +
+ 'steam_ugc_start_item_update steam_ugc_set_item_title ' +
+ 'steam_ugc_set_item_description steam_ugc_set_item_visibility ' +
+ 'steam_ugc_set_item_tags steam_ugc_set_item_content ' +
+ 'steam_ugc_set_item_preview steam_ugc_submit_item_update ' +
+ 'steam_ugc_get_item_update_progress steam_ugc_subscribe_item ' +
+ 'steam_ugc_unsubscribe_item steam_ugc_num_subscribed_items ' +
+ 'steam_ugc_get_subscribed_items steam_ugc_get_item_install_info ' +
+ 'steam_ugc_get_item_update_info steam_ugc_request_item_details ' +
+ 'steam_ugc_create_query_user steam_ugc_create_query_user_ex ' +
+ 'steam_ugc_create_query_all steam_ugc_create_query_all_ex ' +
+ 'steam_ugc_query_set_cloud_filename_filter ' +
+ 'steam_ugc_query_set_match_any_tag steam_ugc_query_set_search_text ' +
+ 'steam_ugc_query_set_ranked_by_trend_days ' +
+ 'steam_ugc_query_add_required_tag steam_ugc_query_add_excluded_tag ' +
+ 'steam_ugc_query_set_return_long_description ' +
+ 'steam_ugc_query_set_return_total_only ' +
+ 'steam_ugc_query_set_allow_cached_response steam_ugc_send_query ' +
+ 'shader_set shader_get_name shader_reset shader_current ' +
+ 'shader_is_compiled shader_get_sampler_index shader_get_uniform ' +
+ 'shader_set_uniform_i shader_set_uniform_i_array shader_set_uniform_f ' +
+ 'shader_set_uniform_f_array shader_set_uniform_matrix ' +
+ 'shader_set_uniform_matrix_array shader_enable_corner_id ' +
+ 'texture_set_stage texture_get_texel_width texture_get_texel_height ' +
+ 'shaders_are_supported vertex_format_begin vertex_format_end ' +
+ 'vertex_format_delete vertex_format_add_position ' +
+ 'vertex_format_add_position_3d vertex_format_add_colour ' +
+ 'vertex_format_add_color vertex_format_add_normal ' +
+ 'vertex_format_add_texcoord vertex_format_add_textcoord ' +
+ 'vertex_format_add_custom vertex_create_buffer ' +
+ 'vertex_create_buffer_ext vertex_delete_buffer vertex_begin ' +
+ 'vertex_end vertex_position vertex_position_3d vertex_colour ' +
+ 'vertex_color vertex_argb vertex_texcoord vertex_normal vertex_float1 ' +
+ 'vertex_float2 vertex_float3 vertex_float4 vertex_ubyte4 ' +
+ 'vertex_submit vertex_freeze vertex_get_number vertex_get_buffer_size ' +
+ 'vertex_create_buffer_from_buffer ' +
+ 'vertex_create_buffer_from_buffer_ext push_local_notification ' +
+ 'push_get_first_local_notification push_get_next_local_notification ' +
+ 'push_cancel_local_notification skeleton_animation_set ' +
+ 'skeleton_animation_get skeleton_animation_mix ' +
+ 'skeleton_animation_set_ext skeleton_animation_get_ext ' +
+ 'skeleton_animation_get_duration skeleton_animation_get_frames ' +
+ 'skeleton_animation_clear skeleton_skin_set skeleton_skin_get ' +
+ 'skeleton_attachment_set skeleton_attachment_get ' +
+ 'skeleton_attachment_create skeleton_collision_draw_set ' +
+ 'skeleton_bone_data_get skeleton_bone_data_set ' +
+ 'skeleton_bone_state_get skeleton_bone_state_set skeleton_get_minmax ' +
+ 'skeleton_get_num_bounds skeleton_get_bounds ' +
+ 'skeleton_animation_get_frame skeleton_animation_set_frame ' +
+ 'draw_skeleton draw_skeleton_time draw_skeleton_instance ' +
+ 'draw_skeleton_collision skeleton_animation_list skeleton_skin_list ' +
+ 'skeleton_slot_data layer_get_id layer_get_id_at_depth ' +
+ 'layer_get_depth layer_create layer_destroy layer_destroy_instances ' +
+ 'layer_add_instance layer_has_instance layer_set_visible ' +
+ 'layer_get_visible layer_exists layer_x layer_y layer_get_x ' +
+ 'layer_get_y layer_hspeed layer_vspeed layer_get_hspeed ' +
+ 'layer_get_vspeed layer_script_begin layer_script_end layer_shader ' +
+ 'layer_get_script_begin layer_get_script_end layer_get_shader ' +
+ 'layer_set_target_room layer_get_target_room layer_reset_target_room ' +
+ 'layer_get_all layer_get_all_elements layer_get_name layer_depth ' +
+ 'layer_get_element_layer layer_get_element_type layer_element_move ' +
+ 'layer_force_draw_depth layer_is_draw_depth_forced ' +
+ 'layer_get_forced_depth layer_background_get_id ' +
+ 'layer_background_exists layer_background_create ' +
+ 'layer_background_destroy layer_background_visible ' +
+ 'layer_background_change layer_background_sprite ' +
+ 'layer_background_htiled layer_background_vtiled ' +
+ 'layer_background_stretch layer_background_yscale ' +
+ 'layer_background_xscale layer_background_blend ' +
+ 'layer_background_alpha layer_background_index layer_background_speed ' +
+ 'layer_background_get_visible layer_background_get_sprite ' +
+ 'layer_background_get_htiled layer_background_get_vtiled ' +
+ 'layer_background_get_stretch layer_background_get_yscale ' +
+ 'layer_background_get_xscale layer_background_get_blend ' +
+ 'layer_background_get_alpha layer_background_get_index ' +
+ 'layer_background_get_speed layer_sprite_get_id layer_sprite_exists ' +
+ 'layer_sprite_create layer_sprite_destroy layer_sprite_change ' +
+ 'layer_sprite_index layer_sprite_speed layer_sprite_xscale ' +
+ 'layer_sprite_yscale layer_sprite_angle layer_sprite_blend ' +
+ 'layer_sprite_alpha layer_sprite_x layer_sprite_y ' +
+ 'layer_sprite_get_sprite layer_sprite_get_index ' +
+ 'layer_sprite_get_speed layer_sprite_get_xscale ' +
+ 'layer_sprite_get_yscale layer_sprite_get_angle ' +
+ 'layer_sprite_get_blend layer_sprite_get_alpha layer_sprite_get_x ' +
+ 'layer_sprite_get_y layer_tilemap_get_id layer_tilemap_exists ' +
+ 'layer_tilemap_create layer_tilemap_destroy tilemap_tileset tilemap_x ' +
+ 'tilemap_y tilemap_set tilemap_set_at_pixel tilemap_get_tileset ' +
+ 'tilemap_get_tile_width tilemap_get_tile_height tilemap_get_width ' +
+ 'tilemap_get_height tilemap_get_x tilemap_get_y tilemap_get ' +
+ 'tilemap_get_at_pixel tilemap_get_cell_x_at_pixel ' +
+ 'tilemap_get_cell_y_at_pixel tilemap_clear draw_tilemap draw_tile ' +
+ 'tilemap_set_global_mask tilemap_get_global_mask tilemap_set_mask ' +
+ 'tilemap_get_mask tilemap_get_frame tile_set_empty tile_set_index ' +
+ 'tile_set_flip tile_set_mirror tile_set_rotate tile_get_empty ' +
+ 'tile_get_index tile_get_flip tile_get_mirror tile_get_rotate ' +
+ 'layer_tile_exists layer_tile_create layer_tile_destroy ' +
+ 'layer_tile_change layer_tile_xscale layer_tile_yscale ' +
+ 'layer_tile_blend layer_tile_alpha layer_tile_x layer_tile_y ' +
+ 'layer_tile_region layer_tile_visible layer_tile_get_sprite ' +
+ 'layer_tile_get_xscale layer_tile_get_yscale layer_tile_get_blend ' +
+ 'layer_tile_get_alpha layer_tile_get_x layer_tile_get_y ' +
+ 'layer_tile_get_region layer_tile_get_visible ' +
+ 'layer_instance_get_instance instance_activate_layer ' +
+ 'instance_deactivate_layer camera_create camera_create_view ' +
+ 'camera_destroy camera_apply camera_get_active camera_get_default ' +
+ 'camera_set_default camera_set_view_mat camera_set_proj_mat ' +
+ 'camera_set_update_script camera_set_begin_script ' +
+ 'camera_set_end_script camera_set_view_pos camera_set_view_size ' +
+ 'camera_set_view_speed camera_set_view_border camera_set_view_angle ' +
+ 'camera_set_view_target camera_get_view_mat camera_get_proj_mat ' +
+ 'camera_get_update_script camera_get_begin_script ' +
+ 'camera_get_end_script camera_get_view_x camera_get_view_y ' +
+ 'camera_get_view_width camera_get_view_height camera_get_view_speed_x ' +
+ 'camera_get_view_speed_y camera_get_view_border_x ' +
+ 'camera_get_view_border_y camera_get_view_angle ' +
+ 'camera_get_view_target view_get_camera view_get_visible ' +
+ 'view_get_xport view_get_yport view_get_wport view_get_hport ' +
+ 'view_get_surface_id view_set_camera view_set_visible view_set_xport ' +
+ 'view_set_yport view_set_wport view_set_hport view_set_surface_id ' +
+ 'gesture_drag_time gesture_drag_distance gesture_flick_speed ' +
+ 'gesture_double_tap_time gesture_double_tap_distance ' +
+ 'gesture_pinch_distance gesture_pinch_angle_towards ' +
+ 'gesture_pinch_angle_away gesture_rotate_time gesture_rotate_angle ' +
+ 'gesture_tap_count gesture_get_drag_time gesture_get_drag_distance ' +
+ 'gesture_get_flick_speed gesture_get_double_tap_time ' +
+ 'gesture_get_double_tap_distance gesture_get_pinch_distance ' +
+ 'gesture_get_pinch_angle_towards gesture_get_pinch_angle_away ' +
+ 'gesture_get_rotate_time gesture_get_rotate_angle ' +
+ 'gesture_get_tap_count keyboard_virtual_show keyboard_virtual_hide ' +
+ 'keyboard_virtual_status keyboard_virtual_height',
+ literal: 'self other all noone global local undefined pointer_invalid ' +
+ 'pointer_null path_action_stop path_action_restart ' +
+ 'path_action_continue path_action_reverse true false pi GM_build_date ' +
+ 'GM_version GM_runtime_version timezone_local timezone_utc ' +
+ 'gamespeed_fps gamespeed_microseconds ev_create ev_destroy ev_step ' +
+ 'ev_alarm ev_keyboard ev_mouse ev_collision ev_other ev_draw ' +
+ 'ev_draw_begin ev_draw_end ev_draw_pre ev_draw_post ev_keypress ' +
+ 'ev_keyrelease ev_trigger ev_left_button ev_right_button ' +
+ 'ev_middle_button ev_no_button ev_left_press ev_right_press ' +
+ 'ev_middle_press ev_left_release ev_right_release ev_middle_release ' +
+ 'ev_mouse_enter ev_mouse_leave ev_mouse_wheel_up ev_mouse_wheel_down ' +
+ 'ev_global_left_button ev_global_right_button ev_global_middle_button ' +
+ 'ev_global_left_press ev_global_right_press ev_global_middle_press ' +
+ 'ev_global_left_release ev_global_right_release ' +
+ 'ev_global_middle_release ev_joystick1_left ev_joystick1_right ' +
+ 'ev_joystick1_up ev_joystick1_down ev_joystick1_button1 ' +
+ 'ev_joystick1_button2 ev_joystick1_button3 ev_joystick1_button4 ' +
+ 'ev_joystick1_button5 ev_joystick1_button6 ev_joystick1_button7 ' +
+ 'ev_joystick1_button8 ev_joystick2_left ev_joystick2_right ' +
+ 'ev_joystick2_up ev_joystick2_down ev_joystick2_button1 ' +
+ 'ev_joystick2_button2 ev_joystick2_button3 ev_joystick2_button4 ' +
+ 'ev_joystick2_button5 ev_joystick2_button6 ev_joystick2_button7 ' +
+ 'ev_joystick2_button8 ev_outside ev_boundary ev_game_start ' +
+ 'ev_game_end ev_room_start ev_room_end ev_no_more_lives ' +
+ 'ev_animation_end ev_end_of_path ev_no_more_health ev_close_button ' +
+ 'ev_user0 ev_user1 ev_user2 ev_user3 ev_user4 ev_user5 ev_user6 ' +
+ 'ev_user7 ev_user8 ev_user9 ev_user10 ev_user11 ev_user12 ev_user13 ' +
+ 'ev_user14 ev_user15 ev_step_normal ev_step_begin ev_step_end ev_gui ' +
+ 'ev_gui_begin ev_gui_end ev_cleanup ev_gesture ev_gesture_tap ' +
+ 'ev_gesture_double_tap ev_gesture_drag_start ev_gesture_dragging ' +
+ 'ev_gesture_drag_end ev_gesture_flick ev_gesture_pinch_start ' +
+ 'ev_gesture_pinch_in ev_gesture_pinch_out ev_gesture_pinch_end ' +
+ 'ev_gesture_rotate_start ev_gesture_rotating ev_gesture_rotate_end ' +
+ 'ev_global_gesture_tap ev_global_gesture_double_tap ' +
+ 'ev_global_gesture_drag_start ev_global_gesture_dragging ' +
+ 'ev_global_gesture_drag_end ev_global_gesture_flick ' +
+ 'ev_global_gesture_pinch_start ev_global_gesture_pinch_in ' +
+ 'ev_global_gesture_pinch_out ev_global_gesture_pinch_end ' +
+ 'ev_global_gesture_rotate_start ev_global_gesture_rotating ' +
+ 'ev_global_gesture_rotate_end vk_nokey vk_anykey vk_enter vk_return ' +
+ 'vk_shift vk_control vk_alt vk_escape vk_space vk_backspace vk_tab ' +
+ 'vk_pause vk_printscreen vk_left vk_right vk_up vk_down vk_home ' +
+ 'vk_end vk_delete vk_insert vk_pageup vk_pagedown vk_f1 vk_f2 vk_f3 ' +
+ 'vk_f4 vk_f5 vk_f6 vk_f7 vk_f8 vk_f9 vk_f10 vk_f11 vk_f12 vk_numpad0 ' +
+ 'vk_numpad1 vk_numpad2 vk_numpad3 vk_numpad4 vk_numpad5 vk_numpad6 ' +
+ 'vk_numpad7 vk_numpad8 vk_numpad9 vk_divide vk_multiply vk_subtract ' +
+ 'vk_add vk_decimal vk_lshift vk_lcontrol vk_lalt vk_rshift ' +
+ 'vk_rcontrol vk_ralt mb_any mb_none mb_left mb_right mb_middle ' +
+ 'c_aqua c_black c_blue c_dkgray c_fuchsia c_gray c_green c_lime ' +
+ 'c_ltgray c_maroon c_navy c_olive c_purple c_red c_silver c_teal ' +
+ 'c_white c_yellow c_orange fa_left fa_center fa_right fa_top ' +
+ 'fa_middle fa_bottom pr_pointlist pr_linelist pr_linestrip ' +
+ 'pr_trianglelist pr_trianglestrip pr_trianglefan bm_complex bm_normal ' +
+ 'bm_add bm_max bm_subtract bm_zero bm_one bm_src_colour ' +
+ 'bm_inv_src_colour bm_src_color bm_inv_src_color bm_src_alpha ' +
+ 'bm_inv_src_alpha bm_dest_alpha bm_inv_dest_alpha bm_dest_colour ' +
+ 'bm_inv_dest_colour bm_dest_color bm_inv_dest_color bm_src_alpha_sat ' +
+ 'tf_point tf_linear tf_anisotropic mip_off mip_on mip_markedonly ' +
+ 'audio_falloff_none audio_falloff_inverse_distance ' +
+ 'audio_falloff_inverse_distance_clamped audio_falloff_linear_distance ' +
+ 'audio_falloff_linear_distance_clamped ' +
+ 'audio_falloff_exponent_distance ' +
+ 'audio_falloff_exponent_distance_clamped audio_old_system ' +
+ 'audio_new_system audio_mono audio_stereo audio_3d cr_default cr_none ' +
+ 'cr_arrow cr_cross cr_beam cr_size_nesw cr_size_ns cr_size_nwse ' +
+ 'cr_size_we cr_uparrow cr_hourglass cr_drag cr_appstart cr_handpoint ' +
+ 'cr_size_all spritespeed_framespersecond ' +
+ 'spritespeed_framespergameframe asset_object asset_unknown ' +
+ 'asset_sprite asset_sound asset_room asset_path asset_script ' +
+ 'asset_font asset_timeline asset_tiles asset_shader fa_readonly ' +
+ 'fa_hidden fa_sysfile fa_volumeid fa_directory fa_archive ' +
+ 'ds_type_map ds_type_list ds_type_stack ds_type_queue ds_type_grid ' +
+ 'ds_type_priority ef_explosion ef_ring ef_ellipse ef_firework ' +
+ 'ef_smoke ef_smokeup ef_star ef_spark ef_flare ef_cloud ef_rain ' +
+ 'ef_snow pt_shape_pixel pt_shape_disk pt_shape_square pt_shape_line ' +
+ 'pt_shape_star pt_shape_circle pt_shape_ring pt_shape_sphere ' +
+ 'pt_shape_flare pt_shape_spark pt_shape_explosion pt_shape_cloud ' +
+ 'pt_shape_smoke pt_shape_snow ps_distr_linear ps_distr_gaussian ' +
+ 'ps_distr_invgaussian ps_shape_rectangle ps_shape_ellipse ' +
+ 'ps_shape_diamond ps_shape_line ty_real ty_string dll_cdecl ' +
+ 'dll_stdcall matrix_view matrix_projection matrix_world os_win32 ' +
+ 'os_windows os_macosx os_ios os_android os_symbian os_linux ' +
+ 'os_unknown os_winphone os_tizen os_win8native ' +
+ 'os_wiiu os_3ds os_psvita os_bb10 os_ps4 os_xboxone ' +
+ 'os_ps3 os_xbox360 os_uwp os_tvos os_switch ' +
+ 'browser_not_a_browser browser_unknown browser_ie browser_firefox ' +
+ 'browser_chrome browser_safari browser_safari_mobile browser_opera ' +
+ 'browser_tizen browser_edge browser_windows_store browser_ie_mobile ' +
+ 'device_ios_unknown device_ios_iphone device_ios_iphone_retina ' +
+ 'device_ios_ipad device_ios_ipad_retina device_ios_iphone5 ' +
+ 'device_ios_iphone6 device_ios_iphone6plus device_emulator ' +
+ 'device_tablet display_landscape display_landscape_flipped ' +
+ 'display_portrait display_portrait_flipped tm_sleep tm_countvsyncs ' +
+ 'of_challenge_win of_challen ge_lose of_challenge_tie ' +
+ 'leaderboard_type_number leaderboard_type_time_mins_secs ' +
+ 'cmpfunc_never cmpfunc_less cmpfunc_equal cmpfunc_lessequal ' +
+ 'cmpfunc_greater cmpfunc_notequal cmpfunc_greaterequal cmpfunc_always ' +
+ 'cull_noculling cull_clockwise cull_counterclockwise lighttype_dir ' +
+ 'lighttype_point iap_ev_storeload iap_ev_product iap_ev_purchase ' +
+ 'iap_ev_consume iap_ev_restore iap_storeload_ok iap_storeload_failed ' +
+ 'iap_status_uninitialised iap_status_unavailable iap_status_loading ' +
+ 'iap_status_available iap_status_processing iap_status_restoring ' +
+ 'iap_failed iap_unavailable iap_available iap_purchased iap_canceled ' +
+ 'iap_refunded fb_login_default fb_login_fallback_to_webview ' +
+ 'fb_login_no_fallback_to_webview fb_login_forcing_webview ' +
+ 'fb_login_use_system_account fb_login_forcing_safari ' +
+ 'phy_joint_anchor_1_x phy_joint_anchor_1_y phy_joint_anchor_2_x ' +
+ 'phy_joint_anchor_2_y phy_joint_reaction_force_x ' +
+ 'phy_joint_reaction_force_y phy_joint_reaction_torque ' +
+ 'phy_joint_motor_speed phy_joint_angle phy_joint_motor_torque ' +
+ 'phy_joint_max_motor_torque phy_joint_translation phy_joint_speed ' +
+ 'phy_joint_motor_force phy_joint_max_motor_force phy_joint_length_1 ' +
+ 'phy_joint_length_2 phy_joint_damping_ratio phy_joint_frequency ' +
+ 'phy_joint_lower_angle_limit phy_joint_upper_angle_limit ' +
+ 'phy_joint_angle_limits phy_joint_max_length phy_joint_max_torque ' +
+ 'phy_joint_max_force phy_debug_render_aabb ' +
+ 'phy_debug_render_collision_pairs phy_debug_render_coms ' +
+ 'phy_debug_render_core_shapes phy_debug_render_joints ' +
+ 'phy_debug_render_obb phy_debug_render_shapes ' +
+ 'phy_particle_flag_water phy_particle_flag_zombie ' +
+ 'phy_particle_flag_wall phy_particle_flag_spring ' +
+ 'phy_particle_flag_elastic phy_particle_flag_viscous ' +
+ 'phy_particle_flag_powder phy_particle_flag_tensile ' +
+ 'phy_particle_flag_colourmixing phy_particle_flag_colormixing ' +
+ 'phy_particle_group_flag_solid phy_particle_group_flag_rigid ' +
+ 'phy_particle_data_flag_typeflags phy_particle_data_flag_position ' +
+ 'phy_particle_data_flag_velocity phy_particle_data_flag_colour ' +
+ 'phy_particle_data_flag_color phy_particle_data_flag_category ' +
+ 'achievement_our_info achievement_friends_info ' +
+ 'achievement_leaderboard_info achievement_achievement_info ' +
+ 'achievement_filter_all_players achievement_filter_friends_only ' +
+ 'achievement_filter_favorites_only ' +
+ 'achievement_type_achievement_challenge ' +
+ 'achievement_type_score_challenge achievement_pic_loaded ' +
+ 'achievement_show_ui achievement_show_profile ' +
+ 'achievement_show_leaderboard achievement_show_achievement ' +
+ 'achievement_show_bank achievement_show_friend_picker ' +
+ 'achievement_show_purchase_prompt network_socket_tcp ' +
+ 'network_socket_udp network_socket_bluetooth network_type_connect ' +
+ 'network_type_disconnect network_type_data ' +
+ 'network_type_non_blocking_connect network_config_connect_timeout ' +
+ 'network_config_use_non_blocking_socket ' +
+ 'network_config_enable_reliable_udp ' +
+ 'network_config_disable_reliable_udp buffer_fixed buffer_grow ' +
+ 'buffer_wrap buffer_fast buffer_vbuffer buffer_network buffer_u8 ' +
+ 'buffer_s8 buffer_u16 buffer_s16 buffer_u32 buffer_s32 buffer_u64 ' +
+ 'buffer_f16 buffer_f32 buffer_f64 buffer_bool buffer_text ' +
+ 'buffer_string buffer_surface_copy buffer_seek_start ' +
+ 'buffer_seek_relative buffer_seek_end ' +
+ 'buffer_generalerror buffer_outofspace buffer_outofbounds ' +
+ 'buffer_invalidtype text_type button_type input_type ANSI_CHARSET ' +
+ 'DEFAULT_CHARSET EASTEUROPE_CHARSET RUSSIAN_CHARSET SYMBOL_CHARSET ' +
+ 'SHIFTJIS_CHARSET HANGEUL_CHARSET GB2312_CHARSET CHINESEBIG5_CHARSET ' +
+ 'JOHAB_CHARSET HEBREW_CHARSET ARABIC_CHARSET GREEK_CHARSET ' +
+ 'TURKISH_CHARSET VIETNAMESE_CHARSET THAI_CHARSET MAC_CHARSET ' +
+ 'BALTIC_CHARSET OEM_CHARSET gp_face1 gp_face2 gp_face3 gp_face4 ' +
+ 'gp_shoulderl gp_shoulderr gp_shoulderlb gp_shoulderrb gp_select ' +
+ 'gp_start gp_stickl gp_stickr gp_padu gp_padd gp_padl gp_padr ' +
+ 'gp_axislh gp_axislv gp_axisrh gp_axisrv ov_friends ov_community ' +
+ 'ov_players ov_settings ov_gamegroup ov_achievements lb_sort_none ' +
+ 'lb_sort_ascending lb_sort_descending lb_disp_none lb_disp_numeric ' +
+ 'lb_disp_time_sec lb_disp_time_ms ugc_result_success ' +
+ 'ugc_filetype_community ugc_filetype_microtrans ugc_visibility_public ' +
+ 'ugc_visibility_friends_only ugc_visibility_private ' +
+ 'ugc_query_RankedByVote ugc_query_RankedByPublicationDate ' +
+ 'ugc_query_AcceptedForGameRankedByAcceptanceDate ' +
+ 'ugc_query_RankedByTrend ' +
+ 'ugc_query_FavoritedByFriendsRankedByPublicationDate ' +
+ 'ugc_query_CreatedByFriendsRankedByPublicationDate ' +
+ 'ugc_query_RankedByNumTimesReported ' +
+ 'ugc_query_CreatedByFollowedUsersRankedByPublicationDate ' +
+ 'ugc_query_NotYetRated ugc_query_RankedByTotalVotesAsc ' +
+ 'ugc_query_RankedByVotesUp ugc_query_RankedByTextSearch ' +
+ 'ugc_sortorder_CreationOrderDesc ugc_sortorder_CreationOrderAsc ' +
+ 'ugc_sortorder_TitleAsc ugc_sortorder_LastUpdatedDesc ' +
+ 'ugc_sortorder_SubscriptionDateDesc ugc_sortorder_VoteScoreDesc ' +
+ 'ugc_sortorder_ForModeration ugc_list_Published ugc_list_VotedOn ' +
+ 'ugc_list_VotedUp ugc_list_VotedDown ugc_list_WillVoteLater ' +
+ 'ugc_list_Favorited ugc_list_Subscribed ugc_list_UsedOrPlayed ' +
+ 'ugc_list_Followed ugc_match_Items ugc_match_Items_Mtx ' +
+ 'ugc_match_Items_ReadyToUse ugc_match_Collections ugc_match_Artwork ' +
+ 'ugc_match_Videos ugc_match_Screenshots ugc_match_AllGuides ' +
+ 'ugc_match_WebGuides ugc_match_IntegratedGuides ' +
+ 'ugc_match_UsableInGame ugc_match_ControllerBindings ' +
+ 'vertex_usage_position vertex_usage_colour vertex_usage_color ' +
+ 'vertex_usage_normal vertex_usage_texcoord vertex_usage_textcoord ' +
+ 'vertex_usage_blendweight vertex_usage_blendindices ' +
+ 'vertex_usage_psize vertex_usage_tangent vertex_usage_binormal ' +
+ 'vertex_usage_fog vertex_usage_depth vertex_usage_sample ' +
+ 'vertex_type_float1 vertex_type_float2 vertex_type_float3 ' +
+ 'vertex_type_float4 vertex_type_colour vertex_type_color ' +
+ 'vertex_type_ubyte4 layerelementtype_undefined ' +
+ 'layerelementtype_background layerelementtype_instance ' +
+ 'layerelementtype_oldtilemap layerelementtype_sprite ' +
+ 'layerelementtype_tilemap layerelementtype_particlesystem ' +
+ 'layerelementtype_tile tile_rotate tile_flip tile_mirror ' +
+ 'tile_index_mask kbv_type_default kbv_type_ascii kbv_type_url ' +
+ 'kbv_type_email kbv_type_numbers kbv_type_phone kbv_type_phone_name ' +
+ 'kbv_returnkey_default kbv_returnkey_go kbv_returnkey_google ' +
+ 'kbv_returnkey_join kbv_returnkey_next kbv_returnkey_route ' +
+ 'kbv_returnkey_search kbv_returnkey_send kbv_returnkey_yahoo ' +
+ 'kbv_returnkey_done kbv_returnkey_continue kbv_returnkey_emergency ' +
+ 'kbv_autocapitalize_none kbv_autocapitalize_words ' +
+ 'kbv_autocapitalize_sentences kbv_autocapitalize_characters',
+ symbol: 'argument_relative argument argument0 argument1 argument2 ' +
+ 'argument3 argument4 argument5 argument6 argument7 argument8 ' +
+ 'argument9 argument10 argument11 argument12 argument13 argument14 ' +
+ 'argument15 argument_count x|0 y|0 xprevious yprevious xstart ystart ' +
+ 'hspeed vspeed direction speed friction gravity gravity_direction ' +
+ 'path_index path_position path_positionprevious path_speed ' +
+ 'path_scale path_orientation path_endaction object_index id solid ' +
+ 'persistent mask_index instance_count instance_id room_speed fps ' +
+ 'fps_real current_time current_year current_month current_day ' +
+ 'current_weekday current_hour current_minute current_second alarm ' +
+ 'timeline_index timeline_position timeline_speed timeline_running ' +
+ 'timeline_loop room room_first room_last room_width room_height ' +
+ 'room_caption room_persistent score lives health show_score ' +
+ 'show_lives show_health caption_score caption_lives caption_health ' +
+ 'event_type event_number event_object event_action ' +
+ 'application_surface gamemaker_pro gamemaker_registered ' +
+ 'gamemaker_version error_occurred error_last debug_mode ' +
+ 'keyboard_key keyboard_lastkey keyboard_lastchar keyboard_string ' +
+ 'mouse_x mouse_y mouse_button mouse_lastbutton cursor_sprite ' +
+ 'visible sprite_index sprite_width sprite_height sprite_xoffset ' +
+ 'sprite_yoffset image_number image_index image_speed depth ' +
+ 'image_xscale image_yscale image_angle image_alpha image_blend ' +
+ 'bbox_left bbox_right bbox_top bbox_bottom layer background_colour ' +
+ 'background_showcolour background_color background_showcolor ' +
+ 'view_enabled view_current view_visible view_xview view_yview ' +
+ 'view_wview view_hview view_xport view_yport view_wport view_hport ' +
+ 'view_angle view_hborder view_vborder view_hspeed view_vspeed ' +
+ 'view_object view_surface_id view_camera game_id game_display_name ' +
+ 'game_project_name game_save_id working_directory temp_directory ' +
+ 'program_directory browser_width browser_height os_type os_device ' +
+ 'os_browser os_version display_aa async_load delta_time ' +
+ 'webgl_enabled event_data iap_data phy_rotation phy_position_x ' +
+ 'phy_position_y phy_angular_velocity phy_linear_velocity_x ' +
+ 'phy_linear_velocity_y phy_speed_x phy_speed_y phy_speed ' +
+ 'phy_angular_damping phy_linear_damping phy_bullet ' +
+ 'phy_fixed_rotation phy_active phy_mass phy_inertia phy_com_x ' +
+ 'phy_com_y phy_dynamic phy_kinematic phy_sleeping ' +
+ 'phy_collision_points phy_collision_x phy_collision_y ' +
+ 'phy_col_normal_x phy_col_normal_y phy_position_xprevious ' +
+ 'phy_position_yprevious'
+ };
+
+ return {
+ name: 'GML',
+ case_insensitive: false, // language is case-insensitive
+ keywords: GML_KEYWORDS,
+
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE
+ ]
+ };
+}
+
+module.exports = gml;
+
+
+/***/ }),
+
+/***/ 46831:
+/***/ ((module) => {
+
+/*
+Language: Golo
+Author: Philippe Charriere
+Description: a lightweight dynamic language for the JVM
+Website: http://golo-lang.org/
+*/
+
+function golo(hljs) {
+ return {
+ name: 'Golo',
+ keywords: {
+ keyword:
+ 'println readln print import module function local return let var ' +
+ 'while for foreach times in case when match with break continue ' +
+ 'augment augmentation each find filter reduce ' +
+ 'if then else otherwise try catch finally raise throw orIfNull ' +
+ 'DynamicObject|10 DynamicVariable struct Observable map set vector list array',
+ literal:
+ 'true false null'
+ },
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'meta',
+ begin: '@[A-Za-z]+'
+ }
+ ]
+ };
+}
+
+module.exports = golo;
+
+
+/***/ }),
+
+/***/ 41787:
+/***/ ((module) => {
+
+/*
+Language: Gradle
+Description: Gradle is an open-source build automation tool focused on flexibility and performance.
+Website: https://gradle.org
+Author: Damian Mee
+*/
+
+function gradle(hljs) {
+ return {
+ name: 'Gradle',
+ case_insensitive: true,
+ keywords: {
+ keyword:
+ 'task project allprojects subprojects artifacts buildscript configurations ' +
+ 'dependencies repositories sourceSets description delete from into include ' +
+ 'exclude source classpath destinationDir includes options sourceCompatibility ' +
+ 'targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant ' +
+ 'def abstract break case catch continue default do else extends final finally ' +
+ 'for if implements instanceof native new private protected public return static ' +
+ 'switch synchronized throw throws transient try volatile while strictfp package ' +
+ 'import false null super this true antlrtask checkstyle codenarc copy boolean ' +
+ 'byte char class double float int interface long short void compile runTime ' +
+ 'file fileTree abs any append asList asWritable call collect compareTo count ' +
+ 'div dump each eachByte eachFile eachLine every find findAll flatten getAt ' +
+ 'getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods ' +
+ 'isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter ' +
+ 'newReader newWriter next plus pop power previous print println push putAt read ' +
+ 'readBytes readLines reverse reverseEach round size sort splitEachLine step subMap ' +
+ 'times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader ' +
+ 'withStream withWriter withWriterAppend write writeLine'
+ },
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.NUMBER_MODE,
+ hljs.REGEXP_MODE
+
+ ]
+ };
+}
+
+module.exports = gradle;
+
+
+/***/ }),
+
+/***/ 90458:
+/***/ ((module) => {
+
+/*
+Language: HAML
+Requires: ruby.js
+Author: Dan Allen
+Website: http://haml.info
+Category: template
+*/
+
+// TODO support filter tags like :javascript, support inline HTML
+function haml(hljs) {
+ return {
+ name: 'HAML',
+ case_insensitive: true,
+ contains: [
+ {
+ className: 'meta',
+ begin: '^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$',
+ relevance: 10
+ },
+ // FIXME these comments should be allowed to span indented lines
+ hljs.COMMENT(
+ '^\\s*(!=#|=#|-#|/).*$',
+ false,
+ {
+ relevance: 0
+ }
+ ),
+ {
+ begin: '^\\s*(-|=|!=)(?!#)',
+ starts: {
+ end: '\\n',
+ subLanguage: 'ruby'
+ }
+ },
+ {
+ className: 'tag',
+ begin: '^\\s*%',
+ contains: [
+ {
+ className: 'selector-tag',
+ begin: '\\w+'
+ },
+ {
+ className: 'selector-id',
+ begin: '#[\\w-]+'
+ },
+ {
+ className: 'selector-class',
+ begin: '\\.[\\w-]+'
+ },
+ {
+ begin: /\{\s*/,
+ end: /\s*\}/,
+ contains: [
+ {
+ begin: ':\\w+\\s*=>',
+ end: ',\\s+',
+ returnBegin: true,
+ endsWithParent: true,
+ contains: [
+ {
+ className: 'attr',
+ begin: ':\\w+'
+ },
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ {
+ begin: '\\w+',
+ relevance: 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ begin: '\\(\\s*',
+ end: '\\s*\\)',
+ excludeEnd: true,
+ contains: [
+ {
+ begin: '\\w+\\s*=',
+ end: '\\s+',
+ returnBegin: true,
+ endsWithParent: true,
+ contains: [
+ {
+ className: 'attr',
+ begin: '\\w+',
+ relevance: 0
+ },
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ {
+ begin: '\\w+',
+ relevance: 0
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ begin: '^\\s*[=~]\\s*'
+ },
+ {
+ begin: /#\{/,
+ starts: {
+ end: /\}/,
+ subLanguage: 'ruby'
+ }
+ }
+ ]
+ };
+}
+
+module.exports = haml;
+
+
+/***/ }),
+
+/***/ 77168:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function anyNumberOfTimes(re) {
+ return concat('(', re, ')*');
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function optional(re) {
+ return concat('(', re, ')?');
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/**
+ * Any of the passed expresssions may match
+ *
+ * Creates a huge this | this | that | that match
+ * @param {(RegExp | string)[] } args
+ * @returns {string}
+ */
+function either(...args) {
+ const joined = '(' + args.map((x) => source(x)).join("|") + ")";
+ return joined;
+}
+
+/*
+Language: Handlebars
+Requires: xml.js
+Author: Robin Ward
+Description: Matcher for Handlebars as well as EmberJS additions.
+Website: https://handlebarsjs.com
+Category: template
+*/
+
+function handlebars(hljs) {
+ const BUILT_INS = {
+ 'builtin-name': [
+ 'action',
+ 'bindattr',
+ 'collection',
+ 'component',
+ 'concat',
+ 'debugger',
+ 'each',
+ 'each-in',
+ 'get',
+ 'hash',
+ 'if',
+ 'in',
+ 'input',
+ 'link-to',
+ 'loc',
+ 'log',
+ 'lookup',
+ 'mut',
+ 'outlet',
+ 'partial',
+ 'query-params',
+ 'render',
+ 'template',
+ 'textarea',
+ 'unbound',
+ 'unless',
+ 'view',
+ 'with',
+ 'yield'
+ ]
+ };
+
+ const LITERALS = {
+ literal: [
+ 'true',
+ 'false',
+ 'undefined',
+ 'null'
+ ]
+ };
+
+ // as defined in https://handlebarsjs.com/guide/expressions.html#literal-segments
+ // this regex matches literal segments like ' abc ' or [ abc ] as well as helpers and paths
+ // like a/b, ./abc/cde, and abc.bcd
+
+ const DOUBLE_QUOTED_ID_REGEX = /""|"[^"]+"/;
+ const SINGLE_QUOTED_ID_REGEX = /''|'[^']+'/;
+ const BRACKET_QUOTED_ID_REGEX = /\[\]|\[[^\]]+\]/;
+ const PLAIN_ID_REGEX = /[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/;
+ const PATH_DELIMITER_REGEX = /(\.|\/)/;
+ const ANY_ID = either(
+ DOUBLE_QUOTED_ID_REGEX,
+ SINGLE_QUOTED_ID_REGEX,
+ BRACKET_QUOTED_ID_REGEX,
+ PLAIN_ID_REGEX
+ );
+
+ const IDENTIFIER_REGEX = concat(
+ optional(/\.|\.\/|\//), // relative or absolute path
+ ANY_ID,
+ anyNumberOfTimes(concat(
+ PATH_DELIMITER_REGEX,
+ ANY_ID
+ ))
+ );
+
+ // identifier followed by a equal-sign (without the equal sign)
+ const HASH_PARAM_REGEX = concat(
+ '(',
+ BRACKET_QUOTED_ID_REGEX, '|',
+ PLAIN_ID_REGEX,
+ ')(?==)'
+ );
+
+ const HELPER_NAME_OR_PATH_EXPRESSION = {
+ begin: IDENTIFIER_REGEX,
+ lexemes: /[\w.\/]+/
+ };
+
+ const HELPER_PARAMETER = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {
+ keywords: LITERALS
+ });
+
+ const SUB_EXPRESSION = {
+ begin: /\(/,
+ end: /\)/
+ // the "contains" is added below when all necessary sub-modes are defined
+ };
+
+ const HASH = {
+ // fka "attribute-assignment", parameters of the form 'key=value'
+ className: 'attr',
+ begin: HASH_PARAM_REGEX,
+ relevance: 0,
+ starts: {
+ begin: /=/,
+ end: /=/,
+ starts: {
+ contains: [
+ hljs.NUMBER_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ HELPER_PARAMETER,
+ SUB_EXPRESSION
+ ]
+ }
+ }
+ };
+
+ const BLOCK_PARAMS = {
+ // parameters of the form '{{#with x as | y |}}...{{/with}}'
+ begin: /as\s+\|/,
+ keywords: {
+ keyword: 'as'
+ },
+ end: /\|/,
+ contains: [
+ {
+ // define sub-mode in order to prevent highlighting of block-parameter named "as"
+ begin: /\w+/
+ }
+ ]
+ };
+
+ const HELPER_PARAMETERS = {
+ contains: [
+ hljs.NUMBER_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ BLOCK_PARAMS,
+ HASH,
+ HELPER_PARAMETER,
+ SUB_EXPRESSION
+ ],
+ returnEnd: true
+ // the property "end" is defined through inheritance when the mode is used. If depends
+ // on the surrounding mode, but "endsWithParent" does not work here (i.e. it includes the
+ // end-token of the surrounding mode)
+ };
+
+ const SUB_EXPRESSION_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {
+ className: 'name',
+ keywords: BUILT_INS,
+ starts: hljs.inherit(HELPER_PARAMETERS, {
+ end: /\)/
+ })
+ });
+
+ SUB_EXPRESSION.contains = [SUB_EXPRESSION_CONTENTS];
+
+ const OPENING_BLOCK_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {
+ keywords: BUILT_INS,
+ className: 'name',
+ starts: hljs.inherit(HELPER_PARAMETERS, {
+ end: /\}\}/
+ })
+ });
+
+ const CLOSING_BLOCK_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {
+ keywords: BUILT_INS,
+ className: 'name'
+ });
+
+ const BASIC_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {
+ className: 'name',
+ keywords: BUILT_INS,
+ starts: hljs.inherit(HELPER_PARAMETERS, {
+ end: /\}\}/
+ })
+ });
+
+ const ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH = {
+ begin: /\\\{\{/,
+ skip: true
+ };
+ const PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH = {
+ begin: /\\\\(?=\{\{)/,
+ skip: true
+ };
+
+ return {
+ name: 'Handlebars',
+ aliases: [
+ 'hbs',
+ 'html.hbs',
+ 'html.handlebars',
+ 'htmlbars'
+ ],
+ case_insensitive: true,
+ subLanguage: 'xml',
+ contains: [
+ ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH,
+ PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH,
+ hljs.COMMENT(/\{\{!--/, /--\}\}/),
+ hljs.COMMENT(/\{\{!/, /\}\}/),
+ {
+ // open raw block "{{{{raw}}}} content not evaluated {{{{/raw}}}}"
+ className: 'template-tag',
+ begin: /\{\{\{\{(?!\/)/,
+ end: /\}\}\}\}/,
+ contains: [OPENING_BLOCK_MUSTACHE_CONTENTS],
+ starts: {
+ end: /\{\{\{\{\//,
+ returnEnd: true,
+ subLanguage: 'xml'
+ }
+ },
+ {
+ // close raw block
+ className: 'template-tag',
+ begin: /\{\{\{\{\//,
+ end: /\}\}\}\}/,
+ contains: [CLOSING_BLOCK_MUSTACHE_CONTENTS]
+ },
+ {
+ // open block statement
+ className: 'template-tag',
+ begin: /\{\{#/,
+ end: /\}\}/,
+ contains: [OPENING_BLOCK_MUSTACHE_CONTENTS]
+ },
+ {
+ className: 'template-tag',
+ begin: /\{\{(?=else\}\})/,
+ end: /\}\}/,
+ keywords: 'else'
+ },
+ {
+ className: 'template-tag',
+ begin: /\{\{(?=else if)/,
+ end: /\}\}/,
+ keywords: 'else if'
+ },
+ {
+ // closing block statement
+ className: 'template-tag',
+ begin: /\{\{\//,
+ end: /\}\}/,
+ contains: [CLOSING_BLOCK_MUSTACHE_CONTENTS]
+ },
+ {
+ // template variable or helper-call that is NOT html-escaped
+ className: 'template-variable',
+ begin: /\{\{\{/,
+ end: /\}\}\}/,
+ contains: [BASIC_MUSTACHE_CONTENTS]
+ },
+ {
+ // template variable or helper-call that is html-escaped
+ className: 'template-variable',
+ begin: /\{\{/,
+ end: /\}\}/,
+ contains: [BASIC_MUSTACHE_CONTENTS]
+ }
+ ]
+ };
+}
+
+module.exports = handlebars;
+
+
+/***/ }),
+
+/***/ 84994:
+/***/ ((module) => {
+
+/*
+Language: Haskell
+Author: Jeremy Hull
+Contributors: Zena Treep
+Website: https://www.haskell.org
+Category: functional
+*/
+
+function haskell(hljs) {
+ const COMMENT = {
+ variants: [
+ hljs.COMMENT('--', '$'),
+ hljs.COMMENT(
+ /\{-/,
+ /-\}/,
+ {
+ contains: ['self']
+ }
+ )
+ ]
+ };
+
+ const PRAGMA = {
+ className: 'meta',
+ begin: /\{-#/,
+ end: /#-\}/
+ };
+
+ const PREPROCESSOR = {
+ className: 'meta',
+ begin: '^#',
+ end: '$'
+ };
+
+ const CONSTRUCTOR = {
+ className: 'type',
+ begin: '\\b[A-Z][\\w\']*', // TODO: other constructors (build-in, infix).
+ relevance: 0
+ };
+
+ const LIST = {
+ begin: '\\(',
+ end: '\\)',
+ illegal: '"',
+ contains: [
+ PRAGMA,
+ PREPROCESSOR,
+ {
+ className: 'type',
+ begin: '\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?'
+ },
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: '[_a-z][\\w\']*'
+ }),
+ COMMENT
+ ]
+ };
+
+ const RECORD = {
+ begin: /\{/,
+ end: /\}/,
+ contains: LIST.contains
+ };
+
+ return {
+ name: 'Haskell',
+ aliases: ['hs'],
+ keywords:
+ 'let in if then else case of where do module import hiding ' +
+ 'qualified type data newtype deriving class instance as default ' +
+ 'infix infixl infixr foreign export ccall stdcall cplusplus ' +
+ 'jvm dotnet safe unsafe family forall mdo proc rec',
+ contains: [
+ // Top-level constructions.
+ {
+ beginKeywords: 'module',
+ end: 'where',
+ keywords: 'module where',
+ contains: [
+ LIST,
+ COMMENT
+ ],
+ illegal: '\\W\\.|;'
+ },
+ {
+ begin: '\\bimport\\b',
+ end: '$',
+ keywords: 'import qualified as hiding',
+ contains: [
+ LIST,
+ COMMENT
+ ],
+ illegal: '\\W\\.|;'
+ },
+ {
+ className: 'class',
+ begin: '^(\\s*)?(class|instance)\\b',
+ end: 'where',
+ keywords: 'class family instance where',
+ contains: [
+ CONSTRUCTOR,
+ LIST,
+ COMMENT
+ ]
+ },
+ {
+ className: 'class',
+ begin: '\\b(data|(new)?type)\\b',
+ end: '$',
+ keywords: 'data family type newtype deriving',
+ contains: [
+ PRAGMA,
+ CONSTRUCTOR,
+ LIST,
+ RECORD,
+ COMMENT
+ ]
+ },
+ {
+ beginKeywords: 'default',
+ end: '$',
+ contains: [
+ CONSTRUCTOR,
+ LIST,
+ COMMENT
+ ]
+ },
+ {
+ beginKeywords: 'infix infixl infixr',
+ end: '$',
+ contains: [
+ hljs.C_NUMBER_MODE,
+ COMMENT
+ ]
+ },
+ {
+ begin: '\\bforeign\\b',
+ end: '$',
+ keywords: 'foreign import export ccall stdcall cplusplus jvm ' +
+ 'dotnet safe unsafe',
+ contains: [
+ CONSTRUCTOR,
+ hljs.QUOTE_STRING_MODE,
+ COMMENT
+ ]
+ },
+ {
+ className: 'meta',
+ begin: '#!\\/usr\\/bin\\/env\ runhaskell',
+ end: '$'
+ },
+ // "Whitespaces".
+ PRAGMA,
+ PREPROCESSOR,
+
+ // Literals and names.
+
+ // TODO: characters.
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE,
+ CONSTRUCTOR,
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: '^[_a-z][\\w\']*'
+ }),
+ COMMENT,
+ { // No markup, relevance booster
+ begin: '->|<-'
+ }
+ ]
+ };
+}
+
+module.exports = haskell;
+
+
+/***/ }),
+
+/***/ 50428:
+/***/ ((module) => {
+
+/*
+Language: Haxe
+Description: Haxe is an open source toolkit based on a modern, high level, strictly typed programming language.
+Author: Christopher Kaster (Based on the actionscript.js language file by Alexander Myadzel)
+Contributors: Kenton Hamaluik
+Website: https://haxe.org
+*/
+
+function haxe(hljs) {
+
+ const HAXE_BASIC_TYPES = 'Int Float String Bool Dynamic Void Array ';
+
+ return {
+ name: 'Haxe',
+ aliases: ['hx'],
+ keywords: {
+ keyword: 'break case cast catch continue default do dynamic else enum extern ' +
+ 'for function here if import in inline never new override package private get set ' +
+ 'public return static super switch this throw trace try typedef untyped using var while ' +
+ HAXE_BASIC_TYPES,
+ built_in:
+ 'trace this',
+ literal:
+ 'true false null _'
+ },
+ contains: [
+ {
+ className: 'string', // interpolate-able strings
+ begin: '\'',
+ end: '\'',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ {
+ className: 'subst', // interpolation
+ begin: '\\$\\{',
+ end: '\\}'
+ },
+ {
+ className: 'subst', // interpolation
+ begin: '\\$',
+ end: /\W\}/
+ }
+ ]
+ },
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'meta', // compiler meta
+ begin: '@:',
+ end: '$'
+ },
+ {
+ className: 'meta', // compiler conditionals
+ begin: '#',
+ end: '$',
+ keywords: {
+ 'meta-keyword': 'if else elseif end error'
+ }
+ },
+ {
+ className: 'type', // function types
+ begin: ':[ \t]*',
+ end: '[^A-Za-z0-9_ \t\\->]',
+ excludeBegin: true,
+ excludeEnd: true,
+ relevance: 0
+ },
+ {
+ className: 'type', // types
+ begin: ':[ \t]*',
+ end: '\\W',
+ excludeBegin: true,
+ excludeEnd: true
+ },
+ {
+ className: 'type', // instantiation
+ begin: 'new *',
+ end: '\\W',
+ excludeBegin: true,
+ excludeEnd: true
+ },
+ {
+ className: 'class', // enums
+ beginKeywords: 'enum',
+ end: '\\{',
+ contains: [hljs.TITLE_MODE]
+ },
+ {
+ className: 'class', // abstracts
+ beginKeywords: 'abstract',
+ end: '[\\{$]',
+ contains: [
+ {
+ className: 'type',
+ begin: '\\(',
+ end: '\\)',
+ excludeBegin: true,
+ excludeEnd: true
+ },
+ {
+ className: 'type',
+ begin: 'from +',
+ end: '\\W',
+ excludeBegin: true,
+ excludeEnd: true
+ },
+ {
+ className: 'type',
+ begin: 'to +',
+ end: '\\W',
+ excludeBegin: true,
+ excludeEnd: true
+ },
+ hljs.TITLE_MODE
+ ],
+ keywords: {
+ keyword: 'abstract from to'
+ }
+ },
+ {
+ className: 'class', // classes
+ begin: '\\b(class|interface) +',
+ end: '[\\{$]',
+ excludeEnd: true,
+ keywords: 'class interface',
+ contains: [
+ {
+ className: 'keyword',
+ begin: '\\b(extends|implements) +',
+ keywords: 'extends implements',
+ contains: [
+ {
+ className: 'type',
+ begin: hljs.IDENT_RE,
+ relevance: 0
+ }
+ ]
+ },
+ hljs.TITLE_MODE
+ ]
+ },
+ {
+ className: 'function',
+ beginKeywords: 'function',
+ end: '\\(',
+ excludeEnd: true,
+ illegal: '\\S',
+ contains: [hljs.TITLE_MODE]
+ }
+ ],
+ illegal: /<\//
+ };
+}
+
+module.exports = haxe;
+
+
+/***/ }),
+
+/***/ 99053:
+/***/ ((module) => {
+
+/*
+Language: HSP
+Author: prince
+Website: https://en.wikipedia.org/wiki/Hot_Soup_Processor
+Category: scripting
+*/
+
+function hsp(hljs) {
+ return {
+ name: 'HSP',
+ case_insensitive: true,
+ keywords: {
+ $pattern: /[\w._]+/,
+ keyword: 'goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop'
+ },
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+
+ {
+ // multi-line string
+ className: 'string',
+ begin: /\{"/,
+ end: /"\}/,
+ contains: [hljs.BACKSLASH_ESCAPE]
+ },
+
+ hljs.COMMENT(';', '$', {
+ relevance: 0
+ }),
+
+ {
+ // pre-processor
+ className: 'meta',
+ begin: '#',
+ end: '$',
+ keywords: {
+ 'meta-keyword': 'addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib'
+ },
+ contains: [
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ className: 'meta-string'
+ }),
+ hljs.NUMBER_MODE,
+ hljs.C_NUMBER_MODE,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ },
+
+ {
+ // label
+ className: 'symbol',
+ begin: '^\\*(\\w+|@)'
+ },
+
+ hljs.NUMBER_MODE,
+ hljs.C_NUMBER_MODE
+ ]
+ };
+}
+
+module.exports = hsp;
+
+
+/***/ }),
+
+/***/ 44683:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function anyNumberOfTimes(re) {
+ return concat('(', re, ')*');
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function optional(re) {
+ return concat('(', re, ')?');
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/**
+ * Any of the passed expresssions may match
+ *
+ * Creates a huge this | this | that | that match
+ * @param {(RegExp | string)[] } args
+ * @returns {string}
+ */
+function either(...args) {
+ const joined = '(' + args.map((x) => source(x)).join("|") + ")";
+ return joined;
+}
+
+/*
+Language: Handlebars
+Requires: xml.js
+Author: Robin Ward
+Description: Matcher for Handlebars as well as EmberJS additions.
+Website: https://handlebarsjs.com
+Category: template
+*/
+
+function handlebars(hljs) {
+ const BUILT_INS = {
+ 'builtin-name': [
+ 'action',
+ 'bindattr',
+ 'collection',
+ 'component',
+ 'concat',
+ 'debugger',
+ 'each',
+ 'each-in',
+ 'get',
+ 'hash',
+ 'if',
+ 'in',
+ 'input',
+ 'link-to',
+ 'loc',
+ 'log',
+ 'lookup',
+ 'mut',
+ 'outlet',
+ 'partial',
+ 'query-params',
+ 'render',
+ 'template',
+ 'textarea',
+ 'unbound',
+ 'unless',
+ 'view',
+ 'with',
+ 'yield'
+ ]
+ };
+
+ const LITERALS = {
+ literal: [
+ 'true',
+ 'false',
+ 'undefined',
+ 'null'
+ ]
+ };
+
+ // as defined in https://handlebarsjs.com/guide/expressions.html#literal-segments
+ // this regex matches literal segments like ' abc ' or [ abc ] as well as helpers and paths
+ // like a/b, ./abc/cde, and abc.bcd
+
+ const DOUBLE_QUOTED_ID_REGEX = /""|"[^"]+"/;
+ const SINGLE_QUOTED_ID_REGEX = /''|'[^']+'/;
+ const BRACKET_QUOTED_ID_REGEX = /\[\]|\[[^\]]+\]/;
+ const PLAIN_ID_REGEX = /[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/;
+ const PATH_DELIMITER_REGEX = /(\.|\/)/;
+ const ANY_ID = either(
+ DOUBLE_QUOTED_ID_REGEX,
+ SINGLE_QUOTED_ID_REGEX,
+ BRACKET_QUOTED_ID_REGEX,
+ PLAIN_ID_REGEX
+ );
+
+ const IDENTIFIER_REGEX = concat(
+ optional(/\.|\.\/|\//), // relative or absolute path
+ ANY_ID,
+ anyNumberOfTimes(concat(
+ PATH_DELIMITER_REGEX,
+ ANY_ID
+ ))
+ );
+
+ // identifier followed by a equal-sign (without the equal sign)
+ const HASH_PARAM_REGEX = concat(
+ '(',
+ BRACKET_QUOTED_ID_REGEX, '|',
+ PLAIN_ID_REGEX,
+ ')(?==)'
+ );
+
+ const HELPER_NAME_OR_PATH_EXPRESSION = {
+ begin: IDENTIFIER_REGEX,
+ lexemes: /[\w.\/]+/
+ };
+
+ const HELPER_PARAMETER = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {
+ keywords: LITERALS
+ });
+
+ const SUB_EXPRESSION = {
+ begin: /\(/,
+ end: /\)/
+ // the "contains" is added below when all necessary sub-modes are defined
+ };
+
+ const HASH = {
+ // fka "attribute-assignment", parameters of the form 'key=value'
+ className: 'attr',
+ begin: HASH_PARAM_REGEX,
+ relevance: 0,
+ starts: {
+ begin: /=/,
+ end: /=/,
+ starts: {
+ contains: [
+ hljs.NUMBER_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ HELPER_PARAMETER,
+ SUB_EXPRESSION
+ ]
+ }
+ }
+ };
+
+ const BLOCK_PARAMS = {
+ // parameters of the form '{{#with x as | y |}}...{{/with}}'
+ begin: /as\s+\|/,
+ keywords: {
+ keyword: 'as'
+ },
+ end: /\|/,
+ contains: [
+ {
+ // define sub-mode in order to prevent highlighting of block-parameter named "as"
+ begin: /\w+/
+ }
+ ]
+ };
+
+ const HELPER_PARAMETERS = {
+ contains: [
+ hljs.NUMBER_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ BLOCK_PARAMS,
+ HASH,
+ HELPER_PARAMETER,
+ SUB_EXPRESSION
+ ],
+ returnEnd: true
+ // the property "end" is defined through inheritance when the mode is used. If depends
+ // on the surrounding mode, but "endsWithParent" does not work here (i.e. it includes the
+ // end-token of the surrounding mode)
+ };
+
+ const SUB_EXPRESSION_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {
+ className: 'name',
+ keywords: BUILT_INS,
+ starts: hljs.inherit(HELPER_PARAMETERS, {
+ end: /\)/
+ })
+ });
+
+ SUB_EXPRESSION.contains = [SUB_EXPRESSION_CONTENTS];
+
+ const OPENING_BLOCK_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {
+ keywords: BUILT_INS,
+ className: 'name',
+ starts: hljs.inherit(HELPER_PARAMETERS, {
+ end: /\}\}/
+ })
+ });
+
+ const CLOSING_BLOCK_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {
+ keywords: BUILT_INS,
+ className: 'name'
+ });
+
+ const BASIC_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {
+ className: 'name',
+ keywords: BUILT_INS,
+ starts: hljs.inherit(HELPER_PARAMETERS, {
+ end: /\}\}/
+ })
+ });
+
+ const ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH = {
+ begin: /\\\{\{/,
+ skip: true
+ };
+ const PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH = {
+ begin: /\\\\(?=\{\{)/,
+ skip: true
+ };
+
+ return {
+ name: 'Handlebars',
+ aliases: [
+ 'hbs',
+ 'html.hbs',
+ 'html.handlebars',
+ 'htmlbars'
+ ],
+ case_insensitive: true,
+ subLanguage: 'xml',
+ contains: [
+ ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH,
+ PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH,
+ hljs.COMMENT(/\{\{!--/, /--\}\}/),
+ hljs.COMMENT(/\{\{!/, /\}\}/),
+ {
+ // open raw block "{{{{raw}}}} content not evaluated {{{{/raw}}}}"
+ className: 'template-tag',
+ begin: /\{\{\{\{(?!\/)/,
+ end: /\}\}\}\}/,
+ contains: [OPENING_BLOCK_MUSTACHE_CONTENTS],
+ starts: {
+ end: /\{\{\{\{\//,
+ returnEnd: true,
+ subLanguage: 'xml'
+ }
+ },
+ {
+ // close raw block
+ className: 'template-tag',
+ begin: /\{\{\{\{\//,
+ end: /\}\}\}\}/,
+ contains: [CLOSING_BLOCK_MUSTACHE_CONTENTS]
+ },
+ {
+ // open block statement
+ className: 'template-tag',
+ begin: /\{\{#/,
+ end: /\}\}/,
+ contains: [OPENING_BLOCK_MUSTACHE_CONTENTS]
+ },
+ {
+ className: 'template-tag',
+ begin: /\{\{(?=else\}\})/,
+ end: /\}\}/,
+ keywords: 'else'
+ },
+ {
+ className: 'template-tag',
+ begin: /\{\{(?=else if)/,
+ end: /\}\}/,
+ keywords: 'else if'
+ },
+ {
+ // closing block statement
+ className: 'template-tag',
+ begin: /\{\{\//,
+ end: /\}\}/,
+ contains: [CLOSING_BLOCK_MUSTACHE_CONTENTS]
+ },
+ {
+ // template variable or helper-call that is NOT html-escaped
+ className: 'template-variable',
+ begin: /\{\{\{/,
+ end: /\}\}\}/,
+ contains: [BASIC_MUSTACHE_CONTENTS]
+ },
+ {
+ // template variable or helper-call that is html-escaped
+ className: 'template-variable',
+ begin: /\{\{/,
+ end: /\}\}/,
+ contains: [BASIC_MUSTACHE_CONTENTS]
+ }
+ ]
+ };
+}
+
+/*
+ Language: HTMLBars (legacy)
+ Requires: xml.js
+ Description: Matcher for Handlebars as well as EmberJS additions.
+ Website: https://github.com/tildeio/htmlbars
+ Category: template
+ */
+
+function htmlbars(hljs) {
+ const definition = handlebars(hljs);
+
+ definition.name = "HTMLbars";
+
+ // HACK: This lets handlebars do the auto-detection if it's been loaded (by
+ // default the build script will load in alphabetical order) and if not (perhaps
+ // an install is only using `htmlbars`, not `handlebars`) then this will still
+ // allow HTMLBars to participate in the auto-detection
+
+ // worse case someone will have HTMLbars and handlebars competing for the same
+ // content and will need to change their setup to only require handlebars, but
+ // I don't consider this a breaking change
+ if (hljs.getLanguage("handlebars")) {
+ definition.disableAutodetect = true;
+ }
+
+ return definition;
+}
+
+module.exports = htmlbars;
+
+
+/***/ }),
+
+/***/ 66376:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: HTTP
+Description: HTTP request and response headers with automatic body highlighting
+Author: Ivan Sagalaev
+Category: common, protocols
+Website: https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview
+*/
+
+function http(hljs) {
+ const VERSION = 'HTTP/(2|1\\.[01])';
+ const HEADER_NAME = /[A-Za-z][A-Za-z0-9-]*/;
+ const HEADER = {
+ className: 'attribute',
+ begin: concat('^', HEADER_NAME, '(?=\\:\\s)'),
+ starts: {
+ contains: [
+ {
+ className: "punctuation",
+ begin: /: /,
+ relevance: 0,
+ starts: {
+ end: '$',
+ relevance: 0
+ }
+ }
+ ]
+ }
+ };
+ const HEADERS_AND_BODY = [
+ HEADER,
+ {
+ begin: '\\n\\n',
+ starts: { subLanguage: [], endsWithParent: true }
+ }
+ ];
+
+ return {
+ name: 'HTTP',
+ aliases: ['https'],
+ illegal: /\S/,
+ contains: [
+ // response
+ {
+ begin: '^(?=' + VERSION + " \\d{3})",
+ end: /$/,
+ contains: [
+ {
+ className: "meta",
+ begin: VERSION
+ },
+ {
+ className: 'number', begin: '\\b\\d{3}\\b'
+ }
+ ],
+ starts: {
+ end: /\b\B/,
+ illegal: /\S/,
+ contains: HEADERS_AND_BODY
+ }
+ },
+ // request
+ {
+ begin: '(?=^[A-Z]+ (.*?) ' + VERSION + '$)',
+ end: /$/,
+ contains: [
+ {
+ className: 'string',
+ begin: ' ',
+ end: ' ',
+ excludeBegin: true,
+ excludeEnd: true
+ },
+ {
+ className: "meta",
+ begin: VERSION
+ },
+ {
+ className: 'keyword',
+ begin: '[A-Z]+'
+ }
+ ],
+ starts: {
+ end: /\b\B/,
+ illegal: /\S/,
+ contains: HEADERS_AND_BODY
+ }
+ },
+ // to allow headers to work even without a preamble
+ hljs.inherit(HEADER, {
+ relevance: 0
+ })
+ ]
+ };
+}
+
+module.exports = http;
+
+
+/***/ }),
+
+/***/ 52327:
+/***/ ((module) => {
+
+/*
+Language: Hy
+Description: Hy is a wonderful dialect of Lisp that’s embedded in Python.
+Author: Sergey Sobko
+Website: http://docs.hylang.org/en/stable/
+Category: lisp
+*/
+
+function hy(hljs) {
+ var SYMBOLSTART = 'a-zA-Z_\\-!.?+*=<>\'';
+ var SYMBOL_RE = '[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:]*';
+ var keywords = {
+ $pattern: SYMBOL_RE,
+ 'builtin-name':
+ // keywords
+ '!= % %= & &= * ** **= *= *map ' +
+ '+ += , --build-class-- --import-- -= . / // //= ' +
+ '/= < << <<= <= = > >= >> >>= ' +
+ '@ @= ^ ^= abs accumulate all and any ap-compose ' +
+ 'ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ' +
+ 'ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast ' +
+ 'callable calling-module-name car case cdr chain chr coll? combinations compile ' +
+ 'compress cond cons cons? continue count curry cut cycle dec ' +
+ 'def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn ' +
+ 'defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir ' +
+ 'disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? ' +
+ 'end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first ' +
+ 'flatten float? fn fnc fnr for for* format fraction genexpr ' +
+ 'gensym get getattr global globals group-by hasattr hash hex id ' +
+ 'identity if if* if-not if-python2 import in inc input instance? ' +
+ 'integer integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even ' +
+ 'is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none ' +
+ 'is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass ' +
+ 'iter iterable? iterate iterator? keyword keyword? lambda last len let ' +
+ 'lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all ' +
+ 'map max merge-with method-decorator min multi-decorator multicombinations name neg? next ' +
+ 'none? nonlocal not not-in not? nth numeric? oct odd? open ' +
+ 'or ord partition permutations pos? post-route postwalk pow prewalk print ' +
+ 'product profile/calls profile/cpu put-route quasiquote quote raise range read read-str ' +
+ 'recursive-replace reduce remove repeat repeatedly repr require rest round route ' +
+ 'route-with-methods rwm second seq set-comp setattr setv some sorted string ' +
+ 'string? sum switch symbol? take take-nth take-while tee try unless ' +
+ 'unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms ' +
+ 'xi xor yield yield-from zero? zip zip-longest | |= ~'
+ };
+
+ var SIMPLE_NUMBER_RE = '[-+]?\\d+(\\.\\d+)?';
+
+ var SYMBOL = {
+ begin: SYMBOL_RE,
+ relevance: 0
+ };
+ var NUMBER = {
+ className: 'number', begin: SIMPLE_NUMBER_RE,
+ relevance: 0
+ };
+ var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null});
+ var COMMENT = hljs.COMMENT(
+ ';',
+ '$',
+ {
+ relevance: 0
+ }
+ );
+ var LITERAL = {
+ className: 'literal',
+ begin: /\b([Tt]rue|[Ff]alse|nil|None)\b/
+ };
+ var COLLECTION = {
+ begin: '[\\[\\{]', end: '[\\]\\}]'
+ };
+ var HINT = {
+ className: 'comment',
+ begin: '\\^' + SYMBOL_RE
+ };
+ var HINT_COL = hljs.COMMENT('\\^\\{', '\\}');
+ var KEY = {
+ className: 'symbol',
+ begin: '[:]{1,2}' + SYMBOL_RE
+ };
+ var LIST = {
+ begin: '\\(', end: '\\)'
+ };
+ var BODY = {
+ endsWithParent: true,
+ relevance: 0
+ };
+ var NAME = {
+ className: 'name',
+ relevance: 0,
+ keywords: keywords,
+ begin: SYMBOL_RE,
+ starts: BODY
+ };
+ var DEFAULT_CONTAINS = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL, SYMBOL];
+
+ LIST.contains = [hljs.COMMENT('comment', ''), NAME, BODY];
+ BODY.contains = DEFAULT_CONTAINS;
+ COLLECTION.contains = DEFAULT_CONTAINS;
+
+ return {
+ name: 'Hy',
+ aliases: ['hylang'],
+ illegal: /\S/,
+ contains: [hljs.SHEBANG(), LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL]
+ };
+}
+
+module.exports = hy;
+
+
+/***/ }),
+
+/***/ 89928:
+/***/ ((module) => {
+
+/*
+Language: Inform 7
+Author: Bruno Dias
+Description: Language definition for Inform 7, a DSL for writing parser interactive fiction.
+Website: http://inform7.com
+*/
+
+function inform7(hljs) {
+ const START_BRACKET = '\\[';
+ const END_BRACKET = '\\]';
+ return {
+ name: 'Inform 7',
+ aliases: ['i7'],
+ case_insensitive: true,
+ keywords: {
+ // Some keywords more or less unique to I7, for relevance.
+ keyword:
+ // kind:
+ 'thing room person man woman animal container ' +
+ 'supporter backdrop door ' +
+ // characteristic:
+ 'scenery open closed locked inside gender ' +
+ // verb:
+ 'is are say understand ' +
+ // misc keyword:
+ 'kind of rule'
+ },
+ contains: [
+ {
+ className: 'string',
+ begin: '"',
+ end: '"',
+ relevance: 0,
+ contains: [
+ {
+ className: 'subst',
+ begin: START_BRACKET,
+ end: END_BRACKET
+ }
+ ]
+ },
+ {
+ className: 'section',
+ begin: /^(Volume|Book|Part|Chapter|Section|Table)\b/,
+ end: '$'
+ },
+ {
+ // Rule definition
+ // This is here for relevance.
+ begin: /^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,
+ end: ':',
+ contains: [
+ {
+ // Rule name
+ begin: '\\(This',
+ end: '\\)'
+ }
+ ]
+ },
+ {
+ className: 'comment',
+ begin: START_BRACKET,
+ end: END_BRACKET,
+ contains: ['self']
+ }
+ ]
+ };
+}
+
+module.exports = inform7;
+
+
+/***/ }),
+
+/***/ 35856:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function lookahead(re) {
+ return concat('(?=', re, ')');
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/**
+ * Any of the passed expresssions may match
+ *
+ * Creates a huge this | this | that | that match
+ * @param {(RegExp | string)[] } args
+ * @returns {string}
+ */
+function either(...args) {
+ const joined = '(' + args.map((x) => source(x)).join("|") + ")";
+ return joined;
+}
+
+/*
+Language: TOML, also INI
+Description: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics.
+Contributors: Guillaume Gomez
+Category: common, config
+Website: https://github.com/toml-lang/toml
+*/
+
+function ini(hljs) {
+ const NUMBERS = {
+ className: 'number',
+ relevance: 0,
+ variants: [
+ {
+ begin: /([+-]+)?[\d]+_[\d_]+/
+ },
+ {
+ begin: hljs.NUMBER_RE
+ }
+ ]
+ };
+ const COMMENTS = hljs.COMMENT();
+ COMMENTS.variants = [
+ {
+ begin: /;/,
+ end: /$/
+ },
+ {
+ begin: /#/,
+ end: /$/
+ }
+ ];
+ const VARIABLES = {
+ className: 'variable',
+ variants: [
+ {
+ begin: /\$[\w\d"][\w\d_]*/
+ },
+ {
+ begin: /\$\{(.*?)\}/
+ }
+ ]
+ };
+ const LITERALS = {
+ className: 'literal',
+ begin: /\bon|off|true|false|yes|no\b/
+ };
+ const STRINGS = {
+ className: "string",
+ contains: [hljs.BACKSLASH_ESCAPE],
+ variants: [
+ {
+ begin: "'''",
+ end: "'''",
+ relevance: 10
+ },
+ {
+ begin: '"""',
+ end: '"""',
+ relevance: 10
+ },
+ {
+ begin: '"',
+ end: '"'
+ },
+ {
+ begin: "'",
+ end: "'"
+ }
+ ]
+ };
+ const ARRAY = {
+ begin: /\[/,
+ end: /\]/,
+ contains: [
+ COMMENTS,
+ LITERALS,
+ VARIABLES,
+ STRINGS,
+ NUMBERS,
+ 'self'
+ ],
+ relevance: 0
+ };
+
+ const BARE_KEY = /[A-Za-z0-9_-]+/;
+ const QUOTED_KEY_DOUBLE_QUOTE = /"(\\"|[^"])*"/;
+ const QUOTED_KEY_SINGLE_QUOTE = /'[^']*'/;
+ const ANY_KEY = either(
+ BARE_KEY, QUOTED_KEY_DOUBLE_QUOTE, QUOTED_KEY_SINGLE_QUOTE
+ );
+ const DOTTED_KEY = concat(
+ ANY_KEY, '(\\s*\\.\\s*', ANY_KEY, ')*',
+ lookahead(/\s*=\s*[^#\s]/)
+ );
+
+ return {
+ name: 'TOML, also INI',
+ aliases: ['toml'],
+ case_insensitive: true,
+ illegal: /\S/,
+ contains: [
+ COMMENTS,
+ {
+ className: 'section',
+ begin: /\[+/,
+ end: /\]+/
+ },
+ {
+ begin: DOTTED_KEY,
+ className: 'attr',
+ starts: {
+ end: /$/,
+ contains: [
+ COMMENTS,
+ ARRAY,
+ LITERALS,
+ VARIABLES,
+ STRINGS,
+ NUMBERS
+ ]
+ }
+ }
+ ]
+ };
+}
+
+module.exports = ini;
+
+
+/***/ }),
+
+/***/ 42084:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: IRPF90
+Author: Anthony Scemama
+Description: IRPF90 is an open-source Fortran code generator
+Website: http://irpf90.ups-tlse.fr
+Category: scientific
+*/
+
+/** @type LanguageFn */
+function irpf90(hljs) {
+ const PARAMS = {
+ className: 'params',
+ begin: '\\(',
+ end: '\\)'
+ };
+
+ // regex in both fortran and irpf90 should match
+ const OPTIONAL_NUMBER_SUFFIX = /(_[a-z_\d]+)?/;
+ const OPTIONAL_NUMBER_EXP = /([de][+-]?\d+)?/;
+ const NUMBER = {
+ className: 'number',
+ variants: [
+ {
+ begin: concat(/\b\d+/, /\.(\d*)/, OPTIONAL_NUMBER_EXP, OPTIONAL_NUMBER_SUFFIX)
+ },
+ {
+ begin: concat(/\b\d+/, OPTIONAL_NUMBER_EXP, OPTIONAL_NUMBER_SUFFIX)
+ },
+ {
+ begin: concat(/\.\d+/, OPTIONAL_NUMBER_EXP, OPTIONAL_NUMBER_SUFFIX)
+ }
+ ],
+ relevance: 0
+ };
+
+ const F_KEYWORDS = {
+ literal: '.False. .True.',
+ keyword: 'kind do while private call intrinsic where elsewhere ' +
+ 'type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then ' +
+ 'public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. ' +
+ 'goto save else use module select case ' +
+ 'access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit ' +
+ 'continue format pause cycle exit ' +
+ 'c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg ' +
+ 'synchronous nopass non_overridable pass protected volatile abstract extends import ' +
+ 'non_intrinsic value deferred generic final enumerator class associate bind enum ' +
+ 'c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t ' +
+ 'c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double ' +
+ 'c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr ' +
+ 'c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer ' +
+ 'c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor ' +
+ 'numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ' +
+ 'ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive ' +
+ 'pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure ' +
+ 'integer real character complex logical dimension allocatable|10 parameter ' +
+ 'external implicit|10 none double precision assign intent optional pointer ' +
+ 'target in out common equivalence data ' +
+ // IRPF90 special keywords
+ 'begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch ' +
+ 'soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read',
+ built_in: 'alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint ' +
+ 'dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl ' +
+ 'algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama ' +
+ 'iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod ' +
+ 'qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log ' +
+ 'log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate ' +
+ 'adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product ' +
+ 'eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul ' +
+ 'maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product ' +
+ 'radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind ' +
+ 'set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer ' +
+ 'dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ' +
+ 'ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode ' +
+ 'is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of ' +
+ 'acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 ' +
+ 'atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits ' +
+ 'bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr ' +
+ 'num_images parity popcnt poppar shifta shiftl shiftr this_image ' +
+ // IRPF90 special built_ins
+ 'IRP_ALIGN irp_here'
+ };
+ return {
+ name: 'IRPF90',
+ case_insensitive: true,
+ keywords: F_KEYWORDS,
+ illegal: /\/\*/,
+ contains: [
+ hljs.inherit(hljs.APOS_STRING_MODE, {
+ className: 'string',
+ relevance: 0
+ }),
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ className: 'string',
+ relevance: 0
+ }),
+ {
+ className: 'function',
+ beginKeywords: 'subroutine function program',
+ illegal: '[${=\\n]',
+ contains: [
+ hljs.UNDERSCORE_TITLE_MODE,
+ PARAMS
+ ]
+ },
+ hljs.COMMENT('!', '$', {
+ relevance: 0
+ }),
+ hljs.COMMENT('begin_doc', 'end_doc', {
+ relevance: 10
+ }),
+ NUMBER
+ ]
+ };
+}
+
+module.exports = irpf90;
+
+
+/***/ }),
+
+/***/ 73162:
+/***/ ((module) => {
+
+/*
+Language: ISBL
+Author: Dmitriy Tarasov
+Description: built-in language DIRECTUM
+Category: enterprise
+*/
+
+function isbl(hljs) {
+ // Определение идентификаторов
+ const UNDERSCORE_IDENT_RE = "[A-Za-zА-Яа-яёЁ_!][A-Za-zА-Яа-яёЁ_0-9]*";
+
+ // Определение имен функций
+ const FUNCTION_NAME_IDENT_RE = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]*";
+
+ // keyword : ключевые слова
+ const KEYWORD =
+ "and и else иначе endexcept endfinally endforeach конецвсе endif конецесли endwhile конецпока " +
+ "except exitfor finally foreach все if если in в not не or или try while пока ";
+
+ // SYSRES Constants
+ const sysres_constants =
+ "SYSRES_CONST_ACCES_RIGHT_TYPE_EDIT " +
+ "SYSRES_CONST_ACCES_RIGHT_TYPE_FULL " +
+ "SYSRES_CONST_ACCES_RIGHT_TYPE_VIEW " +
+ "SYSRES_CONST_ACCESS_MODE_REQUISITE_CODE " +
+ "SYSRES_CONST_ACCESS_NO_ACCESS_VIEW " +
+ "SYSRES_CONST_ACCESS_NO_ACCESS_VIEW_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_YES_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_YES_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_YES_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_YES_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_YES_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_YES_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_REQUISITE_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_VIEW " +
+ "SYSRES_CONST_ACCESS_RIGHTS_VIEW_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_CODE " +
+ "SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_YES_CODE " +
+ "SYSRES_CONST_ACCESS_TYPE_CHANGE " +
+ "SYSRES_CONST_ACCESS_TYPE_CHANGE_CODE " +
+ "SYSRES_CONST_ACCESS_TYPE_EXISTS " +
+ "SYSRES_CONST_ACCESS_TYPE_EXISTS_CODE " +
+ "SYSRES_CONST_ACCESS_TYPE_FULL " +
+ "SYSRES_CONST_ACCESS_TYPE_FULL_CODE " +
+ "SYSRES_CONST_ACCESS_TYPE_VIEW " +
+ "SYSRES_CONST_ACCESS_TYPE_VIEW_CODE " +
+ "SYSRES_CONST_ACTION_TYPE_ABORT " +
+ "SYSRES_CONST_ACTION_TYPE_ACCEPT " +
+ "SYSRES_CONST_ACTION_TYPE_ACCESS_RIGHTS " +
+ "SYSRES_CONST_ACTION_TYPE_ADD_ATTACHMENT " +
+ "SYSRES_CONST_ACTION_TYPE_CHANGE_CARD " +
+ "SYSRES_CONST_ACTION_TYPE_CHANGE_KIND " +
+ "SYSRES_CONST_ACTION_TYPE_CHANGE_STORAGE " +
+ "SYSRES_CONST_ACTION_TYPE_CONTINUE " +
+ "SYSRES_CONST_ACTION_TYPE_COPY " +
+ "SYSRES_CONST_ACTION_TYPE_CREATE " +
+ "SYSRES_CONST_ACTION_TYPE_CREATE_VERSION " +
+ "SYSRES_CONST_ACTION_TYPE_DELETE " +
+ "SYSRES_CONST_ACTION_TYPE_DELETE_ATTACHMENT " +
+ "SYSRES_CONST_ACTION_TYPE_DELETE_VERSION " +
+ "SYSRES_CONST_ACTION_TYPE_DISABLE_DELEGATE_ACCESS_RIGHTS " +
+ "SYSRES_CONST_ACTION_TYPE_ENABLE_DELEGATE_ACCESS_RIGHTS " +
+ "SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE " +
+ "SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE_AND_PASSWORD " +
+ "SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_PASSWORD " +
+ "SYSRES_CONST_ACTION_TYPE_EXPORT_WITH_LOCK " +
+ "SYSRES_CONST_ACTION_TYPE_EXPORT_WITHOUT_LOCK " +
+ "SYSRES_CONST_ACTION_TYPE_IMPORT_WITH_UNLOCK " +
+ "SYSRES_CONST_ACTION_TYPE_IMPORT_WITHOUT_UNLOCK " +
+ "SYSRES_CONST_ACTION_TYPE_LIFE_CYCLE_STAGE " +
+ "SYSRES_CONST_ACTION_TYPE_LOCK " +
+ "SYSRES_CONST_ACTION_TYPE_LOCK_FOR_SERVER " +
+ "SYSRES_CONST_ACTION_TYPE_LOCK_MODIFY " +
+ "SYSRES_CONST_ACTION_TYPE_MARK_AS_READED " +
+ "SYSRES_CONST_ACTION_TYPE_MARK_AS_UNREADED " +
+ "SYSRES_CONST_ACTION_TYPE_MODIFY " +
+ "SYSRES_CONST_ACTION_TYPE_MODIFY_CARD " +
+ "SYSRES_CONST_ACTION_TYPE_MOVE_TO_ARCHIVE " +
+ "SYSRES_CONST_ACTION_TYPE_OFF_ENCRYPTION " +
+ "SYSRES_CONST_ACTION_TYPE_PASSWORD_CHANGE " +
+ "SYSRES_CONST_ACTION_TYPE_PERFORM " +
+ "SYSRES_CONST_ACTION_TYPE_RECOVER_FROM_LOCAL_COPY " +
+ "SYSRES_CONST_ACTION_TYPE_RESTART " +
+ "SYSRES_CONST_ACTION_TYPE_RESTORE_FROM_ARCHIVE " +
+ "SYSRES_CONST_ACTION_TYPE_REVISION " +
+ "SYSRES_CONST_ACTION_TYPE_SEND_BY_MAIL " +
+ "SYSRES_CONST_ACTION_TYPE_SIGN " +
+ "SYSRES_CONST_ACTION_TYPE_START " +
+ "SYSRES_CONST_ACTION_TYPE_UNLOCK " +
+ "SYSRES_CONST_ACTION_TYPE_UNLOCK_FROM_SERVER " +
+ "SYSRES_CONST_ACTION_TYPE_VERSION_STATE " +
+ "SYSRES_CONST_ACTION_TYPE_VERSION_VISIBILITY " +
+ "SYSRES_CONST_ACTION_TYPE_VIEW " +
+ "SYSRES_CONST_ACTION_TYPE_VIEW_SHADOW_COPY " +
+ "SYSRES_CONST_ACTION_TYPE_WORKFLOW_DESCRIPTION_MODIFY " +
+ "SYSRES_CONST_ACTION_TYPE_WRITE_HISTORY " +
+ "SYSRES_CONST_ACTIVE_VERSION_STATE_PICK_VALUE " +
+ "SYSRES_CONST_ADD_REFERENCE_MODE_NAME " +
+ "SYSRES_CONST_ADDITION_REQUISITE_CODE " +
+ "SYSRES_CONST_ADDITIONAL_PARAMS_REQUISITE_CODE " +
+ "SYSRES_CONST_ADITIONAL_JOB_END_DATE_REQUISITE_NAME " +
+ "SYSRES_CONST_ADITIONAL_JOB_READ_REQUISITE_NAME " +
+ "SYSRES_CONST_ADITIONAL_JOB_START_DATE_REQUISITE_NAME " +
+ "SYSRES_CONST_ADITIONAL_JOB_STATE_REQUISITE_NAME " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION_CODE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE " +
+ "SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE_ACTION " +
+ "SYSRES_CONST_ALL_ACCEPT_CONDITION_RUS " +
+ "SYSRES_CONST_ALL_USERS_GROUP " +
+ "SYSRES_CONST_ALL_USERS_GROUP_NAME " +
+ "SYSRES_CONST_ALL_USERS_SERVER_GROUP_NAME " +
+ "SYSRES_CONST_ALLOWED_ACCESS_TYPE_CODE " +
+ "SYSRES_CONST_ALLOWED_ACCESS_TYPE_NAME " +
+ "SYSRES_CONST_APP_VIEWER_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_APPROVING_SIGNATURE_NAME " +
+ "SYSRES_CONST_APPROVING_SIGNATURE_REQUISITE_CODE " +
+ "SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE " +
+ "SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE_CODE " +
+ "SYSRES_CONST_ATTACH_TYPE_COMPONENT_TOKEN " +
+ "SYSRES_CONST_ATTACH_TYPE_DOC " +
+ "SYSRES_CONST_ATTACH_TYPE_EDOC " +
+ "SYSRES_CONST_ATTACH_TYPE_FOLDER " +
+ "SYSRES_CONST_ATTACH_TYPE_JOB " +
+ "SYSRES_CONST_ATTACH_TYPE_REFERENCE " +
+ "SYSRES_CONST_ATTACH_TYPE_TASK " +
+ "SYSRES_CONST_AUTH_ENCODED_PASSWORD " +
+ "SYSRES_CONST_AUTH_ENCODED_PASSWORD_CODE " +
+ "SYSRES_CONST_AUTH_NOVELL " +
+ "SYSRES_CONST_AUTH_PASSWORD " +
+ "SYSRES_CONST_AUTH_PASSWORD_CODE " +
+ "SYSRES_CONST_AUTH_WINDOWS " +
+ "SYSRES_CONST_AUTHENTICATING_SIGNATURE_NAME " +
+ "SYSRES_CONST_AUTHENTICATING_SIGNATURE_REQUISITE_CODE " +
+ "SYSRES_CONST_AUTO_ENUM_METHOD_FLAG " +
+ "SYSRES_CONST_AUTO_NUMERATION_CODE " +
+ "SYSRES_CONST_AUTO_STRONG_ENUM_METHOD_FLAG " +
+ "SYSRES_CONST_AUTOTEXT_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_AUTOTEXT_TEXT_REQUISITE_CODE " +
+ "SYSRES_CONST_AUTOTEXT_USAGE_ALL " +
+ "SYSRES_CONST_AUTOTEXT_USAGE_ALL_CODE " +
+ "SYSRES_CONST_AUTOTEXT_USAGE_SIGN " +
+ "SYSRES_CONST_AUTOTEXT_USAGE_SIGN_CODE " +
+ "SYSRES_CONST_AUTOTEXT_USAGE_WORK " +
+ "SYSRES_CONST_AUTOTEXT_USAGE_WORK_CODE " +
+ "SYSRES_CONST_AUTOTEXT_USE_ANYWHERE_CODE " +
+ "SYSRES_CONST_AUTOTEXT_USE_ON_SIGNING_CODE " +
+ "SYSRES_CONST_AUTOTEXT_USE_ON_WORK_CODE " +
+ "SYSRES_CONST_BEGIN_DATE_REQUISITE_CODE " +
+ "SYSRES_CONST_BLACK_LIFE_CYCLE_STAGE_FONT_COLOR " +
+ "SYSRES_CONST_BLUE_LIFE_CYCLE_STAGE_FONT_COLOR " +
+ "SYSRES_CONST_BTN_PART " +
+ "SYSRES_CONST_CALCULATED_ROLE_TYPE_CODE " +
+ "SYSRES_CONST_CALL_TYPE_VARIABLE_BUTTON_VALUE " +
+ "SYSRES_CONST_CALL_TYPE_VARIABLE_PROGRAM_VALUE " +
+ "SYSRES_CONST_CANCEL_MESSAGE_FUNCTION_RESULT " +
+ "SYSRES_CONST_CARD_PART " +
+ "SYSRES_CONST_CARD_REFERENCE_MODE_NAME " +
+ "SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_ENCRYPT_VALUE " +
+ "SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_AND_ENCRYPT_VALUE " +
+ "SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_VALUE " +
+ "SYSRES_CONST_CHECK_PARAM_VALUE_DATE_PARAM_TYPE " +
+ "SYSRES_CONST_CHECK_PARAM_VALUE_FLOAT_PARAM_TYPE " +
+ "SYSRES_CONST_CHECK_PARAM_VALUE_INTEGER_PARAM_TYPE " +
+ "SYSRES_CONST_CHECK_PARAM_VALUE_PICK_PARAM_TYPE " +
+ "SYSRES_CONST_CHECK_PARAM_VALUE_REEFRENCE_PARAM_TYPE " +
+ "SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_FEMININE " +
+ "SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_MASCULINE " +
+ "SYSRES_CONST_CODE_COMPONENT_TYPE_ADMIN " +
+ "SYSRES_CONST_CODE_COMPONENT_TYPE_DEVELOPER " +
+ "SYSRES_CONST_CODE_COMPONENT_TYPE_DOCS " +
+ "SYSRES_CONST_CODE_COMPONENT_TYPE_EDOC_CARDS " +
+ "SYSRES_CONST_CODE_COMPONENT_TYPE_EXTERNAL_EXECUTABLE " +
+ "SYSRES_CONST_CODE_COMPONENT_TYPE_OTHER " +
+ "SYSRES_CONST_CODE_COMPONENT_TYPE_REFERENCE " +
+ "SYSRES_CONST_CODE_COMPONENT_TYPE_REPORT " +
+ "SYSRES_CONST_CODE_COMPONENT_TYPE_SCRIPT " +
+ "SYSRES_CONST_CODE_COMPONENT_TYPE_URL " +
+ "SYSRES_CONST_CODE_REQUISITE_ACCESS " +
+ "SYSRES_CONST_CODE_REQUISITE_CODE " +
+ "SYSRES_CONST_CODE_REQUISITE_COMPONENT " +
+ "SYSRES_CONST_CODE_REQUISITE_DESCRIPTION " +
+ "SYSRES_CONST_CODE_REQUISITE_EXCLUDE_COMPONENT " +
+ "SYSRES_CONST_CODE_REQUISITE_RECORD " +
+ "SYSRES_CONST_COMMENT_REQ_CODE " +
+ "SYSRES_CONST_COMMON_SETTINGS_REQUISITE_CODE " +
+ "SYSRES_CONST_COMP_CODE_GRD " +
+ "SYSRES_CONST_COMPONENT_GROUP_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_COMPONENT_TYPE_ADMIN_COMPONENTS " +
+ "SYSRES_CONST_COMPONENT_TYPE_DEVELOPER_COMPONENTS " +
+ "SYSRES_CONST_COMPONENT_TYPE_DOCS " +
+ "SYSRES_CONST_COMPONENT_TYPE_EDOC_CARDS " +
+ "SYSRES_CONST_COMPONENT_TYPE_EDOCS " +
+ "SYSRES_CONST_COMPONENT_TYPE_EXTERNAL_EXECUTABLE " +
+ "SYSRES_CONST_COMPONENT_TYPE_OTHER " +
+ "SYSRES_CONST_COMPONENT_TYPE_REFERENCE_TYPES " +
+ "SYSRES_CONST_COMPONENT_TYPE_REFERENCES " +
+ "SYSRES_CONST_COMPONENT_TYPE_REPORTS " +
+ "SYSRES_CONST_COMPONENT_TYPE_SCRIPTS " +
+ "SYSRES_CONST_COMPONENT_TYPE_URL " +
+ "SYSRES_CONST_COMPONENTS_REMOTE_SERVERS_VIEW_CODE " +
+ "SYSRES_CONST_CONDITION_BLOCK_DESCRIPTION " +
+ "SYSRES_CONST_CONST_FIRM_STATUS_COMMON " +
+ "SYSRES_CONST_CONST_FIRM_STATUS_INDIVIDUAL " +
+ "SYSRES_CONST_CONST_NEGATIVE_VALUE " +
+ "SYSRES_CONST_CONST_POSITIVE_VALUE " +
+ "SYSRES_CONST_CONST_SERVER_STATUS_DONT_REPLICATE " +
+ "SYSRES_CONST_CONST_SERVER_STATUS_REPLICATE " +
+ "SYSRES_CONST_CONTENTS_REQUISITE_CODE " +
+ "SYSRES_CONST_DATA_TYPE_BOOLEAN " +
+ "SYSRES_CONST_DATA_TYPE_DATE " +
+ "SYSRES_CONST_DATA_TYPE_FLOAT " +
+ "SYSRES_CONST_DATA_TYPE_INTEGER " +
+ "SYSRES_CONST_DATA_TYPE_PICK " +
+ "SYSRES_CONST_DATA_TYPE_REFERENCE " +
+ "SYSRES_CONST_DATA_TYPE_STRING " +
+ "SYSRES_CONST_DATA_TYPE_TEXT " +
+ "SYSRES_CONST_DATA_TYPE_VARIANT " +
+ "SYSRES_CONST_DATE_CLOSE_REQ_CODE " +
+ "SYSRES_CONST_DATE_FORMAT_DATE_ONLY_CHAR " +
+ "SYSRES_CONST_DATE_OPEN_REQ_CODE " +
+ "SYSRES_CONST_DATE_REQUISITE " +
+ "SYSRES_CONST_DATE_REQUISITE_CODE " +
+ "SYSRES_CONST_DATE_REQUISITE_NAME " +
+ "SYSRES_CONST_DATE_REQUISITE_TYPE " +
+ "SYSRES_CONST_DATE_TYPE_CHAR " +
+ "SYSRES_CONST_DATETIME_FORMAT_VALUE " +
+ "SYSRES_CONST_DEA_ACCESS_RIGHTS_ACTION_CODE " +
+ "SYSRES_CONST_DESCRIPTION_LOCALIZE_ID_REQUISITE_CODE " +
+ "SYSRES_CONST_DESCRIPTION_REQUISITE_CODE " +
+ "SYSRES_CONST_DET1_PART " +
+ "SYSRES_CONST_DET2_PART " +
+ "SYSRES_CONST_DET3_PART " +
+ "SYSRES_CONST_DET4_PART " +
+ "SYSRES_CONST_DET5_PART " +
+ "SYSRES_CONST_DET6_PART " +
+ "SYSRES_CONST_DETAIL_DATASET_KEY_REQUISITE_CODE " +
+ "SYSRES_CONST_DETAIL_PICK_REQUISITE_CODE " +
+ "SYSRES_CONST_DETAIL_REQ_CODE " +
+ "SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_CODE " +
+ "SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_NAME " +
+ "SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_CODE " +
+ "SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_NAME " +
+ "SYSRES_CONST_DOCUMENT_STORAGES_CODE " +
+ "SYSRES_CONST_DOCUMENT_TEMPLATES_TYPE_NAME " +
+ "SYSRES_CONST_DOUBLE_REQUISITE_CODE " +
+ "SYSRES_CONST_EDITOR_CLOSE_FILE_OBSERV_TYPE_CODE " +
+ "SYSRES_CONST_EDITOR_CLOSE_PROCESS_OBSERV_TYPE_CODE " +
+ "SYSRES_CONST_EDITOR_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_EDITORS_APPLICATION_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_EDITORS_CREATE_SEVERAL_PROCESSES_REQUISITE_CODE " +
+ "SYSRES_CONST_EDITORS_EXTENSION_REQUISITE_CODE " +
+ "SYSRES_CONST_EDITORS_OBSERVER_BY_PROCESS_TYPE " +
+ "SYSRES_CONST_EDITORS_REFERENCE_CODE " +
+ "SYSRES_CONST_EDITORS_REPLACE_SPEC_CHARS_REQUISITE_CODE " +
+ "SYSRES_CONST_EDITORS_USE_PLUGINS_REQUISITE_CODE " +
+ "SYSRES_CONST_EDITORS_VIEW_DOCUMENT_OPENED_TO_EDIT_CODE " +
+ "SYSRES_CONST_EDOC_CARD_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_CARD_TYPES_LINK_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_CERTIFICATE_AND_PASSWORD_ENCODE_CODE " +
+ "SYSRES_CONST_EDOC_CERTIFICATE_ENCODE_CODE " +
+ "SYSRES_CONST_EDOC_DATE_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_KIND_REFERENCE_CODE " +
+ "SYSRES_CONST_EDOC_KINDS_BY_TEMPLATE_ACTION_CODE " +
+ "SYSRES_CONST_EDOC_MANAGE_ACCESS_CODE " +
+ "SYSRES_CONST_EDOC_NONE_ENCODE_CODE " +
+ "SYSRES_CONST_EDOC_NUMBER_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_PASSWORD_ENCODE_CODE " +
+ "SYSRES_CONST_EDOC_READONLY_ACCESS_CODE " +
+ "SYSRES_CONST_EDOC_SHELL_LIFE_TYPE_VIEW_VALUE " +
+ "SYSRES_CONST_EDOC_SIZE_RESTRICTION_PRIORITY_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_STORAGE_CHECK_ACCESS_RIGHTS_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_STORAGE_COMPUTER_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_STORAGE_DATABASE_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_STORAGE_EDIT_IN_STORAGE_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_STORAGE_LOCAL_PATH_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_STORAGE_SHARED_SOURCE_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_TEMPLATE_REQUISITE_CODE " +
+ "SYSRES_CONST_EDOC_TYPES_REFERENCE_CODE " +
+ "SYSRES_CONST_EDOC_VERSION_ACTIVE_STAGE_CODE " +
+ "SYSRES_CONST_EDOC_VERSION_DESIGN_STAGE_CODE " +
+ "SYSRES_CONST_EDOC_VERSION_OBSOLETE_STAGE_CODE " +
+ "SYSRES_CONST_EDOC_WRITE_ACCES_CODE " +
+ "SYSRES_CONST_EDOCUMENT_CARD_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE " +
+ "SYSRES_CONST_ENCODE_CERTIFICATE_TYPE_CODE " +
+ "SYSRES_CONST_END_DATE_REQUISITE_CODE " +
+ "SYSRES_CONST_ENUMERATION_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_EXECUTE_ACCESS_RIGHTS_TYPE_CODE " +
+ "SYSRES_CONST_EXECUTIVE_FILE_STORAGE_TYPE " +
+ "SYSRES_CONST_EXIST_CONST " +
+ "SYSRES_CONST_EXIST_VALUE " +
+ "SYSRES_CONST_EXPORT_LOCK_TYPE_ASK " +
+ "SYSRES_CONST_EXPORT_LOCK_TYPE_WITH_LOCK " +
+ "SYSRES_CONST_EXPORT_LOCK_TYPE_WITHOUT_LOCK " +
+ "SYSRES_CONST_EXPORT_VERSION_TYPE_ASK " +
+ "SYSRES_CONST_EXPORT_VERSION_TYPE_LAST " +
+ "SYSRES_CONST_EXPORT_VERSION_TYPE_LAST_ACTIVE " +
+ "SYSRES_CONST_EXTENSION_REQUISITE_CODE " +
+ "SYSRES_CONST_FILTER_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_FILTER_REQUISITE_CODE " +
+ "SYSRES_CONST_FILTER_TYPE_COMMON_CODE " +
+ "SYSRES_CONST_FILTER_TYPE_COMMON_NAME " +
+ "SYSRES_CONST_FILTER_TYPE_USER_CODE " +
+ "SYSRES_CONST_FILTER_TYPE_USER_NAME " +
+ "SYSRES_CONST_FILTER_VALUE_REQUISITE_NAME " +
+ "SYSRES_CONST_FLOAT_NUMBER_FORMAT_CHAR " +
+ "SYSRES_CONST_FLOAT_REQUISITE_TYPE " +
+ "SYSRES_CONST_FOLDER_AUTHOR_VALUE " +
+ "SYSRES_CONST_FOLDER_KIND_ANY_OBJECTS " +
+ "SYSRES_CONST_FOLDER_KIND_COMPONENTS " +
+ "SYSRES_CONST_FOLDER_KIND_EDOCS " +
+ "SYSRES_CONST_FOLDER_KIND_JOBS " +
+ "SYSRES_CONST_FOLDER_KIND_TASKS " +
+ "SYSRES_CONST_FOLDER_TYPE_COMMON " +
+ "SYSRES_CONST_FOLDER_TYPE_COMPONENT " +
+ "SYSRES_CONST_FOLDER_TYPE_FAVORITES " +
+ "SYSRES_CONST_FOLDER_TYPE_INBOX " +
+ "SYSRES_CONST_FOLDER_TYPE_OUTBOX " +
+ "SYSRES_CONST_FOLDER_TYPE_QUICK_LAUNCH " +
+ "SYSRES_CONST_FOLDER_TYPE_SEARCH " +
+ "SYSRES_CONST_FOLDER_TYPE_SHORTCUTS " +
+ "SYSRES_CONST_FOLDER_TYPE_USER " +
+ "SYSRES_CONST_FROM_DICTIONARY_ENUM_METHOD_FLAG " +
+ "SYSRES_CONST_FULL_SUBSTITUTE_TYPE " +
+ "SYSRES_CONST_FULL_SUBSTITUTE_TYPE_CODE " +
+ "SYSRES_CONST_FUNCTION_CANCEL_RESULT " +
+ "SYSRES_CONST_FUNCTION_CATEGORY_SYSTEM " +
+ "SYSRES_CONST_FUNCTION_CATEGORY_USER " +
+ "SYSRES_CONST_FUNCTION_FAILURE_RESULT " +
+ "SYSRES_CONST_FUNCTION_SAVE_RESULT " +
+ "SYSRES_CONST_GENERATED_REQUISITE " +
+ "SYSRES_CONST_GREEN_LIFE_CYCLE_STAGE_FONT_COLOR " +
+ "SYSRES_CONST_GROUP_ACCOUNT_TYPE_VALUE_CODE " +
+ "SYSRES_CONST_GROUP_CATEGORY_NORMAL_CODE " +
+ "SYSRES_CONST_GROUP_CATEGORY_NORMAL_NAME " +
+ "SYSRES_CONST_GROUP_CATEGORY_SERVICE_CODE " +
+ "SYSRES_CONST_GROUP_CATEGORY_SERVICE_NAME " +
+ "SYSRES_CONST_GROUP_COMMON_CATEGORY_FIELD_VALUE " +
+ "SYSRES_CONST_GROUP_FULL_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_GROUP_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_GROUP_RIGHTS_T_REQUISITE_CODE " +
+ "SYSRES_CONST_GROUP_SERVER_CODES_REQUISITE_CODE " +
+ "SYSRES_CONST_GROUP_SERVER_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_GROUP_SERVICE_CATEGORY_FIELD_VALUE " +
+ "SYSRES_CONST_GROUP_USER_REQUISITE_CODE " +
+ "SYSRES_CONST_GROUPS_REFERENCE_CODE " +
+ "SYSRES_CONST_GROUPS_REQUISITE_CODE " +
+ "SYSRES_CONST_HIDDEN_MODE_NAME " +
+ "SYSRES_CONST_HIGH_LVL_REQUISITE_CODE " +
+ "SYSRES_CONST_HISTORY_ACTION_CREATE_CODE " +
+ "SYSRES_CONST_HISTORY_ACTION_DELETE_CODE " +
+ "SYSRES_CONST_HISTORY_ACTION_EDIT_CODE " +
+ "SYSRES_CONST_HOUR_CHAR " +
+ "SYSRES_CONST_ID_REQUISITE_CODE " +
+ "SYSRES_CONST_IDSPS_REQUISITE_CODE " +
+ "SYSRES_CONST_IMAGE_MODE_COLOR " +
+ "SYSRES_CONST_IMAGE_MODE_GREYSCALE " +
+ "SYSRES_CONST_IMAGE_MODE_MONOCHROME " +
+ "SYSRES_CONST_IMPORTANCE_HIGH " +
+ "SYSRES_CONST_IMPORTANCE_LOW " +
+ "SYSRES_CONST_IMPORTANCE_NORMAL " +
+ "SYSRES_CONST_IN_DESIGN_VERSION_STATE_PICK_VALUE " +
+ "SYSRES_CONST_INCOMING_WORK_RULE_TYPE_CODE " +
+ "SYSRES_CONST_INT_REQUISITE " +
+ "SYSRES_CONST_INT_REQUISITE_TYPE " +
+ "SYSRES_CONST_INTEGER_NUMBER_FORMAT_CHAR " +
+ "SYSRES_CONST_INTEGER_TYPE_CHAR " +
+ "SYSRES_CONST_IS_GENERATED_REQUISITE_NEGATIVE_VALUE " +
+ "SYSRES_CONST_IS_PUBLIC_ROLE_REQUISITE_CODE " +
+ "SYSRES_CONST_IS_REMOTE_USER_NEGATIVE_VALUE " +
+ "SYSRES_CONST_IS_REMOTE_USER_POSITIVE_VALUE " +
+ "SYSRES_CONST_IS_STORED_REQUISITE_NEGATIVE_VALUE " +
+ "SYSRES_CONST_IS_STORED_REQUISITE_STORED_VALUE " +
+ "SYSRES_CONST_ITALIC_LIFE_CYCLE_STAGE_DRAW_STYLE " +
+ "SYSRES_CONST_JOB_BLOCK_DESCRIPTION " +
+ "SYSRES_CONST_JOB_KIND_CONTROL_JOB " +
+ "SYSRES_CONST_JOB_KIND_JOB " +
+ "SYSRES_CONST_JOB_KIND_NOTICE " +
+ "SYSRES_CONST_JOB_STATE_ABORTED " +
+ "SYSRES_CONST_JOB_STATE_COMPLETE " +
+ "SYSRES_CONST_JOB_STATE_WORKING " +
+ "SYSRES_CONST_KIND_REQUISITE_CODE " +
+ "SYSRES_CONST_KIND_REQUISITE_NAME " +
+ "SYSRES_CONST_KINDS_CREATE_SHADOW_COPIES_REQUISITE_CODE " +
+ "SYSRES_CONST_KINDS_DEFAULT_EDOC_LIFE_STAGE_REQUISITE_CODE " +
+ "SYSRES_CONST_KINDS_EDOC_ALL_TEPLATES_ALLOWED_REQUISITE_CODE " +
+ "SYSRES_CONST_KINDS_EDOC_ALLOW_LIFE_CYCLE_STAGE_CHANGING_REQUISITE_CODE " +
+ "SYSRES_CONST_KINDS_EDOC_ALLOW_MULTIPLE_ACTIVE_VERSIONS_REQUISITE_CODE " +
+ "SYSRES_CONST_KINDS_EDOC_SHARE_ACCES_RIGHTS_BY_DEFAULT_CODE " +
+ "SYSRES_CONST_KINDS_EDOC_TEMPLATE_REQUISITE_CODE " +
+ "SYSRES_CONST_KINDS_EDOC_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_KINDS_SIGNERS_REQUISITES_CODE " +
+ "SYSRES_CONST_KOD_INPUT_TYPE " +
+ "SYSRES_CONST_LAST_UPDATE_DATE_REQUISITE_CODE " +
+ "SYSRES_CONST_LIFE_CYCLE_START_STAGE_REQUISITE_CODE " +
+ "SYSRES_CONST_LILAC_LIFE_CYCLE_STAGE_FONT_COLOR " +
+ "SYSRES_CONST_LINK_OBJECT_KIND_COMPONENT " +
+ "SYSRES_CONST_LINK_OBJECT_KIND_DOCUMENT " +
+ "SYSRES_CONST_LINK_OBJECT_KIND_EDOC " +
+ "SYSRES_CONST_LINK_OBJECT_KIND_FOLDER " +
+ "SYSRES_CONST_LINK_OBJECT_KIND_JOB " +
+ "SYSRES_CONST_LINK_OBJECT_KIND_REFERENCE " +
+ "SYSRES_CONST_LINK_OBJECT_KIND_TASK " +
+ "SYSRES_CONST_LINK_REF_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_LIST_REFERENCE_MODE_NAME " +
+ "SYSRES_CONST_LOCALIZATION_DICTIONARY_MAIN_VIEW_CODE " +
+ "SYSRES_CONST_MAIN_VIEW_CODE " +
+ "SYSRES_CONST_MANUAL_ENUM_METHOD_FLAG " +
+ "SYSRES_CONST_MASTER_COMP_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_MASTER_TABLE_REC_ID_REQUISITE_CODE " +
+ "SYSRES_CONST_MAXIMIZED_MODE_NAME " +
+ "SYSRES_CONST_ME_VALUE " +
+ "SYSRES_CONST_MESSAGE_ATTENTION_CAPTION " +
+ "SYSRES_CONST_MESSAGE_CONFIRMATION_CAPTION " +
+ "SYSRES_CONST_MESSAGE_ERROR_CAPTION " +
+ "SYSRES_CONST_MESSAGE_INFORMATION_CAPTION " +
+ "SYSRES_CONST_MINIMIZED_MODE_NAME " +
+ "SYSRES_CONST_MINUTE_CHAR " +
+ "SYSRES_CONST_MODULE_REQUISITE_CODE " +
+ "SYSRES_CONST_MONITORING_BLOCK_DESCRIPTION " +
+ "SYSRES_CONST_MONTH_FORMAT_VALUE " +
+ "SYSRES_CONST_NAME_LOCALIZE_ID_REQUISITE_CODE " +
+ "SYSRES_CONST_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_NAME_SINGULAR_REQUISITE_CODE " +
+ "SYSRES_CONST_NAMEAN_INPUT_TYPE " +
+ "SYSRES_CONST_NEGATIVE_PICK_VALUE " +
+ "SYSRES_CONST_NEGATIVE_VALUE " +
+ "SYSRES_CONST_NO " +
+ "SYSRES_CONST_NO_PICK_VALUE " +
+ "SYSRES_CONST_NO_SIGNATURE_REQUISITE_CODE " +
+ "SYSRES_CONST_NO_VALUE " +
+ "SYSRES_CONST_NONE_ACCESS_RIGHTS_TYPE_CODE " +
+ "SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE " +
+ "SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE_MASCULINE " +
+ "SYSRES_CONST_NORMAL_ACCESS_RIGHTS_TYPE_CODE " +
+ "SYSRES_CONST_NORMAL_LIFE_CYCLE_STAGE_DRAW_STYLE " +
+ "SYSRES_CONST_NORMAL_MODE_NAME " +
+ "SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_CODE " +
+ "SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_NAME " +
+ "SYSRES_CONST_NOTE_REQUISITE_CODE " +
+ "SYSRES_CONST_NOTICE_BLOCK_DESCRIPTION " +
+ "SYSRES_CONST_NUM_REQUISITE " +
+ "SYSRES_CONST_NUM_STR_REQUISITE_CODE " +
+ "SYSRES_CONST_NUMERATION_AUTO_NOT_STRONG " +
+ "SYSRES_CONST_NUMERATION_AUTO_STRONG " +
+ "SYSRES_CONST_NUMERATION_FROM_DICTONARY " +
+ "SYSRES_CONST_NUMERATION_MANUAL " +
+ "SYSRES_CONST_NUMERIC_TYPE_CHAR " +
+ "SYSRES_CONST_NUMREQ_REQUISITE_CODE " +
+ "SYSRES_CONST_OBSOLETE_VERSION_STATE_PICK_VALUE " +
+ "SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE " +
+ "SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_CODE " +
+ "SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_FEMININE " +
+ "SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_MASCULINE " +
+ "SYSRES_CONST_OPTIONAL_FORM_COMP_REQCODE_PREFIX " +
+ "SYSRES_CONST_ORANGE_LIFE_CYCLE_STAGE_FONT_COLOR " +
+ "SYSRES_CONST_ORIGINALREF_REQUISITE_CODE " +
+ "SYSRES_CONST_OURFIRM_REF_CODE " +
+ "SYSRES_CONST_OURFIRM_REQUISITE_CODE " +
+ "SYSRES_CONST_OURFIRM_VAR " +
+ "SYSRES_CONST_OUTGOING_WORK_RULE_TYPE_CODE " +
+ "SYSRES_CONST_PICK_NEGATIVE_RESULT " +
+ "SYSRES_CONST_PICK_POSITIVE_RESULT " +
+ "SYSRES_CONST_PICK_REQUISITE " +
+ "SYSRES_CONST_PICK_REQUISITE_TYPE " +
+ "SYSRES_CONST_PICK_TYPE_CHAR " +
+ "SYSRES_CONST_PLAN_STATUS_REQUISITE_CODE " +
+ "SYSRES_CONST_PLATFORM_VERSION_COMMENT " +
+ "SYSRES_CONST_PLUGINS_SETTINGS_DESCRIPTION_REQUISITE_CODE " +
+ "SYSRES_CONST_POSITIVE_PICK_VALUE " +
+ "SYSRES_CONST_POWER_TO_CREATE_ACTION_CODE " +
+ "SYSRES_CONST_POWER_TO_SIGN_ACTION_CODE " +
+ "SYSRES_CONST_PRIORITY_REQUISITE_CODE " +
+ "SYSRES_CONST_QUALIFIED_TASK_TYPE " +
+ "SYSRES_CONST_QUALIFIED_TASK_TYPE_CODE " +
+ "SYSRES_CONST_RECSTAT_REQUISITE_CODE " +
+ "SYSRES_CONST_RED_LIFE_CYCLE_STAGE_FONT_COLOR " +
+ "SYSRES_CONST_REF_ID_T_REF_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_REF_REQUISITE " +
+ "SYSRES_CONST_REF_REQUISITE_TYPE " +
+ "SYSRES_CONST_REF_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE " +
+ "SYSRES_CONST_REFERENCE_RECORD_HISTORY_CREATE_ACTION_CODE " +
+ "SYSRES_CONST_REFERENCE_RECORD_HISTORY_DELETE_ACTION_CODE " +
+ "SYSRES_CONST_REFERENCE_RECORD_HISTORY_MODIFY_ACTION_CODE " +
+ "SYSRES_CONST_REFERENCE_TYPE_CHAR " +
+ "SYSRES_CONST_REFERENCE_TYPE_REQUISITE_NAME " +
+ "SYSRES_CONST_REFERENCES_ADD_PARAMS_REQUISITE_CODE " +
+ "SYSRES_CONST_REFERENCES_DISPLAY_REQUISITE_REQUISITE_CODE " +
+ "SYSRES_CONST_REMOTE_SERVER_STATUS_WORKING " +
+ "SYSRES_CONST_REMOTE_SERVER_TYPE_MAIN " +
+ "SYSRES_CONST_REMOTE_SERVER_TYPE_SECONDARY " +
+ "SYSRES_CONST_REMOTE_USER_FLAG_VALUE_CODE " +
+ "SYSRES_CONST_REPORT_APP_EDITOR_INTERNAL " +
+ "SYSRES_CONST_REPORT_BASE_REPORT_ID_REQUISITE_CODE " +
+ "SYSRES_CONST_REPORT_BASE_REPORT_REQUISITE_CODE " +
+ "SYSRES_CONST_REPORT_SCRIPT_REQUISITE_CODE " +
+ "SYSRES_CONST_REPORT_TEMPLATE_REQUISITE_CODE " +
+ "SYSRES_CONST_REPORT_VIEWER_CODE_REQUISITE_CODE " +
+ "SYSRES_CONST_REQ_ALLOW_COMPONENT_DEFAULT_VALUE " +
+ "SYSRES_CONST_REQ_ALLOW_RECORD_DEFAULT_VALUE " +
+ "SYSRES_CONST_REQ_ALLOW_SERVER_COMPONENT_DEFAULT_VALUE " +
+ "SYSRES_CONST_REQ_MODE_AVAILABLE_CODE " +
+ "SYSRES_CONST_REQ_MODE_EDIT_CODE " +
+ "SYSRES_CONST_REQ_MODE_HIDDEN_CODE " +
+ "SYSRES_CONST_REQ_MODE_NOT_AVAILABLE_CODE " +
+ "SYSRES_CONST_REQ_MODE_VIEW_CODE " +
+ "SYSRES_CONST_REQ_NUMBER_REQUISITE_CODE " +
+ "SYSRES_CONST_REQ_SECTION_VALUE " +
+ "SYSRES_CONST_REQ_TYPE_VALUE " +
+ "SYSRES_CONST_REQUISITE_FORMAT_BY_UNIT " +
+ "SYSRES_CONST_REQUISITE_FORMAT_DATE_FULL " +
+ "SYSRES_CONST_REQUISITE_FORMAT_DATE_TIME " +
+ "SYSRES_CONST_REQUISITE_FORMAT_LEFT " +
+ "SYSRES_CONST_REQUISITE_FORMAT_RIGHT " +
+ "SYSRES_CONST_REQUISITE_FORMAT_WITHOUT_UNIT " +
+ "SYSRES_CONST_REQUISITE_NUMBER_REQUISITE_CODE " +
+ "SYSRES_CONST_REQUISITE_SECTION_ACTIONS " +
+ "SYSRES_CONST_REQUISITE_SECTION_BUTTON " +
+ "SYSRES_CONST_REQUISITE_SECTION_BUTTONS " +
+ "SYSRES_CONST_REQUISITE_SECTION_CARD " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE10 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE11 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE12 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE13 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE14 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE15 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE16 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE17 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE18 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE19 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE2 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE20 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE21 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE22 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE23 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE24 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE3 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE4 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE5 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE6 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE7 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE8 " +
+ "SYSRES_CONST_REQUISITE_SECTION_TABLE9 " +
+ "SYSRES_CONST_REQUISITES_PSEUDOREFERENCE_REQUISITE_NUMBER_REQUISITE_CODE " +
+ "SYSRES_CONST_RIGHT_ALIGNMENT_CODE " +
+ "SYSRES_CONST_ROLES_REFERENCE_CODE " +
+ "SYSRES_CONST_ROUTE_STEP_AFTER_RUS " +
+ "SYSRES_CONST_ROUTE_STEP_AND_CONDITION_RUS " +
+ "SYSRES_CONST_ROUTE_STEP_OR_CONDITION_RUS " +
+ "SYSRES_CONST_ROUTE_TYPE_COMPLEX " +
+ "SYSRES_CONST_ROUTE_TYPE_PARALLEL " +
+ "SYSRES_CONST_ROUTE_TYPE_SERIAL " +
+ "SYSRES_CONST_SBDATASETDESC_NEGATIVE_VALUE " +
+ "SYSRES_CONST_SBDATASETDESC_POSITIVE_VALUE " +
+ "SYSRES_CONST_SBVIEWSDESC_POSITIVE_VALUE " +
+ "SYSRES_CONST_SCRIPT_BLOCK_DESCRIPTION " +
+ "SYSRES_CONST_SEARCH_BY_TEXT_REQUISITE_CODE " +
+ "SYSRES_CONST_SEARCHES_COMPONENT_CONTENT " +
+ "SYSRES_CONST_SEARCHES_CRITERIA_ACTION_NAME " +
+ "SYSRES_CONST_SEARCHES_EDOC_CONTENT " +
+ "SYSRES_CONST_SEARCHES_FOLDER_CONTENT " +
+ "SYSRES_CONST_SEARCHES_JOB_CONTENT " +
+ "SYSRES_CONST_SEARCHES_REFERENCE_CODE " +
+ "SYSRES_CONST_SEARCHES_TASK_CONTENT " +
+ "SYSRES_CONST_SECOND_CHAR " +
+ "SYSRES_CONST_SECTION_REQUISITE_ACTIONS_VALUE " +
+ "SYSRES_CONST_SECTION_REQUISITE_CARD_VALUE " +
+ "SYSRES_CONST_SECTION_REQUISITE_CODE " +
+ "SYSRES_CONST_SECTION_REQUISITE_DETAIL_1_VALUE " +
+ "SYSRES_CONST_SECTION_REQUISITE_DETAIL_2_VALUE " +
+ "SYSRES_CONST_SECTION_REQUISITE_DETAIL_3_VALUE " +
+ "SYSRES_CONST_SECTION_REQUISITE_DETAIL_4_VALUE " +
+ "SYSRES_CONST_SECTION_REQUISITE_DETAIL_5_VALUE " +
+ "SYSRES_CONST_SECTION_REQUISITE_DETAIL_6_VALUE " +
+ "SYSRES_CONST_SELECT_REFERENCE_MODE_NAME " +
+ "SYSRES_CONST_SELECT_TYPE_SELECTABLE " +
+ "SYSRES_CONST_SELECT_TYPE_SELECTABLE_ONLY_CHILD " +
+ "SYSRES_CONST_SELECT_TYPE_SELECTABLE_WITH_CHILD " +
+ "SYSRES_CONST_SELECT_TYPE_UNSLECTABLE " +
+ "SYSRES_CONST_SERVER_TYPE_MAIN " +
+ "SYSRES_CONST_SERVICE_USER_CATEGORY_FIELD_VALUE " +
+ "SYSRES_CONST_SETTINGS_USER_REQUISITE_CODE " +
+ "SYSRES_CONST_SIGNATURE_AND_ENCODE_CERTIFICATE_TYPE_CODE " +
+ "SYSRES_CONST_SIGNATURE_CERTIFICATE_TYPE_CODE " +
+ "SYSRES_CONST_SINGULAR_TITLE_REQUISITE_CODE " +
+ "SYSRES_CONST_SQL_SERVER_AUTHENTIFICATION_FLAG_VALUE_CODE " +
+ "SYSRES_CONST_SQL_SERVER_ENCODE_AUTHENTIFICATION_FLAG_VALUE_CODE " +
+ "SYSRES_CONST_STANDART_ROUTE_REFERENCE_CODE " +
+ "SYSRES_CONST_STANDART_ROUTE_REFERENCE_COMMENT_REQUISITE_CODE " +
+ "SYSRES_CONST_STANDART_ROUTES_GROUPS_REFERENCE_CODE " +
+ "SYSRES_CONST_STATE_REQ_NAME " +
+ "SYSRES_CONST_STATE_REQUISITE_ACTIVE_VALUE " +
+ "SYSRES_CONST_STATE_REQUISITE_CLOSED_VALUE " +
+ "SYSRES_CONST_STATE_REQUISITE_CODE " +
+ "SYSRES_CONST_STATIC_ROLE_TYPE_CODE " +
+ "SYSRES_CONST_STATUS_PLAN_DEFAULT_VALUE " +
+ "SYSRES_CONST_STATUS_VALUE_AUTOCLEANING " +
+ "SYSRES_CONST_STATUS_VALUE_BLUE_SQUARE " +
+ "SYSRES_CONST_STATUS_VALUE_COMPLETE " +
+ "SYSRES_CONST_STATUS_VALUE_GREEN_SQUARE " +
+ "SYSRES_CONST_STATUS_VALUE_ORANGE_SQUARE " +
+ "SYSRES_CONST_STATUS_VALUE_PURPLE_SQUARE " +
+ "SYSRES_CONST_STATUS_VALUE_RED_SQUARE " +
+ "SYSRES_CONST_STATUS_VALUE_SUSPEND " +
+ "SYSRES_CONST_STATUS_VALUE_YELLOW_SQUARE " +
+ "SYSRES_CONST_STDROUTE_SHOW_TO_USERS_REQUISITE_CODE " +
+ "SYSRES_CONST_STORAGE_TYPE_FILE " +
+ "SYSRES_CONST_STORAGE_TYPE_SQL_SERVER " +
+ "SYSRES_CONST_STR_REQUISITE " +
+ "SYSRES_CONST_STRIKEOUT_LIFE_CYCLE_STAGE_DRAW_STYLE " +
+ "SYSRES_CONST_STRING_FORMAT_LEFT_ALIGN_CHAR " +
+ "SYSRES_CONST_STRING_FORMAT_RIGHT_ALIGN_CHAR " +
+ "SYSRES_CONST_STRING_REQUISITE_CODE " +
+ "SYSRES_CONST_STRING_REQUISITE_TYPE " +
+ "SYSRES_CONST_STRING_TYPE_CHAR " +
+ "SYSRES_CONST_SUBSTITUTES_PSEUDOREFERENCE_CODE " +
+ "SYSRES_CONST_SUBTASK_BLOCK_DESCRIPTION " +
+ "SYSRES_CONST_SYSTEM_SETTING_CURRENT_USER_PARAM_VALUE " +
+ "SYSRES_CONST_SYSTEM_SETTING_EMPTY_VALUE_PARAM_VALUE " +
+ "SYSRES_CONST_SYSTEM_VERSION_COMMENT " +
+ "SYSRES_CONST_TASK_ACCESS_TYPE_ALL " +
+ "SYSRES_CONST_TASK_ACCESS_TYPE_ALL_MEMBERS " +
+ "SYSRES_CONST_TASK_ACCESS_TYPE_MANUAL " +
+ "SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION " +
+ "SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION_AND_PASSWORD " +
+ "SYSRES_CONST_TASK_ENCODE_TYPE_NONE " +
+ "SYSRES_CONST_TASK_ENCODE_TYPE_PASSWORD " +
+ "SYSRES_CONST_TASK_ROUTE_ALL_CONDITION " +
+ "SYSRES_CONST_TASK_ROUTE_AND_CONDITION " +
+ "SYSRES_CONST_TASK_ROUTE_OR_CONDITION " +
+ "SYSRES_CONST_TASK_STATE_ABORTED " +
+ "SYSRES_CONST_TASK_STATE_COMPLETE " +
+ "SYSRES_CONST_TASK_STATE_CONTINUED " +
+ "SYSRES_CONST_TASK_STATE_CONTROL " +
+ "SYSRES_CONST_TASK_STATE_INIT " +
+ "SYSRES_CONST_TASK_STATE_WORKING " +
+ "SYSRES_CONST_TASK_TITLE " +
+ "SYSRES_CONST_TASK_TYPES_GROUPS_REFERENCE_CODE " +
+ "SYSRES_CONST_TASK_TYPES_REFERENCE_CODE " +
+ "SYSRES_CONST_TEMPLATES_REFERENCE_CODE " +
+ "SYSRES_CONST_TEST_DATE_REQUISITE_NAME " +
+ "SYSRES_CONST_TEST_DEV_DATABASE_NAME " +
+ "SYSRES_CONST_TEST_DEV_SYSTEM_CODE " +
+ "SYSRES_CONST_TEST_EDMS_DATABASE_NAME " +
+ "SYSRES_CONST_TEST_EDMS_MAIN_CODE " +
+ "SYSRES_CONST_TEST_EDMS_MAIN_DB_NAME " +
+ "SYSRES_CONST_TEST_EDMS_SECOND_CODE " +
+ "SYSRES_CONST_TEST_EDMS_SECOND_DB_NAME " +
+ "SYSRES_CONST_TEST_EDMS_SYSTEM_CODE " +
+ "SYSRES_CONST_TEST_NUMERIC_REQUISITE_NAME " +
+ "SYSRES_CONST_TEXT_REQUISITE " +
+ "SYSRES_CONST_TEXT_REQUISITE_CODE " +
+ "SYSRES_CONST_TEXT_REQUISITE_TYPE " +
+ "SYSRES_CONST_TEXT_TYPE_CHAR " +
+ "SYSRES_CONST_TYPE_CODE_REQUISITE_CODE " +
+ "SYSRES_CONST_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_UNDEFINED_LIFE_CYCLE_STAGE_FONT_COLOR " +
+ "SYSRES_CONST_UNITS_SECTION_ID_REQUISITE_CODE " +
+ "SYSRES_CONST_UNITS_SECTION_REQUISITE_CODE " +
+ "SYSRES_CONST_UNOPERATING_RECORD_FLAG_VALUE_CODE " +
+ "SYSRES_CONST_UNSTORED_DATA_REQUISITE_CODE " +
+ "SYSRES_CONST_UNSTORED_DATA_REQUISITE_NAME " +
+ "SYSRES_CONST_USE_ACCESS_TYPE_CODE " +
+ "SYSRES_CONST_USE_ACCESS_TYPE_NAME " +
+ "SYSRES_CONST_USER_ACCOUNT_TYPE_VALUE_CODE " +
+ "SYSRES_CONST_USER_ADDITIONAL_INFORMATION_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_AND_GROUP_ID_FROM_PSEUDOREFERENCE_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_CATEGORY_NORMAL " +
+ "SYSRES_CONST_USER_CERTIFICATE_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_CERTIFICATE_STATE_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_CERTIFICATE_SUBJECT_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_CERTIFICATE_THUMBPRINT_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_COMMON_CATEGORY " +
+ "SYSRES_CONST_USER_COMMON_CATEGORY_CODE " +
+ "SYSRES_CONST_USER_FULL_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_GROUP_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_LOGIN_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_REMOTE_CONTROLLER_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_REMOTE_SYSTEM_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_RIGHTS_T_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_SERVER_NAME_REQUISITE_CODE " +
+ "SYSRES_CONST_USER_SERVICE_CATEGORY " +
+ "SYSRES_CONST_USER_SERVICE_CATEGORY_CODE " +
+ "SYSRES_CONST_USER_STATUS_ADMINISTRATOR_CODE " +
+ "SYSRES_CONST_USER_STATUS_ADMINISTRATOR_NAME " +
+ "SYSRES_CONST_USER_STATUS_DEVELOPER_CODE " +
+ "SYSRES_CONST_USER_STATUS_DEVELOPER_NAME " +
+ "SYSRES_CONST_USER_STATUS_DISABLED_CODE " +
+ "SYSRES_CONST_USER_STATUS_DISABLED_NAME " +
+ "SYSRES_CONST_USER_STATUS_SYSTEM_DEVELOPER_CODE " +
+ "SYSRES_CONST_USER_STATUS_USER_CODE " +
+ "SYSRES_CONST_USER_STATUS_USER_NAME " +
+ "SYSRES_CONST_USER_STATUS_USER_NAME_DEPRECATED " +
+ "SYSRES_CONST_USER_TYPE_FIELD_VALUE_USER " +
+ "SYSRES_CONST_USER_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_USERS_CONTROLLER_REQUISITE_CODE " +
+ "SYSRES_CONST_USERS_IS_MAIN_SERVER_REQUISITE_CODE " +
+ "SYSRES_CONST_USERS_REFERENCE_CODE " +
+ "SYSRES_CONST_USERS_REGISTRATION_CERTIFICATES_ACTION_NAME " +
+ "SYSRES_CONST_USERS_REQUISITE_CODE " +
+ "SYSRES_CONST_USERS_SYSTEM_REQUISITE_CODE " +
+ "SYSRES_CONST_USERS_USER_ACCESS_RIGHTS_TYPR_REQUISITE_CODE " +
+ "SYSRES_CONST_USERS_USER_AUTHENTICATION_REQUISITE_CODE " +
+ "SYSRES_CONST_USERS_USER_COMPONENT_REQUISITE_CODE " +
+ "SYSRES_CONST_USERS_USER_GROUP_REQUISITE_CODE " +
+ "SYSRES_CONST_USERS_VIEW_CERTIFICATES_ACTION_NAME " +
+ "SYSRES_CONST_VIEW_DEFAULT_CODE " +
+ "SYSRES_CONST_VIEW_DEFAULT_NAME " +
+ "SYSRES_CONST_VIEWER_REQUISITE_CODE " +
+ "SYSRES_CONST_WAITING_BLOCK_DESCRIPTION " +
+ "SYSRES_CONST_WIZARD_FORM_LABEL_TEST_STRING " +
+ "SYSRES_CONST_WIZARD_QUERY_PARAM_HEIGHT_ETALON_STRING " +
+ "SYSRES_CONST_WIZARD_REFERENCE_COMMENT_REQUISITE_CODE " +
+ "SYSRES_CONST_WORK_RULES_DESCRIPTION_REQUISITE_CODE " +
+ "SYSRES_CONST_WORK_TIME_CALENDAR_REFERENCE_CODE " +
+ "SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE " +
+ "SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE " +
+ "SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE_RUS " +
+ "SYSRES_CONST_WORK_WORKFLOW_SOFT_ROUTE_TYPE_VALUE_CODE_RUS " +
+ "SYSRES_CONST_WORKFLOW_ROUTE_TYPR_HARD " +
+ "SYSRES_CONST_WORKFLOW_ROUTE_TYPR_SOFT " +
+ "SYSRES_CONST_XML_ENCODING " +
+ "SYSRES_CONST_XREC_STAT_REQUISITE_CODE " +
+ "SYSRES_CONST_XRECID_FIELD_NAME " +
+ "SYSRES_CONST_YES " +
+ "SYSRES_CONST_YES_NO_2_REQUISITE_CODE " +
+ "SYSRES_CONST_YES_NO_REQUISITE_CODE " +
+ "SYSRES_CONST_YES_NO_T_REF_TYPE_REQUISITE_CODE " +
+ "SYSRES_CONST_YES_PICK_VALUE " +
+ "SYSRES_CONST_YES_VALUE ";
+
+ // Base constant
+ const base_constants = "CR FALSE nil NO_VALUE NULL TAB TRUE YES_VALUE ";
+
+ // Base group name
+ const base_group_name_constants =
+ "ADMINISTRATORS_GROUP_NAME CUSTOMIZERS_GROUP_NAME DEVELOPERS_GROUP_NAME SERVICE_USERS_GROUP_NAME ";
+
+ // Decision block properties
+ const decision_block_properties_constants =
+ "DECISION_BLOCK_FIRST_OPERAND_PROPERTY DECISION_BLOCK_NAME_PROPERTY DECISION_BLOCK_OPERATION_PROPERTY " +
+ "DECISION_BLOCK_RESULT_TYPE_PROPERTY DECISION_BLOCK_SECOND_OPERAND_PROPERTY ";
+
+ // File extension
+ const file_extension_constants =
+ "ANY_FILE_EXTENTION COMPRESSED_DOCUMENT_EXTENSION EXTENDED_DOCUMENT_EXTENSION " +
+ "SHORT_COMPRESSED_DOCUMENT_EXTENSION SHORT_EXTENDED_DOCUMENT_EXTENSION ";
+
+ // Job block properties
+ const job_block_properties_constants =
+ "JOB_BLOCK_ABORT_DEADLINE_PROPERTY " +
+ "JOB_BLOCK_AFTER_FINISH_EVENT " +
+ "JOB_BLOCK_AFTER_QUERY_PARAMETERS_EVENT " +
+ "JOB_BLOCK_ATTACHMENT_PROPERTY " +
+ "JOB_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY " +
+ "JOB_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY " +
+ "JOB_BLOCK_BEFORE_QUERY_PARAMETERS_EVENT " +
+ "JOB_BLOCK_BEFORE_START_EVENT " +
+ "JOB_BLOCK_CREATED_JOBS_PROPERTY " +
+ "JOB_BLOCK_DEADLINE_PROPERTY " +
+ "JOB_BLOCK_EXECUTION_RESULTS_PROPERTY " +
+ "JOB_BLOCK_IS_PARALLEL_PROPERTY " +
+ "JOB_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY " +
+ "JOB_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY " +
+ "JOB_BLOCK_JOB_TEXT_PROPERTY " +
+ "JOB_BLOCK_NAME_PROPERTY " +
+ "JOB_BLOCK_NEED_SIGN_ON_PERFORM_PROPERTY " +
+ "JOB_BLOCK_PERFORMER_PROPERTY " +
+ "JOB_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY " +
+ "JOB_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY " +
+ "JOB_BLOCK_SUBJECT_PROPERTY ";
+
+ // Language code
+ const language_code_constants = "ENGLISH_LANGUAGE_CODE RUSSIAN_LANGUAGE_CODE ";
+
+ // Launching external applications
+ const launching_external_applications_constants =
+ "smHidden smMaximized smMinimized smNormal wmNo wmYes ";
+
+ // Link kind
+ const link_kind_constants =
+ "COMPONENT_TOKEN_LINK_KIND " +
+ "DOCUMENT_LINK_KIND " +
+ "EDOCUMENT_LINK_KIND " +
+ "FOLDER_LINK_KIND " +
+ "JOB_LINK_KIND " +
+ "REFERENCE_LINK_KIND " +
+ "TASK_LINK_KIND ";
+
+ // Lock type
+ const lock_type_constants =
+ "COMPONENT_TOKEN_LOCK_TYPE EDOCUMENT_VERSION_LOCK_TYPE ";
+
+ // Monitor block properties
+ const monitor_block_properties_constants =
+ "MONITOR_BLOCK_AFTER_FINISH_EVENT " +
+ "MONITOR_BLOCK_BEFORE_START_EVENT " +
+ "MONITOR_BLOCK_DEADLINE_PROPERTY " +
+ "MONITOR_BLOCK_INTERVAL_PROPERTY " +
+ "MONITOR_BLOCK_INTERVAL_TYPE_PROPERTY " +
+ "MONITOR_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY " +
+ "MONITOR_BLOCK_NAME_PROPERTY " +
+ "MONITOR_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY " +
+ "MONITOR_BLOCK_SEARCH_SCRIPT_PROPERTY ";
+
+ // Notice block properties
+ const notice_block_properties_constants =
+ "NOTICE_BLOCK_AFTER_FINISH_EVENT " +
+ "NOTICE_BLOCK_ATTACHMENT_PROPERTY " +
+ "NOTICE_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY " +
+ "NOTICE_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY " +
+ "NOTICE_BLOCK_BEFORE_START_EVENT " +
+ "NOTICE_BLOCK_CREATED_NOTICES_PROPERTY " +
+ "NOTICE_BLOCK_DEADLINE_PROPERTY " +
+ "NOTICE_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY " +
+ "NOTICE_BLOCK_NAME_PROPERTY " +
+ "NOTICE_BLOCK_NOTICE_TEXT_PROPERTY " +
+ "NOTICE_BLOCK_PERFORMER_PROPERTY " +
+ "NOTICE_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY " +
+ "NOTICE_BLOCK_SUBJECT_PROPERTY ";
+
+ // Object events
+ const object_events_constants =
+ "dseAfterCancel " +
+ "dseAfterClose " +
+ "dseAfterDelete " +
+ "dseAfterDeleteOutOfTransaction " +
+ "dseAfterInsert " +
+ "dseAfterOpen " +
+ "dseAfterScroll " +
+ "dseAfterUpdate " +
+ "dseAfterUpdateOutOfTransaction " +
+ "dseBeforeCancel " +
+ "dseBeforeClose " +
+ "dseBeforeDelete " +
+ "dseBeforeDetailUpdate " +
+ "dseBeforeInsert " +
+ "dseBeforeOpen " +
+ "dseBeforeUpdate " +
+ "dseOnAnyRequisiteChange " +
+ "dseOnCloseRecord " +
+ "dseOnDeleteError " +
+ "dseOnOpenRecord " +
+ "dseOnPrepareUpdate " +
+ "dseOnUpdateError " +
+ "dseOnUpdateRatifiedRecord " +
+ "dseOnValidDelete " +
+ "dseOnValidUpdate " +
+ "reOnChange " +
+ "reOnChangeValues " +
+ "SELECTION_BEGIN_ROUTE_EVENT " +
+ "SELECTION_END_ROUTE_EVENT ";
+
+ // Object params
+ const object_params_constants =
+ "CURRENT_PERIOD_IS_REQUIRED " +
+ "PREVIOUS_CARD_TYPE_NAME " +
+ "SHOW_RECORD_PROPERTIES_FORM ";
+
+ // Other
+ const other_constants =
+ "ACCESS_RIGHTS_SETTING_DIALOG_CODE " +
+ "ADMINISTRATOR_USER_CODE " +
+ "ANALYTIC_REPORT_TYPE " +
+ "asrtHideLocal " +
+ "asrtHideRemote " +
+ "CALCULATED_ROLE_TYPE_CODE " +
+ "COMPONENTS_REFERENCE_DEVELOPER_VIEW_CODE " +
+ "DCTS_TEST_PROTOCOLS_FOLDER_PATH " +
+ "E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED " +
+ "E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED_BY_USER " +
+ "E_EDOC_VERSION_ALREDY_SIGNED " +
+ "E_EDOC_VERSION_ALREDY_SIGNED_BY_USER " +
+ "EDOC_TYPES_CODE_REQUISITE_FIELD_NAME " +
+ "EDOCUMENTS_ALIAS_NAME " +
+ "FILES_FOLDER_PATH " +
+ "FILTER_OPERANDS_DELIMITER " +
+ "FILTER_OPERATIONS_DELIMITER " +
+ "FORMCARD_NAME " +
+ "FORMLIST_NAME " +
+ "GET_EXTENDED_DOCUMENT_EXTENSION_CREATION_MODE " +
+ "GET_EXTENDED_DOCUMENT_EXTENSION_IMPORT_MODE " +
+ "INTEGRATED_REPORT_TYPE " +
+ "IS_BUILDER_APPLICATION_ROLE " +
+ "IS_BUILDER_APPLICATION_ROLE2 " +
+ "IS_BUILDER_USERS " +
+ "ISBSYSDEV " +
+ "LOG_FOLDER_PATH " +
+ "mbCancel " +
+ "mbNo " +
+ "mbNoToAll " +
+ "mbOK " +
+ "mbYes " +
+ "mbYesToAll " +
+ "MEMORY_DATASET_DESRIPTIONS_FILENAME " +
+ "mrNo " +
+ "mrNoToAll " +
+ "mrYes " +
+ "mrYesToAll " +
+ "MULTIPLE_SELECT_DIALOG_CODE " +
+ "NONOPERATING_RECORD_FLAG_FEMININE " +
+ "NONOPERATING_RECORD_FLAG_MASCULINE " +
+ "OPERATING_RECORD_FLAG_FEMININE " +
+ "OPERATING_RECORD_FLAG_MASCULINE " +
+ "PROFILING_SETTINGS_COMMON_SETTINGS_CODE_VALUE " +
+ "PROGRAM_INITIATED_LOOKUP_ACTION " +
+ "ratDelete " +
+ "ratEdit " +
+ "ratInsert " +
+ "REPORT_TYPE " +
+ "REQUIRED_PICK_VALUES_VARIABLE " +
+ "rmCard " +
+ "rmList " +
+ "SBRTE_PROGID_DEV " +
+ "SBRTE_PROGID_RELEASE " +
+ "STATIC_ROLE_TYPE_CODE " +
+ "SUPPRESS_EMPTY_TEMPLATE_CREATION " +
+ "SYSTEM_USER_CODE " +
+ "UPDATE_DIALOG_DATASET " +
+ "USED_IN_OBJECT_HINT_PARAM " +
+ "USER_INITIATED_LOOKUP_ACTION " +
+ "USER_NAME_FORMAT " +
+ "USER_SELECTION_RESTRICTIONS " +
+ "WORKFLOW_TEST_PROTOCOLS_FOLDER_PATH " +
+ "ELS_SUBTYPE_CONTROL_NAME " +
+ "ELS_FOLDER_KIND_CONTROL_NAME " +
+ "REPEAT_PROCESS_CURRENT_OBJECT_EXCEPTION_NAME ";
+
+ // Privileges
+ const privileges_constants =
+ "PRIVILEGE_COMPONENT_FULL_ACCESS " +
+ "PRIVILEGE_DEVELOPMENT_EXPORT " +
+ "PRIVILEGE_DEVELOPMENT_IMPORT " +
+ "PRIVILEGE_DOCUMENT_DELETE " +
+ "PRIVILEGE_ESD " +
+ "PRIVILEGE_FOLDER_DELETE " +
+ "PRIVILEGE_MANAGE_ACCESS_RIGHTS " +
+ "PRIVILEGE_MANAGE_REPLICATION " +
+ "PRIVILEGE_MANAGE_SESSION_SERVER " +
+ "PRIVILEGE_OBJECT_FULL_ACCESS " +
+ "PRIVILEGE_OBJECT_VIEW " +
+ "PRIVILEGE_RESERVE_LICENSE " +
+ "PRIVILEGE_SYSTEM_CUSTOMIZE " +
+ "PRIVILEGE_SYSTEM_DEVELOP " +
+ "PRIVILEGE_SYSTEM_INSTALL " +
+ "PRIVILEGE_TASK_DELETE " +
+ "PRIVILEGE_USER_PLUGIN_SETTINGS_CUSTOMIZE " +
+ "PRIVILEGES_PSEUDOREFERENCE_CODE ";
+
+ // Pseudoreference code
+ const pseudoreference_code_constants =
+ "ACCESS_TYPES_PSEUDOREFERENCE_CODE " +
+ "ALL_AVAILABLE_COMPONENTS_PSEUDOREFERENCE_CODE " +
+ "ALL_AVAILABLE_PRIVILEGES_PSEUDOREFERENCE_CODE " +
+ "ALL_REPLICATE_COMPONENTS_PSEUDOREFERENCE_CODE " +
+ "AVAILABLE_DEVELOPERS_COMPONENTS_PSEUDOREFERENCE_CODE " +
+ "COMPONENTS_PSEUDOREFERENCE_CODE " +
+ "FILTRATER_SETTINGS_CONFLICTS_PSEUDOREFERENCE_CODE " +
+ "GROUPS_PSEUDOREFERENCE_CODE " +
+ "RECEIVE_PROTOCOL_PSEUDOREFERENCE_CODE " +
+ "REFERENCE_REQUISITE_PSEUDOREFERENCE_CODE " +
+ "REFERENCE_REQUISITES_PSEUDOREFERENCE_CODE " +
+ "REFTYPES_PSEUDOREFERENCE_CODE " +
+ "REPLICATION_SEANCES_DIARY_PSEUDOREFERENCE_CODE " +
+ "SEND_PROTOCOL_PSEUDOREFERENCE_CODE " +
+ "SUBSTITUTES_PSEUDOREFERENCE_CODE " +
+ "SYSTEM_SETTINGS_PSEUDOREFERENCE_CODE " +
+ "UNITS_PSEUDOREFERENCE_CODE " +
+ "USERS_PSEUDOREFERENCE_CODE " +
+ "VIEWERS_PSEUDOREFERENCE_CODE ";
+
+ // Requisite ISBCertificateType values
+ const requisite_ISBCertificateType_values_constants =
+ "CERTIFICATE_TYPE_ENCRYPT " +
+ "CERTIFICATE_TYPE_SIGN " +
+ "CERTIFICATE_TYPE_SIGN_AND_ENCRYPT ";
+
+ // Requisite ISBEDocStorageType values
+ const requisite_ISBEDocStorageType_values_constants =
+ "STORAGE_TYPE_FILE " +
+ "STORAGE_TYPE_NAS_CIFS " +
+ "STORAGE_TYPE_SAPERION " +
+ "STORAGE_TYPE_SQL_SERVER ";
+
+ // Requisite CompType2 values
+ const requisite_compType2_values_constants =
+ "COMPTYPE2_REQUISITE_DOCUMENTS_VALUE " +
+ "COMPTYPE2_REQUISITE_TASKS_VALUE " +
+ "COMPTYPE2_REQUISITE_FOLDERS_VALUE " +
+ "COMPTYPE2_REQUISITE_REFERENCES_VALUE ";
+
+ // Requisite name
+ const requisite_name_constants =
+ "SYSREQ_CODE " +
+ "SYSREQ_COMPTYPE2 " +
+ "SYSREQ_CONST_AVAILABLE_FOR_WEB " +
+ "SYSREQ_CONST_COMMON_CODE " +
+ "SYSREQ_CONST_COMMON_VALUE " +
+ "SYSREQ_CONST_FIRM_CODE " +
+ "SYSREQ_CONST_FIRM_STATUS " +
+ "SYSREQ_CONST_FIRM_VALUE " +
+ "SYSREQ_CONST_SERVER_STATUS " +
+ "SYSREQ_CONTENTS " +
+ "SYSREQ_DATE_OPEN " +
+ "SYSREQ_DATE_CLOSE " +
+ "SYSREQ_DESCRIPTION " +
+ "SYSREQ_DESCRIPTION_LOCALIZE_ID " +
+ "SYSREQ_DOUBLE " +
+ "SYSREQ_EDOC_ACCESS_TYPE " +
+ "SYSREQ_EDOC_AUTHOR " +
+ "SYSREQ_EDOC_CREATED " +
+ "SYSREQ_EDOC_DELEGATE_RIGHTS_REQUISITE_CODE " +
+ "SYSREQ_EDOC_EDITOR " +
+ "SYSREQ_EDOC_ENCODE_TYPE " +
+ "SYSREQ_EDOC_ENCRYPTION_PLUGIN_NAME " +
+ "SYSREQ_EDOC_ENCRYPTION_PLUGIN_VERSION " +
+ "SYSREQ_EDOC_EXPORT_DATE " +
+ "SYSREQ_EDOC_EXPORTER " +
+ "SYSREQ_EDOC_KIND " +
+ "SYSREQ_EDOC_LIFE_STAGE_NAME " +
+ "SYSREQ_EDOC_LOCKED_FOR_SERVER_CODE " +
+ "SYSREQ_EDOC_MODIFIED " +
+ "SYSREQ_EDOC_NAME " +
+ "SYSREQ_EDOC_NOTE " +
+ "SYSREQ_EDOC_QUALIFIED_ID " +
+ "SYSREQ_EDOC_SESSION_KEY " +
+ "SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_NAME " +
+ "SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_VERSION " +
+ "SYSREQ_EDOC_SIGNATURE_TYPE " +
+ "SYSREQ_EDOC_SIGNED " +
+ "SYSREQ_EDOC_STORAGE " +
+ "SYSREQ_EDOC_STORAGES_ARCHIVE_STORAGE " +
+ "SYSREQ_EDOC_STORAGES_CHECK_RIGHTS " +
+ "SYSREQ_EDOC_STORAGES_COMPUTER_NAME " +
+ "SYSREQ_EDOC_STORAGES_EDIT_IN_STORAGE " +
+ "SYSREQ_EDOC_STORAGES_EXECUTIVE_STORAGE " +
+ "SYSREQ_EDOC_STORAGES_FUNCTION " +
+ "SYSREQ_EDOC_STORAGES_INITIALIZED " +
+ "SYSREQ_EDOC_STORAGES_LOCAL_PATH " +
+ "SYSREQ_EDOC_STORAGES_SAPERION_DATABASE_NAME " +
+ "SYSREQ_EDOC_STORAGES_SEARCH_BY_TEXT " +
+ "SYSREQ_EDOC_STORAGES_SERVER_NAME " +
+ "SYSREQ_EDOC_STORAGES_SHARED_SOURCE_NAME " +
+ "SYSREQ_EDOC_STORAGES_TYPE " +
+ "SYSREQ_EDOC_TEXT_MODIFIED " +
+ "SYSREQ_EDOC_TYPE_ACT_CODE " +
+ "SYSREQ_EDOC_TYPE_ACT_DESCRIPTION " +
+ "SYSREQ_EDOC_TYPE_ACT_DESCRIPTION_LOCALIZE_ID " +
+ "SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE " +
+ "SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE_EXISTS " +
+ "SYSREQ_EDOC_TYPE_ACT_SECTION " +
+ "SYSREQ_EDOC_TYPE_ADD_PARAMS " +
+ "SYSREQ_EDOC_TYPE_COMMENT " +
+ "SYSREQ_EDOC_TYPE_EVENT_TEXT " +
+ "SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR " +
+ "SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID " +
+ "SYSREQ_EDOC_TYPE_NAME_LOCALIZE_ID " +
+ "SYSREQ_EDOC_TYPE_NUMERATION_METHOD " +
+ "SYSREQ_EDOC_TYPE_PSEUDO_REQUISITE_CODE " +
+ "SYSREQ_EDOC_TYPE_REQ_CODE " +
+ "SYSREQ_EDOC_TYPE_REQ_DESCRIPTION " +
+ "SYSREQ_EDOC_TYPE_REQ_DESCRIPTION_LOCALIZE_ID " +
+ "SYSREQ_EDOC_TYPE_REQ_IS_LEADING " +
+ "SYSREQ_EDOC_TYPE_REQ_IS_REQUIRED " +
+ "SYSREQ_EDOC_TYPE_REQ_NUMBER " +
+ "SYSREQ_EDOC_TYPE_REQ_ON_CHANGE " +
+ "SYSREQ_EDOC_TYPE_REQ_ON_CHANGE_EXISTS " +
+ "SYSREQ_EDOC_TYPE_REQ_ON_SELECT " +
+ "SYSREQ_EDOC_TYPE_REQ_ON_SELECT_KIND " +
+ "SYSREQ_EDOC_TYPE_REQ_SECTION " +
+ "SYSREQ_EDOC_TYPE_VIEW_CARD " +
+ "SYSREQ_EDOC_TYPE_VIEW_CODE " +
+ "SYSREQ_EDOC_TYPE_VIEW_COMMENT " +
+ "SYSREQ_EDOC_TYPE_VIEW_IS_MAIN " +
+ "SYSREQ_EDOC_TYPE_VIEW_NAME " +
+ "SYSREQ_EDOC_TYPE_VIEW_NAME_LOCALIZE_ID " +
+ "SYSREQ_EDOC_VERSION_AUTHOR " +
+ "SYSREQ_EDOC_VERSION_CRC " +
+ "SYSREQ_EDOC_VERSION_DATA " +
+ "SYSREQ_EDOC_VERSION_EDITOR " +
+ "SYSREQ_EDOC_VERSION_EXPORT_DATE " +
+ "SYSREQ_EDOC_VERSION_EXPORTER " +
+ "SYSREQ_EDOC_VERSION_HIDDEN " +
+ "SYSREQ_EDOC_VERSION_LIFE_STAGE " +
+ "SYSREQ_EDOC_VERSION_MODIFIED " +
+ "SYSREQ_EDOC_VERSION_NOTE " +
+ "SYSREQ_EDOC_VERSION_SIGNATURE_TYPE " +
+ "SYSREQ_EDOC_VERSION_SIGNED " +
+ "SYSREQ_EDOC_VERSION_SIZE " +
+ "SYSREQ_EDOC_VERSION_SOURCE " +
+ "SYSREQ_EDOC_VERSION_TEXT_MODIFIED " +
+ "SYSREQ_EDOCKIND_DEFAULT_VERSION_STATE_CODE " +
+ "SYSREQ_FOLDER_KIND " +
+ "SYSREQ_FUNC_CATEGORY " +
+ "SYSREQ_FUNC_COMMENT " +
+ "SYSREQ_FUNC_GROUP " +
+ "SYSREQ_FUNC_GROUP_COMMENT " +
+ "SYSREQ_FUNC_GROUP_NUMBER " +
+ "SYSREQ_FUNC_HELP " +
+ "SYSREQ_FUNC_PARAM_DEF_VALUE " +
+ "SYSREQ_FUNC_PARAM_IDENT " +
+ "SYSREQ_FUNC_PARAM_NUMBER " +
+ "SYSREQ_FUNC_PARAM_TYPE " +
+ "SYSREQ_FUNC_TEXT " +
+ "SYSREQ_GROUP_CATEGORY " +
+ "SYSREQ_ID " +
+ "SYSREQ_LAST_UPDATE " +
+ "SYSREQ_LEADER_REFERENCE " +
+ "SYSREQ_LINE_NUMBER " +
+ "SYSREQ_MAIN_RECORD_ID " +
+ "SYSREQ_NAME " +
+ "SYSREQ_NAME_LOCALIZE_ID " +
+ "SYSREQ_NOTE " +
+ "SYSREQ_ORIGINAL_RECORD " +
+ "SYSREQ_OUR_FIRM " +
+ "SYSREQ_PROFILING_SETTINGS_BATCH_LOGING " +
+ "SYSREQ_PROFILING_SETTINGS_BATCH_SIZE " +
+ "SYSREQ_PROFILING_SETTINGS_PROFILING_ENABLED " +
+ "SYSREQ_PROFILING_SETTINGS_SQL_PROFILING_ENABLED " +
+ "SYSREQ_PROFILING_SETTINGS_START_LOGGED " +
+ "SYSREQ_RECORD_STATUS " +
+ "SYSREQ_REF_REQ_FIELD_NAME " +
+ "SYSREQ_REF_REQ_FORMAT " +
+ "SYSREQ_REF_REQ_GENERATED " +
+ "SYSREQ_REF_REQ_LENGTH " +
+ "SYSREQ_REF_REQ_PRECISION " +
+ "SYSREQ_REF_REQ_REFERENCE " +
+ "SYSREQ_REF_REQ_SECTION " +
+ "SYSREQ_REF_REQ_STORED " +
+ "SYSREQ_REF_REQ_TOKENS " +
+ "SYSREQ_REF_REQ_TYPE " +
+ "SYSREQ_REF_REQ_VIEW " +
+ "SYSREQ_REF_TYPE_ACT_CODE " +
+ "SYSREQ_REF_TYPE_ACT_DESCRIPTION " +
+ "SYSREQ_REF_TYPE_ACT_DESCRIPTION_LOCALIZE_ID " +
+ "SYSREQ_REF_TYPE_ACT_ON_EXECUTE " +
+ "SYSREQ_REF_TYPE_ACT_ON_EXECUTE_EXISTS " +
+ "SYSREQ_REF_TYPE_ACT_SECTION " +
+ "SYSREQ_REF_TYPE_ADD_PARAMS " +
+ "SYSREQ_REF_TYPE_COMMENT " +
+ "SYSREQ_REF_TYPE_COMMON_SETTINGS " +
+ "SYSREQ_REF_TYPE_DISPLAY_REQUISITE_NAME " +
+ "SYSREQ_REF_TYPE_EVENT_TEXT " +
+ "SYSREQ_REF_TYPE_MAIN_LEADING_REF " +
+ "SYSREQ_REF_TYPE_NAME_IN_SINGULAR " +
+ "SYSREQ_REF_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID " +
+ "SYSREQ_REF_TYPE_NAME_LOCALIZE_ID " +
+ "SYSREQ_REF_TYPE_NUMERATION_METHOD " +
+ "SYSREQ_REF_TYPE_REQ_CODE " +
+ "SYSREQ_REF_TYPE_REQ_DESCRIPTION " +
+ "SYSREQ_REF_TYPE_REQ_DESCRIPTION_LOCALIZE_ID " +
+ "SYSREQ_REF_TYPE_REQ_IS_CONTROL " +
+ "SYSREQ_REF_TYPE_REQ_IS_FILTER " +
+ "SYSREQ_REF_TYPE_REQ_IS_LEADING " +
+ "SYSREQ_REF_TYPE_REQ_IS_REQUIRED " +
+ "SYSREQ_REF_TYPE_REQ_NUMBER " +
+ "SYSREQ_REF_TYPE_REQ_ON_CHANGE " +
+ "SYSREQ_REF_TYPE_REQ_ON_CHANGE_EXISTS " +
+ "SYSREQ_REF_TYPE_REQ_ON_SELECT " +
+ "SYSREQ_REF_TYPE_REQ_ON_SELECT_KIND " +
+ "SYSREQ_REF_TYPE_REQ_SECTION " +
+ "SYSREQ_REF_TYPE_VIEW_CARD " +
+ "SYSREQ_REF_TYPE_VIEW_CODE " +
+ "SYSREQ_REF_TYPE_VIEW_COMMENT " +
+ "SYSREQ_REF_TYPE_VIEW_IS_MAIN " +
+ "SYSREQ_REF_TYPE_VIEW_NAME " +
+ "SYSREQ_REF_TYPE_VIEW_NAME_LOCALIZE_ID " +
+ "SYSREQ_REFERENCE_TYPE_ID " +
+ "SYSREQ_STATE " +
+ "SYSREQ_STATЕ " +
+ "SYSREQ_SYSTEM_SETTINGS_VALUE " +
+ "SYSREQ_TYPE " +
+ "SYSREQ_UNIT " +
+ "SYSREQ_UNIT_ID " +
+ "SYSREQ_USER_GROUPS_GROUP_FULL_NAME " +
+ "SYSREQ_USER_GROUPS_GROUP_NAME " +
+ "SYSREQ_USER_GROUPS_GROUP_SERVER_NAME " +
+ "SYSREQ_USERS_ACCESS_RIGHTS " +
+ "SYSREQ_USERS_AUTHENTICATION " +
+ "SYSREQ_USERS_CATEGORY " +
+ "SYSREQ_USERS_COMPONENT " +
+ "SYSREQ_USERS_COMPONENT_USER_IS_PUBLIC " +
+ "SYSREQ_USERS_DOMAIN " +
+ "SYSREQ_USERS_FULL_USER_NAME " +
+ "SYSREQ_USERS_GROUP " +
+ "SYSREQ_USERS_IS_MAIN_SERVER " +
+ "SYSREQ_USERS_LOGIN " +
+ "SYSREQ_USERS_REFERENCE_USER_IS_PUBLIC " +
+ "SYSREQ_USERS_STATUS " +
+ "SYSREQ_USERS_USER_CERTIFICATE " +
+ "SYSREQ_USERS_USER_CERTIFICATE_INFO " +
+ "SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_NAME " +
+ "SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_VERSION " +
+ "SYSREQ_USERS_USER_CERTIFICATE_STATE " +
+ "SYSREQ_USERS_USER_CERTIFICATE_SUBJECT_NAME " +
+ "SYSREQ_USERS_USER_CERTIFICATE_THUMBPRINT " +
+ "SYSREQ_USERS_USER_DEFAULT_CERTIFICATE " +
+ "SYSREQ_USERS_USER_DESCRIPTION " +
+ "SYSREQ_USERS_USER_GLOBAL_NAME " +
+ "SYSREQ_USERS_USER_LOGIN " +
+ "SYSREQ_USERS_USER_MAIN_SERVER " +
+ "SYSREQ_USERS_USER_TYPE " +
+ "SYSREQ_WORK_RULES_FOLDER_ID ";
+
+ // Result
+ const result_constants = "RESULT_VAR_NAME RESULT_VAR_NAME_ENG ";
+
+ // Rule identification
+ const rule_identification_constants =
+ "AUTO_NUMERATION_RULE_ID " +
+ "CANT_CHANGE_ID_REQUISITE_RULE_ID " +
+ "CANT_CHANGE_OURFIRM_REQUISITE_RULE_ID " +
+ "CHECK_CHANGING_REFERENCE_RECORD_USE_RULE_ID " +
+ "CHECK_CODE_REQUISITE_RULE_ID " +
+ "CHECK_DELETING_REFERENCE_RECORD_USE_RULE_ID " +
+ "CHECK_FILTRATER_CHANGES_RULE_ID " +
+ "CHECK_RECORD_INTERVAL_RULE_ID " +
+ "CHECK_REFERENCE_INTERVAL_RULE_ID " +
+ "CHECK_REQUIRED_DATA_FULLNESS_RULE_ID " +
+ "CHECK_REQUIRED_REQUISITES_FULLNESS_RULE_ID " +
+ "MAKE_RECORD_UNRATIFIED_RULE_ID " +
+ "RESTORE_AUTO_NUMERATION_RULE_ID " +
+ "SET_FIRM_CONTEXT_FROM_RECORD_RULE_ID " +
+ "SET_FIRST_RECORD_IN_LIST_FORM_RULE_ID " +
+ "SET_IDSPS_VALUE_RULE_ID " +
+ "SET_NEXT_CODE_VALUE_RULE_ID " +
+ "SET_OURFIRM_BOUNDS_RULE_ID " +
+ "SET_OURFIRM_REQUISITE_RULE_ID ";
+
+ // Script block properties
+ const script_block_properties_constants =
+ "SCRIPT_BLOCK_AFTER_FINISH_EVENT " +
+ "SCRIPT_BLOCK_BEFORE_START_EVENT " +
+ "SCRIPT_BLOCK_EXECUTION_RESULTS_PROPERTY " +
+ "SCRIPT_BLOCK_NAME_PROPERTY " +
+ "SCRIPT_BLOCK_SCRIPT_PROPERTY ";
+
+ // Subtask block properties
+ const subtask_block_properties_constants =
+ "SUBTASK_BLOCK_ABORT_DEADLINE_PROPERTY " +
+ "SUBTASK_BLOCK_AFTER_FINISH_EVENT " +
+ "SUBTASK_BLOCK_ASSIGN_PARAMS_EVENT " +
+ "SUBTASK_BLOCK_ATTACHMENTS_PROPERTY " +
+ "SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY " +
+ "SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY " +
+ "SUBTASK_BLOCK_BEFORE_START_EVENT " +
+ "SUBTASK_BLOCK_CREATED_TASK_PROPERTY " +
+ "SUBTASK_BLOCK_CREATION_EVENT " +
+ "SUBTASK_BLOCK_DEADLINE_PROPERTY " +
+ "SUBTASK_BLOCK_IMPORTANCE_PROPERTY " +
+ "SUBTASK_BLOCK_INITIATOR_PROPERTY " +
+ "SUBTASK_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY " +
+ "SUBTASK_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY " +
+ "SUBTASK_BLOCK_JOBS_TYPE_PROPERTY " +
+ "SUBTASK_BLOCK_NAME_PROPERTY " +
+ "SUBTASK_BLOCK_PARALLEL_ROUTE_PROPERTY " +
+ "SUBTASK_BLOCK_PERFORMERS_PROPERTY " +
+ "SUBTASK_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY " +
+ "SUBTASK_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY " +
+ "SUBTASK_BLOCK_REQUIRE_SIGN_PROPERTY " +
+ "SUBTASK_BLOCK_STANDARD_ROUTE_PROPERTY " +
+ "SUBTASK_BLOCK_START_EVENT " +
+ "SUBTASK_BLOCK_STEP_CONTROL_PROPERTY " +
+ "SUBTASK_BLOCK_SUBJECT_PROPERTY " +
+ "SUBTASK_BLOCK_TASK_CONTROL_PROPERTY " +
+ "SUBTASK_BLOCK_TEXT_PROPERTY " +
+ "SUBTASK_BLOCK_UNLOCK_ATTACHMENTS_ON_STOP_PROPERTY " +
+ "SUBTASK_BLOCK_USE_STANDARD_ROUTE_PROPERTY " +
+ "SUBTASK_BLOCK_WAIT_FOR_TASK_COMPLETE_PROPERTY ";
+
+ // System component
+ const system_component_constants =
+ "SYSCOMP_CONTROL_JOBS " +
+ "SYSCOMP_FOLDERS " +
+ "SYSCOMP_JOBS " +
+ "SYSCOMP_NOTICES " +
+ "SYSCOMP_TASKS ";
+
+ // System dialogs
+ const system_dialogs_constants =
+ "SYSDLG_CREATE_EDOCUMENT " +
+ "SYSDLG_CREATE_EDOCUMENT_VERSION " +
+ "SYSDLG_CURRENT_PERIOD " +
+ "SYSDLG_EDIT_FUNCTION_HELP " +
+ "SYSDLG_EDOCUMENT_KINDS_FOR_TEMPLATE " +
+ "SYSDLG_EXPORT_MULTIPLE_EDOCUMENTS " +
+ "SYSDLG_EXPORT_SINGLE_EDOCUMENT " +
+ "SYSDLG_IMPORT_EDOCUMENT " +
+ "SYSDLG_MULTIPLE_SELECT " +
+ "SYSDLG_SETUP_ACCESS_RIGHTS " +
+ "SYSDLG_SETUP_DEFAULT_RIGHTS " +
+ "SYSDLG_SETUP_FILTER_CONDITION " +
+ "SYSDLG_SETUP_SIGN_RIGHTS " +
+ "SYSDLG_SETUP_TASK_OBSERVERS " +
+ "SYSDLG_SETUP_TASK_ROUTE " +
+ "SYSDLG_SETUP_USERS_LIST " +
+ "SYSDLG_SIGN_EDOCUMENT " +
+ "SYSDLG_SIGN_MULTIPLE_EDOCUMENTS ";
+
+ // System reference names
+ const system_reference_names_constants =
+ "SYSREF_ACCESS_RIGHTS_TYPES " +
+ "SYSREF_ADMINISTRATION_HISTORY " +
+ "SYSREF_ALL_AVAILABLE_COMPONENTS " +
+ "SYSREF_ALL_AVAILABLE_PRIVILEGES " +
+ "SYSREF_ALL_REPLICATING_COMPONENTS " +
+ "SYSREF_AVAILABLE_DEVELOPERS_COMPONENTS " +
+ "SYSREF_CALENDAR_EVENTS " +
+ "SYSREF_COMPONENT_TOKEN_HISTORY " +
+ "SYSREF_COMPONENT_TOKENS " +
+ "SYSREF_COMPONENTS " +
+ "SYSREF_CONSTANTS " +
+ "SYSREF_DATA_RECEIVE_PROTOCOL " +
+ "SYSREF_DATA_SEND_PROTOCOL " +
+ "SYSREF_DIALOGS " +
+ "SYSREF_DIALOGS_REQUISITES " +
+ "SYSREF_EDITORS " +
+ "SYSREF_EDOC_CARDS " +
+ "SYSREF_EDOC_TYPES " +
+ "SYSREF_EDOCUMENT_CARD_REQUISITES " +
+ "SYSREF_EDOCUMENT_CARD_TYPES " +
+ "SYSREF_EDOCUMENT_CARD_TYPES_REFERENCE " +
+ "SYSREF_EDOCUMENT_CARDS " +
+ "SYSREF_EDOCUMENT_HISTORY " +
+ "SYSREF_EDOCUMENT_KINDS " +
+ "SYSREF_EDOCUMENT_REQUISITES " +
+ "SYSREF_EDOCUMENT_SIGNATURES " +
+ "SYSREF_EDOCUMENT_TEMPLATES " +
+ "SYSREF_EDOCUMENT_TEXT_STORAGES " +
+ "SYSREF_EDOCUMENT_VIEWS " +
+ "SYSREF_FILTERER_SETUP_CONFLICTS " +
+ "SYSREF_FILTRATER_SETTING_CONFLICTS " +
+ "SYSREF_FOLDER_HISTORY " +
+ "SYSREF_FOLDERS " +
+ "SYSREF_FUNCTION_GROUPS " +
+ "SYSREF_FUNCTION_PARAMS " +
+ "SYSREF_FUNCTIONS " +
+ "SYSREF_JOB_HISTORY " +
+ "SYSREF_LINKS " +
+ "SYSREF_LOCALIZATION_DICTIONARY " +
+ "SYSREF_LOCALIZATION_LANGUAGES " +
+ "SYSREF_MODULES " +
+ "SYSREF_PRIVILEGES " +
+ "SYSREF_RECORD_HISTORY " +
+ "SYSREF_REFERENCE_REQUISITES " +
+ "SYSREF_REFERENCE_TYPE_VIEWS " +
+ "SYSREF_REFERENCE_TYPES " +
+ "SYSREF_REFERENCES " +
+ "SYSREF_REFERENCES_REQUISITES " +
+ "SYSREF_REMOTE_SERVERS " +
+ "SYSREF_REPLICATION_SESSIONS_LOG " +
+ "SYSREF_REPLICATION_SESSIONS_PROTOCOL " +
+ "SYSREF_REPORTS " +
+ "SYSREF_ROLES " +
+ "SYSREF_ROUTE_BLOCK_GROUPS " +
+ "SYSREF_ROUTE_BLOCKS " +
+ "SYSREF_SCRIPTS " +
+ "SYSREF_SEARCHES " +
+ "SYSREF_SERVER_EVENTS " +
+ "SYSREF_SERVER_EVENTS_HISTORY " +
+ "SYSREF_STANDARD_ROUTE_GROUPS " +
+ "SYSREF_STANDARD_ROUTES " +
+ "SYSREF_STATUSES " +
+ "SYSREF_SYSTEM_SETTINGS " +
+ "SYSREF_TASK_HISTORY " +
+ "SYSREF_TASK_KIND_GROUPS " +
+ "SYSREF_TASK_KINDS " +
+ "SYSREF_TASK_RIGHTS " +
+ "SYSREF_TASK_SIGNATURES " +
+ "SYSREF_TASKS " +
+ "SYSREF_UNITS " +
+ "SYSREF_USER_GROUPS " +
+ "SYSREF_USER_GROUPS_REFERENCE " +
+ "SYSREF_USER_SUBSTITUTION " +
+ "SYSREF_USERS " +
+ "SYSREF_USERS_REFERENCE " +
+ "SYSREF_VIEWERS " +
+ "SYSREF_WORKING_TIME_CALENDARS ";
+
+ // Table name
+ const table_name_constants =
+ "ACCESS_RIGHTS_TABLE_NAME " +
+ "EDMS_ACCESS_TABLE_NAME " +
+ "EDOC_TYPES_TABLE_NAME ";
+
+ // Test
+ const test_constants =
+ "TEST_DEV_DB_NAME " +
+ "TEST_DEV_SYSTEM_CODE " +
+ "TEST_EDMS_DB_NAME " +
+ "TEST_EDMS_MAIN_CODE " +
+ "TEST_EDMS_MAIN_DB_NAME " +
+ "TEST_EDMS_SECOND_CODE " +
+ "TEST_EDMS_SECOND_DB_NAME " +
+ "TEST_EDMS_SYSTEM_CODE " +
+ "TEST_ISB5_MAIN_CODE " +
+ "TEST_ISB5_SECOND_CODE " +
+ "TEST_SQL_SERVER_2005_NAME " +
+ "TEST_SQL_SERVER_NAME ";
+
+ // Using the dialog windows
+ const using_the_dialog_windows_constants =
+ "ATTENTION_CAPTION " +
+ "cbsCommandLinks " +
+ "cbsDefault " +
+ "CONFIRMATION_CAPTION " +
+ "ERROR_CAPTION " +
+ "INFORMATION_CAPTION " +
+ "mrCancel " +
+ "mrOk ";
+
+ // Using the document
+ const using_the_document_constants =
+ "EDOC_VERSION_ACTIVE_STAGE_CODE " +
+ "EDOC_VERSION_DESIGN_STAGE_CODE " +
+ "EDOC_VERSION_OBSOLETE_STAGE_CODE ";
+
+ // Using the EA and encryption
+ const using_the_EA_and_encryption_constants =
+ "cpDataEnciphermentEnabled " +
+ "cpDigitalSignatureEnabled " +
+ "cpID " +
+ "cpIssuer " +
+ "cpPluginVersion " +
+ "cpSerial " +
+ "cpSubjectName " +
+ "cpSubjSimpleName " +
+ "cpValidFromDate " +
+ "cpValidToDate ";
+
+ // Using the ISBL-editor
+ const using_the_ISBL_editor_constants =
+ "ISBL_SYNTAX " + "NO_SYNTAX " + "XML_SYNTAX ";
+
+ // Wait block properties
+ const wait_block_properties_constants =
+ "WAIT_BLOCK_AFTER_FINISH_EVENT " +
+ "WAIT_BLOCK_BEFORE_START_EVENT " +
+ "WAIT_BLOCK_DEADLINE_PROPERTY " +
+ "WAIT_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY " +
+ "WAIT_BLOCK_NAME_PROPERTY " +
+ "WAIT_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY ";
+
+ // SYSRES Common
+ const sysres_common_constants =
+ "SYSRES_COMMON " +
+ "SYSRES_CONST " +
+ "SYSRES_MBFUNC " +
+ "SYSRES_SBDATA " +
+ "SYSRES_SBGUI " +
+ "SYSRES_SBINTF " +
+ "SYSRES_SBREFDSC " +
+ "SYSRES_SQLERRORS " +
+ "SYSRES_SYSCOMP ";
+
+ // Константы ==> built_in
+ const CONSTANTS =
+ sysres_constants +
+ base_constants +
+ base_group_name_constants +
+ decision_block_properties_constants +
+ file_extension_constants +
+ job_block_properties_constants +
+ language_code_constants +
+ launching_external_applications_constants +
+ link_kind_constants +
+ lock_type_constants +
+ monitor_block_properties_constants +
+ notice_block_properties_constants +
+ object_events_constants +
+ object_params_constants +
+ other_constants +
+ privileges_constants +
+ pseudoreference_code_constants +
+ requisite_ISBCertificateType_values_constants +
+ requisite_ISBEDocStorageType_values_constants +
+ requisite_compType2_values_constants +
+ requisite_name_constants +
+ result_constants +
+ rule_identification_constants +
+ script_block_properties_constants +
+ subtask_block_properties_constants +
+ system_component_constants +
+ system_dialogs_constants +
+ system_reference_names_constants +
+ table_name_constants +
+ test_constants +
+ using_the_dialog_windows_constants +
+ using_the_document_constants +
+ using_the_EA_and_encryption_constants +
+ using_the_ISBL_editor_constants +
+ wait_block_properties_constants +
+ sysres_common_constants;
+
+ // enum TAccountType
+ const TAccountType = "atUser atGroup atRole ";
+
+ // enum TActionEnabledMode
+ const TActionEnabledMode =
+ "aemEnabledAlways " +
+ "aemDisabledAlways " +
+ "aemEnabledOnBrowse " +
+ "aemEnabledOnEdit " +
+ "aemDisabledOnBrowseEmpty ";
+
+ // enum TAddPosition
+ const TAddPosition = "apBegin apEnd ";
+
+ // enum TAlignment
+ const TAlignment = "alLeft alRight ";
+
+ // enum TAreaShowMode
+ const TAreaShowMode =
+ "asmNever " +
+ "asmNoButCustomize " +
+ "asmAsLastTime " +
+ "asmYesButCustomize " +
+ "asmAlways ";
+
+ // enum TCertificateInvalidationReason
+ const TCertificateInvalidationReason = "cirCommon cirRevoked ";
+
+ // enum TCertificateType
+ const TCertificateType = "ctSignature ctEncode ctSignatureEncode ";
+
+ // enum TCheckListBoxItemState
+ const TCheckListBoxItemState = "clbUnchecked clbChecked clbGrayed ";
+
+ // enum TCloseOnEsc
+ const TCloseOnEsc = "ceISB ceAlways ceNever ";
+
+ // enum TCompType
+ const TCompType =
+ "ctDocument " +
+ "ctReference " +
+ "ctScript " +
+ "ctUnknown " +
+ "ctReport " +
+ "ctDialog " +
+ "ctFunction " +
+ "ctFolder " +
+ "ctEDocument " +
+ "ctTask " +
+ "ctJob " +
+ "ctNotice " +
+ "ctControlJob ";
+
+ // enum TConditionFormat
+ const TConditionFormat = "cfInternal cfDisplay ";
+
+ // enum TConnectionIntent
+ const TConnectionIntent = "ciUnspecified ciWrite ciRead ";
+
+ // enum TContentKind
+ const TContentKind =
+ "ckFolder " +
+ "ckEDocument " +
+ "ckTask " +
+ "ckJob " +
+ "ckComponentToken " +
+ "ckAny " +
+ "ckReference " +
+ "ckScript " +
+ "ckReport " +
+ "ckDialog ";
+
+ // enum TControlType
+ const TControlType =
+ "ctISBLEditor " +
+ "ctBevel " +
+ "ctButton " +
+ "ctCheckListBox " +
+ "ctComboBox " +
+ "ctComboEdit " +
+ "ctGrid " +
+ "ctDBCheckBox " +
+ "ctDBComboBox " +
+ "ctDBEdit " +
+ "ctDBEllipsis " +
+ "ctDBMemo " +
+ "ctDBNavigator " +
+ "ctDBRadioGroup " +
+ "ctDBStatusLabel " +
+ "ctEdit " +
+ "ctGroupBox " +
+ "ctInplaceHint " +
+ "ctMemo " +
+ "ctPanel " +
+ "ctListBox " +
+ "ctRadioButton " +
+ "ctRichEdit " +
+ "ctTabSheet " +
+ "ctWebBrowser " +
+ "ctImage " +
+ "ctHyperLink " +
+ "ctLabel " +
+ "ctDBMultiEllipsis " +
+ "ctRibbon " +
+ "ctRichView " +
+ "ctInnerPanel " +
+ "ctPanelGroup " +
+ "ctBitButton ";
+
+ // enum TCriterionContentType
+ const TCriterionContentType =
+ "cctDate " +
+ "cctInteger " +
+ "cctNumeric " +
+ "cctPick " +
+ "cctReference " +
+ "cctString " +
+ "cctText ";
+
+ // enum TCultureType
+ const TCultureType = "cltInternal cltPrimary cltGUI ";
+
+ // enum TDataSetEventType
+ const TDataSetEventType =
+ "dseBeforeOpen " +
+ "dseAfterOpen " +
+ "dseBeforeClose " +
+ "dseAfterClose " +
+ "dseOnValidDelete " +
+ "dseBeforeDelete " +
+ "dseAfterDelete " +
+ "dseAfterDeleteOutOfTransaction " +
+ "dseOnDeleteError " +
+ "dseBeforeInsert " +
+ "dseAfterInsert " +
+ "dseOnValidUpdate " +
+ "dseBeforeUpdate " +
+ "dseOnUpdateRatifiedRecord " +
+ "dseAfterUpdate " +
+ "dseAfterUpdateOutOfTransaction " +
+ "dseOnUpdateError " +
+ "dseAfterScroll " +
+ "dseOnOpenRecord " +
+ "dseOnCloseRecord " +
+ "dseBeforeCancel " +
+ "dseAfterCancel " +
+ "dseOnUpdateDeadlockError " +
+ "dseBeforeDetailUpdate " +
+ "dseOnPrepareUpdate " +
+ "dseOnAnyRequisiteChange ";
+
+ // enum TDataSetState
+ const TDataSetState = "dssEdit dssInsert dssBrowse dssInActive ";
+
+ // enum TDateFormatType
+ const TDateFormatType = "dftDate dftShortDate dftDateTime dftTimeStamp ";
+
+ // enum TDateOffsetType
+ const TDateOffsetType = "dotDays dotHours dotMinutes dotSeconds ";
+
+ // enum TDateTimeKind
+ const TDateTimeKind = "dtkndLocal dtkndUTC ";
+
+ // enum TDeaAccessRights
+ const TDeaAccessRights = "arNone arView arEdit arFull ";
+
+ // enum TDocumentDefaultAction
+ const TDocumentDefaultAction = "ddaView ddaEdit ";
+
+ // enum TEditMode
+ const TEditMode =
+ "emLock " +
+ "emEdit " +
+ "emSign " +
+ "emExportWithLock " +
+ "emImportWithUnlock " +
+ "emChangeVersionNote " +
+ "emOpenForModify " +
+ "emChangeLifeStage " +
+ "emDelete " +
+ "emCreateVersion " +
+ "emImport " +
+ "emUnlockExportedWithLock " +
+ "emStart " +
+ "emAbort " +
+ "emReInit " +
+ "emMarkAsReaded " +
+ "emMarkAsUnreaded " +
+ "emPerform " +
+ "emAccept " +
+ "emResume " +
+ "emChangeRights " +
+ "emEditRoute " +
+ "emEditObserver " +
+ "emRecoveryFromLocalCopy " +
+ "emChangeWorkAccessType " +
+ "emChangeEncodeTypeToCertificate " +
+ "emChangeEncodeTypeToPassword " +
+ "emChangeEncodeTypeToNone " +
+ "emChangeEncodeTypeToCertificatePassword " +
+ "emChangeStandardRoute " +
+ "emGetText " +
+ "emOpenForView " +
+ "emMoveToStorage " +
+ "emCreateObject " +
+ "emChangeVersionHidden " +
+ "emDeleteVersion " +
+ "emChangeLifeCycleStage " +
+ "emApprovingSign " +
+ "emExport " +
+ "emContinue " +
+ "emLockFromEdit " +
+ "emUnLockForEdit " +
+ "emLockForServer " +
+ "emUnlockFromServer " +
+ "emDelegateAccessRights " +
+ "emReEncode ";
+
+ // enum TEditorCloseObservType
+ const TEditorCloseObservType = "ecotFile ecotProcess ";
+
+ // enum TEdmsApplicationAction
+ const TEdmsApplicationAction = "eaGet eaCopy eaCreate eaCreateStandardRoute ";
+
+ // enum TEDocumentLockType
+ const TEDocumentLockType = "edltAll edltNothing edltQuery ";
+
+ // enum TEDocumentStepShowMode
+ const TEDocumentStepShowMode = "essmText essmCard ";
+
+ // enum TEDocumentStepVersionType
+ const TEDocumentStepVersionType = "esvtLast esvtLastActive esvtSpecified ";
+
+ // enum TEDocumentStorageFunction
+ const TEDocumentStorageFunction = "edsfExecutive edsfArchive ";
+
+ // enum TEDocumentStorageType
+ const TEDocumentStorageType = "edstSQLServer edstFile ";
+
+ // enum TEDocumentVersionSourceType
+ const TEDocumentVersionSourceType =
+ "edvstNone edvstEDocumentVersionCopy edvstFile edvstTemplate edvstScannedFile ";
+
+ // enum TEDocumentVersionState
+ const TEDocumentVersionState = "vsDefault vsDesign vsActive vsObsolete ";
+
+ // enum TEncodeType
+ const TEncodeType = "etNone etCertificate etPassword etCertificatePassword ";
+
+ // enum TExceptionCategory
+ const TExceptionCategory = "ecException ecWarning ecInformation ";
+
+ // enum TExportedSignaturesType
+ const TExportedSignaturesType = "estAll estApprovingOnly ";
+
+ // enum TExportedVersionType
+ const TExportedVersionType = "evtLast evtLastActive evtQuery ";
+
+ // enum TFieldDataType
+ const TFieldDataType =
+ "fdtString " +
+ "fdtNumeric " +
+ "fdtInteger " +
+ "fdtDate " +
+ "fdtText " +
+ "fdtUnknown " +
+ "fdtWideString " +
+ "fdtLargeInteger ";
+
+ // enum TFolderType
+ const TFolderType =
+ "ftInbox " +
+ "ftOutbox " +
+ "ftFavorites " +
+ "ftCommonFolder " +
+ "ftUserFolder " +
+ "ftComponents " +
+ "ftQuickLaunch " +
+ "ftShortcuts " +
+ "ftSearch ";
+
+ // enum TGridRowHeight
+ const TGridRowHeight = "grhAuto " + "grhX1 " + "grhX2 " + "grhX3 ";
+
+ // enum THyperlinkType
+ const THyperlinkType = "hltText " + "hltRTF " + "hltHTML ";
+
+ // enum TImageFileFormat
+ const TImageFileFormat =
+ "iffBMP " +
+ "iffJPEG " +
+ "iffMultiPageTIFF " +
+ "iffSinglePageTIFF " +
+ "iffTIFF " +
+ "iffPNG ";
+
+ // enum TImageMode
+ const TImageMode = "im8bGrayscale " + "im24bRGB " + "im1bMonochrome ";
+
+ // enum TImageType
+ const TImageType = "itBMP " + "itJPEG " + "itWMF " + "itPNG ";
+
+ // enum TInplaceHintKind
+ const TInplaceHintKind =
+ "ikhInformation " + "ikhWarning " + "ikhError " + "ikhNoIcon ";
+
+ // enum TISBLContext
+ const TISBLContext =
+ "icUnknown " +
+ "icScript " +
+ "icFunction " +
+ "icIntegratedReport " +
+ "icAnalyticReport " +
+ "icDataSetEventHandler " +
+ "icActionHandler " +
+ "icFormEventHandler " +
+ "icLookUpEventHandler " +
+ "icRequisiteChangeEventHandler " +
+ "icBeforeSearchEventHandler " +
+ "icRoleCalculation " +
+ "icSelectRouteEventHandler " +
+ "icBlockPropertyCalculation " +
+ "icBlockQueryParamsEventHandler " +
+ "icChangeSearchResultEventHandler " +
+ "icBlockEventHandler " +
+ "icSubTaskInitEventHandler " +
+ "icEDocDataSetEventHandler " +
+ "icEDocLookUpEventHandler " +
+ "icEDocActionHandler " +
+ "icEDocFormEventHandler " +
+ "icEDocRequisiteChangeEventHandler " +
+ "icStructuredConversionRule " +
+ "icStructuredConversionEventBefore " +
+ "icStructuredConversionEventAfter " +
+ "icWizardEventHandler " +
+ "icWizardFinishEventHandler " +
+ "icWizardStepEventHandler " +
+ "icWizardStepFinishEventHandler " +
+ "icWizardActionEnableEventHandler " +
+ "icWizardActionExecuteEventHandler " +
+ "icCreateJobsHandler " +
+ "icCreateNoticesHandler " +
+ "icBeforeLookUpEventHandler " +
+ "icAfterLookUpEventHandler " +
+ "icTaskAbortEventHandler " +
+ "icWorkflowBlockActionHandler " +
+ "icDialogDataSetEventHandler " +
+ "icDialogActionHandler " +
+ "icDialogLookUpEventHandler " +
+ "icDialogRequisiteChangeEventHandler " +
+ "icDialogFormEventHandler " +
+ "icDialogValidCloseEventHandler " +
+ "icBlockFormEventHandler " +
+ "icTaskFormEventHandler " +
+ "icReferenceMethod " +
+ "icEDocMethod " +
+ "icDialogMethod " +
+ "icProcessMessageHandler ";
+
+ // enum TItemShow
+ const TItemShow = "isShow " + "isHide " + "isByUserSettings ";
+
+ // enum TJobKind
+ const TJobKind = "jkJob " + "jkNotice " + "jkControlJob ";
+
+ // enum TJoinType
+ const TJoinType = "jtInner " + "jtLeft " + "jtRight " + "jtFull " + "jtCross ";
+
+ // enum TLabelPos
+ const TLabelPos = "lbpAbove " + "lbpBelow " + "lbpLeft " + "lbpRight ";
+
+ // enum TLicensingType
+ const TLicensingType = "eltPerConnection " + "eltPerUser ";
+
+ // enum TLifeCycleStageFontColor
+ const TLifeCycleStageFontColor =
+ "sfcUndefined " +
+ "sfcBlack " +
+ "sfcGreen " +
+ "sfcRed " +
+ "sfcBlue " +
+ "sfcOrange " +
+ "sfcLilac ";
+
+ // enum TLifeCycleStageFontStyle
+ const TLifeCycleStageFontStyle = "sfsItalic " + "sfsStrikeout " + "sfsNormal ";
+
+ // enum TLockableDevelopmentComponentType
+ const TLockableDevelopmentComponentType =
+ "ldctStandardRoute " +
+ "ldctWizard " +
+ "ldctScript " +
+ "ldctFunction " +
+ "ldctRouteBlock " +
+ "ldctIntegratedReport " +
+ "ldctAnalyticReport " +
+ "ldctReferenceType " +
+ "ldctEDocumentType " +
+ "ldctDialog " +
+ "ldctServerEvents ";
+
+ // enum TMaxRecordCountRestrictionType
+ const TMaxRecordCountRestrictionType =
+ "mrcrtNone " + "mrcrtUser " + "mrcrtMaximal " + "mrcrtCustom ";
+
+ // enum TRangeValueType
+ const TRangeValueType =
+ "vtEqual " + "vtGreaterOrEqual " + "vtLessOrEqual " + "vtRange ";
+
+ // enum TRelativeDate
+ const TRelativeDate =
+ "rdYesterday " +
+ "rdToday " +
+ "rdTomorrow " +
+ "rdThisWeek " +
+ "rdThisMonth " +
+ "rdThisYear " +
+ "rdNextMonth " +
+ "rdNextWeek " +
+ "rdLastWeek " +
+ "rdLastMonth ";
+
+ // enum TReportDestination
+ const TReportDestination = "rdWindow " + "rdFile " + "rdPrinter ";
+
+ // enum TReqDataType
+ const TReqDataType =
+ "rdtString " +
+ "rdtNumeric " +
+ "rdtInteger " +
+ "rdtDate " +
+ "rdtReference " +
+ "rdtAccount " +
+ "rdtText " +
+ "rdtPick " +
+ "rdtUnknown " +
+ "rdtLargeInteger " +
+ "rdtDocument ";
+
+ // enum TRequisiteEventType
+ const TRequisiteEventType = "reOnChange " + "reOnChangeValues ";
+
+ // enum TSBTimeType
+ const TSBTimeType = "ttGlobal " + "ttLocal " + "ttUser " + "ttSystem ";
+
+ // enum TSearchShowMode
+ const TSearchShowMode =
+ "ssmBrowse " + "ssmSelect " + "ssmMultiSelect " + "ssmBrowseModal ";
+
+ // enum TSelectMode
+ const TSelectMode = "smSelect " + "smLike " + "smCard ";
+
+ // enum TSignatureType
+ const TSignatureType = "stNone " + "stAuthenticating " + "stApproving ";
+
+ // enum TSignerContentType
+ const TSignerContentType = "sctString " + "sctStream ";
+
+ // enum TStringsSortType
+ const TStringsSortType = "sstAnsiSort " + "sstNaturalSort ";
+
+ // enum TStringValueType
+ const TStringValueType = "svtEqual " + "svtContain ";
+
+ // enum TStructuredObjectAttributeType
+ const TStructuredObjectAttributeType =
+ "soatString " +
+ "soatNumeric " +
+ "soatInteger " +
+ "soatDatetime " +
+ "soatReferenceRecord " +
+ "soatText " +
+ "soatPick " +
+ "soatBoolean " +
+ "soatEDocument " +
+ "soatAccount " +
+ "soatIntegerCollection " +
+ "soatNumericCollection " +
+ "soatStringCollection " +
+ "soatPickCollection " +
+ "soatDatetimeCollection " +
+ "soatBooleanCollection " +
+ "soatReferenceRecordCollection " +
+ "soatEDocumentCollection " +
+ "soatAccountCollection " +
+ "soatContents " +
+ "soatUnknown ";
+
+ // enum TTaskAbortReason
+ const TTaskAbortReason = "tarAbortByUser " + "tarAbortByWorkflowException ";
+
+ // enum TTextValueType
+ const TTextValueType = "tvtAllWords " + "tvtExactPhrase " + "tvtAnyWord ";
+
+ // enum TUserObjectStatus
+ const TUserObjectStatus =
+ "usNone " +
+ "usCompleted " +
+ "usRedSquare " +
+ "usBlueSquare " +
+ "usYellowSquare " +
+ "usGreenSquare " +
+ "usOrangeSquare " +
+ "usPurpleSquare " +
+ "usFollowUp ";
+
+ // enum TUserType
+ const TUserType =
+ "utUnknown " +
+ "utUser " +
+ "utDeveloper " +
+ "utAdministrator " +
+ "utSystemDeveloper " +
+ "utDisconnected ";
+
+ // enum TValuesBuildType
+ const TValuesBuildType =
+ "btAnd " + "btDetailAnd " + "btOr " + "btNotOr " + "btOnly ";
+
+ // enum TViewMode
+ const TViewMode = "vmView " + "vmSelect " + "vmNavigation ";
+
+ // enum TViewSelectionMode
+ const TViewSelectionMode =
+ "vsmSingle " + "vsmMultiple " + "vsmMultipleCheck " + "vsmNoSelection ";
+
+ // enum TWizardActionType
+ const TWizardActionType =
+ "wfatPrevious " + "wfatNext " + "wfatCancel " + "wfatFinish ";
+
+ // enum TWizardFormElementProperty
+ const TWizardFormElementProperty =
+ "wfepUndefined " +
+ "wfepText3 " +
+ "wfepText6 " +
+ "wfepText9 " +
+ "wfepSpinEdit " +
+ "wfepDropDown " +
+ "wfepRadioGroup " +
+ "wfepFlag " +
+ "wfepText12 " +
+ "wfepText15 " +
+ "wfepText18 " +
+ "wfepText21 " +
+ "wfepText24 " +
+ "wfepText27 " +
+ "wfepText30 " +
+ "wfepRadioGroupColumn1 " +
+ "wfepRadioGroupColumn2 " +
+ "wfepRadioGroupColumn3 ";
+
+ // enum TWizardFormElementType
+ const TWizardFormElementType =
+ "wfetQueryParameter " + "wfetText " + "wfetDelimiter " + "wfetLabel ";
+
+ // enum TWizardParamType
+ const TWizardParamType =
+ "wptString " +
+ "wptInteger " +
+ "wptNumeric " +
+ "wptBoolean " +
+ "wptDateTime " +
+ "wptPick " +
+ "wptText " +
+ "wptUser " +
+ "wptUserList " +
+ "wptEDocumentInfo " +
+ "wptEDocumentInfoList " +
+ "wptReferenceRecordInfo " +
+ "wptReferenceRecordInfoList " +
+ "wptFolderInfo " +
+ "wptTaskInfo " +
+ "wptContents " +
+ "wptFileName " +
+ "wptDate ";
+
+ // enum TWizardStepResult
+ const TWizardStepResult =
+ "wsrComplete " +
+ "wsrGoNext " +
+ "wsrGoPrevious " +
+ "wsrCustom " +
+ "wsrCancel " +
+ "wsrGoFinal ";
+
+ // enum TWizardStepType
+ const TWizardStepType =
+ "wstForm " +
+ "wstEDocument " +
+ "wstTaskCard " +
+ "wstReferenceRecordCard " +
+ "wstFinal ";
+
+ // enum TWorkAccessType
+ const TWorkAccessType = "waAll " + "waPerformers " + "waManual ";
+
+ // enum TWorkflowBlockType
+ const TWorkflowBlockType =
+ "wsbStart " +
+ "wsbFinish " +
+ "wsbNotice " +
+ "wsbStep " +
+ "wsbDecision " +
+ "wsbWait " +
+ "wsbMonitor " +
+ "wsbScript " +
+ "wsbConnector " +
+ "wsbSubTask " +
+ "wsbLifeCycleStage " +
+ "wsbPause ";
+
+ // enum TWorkflowDataType
+ const TWorkflowDataType =
+ "wdtInteger " +
+ "wdtFloat " +
+ "wdtString " +
+ "wdtPick " +
+ "wdtDateTime " +
+ "wdtBoolean " +
+ "wdtTask " +
+ "wdtJob " +
+ "wdtFolder " +
+ "wdtEDocument " +
+ "wdtReferenceRecord " +
+ "wdtUser " +
+ "wdtGroup " +
+ "wdtRole " +
+ "wdtIntegerCollection " +
+ "wdtFloatCollection " +
+ "wdtStringCollection " +
+ "wdtPickCollection " +
+ "wdtDateTimeCollection " +
+ "wdtBooleanCollection " +
+ "wdtTaskCollection " +
+ "wdtJobCollection " +
+ "wdtFolderCollection " +
+ "wdtEDocumentCollection " +
+ "wdtReferenceRecordCollection " +
+ "wdtUserCollection " +
+ "wdtGroupCollection " +
+ "wdtRoleCollection " +
+ "wdtContents " +
+ "wdtUserList " +
+ "wdtSearchDescription " +
+ "wdtDeadLine " +
+ "wdtPickSet " +
+ "wdtAccountCollection ";
+
+ // enum TWorkImportance
+ const TWorkImportance = "wiLow " + "wiNormal " + "wiHigh ";
+
+ // enum TWorkRouteType
+ const TWorkRouteType = "wrtSoft " + "wrtHard ";
+
+ // enum TWorkState
+ const TWorkState =
+ "wsInit " +
+ "wsRunning " +
+ "wsDone " +
+ "wsControlled " +
+ "wsAborted " +
+ "wsContinued ";
+
+ // enum TWorkTextBuildingMode
+ const TWorkTextBuildingMode =
+ "wtmFull " + "wtmFromCurrent " + "wtmOnlyCurrent ";
+
+ // Перечисления
+ const ENUMS =
+ TAccountType +
+ TActionEnabledMode +
+ TAddPosition +
+ TAlignment +
+ TAreaShowMode +
+ TCertificateInvalidationReason +
+ TCertificateType +
+ TCheckListBoxItemState +
+ TCloseOnEsc +
+ TCompType +
+ TConditionFormat +
+ TConnectionIntent +
+ TContentKind +
+ TControlType +
+ TCriterionContentType +
+ TCultureType +
+ TDataSetEventType +
+ TDataSetState +
+ TDateFormatType +
+ TDateOffsetType +
+ TDateTimeKind +
+ TDeaAccessRights +
+ TDocumentDefaultAction +
+ TEditMode +
+ TEditorCloseObservType +
+ TEdmsApplicationAction +
+ TEDocumentLockType +
+ TEDocumentStepShowMode +
+ TEDocumentStepVersionType +
+ TEDocumentStorageFunction +
+ TEDocumentStorageType +
+ TEDocumentVersionSourceType +
+ TEDocumentVersionState +
+ TEncodeType +
+ TExceptionCategory +
+ TExportedSignaturesType +
+ TExportedVersionType +
+ TFieldDataType +
+ TFolderType +
+ TGridRowHeight +
+ THyperlinkType +
+ TImageFileFormat +
+ TImageMode +
+ TImageType +
+ TInplaceHintKind +
+ TISBLContext +
+ TItemShow +
+ TJobKind +
+ TJoinType +
+ TLabelPos +
+ TLicensingType +
+ TLifeCycleStageFontColor +
+ TLifeCycleStageFontStyle +
+ TLockableDevelopmentComponentType +
+ TMaxRecordCountRestrictionType +
+ TRangeValueType +
+ TRelativeDate +
+ TReportDestination +
+ TReqDataType +
+ TRequisiteEventType +
+ TSBTimeType +
+ TSearchShowMode +
+ TSelectMode +
+ TSignatureType +
+ TSignerContentType +
+ TStringsSortType +
+ TStringValueType +
+ TStructuredObjectAttributeType +
+ TTaskAbortReason +
+ TTextValueType +
+ TUserObjectStatus +
+ TUserType +
+ TValuesBuildType +
+ TViewMode +
+ TViewSelectionMode +
+ TWizardActionType +
+ TWizardFormElementProperty +
+ TWizardFormElementType +
+ TWizardParamType +
+ TWizardStepResult +
+ TWizardStepType +
+ TWorkAccessType +
+ TWorkflowBlockType +
+ TWorkflowDataType +
+ TWorkImportance +
+ TWorkRouteType +
+ TWorkState +
+ TWorkTextBuildingMode;
+
+ // Системные функции ==> SYSFUNCTIONS
+ const system_functions =
+ "AddSubString " +
+ "AdjustLineBreaks " +
+ "AmountInWords " +
+ "Analysis " +
+ "ArrayDimCount " +
+ "ArrayHighBound " +
+ "ArrayLowBound " +
+ "ArrayOf " +
+ "ArrayReDim " +
+ "Assert " +
+ "Assigned " +
+ "BeginOfMonth " +
+ "BeginOfPeriod " +
+ "BuildProfilingOperationAnalysis " +
+ "CallProcedure " +
+ "CanReadFile " +
+ "CArrayElement " +
+ "CDataSetRequisite " +
+ "ChangeDate " +
+ "ChangeReferenceDataset " +
+ "Char " +
+ "CharPos " +
+ "CheckParam " +
+ "CheckParamValue " +
+ "CompareStrings " +
+ "ConstantExists " +
+ "ControlState " +
+ "ConvertDateStr " +
+ "Copy " +
+ "CopyFile " +
+ "CreateArray " +
+ "CreateCachedReference " +
+ "CreateConnection " +
+ "CreateDialog " +
+ "CreateDualListDialog " +
+ "CreateEditor " +
+ "CreateException " +
+ "CreateFile " +
+ "CreateFolderDialog " +
+ "CreateInputDialog " +
+ "CreateLinkFile " +
+ "CreateList " +
+ "CreateLock " +
+ "CreateMemoryDataSet " +
+ "CreateObject " +
+ "CreateOpenDialog " +
+ "CreateProgress " +
+ "CreateQuery " +
+ "CreateReference " +
+ "CreateReport " +
+ "CreateSaveDialog " +
+ "CreateScript " +
+ "CreateSQLPivotFunction " +
+ "CreateStringList " +
+ "CreateTreeListSelectDialog " +
+ "CSelectSQL " +
+ "CSQL " +
+ "CSubString " +
+ "CurrentUserID " +
+ "CurrentUserName " +
+ "CurrentVersion " +
+ "DataSetLocateEx " +
+ "DateDiff " +
+ "DateTimeDiff " +
+ "DateToStr " +
+ "DayOfWeek " +
+ "DeleteFile " +
+ "DirectoryExists " +
+ "DisableCheckAccessRights " +
+ "DisableCheckFullShowingRestriction " +
+ "DisableMassTaskSendingRestrictions " +
+ "DropTable " +
+ "DupeString " +
+ "EditText " +
+ "EnableCheckAccessRights " +
+ "EnableCheckFullShowingRestriction " +
+ "EnableMassTaskSendingRestrictions " +
+ "EndOfMonth " +
+ "EndOfPeriod " +
+ "ExceptionExists " +
+ "ExceptionsOff " +
+ "ExceptionsOn " +
+ "Execute " +
+ "ExecuteProcess " +
+ "Exit " +
+ "ExpandEnvironmentVariables " +
+ "ExtractFileDrive " +
+ "ExtractFileExt " +
+ "ExtractFileName " +
+ "ExtractFilePath " +
+ "ExtractParams " +
+ "FileExists " +
+ "FileSize " +
+ "FindFile " +
+ "FindSubString " +
+ "FirmContext " +
+ "ForceDirectories " +
+ "Format " +
+ "FormatDate " +
+ "FormatNumeric " +
+ "FormatSQLDate " +
+ "FormatString " +
+ "FreeException " +
+ "GetComponent " +
+ "GetComponentLaunchParam " +
+ "GetConstant " +
+ "GetLastException " +
+ "GetReferenceRecord " +
+ "GetRefTypeByRefID " +
+ "GetTableID " +
+ "GetTempFolder " +
+ "IfThen " +
+ "In " +
+ "IndexOf " +
+ "InputDialog " +
+ "InputDialogEx " +
+ "InteractiveMode " +
+ "IsFileLocked " +
+ "IsGraphicFile " +
+ "IsNumeric " +
+ "Length " +
+ "LoadString " +
+ "LoadStringFmt " +
+ "LocalTimeToUTC " +
+ "LowerCase " +
+ "Max " +
+ "MessageBox " +
+ "MessageBoxEx " +
+ "MimeDecodeBinary " +
+ "MimeDecodeString " +
+ "MimeEncodeBinary " +
+ "MimeEncodeString " +
+ "Min " +
+ "MoneyInWords " +
+ "MoveFile " +
+ "NewID " +
+ "Now " +
+ "OpenFile " +
+ "Ord " +
+ "Precision " +
+ "Raise " +
+ "ReadCertificateFromFile " +
+ "ReadFile " +
+ "ReferenceCodeByID " +
+ "ReferenceNumber " +
+ "ReferenceRequisiteMode " +
+ "ReferenceRequisiteValue " +
+ "RegionDateSettings " +
+ "RegionNumberSettings " +
+ "RegionTimeSettings " +
+ "RegRead " +
+ "RegWrite " +
+ "RenameFile " +
+ "Replace " +
+ "Round " +
+ "SelectServerCode " +
+ "SelectSQL " +
+ "ServerDateTime " +
+ "SetConstant " +
+ "SetManagedFolderFieldsState " +
+ "ShowConstantsInputDialog " +
+ "ShowMessage " +
+ "Sleep " +
+ "Split " +
+ "SQL " +
+ "SQL2XLSTAB " +
+ "SQLProfilingSendReport " +
+ "StrToDate " +
+ "SubString " +
+ "SubStringCount " +
+ "SystemSetting " +
+ "Time " +
+ "TimeDiff " +
+ "Today " +
+ "Transliterate " +
+ "Trim " +
+ "UpperCase " +
+ "UserStatus " +
+ "UTCToLocalTime " +
+ "ValidateXML " +
+ "VarIsClear " +
+ "VarIsEmpty " +
+ "VarIsNull " +
+ "WorkTimeDiff " +
+ "WriteFile " +
+ "WriteFileEx " +
+ "WriteObjectHistory " +
+ "Анализ " +
+ "БазаДанных " +
+ "БлокЕсть " +
+ "БлокЕстьРасш " +
+ "БлокИнфо " +
+ "БлокСнять " +
+ "БлокСнятьРасш " +
+ "БлокУстановить " +
+ "Ввод " +
+ "ВводМеню " +
+ "ВедС " +
+ "ВедСпр " +
+ "ВерхняяГраницаМассива " +
+ "ВнешПрогр " +
+ "Восст " +
+ "ВременнаяПапка " +
+ "Время " +
+ "ВыборSQL " +
+ "ВыбратьЗапись " +
+ "ВыделитьСтр " +
+ "Вызвать " +
+ "Выполнить " +
+ "ВыпПрогр " +
+ "ГрафическийФайл " +
+ "ГруппаДополнительно " +
+ "ДатаВремяСерв " +
+ "ДеньНедели " +
+ "ДиалогДаНет " +
+ "ДлинаСтр " +
+ "ДобПодстр " +
+ "ЕПусто " +
+ "ЕслиТо " +
+ "ЕЧисло " +
+ "ЗамПодстр " +
+ "ЗаписьСправочника " +
+ "ЗначПоляСпр " +
+ "ИДТипСпр " +
+ "ИзвлечьДиск " +
+ "ИзвлечьИмяФайла " +
+ "ИзвлечьПуть " +
+ "ИзвлечьРасширение " +
+ "ИзмДат " +
+ "ИзменитьРазмерМассива " +
+ "ИзмеренийМассива " +
+ "ИмяОрг " +
+ "ИмяПоляСпр " +
+ "Индекс " +
+ "ИндикаторЗакрыть " +
+ "ИндикаторОткрыть " +
+ "ИндикаторШаг " +
+ "ИнтерактивныйРежим " +
+ "ИтогТблСпр " +
+ "КодВидВедСпр " +
+ "КодВидСпрПоИД " +
+ "КодПоAnalit " +
+ "КодСимвола " +
+ "КодСпр " +
+ "КолПодстр " +
+ "КолПроп " +
+ "КонМес " +
+ "Конст " +
+ "КонстЕсть " +
+ "КонстЗнач " +
+ "КонТран " +
+ "КопироватьФайл " +
+ "КопияСтр " +
+ "КПериод " +
+ "КСтрТблСпр " +
+ "Макс " +
+ "МаксСтрТблСпр " +
+ "Массив " +
+ "Меню " +
+ "МенюРасш " +
+ "Мин " +
+ "НаборДанныхНайтиРасш " +
+ "НаимВидСпр " +
+ "НаимПоAnalit " +
+ "НаимСпр " +
+ "НастроитьПереводыСтрок " +
+ "НачМес " +
+ "НачТран " +
+ "НижняяГраницаМассива " +
+ "НомерСпр " +
+ "НПериод " +
+ "Окно " +
+ "Окр " +
+ "Окружение " +
+ "ОтлИнфДобавить " +
+ "ОтлИнфУдалить " +
+ "Отчет " +
+ "ОтчетАнал " +
+ "ОтчетИнт " +
+ "ПапкаСуществует " +
+ "Пауза " +
+ "ПВыборSQL " +
+ "ПереименоватьФайл " +
+ "Переменные " +
+ "ПереместитьФайл " +
+ "Подстр " +
+ "ПоискПодстр " +
+ "ПоискСтр " +
+ "ПолучитьИДТаблицы " +
+ "ПользовательДополнительно " +
+ "ПользовательИД " +
+ "ПользовательИмя " +
+ "ПользовательСтатус " +
+ "Прервать " +
+ "ПроверитьПараметр " +
+ "ПроверитьПараметрЗнач " +
+ "ПроверитьУсловие " +
+ "РазбСтр " +
+ "РазнВремя " +
+ "РазнДат " +
+ "РазнДатаВремя " +
+ "РазнРабВремя " +
+ "РегУстВрем " +
+ "РегУстДат " +
+ "РегУстЧсл " +
+ "РедТекст " +
+ "РеестрЗапись " +
+ "РеестрСписокИменПарам " +
+ "РеестрЧтение " +
+ "РеквСпр " +
+ "РеквСпрПр " +
+ "Сегодня " +
+ "Сейчас " +
+ "Сервер " +
+ "СерверПроцессИД " +
+ "СертификатФайлСчитать " +
+ "СжПроб " +
+ "Символ " +
+ "СистемаДиректумКод " +
+ "СистемаИнформация " +
+ "СистемаКод " +
+ "Содержит " +
+ "СоединениеЗакрыть " +
+ "СоединениеОткрыть " +
+ "СоздатьДиалог " +
+ "СоздатьДиалогВыбораИзДвухСписков " +
+ "СоздатьДиалогВыбораПапки " +
+ "СоздатьДиалогОткрытияФайла " +
+ "СоздатьДиалогСохраненияФайла " +
+ "СоздатьЗапрос " +
+ "СоздатьИндикатор " +
+ "СоздатьИсключение " +
+ "СоздатьКэшированныйСправочник " +
+ "СоздатьМассив " +
+ "СоздатьНаборДанных " +
+ "СоздатьОбъект " +
+ "СоздатьОтчет " +
+ "СоздатьПапку " +
+ "СоздатьРедактор " +
+ "СоздатьСоединение " +
+ "СоздатьСписок " +
+ "СоздатьСписокСтрок " +
+ "СоздатьСправочник " +
+ "СоздатьСценарий " +
+ "СоздСпр " +
+ "СостСпр " +
+ "Сохр " +
+ "СохрСпр " +
+ "СписокСистем " +
+ "Спр " +
+ "Справочник " +
+ "СпрБлокЕсть " +
+ "СпрБлокСнять " +
+ "СпрБлокСнятьРасш " +
+ "СпрБлокУстановить " +
+ "СпрИзмНабДан " +
+ "СпрКод " +
+ "СпрНомер " +
+ "СпрОбновить " +
+ "СпрОткрыть " +
+ "СпрОтменить " +
+ "СпрПарам " +
+ "СпрПолеЗнач " +
+ "СпрПолеИмя " +
+ "СпрРекв " +
+ "СпрРеквВведЗн " +
+ "СпрРеквНовые " +
+ "СпрРеквПр " +
+ "СпрРеквПредЗн " +
+ "СпрРеквРежим " +
+ "СпрРеквТипТекст " +
+ "СпрСоздать " +
+ "СпрСост " +
+ "СпрСохранить " +
+ "СпрТблИтог " +
+ "СпрТблСтр " +
+ "СпрТблСтрКол " +
+ "СпрТблСтрМакс " +
+ "СпрТблСтрМин " +
+ "СпрТблСтрПред " +
+ "СпрТблСтрСлед " +
+ "СпрТблСтрСозд " +
+ "СпрТблСтрУд " +
+ "СпрТекПредст " +
+ "СпрУдалить " +
+ "СравнитьСтр " +
+ "СтрВерхРегистр " +
+ "СтрНижнРегистр " +
+ "СтрТблСпр " +
+ "СумПроп " +
+ "Сценарий " +
+ "СценарийПарам " +
+ "ТекВерсия " +
+ "ТекОрг " +
+ "Точн " +
+ "Тран " +
+ "Транслитерация " +
+ "УдалитьТаблицу " +
+ "УдалитьФайл " +
+ "УдСпр " +
+ "УдСтрТблСпр " +
+ "Уст " +
+ "УстановкиКонстант " +
+ "ФайлАтрибутСчитать " +
+ "ФайлАтрибутУстановить " +
+ "ФайлВремя " +
+ "ФайлВремяУстановить " +
+ "ФайлВыбрать " +
+ "ФайлЗанят " +
+ "ФайлЗаписать " +
+ "ФайлИскать " +
+ "ФайлКопировать " +
+ "ФайлМожноЧитать " +
+ "ФайлОткрыть " +
+ "ФайлПереименовать " +
+ "ФайлПерекодировать " +
+ "ФайлПереместить " +
+ "ФайлПросмотреть " +
+ "ФайлРазмер " +
+ "ФайлСоздать " +
+ "ФайлСсылкаСоздать " +
+ "ФайлСуществует " +
+ "ФайлСчитать " +
+ "ФайлУдалить " +
+ "ФмтSQLДат " +
+ "ФмтДат " +
+ "ФмтСтр " +
+ "ФмтЧсл " +
+ "Формат " +
+ "ЦМассивЭлемент " +
+ "ЦНаборДанныхРеквизит " +
+ "ЦПодстр ";
+
+ // Предопределенные переменные ==> built_in
+ const predefined_variables =
+ "AltState " +
+ "Application " +
+ "CallType " +
+ "ComponentTokens " +
+ "CreatedJobs " +
+ "CreatedNotices " +
+ "ControlState " +
+ "DialogResult " +
+ "Dialogs " +
+ "EDocuments " +
+ "EDocumentVersionSource " +
+ "Folders " +
+ "GlobalIDs " +
+ "Job " +
+ "Jobs " +
+ "InputValue " +
+ "LookUpReference " +
+ "LookUpRequisiteNames " +
+ "LookUpSearch " +
+ "Object " +
+ "ParentComponent " +
+ "Processes " +
+ "References " +
+ "Requisite " +
+ "ReportName " +
+ "Reports " +
+ "Result " +
+ "Scripts " +
+ "Searches " +
+ "SelectedAttachments " +
+ "SelectedItems " +
+ "SelectMode " +
+ "Sender " +
+ "ServerEvents " +
+ "ServiceFactory " +
+ "ShiftState " +
+ "SubTask " +
+ "SystemDialogs " +
+ "Tasks " +
+ "Wizard " +
+ "Wizards " +
+ "Work " +
+ "ВызовСпособ " +
+ "ИмяОтчета " +
+ "РеквЗнач ";
+
+ // Интерфейсы ==> type
+ const interfaces =
+ "IApplication " +
+ "IAccessRights " +
+ "IAccountRepository " +
+ "IAccountSelectionRestrictions " +
+ "IAction " +
+ "IActionList " +
+ "IAdministrationHistoryDescription " +
+ "IAnchors " +
+ "IApplication " +
+ "IArchiveInfo " +
+ "IAttachment " +
+ "IAttachmentList " +
+ "ICheckListBox " +
+ "ICheckPointedList " +
+ "IColumn " +
+ "IComponent " +
+ "IComponentDescription " +
+ "IComponentToken " +
+ "IComponentTokenFactory " +
+ "IComponentTokenInfo " +
+ "ICompRecordInfo " +
+ "IConnection " +
+ "IContents " +
+ "IControl " +
+ "IControlJob " +
+ "IControlJobInfo " +
+ "IControlList " +
+ "ICrypto " +
+ "ICrypto2 " +
+ "ICustomJob " +
+ "ICustomJobInfo " +
+ "ICustomListBox " +
+ "ICustomObjectWizardStep " +
+ "ICustomWork " +
+ "ICustomWorkInfo " +
+ "IDataSet " +
+ "IDataSetAccessInfo " +
+ "IDataSigner " +
+ "IDateCriterion " +
+ "IDateRequisite " +
+ "IDateRequisiteDescription " +
+ "IDateValue " +
+ "IDeaAccessRights " +
+ "IDeaObjectInfo " +
+ "IDevelopmentComponentLock " +
+ "IDialog " +
+ "IDialogFactory " +
+ "IDialogPickRequisiteItems " +
+ "IDialogsFactory " +
+ "IDICSFactory " +
+ "IDocRequisite " +
+ "IDocumentInfo " +
+ "IDualListDialog " +
+ "IECertificate " +
+ "IECertificateInfo " +
+ "IECertificates " +
+ "IEditControl " +
+ "IEditorForm " +
+ "IEdmsExplorer " +
+ "IEdmsObject " +
+ "IEdmsObjectDescription " +
+ "IEdmsObjectFactory " +
+ "IEdmsObjectInfo " +
+ "IEDocument " +
+ "IEDocumentAccessRights " +
+ "IEDocumentDescription " +
+ "IEDocumentEditor " +
+ "IEDocumentFactory " +
+ "IEDocumentInfo " +
+ "IEDocumentStorage " +
+ "IEDocumentVersion " +
+ "IEDocumentVersionListDialog " +
+ "IEDocumentVersionSource " +
+ "IEDocumentWizardStep " +
+ "IEDocVerSignature " +
+ "IEDocVersionState " +
+ "IEnabledMode " +
+ "IEncodeProvider " +
+ "IEncrypter " +
+ "IEvent " +
+ "IEventList " +
+ "IException " +
+ "IExternalEvents " +
+ "IExternalHandler " +
+ "IFactory " +
+ "IField " +
+ "IFileDialog " +
+ "IFolder " +
+ "IFolderDescription " +
+ "IFolderDialog " +
+ "IFolderFactory " +
+ "IFolderInfo " +
+ "IForEach " +
+ "IForm " +
+ "IFormTitle " +
+ "IFormWizardStep " +
+ "IGlobalIDFactory " +
+ "IGlobalIDInfo " +
+ "IGrid " +
+ "IHasher " +
+ "IHistoryDescription " +
+ "IHyperLinkControl " +
+ "IImageButton " +
+ "IImageControl " +
+ "IInnerPanel " +
+ "IInplaceHint " +
+ "IIntegerCriterion " +
+ "IIntegerList " +
+ "IIntegerRequisite " +
+ "IIntegerValue " +
+ "IISBLEditorForm " +
+ "IJob " +
+ "IJobDescription " +
+ "IJobFactory " +
+ "IJobForm " +
+ "IJobInfo " +
+ "ILabelControl " +
+ "ILargeIntegerCriterion " +
+ "ILargeIntegerRequisite " +
+ "ILargeIntegerValue " +
+ "ILicenseInfo " +
+ "ILifeCycleStage " +
+ "IList " +
+ "IListBox " +
+ "ILocalIDInfo " +
+ "ILocalization " +
+ "ILock " +
+ "IMemoryDataSet " +
+ "IMessagingFactory " +
+ "IMetadataRepository " +
+ "INotice " +
+ "INoticeInfo " +
+ "INumericCriterion " +
+ "INumericRequisite " +
+ "INumericValue " +
+ "IObject " +
+ "IObjectDescription " +
+ "IObjectImporter " +
+ "IObjectInfo " +
+ "IObserver " +
+ "IPanelGroup " +
+ "IPickCriterion " +
+ "IPickProperty " +
+ "IPickRequisite " +
+ "IPickRequisiteDescription " +
+ "IPickRequisiteItem " +
+ "IPickRequisiteItems " +
+ "IPickValue " +
+ "IPrivilege " +
+ "IPrivilegeList " +
+ "IProcess " +
+ "IProcessFactory " +
+ "IProcessMessage " +
+ "IProgress " +
+ "IProperty " +
+ "IPropertyChangeEvent " +
+ "IQuery " +
+ "IReference " +
+ "IReferenceCriterion " +
+ "IReferenceEnabledMode " +
+ "IReferenceFactory " +
+ "IReferenceHistoryDescription " +
+ "IReferenceInfo " +
+ "IReferenceRecordCardWizardStep " +
+ "IReferenceRequisiteDescription " +
+ "IReferencesFactory " +
+ "IReferenceValue " +
+ "IRefRequisite " +
+ "IReport " +
+ "IReportFactory " +
+ "IRequisite " +
+ "IRequisiteDescription " +
+ "IRequisiteDescriptionList " +
+ "IRequisiteFactory " +
+ "IRichEdit " +
+ "IRouteStep " +
+ "IRule " +
+ "IRuleList " +
+ "ISchemeBlock " +
+ "IScript " +
+ "IScriptFactory " +
+ "ISearchCriteria " +
+ "ISearchCriterion " +
+ "ISearchDescription " +
+ "ISearchFactory " +
+ "ISearchFolderInfo " +
+ "ISearchForObjectDescription " +
+ "ISearchResultRestrictions " +
+ "ISecuredContext " +
+ "ISelectDialog " +
+ "IServerEvent " +
+ "IServerEventFactory " +
+ "IServiceDialog " +
+ "IServiceFactory " +
+ "ISignature " +
+ "ISignProvider " +
+ "ISignProvider2 " +
+ "ISignProvider3 " +
+ "ISimpleCriterion " +
+ "IStringCriterion " +
+ "IStringList " +
+ "IStringRequisite " +
+ "IStringRequisiteDescription " +
+ "IStringValue " +
+ "ISystemDialogsFactory " +
+ "ISystemInfo " +
+ "ITabSheet " +
+ "ITask " +
+ "ITaskAbortReasonInfo " +
+ "ITaskCardWizardStep " +
+ "ITaskDescription " +
+ "ITaskFactory " +
+ "ITaskInfo " +
+ "ITaskRoute " +
+ "ITextCriterion " +
+ "ITextRequisite " +
+ "ITextValue " +
+ "ITreeListSelectDialog " +
+ "IUser " +
+ "IUserList " +
+ "IValue " +
+ "IView " +
+ "IWebBrowserControl " +
+ "IWizard " +
+ "IWizardAction " +
+ "IWizardFactory " +
+ "IWizardFormElement " +
+ "IWizardParam " +
+ "IWizardPickParam " +
+ "IWizardReferenceParam " +
+ "IWizardStep " +
+ "IWorkAccessRights " +
+ "IWorkDescription " +
+ "IWorkflowAskableParam " +
+ "IWorkflowAskableParams " +
+ "IWorkflowBlock " +
+ "IWorkflowBlockResult " +
+ "IWorkflowEnabledMode " +
+ "IWorkflowParam " +
+ "IWorkflowPickParam " +
+ "IWorkflowReferenceParam " +
+ "IWorkState " +
+ "IWorkTreeCustomNode " +
+ "IWorkTreeJobNode " +
+ "IWorkTreeTaskNode " +
+ "IXMLEditorForm " +
+ "SBCrypto ";
+
+ // built_in : встроенные или библиотечные объекты (константы, перечисления)
+ const BUILTIN = CONSTANTS + ENUMS;
+
+ // class: встроенные наборы значений, системные объекты, фабрики
+ const CLASS = predefined_variables;
+
+ // literal : примитивные типы
+ const LITERAL = "null true false nil ";
+
+ // number : числа
+ const NUMBERS = {
+ className: "number",
+ begin: hljs.NUMBER_RE,
+ relevance: 0
+ };
+
+ // string : строки
+ const STRINGS = {
+ className: "string",
+ variants: [
+ {
+ begin: '"',
+ end: '"'
+ },
+ {
+ begin: "'",
+ end: "'"
+ }
+ ]
+ };
+
+ // Токены
+ const DOCTAGS = {
+ className: "doctag",
+ begin: "\\b(?:TODO|DONE|BEGIN|END|STUB|CHG|FIXME|NOTE|BUG|XXX)\\b",
+ relevance: 0
+ };
+
+ // Однострочный комментарий
+ const ISBL_LINE_COMMENT_MODE = {
+ className: "comment",
+ begin: "//",
+ end: "$",
+ relevance: 0,
+ contains: [
+ hljs.PHRASAL_WORDS_MODE,
+ DOCTAGS
+ ]
+ };
+
+ // Многострочный комментарий
+ const ISBL_BLOCK_COMMENT_MODE = {
+ className: "comment",
+ begin: "/\\*",
+ end: "\\*/",
+ relevance: 0,
+ contains: [
+ hljs.PHRASAL_WORDS_MODE,
+ DOCTAGS
+ ]
+ };
+
+ // comment : комментарии
+ const COMMENTS = {
+ variants: [
+ ISBL_LINE_COMMENT_MODE,
+ ISBL_BLOCK_COMMENT_MODE
+ ]
+ };
+
+ // keywords : ключевые слова
+ const KEYWORDS = {
+ $pattern: UNDERSCORE_IDENT_RE,
+ keyword: KEYWORD,
+ built_in: BUILTIN,
+ class: CLASS,
+ literal: LITERAL
+ };
+
+ // methods : методы
+ const METHODS = {
+ begin: "\\.\\s*" + hljs.UNDERSCORE_IDENT_RE,
+ keywords: KEYWORDS,
+ relevance: 0
+ };
+
+ // type : встроенные типы
+ const TYPES = {
+ className: "type",
+ begin: ":[ \\t]*(" + interfaces.trim().replace(/\s/g, "|") + ")",
+ end: "[ \\t]*=",
+ excludeEnd: true
+ };
+
+ // variables : переменные
+ const VARIABLES = {
+ className: "variable",
+ keywords: KEYWORDS,
+ begin: UNDERSCORE_IDENT_RE,
+ relevance: 0,
+ contains: [
+ TYPES,
+ METHODS
+ ]
+ };
+
+ // Имена функций
+ const FUNCTION_TITLE = FUNCTION_NAME_IDENT_RE + "\\(";
+
+ const TITLE_MODE = {
+ className: "title",
+ keywords: {
+ $pattern: UNDERSCORE_IDENT_RE,
+ built_in: system_functions
+ },
+ begin: FUNCTION_TITLE,
+ end: "\\(",
+ returnBegin: true,
+ excludeEnd: true
+ };
+
+ // function : функции
+ const FUNCTIONS = {
+ className: "function",
+ begin: FUNCTION_TITLE,
+ end: "\\)$",
+ returnBegin: true,
+ keywords: KEYWORDS,
+ illegal: "[\\[\\]\\|\\$\\?%,~#@]",
+ contains: [
+ TITLE_MODE,
+ METHODS,
+ VARIABLES,
+ STRINGS,
+ NUMBERS,
+ COMMENTS
+ ]
+ };
+
+ return {
+ name: 'ISBL',
+ case_insensitive: true,
+ keywords: KEYWORDS,
+ illegal: "\\$|\\?|%|,|;$|~|#|@|",
+ contains: [
+ FUNCTIONS,
+ TYPES,
+ METHODS,
+ VARIABLES,
+ STRINGS,
+ NUMBERS,
+ COMMENTS
+ ]
+ };
+}
+
+module.exports = isbl;
+
+
+/***/ }),
+
+/***/ 30482:
+/***/ ((module) => {
+
+/*
+ Language: JBoss CLI
+ Author: Raphaël Parrëe
+ Description: language definition jboss cli
+ Website: https://docs.jboss.org/author/display/WFLY/Command+Line+Interface
+ Category: config
+ */
+
+function jbossCli(hljs) {
+ const PARAM = {
+ begin: /[\w-]+ *=/,
+ returnBegin: true,
+ relevance: 0,
+ contains: [
+ {
+ className: 'attr',
+ begin: /[\w-]+/
+ }
+ ]
+ };
+ const PARAMSBLOCK = {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ contains: [PARAM],
+ relevance: 0
+ };
+ const OPERATION = {
+ className: 'function',
+ begin: /:[\w\-.]+/,
+ relevance: 0
+ };
+ const PATH = {
+ className: 'string',
+ begin: /\B([\/.])[\w\-.\/=]+/
+ };
+ const COMMAND_PARAMS = {
+ className: 'params',
+ begin: /--[\w\-=\/]+/
+ };
+ return {
+ name: 'JBoss CLI',
+ aliases: ['wildfly-cli'],
+ keywords: {
+ $pattern: '[a-z\-]+',
+ keyword: 'alias batch cd clear command connect connection-factory connection-info data-source deploy ' +
+ 'deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls ' +
+ 'patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias ' +
+ 'undeploy unset version xa-data-source', // module
+ literal: 'true false'
+ },
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ COMMAND_PARAMS,
+ OPERATION,
+ PATH,
+ PARAMSBLOCK
+ ]
+ };
+}
+
+module.exports = jbossCli;
+
+
+/***/ }),
+
+/***/ 7802:
+/***/ ((module) => {
+
+/*
+Language: JSON
+Description: JSON (JavaScript Object Notation) is a lightweight data-interchange format.
+Author: Ivan Sagalaev
+Website: http://www.json.org
+Category: common, protocols
+*/
+
+function json(hljs) {
+ const LITERALS = {
+ literal: 'true false null'
+ };
+ const ALLOWED_COMMENTS = [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ];
+ const TYPES = [
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE
+ ];
+ const VALUE_CONTAINER = {
+ end: ',',
+ endsWithParent: true,
+ excludeEnd: true,
+ contains: TYPES,
+ keywords: LITERALS
+ };
+ const OBJECT = {
+ begin: /\{/,
+ end: /\}/,
+ contains: [
+ {
+ className: 'attr',
+ begin: /"/,
+ end: /"/,
+ contains: [hljs.BACKSLASH_ESCAPE],
+ illegal: '\\n'
+ },
+ hljs.inherit(VALUE_CONTAINER, {
+ begin: /:/
+ })
+ ].concat(ALLOWED_COMMENTS),
+ illegal: '\\S'
+ };
+ const ARRAY = {
+ begin: '\\[',
+ end: '\\]',
+ contains: [hljs.inherit(VALUE_CONTAINER)], // inherit is a workaround for a bug that makes shared modes with endsWithParent compile only the ending of one of the parents
+ illegal: '\\S'
+ };
+ TYPES.push(OBJECT, ARRAY);
+ ALLOWED_COMMENTS.forEach(function(rule) {
+ TYPES.push(rule);
+ });
+ return {
+ name: 'JSON',
+ contains: TYPES,
+ keywords: LITERALS,
+ illegal: '\\S'
+ };
+}
+
+module.exports = json;
+
+
+/***/ }),
+
+/***/ 64109:
+/***/ ((module) => {
+
+/*
+Language: Julia REPL
+Description: Julia REPL sessions
+Author: Morten Piibeleht
+Website: https://julialang.org
+Requires: julia.js
+
+The Julia REPL code blocks look something like the following:
+
+ julia> function foo(x)
+ x + 1
+ end
+ foo (generic function with 1 method)
+
+They start on a new line with "julia>". Usually there should also be a space after this, but
+we also allow the code to start right after the > character. The code may run over multiple
+lines, but the additional lines must start with six spaces (i.e. be indented to match
+"julia>"). The rest of the code is assumed to be output from the executed code and will be
+left un-highlighted.
+
+Using simply spaces to identify line continuations may get a false-positive if the output
+also prints out six spaces, but such cases should be rare.
+*/
+
+function juliaRepl(hljs) {
+ return {
+ name: 'Julia REPL',
+ contains: [
+ {
+ className: 'meta',
+ begin: /^julia>/,
+ relevance: 10,
+ starts: {
+ // end the highlighting if we are on a new line and the line does not have at
+ // least six spaces in the beginning
+ end: /^(?![ ]{6})/,
+ subLanguage: 'julia'
+ },
+ // jldoctest Markdown blocks are used in the Julia manual and package docs indicate
+ // code snippets that should be verified when the documentation is built. They can be
+ // either REPL-like or script-like, but are usually REPL-like and therefore we apply
+ // julia-repl highlighting to them. More information can be found in Documenter's
+ // manual: https://juliadocs.github.io/Documenter.jl/latest/man/doctests.html
+ aliases: ['jldoctest']
+ }
+ ]
+ }
+}
+
+module.exports = juliaRepl;
+
+
+/***/ }),
+
+/***/ 89879:
+/***/ ((module) => {
+
+/*
+Language: Julia
+Description: Julia is a high-level, high-performance, dynamic programming language.
+Author: Kenta Sato
+Contributors: Alex Arslan , Fredrik Ekre
+Website: https://julialang.org
+*/
+
+function julia(hljs) {
+ // Since there are numerous special names in Julia, it is too much trouble
+ // to maintain them by hand. Hence these names (i.e. keywords, literals and
+ // built-ins) are automatically generated from Julia 1.5.2 itself through
+ // the following scripts for each.
+
+ // ref: https://docs.julialang.org/en/v1/manual/variables/#Allowed-Variable-Names
+ var VARIABLE_NAME_RE = '[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*';
+
+ // # keyword generator, multi-word keywords handled manually below (Julia 1.5.2)
+ // import REPL.REPLCompletions
+ // res = String["in", "isa", "where"]
+ // for kw in collect(x.keyword for x in REPLCompletions.complete_keyword(""))
+ // if !(contains(kw, " ") || kw == "struct")
+ // push!(res, kw)
+ // end
+ // end
+ // sort!(unique!(res))
+ // foreach(x -> println("\'", x, "\',"), res)
+ var KEYWORD_LIST = [
+ 'baremodule',
+ 'begin',
+ 'break',
+ 'catch',
+ 'ccall',
+ 'const',
+ 'continue',
+ 'do',
+ 'else',
+ 'elseif',
+ 'end',
+ 'export',
+ 'false',
+ 'finally',
+ 'for',
+ 'function',
+ 'global',
+ 'if',
+ 'import',
+ 'in',
+ 'isa',
+ 'let',
+ 'local',
+ 'macro',
+ 'module',
+ 'quote',
+ 'return',
+ 'true',
+ 'try',
+ 'using',
+ 'where',
+ 'while',
+ ];
+
+ // # literal generator (Julia 1.5.2)
+ // import REPL.REPLCompletions
+ // res = String["true", "false"]
+ // for compl in filter!(x -> isa(x, REPLCompletions.ModuleCompletion) && (x.parent === Base || x.parent === Core),
+ // REPLCompletions.completions("", 0)[1])
+ // try
+ // v = eval(Symbol(compl.mod))
+ // if !(v isa Function || v isa Type || v isa TypeVar || v isa Module || v isa Colon)
+ // push!(res, compl.mod)
+ // end
+ // catch e
+ // end
+ // end
+ // sort!(unique!(res))
+ // foreach(x -> println("\'", x, "\',"), res)
+ var LITERAL_LIST = [
+ 'ARGS',
+ 'C_NULL',
+ 'DEPOT_PATH',
+ 'ENDIAN_BOM',
+ 'ENV',
+ 'Inf',
+ 'Inf16',
+ 'Inf32',
+ 'Inf64',
+ 'InsertionSort',
+ 'LOAD_PATH',
+ 'MergeSort',
+ 'NaN',
+ 'NaN16',
+ 'NaN32',
+ 'NaN64',
+ 'PROGRAM_FILE',
+ 'QuickSort',
+ 'RoundDown',
+ 'RoundFromZero',
+ 'RoundNearest',
+ 'RoundNearestTiesAway',
+ 'RoundNearestTiesUp',
+ 'RoundToZero',
+ 'RoundUp',
+ 'VERSION|0',
+ 'devnull',
+ 'false',
+ 'im',
+ 'missing',
+ 'nothing',
+ 'pi',
+ 'stderr',
+ 'stdin',
+ 'stdout',
+ 'true',
+ 'undef',
+ 'π',
+ 'ℯ',
+ ];
+
+ // # built_in generator (Julia 1.5.2)
+ // import REPL.REPLCompletions
+ // res = String[]
+ // for compl in filter!(x -> isa(x, REPLCompletions.ModuleCompletion) && (x.parent === Base || x.parent === Core),
+ // REPLCompletions.completions("", 0)[1])
+ // try
+ // v = eval(Symbol(compl.mod))
+ // if (v isa Type || v isa TypeVar) && (compl.mod != "=>")
+ // push!(res, compl.mod)
+ // end
+ // catch e
+ // end
+ // end
+ // sort!(unique!(res))
+ // foreach(x -> println("\'", x, "\',"), res)
+ var BUILT_IN_LIST = [
+ 'AbstractArray',
+ 'AbstractChannel',
+ 'AbstractChar',
+ 'AbstractDict',
+ 'AbstractDisplay',
+ 'AbstractFloat',
+ 'AbstractIrrational',
+ 'AbstractMatrix',
+ 'AbstractRange',
+ 'AbstractSet',
+ 'AbstractString',
+ 'AbstractUnitRange',
+ 'AbstractVecOrMat',
+ 'AbstractVector',
+ 'Any',
+ 'ArgumentError',
+ 'Array',
+ 'AssertionError',
+ 'BigFloat',
+ 'BigInt',
+ 'BitArray',
+ 'BitMatrix',
+ 'BitSet',
+ 'BitVector',
+ 'Bool',
+ 'BoundsError',
+ 'CapturedException',
+ 'CartesianIndex',
+ 'CartesianIndices',
+ 'Cchar',
+ 'Cdouble',
+ 'Cfloat',
+ 'Channel',
+ 'Char',
+ 'Cint',
+ 'Cintmax_t',
+ 'Clong',
+ 'Clonglong',
+ 'Cmd',
+ 'Colon',
+ 'Complex',
+ 'ComplexF16',
+ 'ComplexF32',
+ 'ComplexF64',
+ 'CompositeException',
+ 'Condition',
+ 'Cptrdiff_t',
+ 'Cshort',
+ 'Csize_t',
+ 'Cssize_t',
+ 'Cstring',
+ 'Cuchar',
+ 'Cuint',
+ 'Cuintmax_t',
+ 'Culong',
+ 'Culonglong',
+ 'Cushort',
+ 'Cvoid',
+ 'Cwchar_t',
+ 'Cwstring',
+ 'DataType',
+ 'DenseArray',
+ 'DenseMatrix',
+ 'DenseVecOrMat',
+ 'DenseVector',
+ 'Dict',
+ 'DimensionMismatch',
+ 'Dims',
+ 'DivideError',
+ 'DomainError',
+ 'EOFError',
+ 'Enum',
+ 'ErrorException',
+ 'Exception',
+ 'ExponentialBackOff',
+ 'Expr',
+ 'Float16',
+ 'Float32',
+ 'Float64',
+ 'Function',
+ 'GlobalRef',
+ 'HTML',
+ 'IO',
+ 'IOBuffer',
+ 'IOContext',
+ 'IOStream',
+ 'IdDict',
+ 'IndexCartesian',
+ 'IndexLinear',
+ 'IndexStyle',
+ 'InexactError',
+ 'InitError',
+ 'Int',
+ 'Int128',
+ 'Int16',
+ 'Int32',
+ 'Int64',
+ 'Int8',
+ 'Integer',
+ 'InterruptException',
+ 'InvalidStateException',
+ 'Irrational',
+ 'KeyError',
+ 'LinRange',
+ 'LineNumberNode',
+ 'LinearIndices',
+ 'LoadError',
+ 'MIME',
+ 'Matrix',
+ 'Method',
+ 'MethodError',
+ 'Missing',
+ 'MissingException',
+ 'Module',
+ 'NTuple',
+ 'NamedTuple',
+ 'Nothing',
+ 'Number',
+ 'OrdinalRange',
+ 'OutOfMemoryError',
+ 'OverflowError',
+ 'Pair',
+ 'PartialQuickSort',
+ 'PermutedDimsArray',
+ 'Pipe',
+ 'ProcessFailedException',
+ 'Ptr',
+ 'QuoteNode',
+ 'Rational',
+ 'RawFD',
+ 'ReadOnlyMemoryError',
+ 'Real',
+ 'ReentrantLock',
+ 'Ref',
+ 'Regex',
+ 'RegexMatch',
+ 'RoundingMode',
+ 'SegmentationFault',
+ 'Set',
+ 'Signed',
+ 'Some',
+ 'StackOverflowError',
+ 'StepRange',
+ 'StepRangeLen',
+ 'StridedArray',
+ 'StridedMatrix',
+ 'StridedVecOrMat',
+ 'StridedVector',
+ 'String',
+ 'StringIndexError',
+ 'SubArray',
+ 'SubString',
+ 'SubstitutionString',
+ 'Symbol',
+ 'SystemError',
+ 'Task',
+ 'TaskFailedException',
+ 'Text',
+ 'TextDisplay',
+ 'Timer',
+ 'Tuple',
+ 'Type',
+ 'TypeError',
+ 'TypeVar',
+ 'UInt',
+ 'UInt128',
+ 'UInt16',
+ 'UInt32',
+ 'UInt64',
+ 'UInt8',
+ 'UndefInitializer',
+ 'UndefKeywordError',
+ 'UndefRefError',
+ 'UndefVarError',
+ 'Union',
+ 'UnionAll',
+ 'UnitRange',
+ 'Unsigned',
+ 'Val',
+ 'Vararg',
+ 'VecElement',
+ 'VecOrMat',
+ 'Vector',
+ 'VersionNumber',
+ 'WeakKeyDict',
+ 'WeakRef',
+ ];
+
+ var KEYWORDS = {
+ $pattern: VARIABLE_NAME_RE,
+ keyword: KEYWORD_LIST,
+ literal: LITERAL_LIST,
+ built_in: BUILT_IN_LIST,
+ };
+
+ // placeholder for recursive self-reference
+ var DEFAULT = {
+ keywords: KEYWORDS, illegal: /<\//
+ };
+
+ // ref: https://docs.julialang.org/en/v1/manual/integers-and-floating-point-numbers/
+ var NUMBER = {
+ className: 'number',
+ // supported numeric literals:
+ // * binary literal (e.g. 0x10)
+ // * octal literal (e.g. 0o76543210)
+ // * hexadecimal literal (e.g. 0xfedcba876543210)
+ // * hexadecimal floating point literal (e.g. 0x1p0, 0x1.2p2)
+ // * decimal literal (e.g. 9876543210, 100_000_000)
+ // * floating pointe literal (e.g. 1.2, 1.2f, .2, 1., 1.2e10, 1.2e-10)
+ begin: /(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,
+ relevance: 0
+ };
+
+ var CHAR = {
+ className: 'string',
+ begin: /'(.|\\[xXuU][a-zA-Z0-9]+)'/
+ };
+
+ var INTERPOLATION = {
+ className: 'subst',
+ begin: /\$\(/, end: /\)/,
+ keywords: KEYWORDS
+ };
+
+ var INTERPOLATED_VARIABLE = {
+ className: 'variable',
+ begin: '\\$' + VARIABLE_NAME_RE
+ };
+
+ // TODO: neatly escape normal code in string literal
+ var STRING = {
+ className: 'string',
+ contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE],
+ variants: [
+ { begin: /\w*"""/, end: /"""\w*/, relevance: 10 },
+ { begin: /\w*"/, end: /"\w*/ }
+ ]
+ };
+
+ var COMMAND = {
+ className: 'string',
+ contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE],
+ begin: '`', end: '`'
+ };
+
+ var MACROCALL = {
+ className: 'meta',
+ begin: '@' + VARIABLE_NAME_RE
+ };
+
+ var COMMENT = {
+ className: 'comment',
+ variants: [
+ { begin: '#=', end: '=#', relevance: 10 },
+ { begin: '#', end: '$' }
+ ]
+ };
+
+ DEFAULT.name = 'Julia';
+ DEFAULT.contains = [
+ NUMBER,
+ CHAR,
+ STRING,
+ COMMAND,
+ MACROCALL,
+ COMMENT,
+ hljs.HASH_COMMENT_MODE,
+ {
+ className: 'keyword',
+ begin:
+ '\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b'
+ },
+ {begin: /<:/} // relevance booster
+ ];
+ INTERPOLATION.contains = DEFAULT.contains;
+
+ return DEFAULT;
+}
+
+module.exports = julia;
+
+
+/***/ }),
+
+/***/ 17084:
+/***/ ((module) => {
+
+/*
+Language: Lasso
+Author: Eric Knibbe
+Description: Lasso is a language and server platform for database-driven web applications. This definition handles Lasso 9 syntax and LassoScript for Lasso 8.6 and earlier.
+Website: http://www.lassosoft.com/What-Is-Lasso
+*/
+
+function lasso(hljs) {
+ const LASSO_IDENT_RE = '[a-zA-Z_][\\w.]*';
+ const LASSO_ANGLE_RE = '<\\?(lasso(script)?|=)';
+ const LASSO_CLOSE_RE = '\\]|\\?>';
+ const LASSO_KEYWORDS = {
+ $pattern: LASSO_IDENT_RE + '|&[lg]t;',
+ literal:
+ 'true false none minimal full all void and or not ' +
+ 'bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft',
+ built_in:
+ 'array date decimal duration integer map pair string tag xml null ' +
+ 'boolean bytes keyword list locale queue set stack staticarray ' +
+ 'local var variable global data self inherited currentcapture givenblock',
+ keyword:
+ 'cache database_names database_schemanames database_tablenames ' +
+ 'define_tag define_type email_batch encode_set html_comment handle ' +
+ 'handle_error header if inline iterate ljax_target link ' +
+ 'link_currentaction link_currentgroup link_currentrecord link_detail ' +
+ 'link_firstgroup link_firstrecord link_lastgroup link_lastrecord ' +
+ 'link_nextgroup link_nextrecord link_prevgroup link_prevrecord log ' +
+ 'loop namespace_using output_none portal private protect records ' +
+ 'referer referrer repeating resultset rows search_args ' +
+ 'search_arguments select sort_args sort_arguments thread_atomic ' +
+ 'value_list while abort case else fail_if fail_ifnot fail if_empty ' +
+ 'if_false if_null if_true loop_abort loop_continue loop_count params ' +
+ 'params_up return return_value run_children soap_definetag ' +
+ 'soap_lastrequest soap_lastresponse tag_name ascending average by ' +
+ 'define descending do equals frozen group handle_failure import in ' +
+ 'into join let match max min on order parent protected provide public ' +
+ 'require returnhome skip split_thread sum take thread to trait type ' +
+ 'where with yield yieldhome'
+ };
+ const HTML_COMMENT = hljs.COMMENT(
+ '',
+ {
+ relevance: 0
+ }
+ );
+ const LASSO_NOPROCESS = {
+ className: 'meta',
+ begin: '\\[noprocess\\]',
+ starts: {
+ end: '\\[/noprocess\\]',
+ returnEnd: true,
+ contains: [HTML_COMMENT]
+ }
+ };
+ const LASSO_START = {
+ className: 'meta',
+ begin: '\\[/noprocess|' + LASSO_ANGLE_RE
+ };
+ const LASSO_DATAMEMBER = {
+ className: 'symbol',
+ begin: '\'' + LASSO_IDENT_RE + '\''
+ };
+ const LASSO_CODE = [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.inherit(hljs.C_NUMBER_MODE, {
+ begin: hljs.C_NUMBER_RE + '|(-?infinity|NaN)\\b'
+ }),
+ hljs.inherit(hljs.APOS_STRING_MODE, {
+ illegal: null
+ }),
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ illegal: null
+ }),
+ {
+ className: 'string',
+ begin: '`',
+ end: '`'
+ },
+ { // variables
+ variants: [
+ {
+ begin: '[#$]' + LASSO_IDENT_RE
+ },
+ {
+ begin: '#',
+ end: '\\d+',
+ illegal: '\\W'
+ }
+ ]
+ },
+ {
+ className: 'type',
+ begin: '::\\s*',
+ end: LASSO_IDENT_RE,
+ illegal: '\\W'
+ },
+ {
+ className: 'params',
+ variants: [
+ {
+ begin: '-(?!infinity)' + LASSO_IDENT_RE,
+ relevance: 0
+ },
+ {
+ begin: '(\\.\\.\\.)'
+ }
+ ]
+ },
+ {
+ begin: /(->|\.)\s*/,
+ relevance: 0,
+ contains: [LASSO_DATAMEMBER]
+ },
+ {
+ className: 'class',
+ beginKeywords: 'define',
+ returnEnd: true,
+ end: '\\(|=>',
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: LASSO_IDENT_RE + '(=(?!>))?|[-+*/%](?!>)'
+ })
+ ]
+ }
+ ];
+ return {
+ name: 'Lasso',
+ aliases: [
+ 'ls',
+ 'lassoscript'
+ ],
+ case_insensitive: true,
+ keywords: LASSO_KEYWORDS,
+ contains: [
+ {
+ className: 'meta',
+ begin: LASSO_CLOSE_RE,
+ relevance: 0,
+ starts: { // markup
+ end: '\\[|' + LASSO_ANGLE_RE,
+ returnEnd: true,
+ relevance: 0,
+ contains: [HTML_COMMENT]
+ }
+ },
+ LASSO_NOPROCESS,
+ LASSO_START,
+ {
+ className: 'meta',
+ begin: '\\[no_square_brackets',
+ starts: {
+ end: '\\[/no_square_brackets\\]', // not implemented in the language
+ keywords: LASSO_KEYWORDS,
+ contains: [
+ {
+ className: 'meta',
+ begin: LASSO_CLOSE_RE,
+ relevance: 0,
+ starts: {
+ end: '\\[noprocess\\]|' + LASSO_ANGLE_RE,
+ returnEnd: true,
+ contains: [HTML_COMMENT]
+ }
+ },
+ LASSO_NOPROCESS,
+ LASSO_START
+ ].concat(LASSO_CODE)
+ }
+ },
+ {
+ className: 'meta',
+ begin: '\\[',
+ relevance: 0
+ },
+ {
+ className: 'meta',
+ begin: '^#!',
+ end: 'lasso9$',
+ relevance: 10
+ }
+ ].concat(LASSO_CODE)
+ };
+}
+
+module.exports = lasso;
+
+
+/***/ }),
+
+/***/ 71302:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * Any of the passed expresssions may match
+ *
+ * Creates a huge this | this | that | that match
+ * @param {(RegExp | string)[] } args
+ * @returns {string}
+ */
+function either(...args) {
+ const joined = '(' + args.map((x) => source(x)).join("|") + ")";
+ return joined;
+}
+
+/*
+Language: LaTeX
+Author: Benedikt Wilde
+Website: https://www.latex-project.org
+Category: markup
+*/
+
+/** @type LanguageFn */
+function latex(hljs) {
+ const KNOWN_CONTROL_WORDS = either(...[
+ '(?:NeedsTeXFormat|RequirePackage|GetIdInfo)',
+ 'Provides(?:Expl)?(?:Package|Class|File)',
+ '(?:DeclareOption|ProcessOptions)',
+ '(?:documentclass|usepackage|input|include)',
+ 'makeat(?:letter|other)',
+ 'ExplSyntax(?:On|Off)',
+ '(?:new|renew|provide)?command',
+ '(?:re)newenvironment',
+ '(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand',
+ '(?:New|Renew|Provide|Declare)DocumentEnvironment',
+ '(?:(?:e|g|x)?def|let)',
+ '(?:begin|end)',
+ '(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)',
+ 'caption',
+ '(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)',
+ '(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)',
+ '(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)',
+ '(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)',
+ '(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)',
+ '(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)'
+ ].map(word => word + '(?![a-zA-Z@:_])'));
+ const L3_REGEX = new RegExp([
+ // A function \module_function_name:signature or \__module_function_name:signature,
+ // where both module and function_name need at least two characters and
+ // function_name may contain single underscores.
+ '(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*',
+ // A variable \scope_module_and_name_type or \scope__module_ane_name_type,
+ // where scope is one of l, g or c, type needs at least two characters
+ // and module_and_name may contain single underscores.
+ '[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}',
+ // A quark \q_the_name or \q__the_name or
+ // scan mark \s_the_name or \s__vthe_name,
+ // where variable_name needs at least two characters and
+ // may contain single underscores.
+ '[qs]__?[a-zA-Z](?:_?[a-zA-Z])+',
+ // Other LaTeX3 macro names that are not covered by the three rules above.
+ 'use(?:_i)?:[a-zA-Z]*',
+ '(?:else|fi|or):',
+ '(?:if|cs|exp):w',
+ '(?:hbox|vbox):n',
+ '::[a-zA-Z]_unbraced',
+ '::[a-zA-Z:]'
+ ].map(pattern => pattern + '(?![a-zA-Z:_])').join('|'));
+ const L2_VARIANTS = [
+ {begin: /[a-zA-Z@]+/}, // control word
+ {begin: /[^a-zA-Z@]?/} // control symbol
+ ];
+ const DOUBLE_CARET_VARIANTS = [
+ {begin: /\^{6}[0-9a-f]{6}/},
+ {begin: /\^{5}[0-9a-f]{5}/},
+ {begin: /\^{4}[0-9a-f]{4}/},
+ {begin: /\^{3}[0-9a-f]{3}/},
+ {begin: /\^{2}[0-9a-f]{2}/},
+ {begin: /\^{2}[\u0000-\u007f]/}
+ ];
+ const CONTROL_SEQUENCE = {
+ className: 'keyword',
+ begin: /\\/,
+ relevance: 0,
+ contains: [
+ {
+ endsParent: true,
+ begin: KNOWN_CONTROL_WORDS
+ },
+ {
+ endsParent: true,
+ begin: L3_REGEX
+ },
+ {
+ endsParent: true,
+ variants: DOUBLE_CARET_VARIANTS
+ },
+ {
+ endsParent: true,
+ relevance: 0,
+ variants: L2_VARIANTS
+ }
+ ]
+ };
+ const MACRO_PARAM = {
+ className: 'params',
+ relevance: 0,
+ begin: /#+\d?/
+ };
+ const DOUBLE_CARET_CHAR = {
+ // relevance: 1
+ variants: DOUBLE_CARET_VARIANTS
+ };
+ const SPECIAL_CATCODE = {
+ className: 'built_in',
+ relevance: 0,
+ begin: /[$&^_]/
+ };
+ const MAGIC_COMMENT = {
+ className: 'meta',
+ begin: '% !TeX',
+ end: '$',
+ relevance: 10
+ };
+ const COMMENT = hljs.COMMENT(
+ '%',
+ '$',
+ {
+ relevance: 0
+ }
+ );
+ const EVERYTHING_BUT_VERBATIM = [
+ CONTROL_SEQUENCE,
+ MACRO_PARAM,
+ DOUBLE_CARET_CHAR,
+ SPECIAL_CATCODE,
+ MAGIC_COMMENT,
+ COMMENT
+ ];
+ const BRACE_GROUP_NO_VERBATIM = {
+ begin: /\{/, end: /\}/,
+ relevance: 0,
+ contains: ['self', ...EVERYTHING_BUT_VERBATIM]
+ };
+ const ARGUMENT_BRACES = hljs.inherit(
+ BRACE_GROUP_NO_VERBATIM,
+ {
+ relevance: 0,
+ endsParent: true,
+ contains: [BRACE_GROUP_NO_VERBATIM, ...EVERYTHING_BUT_VERBATIM]
+ }
+ );
+ const ARGUMENT_BRACKETS = {
+ begin: /\[/,
+ end: /\]/,
+ endsParent: true,
+ relevance: 0,
+ contains: [BRACE_GROUP_NO_VERBATIM, ...EVERYTHING_BUT_VERBATIM]
+ };
+ const SPACE_GOBBLER = {
+ begin: /\s+/,
+ relevance: 0
+ };
+ const ARGUMENT_M = [ARGUMENT_BRACES];
+ const ARGUMENT_O = [ARGUMENT_BRACKETS];
+ const ARGUMENT_AND_THEN = function(arg, starts_mode) {
+ return {
+ contains: [SPACE_GOBBLER],
+ starts: {
+ relevance: 0,
+ contains: arg,
+ starts: starts_mode
+ }
+ };
+ };
+ const CSNAME = function(csname, starts_mode) {
+ return {
+ begin: '\\\\' + csname + '(?![a-zA-Z@:_])',
+ keywords: {$pattern: /\\[a-zA-Z]+/, keyword: '\\' + csname},
+ relevance: 0,
+ contains: [SPACE_GOBBLER],
+ starts: starts_mode
+ };
+ };
+ const BEGIN_ENV = function(envname, starts_mode) {
+ return hljs.inherit(
+ {
+ begin: '\\\\begin(?=[ \t]*(\\r?\\n[ \t]*)?\\{' + envname + '\\})',
+ keywords: {$pattern: /\\[a-zA-Z]+/, keyword: '\\begin'},
+ relevance: 0,
+ },
+ ARGUMENT_AND_THEN(ARGUMENT_M, starts_mode)
+ );
+ };
+ const VERBATIM_DELIMITED_EQUAL = (innerName = "string") => {
+ return hljs.END_SAME_AS_BEGIN({
+ className: innerName,
+ begin: /(.|\r?\n)/,
+ end: /(.|\r?\n)/,
+ excludeBegin: true,
+ excludeEnd: true,
+ endsParent: true
+ });
+ };
+ const VERBATIM_DELIMITED_ENV = function(envname) {
+ return {
+ className: 'string',
+ end: '(?=\\\\end\\{' + envname + '\\})'
+ };
+ };
+
+ const VERBATIM_DELIMITED_BRACES = (innerName = "string") => {
+ return {
+ relevance: 0,
+ begin: /\{/,
+ starts: {
+ endsParent: true,
+ contains: [
+ {
+ className: innerName,
+ end: /(?=\})/,
+ endsParent:true,
+ contains: [
+ {
+ begin: /\{/,
+ end: /\}/,
+ relevance: 0,
+ contains: ["self"]
+ }
+ ],
+ }
+ ]
+ }
+ };
+ };
+ const VERBATIM = [
+ ...['verb', 'lstinline'].map(csname => CSNAME(csname, {contains: [VERBATIM_DELIMITED_EQUAL()]})),
+ CSNAME('mint', ARGUMENT_AND_THEN(ARGUMENT_M, {contains: [VERBATIM_DELIMITED_EQUAL()]})),
+ CSNAME('mintinline', ARGUMENT_AND_THEN(ARGUMENT_M, {contains: [VERBATIM_DELIMITED_BRACES(), VERBATIM_DELIMITED_EQUAL()]})),
+ CSNAME('url', {contains: [VERBATIM_DELIMITED_BRACES("link"), VERBATIM_DELIMITED_BRACES("link")]}),
+ CSNAME('hyperref', {contains: [VERBATIM_DELIMITED_BRACES("link")]}),
+ CSNAME('href', ARGUMENT_AND_THEN(ARGUMENT_O, {contains: [VERBATIM_DELIMITED_BRACES("link")]})),
+ ...[].concat(...['', '\\*'].map(suffix => [
+ BEGIN_ENV('verbatim' + suffix, VERBATIM_DELIMITED_ENV('verbatim' + suffix)),
+ BEGIN_ENV('filecontents' + suffix, ARGUMENT_AND_THEN(ARGUMENT_M, VERBATIM_DELIMITED_ENV('filecontents' + suffix))),
+ ...['', 'B', 'L'].map(prefix =>
+ BEGIN_ENV(prefix + 'Verbatim' + suffix, ARGUMENT_AND_THEN(ARGUMENT_O, VERBATIM_DELIMITED_ENV(prefix + 'Verbatim' + suffix)))
+ )
+ ])),
+ BEGIN_ENV('minted', ARGUMENT_AND_THEN(ARGUMENT_O, ARGUMENT_AND_THEN(ARGUMENT_M, VERBATIM_DELIMITED_ENV('minted')))),
+ ];
+
+ return {
+ name: 'LaTeX',
+ aliases: ['tex'],
+ contains: [
+ ...VERBATIM,
+ ...EVERYTHING_BUT_VERBATIM
+ ]
+ };
+}
+
+module.exports = latex;
+
+
+/***/ }),
+
+/***/ 94711:
+/***/ ((module) => {
+
+/*
+Language: LDIF
+Contributors: Jacob Childress
+Category: enterprise, config
+Website: https://en.wikipedia.org/wiki/LDAP_Data_Interchange_Format
+*/
+function ldif(hljs) {
+ return {
+ name: 'LDIF',
+ contains: [
+ {
+ className: 'attribute',
+ begin: '^dn',
+ end: ': ',
+ excludeEnd: true,
+ starts: {
+ end: '$',
+ relevance: 0
+ },
+ relevance: 10
+ },
+ {
+ className: 'attribute',
+ begin: '^\\w',
+ end: ': ',
+ excludeEnd: true,
+ starts: {
+ end: '$',
+ relevance: 0
+ }
+ },
+ {
+ className: 'literal',
+ begin: '^-',
+ end: '$'
+ },
+ hljs.HASH_COMMENT_MODE
+ ]
+ };
+}
+
+module.exports = ldif;
+
+
+/***/ }),
+
+/***/ 22796:
+/***/ ((module) => {
+
+/*
+Language: Leaf
+Author: Hale Chan
+Description: Based on the Leaf reference from https://vapor.github.io/documentation/guide/leaf.html.
+*/
+
+function leaf(hljs) {
+ return {
+ name: 'Leaf',
+ contains: [
+ {
+ className: 'function',
+ begin: '#+' + '[A-Za-z_0-9]*' + '\\(',
+ end: / \{/,
+ returnBegin: true,
+ excludeEnd: true,
+ contains: [
+ {
+ className: 'keyword',
+ begin: '#+'
+ },
+ {
+ className: 'title',
+ begin: '[A-Za-z_][A-Za-z_0-9]*'
+ },
+ {
+ className: 'params',
+ begin: '\\(',
+ end: '\\)',
+ endsParent: true,
+ contains: [
+ {
+ className: 'string',
+ begin: '"',
+ end: '"'
+ },
+ {
+ className: 'variable',
+ begin: '[A-Za-z_][A-Za-z_0-9]*'
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = leaf;
+
+
+/***/ }),
+
+/***/ 35665:
+/***/ ((module) => {
+
+const MODES = (hljs) => {
+ return {
+ IMPORTANT: {
+ className: 'meta',
+ begin: '!important'
+ },
+ HEXCOLOR: {
+ className: 'number',
+ begin: '#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})'
+ },
+ ATTRIBUTE_SELECTOR_MODE: {
+ className: 'selector-attr',
+ begin: /\[/,
+ end: /\]/,
+ illegal: '$',
+ contains: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE
+ ]
+ }
+ };
+};
+
+const TAGS = [
+ 'a',
+ 'abbr',
+ 'address',
+ 'article',
+ 'aside',
+ 'audio',
+ 'b',
+ 'blockquote',
+ 'body',
+ 'button',
+ 'canvas',
+ 'caption',
+ 'cite',
+ 'code',
+ 'dd',
+ 'del',
+ 'details',
+ 'dfn',
+ 'div',
+ 'dl',
+ 'dt',
+ 'em',
+ 'fieldset',
+ 'figcaption',
+ 'figure',
+ 'footer',
+ 'form',
+ 'h1',
+ 'h2',
+ 'h3',
+ 'h4',
+ 'h5',
+ 'h6',
+ 'header',
+ 'hgroup',
+ 'html',
+ 'i',
+ 'iframe',
+ 'img',
+ 'input',
+ 'ins',
+ 'kbd',
+ 'label',
+ 'legend',
+ 'li',
+ 'main',
+ 'mark',
+ 'menu',
+ 'nav',
+ 'object',
+ 'ol',
+ 'p',
+ 'q',
+ 'quote',
+ 'samp',
+ 'section',
+ 'span',
+ 'strong',
+ 'summary',
+ 'sup',
+ 'table',
+ 'tbody',
+ 'td',
+ 'textarea',
+ 'tfoot',
+ 'th',
+ 'thead',
+ 'time',
+ 'tr',
+ 'ul',
+ 'var',
+ 'video'
+];
+
+const MEDIA_FEATURES = [
+ 'any-hover',
+ 'any-pointer',
+ 'aspect-ratio',
+ 'color',
+ 'color-gamut',
+ 'color-index',
+ 'device-aspect-ratio',
+ 'device-height',
+ 'device-width',
+ 'display-mode',
+ 'forced-colors',
+ 'grid',
+ 'height',
+ 'hover',
+ 'inverted-colors',
+ 'monochrome',
+ 'orientation',
+ 'overflow-block',
+ 'overflow-inline',
+ 'pointer',
+ 'prefers-color-scheme',
+ 'prefers-contrast',
+ 'prefers-reduced-motion',
+ 'prefers-reduced-transparency',
+ 'resolution',
+ 'scan',
+ 'scripting',
+ 'update',
+ 'width',
+ // TODO: find a better solution?
+ 'min-width',
+ 'max-width',
+ 'min-height',
+ 'max-height'
+];
+
+// https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes
+const PSEUDO_CLASSES = [
+ 'active',
+ 'any-link',
+ 'blank',
+ 'checked',
+ 'current',
+ 'default',
+ 'defined',
+ 'dir', // dir()
+ 'disabled',
+ 'drop',
+ 'empty',
+ 'enabled',
+ 'first',
+ 'first-child',
+ 'first-of-type',
+ 'fullscreen',
+ 'future',
+ 'focus',
+ 'focus-visible',
+ 'focus-within',
+ 'has', // has()
+ 'host', // host or host()
+ 'host-context', // host-context()
+ 'hover',
+ 'indeterminate',
+ 'in-range',
+ 'invalid',
+ 'is', // is()
+ 'lang', // lang()
+ 'last-child',
+ 'last-of-type',
+ 'left',
+ 'link',
+ 'local-link',
+ 'not', // not()
+ 'nth-child', // nth-child()
+ 'nth-col', // nth-col()
+ 'nth-last-child', // nth-last-child()
+ 'nth-last-col', // nth-last-col()
+ 'nth-last-of-type', //nth-last-of-type()
+ 'nth-of-type', //nth-of-type()
+ 'only-child',
+ 'only-of-type',
+ 'optional',
+ 'out-of-range',
+ 'past',
+ 'placeholder-shown',
+ 'read-only',
+ 'read-write',
+ 'required',
+ 'right',
+ 'root',
+ 'scope',
+ 'target',
+ 'target-within',
+ 'user-invalid',
+ 'valid',
+ 'visited',
+ 'where' // where()
+];
+
+// https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements
+const PSEUDO_ELEMENTS = [
+ 'after',
+ 'backdrop',
+ 'before',
+ 'cue',
+ 'cue-region',
+ 'first-letter',
+ 'first-line',
+ 'grammar-error',
+ 'marker',
+ 'part',
+ 'placeholder',
+ 'selection',
+ 'slotted',
+ 'spelling-error'
+];
+
+const ATTRIBUTES = [
+ 'align-content',
+ 'align-items',
+ 'align-self',
+ 'animation',
+ 'animation-delay',
+ 'animation-direction',
+ 'animation-duration',
+ 'animation-fill-mode',
+ 'animation-iteration-count',
+ 'animation-name',
+ 'animation-play-state',
+ 'animation-timing-function',
+ 'auto',
+ 'backface-visibility',
+ 'background',
+ 'background-attachment',
+ 'background-clip',
+ 'background-color',
+ 'background-image',
+ 'background-origin',
+ 'background-position',
+ 'background-repeat',
+ 'background-size',
+ 'border',
+ 'border-bottom',
+ 'border-bottom-color',
+ 'border-bottom-left-radius',
+ 'border-bottom-right-radius',
+ 'border-bottom-style',
+ 'border-bottom-width',
+ 'border-collapse',
+ 'border-color',
+ 'border-image',
+ 'border-image-outset',
+ 'border-image-repeat',
+ 'border-image-slice',
+ 'border-image-source',
+ 'border-image-width',
+ 'border-left',
+ 'border-left-color',
+ 'border-left-style',
+ 'border-left-width',
+ 'border-radius',
+ 'border-right',
+ 'border-right-color',
+ 'border-right-style',
+ 'border-right-width',
+ 'border-spacing',
+ 'border-style',
+ 'border-top',
+ 'border-top-color',
+ 'border-top-left-radius',
+ 'border-top-right-radius',
+ 'border-top-style',
+ 'border-top-width',
+ 'border-width',
+ 'bottom',
+ 'box-decoration-break',
+ 'box-shadow',
+ 'box-sizing',
+ 'break-after',
+ 'break-before',
+ 'break-inside',
+ 'caption-side',
+ 'clear',
+ 'clip',
+ 'clip-path',
+ 'color',
+ 'column-count',
+ 'column-fill',
+ 'column-gap',
+ 'column-rule',
+ 'column-rule-color',
+ 'column-rule-style',
+ 'column-rule-width',
+ 'column-span',
+ 'column-width',
+ 'columns',
+ 'content',
+ 'counter-increment',
+ 'counter-reset',
+ 'cursor',
+ 'direction',
+ 'display',
+ 'empty-cells',
+ 'filter',
+ 'flex',
+ 'flex-basis',
+ 'flex-direction',
+ 'flex-flow',
+ 'flex-grow',
+ 'flex-shrink',
+ 'flex-wrap',
+ 'float',
+ 'font',
+ 'font-display',
+ 'font-family',
+ 'font-feature-settings',
+ 'font-kerning',
+ 'font-language-override',
+ 'font-size',
+ 'font-size-adjust',
+ 'font-smoothing',
+ 'font-stretch',
+ 'font-style',
+ 'font-variant',
+ 'font-variant-ligatures',
+ 'font-variation-settings',
+ 'font-weight',
+ 'height',
+ 'hyphens',
+ 'icon',
+ 'image-orientation',
+ 'image-rendering',
+ 'image-resolution',
+ 'ime-mode',
+ 'inherit',
+ 'initial',
+ 'justify-content',
+ 'left',
+ 'letter-spacing',
+ 'line-height',
+ 'list-style',
+ 'list-style-image',
+ 'list-style-position',
+ 'list-style-type',
+ 'margin',
+ 'margin-bottom',
+ 'margin-left',
+ 'margin-right',
+ 'margin-top',
+ 'marks',
+ 'mask',
+ 'max-height',
+ 'max-width',
+ 'min-height',
+ 'min-width',
+ 'nav-down',
+ 'nav-index',
+ 'nav-left',
+ 'nav-right',
+ 'nav-up',
+ 'none',
+ 'normal',
+ 'object-fit',
+ 'object-position',
+ 'opacity',
+ 'order',
+ 'orphans',
+ 'outline',
+ 'outline-color',
+ 'outline-offset',
+ 'outline-style',
+ 'outline-width',
+ 'overflow',
+ 'overflow-wrap',
+ 'overflow-x',
+ 'overflow-y',
+ 'padding',
+ 'padding-bottom',
+ 'padding-left',
+ 'padding-right',
+ 'padding-top',
+ 'page-break-after',
+ 'page-break-before',
+ 'page-break-inside',
+ 'perspective',
+ 'perspective-origin',
+ 'pointer-events',
+ 'position',
+ 'quotes',
+ 'resize',
+ 'right',
+ 'src', // @font-face
+ 'tab-size',
+ 'table-layout',
+ 'text-align',
+ 'text-align-last',
+ 'text-decoration',
+ 'text-decoration-color',
+ 'text-decoration-line',
+ 'text-decoration-style',
+ 'text-indent',
+ 'text-overflow',
+ 'text-rendering',
+ 'text-shadow',
+ 'text-transform',
+ 'text-underline-position',
+ 'top',
+ 'transform',
+ 'transform-origin',
+ 'transform-style',
+ 'transition',
+ 'transition-delay',
+ 'transition-duration',
+ 'transition-property',
+ 'transition-timing-function',
+ 'unicode-bidi',
+ 'vertical-align',
+ 'visibility',
+ 'white-space',
+ 'widows',
+ 'width',
+ 'word-break',
+ 'word-spacing',
+ 'word-wrap',
+ 'z-index'
+ // reverse makes sure longer attributes `font-weight` are matched fully
+ // instead of getting false positives on say `font`
+].reverse();
+
+// some grammars use them all as a single group
+const PSEUDO_SELECTORS = PSEUDO_CLASSES.concat(PSEUDO_ELEMENTS);
+
+/*
+Language: Less
+Description: It's CSS, with just a little more.
+Author: Max Mikhailov
+Website: http://lesscss.org
+Category: common, css
+*/
+
+/** @type LanguageFn */
+function less(hljs) {
+ const modes = MODES(hljs);
+ const PSEUDO_SELECTORS$1 = PSEUDO_SELECTORS;
+
+ const AT_MODIFIERS = "and or not only";
+ const IDENT_RE = '[\\w-]+'; // yes, Less identifiers may begin with a digit
+ const INTERP_IDENT_RE = '(' + IDENT_RE + '|@\\{' + IDENT_RE + '\\})';
+
+ /* Generic Modes */
+
+ const RULES = []; const VALUE_MODES = []; // forward def. for recursive modes
+
+ const STRING_MODE = function(c) {
+ return {
+ // Less strings are not multiline (also include '~' for more consistent coloring of "escaped" strings)
+ className: 'string',
+ begin: '~?' + c + '.*?' + c
+ };
+ };
+
+ const IDENT_MODE = function(name, begin, relevance) {
+ return {
+ className: name,
+ begin: begin,
+ relevance: relevance
+ };
+ };
+
+ const AT_KEYWORDS = {
+ $pattern: /[a-z-]+/,
+ keyword: AT_MODIFIERS,
+ attribute: MEDIA_FEATURES.join(" ")
+ };
+
+ const PARENS_MODE = {
+ // used only to properly balance nested parens inside mixin call, def. arg list
+ begin: '\\(',
+ end: '\\)',
+ contains: VALUE_MODES,
+ keywords: AT_KEYWORDS,
+ relevance: 0
+ };
+
+ // generic Less highlighter (used almost everywhere except selectors):
+ VALUE_MODES.push(
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ STRING_MODE("'"),
+ STRING_MODE('"'),
+ hljs.CSS_NUMBER_MODE, // fixme: it does not include dot for numbers like .5em :(
+ {
+ begin: '(url|data-uri)\\(',
+ starts: {
+ className: 'string',
+ end: '[\\)\\n]',
+ excludeEnd: true
+ }
+ },
+ modes.HEXCOLOR,
+ PARENS_MODE,
+ IDENT_MODE('variable', '@@?' + IDENT_RE, 10),
+ IDENT_MODE('variable', '@\\{' + IDENT_RE + '\\}'),
+ IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string
+ { // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):
+ className: 'attribute',
+ begin: IDENT_RE + '\\s*:',
+ end: ':',
+ returnBegin: true,
+ excludeEnd: true
+ },
+ modes.IMPORTANT
+ );
+
+ const VALUE_WITH_RULESETS = VALUE_MODES.concat({
+ begin: /\{/,
+ end: /\}/,
+ contains: RULES
+ });
+
+ const MIXIN_GUARD_MODE = {
+ beginKeywords: 'when',
+ endsWithParent: true,
+ contains: [
+ {
+ beginKeywords: 'and not'
+ }
+ ].concat(VALUE_MODES) // using this form to override VALUE’s 'function' match
+ };
+
+ /* Rule-Level Modes */
+
+ const RULE_MODE = {
+ begin: INTERP_IDENT_RE + '\\s*:',
+ returnBegin: true,
+ end: /[;}]/,
+ relevance: 0,
+ contains: [
+ {
+ begin: /-(webkit|moz|ms|o)-/
+ },
+ {
+ className: 'attribute',
+ begin: '\\b(' + ATTRIBUTES.join('|') + ')\\b',
+ end: /(?=:)/,
+ starts: {
+ endsWithParent: true,
+ illegal: '[<=$]',
+ relevance: 0,
+ contains: VALUE_MODES
+ }
+ }
+ ]
+ };
+
+ const AT_RULE_MODE = {
+ className: 'keyword',
+ begin: '@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b',
+ starts: {
+ end: '[;{}]',
+ keywords: AT_KEYWORDS,
+ returnEnd: true,
+ contains: VALUE_MODES,
+ relevance: 0
+ }
+ };
+
+ // variable definitions and calls
+ const VAR_RULE_MODE = {
+ className: 'variable',
+ variants: [
+ // using more strict pattern for higher relevance to increase chances of Less detection.
+ // this is *the only* Less specific statement used in most of the sources, so...
+ // (we’ll still often loose to the css-parser unless there's '//' comment,
+ // simply because 1 variable just can't beat 99 properties :)
+ {
+ begin: '@' + IDENT_RE + '\\s*:',
+ relevance: 15
+ },
+ {
+ begin: '@' + IDENT_RE
+ }
+ ],
+ starts: {
+ end: '[;}]',
+ returnEnd: true,
+ contains: VALUE_WITH_RULESETS
+ }
+ };
+
+ const SELECTOR_MODE = {
+ // first parse unambiguous selectors (i.e. those not starting with tag)
+ // then fall into the scary lookahead-discriminator variant.
+ // this mode also handles mixin definitions and calls
+ variants: [
+ {
+ begin: '[\\.#:&\\[>]',
+ end: '[;{}]' // mixin calls end with ';'
+ },
+ {
+ begin: INTERP_IDENT_RE,
+ end: /\{/
+ }
+ ],
+ returnBegin: true,
+ returnEnd: true,
+ illegal: '[<=\'$"]',
+ relevance: 0,
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ MIXIN_GUARD_MODE,
+ IDENT_MODE('keyword', 'all\\b'),
+ IDENT_MODE('variable', '@\\{' + IDENT_RE + '\\}'), // otherwise it’s identified as tag
+ {
+ begin: '\\b(' + TAGS.join('|') + ')\\b',
+ className: 'selector-tag'
+ },
+ IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes "tags"
+ IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE),
+ IDENT_MODE('selector-class', '\\.' + INTERP_IDENT_RE, 0),
+ IDENT_MODE('selector-tag', '&', 0),
+ modes.ATTRIBUTE_SELECTOR_MODE,
+ {
+ className: 'selector-pseudo',
+ begin: ':(' + PSEUDO_CLASSES.join('|') + ')'
+ },
+ {
+ className: 'selector-pseudo',
+ begin: '::(' + PSEUDO_ELEMENTS.join('|') + ')'
+ },
+ {
+ begin: '\\(',
+ end: '\\)',
+ contains: VALUE_WITH_RULESETS
+ }, // argument list of parametric mixins
+ {
+ begin: '!important'
+ } // eat !important after mixin call or it will be colored as tag
+ ]
+ };
+
+ const PSEUDO_SELECTOR_MODE = {
+ begin: IDENT_RE + ':(:)?' + `(${PSEUDO_SELECTORS$1.join('|')})`,
+ returnBegin: true,
+ contains: [ SELECTOR_MODE ]
+ };
+
+ RULES.push(
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ AT_RULE_MODE,
+ VAR_RULE_MODE,
+ PSEUDO_SELECTOR_MODE,
+ RULE_MODE,
+ SELECTOR_MODE
+ );
+
+ return {
+ name: 'Less',
+ case_insensitive: true,
+ illegal: '[=>\'/<($"]',
+ contains: RULES
+ };
+}
+
+module.exports = less;
+
+
+/***/ }),
+
+/***/ 81388:
+/***/ ((module) => {
+
+/*
+Language: Lisp
+Description: Generic lisp syntax
+Author: Vasily Polovnyov
+Category: lisp
+*/
+
+function lisp(hljs) {
+ var LISP_IDENT_RE = '[a-zA-Z_\\-+\\*\\/<=>][a-zA-Z0-9_\\-+*\\/<=>!]*';
+ var MEC_RE = '\\|[^]*?\\|';
+ var LISP_SIMPLE_NUMBER_RE = '(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|-)?\\d+)?';
+ var LITERAL = {
+ className: 'literal',
+ begin: '\\b(t{1}|nil)\\b'
+ };
+ var NUMBER = {
+ className: 'number',
+ variants: [
+ {begin: LISP_SIMPLE_NUMBER_RE, relevance: 0},
+ {begin: '#(b|B)[0-1]+(/[0-1]+)?'},
+ {begin: '#(o|O)[0-7]+(/[0-7]+)?'},
+ {begin: '#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?'},
+ {begin: '#(c|C)\\(' + LISP_SIMPLE_NUMBER_RE + ' +' + LISP_SIMPLE_NUMBER_RE, end: '\\)'}
+ ]
+ };
+ var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null});
+ var COMMENT = hljs.COMMENT(
+ ';', '$',
+ {
+ relevance: 0
+ }
+ );
+ var VARIABLE = {
+ begin: '\\*', end: '\\*'
+ };
+ var KEYWORD = {
+ className: 'symbol',
+ begin: '[:&]' + LISP_IDENT_RE
+ };
+ var IDENT = {
+ begin: LISP_IDENT_RE,
+ relevance: 0
+ };
+ var MEC = {
+ begin: MEC_RE
+ };
+ var QUOTED_LIST = {
+ begin: '\\(', end: '\\)',
+ contains: ['self', LITERAL, STRING, NUMBER, IDENT]
+ };
+ var QUOTED = {
+ contains: [NUMBER, STRING, VARIABLE, KEYWORD, QUOTED_LIST, IDENT],
+ variants: [
+ {
+ begin: '[\'`]\\(', end: '\\)'
+ },
+ {
+ begin: '\\(quote ', end: '\\)',
+ keywords: {name: 'quote'}
+ },
+ {
+ begin: '\'' + MEC_RE
+ }
+ ]
+ };
+ var QUOTED_ATOM = {
+ variants: [
+ {begin: '\'' + LISP_IDENT_RE},
+ {begin: '#\'' + LISP_IDENT_RE + '(::' + LISP_IDENT_RE + ')*'}
+ ]
+ };
+ var LIST = {
+ begin: '\\(\\s*', end: '\\)'
+ };
+ var BODY = {
+ endsWithParent: true,
+ relevance: 0
+ };
+ LIST.contains = [
+ {
+ className: 'name',
+ variants: [
+ {
+ begin: LISP_IDENT_RE,
+ relevance: 0,
+ },
+ {begin: MEC_RE}
+ ]
+ },
+ BODY
+ ];
+ BODY.contains = [QUOTED, QUOTED_ATOM, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD, MEC, IDENT];
+
+ return {
+ name: 'Lisp',
+ illegal: /\S/,
+ contains: [
+ NUMBER,
+ hljs.SHEBANG(),
+ LITERAL,
+ STRING,
+ COMMENT,
+ QUOTED,
+ QUOTED_ATOM,
+ LIST,
+ IDENT
+ ]
+ };
+}
+
+module.exports = lisp;
+
+
+/***/ }),
+
+/***/ 57232:
+/***/ ((module) => {
+
+/*
+Language: LiveCode
+Author: Ralf Bitter
+Description: Language definition for LiveCode server accounting for revIgniter (a web application framework) characteristics.
+Version: 1.1
+Date: 2019-04-17
+Category: enterprise
+*/
+
+function livecodeserver(hljs) {
+ const VARIABLE = {
+ className: 'variable',
+ variants: [
+ {
+ begin: '\\b([gtps][A-Z]{1}[a-zA-Z0-9]*)(\\[.+\\])?(?:\\s*?)'
+ },
+ {
+ begin: '\\$_[A-Z]+'
+ }
+ ],
+ relevance: 0
+ };
+ const COMMENT_MODES = [
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.HASH_COMMENT_MODE,
+ hljs.COMMENT('--', '$'),
+ hljs.COMMENT('[^:]//', '$')
+ ];
+ const TITLE1 = hljs.inherit(hljs.TITLE_MODE, {
+ variants: [
+ {
+ begin: '\\b_*rig[A-Z][A-Za-z0-9_\\-]*'
+ },
+ {
+ begin: '\\b_[a-z0-9\\-]+'
+ }
+ ]
+ });
+ const TITLE2 = hljs.inherit(hljs.TITLE_MODE, {
+ begin: '\\b([A-Za-z0-9_\\-]+)\\b'
+ });
+ return {
+ name: 'LiveCode',
+ case_insensitive: false,
+ keywords: {
+ keyword:
+ '$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER ' +
+ 'codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph ' +
+ 'after byte bytes english the until http forever descending using line real8 with seventh ' +
+ 'for stdout finally element word words fourth before black ninth sixth characters chars stderr ' +
+ 'uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid ' +
+ 'at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 ' +
+ 'int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat ' +
+ 'end repeat URL in try into switch to words https token binfile each tenth as ticks tick ' +
+ 'system real4 by dateItems without char character ascending eighth whole dateTime numeric short ' +
+ 'first ftp integer abbreviated abbr abbrev private case while if ' +
+ 'div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within ' +
+ 'contains ends with begins the keys of keys',
+ literal:
+ 'SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE ' +
+ 'QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO ' +
+ 'six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five ' +
+ 'quote empty one true return cr linefeed right backslash null seven tab three two ' +
+ 'RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK ' +
+ 'FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK',
+ built_in:
+ 'put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode ' +
+ 'base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum ' +
+ 'cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress ' +
+ 'constantNames cos date dateFormat decompress difference directories ' +
+ 'diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global ' +
+ 'globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset ' +
+ 'keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders ' +
+ 'libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 ' +
+ 'longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge messageAuthenticationCode messageDigest millisec ' +
+ 'millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar ' +
+ 'numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets ' +
+ 'paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation ' +
+ 'populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile ' +
+ 'revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull ' +
+ 'revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered ' +
+ 'revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames ' +
+ 'revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull ' +
+ 'revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections ' +
+ 'revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype ' +
+ 'revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext ' +
+ 'revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames ' +
+ 'revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase ' +
+ 'revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute ' +
+ 'revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces ' +
+ 'revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode ' +
+ 'revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling ' +
+ 'revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error ' +
+ 'revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute ' +
+ 'revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort ' +
+ 'revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree ' +
+ 'revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance ' +
+ 'sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound ' +
+ 'stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper ' +
+ 'transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames ' +
+ 'variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet ' +
+ 'xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process ' +
+ 'combine constant convert create new alias folder directory decrypt delete variable word line folder ' +
+ 'directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile ' +
+ 'libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetDriver ' +
+ 'libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime ' +
+ 'libURLSetStatusCallback load extension loadedExtensions multiply socket prepare process post seek rel relative read from process rename ' +
+ 'replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase ' +
+ 'revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees ' +
+ 'revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord ' +
+ 'revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase ' +
+ 'revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD ' +
+ 'revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost ' +
+ 'revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData ' +
+ 'revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel ' +
+ 'revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback ' +
+ 'revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop ' +
+ 'subtract symmetric union unload vectorDotProduct wait write'
+ },
+ contains: [
+ VARIABLE,
+ {
+ className: 'keyword',
+ begin: '\\bend\\sif\\b'
+ },
+ {
+ className: 'function',
+ beginKeywords: 'function',
+ end: '$',
+ contains: [
+ VARIABLE,
+ TITLE2,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.BINARY_NUMBER_MODE,
+ hljs.C_NUMBER_MODE,
+ TITLE1
+ ]
+ },
+ {
+ className: 'function',
+ begin: '\\bend\\s+',
+ end: '$',
+ keywords: 'end',
+ contains: [
+ TITLE2,
+ TITLE1
+ ],
+ relevance: 0
+ },
+ {
+ beginKeywords: 'command on',
+ end: '$',
+ contains: [
+ VARIABLE,
+ TITLE2,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.BINARY_NUMBER_MODE,
+ hljs.C_NUMBER_MODE,
+ TITLE1
+ ]
+ },
+ {
+ className: 'meta',
+ variants: [
+ {
+ begin: '<\\?(rev|lc|livecode)',
+ relevance: 10
+ },
+ {
+ begin: '<\\?'
+ },
+ {
+ begin: '\\?>'
+ }
+ ]
+ },
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.BINARY_NUMBER_MODE,
+ hljs.C_NUMBER_MODE,
+ TITLE1
+ ].concat(COMMENT_MODES),
+ illegal: ';$|^\\[|^=|&|\\{'
+ };
+}
+
+module.exports = livecodeserver;
+
+
+/***/ }),
+
+/***/ 79369:
+/***/ ((module) => {
+
+const KEYWORDS = [
+ "as", // for exports
+ "in",
+ "of",
+ "if",
+ "for",
+ "while",
+ "finally",
+ "var",
+ "new",
+ "function",
+ "do",
+ "return",
+ "void",
+ "else",
+ "break",
+ "catch",
+ "instanceof",
+ "with",
+ "throw",
+ "case",
+ "default",
+ "try",
+ "switch",
+ "continue",
+ "typeof",
+ "delete",
+ "let",
+ "yield",
+ "const",
+ "class",
+ // JS handles these with a special rule
+ // "get",
+ // "set",
+ "debugger",
+ "async",
+ "await",
+ "static",
+ "import",
+ "from",
+ "export",
+ "extends"
+];
+const LITERALS = [
+ "true",
+ "false",
+ "null",
+ "undefined",
+ "NaN",
+ "Infinity"
+];
+
+const TYPES = [
+ "Intl",
+ "DataView",
+ "Number",
+ "Math",
+ "Date",
+ "String",
+ "RegExp",
+ "Object",
+ "Function",
+ "Boolean",
+ "Error",
+ "Symbol",
+ "Set",
+ "Map",
+ "WeakSet",
+ "WeakMap",
+ "Proxy",
+ "Reflect",
+ "JSON",
+ "Promise",
+ "Float64Array",
+ "Int16Array",
+ "Int32Array",
+ "Int8Array",
+ "Uint16Array",
+ "Uint32Array",
+ "Float32Array",
+ "Array",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "ArrayBuffer",
+ "BigInt64Array",
+ "BigUint64Array",
+ "BigInt"
+];
+
+const ERROR_TYPES = [
+ "EvalError",
+ "InternalError",
+ "RangeError",
+ "ReferenceError",
+ "SyntaxError",
+ "TypeError",
+ "URIError"
+];
+
+const BUILT_IN_GLOBALS = [
+ "setInterval",
+ "setTimeout",
+ "clearInterval",
+ "clearTimeout",
+
+ "require",
+ "exports",
+
+ "eval",
+ "isFinite",
+ "isNaN",
+ "parseFloat",
+ "parseInt",
+ "decodeURI",
+ "decodeURIComponent",
+ "encodeURI",
+ "encodeURIComponent",
+ "escape",
+ "unescape"
+];
+
+const BUILT_IN_VARIABLES = [
+ "arguments",
+ "this",
+ "super",
+ "console",
+ "window",
+ "document",
+ "localStorage",
+ "module",
+ "global" // Node.js
+];
+
+const BUILT_INS = [].concat(
+ BUILT_IN_GLOBALS,
+ BUILT_IN_VARIABLES,
+ TYPES,
+ ERROR_TYPES
+);
+
+/*
+Language: LiveScript
+Author: Taneli Vatanen
+Contributors: Jen Evers-Corvina
+Origin: coffeescript.js
+Description: LiveScript is a programming language that transcompiles to JavaScript. For info about language see http://livescript.net/
+Website: https://livescript.net
+Category: scripting
+*/
+
+function livescript(hljs) {
+ const LIVESCRIPT_BUILT_INS = [
+ 'npm',
+ 'print'
+ ];
+ const LIVESCRIPT_LITERALS = [
+ 'yes',
+ 'no',
+ 'on',
+ 'off',
+ 'it',
+ 'that',
+ 'void'
+ ];
+ const LIVESCRIPT_KEYWORDS = [
+ 'then',
+ 'unless',
+ 'until',
+ 'loop',
+ 'of',
+ 'by',
+ 'when',
+ 'and',
+ 'or',
+ 'is',
+ 'isnt',
+ 'not',
+ 'it',
+ 'that',
+ 'otherwise',
+ 'from',
+ 'to',
+ 'til',
+ 'fallthrough',
+ 'case',
+ 'enum',
+ 'native',
+ 'list',
+ 'map',
+ '__hasProp',
+ '__extends',
+ '__slice',
+ '__bind',
+ '__indexOf'
+ ];
+ const KEYWORDS$1 = {
+ keyword: KEYWORDS.concat(LIVESCRIPT_KEYWORDS),
+ literal: LITERALS.concat(LIVESCRIPT_LITERALS),
+ built_in: BUILT_INS.concat(LIVESCRIPT_BUILT_INS)
+ };
+ const JS_IDENT_RE = '[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*';
+ const TITLE = hljs.inherit(hljs.TITLE_MODE, {
+ begin: JS_IDENT_RE
+ });
+ const SUBST = {
+ className: 'subst',
+ begin: /#\{/,
+ end: /\}/,
+ keywords: KEYWORDS$1
+ };
+ const SUBST_SIMPLE = {
+ className: 'subst',
+ begin: /#[A-Za-z$_]/,
+ end: /(?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,
+ keywords: KEYWORDS$1
+ };
+ const EXPRESSIONS = [
+ hljs.BINARY_NUMBER_MODE,
+ {
+ className: 'number',
+ begin: '(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)',
+ relevance: 0,
+ starts: {
+ end: '(\\s*/)?',
+ relevance: 0
+ } // a number tries to eat the following slash to prevent treating it as a regexp
+ },
+ {
+ className: 'string',
+ variants: [
+ {
+ begin: /'''/,
+ end: /'''/,
+ contains: [hljs.BACKSLASH_ESCAPE]
+ },
+ {
+ begin: /'/,
+ end: /'/,
+ contains: [hljs.BACKSLASH_ESCAPE]
+ },
+ {
+ begin: /"""/,
+ end: /"""/,
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST,
+ SUBST_SIMPLE
+ ]
+ },
+ {
+ begin: /"/,
+ end: /"/,
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST,
+ SUBST_SIMPLE
+ ]
+ },
+ {
+ begin: /\\/,
+ end: /(\s|$)/,
+ excludeEnd: true
+ }
+ ]
+ },
+ {
+ className: 'regexp',
+ variants: [
+ {
+ begin: '//',
+ end: '//[gim]*',
+ contains: [
+ SUBST,
+ hljs.HASH_COMMENT_MODE
+ ]
+ },
+ {
+ // regex can't start with space to parse x / 2 / 3 as two divisions
+ // regex can't start with *, and it supports an "illegal" in the main mode
+ begin: /\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/
+ }
+ ]
+ },
+ {
+ begin: '@' + JS_IDENT_RE
+ },
+ {
+ begin: '``',
+ end: '``',
+ excludeBegin: true,
+ excludeEnd: true,
+ subLanguage: 'javascript'
+ }
+ ];
+ SUBST.contains = EXPRESSIONS;
+
+ const PARAMS = {
+ className: 'params',
+ begin: '\\(',
+ returnBegin: true,
+ /* We need another contained nameless mode to not have every nested
+ pair of parens to be called "params" */
+ contains: [
+ {
+ begin: /\(/,
+ end: /\)/,
+ keywords: KEYWORDS$1,
+ contains: ['self'].concat(EXPRESSIONS)
+ }
+ ]
+ };
+
+ const SYMBOLS = {
+ begin: '(#=>|=>|\\|>>|-?->|!->)'
+ };
+
+ return {
+ name: 'LiveScript',
+ aliases: ['ls'],
+ keywords: KEYWORDS$1,
+ illegal: /\/\*/,
+ contains: EXPRESSIONS.concat([
+ hljs.COMMENT('\\/\\*', '\\*\\/'),
+ hljs.HASH_COMMENT_MODE,
+ SYMBOLS, // relevance booster
+ {
+ className: 'function',
+ contains: [
+ TITLE,
+ PARAMS
+ ],
+ returnBegin: true,
+ variants: [
+ {
+ begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B->\\*?',
+ end: '->\\*?'
+ },
+ {
+ begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?!?(\\(.*\\)\\s*)?\\B[-~]{1,2}>\\*?',
+ end: '[-~]{1,2}>\\*?'
+ },
+ {
+ begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B!?[-~]{1,2}>\\*?',
+ end: '!?[-~]{1,2}>\\*?'
+ }
+ ]
+ },
+ {
+ className: 'class',
+ beginKeywords: 'class',
+ end: '$',
+ illegal: /[:="\[\]]/,
+ contains: [
+ {
+ beginKeywords: 'extends',
+ endsWithParent: true,
+ illegal: /[:="\[\]]/,
+ contains: [TITLE]
+ },
+ TITLE
+ ]
+ },
+ {
+ begin: JS_IDENT_RE + ':',
+ end: ':',
+ returnBegin: true,
+ returnEnd: true,
+ relevance: 0
+ }
+ ])
+ };
+}
+
+module.exports = livescript;
+
+
+/***/ }),
+
+/***/ 64881:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: LLVM IR
+Author: Michael Rodler
+Description: language used as intermediate representation in the LLVM compiler framework
+Website: https://llvm.org/docs/LangRef.html
+Category: assembler
+Audit: 2020
+*/
+
+/** @type LanguageFn */
+function llvm(hljs) {
+ const IDENT_RE = /([-a-zA-Z$._][\w$.-]*)/;
+ const TYPE = {
+ className: 'type',
+ begin: /\bi\d+(?=\s|\b)/
+ };
+ const OPERATOR = {
+ className: 'operator',
+ relevance: 0,
+ begin: /=/
+ };
+ const PUNCTUATION = {
+ className: 'punctuation',
+ relevance: 0,
+ begin: /,/
+ };
+ const NUMBER = {
+ className: 'number',
+ variants: [
+ { begin: /0[xX][a-fA-F0-9]+/ },
+ { begin: /-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/ }
+ ],
+ relevance: 0
+ };
+ const LABEL = {
+ className: 'symbol',
+ variants: [
+ { begin: /^\s*[a-z]+:/ }, // labels
+ ],
+ relevance: 0
+ };
+ const VARIABLE = {
+ className: 'variable',
+ variants: [
+ { begin: concat(/%/, IDENT_RE) },
+ { begin: /%\d+/ },
+ { begin: /#\d+/ },
+ ]
+ };
+ const FUNCTION = {
+ className: 'title',
+ variants: [
+ { begin: concat(/@/, IDENT_RE) },
+ { begin: /@\d+/ },
+ { begin: concat(/!/, IDENT_RE) },
+ { begin: concat(/!\d+/, IDENT_RE) },
+ // https://llvm.org/docs/LangRef.html#namedmetadatastructure
+ // obviously a single digit can also be used in this fashion
+ { begin: /!\d+/ }
+ ]
+ };
+
+ return {
+ name: 'LLVM IR',
+ // TODO: split into different categories of keywords
+ keywords:
+ 'begin end true false declare define global ' +
+ 'constant private linker_private internal ' +
+ 'available_externally linkonce linkonce_odr weak ' +
+ 'weak_odr appending dllimport dllexport common ' +
+ 'default hidden protected extern_weak external ' +
+ 'thread_local zeroinitializer undef null to tail ' +
+ 'target triple datalayout volatile nuw nsw nnan ' +
+ 'ninf nsz arcp fast exact inbounds align ' +
+ 'addrspace section alias module asm sideeffect ' +
+ 'gc dbg linker_private_weak attributes blockaddress ' +
+ 'initialexec localdynamic localexec prefix unnamed_addr ' +
+ 'ccc fastcc coldcc x86_stdcallcc x86_fastcallcc ' +
+ 'arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ' +
+ 'ptx_kernel intel_ocl_bicc msp430_intrcc spir_func ' +
+ 'spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc ' +
+ 'cc c signext zeroext inreg sret nounwind ' +
+ 'noreturn noalias nocapture byval nest readnone ' +
+ 'readonly inlinehint noinline alwaysinline optsize ssp ' +
+ 'sspreq noredzone noimplicitfloat naked builtin cold ' +
+ 'nobuiltin noduplicate nonlazybind optnone returns_twice ' +
+ 'sanitize_address sanitize_memory sanitize_thread sspstrong ' +
+ 'uwtable returned type opaque eq ne slt sgt ' +
+ 'sle sge ult ugt ule uge oeq one olt ogt ' +
+ 'ole oge ord uno ueq une x acq_rel acquire ' +
+ 'alignstack atomic catch cleanup filter inteldialect ' +
+ 'max min monotonic nand personality release seq_cst ' +
+ 'singlethread umax umin unordered xchg add fadd ' +
+ 'sub fsub mul fmul udiv sdiv fdiv urem srem ' +
+ 'frem shl lshr ashr and or xor icmp fcmp ' +
+ 'phi call trunc zext sext fptrunc fpext uitofp ' +
+ 'sitofp fptoui fptosi inttoptr ptrtoint bitcast ' +
+ 'addrspacecast select va_arg ret br switch invoke ' +
+ 'unwind unreachable indirectbr landingpad resume ' +
+ 'malloc alloca free load store getelementptr ' +
+ 'extractelement insertelement shufflevector getresult ' +
+ 'extractvalue insertvalue atomicrmw cmpxchg fence ' +
+ 'argmemonly double',
+ contains: [
+ TYPE,
+ // this matches "empty comments"...
+ // ...because it's far more likely this is a statement terminator in
+ // another language than an actual comment
+ hljs.COMMENT(/;\s*$/, null, { relevance: 0 }),
+ hljs.COMMENT(/;/, /$/),
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'string',
+ variants: [
+ // Double-quoted string
+ { begin: /"/, end: /[^\\]"/ },
+ ]
+ },
+ FUNCTION,
+ PUNCTUATION,
+ OPERATOR,
+ VARIABLE,
+ LABEL,
+ NUMBER
+ ]
+ };
+}
+
+module.exports = llvm;
+
+
+/***/ }),
+
+/***/ 38477:
+/***/ ((module) => {
+
+/*
+Language: LSL (Linden Scripting Language)
+Description: The Linden Scripting Language is used in Second Life by Linden Labs.
+Author: Builder's Brewery
+Website: http://wiki.secondlife.com/wiki/LSL_Portal
+Category: scripting
+*/
+
+function lsl(hljs) {
+
+ var LSL_STRING_ESCAPE_CHARS = {
+ className: 'subst',
+ begin: /\\[tn"\\]/
+ };
+
+ var LSL_STRINGS = {
+ className: 'string',
+ begin: '"',
+ end: '"',
+ contains: [
+ LSL_STRING_ESCAPE_CHARS
+ ]
+ };
+
+ var LSL_NUMBERS = {
+ className: 'number',
+ relevance:0,
+ begin: hljs.C_NUMBER_RE
+ };
+
+ var LSL_CONSTANTS = {
+ className: 'literal',
+ variants: [
+ {
+ begin: '\\b(PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b'
+ },
+ {
+ begin: '\\b(XP_ERROR_(EXPERIENCES_DISABLED|EXPERIENCE_(DISABLED|SUSPENDED)|INVALID_(EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(FOUND|PERMITTED(_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(_OBJECT)?|(DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(_(BY_(LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(PARCEL(_OWNER)?|REGION)))?|CAMERA_(PITCH|DISTANCE|BEHINDNESS_(ANGLE|LAG)|(FOCUS|POSITION)(_(THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(ROOT|SET|ALL_(OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(IVE|_(ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(FWD|BACK|(ROT_)?(LEFT|RIGHT)|UP|DOWN|(ML_)?LBUTTON)|PERMISSION_(RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(_START)?|TELEPORT|MEDIA)|OBJECT_(CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_(ATTACHED|ON_REZ)|NAME|DESC|POS|PRIM_(COUNT|EQUIVALENCE)|RETURN_(PARCEL(_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP(_TAG)?|CREATOR|ATTACHED_(POINT|SLOTS_AVAILABLE)|RENDER_WEIGHT|(BODY_SHAPE|PATHFINDING)_TYPE|(RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(MEMORY|TIME))|TYPE_(INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(DEBUG|PUBLIC)_CHANNEL|ATTACH_(AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](SHOULDER|HAND|FOOT|EAR|EYE|[UL](ARM|LEG)|HIP)|(LEFT|RIGHT)_PEC|HUD_(CENTER_[12]|TOP_(RIGHT|CENTER|LEFT)|BOTTOM(_(RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(BASE|TIP)|[LR]WING|FACE_(JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(ONLINE|NAME|BORN|SIM_(POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(ON_FILE|USED)|REMOTE_DATA_(CHANNEL|REQUEST|REPLY)|PSYS_(PART_(BF_(ZERO|ONE(_MINUS_(DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(START|END)_(COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(RIBBON|WIND|INTERP_(COLOR|SCALE)|BOUNCE|FOLLOW_(SRC|VELOCITY)|TARGET_(POS|LINEAR)|EMISSIVE)_MASK)|SRC_(MAX_AGE|PATTERN|ANGLE_(BEGIN|END)|BURST_(RATE|PART_COUNT|RADIUS|SPEED_(MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(DROP|EXPLODE|ANGLE(_CONE(_EMPTY)?)?)))|VEHICLE_(REFERENCE_FRAME|TYPE_(NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(LINEAR|ANGULAR)_(FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(LINEAR|ANGULAR)_(DEFLECTION_(EFFICIENCY|TIMESCALE)|MOTOR_(DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(EFFICIENCY|TIMESCALE)|BANKING_(EFFICIENCY|MIX|TIMESCALE)|FLAG_(NO_DEFLECTION_UP|LIMIT_(ROLL_ONLY|MOTOR_UP)|HOVER_((WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(ALLOW_UNSIT|ALPHA_MODE(_(BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(_(BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(_(STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(NONE|LOW|MEDIUM|HIGH)|BUMP_(NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(DEFAULT|PLANAR)|SCRIPTED_SIT_ONLY|SCULPT_(TYPE_(SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(MIRROR|INVERT))|PHYSICS(_(SHAPE_(CONVEX|NONE|PRIM|TYPE)))?|(POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIT_TARGET|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(ALT_IMAGE_ENABLE|CONTROLS|(CURRENT|HOME)_URL|AUTO_(LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(WIDTH|HEIGHT)_PIXELS|WHITELIST(_ENABLE)?|PERMS_(INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(STANDARD|MINI)|PERM_(NONE|OWNER|GROUP|ANYONE)|MAX_(URL_LENGTH|WHITELIST_(SIZE|COUNT)|(WIDTH|HEIGHT)_PIXELS)))|MASK_(BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(MEDIA_COMMAND_(STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(ALLOW_(FLY|(GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(GROUP_)?OBJECTS)|USE_(ACCESS_(GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(GROUP|ALL)_OBJECT_ENTRY)|COUNT_(TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(HIDE|DEFAULT)|REGION_FLAG_(ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(METHOD|MIMETYPE|BODY_(MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|SIT_(INVALID_(AGENT|LINK_OBJECT)|NO(T_EXPERIENCE|_(ACCESS|EXPERIENCE_PERMISSION|SIT_TARGET)))|STRING_(TRIM(_(HEAD|TAIL))?)|CLICK_ACTION_(NONE|TOUCH|SIT|BUY|PAY|OPEN(_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(NONE|SCRIPT_MEMORY)|RC_(DATA_FLAGS|DETECT_PHANTOM|GET_(LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(TYPES|AGENTS|(NON)?PHYSICAL|LAND))|RCERR_(CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(ALLOWED_(AGENT|GROUP)_(ADD|REMOVE)|BANNED_AGENT_(ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(COMMAND|CMD_(PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(CMD_((SMOOTH_)?STOP|JUMP)|DESIRED_(TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(_([ABCD]|NONE))?|MAX_(DECEL|TURN_RADIUS|(ACCEL|SPEED)))|PURSUIT_(OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(EVADE_(HIDDEN|SPOTTED)|FAILURE_(DYNAMIC_PATHFINDING_DISABLED|INVALID_(GOAL|START)|NO_(NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(PARCEL_)?UNREACHABLE)|(GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(_(FAST|NONE|SLOW))?|CONTENT_TYPE_(ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(RADIUS|STATIC)|(PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b'
+ },
+ {
+ begin: '\\b(FALSE|TRUE)\\b'
+ },
+ {
+ begin: '\\b(ZERO_ROTATION)\\b'
+ },
+ {
+ begin: '\\b(EOF|JSON_(ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(GRANTED|DENIED))\\b'
+ },
+ {
+ begin: '\\b(ZERO_VECTOR|TOUCH_INVALID_(TEXCOORD|VECTOR))\\b'
+ }
+ ]
+ };
+
+ var LSL_FUNCTIONS = {
+ className: 'built_in',
+ begin: '\\b(ll(AgentInExperience|(Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(Details|ErrorMessage)|ReturnObjectsBy(ID|Owner)|Json(2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(Mag|Norm|Dist)|Rot(Between|2(Euler|Fwd|Left|Up))|(Euler|Axes)2Rot|Whisper|(Region|Owner)?Say|Shout|Listen(Control|Remove)?|Sensor(Repeat|Remove)?|Detected(Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|([GS]et)(AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(Scale|Offset|Rotate)Texture|(Rot)?Target(Remove)?|(Stop)?MoveToTarget|Apply(Rotational)?Impulse|Set(KeyframedMotion|ContentType|RegionPos|(Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(Queueing|Radius)|Vehicle(Type|(Float|Vector|Rotation)Param)|(Touch|Sit)?Text|Camera(Eye|At)Offset|PrimitiveParams|ClickAction|Link(Alpha|Color|PrimitiveParams(Fast)?|Texture(Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get((Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(PrimitiveParams|Number(OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(Details|PermMask|PrimCount)|Parcel(MaxPrims|Details|Prim(Count|Owners))|Attached(List)?|(SPMax|Free|Used)Memory|Region(Name|TimeDilation|FPS|Corner|AgentCount)|Root(Position|Rotation)|UnixTime|(Parcel|Region)Flags|(Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(Prims|NotecardLines|Sides)|Animation(List)?|(Camera|Local)(Pos|Rot)|Vel|Accel|Omega|Time(stamp|OfDay)|(Object|CenterOf)?Mass|MassMKS|Energy|Owner|(Owner)?Key|SunDirection|Texture(Offset|Scale|Rot)|Inventory(Number|Name|Key|Type|Creator|PermMask)|Permissions(Key)?|StartParameter|List(Length|EntryType)|Date|Agent(Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(Name|State))|(Get|Reset|GetAndReset)Time|PlaySound(Slave)?|LoopSound(Master|Slave)?|(Trigger|Stop|Preload)Sound|((Get|Delete)Sub|Insert)String|To(Upper|Lower)|Give(InventoryList|Money)|RezObject|(Stop)?LookAt|Sleep|CollisionFilter|(Take|Release)Controls|DetachFromAvatar|AttachToAvatar(Temp)?|InstantMessage|(GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(Length|Trim)|(Start|Stop)Animation|TargetOmega|Request(Experience)?Permissions|(Create|Break)Link|BreakAllLinks|(Give|Remove)Inventory|Water|PassTouches|Request(Agent|Inventory)Data|TeleportAgent(Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(Axis|Angle)|A(cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(CSV|Integer|Json|Float|String|Key|Vector|Rot|List(Strided)?)|DeleteSubList|List(Statistics|Sort|Randomize|(Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(Slope|Normal|Contour)|GroundRepel|(Set|Remove)VehicleFlags|SitOnLink|(AvatarOn)?(Link)?SitTarget|Script(Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(Integer|String)ToBase64|XorBase64|Log(10)?|Base64To(String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(Load|Release|(E|Une)scape)URL|ParcelMedia(CommandList|Query)|ModPow|MapDestination|(RemoveFrom|AddTo|Reset)Land(Pass|Ban)List|(Set|Clear)CameraParams|HTTP(Request|Response)|TextBox|DetectedTouch(UV|Face|Pos|(N|Bin)ormal|ST)|(MD5|SHA1|DumpList2)String|Request(Secure)?URL|Clear(Prim|Link)Media|(Link)?ParticleSystem|(Get|Request)(Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b'
+ };
+
+ return {
+ name: 'LSL (Linden Scripting Language)',
+ illegal: ':',
+ contains: [
+ LSL_STRINGS,
+ {
+ className: 'comment',
+ variants: [
+ hljs.COMMENT('//', '$'),
+ hljs.COMMENT('/\\*', '\\*/')
+ ],
+ relevance: 0
+ },
+ LSL_NUMBERS,
+ {
+ className: 'section',
+ variants: [
+ {
+ begin: '\\b(state|default)\\b'
+ },
+ {
+ begin: '\\b(state_(entry|exit)|touch(_(start|end))?|(land_)?collision(_(start|end))?|timer|listen|(no_)?sensor|control|(not_)?at_(rot_)?target|money|email|experience_permissions(_denied)?|run_time_permissions|changed|attach|dataserver|moving_(start|end)|link_message|(on|object)_rez|remote_data|http_re(sponse|quest)|path_update|transaction_result)\\b'
+ }
+ ]
+ },
+ LSL_FUNCTIONS,
+ LSL_CONSTANTS,
+ {
+ className: 'type',
+ begin: '\\b(integer|float|string|key|vector|quaternion|rotation|list)\\b'
+ }
+ ]
+ };
+}
+
+module.exports = lsl;
+
+
+/***/ }),
+
+/***/ 11388:
+/***/ ((module) => {
+
+/*
+Language: Makefile
+Author: Ivan Sagalaev
+Contributors: Joël Porquet
+Website: https://www.gnu.org/software/make/manual/html_node/Introduction.html
+Category: common
+*/
+
+function makefile(hljs) {
+ /* Variables: simple (eg $(var)) and special (eg $@) */
+ const VARIABLE = {
+ className: 'variable',
+ variants: [
+ {
+ begin: '\\$\\(' + hljs.UNDERSCORE_IDENT_RE + '\\)',
+ contains: [ hljs.BACKSLASH_ESCAPE ]
+ },
+ {
+ begin: /\$[@%\^\+\*]/
+ }
+ ]
+ };
+ /* Quoted string with variables inside */
+ const QUOTE_STRING = {
+ className: 'string',
+ begin: /"/,
+ end: /"/,
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ VARIABLE
+ ]
+ };
+ /* Function: $(func arg,...) */
+ const FUNC = {
+ className: 'variable',
+ begin: /\$\([\w-]+\s/,
+ end: /\)/,
+ keywords: {
+ built_in:
+ 'subst patsubst strip findstring filter filter-out sort ' +
+ 'word wordlist firstword lastword dir notdir suffix basename ' +
+ 'addsuffix addprefix join wildcard realpath abspath error warning ' +
+ 'shell origin flavor foreach if or and call eval file value'
+ },
+ contains: [ VARIABLE ]
+ };
+ /* Variable assignment */
+ const ASSIGNMENT = {
+ begin: '^' + hljs.UNDERSCORE_IDENT_RE + '\\s*(?=[:+?]?=)'
+ };
+ /* Meta targets (.PHONY) */
+ const META = {
+ className: 'meta',
+ begin: /^\.PHONY:/,
+ end: /$/,
+ keywords: {
+ $pattern: /[\.\w]+/,
+ 'meta-keyword': '.PHONY'
+ }
+ };
+ /* Targets */
+ const TARGET = {
+ className: 'section',
+ begin: /^[^\s]+:/,
+ end: /$/,
+ contains: [ VARIABLE ]
+ };
+ return {
+ name: 'Makefile',
+ aliases: [
+ 'mk',
+ 'mak',
+ 'make',
+ ],
+ keywords: {
+ $pattern: /[\w-]+/,
+ keyword: 'define endef undefine ifdef ifndef ifeq ifneq else endif ' +
+ 'include -include sinclude override export unexport private vpath'
+ },
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ VARIABLE,
+ QUOTE_STRING,
+ FUNC,
+ ASSIGNMENT,
+ META,
+ TARGET
+ ]
+ };
+}
+
+module.exports = makefile;
+
+
+/***/ }),
+
+/***/ 83745:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: Markdown
+Requires: xml.js
+Author: John Crepezzi
+Website: https://daringfireball.net/projects/markdown/
+Category: common, markup
+*/
+
+function markdown(hljs) {
+ const INLINE_HTML = {
+ begin: /<\/?[A-Za-z_]/,
+ end: '>',
+ subLanguage: 'xml',
+ relevance: 0
+ };
+ const HORIZONTAL_RULE = {
+ begin: '^[-\\*]{3,}',
+ end: '$'
+ };
+ const CODE = {
+ className: 'code',
+ variants: [
+ // TODO: fix to allow these to work with sublanguage also
+ {
+ begin: '(`{3,})[^`](.|\\n)*?\\1`*[ ]*'
+ },
+ {
+ begin: '(~{3,})[^~](.|\\n)*?\\1~*[ ]*'
+ },
+ // needed to allow markdown as a sublanguage to work
+ {
+ begin: '```',
+ end: '```+[ ]*$'
+ },
+ {
+ begin: '~~~',
+ end: '~~~+[ ]*$'
+ },
+ {
+ begin: '`.+?`'
+ },
+ {
+ begin: '(?=^( {4}|\\t))',
+ // use contains to gobble up multiple lines to allow the block to be whatever size
+ // but only have a single open/close tag vs one per line
+ contains: [
+ {
+ begin: '^( {4}|\\t)',
+ end: '(\\n)$'
+ }
+ ],
+ relevance: 0
+ }
+ ]
+ };
+ const LIST = {
+ className: 'bullet',
+ begin: '^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)',
+ end: '\\s+',
+ excludeEnd: true
+ };
+ const LINK_REFERENCE = {
+ begin: /^\[[^\n]+\]:/,
+ returnBegin: true,
+ contains: [
+ {
+ className: 'symbol',
+ begin: /\[/,
+ end: /\]/,
+ excludeBegin: true,
+ excludeEnd: true
+ },
+ {
+ className: 'link',
+ begin: /:\s*/,
+ end: /$/,
+ excludeBegin: true
+ }
+ ]
+ };
+ const URL_SCHEME = /[A-Za-z][A-Za-z0-9+.-]*/;
+ const LINK = {
+ variants: [
+ // too much like nested array access in so many languages
+ // to have any real relevance
+ {
+ begin: /\[.+?\]\[.*?\]/,
+ relevance: 0
+ },
+ // popular internet URLs
+ {
+ begin: /\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,
+ relevance: 2
+ },
+ {
+ begin: concat(/\[.+?\]\(/, URL_SCHEME, /:\/\/.*?\)/),
+ relevance: 2
+ },
+ // relative urls
+ {
+ begin: /\[.+?\]\([./?].*?\)/,
+ relevance: 1
+ },
+ // whatever else, lower relevance (might not be a link at all)
+ {
+ begin: /\[.+?\]\(.*?\)/,
+ relevance: 0
+ }
+ ],
+ returnBegin: true,
+ contains: [
+ {
+ className: 'string',
+ relevance: 0,
+ begin: '\\[',
+ end: '\\]',
+ excludeBegin: true,
+ returnEnd: true
+ },
+ {
+ className: 'link',
+ relevance: 0,
+ begin: '\\]\\(',
+ end: '\\)',
+ excludeBegin: true,
+ excludeEnd: true
+ },
+ {
+ className: 'symbol',
+ relevance: 0,
+ begin: '\\]\\[',
+ end: '\\]',
+ excludeBegin: true,
+ excludeEnd: true
+ }
+ ]
+ };
+ const BOLD = {
+ className: 'strong',
+ contains: [], // defined later
+ variants: [
+ {
+ begin: /_{2}/,
+ end: /_{2}/
+ },
+ {
+ begin: /\*{2}/,
+ end: /\*{2}/
+ }
+ ]
+ };
+ const ITALIC = {
+ className: 'emphasis',
+ contains: [], // defined later
+ variants: [
+ {
+ begin: /\*(?!\*)/,
+ end: /\*/
+ },
+ {
+ begin: /_(?!_)/,
+ end: /_/,
+ relevance: 0
+ }
+ ]
+ };
+ BOLD.contains.push(ITALIC);
+ ITALIC.contains.push(BOLD);
+
+ let CONTAINABLE = [
+ INLINE_HTML,
+ LINK
+ ];
+
+ BOLD.contains = BOLD.contains.concat(CONTAINABLE);
+ ITALIC.contains = ITALIC.contains.concat(CONTAINABLE);
+
+ CONTAINABLE = CONTAINABLE.concat(BOLD, ITALIC);
+
+ const HEADER = {
+ className: 'section',
+ variants: [
+ {
+ begin: '^#{1,6}',
+ end: '$',
+ contains: CONTAINABLE
+ },
+ {
+ begin: '(?=^.+?\\n[=-]{2,}$)',
+ contains: [
+ {
+ begin: '^[=-]*$'
+ },
+ {
+ begin: '^',
+ end: "\\n",
+ contains: CONTAINABLE
+ }
+ ]
+ }
+ ]
+ };
+
+ const BLOCKQUOTE = {
+ className: 'quote',
+ begin: '^>\\s+',
+ contains: CONTAINABLE,
+ end: '$'
+ };
+
+ return {
+ name: 'Markdown',
+ aliases: [
+ 'md',
+ 'mkdown',
+ 'mkd'
+ ],
+ contains: [
+ HEADER,
+ INLINE_HTML,
+ LIST,
+ BOLD,
+ ITALIC,
+ BLOCKQUOTE,
+ CODE,
+ HORIZONTAL_RULE,
+ LINK,
+ LINK_REFERENCE
+ ]
+ };
+}
+
+module.exports = markdown;
+
+
+/***/ }),
+
+/***/ 92982:
+/***/ ((module) => {
+
+const SYSTEM_SYMBOLS = [
+ "AASTriangle",
+ "AbelianGroup",
+ "Abort",
+ "AbortKernels",
+ "AbortProtect",
+ "AbortScheduledTask",
+ "Above",
+ "Abs",
+ "AbsArg",
+ "AbsArgPlot",
+ "Absolute",
+ "AbsoluteCorrelation",
+ "AbsoluteCorrelationFunction",
+ "AbsoluteCurrentValue",
+ "AbsoluteDashing",
+ "AbsoluteFileName",
+ "AbsoluteOptions",
+ "AbsolutePointSize",
+ "AbsoluteThickness",
+ "AbsoluteTime",
+ "AbsoluteTiming",
+ "AcceptanceThreshold",
+ "AccountingForm",
+ "Accumulate",
+ "Accuracy",
+ "AccuracyGoal",
+ "ActionDelay",
+ "ActionMenu",
+ "ActionMenuBox",
+ "ActionMenuBoxOptions",
+ "Activate",
+ "Active",
+ "ActiveClassification",
+ "ActiveClassificationObject",
+ "ActiveItem",
+ "ActivePrediction",
+ "ActivePredictionObject",
+ "ActiveStyle",
+ "AcyclicGraphQ",
+ "AddOnHelpPath",
+ "AddSides",
+ "AddTo",
+ "AddToSearchIndex",
+ "AddUsers",
+ "AdjacencyGraph",
+ "AdjacencyList",
+ "AdjacencyMatrix",
+ "AdjacentMeshCells",
+ "AdjustmentBox",
+ "AdjustmentBoxOptions",
+ "AdjustTimeSeriesForecast",
+ "AdministrativeDivisionData",
+ "AffineHalfSpace",
+ "AffineSpace",
+ "AffineStateSpaceModel",
+ "AffineTransform",
+ "After",
+ "AggregatedEntityClass",
+ "AggregationLayer",
+ "AircraftData",
+ "AirportData",
+ "AirPressureData",
+ "AirTemperatureData",
+ "AiryAi",
+ "AiryAiPrime",
+ "AiryAiZero",
+ "AiryBi",
+ "AiryBiPrime",
+ "AiryBiZero",
+ "AlgebraicIntegerQ",
+ "AlgebraicNumber",
+ "AlgebraicNumberDenominator",
+ "AlgebraicNumberNorm",
+ "AlgebraicNumberPolynomial",
+ "AlgebraicNumberTrace",
+ "AlgebraicRules",
+ "AlgebraicRulesData",
+ "Algebraics",
+ "AlgebraicUnitQ",
+ "Alignment",
+ "AlignmentMarker",
+ "AlignmentPoint",
+ "All",
+ "AllowAdultContent",
+ "AllowedCloudExtraParameters",
+ "AllowedCloudParameterExtensions",
+ "AllowedDimensions",
+ "AllowedFrequencyRange",
+ "AllowedHeads",
+ "AllowGroupClose",
+ "AllowIncomplete",
+ "AllowInlineCells",
+ "AllowKernelInitialization",
+ "AllowLooseGrammar",
+ "AllowReverseGroupClose",
+ "AllowScriptLevelChange",
+ "AllowVersionUpdate",
+ "AllTrue",
+ "Alphabet",
+ "AlphabeticOrder",
+ "AlphabeticSort",
+ "AlphaChannel",
+ "AlternateImage",
+ "AlternatingFactorial",
+ "AlternatingGroup",
+ "AlternativeHypothesis",
+ "Alternatives",
+ "AltitudeMethod",
+ "AmbientLight",
+ "AmbiguityFunction",
+ "AmbiguityList",
+ "Analytic",
+ "AnatomyData",
+ "AnatomyForm",
+ "AnatomyPlot3D",
+ "AnatomySkinStyle",
+ "AnatomyStyling",
+ "AnchoredSearch",
+ "And",
+ "AndersonDarlingTest",
+ "AngerJ",
+ "AngleBisector",
+ "AngleBracket",
+ "AnglePath",
+ "AnglePath3D",
+ "AngleVector",
+ "AngularGauge",
+ "Animate",
+ "AnimationCycleOffset",
+ "AnimationCycleRepetitions",
+ "AnimationDirection",
+ "AnimationDisplayTime",
+ "AnimationRate",
+ "AnimationRepetitions",
+ "AnimationRunning",
+ "AnimationRunTime",
+ "AnimationTimeIndex",
+ "Animator",
+ "AnimatorBox",
+ "AnimatorBoxOptions",
+ "AnimatorElements",
+ "Annotate",
+ "Annotation",
+ "AnnotationDelete",
+ "AnnotationKeys",
+ "AnnotationRules",
+ "AnnotationValue",
+ "Annuity",
+ "AnnuityDue",
+ "Annulus",
+ "AnomalyDetection",
+ "AnomalyDetector",
+ "AnomalyDetectorFunction",
+ "Anonymous",
+ "Antialiasing",
+ "AntihermitianMatrixQ",
+ "Antisymmetric",
+ "AntisymmetricMatrixQ",
+ "Antonyms",
+ "AnyOrder",
+ "AnySubset",
+ "AnyTrue",
+ "Apart",
+ "ApartSquareFree",
+ "APIFunction",
+ "Appearance",
+ "AppearanceElements",
+ "AppearanceRules",
+ "AppellF1",
+ "Append",
+ "AppendCheck",
+ "AppendLayer",
+ "AppendTo",
+ "Apply",
+ "ApplySides",
+ "ArcCos",
+ "ArcCosh",
+ "ArcCot",
+ "ArcCoth",
+ "ArcCsc",
+ "ArcCsch",
+ "ArcCurvature",
+ "ARCHProcess",
+ "ArcLength",
+ "ArcSec",
+ "ArcSech",
+ "ArcSin",
+ "ArcSinDistribution",
+ "ArcSinh",
+ "ArcTan",
+ "ArcTanh",
+ "Area",
+ "Arg",
+ "ArgMax",
+ "ArgMin",
+ "ArgumentCountQ",
+ "ARIMAProcess",
+ "ArithmeticGeometricMean",
+ "ARMAProcess",
+ "Around",
+ "AroundReplace",
+ "ARProcess",
+ "Array",
+ "ArrayComponents",
+ "ArrayDepth",
+ "ArrayFilter",
+ "ArrayFlatten",
+ "ArrayMesh",
+ "ArrayPad",
+ "ArrayPlot",
+ "ArrayQ",
+ "ArrayResample",
+ "ArrayReshape",
+ "ArrayRules",
+ "Arrays",
+ "Arrow",
+ "Arrow3DBox",
+ "ArrowBox",
+ "Arrowheads",
+ "ASATriangle",
+ "Ask",
+ "AskAppend",
+ "AskConfirm",
+ "AskDisplay",
+ "AskedQ",
+ "AskedValue",
+ "AskFunction",
+ "AskState",
+ "AskTemplateDisplay",
+ "AspectRatio",
+ "AspectRatioFixed",
+ "Assert",
+ "AssociateTo",
+ "Association",
+ "AssociationFormat",
+ "AssociationMap",
+ "AssociationQ",
+ "AssociationThread",
+ "AssumeDeterministic",
+ "Assuming",
+ "Assumptions",
+ "AstronomicalData",
+ "Asymptotic",
+ "AsymptoticDSolveValue",
+ "AsymptoticEqual",
+ "AsymptoticEquivalent",
+ "AsymptoticGreater",
+ "AsymptoticGreaterEqual",
+ "AsymptoticIntegrate",
+ "AsymptoticLess",
+ "AsymptoticLessEqual",
+ "AsymptoticOutputTracker",
+ "AsymptoticProduct",
+ "AsymptoticRSolveValue",
+ "AsymptoticSolve",
+ "AsymptoticSum",
+ "Asynchronous",
+ "AsynchronousTaskObject",
+ "AsynchronousTasks",
+ "Atom",
+ "AtomCoordinates",
+ "AtomCount",
+ "AtomDiagramCoordinates",
+ "AtomList",
+ "AtomQ",
+ "AttentionLayer",
+ "Attributes",
+ "Audio",
+ "AudioAmplify",
+ "AudioAnnotate",
+ "AudioAnnotationLookup",
+ "AudioBlockMap",
+ "AudioCapture",
+ "AudioChannelAssignment",
+ "AudioChannelCombine",
+ "AudioChannelMix",
+ "AudioChannels",
+ "AudioChannelSeparate",
+ "AudioData",
+ "AudioDelay",
+ "AudioDelete",
+ "AudioDevice",
+ "AudioDistance",
+ "AudioEncoding",
+ "AudioFade",
+ "AudioFrequencyShift",
+ "AudioGenerator",
+ "AudioIdentify",
+ "AudioInputDevice",
+ "AudioInsert",
+ "AudioInstanceQ",
+ "AudioIntervals",
+ "AudioJoin",
+ "AudioLabel",
+ "AudioLength",
+ "AudioLocalMeasurements",
+ "AudioLooping",
+ "AudioLoudness",
+ "AudioMeasurements",
+ "AudioNormalize",
+ "AudioOutputDevice",
+ "AudioOverlay",
+ "AudioPad",
+ "AudioPan",
+ "AudioPartition",
+ "AudioPause",
+ "AudioPitchShift",
+ "AudioPlay",
+ "AudioPlot",
+ "AudioQ",
+ "AudioRecord",
+ "AudioReplace",
+ "AudioResample",
+ "AudioReverb",
+ "AudioReverse",
+ "AudioSampleRate",
+ "AudioSpectralMap",
+ "AudioSpectralTransformation",
+ "AudioSplit",
+ "AudioStop",
+ "AudioStream",
+ "AudioStreams",
+ "AudioTimeStretch",
+ "AudioTracks",
+ "AudioTrim",
+ "AudioType",
+ "AugmentedPolyhedron",
+ "AugmentedSymmetricPolynomial",
+ "Authenticate",
+ "Authentication",
+ "AuthenticationDialog",
+ "AutoAction",
+ "Autocomplete",
+ "AutocompletionFunction",
+ "AutoCopy",
+ "AutocorrelationTest",
+ "AutoDelete",
+ "AutoEvaluateEvents",
+ "AutoGeneratedPackage",
+ "AutoIndent",
+ "AutoIndentSpacings",
+ "AutoItalicWords",
+ "AutoloadPath",
+ "AutoMatch",
+ "Automatic",
+ "AutomaticImageSize",
+ "AutoMultiplicationSymbol",
+ "AutoNumberFormatting",
+ "AutoOpenNotebooks",
+ "AutoOpenPalettes",
+ "AutoQuoteCharacters",
+ "AutoRefreshed",
+ "AutoRemove",
+ "AutorunSequencing",
+ "AutoScaling",
+ "AutoScroll",
+ "AutoSpacing",
+ "AutoStyleOptions",
+ "AutoStyleWords",
+ "AutoSubmitting",
+ "Axes",
+ "AxesEdge",
+ "AxesLabel",
+ "AxesOrigin",
+ "AxesStyle",
+ "AxiomaticTheory",
+ "Axis",
+ "BabyMonsterGroupB",
+ "Back",
+ "Background",
+ "BackgroundAppearance",
+ "BackgroundTasksSettings",
+ "Backslash",
+ "Backsubstitution",
+ "Backward",
+ "Ball",
+ "Band",
+ "BandpassFilter",
+ "BandstopFilter",
+ "BarabasiAlbertGraphDistribution",
+ "BarChart",
+ "BarChart3D",
+ "BarcodeImage",
+ "BarcodeRecognize",
+ "BaringhausHenzeTest",
+ "BarLegend",
+ "BarlowProschanImportance",
+ "BarnesG",
+ "BarOrigin",
+ "BarSpacing",
+ "BartlettHannWindow",
+ "BartlettWindow",
+ "BaseDecode",
+ "BaseEncode",
+ "BaseForm",
+ "Baseline",
+ "BaselinePosition",
+ "BaseStyle",
+ "BasicRecurrentLayer",
+ "BatchNormalizationLayer",
+ "BatchSize",
+ "BatesDistribution",
+ "BattleLemarieWavelet",
+ "BayesianMaximization",
+ "BayesianMaximizationObject",
+ "BayesianMinimization",
+ "BayesianMinimizationObject",
+ "Because",
+ "BeckmannDistribution",
+ "Beep",
+ "Before",
+ "Begin",
+ "BeginDialogPacket",
+ "BeginFrontEndInteractionPacket",
+ "BeginPackage",
+ "BellB",
+ "BellY",
+ "Below",
+ "BenfordDistribution",
+ "BeniniDistribution",
+ "BenktanderGibratDistribution",
+ "BenktanderWeibullDistribution",
+ "BernoulliB",
+ "BernoulliDistribution",
+ "BernoulliGraphDistribution",
+ "BernoulliProcess",
+ "BernsteinBasis",
+ "BesselFilterModel",
+ "BesselI",
+ "BesselJ",
+ "BesselJZero",
+ "BesselK",
+ "BesselY",
+ "BesselYZero",
+ "Beta",
+ "BetaBinomialDistribution",
+ "BetaDistribution",
+ "BetaNegativeBinomialDistribution",
+ "BetaPrimeDistribution",
+ "BetaRegularized",
+ "Between",
+ "BetweennessCentrality",
+ "BeveledPolyhedron",
+ "BezierCurve",
+ "BezierCurve3DBox",
+ "BezierCurve3DBoxOptions",
+ "BezierCurveBox",
+ "BezierCurveBoxOptions",
+ "BezierFunction",
+ "BilateralFilter",
+ "Binarize",
+ "BinaryDeserialize",
+ "BinaryDistance",
+ "BinaryFormat",
+ "BinaryImageQ",
+ "BinaryRead",
+ "BinaryReadList",
+ "BinarySerialize",
+ "BinaryWrite",
+ "BinCounts",
+ "BinLists",
+ "Binomial",
+ "BinomialDistribution",
+ "BinomialProcess",
+ "BinormalDistribution",
+ "BiorthogonalSplineWavelet",
+ "BipartiteGraphQ",
+ "BiquadraticFilterModel",
+ "BirnbaumImportance",
+ "BirnbaumSaundersDistribution",
+ "BitAnd",
+ "BitClear",
+ "BitGet",
+ "BitLength",
+ "BitNot",
+ "BitOr",
+ "BitSet",
+ "BitShiftLeft",
+ "BitShiftRight",
+ "BitXor",
+ "BiweightLocation",
+ "BiweightMidvariance",
+ "Black",
+ "BlackmanHarrisWindow",
+ "BlackmanNuttallWindow",
+ "BlackmanWindow",
+ "Blank",
+ "BlankForm",
+ "BlankNullSequence",
+ "BlankSequence",
+ "Blend",
+ "Block",
+ "BlockchainAddressData",
+ "BlockchainBase",
+ "BlockchainBlockData",
+ "BlockchainContractValue",
+ "BlockchainData",
+ "BlockchainGet",
+ "BlockchainKeyEncode",
+ "BlockchainPut",
+ "BlockchainTokenData",
+ "BlockchainTransaction",
+ "BlockchainTransactionData",
+ "BlockchainTransactionSign",
+ "BlockchainTransactionSubmit",
+ "BlockMap",
+ "BlockRandom",
+ "BlomqvistBeta",
+ "BlomqvistBetaTest",
+ "Blue",
+ "Blur",
+ "BodePlot",
+ "BohmanWindow",
+ "Bold",
+ "Bond",
+ "BondCount",
+ "BondList",
+ "BondQ",
+ "Bookmarks",
+ "Boole",
+ "BooleanConsecutiveFunction",
+ "BooleanConvert",
+ "BooleanCountingFunction",
+ "BooleanFunction",
+ "BooleanGraph",
+ "BooleanMaxterms",
+ "BooleanMinimize",
+ "BooleanMinterms",
+ "BooleanQ",
+ "BooleanRegion",
+ "Booleans",
+ "BooleanStrings",
+ "BooleanTable",
+ "BooleanVariables",
+ "BorderDimensions",
+ "BorelTannerDistribution",
+ "Bottom",
+ "BottomHatTransform",
+ "BoundaryDiscretizeGraphics",
+ "BoundaryDiscretizeRegion",
+ "BoundaryMesh",
+ "BoundaryMeshRegion",
+ "BoundaryMeshRegionQ",
+ "BoundaryStyle",
+ "BoundedRegionQ",
+ "BoundingRegion",
+ "Bounds",
+ "Box",
+ "BoxBaselineShift",
+ "BoxData",
+ "BoxDimensions",
+ "Boxed",
+ "Boxes",
+ "BoxForm",
+ "BoxFormFormatTypes",
+ "BoxFrame",
+ "BoxID",
+ "BoxMargins",
+ "BoxMatrix",
+ "BoxObject",
+ "BoxRatios",
+ "BoxRotation",
+ "BoxRotationPoint",
+ "BoxStyle",
+ "BoxWhiskerChart",
+ "Bra",
+ "BracketingBar",
+ "BraKet",
+ "BrayCurtisDistance",
+ "BreadthFirstScan",
+ "Break",
+ "BridgeData",
+ "BrightnessEqualize",
+ "BroadcastStationData",
+ "Brown",
+ "BrownForsytheTest",
+ "BrownianBridgeProcess",
+ "BrowserCategory",
+ "BSplineBasis",
+ "BSplineCurve",
+ "BSplineCurve3DBox",
+ "BSplineCurve3DBoxOptions",
+ "BSplineCurveBox",
+ "BSplineCurveBoxOptions",
+ "BSplineFunction",
+ "BSplineSurface",
+ "BSplineSurface3DBox",
+ "BSplineSurface3DBoxOptions",
+ "BubbleChart",
+ "BubbleChart3D",
+ "BubbleScale",
+ "BubbleSizes",
+ "BuildingData",
+ "BulletGauge",
+ "BusinessDayQ",
+ "ButterflyGraph",
+ "ButterworthFilterModel",
+ "Button",
+ "ButtonBar",
+ "ButtonBox",
+ "ButtonBoxOptions",
+ "ButtonCell",
+ "ButtonContents",
+ "ButtonData",
+ "ButtonEvaluator",
+ "ButtonExpandable",
+ "ButtonFrame",
+ "ButtonFunction",
+ "ButtonMargins",
+ "ButtonMinHeight",
+ "ButtonNote",
+ "ButtonNotebook",
+ "ButtonSource",
+ "ButtonStyle",
+ "ButtonStyleMenuListing",
+ "Byte",
+ "ByteArray",
+ "ByteArrayFormat",
+ "ByteArrayQ",
+ "ByteArrayToString",
+ "ByteCount",
+ "ByteOrdering",
+ "C",
+ "CachedValue",
+ "CacheGraphics",
+ "CachePersistence",
+ "CalendarConvert",
+ "CalendarData",
+ "CalendarType",
+ "Callout",
+ "CalloutMarker",
+ "CalloutStyle",
+ "CallPacket",
+ "CanberraDistance",
+ "Cancel",
+ "CancelButton",
+ "CandlestickChart",
+ "CanonicalGraph",
+ "CanonicalizePolygon",
+ "CanonicalizePolyhedron",
+ "CanonicalName",
+ "CanonicalWarpingCorrespondence",
+ "CanonicalWarpingDistance",
+ "CantorMesh",
+ "CantorStaircase",
+ "Cap",
+ "CapForm",
+ "CapitalDifferentialD",
+ "Capitalize",
+ "CapsuleShape",
+ "CaptureRunning",
+ "CardinalBSplineBasis",
+ "CarlemanLinearize",
+ "CarmichaelLambda",
+ "CaseOrdering",
+ "Cases",
+ "CaseSensitive",
+ "Cashflow",
+ "Casoratian",
+ "Catalan",
+ "CatalanNumber",
+ "Catch",
+ "CategoricalDistribution",
+ "Catenate",
+ "CatenateLayer",
+ "CauchyDistribution",
+ "CauchyWindow",
+ "CayleyGraph",
+ "CDF",
+ "CDFDeploy",
+ "CDFInformation",
+ "CDFWavelet",
+ "Ceiling",
+ "CelestialSystem",
+ "Cell",
+ "CellAutoOverwrite",
+ "CellBaseline",
+ "CellBoundingBox",
+ "CellBracketOptions",
+ "CellChangeTimes",
+ "CellContents",
+ "CellContext",
+ "CellDingbat",
+ "CellDynamicExpression",
+ "CellEditDuplicate",
+ "CellElementsBoundingBox",
+ "CellElementSpacings",
+ "CellEpilog",
+ "CellEvaluationDuplicate",
+ "CellEvaluationFunction",
+ "CellEvaluationLanguage",
+ "CellEventActions",
+ "CellFrame",
+ "CellFrameColor",
+ "CellFrameLabelMargins",
+ "CellFrameLabels",
+ "CellFrameMargins",
+ "CellGroup",
+ "CellGroupData",
+ "CellGrouping",
+ "CellGroupingRules",
+ "CellHorizontalScrolling",
+ "CellID",
+ "CellLabel",
+ "CellLabelAutoDelete",
+ "CellLabelMargins",
+ "CellLabelPositioning",
+ "CellLabelStyle",
+ "CellLabelTemplate",
+ "CellMargins",
+ "CellObject",
+ "CellOpen",
+ "CellPrint",
+ "CellProlog",
+ "Cells",
+ "CellSize",
+ "CellStyle",
+ "CellTags",
+ "CellularAutomaton",
+ "CensoredDistribution",
+ "Censoring",
+ "Center",
+ "CenterArray",
+ "CenterDot",
+ "CentralFeature",
+ "CentralMoment",
+ "CentralMomentGeneratingFunction",
+ "Cepstrogram",
+ "CepstrogramArray",
+ "CepstrumArray",
+ "CForm",
+ "ChampernowneNumber",
+ "ChangeOptions",
+ "ChannelBase",
+ "ChannelBrokerAction",
+ "ChannelDatabin",
+ "ChannelHistoryLength",
+ "ChannelListen",
+ "ChannelListener",
+ "ChannelListeners",
+ "ChannelListenerWait",
+ "ChannelObject",
+ "ChannelPreSendFunction",
+ "ChannelReceiverFunction",
+ "ChannelSend",
+ "ChannelSubscribers",
+ "ChanVeseBinarize",
+ "Character",
+ "CharacterCounts",
+ "CharacterEncoding",
+ "CharacterEncodingsPath",
+ "CharacteristicFunction",
+ "CharacteristicPolynomial",
+ "CharacterName",
+ "CharacterNormalize",
+ "CharacterRange",
+ "Characters",
+ "ChartBaseStyle",
+ "ChartElementData",
+ "ChartElementDataFunction",
+ "ChartElementFunction",
+ "ChartElements",
+ "ChartLabels",
+ "ChartLayout",
+ "ChartLegends",
+ "ChartStyle",
+ "Chebyshev1FilterModel",
+ "Chebyshev2FilterModel",
+ "ChebyshevDistance",
+ "ChebyshevT",
+ "ChebyshevU",
+ "Check",
+ "CheckAbort",
+ "CheckAll",
+ "Checkbox",
+ "CheckboxBar",
+ "CheckboxBox",
+ "CheckboxBoxOptions",
+ "ChemicalData",
+ "ChessboardDistance",
+ "ChiDistribution",
+ "ChineseRemainder",
+ "ChiSquareDistribution",
+ "ChoiceButtons",
+ "ChoiceDialog",
+ "CholeskyDecomposition",
+ "Chop",
+ "ChromaticityPlot",
+ "ChromaticityPlot3D",
+ "ChromaticPolynomial",
+ "Circle",
+ "CircleBox",
+ "CircleDot",
+ "CircleMinus",
+ "CirclePlus",
+ "CirclePoints",
+ "CircleThrough",
+ "CircleTimes",
+ "CirculantGraph",
+ "CircularOrthogonalMatrixDistribution",
+ "CircularQuaternionMatrixDistribution",
+ "CircularRealMatrixDistribution",
+ "CircularSymplecticMatrixDistribution",
+ "CircularUnitaryMatrixDistribution",
+ "Circumsphere",
+ "CityData",
+ "ClassifierFunction",
+ "ClassifierInformation",
+ "ClassifierMeasurements",
+ "ClassifierMeasurementsObject",
+ "Classify",
+ "ClassPriors",
+ "Clear",
+ "ClearAll",
+ "ClearAttributes",
+ "ClearCookies",
+ "ClearPermissions",
+ "ClearSystemCache",
+ "ClebschGordan",
+ "ClickPane",
+ "Clip",
+ "ClipboardNotebook",
+ "ClipFill",
+ "ClippingStyle",
+ "ClipPlanes",
+ "ClipPlanesStyle",
+ "ClipRange",
+ "Clock",
+ "ClockGauge",
+ "ClockwiseContourIntegral",
+ "Close",
+ "Closed",
+ "CloseKernels",
+ "ClosenessCentrality",
+ "Closing",
+ "ClosingAutoSave",
+ "ClosingEvent",
+ "ClosingSaveDialog",
+ "CloudAccountData",
+ "CloudBase",
+ "CloudConnect",
+ "CloudConnections",
+ "CloudDeploy",
+ "CloudDirectory",
+ "CloudDisconnect",
+ "CloudEvaluate",
+ "CloudExport",
+ "CloudExpression",
+ "CloudExpressions",
+ "CloudFunction",
+ "CloudGet",
+ "CloudImport",
+ "CloudLoggingData",
+ "CloudObject",
+ "CloudObjectInformation",
+ "CloudObjectInformationData",
+ "CloudObjectNameFormat",
+ "CloudObjects",
+ "CloudObjectURLType",
+ "CloudPublish",
+ "CloudPut",
+ "CloudRenderingMethod",
+ "CloudSave",
+ "CloudShare",
+ "CloudSubmit",
+ "CloudSymbol",
+ "CloudUnshare",
+ "CloudUserID",
+ "ClusterClassify",
+ "ClusterDissimilarityFunction",
+ "ClusteringComponents",
+ "ClusteringTree",
+ "CMYKColor",
+ "Coarse",
+ "CodeAssistOptions",
+ "Coefficient",
+ "CoefficientArrays",
+ "CoefficientDomain",
+ "CoefficientList",
+ "CoefficientRules",
+ "CoifletWavelet",
+ "Collect",
+ "Colon",
+ "ColonForm",
+ "ColorBalance",
+ "ColorCombine",
+ "ColorConvert",
+ "ColorCoverage",
+ "ColorData",
+ "ColorDataFunction",
+ "ColorDetect",
+ "ColorDistance",
+ "ColorFunction",
+ "ColorFunctionScaling",
+ "Colorize",
+ "ColorNegate",
+ "ColorOutput",
+ "ColorProfileData",
+ "ColorQ",
+ "ColorQuantize",
+ "ColorReplace",
+ "ColorRules",
+ "ColorSelectorSettings",
+ "ColorSeparate",
+ "ColorSetter",
+ "ColorSetterBox",
+ "ColorSetterBoxOptions",
+ "ColorSlider",
+ "ColorsNear",
+ "ColorSpace",
+ "ColorToneMapping",
+ "Column",
+ "ColumnAlignments",
+ "ColumnBackgrounds",
+ "ColumnForm",
+ "ColumnLines",
+ "ColumnsEqual",
+ "ColumnSpacings",
+ "ColumnWidths",
+ "CombinedEntityClass",
+ "CombinerFunction",
+ "CometData",
+ "CommonDefaultFormatTypes",
+ "Commonest",
+ "CommonestFilter",
+ "CommonName",
+ "CommonUnits",
+ "CommunityBoundaryStyle",
+ "CommunityGraphPlot",
+ "CommunityLabels",
+ "CommunityRegionStyle",
+ "CompanyData",
+ "CompatibleUnitQ",
+ "CompilationOptions",
+ "CompilationTarget",
+ "Compile",
+ "Compiled",
+ "CompiledCodeFunction",
+ "CompiledFunction",
+ "CompilerOptions",
+ "Complement",
+ "ComplementedEntityClass",
+ "CompleteGraph",
+ "CompleteGraphQ",
+ "CompleteKaryTree",
+ "CompletionsListPacket",
+ "Complex",
+ "ComplexContourPlot",
+ "Complexes",
+ "ComplexExpand",
+ "ComplexInfinity",
+ "ComplexityFunction",
+ "ComplexListPlot",
+ "ComplexPlot",
+ "ComplexPlot3D",
+ "ComplexRegionPlot",
+ "ComplexStreamPlot",
+ "ComplexVectorPlot",
+ "ComponentMeasurements",
+ "ComponentwiseContextMenu",
+ "Compose",
+ "ComposeList",
+ "ComposeSeries",
+ "CompositeQ",
+ "Composition",
+ "CompoundElement",
+ "CompoundExpression",
+ "CompoundPoissonDistribution",
+ "CompoundPoissonProcess",
+ "CompoundRenewalProcess",
+ "Compress",
+ "CompressedData",
+ "CompressionLevel",
+ "ComputeUncertainty",
+ "Condition",
+ "ConditionalExpression",
+ "Conditioned",
+ "Cone",
+ "ConeBox",
+ "ConfidenceLevel",
+ "ConfidenceRange",
+ "ConfidenceTransform",
+ "ConfigurationPath",
+ "ConformAudio",
+ "ConformImages",
+ "Congruent",
+ "ConicHullRegion",
+ "ConicHullRegion3DBox",
+ "ConicHullRegionBox",
+ "ConicOptimization",
+ "Conjugate",
+ "ConjugateTranspose",
+ "Conjunction",
+ "Connect",
+ "ConnectedComponents",
+ "ConnectedGraphComponents",
+ "ConnectedGraphQ",
+ "ConnectedMeshComponents",
+ "ConnectedMoleculeComponents",
+ "ConnectedMoleculeQ",
+ "ConnectionSettings",
+ "ConnectLibraryCallbackFunction",
+ "ConnectSystemModelComponents",
+ "ConnesWindow",
+ "ConoverTest",
+ "ConsoleMessage",
+ "ConsoleMessagePacket",
+ "Constant",
+ "ConstantArray",
+ "ConstantArrayLayer",
+ "ConstantImage",
+ "ConstantPlusLayer",
+ "ConstantRegionQ",
+ "Constants",
+ "ConstantTimesLayer",
+ "ConstellationData",
+ "ConstrainedMax",
+ "ConstrainedMin",
+ "Construct",
+ "Containing",
+ "ContainsAll",
+ "ContainsAny",
+ "ContainsExactly",
+ "ContainsNone",
+ "ContainsOnly",
+ "ContentFieldOptions",
+ "ContentLocationFunction",
+ "ContentObject",
+ "ContentPadding",
+ "ContentsBoundingBox",
+ "ContentSelectable",
+ "ContentSize",
+ "Context",
+ "ContextMenu",
+ "Contexts",
+ "ContextToFileName",
+ "Continuation",
+ "Continue",
+ "ContinuedFraction",
+ "ContinuedFractionK",
+ "ContinuousAction",
+ "ContinuousMarkovProcess",
+ "ContinuousTask",
+ "ContinuousTimeModelQ",
+ "ContinuousWaveletData",
+ "ContinuousWaveletTransform",
+ "ContourDetect",
+ "ContourGraphics",
+ "ContourIntegral",
+ "ContourLabels",
+ "ContourLines",
+ "ContourPlot",
+ "ContourPlot3D",
+ "Contours",
+ "ContourShading",
+ "ContourSmoothing",
+ "ContourStyle",
+ "ContraharmonicMean",
+ "ContrastiveLossLayer",
+ "Control",
+ "ControlActive",
+ "ControlAlignment",
+ "ControlGroupContentsBox",
+ "ControllabilityGramian",
+ "ControllabilityMatrix",
+ "ControllableDecomposition",
+ "ControllableModelQ",
+ "ControllerDuration",
+ "ControllerInformation",
+ "ControllerInformationData",
+ "ControllerLinking",
+ "ControllerManipulate",
+ "ControllerMethod",
+ "ControllerPath",
+ "ControllerState",
+ "ControlPlacement",
+ "ControlsRendering",
+ "ControlType",
+ "Convergents",
+ "ConversionOptions",
+ "ConversionRules",
+ "ConvertToBitmapPacket",
+ "ConvertToPostScript",
+ "ConvertToPostScriptPacket",
+ "ConvexHullMesh",
+ "ConvexPolygonQ",
+ "ConvexPolyhedronQ",
+ "ConvolutionLayer",
+ "Convolve",
+ "ConwayGroupCo1",
+ "ConwayGroupCo2",
+ "ConwayGroupCo3",
+ "CookieFunction",
+ "Cookies",
+ "CoordinateBoundingBox",
+ "CoordinateBoundingBoxArray",
+ "CoordinateBounds",
+ "CoordinateBoundsArray",
+ "CoordinateChartData",
+ "CoordinatesToolOptions",
+ "CoordinateTransform",
+ "CoordinateTransformData",
+ "CoprimeQ",
+ "Coproduct",
+ "CopulaDistribution",
+ "Copyable",
+ "CopyDatabin",
+ "CopyDirectory",
+ "CopyFile",
+ "CopyTag",
+ "CopyToClipboard",
+ "CornerFilter",
+ "CornerNeighbors",
+ "Correlation",
+ "CorrelationDistance",
+ "CorrelationFunction",
+ "CorrelationTest",
+ "Cos",
+ "Cosh",
+ "CoshIntegral",
+ "CosineDistance",
+ "CosineWindow",
+ "CosIntegral",
+ "Cot",
+ "Coth",
+ "Count",
+ "CountDistinct",
+ "CountDistinctBy",
+ "CounterAssignments",
+ "CounterBox",
+ "CounterBoxOptions",
+ "CounterClockwiseContourIntegral",
+ "CounterEvaluator",
+ "CounterFunction",
+ "CounterIncrements",
+ "CounterStyle",
+ "CounterStyleMenuListing",
+ "CountRoots",
+ "CountryData",
+ "Counts",
+ "CountsBy",
+ "Covariance",
+ "CovarianceEstimatorFunction",
+ "CovarianceFunction",
+ "CoxianDistribution",
+ "CoxIngersollRossProcess",
+ "CoxModel",
+ "CoxModelFit",
+ "CramerVonMisesTest",
+ "CreateArchive",
+ "CreateCellID",
+ "CreateChannel",
+ "CreateCloudExpression",
+ "CreateDatabin",
+ "CreateDataStructure",
+ "CreateDataSystemModel",
+ "CreateDialog",
+ "CreateDirectory",
+ "CreateDocument",
+ "CreateFile",
+ "CreateIntermediateDirectories",
+ "CreateManagedLibraryExpression",
+ "CreateNotebook",
+ "CreatePacletArchive",
+ "CreatePalette",
+ "CreatePalettePacket",
+ "CreatePermissionsGroup",
+ "CreateScheduledTask",
+ "CreateSearchIndex",
+ "CreateSystemModel",
+ "CreateTemporary",
+ "CreateUUID",
+ "CreateWindow",
+ "CriterionFunction",
+ "CriticalityFailureImportance",
+ "CriticalitySuccessImportance",
+ "CriticalSection",
+ "Cross",
+ "CrossEntropyLossLayer",
+ "CrossingCount",
+ "CrossingDetect",
+ "CrossingPolygon",
+ "CrossMatrix",
+ "Csc",
+ "Csch",
+ "CTCLossLayer",
+ "Cube",
+ "CubeRoot",
+ "Cubics",
+ "Cuboid",
+ "CuboidBox",
+ "Cumulant",
+ "CumulantGeneratingFunction",
+ "Cup",
+ "CupCap",
+ "Curl",
+ "CurlyDoubleQuote",
+ "CurlyQuote",
+ "CurrencyConvert",
+ "CurrentDate",
+ "CurrentImage",
+ "CurrentlySpeakingPacket",
+ "CurrentNotebookImage",
+ "CurrentScreenImage",
+ "CurrentValue",
+ "Curry",
+ "CurryApplied",
+ "CurvatureFlowFilter",
+ "CurveClosed",
+ "Cyan",
+ "CycleGraph",
+ "CycleIndexPolynomial",
+ "Cycles",
+ "CyclicGroup",
+ "Cyclotomic",
+ "Cylinder",
+ "CylinderBox",
+ "CylindricalDecomposition",
+ "D",
+ "DagumDistribution",
+ "DamData",
+ "DamerauLevenshteinDistance",
+ "DampingFactor",
+ "Darker",
+ "Dashed",
+ "Dashing",
+ "DatabaseConnect",
+ "DatabaseDisconnect",
+ "DatabaseReference",
+ "Databin",
+ "DatabinAdd",
+ "DatabinRemove",
+ "Databins",
+ "DatabinUpload",
+ "DataCompression",
+ "DataDistribution",
+ "DataRange",
+ "DataReversed",
+ "Dataset",
+ "DatasetDisplayPanel",
+ "DataStructure",
+ "DataStructureQ",
+ "Date",
+ "DateBounds",
+ "Dated",
+ "DateDelimiters",
+ "DateDifference",
+ "DatedUnit",
+ "DateFormat",
+ "DateFunction",
+ "DateHistogram",
+ "DateInterval",
+ "DateList",
+ "DateListLogPlot",
+ "DateListPlot",
+ "DateListStepPlot",
+ "DateObject",
+ "DateObjectQ",
+ "DateOverlapsQ",
+ "DatePattern",
+ "DatePlus",
+ "DateRange",
+ "DateReduction",
+ "DateString",
+ "DateTicksFormat",
+ "DateValue",
+ "DateWithinQ",
+ "DaubechiesWavelet",
+ "DavisDistribution",
+ "DawsonF",
+ "DayCount",
+ "DayCountConvention",
+ "DayHemisphere",
+ "DaylightQ",
+ "DayMatchQ",
+ "DayName",
+ "DayNightTerminator",
+ "DayPlus",
+ "DayRange",
+ "DayRound",
+ "DeBruijnGraph",
+ "DeBruijnSequence",
+ "Debug",
+ "DebugTag",
+ "Decapitalize",
+ "Decimal",
+ "DecimalForm",
+ "DeclareKnownSymbols",
+ "DeclarePackage",
+ "Decompose",
+ "DeconvolutionLayer",
+ "Decrement",
+ "Decrypt",
+ "DecryptFile",
+ "DedekindEta",
+ "DeepSpaceProbeData",
+ "Default",
+ "DefaultAxesStyle",
+ "DefaultBaseStyle",
+ "DefaultBoxStyle",
+ "DefaultButton",
+ "DefaultColor",
+ "DefaultControlPlacement",
+ "DefaultDuplicateCellStyle",
+ "DefaultDuration",
+ "DefaultElement",
+ "DefaultFaceGridsStyle",
+ "DefaultFieldHintStyle",
+ "DefaultFont",
+ "DefaultFontProperties",
+ "DefaultFormatType",
+ "DefaultFormatTypeForStyle",
+ "DefaultFrameStyle",
+ "DefaultFrameTicksStyle",
+ "DefaultGridLinesStyle",
+ "DefaultInlineFormatType",
+ "DefaultInputFormatType",
+ "DefaultLabelStyle",
+ "DefaultMenuStyle",
+ "DefaultNaturalLanguage",
+ "DefaultNewCellStyle",
+ "DefaultNewInlineCellStyle",
+ "DefaultNotebook",
+ "DefaultOptions",
+ "DefaultOutputFormatType",
+ "DefaultPrintPrecision",
+ "DefaultStyle",
+ "DefaultStyleDefinitions",
+ "DefaultTextFormatType",
+ "DefaultTextInlineFormatType",
+ "DefaultTicksStyle",
+ "DefaultTooltipStyle",
+ "DefaultValue",
+ "DefaultValues",
+ "Defer",
+ "DefineExternal",
+ "DefineInputStreamMethod",
+ "DefineOutputStreamMethod",
+ "DefineResourceFunction",
+ "Definition",
+ "Degree",
+ "DegreeCentrality",
+ "DegreeGraphDistribution",
+ "DegreeLexicographic",
+ "DegreeReverseLexicographic",
+ "DEigensystem",
+ "DEigenvalues",
+ "Deinitialization",
+ "Del",
+ "DelaunayMesh",
+ "Delayed",
+ "Deletable",
+ "Delete",
+ "DeleteAnomalies",
+ "DeleteBorderComponents",
+ "DeleteCases",
+ "DeleteChannel",
+ "DeleteCloudExpression",
+ "DeleteContents",
+ "DeleteDirectory",
+ "DeleteDuplicates",
+ "DeleteDuplicatesBy",
+ "DeleteFile",
+ "DeleteMissing",
+ "DeleteObject",
+ "DeletePermissionsKey",
+ "DeleteSearchIndex",
+ "DeleteSmallComponents",
+ "DeleteStopwords",
+ "DeleteWithContents",
+ "DeletionWarning",
+ "DelimitedArray",
+ "DelimitedSequence",
+ "Delimiter",
+ "DelimiterFlashTime",
+ "DelimiterMatching",
+ "Delimiters",
+ "DeliveryFunction",
+ "Dendrogram",
+ "Denominator",
+ "DensityGraphics",
+ "DensityHistogram",
+ "DensityPlot",
+ "DensityPlot3D",
+ "DependentVariables",
+ "Deploy",
+ "Deployed",
+ "Depth",
+ "DepthFirstScan",
+ "Derivative",
+ "DerivativeFilter",
+ "DerivedKey",
+ "DescriptorStateSpace",
+ "DesignMatrix",
+ "DestroyAfterEvaluation",
+ "Det",
+ "DeviceClose",
+ "DeviceConfigure",
+ "DeviceExecute",
+ "DeviceExecuteAsynchronous",
+ "DeviceObject",
+ "DeviceOpen",
+ "DeviceOpenQ",
+ "DeviceRead",
+ "DeviceReadBuffer",
+ "DeviceReadLatest",
+ "DeviceReadList",
+ "DeviceReadTimeSeries",
+ "Devices",
+ "DeviceStreams",
+ "DeviceWrite",
+ "DeviceWriteBuffer",
+ "DGaussianWavelet",
+ "DiacriticalPositioning",
+ "Diagonal",
+ "DiagonalizableMatrixQ",
+ "DiagonalMatrix",
+ "DiagonalMatrixQ",
+ "Dialog",
+ "DialogIndent",
+ "DialogInput",
+ "DialogLevel",
+ "DialogNotebook",
+ "DialogProlog",
+ "DialogReturn",
+ "DialogSymbols",
+ "Diamond",
+ "DiamondMatrix",
+ "DiceDissimilarity",
+ "DictionaryLookup",
+ "DictionaryWordQ",
+ "DifferenceDelta",
+ "DifferenceOrder",
+ "DifferenceQuotient",
+ "DifferenceRoot",
+ "DifferenceRootReduce",
+ "Differences",
+ "DifferentialD",
+ "DifferentialRoot",
+ "DifferentialRootReduce",
+ "DifferentiatorFilter",
+ "DigitalSignature",
+ "DigitBlock",
+ "DigitBlockMinimum",
+ "DigitCharacter",
+ "DigitCount",
+ "DigitQ",
+ "DihedralAngle",
+ "DihedralGroup",
+ "Dilation",
+ "DimensionalCombinations",
+ "DimensionalMeshComponents",
+ "DimensionReduce",
+ "DimensionReducerFunction",
+ "DimensionReduction",
+ "Dimensions",
+ "DiracComb",
+ "DiracDelta",
+ "DirectedEdge",
+ "DirectedEdges",
+ "DirectedGraph",
+ "DirectedGraphQ",
+ "DirectedInfinity",
+ "Direction",
+ "Directive",
+ "Directory",
+ "DirectoryName",
+ "DirectoryQ",
+ "DirectoryStack",
+ "DirichletBeta",
+ "DirichletCharacter",
+ "DirichletCondition",
+ "DirichletConvolve",
+ "DirichletDistribution",
+ "DirichletEta",
+ "DirichletL",
+ "DirichletLambda",
+ "DirichletTransform",
+ "DirichletWindow",
+ "DisableConsolePrintPacket",
+ "DisableFormatting",
+ "DiscreteAsymptotic",
+ "DiscreteChirpZTransform",
+ "DiscreteConvolve",
+ "DiscreteDelta",
+ "DiscreteHadamardTransform",
+ "DiscreteIndicator",
+ "DiscreteLimit",
+ "DiscreteLQEstimatorGains",
+ "DiscreteLQRegulatorGains",
+ "DiscreteLyapunovSolve",
+ "DiscreteMarkovProcess",
+ "DiscreteMaxLimit",
+ "DiscreteMinLimit",
+ "DiscretePlot",
+ "DiscretePlot3D",
+ "DiscreteRatio",
+ "DiscreteRiccatiSolve",
+ "DiscreteShift",
+ "DiscreteTimeModelQ",
+ "DiscreteUniformDistribution",
+ "DiscreteVariables",
+ "DiscreteWaveletData",
+ "DiscreteWaveletPacketTransform",
+ "DiscreteWaveletTransform",
+ "DiscretizeGraphics",
+ "DiscretizeRegion",
+ "Discriminant",
+ "DisjointQ",
+ "Disjunction",
+ "Disk",
+ "DiskBox",
+ "DiskMatrix",
+ "DiskSegment",
+ "Dispatch",
+ "DispatchQ",
+ "DispersionEstimatorFunction",
+ "Display",
+ "DisplayAllSteps",
+ "DisplayEndPacket",
+ "DisplayFlushImagePacket",
+ "DisplayForm",
+ "DisplayFunction",
+ "DisplayPacket",
+ "DisplayRules",
+ "DisplaySetSizePacket",
+ "DisplayString",
+ "DisplayTemporary",
+ "DisplayWith",
+ "DisplayWithRef",
+ "DisplayWithVariable",
+ "DistanceFunction",
+ "DistanceMatrix",
+ "DistanceTransform",
+ "Distribute",
+ "Distributed",
+ "DistributedContexts",
+ "DistributeDefinitions",
+ "DistributionChart",
+ "DistributionDomain",
+ "DistributionFitTest",
+ "DistributionParameterAssumptions",
+ "DistributionParameterQ",
+ "Dithering",
+ "Div",
+ "Divergence",
+ "Divide",
+ "DivideBy",
+ "Dividers",
+ "DivideSides",
+ "Divisible",
+ "Divisors",
+ "DivisorSigma",
+ "DivisorSum",
+ "DMSList",
+ "DMSString",
+ "Do",
+ "DockedCells",
+ "DocumentGenerator",
+ "DocumentGeneratorInformation",
+ "DocumentGeneratorInformationData",
+ "DocumentGenerators",
+ "DocumentNotebook",
+ "DocumentWeightingRules",
+ "Dodecahedron",
+ "DomainRegistrationInformation",
+ "DominantColors",
+ "DOSTextFormat",
+ "Dot",
+ "DotDashed",
+ "DotEqual",
+ "DotLayer",
+ "DotPlusLayer",
+ "Dotted",
+ "DoubleBracketingBar",
+ "DoubleContourIntegral",
+ "DoubleDownArrow",
+ "DoubleLeftArrow",
+ "DoubleLeftRightArrow",
+ "DoubleLeftTee",
+ "DoubleLongLeftArrow",
+ "DoubleLongLeftRightArrow",
+ "DoubleLongRightArrow",
+ "DoubleRightArrow",
+ "DoubleRightTee",
+ "DoubleUpArrow",
+ "DoubleUpDownArrow",
+ "DoubleVerticalBar",
+ "DoublyInfinite",
+ "Down",
+ "DownArrow",
+ "DownArrowBar",
+ "DownArrowUpArrow",
+ "DownLeftRightVector",
+ "DownLeftTeeVector",
+ "DownLeftVector",
+ "DownLeftVectorBar",
+ "DownRightTeeVector",
+ "DownRightVector",
+ "DownRightVectorBar",
+ "Downsample",
+ "DownTee",
+ "DownTeeArrow",
+ "DownValues",
+ "DragAndDrop",
+ "DrawEdges",
+ "DrawFrontFaces",
+ "DrawHighlighted",
+ "Drop",
+ "DropoutLayer",
+ "DSolve",
+ "DSolveValue",
+ "Dt",
+ "DualLinearProgramming",
+ "DualPolyhedron",
+ "DualSystemsModel",
+ "DumpGet",
+ "DumpSave",
+ "DuplicateFreeQ",
+ "Duration",
+ "Dynamic",
+ "DynamicBox",
+ "DynamicBoxOptions",
+ "DynamicEvaluationTimeout",
+ "DynamicGeoGraphics",
+ "DynamicImage",
+ "DynamicLocation",
+ "DynamicModule",
+ "DynamicModuleBox",
+ "DynamicModuleBoxOptions",
+ "DynamicModuleParent",
+ "DynamicModuleValues",
+ "DynamicName",
+ "DynamicNamespace",
+ "DynamicReference",
+ "DynamicSetting",
+ "DynamicUpdating",
+ "DynamicWrapper",
+ "DynamicWrapperBox",
+ "DynamicWrapperBoxOptions",
+ "E",
+ "EarthImpactData",
+ "EarthquakeData",
+ "EccentricityCentrality",
+ "Echo",
+ "EchoFunction",
+ "EclipseType",
+ "EdgeAdd",
+ "EdgeBetweennessCentrality",
+ "EdgeCapacity",
+ "EdgeCapForm",
+ "EdgeColor",
+ "EdgeConnectivity",
+ "EdgeContract",
+ "EdgeCost",
+ "EdgeCount",
+ "EdgeCoverQ",
+ "EdgeCycleMatrix",
+ "EdgeDashing",
+ "EdgeDelete",
+ "EdgeDetect",
+ "EdgeForm",
+ "EdgeIndex",
+ "EdgeJoinForm",
+ "EdgeLabeling",
+ "EdgeLabels",
+ "EdgeLabelStyle",
+ "EdgeList",
+ "EdgeOpacity",
+ "EdgeQ",
+ "EdgeRenderingFunction",
+ "EdgeRules",
+ "EdgeShapeFunction",
+ "EdgeStyle",
+ "EdgeTaggedGraph",
+ "EdgeTaggedGraphQ",
+ "EdgeTags",
+ "EdgeThickness",
+ "EdgeWeight",
+ "EdgeWeightedGraphQ",
+ "Editable",
+ "EditButtonSettings",
+ "EditCellTagsSettings",
+ "EditDistance",
+ "EffectiveInterest",
+ "Eigensystem",
+ "Eigenvalues",
+ "EigenvectorCentrality",
+ "Eigenvectors",
+ "Element",
+ "ElementData",
+ "ElementwiseLayer",
+ "ElidedForms",
+ "Eliminate",
+ "EliminationOrder",
+ "Ellipsoid",
+ "EllipticE",
+ "EllipticExp",
+ "EllipticExpPrime",
+ "EllipticF",
+ "EllipticFilterModel",
+ "EllipticK",
+ "EllipticLog",
+ "EllipticNomeQ",
+ "EllipticPi",
+ "EllipticReducedHalfPeriods",
+ "EllipticTheta",
+ "EllipticThetaPrime",
+ "EmbedCode",
+ "EmbeddedHTML",
+ "EmbeddedService",
+ "EmbeddingLayer",
+ "EmbeddingObject",
+ "EmitSound",
+ "EmphasizeSyntaxErrors",
+ "EmpiricalDistribution",
+ "Empty",
+ "EmptyGraphQ",
+ "EmptyRegion",
+ "EnableConsolePrintPacket",
+ "Enabled",
+ "Encode",
+ "Encrypt",
+ "EncryptedObject",
+ "EncryptFile",
+ "End",
+ "EndAdd",
+ "EndDialogPacket",
+ "EndFrontEndInteractionPacket",
+ "EndOfBuffer",
+ "EndOfFile",
+ "EndOfLine",
+ "EndOfString",
+ "EndPackage",
+ "EngineEnvironment",
+ "EngineeringForm",
+ "Enter",
+ "EnterExpressionPacket",
+ "EnterTextPacket",
+ "Entity",
+ "EntityClass",
+ "EntityClassList",
+ "EntityCopies",
+ "EntityFunction",
+ "EntityGroup",
+ "EntityInstance",
+ "EntityList",
+ "EntityPrefetch",
+ "EntityProperties",
+ "EntityProperty",
+ "EntityPropertyClass",
+ "EntityRegister",
+ "EntityStore",
+ "EntityStores",
+ "EntityTypeName",
+ "EntityUnregister",
+ "EntityValue",
+ "Entropy",
+ "EntropyFilter",
+ "Environment",
+ "Epilog",
+ "EpilogFunction",
+ "Equal",
+ "EqualColumns",
+ "EqualRows",
+ "EqualTilde",
+ "EqualTo",
+ "EquatedTo",
+ "Equilibrium",
+ "EquirippleFilterKernel",
+ "Equivalent",
+ "Erf",
+ "Erfc",
+ "Erfi",
+ "ErlangB",
+ "ErlangC",
+ "ErlangDistribution",
+ "Erosion",
+ "ErrorBox",
+ "ErrorBoxOptions",
+ "ErrorNorm",
+ "ErrorPacket",
+ "ErrorsDialogSettings",
+ "EscapeRadius",
+ "EstimatedBackground",
+ "EstimatedDistribution",
+ "EstimatedProcess",
+ "EstimatorGains",
+ "EstimatorRegulator",
+ "EuclideanDistance",
+ "EulerAngles",
+ "EulerCharacteristic",
+ "EulerE",
+ "EulerGamma",
+ "EulerianGraphQ",
+ "EulerMatrix",
+ "EulerPhi",
+ "Evaluatable",
+ "Evaluate",
+ "Evaluated",
+ "EvaluatePacket",
+ "EvaluateScheduledTask",
+ "EvaluationBox",
+ "EvaluationCell",
+ "EvaluationCompletionAction",
+ "EvaluationData",
+ "EvaluationElements",
+ "EvaluationEnvironment",
+ "EvaluationMode",
+ "EvaluationMonitor",
+ "EvaluationNotebook",
+ "EvaluationObject",
+ "EvaluationOrder",
+ "Evaluator",
+ "EvaluatorNames",
+ "EvenQ",
+ "EventData",
+ "EventEvaluator",
+ "EventHandler",
+ "EventHandlerTag",
+ "EventLabels",
+ "EventSeries",
+ "ExactBlackmanWindow",
+ "ExactNumberQ",
+ "ExactRootIsolation",
+ "ExampleData",
+ "Except",
+ "ExcludedForms",
+ "ExcludedLines",
+ "ExcludedPhysicalQuantities",
+ "ExcludePods",
+ "Exclusions",
+ "ExclusionsStyle",
+ "Exists",
+ "Exit",
+ "ExitDialog",
+ "ExoplanetData",
+ "Exp",
+ "Expand",
+ "ExpandAll",
+ "ExpandDenominator",
+ "ExpandFileName",
+ "ExpandNumerator",
+ "Expectation",
+ "ExpectationE",
+ "ExpectedValue",
+ "ExpGammaDistribution",
+ "ExpIntegralE",
+ "ExpIntegralEi",
+ "ExpirationDate",
+ "Exponent",
+ "ExponentFunction",
+ "ExponentialDistribution",
+ "ExponentialFamily",
+ "ExponentialGeneratingFunction",
+ "ExponentialMovingAverage",
+ "ExponentialPowerDistribution",
+ "ExponentPosition",
+ "ExponentStep",
+ "Export",
+ "ExportAutoReplacements",
+ "ExportByteArray",
+ "ExportForm",
+ "ExportPacket",
+ "ExportString",
+ "Expression",
+ "ExpressionCell",
+ "ExpressionGraph",
+ "ExpressionPacket",
+ "ExpressionUUID",
+ "ExpToTrig",
+ "ExtendedEntityClass",
+ "ExtendedGCD",
+ "Extension",
+ "ExtentElementFunction",
+ "ExtentMarkers",
+ "ExtentSize",
+ "ExternalBundle",
+ "ExternalCall",
+ "ExternalDataCharacterEncoding",
+ "ExternalEvaluate",
+ "ExternalFunction",
+ "ExternalFunctionName",
+ "ExternalIdentifier",
+ "ExternalObject",
+ "ExternalOptions",
+ "ExternalSessionObject",
+ "ExternalSessions",
+ "ExternalStorageBase",
+ "ExternalStorageDownload",
+ "ExternalStorageGet",
+ "ExternalStorageObject",
+ "ExternalStoragePut",
+ "ExternalStorageUpload",
+ "ExternalTypeSignature",
+ "ExternalValue",
+ "Extract",
+ "ExtractArchive",
+ "ExtractLayer",
+ "ExtractPacletArchive",
+ "ExtremeValueDistribution",
+ "FaceAlign",
+ "FaceForm",
+ "FaceGrids",
+ "FaceGridsStyle",
+ "FacialFeatures",
+ "Factor",
+ "FactorComplete",
+ "Factorial",
+ "Factorial2",
+ "FactorialMoment",
+ "FactorialMomentGeneratingFunction",
+ "FactorialPower",
+ "FactorInteger",
+ "FactorList",
+ "FactorSquareFree",
+ "FactorSquareFreeList",
+ "FactorTerms",
+ "FactorTermsList",
+ "Fail",
+ "Failure",
+ "FailureAction",
+ "FailureDistribution",
+ "FailureQ",
+ "False",
+ "FareySequence",
+ "FARIMAProcess",
+ "FeatureDistance",
+ "FeatureExtract",
+ "FeatureExtraction",
+ "FeatureExtractor",
+ "FeatureExtractorFunction",
+ "FeatureNames",
+ "FeatureNearest",
+ "FeatureSpacePlot",
+ "FeatureSpacePlot3D",
+ "FeatureTypes",
+ "FEDisableConsolePrintPacket",
+ "FeedbackLinearize",
+ "FeedbackSector",
+ "FeedbackSectorStyle",
+ "FeedbackType",
+ "FEEnableConsolePrintPacket",
+ "FetalGrowthData",
+ "Fibonacci",
+ "Fibonorial",
+ "FieldCompletionFunction",
+ "FieldHint",
+ "FieldHintStyle",
+ "FieldMasked",
+ "FieldSize",
+ "File",
+ "FileBaseName",
+ "FileByteCount",
+ "FileConvert",
+ "FileDate",
+ "FileExistsQ",
+ "FileExtension",
+ "FileFormat",
+ "FileHandler",
+ "FileHash",
+ "FileInformation",
+ "FileName",
+ "FileNameDepth",
+ "FileNameDialogSettings",
+ "FileNameDrop",
+ "FileNameForms",
+ "FileNameJoin",
+ "FileNames",
+ "FileNameSetter",
+ "FileNameSplit",
+ "FileNameTake",
+ "FilePrint",
+ "FileSize",
+ "FileSystemMap",
+ "FileSystemScan",
+ "FileTemplate",
+ "FileTemplateApply",
+ "FileType",
+ "FilledCurve",
+ "FilledCurveBox",
+ "FilledCurveBoxOptions",
+ "Filling",
+ "FillingStyle",
+ "FillingTransform",
+ "FilteredEntityClass",
+ "FilterRules",
+ "FinancialBond",
+ "FinancialData",
+ "FinancialDerivative",
+ "FinancialIndicator",
+ "Find",
+ "FindAnomalies",
+ "FindArgMax",
+ "FindArgMin",
+ "FindChannels",
+ "FindClique",
+ "FindClusters",
+ "FindCookies",
+ "FindCurvePath",
+ "FindCycle",
+ "FindDevices",
+ "FindDistribution",
+ "FindDistributionParameters",
+ "FindDivisions",
+ "FindEdgeCover",
+ "FindEdgeCut",
+ "FindEdgeIndependentPaths",
+ "FindEquationalProof",
+ "FindEulerianCycle",
+ "FindExternalEvaluators",
+ "FindFaces",
+ "FindFile",
+ "FindFit",
+ "FindFormula",
+ "FindFundamentalCycles",
+ "FindGeneratingFunction",
+ "FindGeoLocation",
+ "FindGeometricConjectures",
+ "FindGeometricTransform",
+ "FindGraphCommunities",
+ "FindGraphIsomorphism",
+ "FindGraphPartition",
+ "FindHamiltonianCycle",
+ "FindHamiltonianPath",
+ "FindHiddenMarkovStates",
+ "FindImageText",
+ "FindIndependentEdgeSet",
+ "FindIndependentVertexSet",
+ "FindInstance",
+ "FindIntegerNullVector",
+ "FindKClan",
+ "FindKClique",
+ "FindKClub",
+ "FindKPlex",
+ "FindLibrary",
+ "FindLinearRecurrence",
+ "FindList",
+ "FindMatchingColor",
+ "FindMaximum",
+ "FindMaximumCut",
+ "FindMaximumFlow",
+ "FindMaxValue",
+ "FindMeshDefects",
+ "FindMinimum",
+ "FindMinimumCostFlow",
+ "FindMinimumCut",
+ "FindMinValue",
+ "FindMoleculeSubstructure",
+ "FindPath",
+ "FindPeaks",
+ "FindPermutation",
+ "FindPostmanTour",
+ "FindProcessParameters",
+ "FindRepeat",
+ "FindRoot",
+ "FindSequenceFunction",
+ "FindSettings",
+ "FindShortestPath",
+ "FindShortestTour",
+ "FindSpanningTree",
+ "FindSystemModelEquilibrium",
+ "FindTextualAnswer",
+ "FindThreshold",
+ "FindTransientRepeat",
+ "FindVertexCover",
+ "FindVertexCut",
+ "FindVertexIndependentPaths",
+ "Fine",
+ "FinishDynamic",
+ "FiniteAbelianGroupCount",
+ "FiniteGroupCount",
+ "FiniteGroupData",
+ "First",
+ "FirstCase",
+ "FirstPassageTimeDistribution",
+ "FirstPosition",
+ "FischerGroupFi22",
+ "FischerGroupFi23",
+ "FischerGroupFi24Prime",
+ "FisherHypergeometricDistribution",
+ "FisherRatioTest",
+ "FisherZDistribution",
+ "Fit",
+ "FitAll",
+ "FitRegularization",
+ "FittedModel",
+ "FixedOrder",
+ "FixedPoint",
+ "FixedPointList",
+ "FlashSelection",
+ "Flat",
+ "Flatten",
+ "FlattenAt",
+ "FlattenLayer",
+ "FlatTopWindow",
+ "FlipView",
+ "Floor",
+ "FlowPolynomial",
+ "FlushPrintOutputPacket",
+ "Fold",
+ "FoldList",
+ "FoldPair",
+ "FoldPairList",
+ "FollowRedirects",
+ "Font",
+ "FontColor",
+ "FontFamily",
+ "FontForm",
+ "FontName",
+ "FontOpacity",
+ "FontPostScriptName",
+ "FontProperties",
+ "FontReencoding",
+ "FontSize",
+ "FontSlant",
+ "FontSubstitutions",
+ "FontTracking",
+ "FontVariations",
+ "FontWeight",
+ "For",
+ "ForAll",
+ "ForceVersionInstall",
+ "Format",
+ "FormatRules",
+ "FormatType",
+ "FormatTypeAutoConvert",
+ "FormatValues",
+ "FormBox",
+ "FormBoxOptions",
+ "FormControl",
+ "FormFunction",
+ "FormLayoutFunction",
+ "FormObject",
+ "FormPage",
+ "FormTheme",
+ "FormulaData",
+ "FormulaLookup",
+ "FortranForm",
+ "Forward",
+ "ForwardBackward",
+ "Fourier",
+ "FourierCoefficient",
+ "FourierCosCoefficient",
+ "FourierCosSeries",
+ "FourierCosTransform",
+ "FourierDCT",
+ "FourierDCTFilter",
+ "FourierDCTMatrix",
+ "FourierDST",
+ "FourierDSTMatrix",
+ "FourierMatrix",
+ "FourierParameters",
+ "FourierSequenceTransform",
+ "FourierSeries",
+ "FourierSinCoefficient",
+ "FourierSinSeries",
+ "FourierSinTransform",
+ "FourierTransform",
+ "FourierTrigSeries",
+ "FractionalBrownianMotionProcess",
+ "FractionalGaussianNoiseProcess",
+ "FractionalPart",
+ "FractionBox",
+ "FractionBoxOptions",
+ "FractionLine",
+ "Frame",
+ "FrameBox",
+ "FrameBoxOptions",
+ "Framed",
+ "FrameInset",
+ "FrameLabel",
+ "Frameless",
+ "FrameMargins",
+ "FrameRate",
+ "FrameStyle",
+ "FrameTicks",
+ "FrameTicksStyle",
+ "FRatioDistribution",
+ "FrechetDistribution",
+ "FreeQ",
+ "FrenetSerretSystem",
+ "FrequencySamplingFilterKernel",
+ "FresnelC",
+ "FresnelF",
+ "FresnelG",
+ "FresnelS",
+ "Friday",
+ "FrobeniusNumber",
+ "FrobeniusSolve",
+ "FromAbsoluteTime",
+ "FromCharacterCode",
+ "FromCoefficientRules",
+ "FromContinuedFraction",
+ "FromDate",
+ "FromDigits",
+ "FromDMS",
+ "FromEntity",
+ "FromJulianDate",
+ "FromLetterNumber",
+ "FromPolarCoordinates",
+ "FromRomanNumeral",
+ "FromSphericalCoordinates",
+ "FromUnixTime",
+ "Front",
+ "FrontEndDynamicExpression",
+ "FrontEndEventActions",
+ "FrontEndExecute",
+ "FrontEndObject",
+ "FrontEndResource",
+ "FrontEndResourceString",
+ "FrontEndStackSize",
+ "FrontEndToken",
+ "FrontEndTokenExecute",
+ "FrontEndValueCache",
+ "FrontEndVersion",
+ "FrontFaceColor",
+ "FrontFaceOpacity",
+ "Full",
+ "FullAxes",
+ "FullDefinition",
+ "FullForm",
+ "FullGraphics",
+ "FullInformationOutputRegulator",
+ "FullOptions",
+ "FullRegion",
+ "FullSimplify",
+ "Function",
+ "FunctionCompile",
+ "FunctionCompileExport",
+ "FunctionCompileExportByteArray",
+ "FunctionCompileExportLibrary",
+ "FunctionCompileExportString",
+ "FunctionDomain",
+ "FunctionExpand",
+ "FunctionInterpolation",
+ "FunctionPeriod",
+ "FunctionRange",
+ "FunctionSpace",
+ "FussellVeselyImportance",
+ "GaborFilter",
+ "GaborMatrix",
+ "GaborWavelet",
+ "GainMargins",
+ "GainPhaseMargins",
+ "GalaxyData",
+ "GalleryView",
+ "Gamma",
+ "GammaDistribution",
+ "GammaRegularized",
+ "GapPenalty",
+ "GARCHProcess",
+ "GatedRecurrentLayer",
+ "Gather",
+ "GatherBy",
+ "GaugeFaceElementFunction",
+ "GaugeFaceStyle",
+ "GaugeFrameElementFunction",
+ "GaugeFrameSize",
+ "GaugeFrameStyle",
+ "GaugeLabels",
+ "GaugeMarkers",
+ "GaugeStyle",
+ "GaussianFilter",
+ "GaussianIntegers",
+ "GaussianMatrix",
+ "GaussianOrthogonalMatrixDistribution",
+ "GaussianSymplecticMatrixDistribution",
+ "GaussianUnitaryMatrixDistribution",
+ "GaussianWindow",
+ "GCD",
+ "GegenbauerC",
+ "General",
+ "GeneralizedLinearModelFit",
+ "GenerateAsymmetricKeyPair",
+ "GenerateConditions",
+ "GeneratedCell",
+ "GeneratedDocumentBinding",
+ "GenerateDerivedKey",
+ "GenerateDigitalSignature",
+ "GenerateDocument",
+ "GeneratedParameters",
+ "GeneratedQuantityMagnitudes",
+ "GenerateFileSignature",
+ "GenerateHTTPResponse",
+ "GenerateSecuredAuthenticationKey",
+ "GenerateSymmetricKey",
+ "GeneratingFunction",
+ "GeneratorDescription",
+ "GeneratorHistoryLength",
+ "GeneratorOutputType",
+ "Generic",
+ "GenericCylindricalDecomposition",
+ "GenomeData",
+ "GenomeLookup",
+ "GeoAntipode",
+ "GeoArea",
+ "GeoArraySize",
+ "GeoBackground",
+ "GeoBoundingBox",
+ "GeoBounds",
+ "GeoBoundsRegion",
+ "GeoBubbleChart",
+ "GeoCenter",
+ "GeoCircle",
+ "GeoContourPlot",
+ "GeoDensityPlot",
+ "GeodesicClosing",
+ "GeodesicDilation",
+ "GeodesicErosion",
+ "GeodesicOpening",
+ "GeoDestination",
+ "GeodesyData",
+ "GeoDirection",
+ "GeoDisk",
+ "GeoDisplacement",
+ "GeoDistance",
+ "GeoDistanceList",
+ "GeoElevationData",
+ "GeoEntities",
+ "GeoGraphics",
+ "GeogravityModelData",
+ "GeoGridDirectionDifference",
+ "GeoGridLines",
+ "GeoGridLinesStyle",
+ "GeoGridPosition",
+ "GeoGridRange",
+ "GeoGridRangePadding",
+ "GeoGridUnitArea",
+ "GeoGridUnitDistance",
+ "GeoGridVector",
+ "GeoGroup",
+ "GeoHemisphere",
+ "GeoHemisphereBoundary",
+ "GeoHistogram",
+ "GeoIdentify",
+ "GeoImage",
+ "GeoLabels",
+ "GeoLength",
+ "GeoListPlot",
+ "GeoLocation",
+ "GeologicalPeriodData",
+ "GeomagneticModelData",
+ "GeoMarker",
+ "GeometricAssertion",
+ "GeometricBrownianMotionProcess",
+ "GeometricDistribution",
+ "GeometricMean",
+ "GeometricMeanFilter",
+ "GeometricOptimization",
+ "GeometricScene",
+ "GeometricTransformation",
+ "GeometricTransformation3DBox",
+ "GeometricTransformation3DBoxOptions",
+ "GeometricTransformationBox",
+ "GeometricTransformationBoxOptions",
+ "GeoModel",
+ "GeoNearest",
+ "GeoPath",
+ "GeoPosition",
+ "GeoPositionENU",
+ "GeoPositionXYZ",
+ "GeoProjection",
+ "GeoProjectionData",
+ "GeoRange",
+ "GeoRangePadding",
+ "GeoRegionValuePlot",
+ "GeoResolution",
+ "GeoScaleBar",
+ "GeoServer",
+ "GeoSmoothHistogram",
+ "GeoStreamPlot",
+ "GeoStyling",
+ "GeoStylingImageFunction",
+ "GeoVariant",
+ "GeoVector",
+ "GeoVectorENU",
+ "GeoVectorPlot",
+ "GeoVectorXYZ",
+ "GeoVisibleRegion",
+ "GeoVisibleRegionBoundary",
+ "GeoWithinQ",
+ "GeoZoomLevel",
+ "GestureHandler",
+ "GestureHandlerTag",
+ "Get",
+ "GetBoundingBoxSizePacket",
+ "GetContext",
+ "GetEnvironment",
+ "GetFileName",
+ "GetFrontEndOptionsDataPacket",
+ "GetLinebreakInformationPacket",
+ "GetMenusPacket",
+ "GetPageBreakInformationPacket",
+ "Glaisher",
+ "GlobalClusteringCoefficient",
+ "GlobalPreferences",
+ "GlobalSession",
+ "Glow",
+ "GoldenAngle",
+ "GoldenRatio",
+ "GompertzMakehamDistribution",
+ "GoochShading",
+ "GoodmanKruskalGamma",
+ "GoodmanKruskalGammaTest",
+ "Goto",
+ "Grad",
+ "Gradient",
+ "GradientFilter",
+ "GradientOrientationFilter",
+ "GrammarApply",
+ "GrammarRules",
+ "GrammarToken",
+ "Graph",
+ "Graph3D",
+ "GraphAssortativity",
+ "GraphAutomorphismGroup",
+ "GraphCenter",
+ "GraphComplement",
+ "GraphData",
+ "GraphDensity",
+ "GraphDiameter",
+ "GraphDifference",
+ "GraphDisjointUnion",
+ "GraphDistance",
+ "GraphDistanceMatrix",
+ "GraphElementData",
+ "GraphEmbedding",
+ "GraphHighlight",
+ "GraphHighlightStyle",
+ "GraphHub",
+ "Graphics",
+ "Graphics3D",
+ "Graphics3DBox",
+ "Graphics3DBoxOptions",
+ "GraphicsArray",
+ "GraphicsBaseline",
+ "GraphicsBox",
+ "GraphicsBoxOptions",
+ "GraphicsColor",
+ "GraphicsColumn",
+ "GraphicsComplex",
+ "GraphicsComplex3DBox",
+ "GraphicsComplex3DBoxOptions",
+ "GraphicsComplexBox",
+ "GraphicsComplexBoxOptions",
+ "GraphicsContents",
+ "GraphicsData",
+ "GraphicsGrid",
+ "GraphicsGridBox",
+ "GraphicsGroup",
+ "GraphicsGroup3DBox",
+ "GraphicsGroup3DBoxOptions",
+ "GraphicsGroupBox",
+ "GraphicsGroupBoxOptions",
+ "GraphicsGrouping",
+ "GraphicsHighlightColor",
+ "GraphicsRow",
+ "GraphicsSpacing",
+ "GraphicsStyle",
+ "GraphIntersection",
+ "GraphLayout",
+ "GraphLinkEfficiency",
+ "GraphPeriphery",
+ "GraphPlot",
+ "GraphPlot3D",
+ "GraphPower",
+ "GraphPropertyDistribution",
+ "GraphQ",
+ "GraphRadius",
+ "GraphReciprocity",
+ "GraphRoot",
+ "GraphStyle",
+ "GraphUnion",
+ "Gray",
+ "GrayLevel",
+ "Greater",
+ "GreaterEqual",
+ "GreaterEqualLess",
+ "GreaterEqualThan",
+ "GreaterFullEqual",
+ "GreaterGreater",
+ "GreaterLess",
+ "GreaterSlantEqual",
+ "GreaterThan",
+ "GreaterTilde",
+ "Green",
+ "GreenFunction",
+ "Grid",
+ "GridBaseline",
+ "GridBox",
+ "GridBoxAlignment",
+ "GridBoxBackground",
+ "GridBoxDividers",
+ "GridBoxFrame",
+ "GridBoxItemSize",
+ "GridBoxItemStyle",
+ "GridBoxOptions",
+ "GridBoxSpacings",
+ "GridCreationSettings",
+ "GridDefaultElement",
+ "GridElementStyleOptions",
+ "GridFrame",
+ "GridFrameMargins",
+ "GridGraph",
+ "GridLines",
+ "GridLinesStyle",
+ "GroebnerBasis",
+ "GroupActionBase",
+ "GroupBy",
+ "GroupCentralizer",
+ "GroupElementFromWord",
+ "GroupElementPosition",
+ "GroupElementQ",
+ "GroupElements",
+ "GroupElementToWord",
+ "GroupGenerators",
+ "Groupings",
+ "GroupMultiplicationTable",
+ "GroupOrbits",
+ "GroupOrder",
+ "GroupPageBreakWithin",
+ "GroupSetwiseStabilizer",
+ "GroupStabilizer",
+ "GroupStabilizerChain",
+ "GroupTogetherGrouping",
+ "GroupTogetherNestedGrouping",
+ "GrowCutComponents",
+ "Gudermannian",
+ "GuidedFilter",
+ "GumbelDistribution",
+ "HaarWavelet",
+ "HadamardMatrix",
+ "HalfLine",
+ "HalfNormalDistribution",
+ "HalfPlane",
+ "HalfSpace",
+ "HalftoneShading",
+ "HamiltonianGraphQ",
+ "HammingDistance",
+ "HammingWindow",
+ "HandlerFunctions",
+ "HandlerFunctionsKeys",
+ "HankelH1",
+ "HankelH2",
+ "HankelMatrix",
+ "HankelTransform",
+ "HannPoissonWindow",
+ "HannWindow",
+ "HaradaNortonGroupHN",
+ "HararyGraph",
+ "HarmonicMean",
+ "HarmonicMeanFilter",
+ "HarmonicNumber",
+ "Hash",
+ "HatchFilling",
+ "HatchShading",
+ "Haversine",
+ "HazardFunction",
+ "Head",
+ "HeadCompose",
+ "HeaderAlignment",
+ "HeaderBackground",
+ "HeaderDisplayFunction",
+ "HeaderLines",
+ "HeaderSize",
+ "HeaderStyle",
+ "Heads",
+ "HeavisideLambda",
+ "HeavisidePi",
+ "HeavisideTheta",
+ "HeldGroupHe",
+ "HeldPart",
+ "HelpBrowserLookup",
+ "HelpBrowserNotebook",
+ "HelpBrowserSettings",
+ "Here",
+ "HermiteDecomposition",
+ "HermiteH",
+ "HermitianMatrixQ",
+ "HessenbergDecomposition",
+ "Hessian",
+ "HeunB",
+ "HeunBPrime",
+ "HeunC",
+ "HeunCPrime",
+ "HeunD",
+ "HeunDPrime",
+ "HeunG",
+ "HeunGPrime",
+ "HeunT",
+ "HeunTPrime",
+ "HexadecimalCharacter",
+ "Hexahedron",
+ "HexahedronBox",
+ "HexahedronBoxOptions",
+ "HiddenItems",
+ "HiddenMarkovProcess",
+ "HiddenSurface",
+ "Highlighted",
+ "HighlightGraph",
+ "HighlightImage",
+ "HighlightMesh",
+ "HighpassFilter",
+ "HigmanSimsGroupHS",
+ "HilbertCurve",
+ "HilbertFilter",
+ "HilbertMatrix",
+ "Histogram",
+ "Histogram3D",
+ "HistogramDistribution",
+ "HistogramList",
+ "HistogramTransform",
+ "HistogramTransformInterpolation",
+ "HistoricalPeriodData",
+ "HitMissTransform",
+ "HITSCentrality",
+ "HjorthDistribution",
+ "HodgeDual",
+ "HoeffdingD",
+ "HoeffdingDTest",
+ "Hold",
+ "HoldAll",
+ "HoldAllComplete",
+ "HoldComplete",
+ "HoldFirst",
+ "HoldForm",
+ "HoldPattern",
+ "HoldRest",
+ "HolidayCalendar",
+ "HomeDirectory",
+ "HomePage",
+ "Horizontal",
+ "HorizontalForm",
+ "HorizontalGauge",
+ "HorizontalScrollPosition",
+ "HornerForm",
+ "HostLookup",
+ "HotellingTSquareDistribution",
+ "HoytDistribution",
+ "HTMLSave",
+ "HTTPErrorResponse",
+ "HTTPRedirect",
+ "HTTPRequest",
+ "HTTPRequestData",
+ "HTTPResponse",
+ "Hue",
+ "HumanGrowthData",
+ "HumpDownHump",
+ "HumpEqual",
+ "HurwitzLerchPhi",
+ "HurwitzZeta",
+ "HyperbolicDistribution",
+ "HypercubeGraph",
+ "HyperexponentialDistribution",
+ "Hyperfactorial",
+ "Hypergeometric0F1",
+ "Hypergeometric0F1Regularized",
+ "Hypergeometric1F1",
+ "Hypergeometric1F1Regularized",
+ "Hypergeometric2F1",
+ "Hypergeometric2F1Regularized",
+ "HypergeometricDistribution",
+ "HypergeometricPFQ",
+ "HypergeometricPFQRegularized",
+ "HypergeometricU",
+ "Hyperlink",
+ "HyperlinkAction",
+ "HyperlinkCreationSettings",
+ "Hyperplane",
+ "Hyphenation",
+ "HyphenationOptions",
+ "HypoexponentialDistribution",
+ "HypothesisTestData",
+ "I",
+ "IconData",
+ "Iconize",
+ "IconizedObject",
+ "IconRules",
+ "Icosahedron",
+ "Identity",
+ "IdentityMatrix",
+ "If",
+ "IgnoreCase",
+ "IgnoreDiacritics",
+ "IgnorePunctuation",
+ "IgnoreSpellCheck",
+ "IgnoringInactive",
+ "Im",
+ "Image",
+ "Image3D",
+ "Image3DProjection",
+ "Image3DSlices",
+ "ImageAccumulate",
+ "ImageAdd",
+ "ImageAdjust",
+ "ImageAlign",
+ "ImageApply",
+ "ImageApplyIndexed",
+ "ImageAspectRatio",
+ "ImageAssemble",
+ "ImageAugmentationLayer",
+ "ImageBoundingBoxes",
+ "ImageCache",
+ "ImageCacheValid",
+ "ImageCapture",
+ "ImageCaptureFunction",
+ "ImageCases",
+ "ImageChannels",
+ "ImageClip",
+ "ImageCollage",
+ "ImageColorSpace",
+ "ImageCompose",
+ "ImageContainsQ",
+ "ImageContents",
+ "ImageConvolve",
+ "ImageCooccurrence",
+ "ImageCorners",
+ "ImageCorrelate",
+ "ImageCorrespondingPoints",
+ "ImageCrop",
+ "ImageData",
+ "ImageDeconvolve",
+ "ImageDemosaic",
+ "ImageDifference",
+ "ImageDimensions",
+ "ImageDisplacements",
+ "ImageDistance",
+ "ImageEffect",
+ "ImageExposureCombine",
+ "ImageFeatureTrack",
+ "ImageFileApply",
+ "ImageFileFilter",
+ "ImageFileScan",
+ "ImageFilter",
+ "ImageFocusCombine",
+ "ImageForestingComponents",
+ "ImageFormattingWidth",
+ "ImageForwardTransformation",
+ "ImageGraphics",
+ "ImageHistogram",
+ "ImageIdentify",
+ "ImageInstanceQ",
+ "ImageKeypoints",
+ "ImageLabels",
+ "ImageLegends",
+ "ImageLevels",
+ "ImageLines",
+ "ImageMargins",
+ "ImageMarker",
+ "ImageMarkers",
+ "ImageMeasurements",
+ "ImageMesh",
+ "ImageMultiply",
+ "ImageOffset",
+ "ImagePad",
+ "ImagePadding",
+ "ImagePartition",
+ "ImagePeriodogram",
+ "ImagePerspectiveTransformation",
+ "ImagePosition",
+ "ImagePreviewFunction",
+ "ImagePyramid",
+ "ImagePyramidApply",
+ "ImageQ",
+ "ImageRangeCache",
+ "ImageRecolor",
+ "ImageReflect",
+ "ImageRegion",
+ "ImageResize",
+ "ImageResolution",
+ "ImageRestyle",
+ "ImageRotate",
+ "ImageRotated",
+ "ImageSaliencyFilter",
+ "ImageScaled",
+ "ImageScan",
+ "ImageSize",
+ "ImageSizeAction",
+ "ImageSizeCache",
+ "ImageSizeMultipliers",
+ "ImageSizeRaw",
+ "ImageSubtract",
+ "ImageTake",
+ "ImageTransformation",
+ "ImageTrim",
+ "ImageType",
+ "ImageValue",
+ "ImageValuePositions",
+ "ImagingDevice",
+ "ImplicitRegion",
+ "Implies",
+ "Import",
+ "ImportAutoReplacements",
+ "ImportByteArray",
+ "ImportOptions",
+ "ImportString",
+ "ImprovementImportance",
+ "In",
+ "Inactivate",
+ "Inactive",
+ "IncidenceGraph",
+ "IncidenceList",
+ "IncidenceMatrix",
+ "IncludeAromaticBonds",
+ "IncludeConstantBasis",
+ "IncludeDefinitions",
+ "IncludeDirectories",
+ "IncludeFileExtension",
+ "IncludeGeneratorTasks",
+ "IncludeHydrogens",
+ "IncludeInflections",
+ "IncludeMetaInformation",
+ "IncludePods",
+ "IncludeQuantities",
+ "IncludeRelatedTables",
+ "IncludeSingularTerm",
+ "IncludeWindowTimes",
+ "Increment",
+ "IndefiniteMatrixQ",
+ "Indent",
+ "IndentingNewlineSpacings",
+ "IndentMaxFraction",
+ "IndependenceTest",
+ "IndependentEdgeSetQ",
+ "IndependentPhysicalQuantity",
+ "IndependentUnit",
+ "IndependentUnitDimension",
+ "IndependentVertexSetQ",
+ "Indeterminate",
+ "IndeterminateThreshold",
+ "IndexCreationOptions",
+ "Indexed",
+ "IndexEdgeTaggedGraph",
+ "IndexGraph",
+ "IndexTag",
+ "Inequality",
+ "InexactNumberQ",
+ "InexactNumbers",
+ "InfiniteFuture",
+ "InfiniteLine",
+ "InfinitePast",
+ "InfinitePlane",
+ "Infinity",
+ "Infix",
+ "InflationAdjust",
+ "InflationMethod",
+ "Information",
+ "InformationData",
+ "InformationDataGrid",
+ "Inherited",
+ "InheritScope",
+ "InhomogeneousPoissonProcess",
+ "InitialEvaluationHistory",
+ "Initialization",
+ "InitializationCell",
+ "InitializationCellEvaluation",
+ "InitializationCellWarning",
+ "InitializationObjects",
+ "InitializationValue",
+ "Initialize",
+ "InitialSeeding",
+ "InlineCounterAssignments",
+ "InlineCounterIncrements",
+ "InlineRules",
+ "Inner",
+ "InnerPolygon",
+ "InnerPolyhedron",
+ "Inpaint",
+ "Input",
+ "InputAliases",
+ "InputAssumptions",
+ "InputAutoReplacements",
+ "InputField",
+ "InputFieldBox",
+ "InputFieldBoxOptions",
+ "InputForm",
+ "InputGrouping",
+ "InputNamePacket",
+ "InputNotebook",
+ "InputPacket",
+ "InputSettings",
+ "InputStream",
+ "InputString",
+ "InputStringPacket",
+ "InputToBoxFormPacket",
+ "Insert",
+ "InsertionFunction",
+ "InsertionPointObject",
+ "InsertLinebreaks",
+ "InsertResults",
+ "Inset",
+ "Inset3DBox",
+ "Inset3DBoxOptions",
+ "InsetBox",
+ "InsetBoxOptions",
+ "Insphere",
+ "Install",
+ "InstallService",
+ "InstanceNormalizationLayer",
+ "InString",
+ "Integer",
+ "IntegerDigits",
+ "IntegerExponent",
+ "IntegerLength",
+ "IntegerName",
+ "IntegerPart",
+ "IntegerPartitions",
+ "IntegerQ",
+ "IntegerReverse",
+ "Integers",
+ "IntegerString",
+ "Integral",
+ "Integrate",
+ "Interactive",
+ "InteractiveTradingChart",
+ "Interlaced",
+ "Interleaving",
+ "InternallyBalancedDecomposition",
+ "InterpolatingFunction",
+ "InterpolatingPolynomial",
+ "Interpolation",
+ "InterpolationOrder",
+ "InterpolationPoints",
+ "InterpolationPrecision",
+ "Interpretation",
+ "InterpretationBox",
+ "InterpretationBoxOptions",
+ "InterpretationFunction",
+ "Interpreter",
+ "InterpretTemplate",
+ "InterquartileRange",
+ "Interrupt",
+ "InterruptSettings",
+ "IntersectedEntityClass",
+ "IntersectingQ",
+ "Intersection",
+ "Interval",
+ "IntervalIntersection",
+ "IntervalMarkers",
+ "IntervalMarkersStyle",
+ "IntervalMemberQ",
+ "IntervalSlider",
+ "IntervalUnion",
+ "Into",
+ "Inverse",
+ "InverseBetaRegularized",
+ "InverseCDF",
+ "InverseChiSquareDistribution",
+ "InverseContinuousWaveletTransform",
+ "InverseDistanceTransform",
+ "InverseEllipticNomeQ",
+ "InverseErf",
+ "InverseErfc",
+ "InverseFourier",
+ "InverseFourierCosTransform",
+ "InverseFourierSequenceTransform",
+ "InverseFourierSinTransform",
+ "InverseFourierTransform",
+ "InverseFunction",
+ "InverseFunctions",
+ "InverseGammaDistribution",
+ "InverseGammaRegularized",
+ "InverseGaussianDistribution",
+ "InverseGudermannian",
+ "InverseHankelTransform",
+ "InverseHaversine",
+ "InverseImagePyramid",
+ "InverseJacobiCD",
+ "InverseJacobiCN",
+ "InverseJacobiCS",
+ "InverseJacobiDC",
+ "InverseJacobiDN",
+ "InverseJacobiDS",
+ "InverseJacobiNC",
+ "InverseJacobiND",
+ "InverseJacobiNS",
+ "InverseJacobiSC",
+ "InverseJacobiSD",
+ "InverseJacobiSN",
+ "InverseLaplaceTransform",
+ "InverseMellinTransform",
+ "InversePermutation",
+ "InverseRadon",
+ "InverseRadonTransform",
+ "InverseSeries",
+ "InverseShortTimeFourier",
+ "InverseSpectrogram",
+ "InverseSurvivalFunction",
+ "InverseTransformedRegion",
+ "InverseWaveletTransform",
+ "InverseWeierstrassP",
+ "InverseWishartMatrixDistribution",
+ "InverseZTransform",
+ "Invisible",
+ "InvisibleApplication",
+ "InvisibleTimes",
+ "IPAddress",
+ "IrreduciblePolynomialQ",
+ "IslandData",
+ "IsolatingInterval",
+ "IsomorphicGraphQ",
+ "IsotopeData",
+ "Italic",
+ "Item",
+ "ItemAspectRatio",
+ "ItemBox",
+ "ItemBoxOptions",
+ "ItemDisplayFunction",
+ "ItemSize",
+ "ItemStyle",
+ "ItoProcess",
+ "JaccardDissimilarity",
+ "JacobiAmplitude",
+ "Jacobian",
+ "JacobiCD",
+ "JacobiCN",
+ "JacobiCS",
+ "JacobiDC",
+ "JacobiDN",
+ "JacobiDS",
+ "JacobiNC",
+ "JacobiND",
+ "JacobiNS",
+ "JacobiP",
+ "JacobiSC",
+ "JacobiSD",
+ "JacobiSN",
+ "JacobiSymbol",
+ "JacobiZeta",
+ "JankoGroupJ1",
+ "JankoGroupJ2",
+ "JankoGroupJ3",
+ "JankoGroupJ4",
+ "JarqueBeraALMTest",
+ "JohnsonDistribution",
+ "Join",
+ "JoinAcross",
+ "Joined",
+ "JoinedCurve",
+ "JoinedCurveBox",
+ "JoinedCurveBoxOptions",
+ "JoinForm",
+ "JordanDecomposition",
+ "JordanModelDecomposition",
+ "JulianDate",
+ "JuliaSetBoettcher",
+ "JuliaSetIterationCount",
+ "JuliaSetPlot",
+ "JuliaSetPoints",
+ "K",
+ "KagiChart",
+ "KaiserBesselWindow",
+ "KaiserWindow",
+ "KalmanEstimator",
+ "KalmanFilter",
+ "KarhunenLoeveDecomposition",
+ "KaryTree",
+ "KatzCentrality",
+ "KCoreComponents",
+ "KDistribution",
+ "KEdgeConnectedComponents",
+ "KEdgeConnectedGraphQ",
+ "KeepExistingVersion",
+ "KelvinBei",
+ "KelvinBer",
+ "KelvinKei",
+ "KelvinKer",
+ "KendallTau",
+ "KendallTauTest",
+ "KernelExecute",
+ "KernelFunction",
+ "KernelMixtureDistribution",
+ "KernelObject",
+ "Kernels",
+ "Ket",
+ "Key",
+ "KeyCollisionFunction",
+ "KeyComplement",
+ "KeyDrop",
+ "KeyDropFrom",
+ "KeyExistsQ",
+ "KeyFreeQ",
+ "KeyIntersection",
+ "KeyMap",
+ "KeyMemberQ",
+ "KeypointStrength",
+ "Keys",
+ "KeySelect",
+ "KeySort",
+ "KeySortBy",
+ "KeyTake",
+ "KeyUnion",
+ "KeyValueMap",
+ "KeyValuePattern",
+ "Khinchin",
+ "KillProcess",
+ "KirchhoffGraph",
+ "KirchhoffMatrix",
+ "KleinInvariantJ",
+ "KnapsackSolve",
+ "KnightTourGraph",
+ "KnotData",
+ "KnownUnitQ",
+ "KochCurve",
+ "KolmogorovSmirnovTest",
+ "KroneckerDelta",
+ "KroneckerModelDecomposition",
+ "KroneckerProduct",
+ "KroneckerSymbol",
+ "KuiperTest",
+ "KumaraswamyDistribution",
+ "Kurtosis",
+ "KuwaharaFilter",
+ "KVertexConnectedComponents",
+ "KVertexConnectedGraphQ",
+ "LABColor",
+ "Label",
+ "Labeled",
+ "LabeledSlider",
+ "LabelingFunction",
+ "LabelingSize",
+ "LabelStyle",
+ "LabelVisibility",
+ "LaguerreL",
+ "LakeData",
+ "LambdaComponents",
+ "LambertW",
+ "LaminaData",
+ "LanczosWindow",
+ "LandauDistribution",
+ "Language",
+ "LanguageCategory",
+ "LanguageData",
+ "LanguageIdentify",
+ "LanguageOptions",
+ "LaplaceDistribution",
+ "LaplaceTransform",
+ "Laplacian",
+ "LaplacianFilter",
+ "LaplacianGaussianFilter",
+ "Large",
+ "Larger",
+ "Last",
+ "Latitude",
+ "LatitudeLongitude",
+ "LatticeData",
+ "LatticeReduce",
+ "Launch",
+ "LaunchKernels",
+ "LayeredGraphPlot",
+ "LayerSizeFunction",
+ "LayoutInformation",
+ "LCHColor",
+ "LCM",
+ "LeaderSize",
+ "LeafCount",
+ "LeapYearQ",
+ "LearnDistribution",
+ "LearnedDistribution",
+ "LearningRate",
+ "LearningRateMultipliers",
+ "LeastSquares",
+ "LeastSquaresFilterKernel",
+ "Left",
+ "LeftArrow",
+ "LeftArrowBar",
+ "LeftArrowRightArrow",
+ "LeftDownTeeVector",
+ "LeftDownVector",
+ "LeftDownVectorBar",
+ "LeftRightArrow",
+ "LeftRightVector",
+ "LeftTee",
+ "LeftTeeArrow",
+ "LeftTeeVector",
+ "LeftTriangle",
+ "LeftTriangleBar",
+ "LeftTriangleEqual",
+ "LeftUpDownVector",
+ "LeftUpTeeVector",
+ "LeftUpVector",
+ "LeftUpVectorBar",
+ "LeftVector",
+ "LeftVectorBar",
+ "LegendAppearance",
+ "Legended",
+ "LegendFunction",
+ "LegendLabel",
+ "LegendLayout",
+ "LegendMargins",
+ "LegendMarkers",
+ "LegendMarkerSize",
+ "LegendreP",
+ "LegendreQ",
+ "LegendreType",
+ "Length",
+ "LengthWhile",
+ "LerchPhi",
+ "Less",
+ "LessEqual",
+ "LessEqualGreater",
+ "LessEqualThan",
+ "LessFullEqual",
+ "LessGreater",
+ "LessLess",
+ "LessSlantEqual",
+ "LessThan",
+ "LessTilde",
+ "LetterCharacter",
+ "LetterCounts",
+ "LetterNumber",
+ "LetterQ",
+ "Level",
+ "LeveneTest",
+ "LeviCivitaTensor",
+ "LevyDistribution",
+ "Lexicographic",
+ "LibraryDataType",
+ "LibraryFunction",
+ "LibraryFunctionError",
+ "LibraryFunctionInformation",
+ "LibraryFunctionLoad",
+ "LibraryFunctionUnload",
+ "LibraryLoad",
+ "LibraryUnload",
+ "LicenseID",
+ "LiftingFilterData",
+ "LiftingWaveletTransform",
+ "LightBlue",
+ "LightBrown",
+ "LightCyan",
+ "Lighter",
+ "LightGray",
+ "LightGreen",
+ "Lighting",
+ "LightingAngle",
+ "LightMagenta",
+ "LightOrange",
+ "LightPink",
+ "LightPurple",
+ "LightRed",
+ "LightSources",
+ "LightYellow",
+ "Likelihood",
+ "Limit",
+ "LimitsPositioning",
+ "LimitsPositioningTokens",
+ "LindleyDistribution",
+ "Line",
+ "Line3DBox",
+ "Line3DBoxOptions",
+ "LinearFilter",
+ "LinearFractionalOptimization",
+ "LinearFractionalTransform",
+ "LinearGradientImage",
+ "LinearizingTransformationData",
+ "LinearLayer",
+ "LinearModelFit",
+ "LinearOffsetFunction",
+ "LinearOptimization",
+ "LinearProgramming",
+ "LinearRecurrence",
+ "LinearSolve",
+ "LinearSolveFunction",
+ "LineBox",
+ "LineBoxOptions",
+ "LineBreak",
+ "LinebreakAdjustments",
+ "LineBreakChart",
+ "LinebreakSemicolonWeighting",
+ "LineBreakWithin",
+ "LineColor",
+ "LineGraph",
+ "LineIndent",
+ "LineIndentMaxFraction",
+ "LineIntegralConvolutionPlot",
+ "LineIntegralConvolutionScale",
+ "LineLegend",
+ "LineOpacity",
+ "LineSpacing",
+ "LineWrapParts",
+ "LinkActivate",
+ "LinkClose",
+ "LinkConnect",
+ "LinkConnectedQ",
+ "LinkCreate",
+ "LinkError",
+ "LinkFlush",
+ "LinkFunction",
+ "LinkHost",
+ "LinkInterrupt",
+ "LinkLaunch",
+ "LinkMode",
+ "LinkObject",
+ "LinkOpen",
+ "LinkOptions",
+ "LinkPatterns",
+ "LinkProtocol",
+ "LinkRankCentrality",
+ "LinkRead",
+ "LinkReadHeld",
+ "LinkReadyQ",
+ "Links",
+ "LinkService",
+ "LinkWrite",
+ "LinkWriteHeld",
+ "LiouvilleLambda",
+ "List",
+ "Listable",
+ "ListAnimate",
+ "ListContourPlot",
+ "ListContourPlot3D",
+ "ListConvolve",
+ "ListCorrelate",
+ "ListCurvePathPlot",
+ "ListDeconvolve",
+ "ListDensityPlot",
+ "ListDensityPlot3D",
+ "Listen",
+ "ListFormat",
+ "ListFourierSequenceTransform",
+ "ListInterpolation",
+ "ListLineIntegralConvolutionPlot",
+ "ListLinePlot",
+ "ListLogLinearPlot",
+ "ListLogLogPlot",
+ "ListLogPlot",
+ "ListPicker",
+ "ListPickerBox",
+ "ListPickerBoxBackground",
+ "ListPickerBoxOptions",
+ "ListPlay",
+ "ListPlot",
+ "ListPlot3D",
+ "ListPointPlot3D",
+ "ListPolarPlot",
+ "ListQ",
+ "ListSliceContourPlot3D",
+ "ListSliceDensityPlot3D",
+ "ListSliceVectorPlot3D",
+ "ListStepPlot",
+ "ListStreamDensityPlot",
+ "ListStreamPlot",
+ "ListSurfacePlot3D",
+ "ListVectorDensityPlot",
+ "ListVectorPlot",
+ "ListVectorPlot3D",
+ "ListZTransform",
+ "Literal",
+ "LiteralSearch",
+ "LocalAdaptiveBinarize",
+ "LocalCache",
+ "LocalClusteringCoefficient",
+ "LocalizeDefinitions",
+ "LocalizeVariables",
+ "LocalObject",
+ "LocalObjects",
+ "LocalResponseNormalizationLayer",
+ "LocalSubmit",
+ "LocalSymbol",
+ "LocalTime",
+ "LocalTimeZone",
+ "LocationEquivalenceTest",
+ "LocationTest",
+ "Locator",
+ "LocatorAutoCreate",
+ "LocatorBox",
+ "LocatorBoxOptions",
+ "LocatorCentering",
+ "LocatorPane",
+ "LocatorPaneBox",
+ "LocatorPaneBoxOptions",
+ "LocatorRegion",
+ "Locked",
+ "Log",
+ "Log10",
+ "Log2",
+ "LogBarnesG",
+ "LogGamma",
+ "LogGammaDistribution",
+ "LogicalExpand",
+ "LogIntegral",
+ "LogisticDistribution",
+ "LogisticSigmoid",
+ "LogitModelFit",
+ "LogLikelihood",
+ "LogLinearPlot",
+ "LogLogisticDistribution",
+ "LogLogPlot",
+ "LogMultinormalDistribution",
+ "LogNormalDistribution",
+ "LogPlot",
+ "LogRankTest",
+ "LogSeriesDistribution",
+ "LongEqual",
+ "Longest",
+ "LongestCommonSequence",
+ "LongestCommonSequencePositions",
+ "LongestCommonSubsequence",
+ "LongestCommonSubsequencePositions",
+ "LongestMatch",
+ "LongestOrderedSequence",
+ "LongForm",
+ "Longitude",
+ "LongLeftArrow",
+ "LongLeftRightArrow",
+ "LongRightArrow",
+ "LongShortTermMemoryLayer",
+ "Lookup",
+ "Loopback",
+ "LoopFreeGraphQ",
+ "Looping",
+ "LossFunction",
+ "LowerCaseQ",
+ "LowerLeftArrow",
+ "LowerRightArrow",
+ "LowerTriangularize",
+ "LowerTriangularMatrixQ",
+ "LowpassFilter",
+ "LQEstimatorGains",
+ "LQGRegulator",
+ "LQOutputRegulatorGains",
+ "LQRegulatorGains",
+ "LUBackSubstitution",
+ "LucasL",
+ "LuccioSamiComponents",
+ "LUDecomposition",
+ "LunarEclipse",
+ "LUVColor",
+ "LyapunovSolve",
+ "LyonsGroupLy",
+ "MachineID",
+ "MachineName",
+ "MachineNumberQ",
+ "MachinePrecision",
+ "MacintoshSystemPageSetup",
+ "Magenta",
+ "Magnification",
+ "Magnify",
+ "MailAddressValidation",
+ "MailExecute",
+ "MailFolder",
+ "MailItem",
+ "MailReceiverFunction",
+ "MailResponseFunction",
+ "MailSearch",
+ "MailServerConnect",
+ "MailServerConnection",
+ "MailSettings",
+ "MainSolve",
+ "MaintainDynamicCaches",
+ "Majority",
+ "MakeBoxes",
+ "MakeExpression",
+ "MakeRules",
+ "ManagedLibraryExpressionID",
+ "ManagedLibraryExpressionQ",
+ "MandelbrotSetBoettcher",
+ "MandelbrotSetDistance",
+ "MandelbrotSetIterationCount",
+ "MandelbrotSetMemberQ",
+ "MandelbrotSetPlot",
+ "MangoldtLambda",
+ "ManhattanDistance",
+ "Manipulate",
+ "Manipulator",
+ "MannedSpaceMissionData",
+ "MannWhitneyTest",
+ "MantissaExponent",
+ "Manual",
+ "Map",
+ "MapAll",
+ "MapAt",
+ "MapIndexed",
+ "MAProcess",
+ "MapThread",
+ "MarchenkoPasturDistribution",
+ "MarcumQ",
+ "MardiaCombinedTest",
+ "MardiaKurtosisTest",
+ "MardiaSkewnessTest",
+ "MarginalDistribution",
+ "MarkovProcessProperties",
+ "Masking",
+ "MatchingDissimilarity",
+ "MatchLocalNameQ",
+ "MatchLocalNames",
+ "MatchQ",
+ "Material",
+ "MathematicalFunctionData",
+ "MathematicaNotation",
+ "MathieuC",
+ "MathieuCharacteristicA",
+ "MathieuCharacteristicB",
+ "MathieuCharacteristicExponent",
+ "MathieuCPrime",
+ "MathieuGroupM11",
+ "MathieuGroupM12",
+ "MathieuGroupM22",
+ "MathieuGroupM23",
+ "MathieuGroupM24",
+ "MathieuS",
+ "MathieuSPrime",
+ "MathMLForm",
+ "MathMLText",
+ "Matrices",
+ "MatrixExp",
+ "MatrixForm",
+ "MatrixFunction",
+ "MatrixLog",
+ "MatrixNormalDistribution",
+ "MatrixPlot",
+ "MatrixPower",
+ "MatrixPropertyDistribution",
+ "MatrixQ",
+ "MatrixRank",
+ "MatrixTDistribution",
+ "Max",
+ "MaxBend",
+ "MaxCellMeasure",
+ "MaxColorDistance",
+ "MaxDate",
+ "MaxDetect",
+ "MaxDuration",
+ "MaxExtraBandwidths",
+ "MaxExtraConditions",
+ "MaxFeatureDisplacement",
+ "MaxFeatures",
+ "MaxFilter",
+ "MaximalBy",
+ "Maximize",
+ "MaxItems",
+ "MaxIterations",
+ "MaxLimit",
+ "MaxMemoryUsed",
+ "MaxMixtureKernels",
+ "MaxOverlapFraction",
+ "MaxPlotPoints",
+ "MaxPoints",
+ "MaxRecursion",
+ "MaxStableDistribution",
+ "MaxStepFraction",
+ "MaxSteps",
+ "MaxStepSize",
+ "MaxTrainingRounds",
+ "MaxValue",
+ "MaxwellDistribution",
+ "MaxWordGap",
+ "McLaughlinGroupMcL",
+ "Mean",
+ "MeanAbsoluteLossLayer",
+ "MeanAround",
+ "MeanClusteringCoefficient",
+ "MeanDegreeConnectivity",
+ "MeanDeviation",
+ "MeanFilter",
+ "MeanGraphDistance",
+ "MeanNeighborDegree",
+ "MeanShift",
+ "MeanShiftFilter",
+ "MeanSquaredLossLayer",
+ "Median",
+ "MedianDeviation",
+ "MedianFilter",
+ "MedicalTestData",
+ "Medium",
+ "MeijerG",
+ "MeijerGReduce",
+ "MeixnerDistribution",
+ "MellinConvolve",
+ "MellinTransform",
+ "MemberQ",
+ "MemoryAvailable",
+ "MemoryConstrained",
+ "MemoryConstraint",
+ "MemoryInUse",
+ "MengerMesh",
+ "Menu",
+ "MenuAppearance",
+ "MenuCommandKey",
+ "MenuEvaluator",
+ "MenuItem",
+ "MenuList",
+ "MenuPacket",
+ "MenuSortingValue",
+ "MenuStyle",
+ "MenuView",
+ "Merge",
+ "MergeDifferences",
+ "MergingFunction",
+ "MersennePrimeExponent",
+ "MersennePrimeExponentQ",
+ "Mesh",
+ "MeshCellCentroid",
+ "MeshCellCount",
+ "MeshCellHighlight",
+ "MeshCellIndex",
+ "MeshCellLabel",
+ "MeshCellMarker",
+ "MeshCellMeasure",
+ "MeshCellQuality",
+ "MeshCells",
+ "MeshCellShapeFunction",
+ "MeshCellStyle",
+ "MeshConnectivityGraph",
+ "MeshCoordinates",
+ "MeshFunctions",
+ "MeshPrimitives",
+ "MeshQualityGoal",
+ "MeshRange",
+ "MeshRefinementFunction",
+ "MeshRegion",
+ "MeshRegionQ",
+ "MeshShading",
+ "MeshStyle",
+ "Message",
+ "MessageDialog",
+ "MessageList",
+ "MessageName",
+ "MessageObject",
+ "MessageOptions",
+ "MessagePacket",
+ "Messages",
+ "MessagesNotebook",
+ "MetaCharacters",
+ "MetaInformation",
+ "MeteorShowerData",
+ "Method",
+ "MethodOptions",
+ "MexicanHatWavelet",
+ "MeyerWavelet",
+ "Midpoint",
+ "Min",
+ "MinColorDistance",
+ "MinDate",
+ "MinDetect",
+ "MineralData",
+ "MinFilter",
+ "MinimalBy",
+ "MinimalPolynomial",
+ "MinimalStateSpaceModel",
+ "Minimize",
+ "MinimumTimeIncrement",
+ "MinIntervalSize",
+ "MinkowskiQuestionMark",
+ "MinLimit",
+ "MinMax",
+ "MinorPlanetData",
+ "Minors",
+ "MinRecursion",
+ "MinSize",
+ "MinStableDistribution",
+ "Minus",
+ "MinusPlus",
+ "MinValue",
+ "Missing",
+ "MissingBehavior",
+ "MissingDataMethod",
+ "MissingDataRules",
+ "MissingQ",
+ "MissingString",
+ "MissingStyle",
+ "MissingValuePattern",
+ "MittagLefflerE",
+ "MixedFractionParts",
+ "MixedGraphQ",
+ "MixedMagnitude",
+ "MixedRadix",
+ "MixedRadixQuantity",
+ "MixedUnit",
+ "MixtureDistribution",
+ "Mod",
+ "Modal",
+ "Mode",
+ "Modular",
+ "ModularInverse",
+ "ModularLambda",
+ "Module",
+ "Modulus",
+ "MoebiusMu",
+ "Molecule",
+ "MoleculeContainsQ",
+ "MoleculeEquivalentQ",
+ "MoleculeGraph",
+ "MoleculeModify",
+ "MoleculePattern",
+ "MoleculePlot",
+ "MoleculePlot3D",
+ "MoleculeProperty",
+ "MoleculeQ",
+ "MoleculeRecognize",
+ "MoleculeValue",
+ "Moment",
+ "Momentary",
+ "MomentConvert",
+ "MomentEvaluate",
+ "MomentGeneratingFunction",
+ "MomentOfInertia",
+ "Monday",
+ "Monitor",
+ "MonomialList",
+ "MonomialOrder",
+ "MonsterGroupM",
+ "MoonPhase",
+ "MoonPosition",
+ "MorletWavelet",
+ "MorphologicalBinarize",
+ "MorphologicalBranchPoints",
+ "MorphologicalComponents",
+ "MorphologicalEulerNumber",
+ "MorphologicalGraph",
+ "MorphologicalPerimeter",
+ "MorphologicalTransform",
+ "MortalityData",
+ "Most",
+ "MountainData",
+ "MouseAnnotation",
+ "MouseAppearance",
+ "MouseAppearanceTag",
+ "MouseButtons",
+ "Mouseover",
+ "MousePointerNote",
+ "MousePosition",
+ "MovieData",
+ "MovingAverage",
+ "MovingMap",
+ "MovingMedian",
+ "MoyalDistribution",
+ "Multicolumn",
+ "MultiedgeStyle",
+ "MultigraphQ",
+ "MultilaunchWarning",
+ "MultiLetterItalics",
+ "MultiLetterStyle",
+ "MultilineFunction",
+ "Multinomial",
+ "MultinomialDistribution",
+ "MultinormalDistribution",
+ "MultiplicativeOrder",
+ "Multiplicity",
+ "MultiplySides",
+ "Multiselection",
+ "MultivariateHypergeometricDistribution",
+ "MultivariatePoissonDistribution",
+ "MultivariateTDistribution",
+ "N",
+ "NakagamiDistribution",
+ "NameQ",
+ "Names",
+ "NamespaceBox",
+ "NamespaceBoxOptions",
+ "Nand",
+ "NArgMax",
+ "NArgMin",
+ "NBernoulliB",
+ "NBodySimulation",
+ "NBodySimulationData",
+ "NCache",
+ "NDEigensystem",
+ "NDEigenvalues",
+ "NDSolve",
+ "NDSolveValue",
+ "Nearest",
+ "NearestFunction",
+ "NearestMeshCells",
+ "NearestNeighborGraph",
+ "NearestTo",
+ "NebulaData",
+ "NeedCurrentFrontEndPackagePacket",
+ "NeedCurrentFrontEndSymbolsPacket",
+ "NeedlemanWunschSimilarity",
+ "Needs",
+ "Negative",
+ "NegativeBinomialDistribution",
+ "NegativeDefiniteMatrixQ",
+ "NegativeIntegers",
+ "NegativeMultinomialDistribution",
+ "NegativeRationals",
+ "NegativeReals",
+ "NegativeSemidefiniteMatrixQ",
+ "NeighborhoodData",
+ "NeighborhoodGraph",
+ "Nest",
+ "NestedGreaterGreater",
+ "NestedLessLess",
+ "NestedScriptRules",
+ "NestGraph",
+ "NestList",
+ "NestWhile",
+ "NestWhileList",
+ "NetAppend",
+ "NetBidirectionalOperator",
+ "NetChain",
+ "NetDecoder",
+ "NetDelete",
+ "NetDrop",
+ "NetEncoder",
+ "NetEvaluationMode",
+ "NetExtract",
+ "NetFlatten",
+ "NetFoldOperator",
+ "NetGANOperator",
+ "NetGraph",
+ "NetInformation",
+ "NetInitialize",
+ "NetInsert",
+ "NetInsertSharedArrays",
+ "NetJoin",
+ "NetMapOperator",
+ "NetMapThreadOperator",
+ "NetMeasurements",
+ "NetModel",
+ "NetNestOperator",
+ "NetPairEmbeddingOperator",
+ "NetPort",
+ "NetPortGradient",
+ "NetPrepend",
+ "NetRename",
+ "NetReplace",
+ "NetReplacePart",
+ "NetSharedArray",
+ "NetStateObject",
+ "NetTake",
+ "NetTrain",
+ "NetTrainResultsObject",
+ "NetworkPacketCapture",
+ "NetworkPacketRecording",
+ "NetworkPacketRecordingDuring",
+ "NetworkPacketTrace",
+ "NeumannValue",
+ "NevilleThetaC",
+ "NevilleThetaD",
+ "NevilleThetaN",
+ "NevilleThetaS",
+ "NewPrimitiveStyle",
+ "NExpectation",
+ "Next",
+ "NextCell",
+ "NextDate",
+ "NextPrime",
+ "NextScheduledTaskTime",
+ "NHoldAll",
+ "NHoldFirst",
+ "NHoldRest",
+ "NicholsGridLines",
+ "NicholsPlot",
+ "NightHemisphere",
+ "NIntegrate",
+ "NMaximize",
+ "NMaxValue",
+ "NMinimize",
+ "NMinValue",
+ "NominalVariables",
+ "NonAssociative",
+ "NoncentralBetaDistribution",
+ "NoncentralChiSquareDistribution",
+ "NoncentralFRatioDistribution",
+ "NoncentralStudentTDistribution",
+ "NonCommutativeMultiply",
+ "NonConstants",
+ "NondimensionalizationTransform",
+ "None",
+ "NoneTrue",
+ "NonlinearModelFit",
+ "NonlinearStateSpaceModel",
+ "NonlocalMeansFilter",
+ "NonNegative",
+ "NonNegativeIntegers",
+ "NonNegativeRationals",
+ "NonNegativeReals",
+ "NonPositive",
+ "NonPositiveIntegers",
+ "NonPositiveRationals",
+ "NonPositiveReals",
+ "Nor",
+ "NorlundB",
+ "Norm",
+ "Normal",
+ "NormalDistribution",
+ "NormalGrouping",
+ "NormalizationLayer",
+ "Normalize",
+ "Normalized",
+ "NormalizedSquaredEuclideanDistance",
+ "NormalMatrixQ",
+ "NormalsFunction",
+ "NormFunction",
+ "Not",
+ "NotCongruent",
+ "NotCupCap",
+ "NotDoubleVerticalBar",
+ "Notebook",
+ "NotebookApply",
+ "NotebookAutoSave",
+ "NotebookClose",
+ "NotebookConvertSettings",
+ "NotebookCreate",
+ "NotebookCreateReturnObject",
+ "NotebookDefault",
+ "NotebookDelete",
+ "NotebookDirectory",
+ "NotebookDynamicExpression",
+ "NotebookEvaluate",
+ "NotebookEventActions",
+ "NotebookFileName",
+ "NotebookFind",
+ "NotebookFindReturnObject",
+ "NotebookGet",
+ "NotebookGetLayoutInformationPacket",
+ "NotebookGetMisspellingsPacket",
+ "NotebookImport",
+ "NotebookInformation",
+ "NotebookInterfaceObject",
+ "NotebookLocate",
+ "NotebookObject",
+ "NotebookOpen",
+ "NotebookOpenReturnObject",
+ "NotebookPath",
+ "NotebookPrint",
+ "NotebookPut",
+ "NotebookPutReturnObject",
+ "NotebookRead",
+ "NotebookResetGeneratedCells",
+ "Notebooks",
+ "NotebookSave",
+ "NotebookSaveAs",
+ "NotebookSelection",
+ "NotebookSetupLayoutInformationPacket",
+ "NotebooksMenu",
+ "NotebookTemplate",
+ "NotebookWrite",
+ "NotElement",
+ "NotEqualTilde",
+ "NotExists",
+ "NotGreater",
+ "NotGreaterEqual",
+ "NotGreaterFullEqual",
+ "NotGreaterGreater",
+ "NotGreaterLess",
+ "NotGreaterSlantEqual",
+ "NotGreaterTilde",
+ "Nothing",
+ "NotHumpDownHump",
+ "NotHumpEqual",
+ "NotificationFunction",
+ "NotLeftTriangle",
+ "NotLeftTriangleBar",
+ "NotLeftTriangleEqual",
+ "NotLess",
+ "NotLessEqual",
+ "NotLessFullEqual",
+ "NotLessGreater",
+ "NotLessLess",
+ "NotLessSlantEqual",
+ "NotLessTilde",
+ "NotNestedGreaterGreater",
+ "NotNestedLessLess",
+ "NotPrecedes",
+ "NotPrecedesEqual",
+ "NotPrecedesSlantEqual",
+ "NotPrecedesTilde",
+ "NotReverseElement",
+ "NotRightTriangle",
+ "NotRightTriangleBar",
+ "NotRightTriangleEqual",
+ "NotSquareSubset",
+ "NotSquareSubsetEqual",
+ "NotSquareSuperset",
+ "NotSquareSupersetEqual",
+ "NotSubset",
+ "NotSubsetEqual",
+ "NotSucceeds",
+ "NotSucceedsEqual",
+ "NotSucceedsSlantEqual",
+ "NotSucceedsTilde",
+ "NotSuperset",
+ "NotSupersetEqual",
+ "NotTilde",
+ "NotTildeEqual",
+ "NotTildeFullEqual",
+ "NotTildeTilde",
+ "NotVerticalBar",
+ "Now",
+ "NoWhitespace",
+ "NProbability",
+ "NProduct",
+ "NProductFactors",
+ "NRoots",
+ "NSolve",
+ "NSum",
+ "NSumTerms",
+ "NuclearExplosionData",
+ "NuclearReactorData",
+ "Null",
+ "NullRecords",
+ "NullSpace",
+ "NullWords",
+ "Number",
+ "NumberCompose",
+ "NumberDecompose",
+ "NumberExpand",
+ "NumberFieldClassNumber",
+ "NumberFieldDiscriminant",
+ "NumberFieldFundamentalUnits",
+ "NumberFieldIntegralBasis",
+ "NumberFieldNormRepresentatives",
+ "NumberFieldRegulator",
+ "NumberFieldRootsOfUnity",
+ "NumberFieldSignature",
+ "NumberForm",
+ "NumberFormat",
+ "NumberLinePlot",
+ "NumberMarks",
+ "NumberMultiplier",
+ "NumberPadding",
+ "NumberPoint",
+ "NumberQ",
+ "NumberSeparator",
+ "NumberSigns",
+ "NumberString",
+ "Numerator",
+ "NumeratorDenominator",
+ "NumericalOrder",
+ "NumericalSort",
+ "NumericArray",
+ "NumericArrayQ",
+ "NumericArrayType",
+ "NumericFunction",
+ "NumericQ",
+ "NuttallWindow",
+ "NValues",
+ "NyquistGridLines",
+ "NyquistPlot",
+ "O",
+ "ObservabilityGramian",
+ "ObservabilityMatrix",
+ "ObservableDecomposition",
+ "ObservableModelQ",
+ "OceanData",
+ "Octahedron",
+ "OddQ",
+ "Off",
+ "Offset",
+ "OLEData",
+ "On",
+ "ONanGroupON",
+ "Once",
+ "OneIdentity",
+ "Opacity",
+ "OpacityFunction",
+ "OpacityFunctionScaling",
+ "Open",
+ "OpenAppend",
+ "Opener",
+ "OpenerBox",
+ "OpenerBoxOptions",
+ "OpenerView",
+ "OpenFunctionInspectorPacket",
+ "Opening",
+ "OpenRead",
+ "OpenSpecialOptions",
+ "OpenTemporary",
+ "OpenWrite",
+ "Operate",
+ "OperatingSystem",
+ "OperatorApplied",
+ "OptimumFlowData",
+ "Optional",
+ "OptionalElement",
+ "OptionInspectorSettings",
+ "OptionQ",
+ "Options",
+ "OptionsPacket",
+ "OptionsPattern",
+ "OptionValue",
+ "OptionValueBox",
+ "OptionValueBoxOptions",
+ "Or",
+ "Orange",
+ "Order",
+ "OrderDistribution",
+ "OrderedQ",
+ "Ordering",
+ "OrderingBy",
+ "OrderingLayer",
+ "Orderless",
+ "OrderlessPatternSequence",
+ "OrnsteinUhlenbeckProcess",
+ "Orthogonalize",
+ "OrthogonalMatrixQ",
+ "Out",
+ "Outer",
+ "OuterPolygon",
+ "OuterPolyhedron",
+ "OutputAutoOverwrite",
+ "OutputControllabilityMatrix",
+ "OutputControllableModelQ",
+ "OutputForm",
+ "OutputFormData",
+ "OutputGrouping",
+ "OutputMathEditExpression",
+ "OutputNamePacket",
+ "OutputResponse",
+ "OutputSizeLimit",
+ "OutputStream",
+ "Over",
+ "OverBar",
+ "OverDot",
+ "Overflow",
+ "OverHat",
+ "Overlaps",
+ "Overlay",
+ "OverlayBox",
+ "OverlayBoxOptions",
+ "Overscript",
+ "OverscriptBox",
+ "OverscriptBoxOptions",
+ "OverTilde",
+ "OverVector",
+ "OverwriteTarget",
+ "OwenT",
+ "OwnValues",
+ "Package",
+ "PackingMethod",
+ "PackPaclet",
+ "PacletDataRebuild",
+ "PacletDirectoryAdd",
+ "PacletDirectoryLoad",
+ "PacletDirectoryRemove",
+ "PacletDirectoryUnload",
+ "PacletDisable",
+ "PacletEnable",
+ "PacletFind",
+ "PacletFindRemote",
+ "PacletInformation",
+ "PacletInstall",
+ "PacletInstallSubmit",
+ "PacletNewerQ",
+ "PacletObject",
+ "PacletObjectQ",
+ "PacletSite",
+ "PacletSiteObject",
+ "PacletSiteRegister",
+ "PacletSites",
+ "PacletSiteUnregister",
+ "PacletSiteUpdate",
+ "PacletUninstall",
+ "PacletUpdate",
+ "PaddedForm",
+ "Padding",
+ "PaddingLayer",
+ "PaddingSize",
+ "PadeApproximant",
+ "PadLeft",
+ "PadRight",
+ "PageBreakAbove",
+ "PageBreakBelow",
+ "PageBreakWithin",
+ "PageFooterLines",
+ "PageFooters",
+ "PageHeaderLines",
+ "PageHeaders",
+ "PageHeight",
+ "PageRankCentrality",
+ "PageTheme",
+ "PageWidth",
+ "Pagination",
+ "PairedBarChart",
+ "PairedHistogram",
+ "PairedSmoothHistogram",
+ "PairedTTest",
+ "PairedZTest",
+ "PaletteNotebook",
+ "PalettePath",
+ "PalindromeQ",
+ "Pane",
+ "PaneBox",
+ "PaneBoxOptions",
+ "Panel",
+ "PanelBox",
+ "PanelBoxOptions",
+ "Paneled",
+ "PaneSelector",
+ "PaneSelectorBox",
+ "PaneSelectorBoxOptions",
+ "PaperWidth",
+ "ParabolicCylinderD",
+ "ParagraphIndent",
+ "ParagraphSpacing",
+ "ParallelArray",
+ "ParallelCombine",
+ "ParallelDo",
+ "Parallelepiped",
+ "ParallelEvaluate",
+ "Parallelization",
+ "Parallelize",
+ "ParallelMap",
+ "ParallelNeeds",
+ "Parallelogram",
+ "ParallelProduct",
+ "ParallelSubmit",
+ "ParallelSum",
+ "ParallelTable",
+ "ParallelTry",
+ "Parameter",
+ "ParameterEstimator",
+ "ParameterMixtureDistribution",
+ "ParameterVariables",
+ "ParametricFunction",
+ "ParametricNDSolve",
+ "ParametricNDSolveValue",
+ "ParametricPlot",
+ "ParametricPlot3D",
+ "ParametricRampLayer",
+ "ParametricRegion",
+ "ParentBox",
+ "ParentCell",
+ "ParentConnect",
+ "ParentDirectory",
+ "ParentForm",
+ "Parenthesize",
+ "ParentList",
+ "ParentNotebook",
+ "ParetoDistribution",
+ "ParetoPickandsDistribution",
+ "ParkData",
+ "Part",
+ "PartBehavior",
+ "PartialCorrelationFunction",
+ "PartialD",
+ "ParticleAcceleratorData",
+ "ParticleData",
+ "Partition",
+ "PartitionGranularity",
+ "PartitionsP",
+ "PartitionsQ",
+ "PartLayer",
+ "PartOfSpeech",
+ "PartProtection",
+ "ParzenWindow",
+ "PascalDistribution",
+ "PassEventsDown",
+ "PassEventsUp",
+ "Paste",
+ "PasteAutoQuoteCharacters",
+ "PasteBoxFormInlineCells",
+ "PasteButton",
+ "Path",
+ "PathGraph",
+ "PathGraphQ",
+ "Pattern",
+ "PatternFilling",
+ "PatternSequence",
+ "PatternTest",
+ "PauliMatrix",
+ "PaulWavelet",
+ "Pause",
+ "PausedTime",
+ "PDF",
+ "PeakDetect",
+ "PeanoCurve",
+ "PearsonChiSquareTest",
+ "PearsonCorrelationTest",
+ "PearsonDistribution",
+ "PercentForm",
+ "PerfectNumber",
+ "PerfectNumberQ",
+ "PerformanceGoal",
+ "Perimeter",
+ "PeriodicBoundaryCondition",
+ "PeriodicInterpolation",
+ "Periodogram",
+ "PeriodogramArray",
+ "Permanent",
+ "Permissions",
+ "PermissionsGroup",
+ "PermissionsGroupMemberQ",
+ "PermissionsGroups",
+ "PermissionsKey",
+ "PermissionsKeys",
+ "PermutationCycles",
+ "PermutationCyclesQ",
+ "PermutationGroup",
+ "PermutationLength",
+ "PermutationList",
+ "PermutationListQ",
+ "PermutationMax",
+ "PermutationMin",
+ "PermutationOrder",
+ "PermutationPower",
+ "PermutationProduct",
+ "PermutationReplace",
+ "Permutations",
+ "PermutationSupport",
+ "Permute",
+ "PeronaMalikFilter",
+ "Perpendicular",
+ "PerpendicularBisector",
+ "PersistenceLocation",
+ "PersistenceTime",
+ "PersistentObject",
+ "PersistentObjects",
+ "PersistentValue",
+ "PersonData",
+ "PERTDistribution",
+ "PetersenGraph",
+ "PhaseMargins",
+ "PhaseRange",
+ "PhysicalSystemData",
+ "Pi",
+ "Pick",
+ "PIDData",
+ "PIDDerivativeFilter",
+ "PIDFeedforward",
+ "PIDTune",
+ "Piecewise",
+ "PiecewiseExpand",
+ "PieChart",
+ "PieChart3D",
+ "PillaiTrace",
+ "PillaiTraceTest",
+ "PingTime",
+ "Pink",
+ "PitchRecognize",
+ "Pivoting",
+ "PixelConstrained",
+ "PixelValue",
+ "PixelValuePositions",
+ "Placed",
+ "Placeholder",
+ "PlaceholderReplace",
+ "Plain",
+ "PlanarAngle",
+ "PlanarGraph",
+ "PlanarGraphQ",
+ "PlanckRadiationLaw",
+ "PlaneCurveData",
+ "PlanetaryMoonData",
+ "PlanetData",
+ "PlantData",
+ "Play",
+ "PlayRange",
+ "Plot",
+ "Plot3D",
+ "Plot3Matrix",
+ "PlotDivision",
+ "PlotJoined",
+ "PlotLabel",
+ "PlotLabels",
+ "PlotLayout",
+ "PlotLegends",
+ "PlotMarkers",
+ "PlotPoints",
+ "PlotRange",
+ "PlotRangeClipping",
+ "PlotRangeClipPlanesStyle",
+ "PlotRangePadding",
+ "PlotRegion",
+ "PlotStyle",
+ "PlotTheme",
+ "Pluralize",
+ "Plus",
+ "PlusMinus",
+ "Pochhammer",
+ "PodStates",
+ "PodWidth",
+ "Point",
+ "Point3DBox",
+ "Point3DBoxOptions",
+ "PointBox",
+ "PointBoxOptions",
+ "PointFigureChart",
+ "PointLegend",
+ "PointSize",
+ "PoissonConsulDistribution",
+ "PoissonDistribution",
+ "PoissonProcess",
+ "PoissonWindow",
+ "PolarAxes",
+ "PolarAxesOrigin",
+ "PolarGridLines",
+ "PolarPlot",
+ "PolarTicks",
+ "PoleZeroMarkers",
+ "PolyaAeppliDistribution",
+ "PolyGamma",
+ "Polygon",
+ "Polygon3DBox",
+ "Polygon3DBoxOptions",
+ "PolygonalNumber",
+ "PolygonAngle",
+ "PolygonBox",
+ "PolygonBoxOptions",
+ "PolygonCoordinates",
+ "PolygonDecomposition",
+ "PolygonHoleScale",
+ "PolygonIntersections",
+ "PolygonScale",
+ "Polyhedron",
+ "PolyhedronAngle",
+ "PolyhedronCoordinates",
+ "PolyhedronData",
+ "PolyhedronDecomposition",
+ "PolyhedronGenus",
+ "PolyLog",
+ "PolynomialExtendedGCD",
+ "PolynomialForm",
+ "PolynomialGCD",
+ "PolynomialLCM",
+ "PolynomialMod",
+ "PolynomialQ",
+ "PolynomialQuotient",
+ "PolynomialQuotientRemainder",
+ "PolynomialReduce",
+ "PolynomialRemainder",
+ "Polynomials",
+ "PoolingLayer",
+ "PopupMenu",
+ "PopupMenuBox",
+ "PopupMenuBoxOptions",
+ "PopupView",
+ "PopupWindow",
+ "Position",
+ "PositionIndex",
+ "Positive",
+ "PositiveDefiniteMatrixQ",
+ "PositiveIntegers",
+ "PositiveRationals",
+ "PositiveReals",
+ "PositiveSemidefiniteMatrixQ",
+ "PossibleZeroQ",
+ "Postfix",
+ "PostScript",
+ "Power",
+ "PowerDistribution",
+ "PowerExpand",
+ "PowerMod",
+ "PowerModList",
+ "PowerRange",
+ "PowerSpectralDensity",
+ "PowersRepresentations",
+ "PowerSymmetricPolynomial",
+ "Precedence",
+ "PrecedenceForm",
+ "Precedes",
+ "PrecedesEqual",
+ "PrecedesSlantEqual",
+ "PrecedesTilde",
+ "Precision",
+ "PrecisionGoal",
+ "PreDecrement",
+ "Predict",
+ "PredictionRoot",
+ "PredictorFunction",
+ "PredictorInformation",
+ "PredictorMeasurements",
+ "PredictorMeasurementsObject",
+ "PreemptProtect",
+ "PreferencesPath",
+ "Prefix",
+ "PreIncrement",
+ "Prepend",
+ "PrependLayer",
+ "PrependTo",
+ "PreprocessingRules",
+ "PreserveColor",
+ "PreserveImageOptions",
+ "Previous",
+ "PreviousCell",
+ "PreviousDate",
+ "PriceGraphDistribution",
+ "PrimaryPlaceholder",
+ "Prime",
+ "PrimeNu",
+ "PrimeOmega",
+ "PrimePi",
+ "PrimePowerQ",
+ "PrimeQ",
+ "Primes",
+ "PrimeZetaP",
+ "PrimitivePolynomialQ",
+ "PrimitiveRoot",
+ "PrimitiveRootList",
+ "PrincipalComponents",
+ "PrincipalValue",
+ "Print",
+ "PrintableASCIIQ",
+ "PrintAction",
+ "PrintForm",
+ "PrintingCopies",
+ "PrintingOptions",
+ "PrintingPageRange",
+ "PrintingStartingPageNumber",
+ "PrintingStyleEnvironment",
+ "Printout3D",
+ "Printout3DPreviewer",
+ "PrintPrecision",
+ "PrintTemporary",
+ "Prism",
+ "PrismBox",
+ "PrismBoxOptions",
+ "PrivateCellOptions",
+ "PrivateEvaluationOptions",
+ "PrivateFontOptions",
+ "PrivateFrontEndOptions",
+ "PrivateKey",
+ "PrivateNotebookOptions",
+ "PrivatePaths",
+ "Probability",
+ "ProbabilityDistribution",
+ "ProbabilityPlot",
+ "ProbabilityPr",
+ "ProbabilityScalePlot",
+ "ProbitModelFit",
+ "ProcessConnection",
+ "ProcessDirectory",
+ "ProcessEnvironment",
+ "Processes",
+ "ProcessEstimator",
+ "ProcessInformation",
+ "ProcessObject",
+ "ProcessParameterAssumptions",
+ "ProcessParameterQ",
+ "ProcessStateDomain",
+ "ProcessStatus",
+ "ProcessTimeDomain",
+ "Product",
+ "ProductDistribution",
+ "ProductLog",
+ "ProgressIndicator",
+ "ProgressIndicatorBox",
+ "ProgressIndicatorBoxOptions",
+ "Projection",
+ "Prolog",
+ "PromptForm",
+ "ProofObject",
+ "Properties",
+ "Property",
+ "PropertyList",
+ "PropertyValue",
+ "Proportion",
+ "Proportional",
+ "Protect",
+ "Protected",
+ "ProteinData",
+ "Pruning",
+ "PseudoInverse",
+ "PsychrometricPropertyData",
+ "PublicKey",
+ "PublisherID",
+ "PulsarData",
+ "PunctuationCharacter",
+ "Purple",
+ "Put",
+ "PutAppend",
+ "Pyramid",
+ "PyramidBox",
+ "PyramidBoxOptions",
+ "QBinomial",
+ "QFactorial",
+ "QGamma",
+ "QHypergeometricPFQ",
+ "QnDispersion",
+ "QPochhammer",
+ "QPolyGamma",
+ "QRDecomposition",
+ "QuadraticIrrationalQ",
+ "QuadraticOptimization",
+ "Quantile",
+ "QuantilePlot",
+ "Quantity",
+ "QuantityArray",
+ "QuantityDistribution",
+ "QuantityForm",
+ "QuantityMagnitude",
+ "QuantityQ",
+ "QuantityUnit",
+ "QuantityVariable",
+ "QuantityVariableCanonicalUnit",
+ "QuantityVariableDimensions",
+ "QuantityVariableIdentifier",
+ "QuantityVariablePhysicalQuantity",
+ "Quartics",
+ "QuartileDeviation",
+ "Quartiles",
+ "QuartileSkewness",
+ "Query",
+ "QueueingNetworkProcess",
+ "QueueingProcess",
+ "QueueProperties",
+ "Quiet",
+ "Quit",
+ "Quotient",
+ "QuotientRemainder",
+ "RadialGradientImage",
+ "RadialityCentrality",
+ "RadicalBox",
+ "RadicalBoxOptions",
+ "RadioButton",
+ "RadioButtonBar",
+ "RadioButtonBox",
+ "RadioButtonBoxOptions",
+ "Radon",
+ "RadonTransform",
+ "RamanujanTau",
+ "RamanujanTauL",
+ "RamanujanTauTheta",
+ "RamanujanTauZ",
+ "Ramp",
+ "Random",
+ "RandomChoice",
+ "RandomColor",
+ "RandomComplex",
+ "RandomEntity",
+ "RandomFunction",
+ "RandomGeoPosition",
+ "RandomGraph",
+ "RandomImage",
+ "RandomInstance",
+ "RandomInteger",
+ "RandomPermutation",
+ "RandomPoint",
+ "RandomPolygon",
+ "RandomPolyhedron",
+ "RandomPrime",
+ "RandomReal",
+ "RandomSample",
+ "RandomSeed",
+ "RandomSeeding",
+ "RandomVariate",
+ "RandomWalkProcess",
+ "RandomWord",
+ "Range",
+ "RangeFilter",
+ "RangeSpecification",
+ "RankedMax",
+ "RankedMin",
+ "RarerProbability",
+ "Raster",
+ "Raster3D",
+ "Raster3DBox",
+ "Raster3DBoxOptions",
+ "RasterArray",
+ "RasterBox",
+ "RasterBoxOptions",
+ "Rasterize",
+ "RasterSize",
+ "Rational",
+ "RationalFunctions",
+ "Rationalize",
+ "Rationals",
+ "Ratios",
+ "RawArray",
+ "RawBoxes",
+ "RawData",
+ "RawMedium",
+ "RayleighDistribution",
+ "Re",
+ "Read",
+ "ReadByteArray",
+ "ReadLine",
+ "ReadList",
+ "ReadProtected",
+ "ReadString",
+ "Real",
+ "RealAbs",
+ "RealBlockDiagonalForm",
+ "RealDigits",
+ "RealExponent",
+ "Reals",
+ "RealSign",
+ "Reap",
+ "RebuildPacletData",
+ "RecognitionPrior",
+ "RecognitionThreshold",
+ "Record",
+ "RecordLists",
+ "RecordSeparators",
+ "Rectangle",
+ "RectangleBox",
+ "RectangleBoxOptions",
+ "RectangleChart",
+ "RectangleChart3D",
+ "RectangularRepeatingElement",
+ "RecurrenceFilter",
+ "RecurrenceTable",
+ "RecurringDigitsForm",
+ "Red",
+ "Reduce",
+ "RefBox",
+ "ReferenceLineStyle",
+ "ReferenceMarkers",
+ "ReferenceMarkerStyle",
+ "Refine",
+ "ReflectionMatrix",
+ "ReflectionTransform",
+ "Refresh",
+ "RefreshRate",
+ "Region",
+ "RegionBinarize",
+ "RegionBoundary",
+ "RegionBoundaryStyle",
+ "RegionBounds",
+ "RegionCentroid",
+ "RegionDifference",
+ "RegionDimension",
+ "RegionDisjoint",
+ "RegionDistance",
+ "RegionDistanceFunction",
+ "RegionEmbeddingDimension",
+ "RegionEqual",
+ "RegionFillingStyle",
+ "RegionFunction",
+ "RegionImage",
+ "RegionIntersection",
+ "RegionMeasure",
+ "RegionMember",
+ "RegionMemberFunction",
+ "RegionMoment",
+ "RegionNearest",
+ "RegionNearestFunction",
+ "RegionPlot",
+ "RegionPlot3D",
+ "RegionProduct",
+ "RegionQ",
+ "RegionResize",
+ "RegionSize",
+ "RegionSymmetricDifference",
+ "RegionUnion",
+ "RegionWithin",
+ "RegisterExternalEvaluator",
+ "RegularExpression",
+ "Regularization",
+ "RegularlySampledQ",
+ "RegularPolygon",
+ "ReIm",
+ "ReImLabels",
+ "ReImPlot",
+ "ReImStyle",
+ "Reinstall",
+ "RelationalDatabase",
+ "RelationGraph",
+ "Release",
+ "ReleaseHold",
+ "ReliabilityDistribution",
+ "ReliefImage",
+ "ReliefPlot",
+ "RemoteAuthorizationCaching",
+ "RemoteConnect",
+ "RemoteConnectionObject",
+ "RemoteFile",
+ "RemoteRun",
+ "RemoteRunProcess",
+ "Remove",
+ "RemoveAlphaChannel",
+ "RemoveAsynchronousTask",
+ "RemoveAudioStream",
+ "RemoveBackground",
+ "RemoveChannelListener",
+ "RemoveChannelSubscribers",
+ "Removed",
+ "RemoveDiacritics",
+ "RemoveInputStreamMethod",
+ "RemoveOutputStreamMethod",
+ "RemoveProperty",
+ "RemoveScheduledTask",
+ "RemoveUsers",
+ "RemoveVideoStream",
+ "RenameDirectory",
+ "RenameFile",
+ "RenderAll",
+ "RenderingOptions",
+ "RenewalProcess",
+ "RenkoChart",
+ "RepairMesh",
+ "Repeated",
+ "RepeatedNull",
+ "RepeatedString",
+ "RepeatedTiming",
+ "RepeatingElement",
+ "Replace",
+ "ReplaceAll",
+ "ReplaceHeldPart",
+ "ReplaceImageValue",
+ "ReplaceList",
+ "ReplacePart",
+ "ReplacePixelValue",
+ "ReplaceRepeated",
+ "ReplicateLayer",
+ "RequiredPhysicalQuantities",
+ "Resampling",
+ "ResamplingAlgorithmData",
+ "ResamplingMethod",
+ "Rescale",
+ "RescalingTransform",
+ "ResetDirectory",
+ "ResetMenusPacket",
+ "ResetScheduledTask",
+ "ReshapeLayer",
+ "Residue",
+ "ResizeLayer",
+ "Resolve",
+ "ResourceAcquire",
+ "ResourceData",
+ "ResourceFunction",
+ "ResourceObject",
+ "ResourceRegister",
+ "ResourceRemove",
+ "ResourceSearch",
+ "ResourceSubmissionObject",
+ "ResourceSubmit",
+ "ResourceSystemBase",
+ "ResourceSystemPath",
+ "ResourceUpdate",
+ "ResourceVersion",
+ "ResponseForm",
+ "Rest",
+ "RestartInterval",
+ "Restricted",
+ "Resultant",
+ "ResumePacket",
+ "Return",
+ "ReturnEntersInput",
+ "ReturnExpressionPacket",
+ "ReturnInputFormPacket",
+ "ReturnPacket",
+ "ReturnReceiptFunction",
+ "ReturnTextPacket",
+ "Reverse",
+ "ReverseApplied",
+ "ReverseBiorthogonalSplineWavelet",
+ "ReverseElement",
+ "ReverseEquilibrium",
+ "ReverseGraph",
+ "ReverseSort",
+ "ReverseSortBy",
+ "ReverseUpEquilibrium",
+ "RevolutionAxis",
+ "RevolutionPlot3D",
+ "RGBColor",
+ "RiccatiSolve",
+ "RiceDistribution",
+ "RidgeFilter",
+ "RiemannR",
+ "RiemannSiegelTheta",
+ "RiemannSiegelZ",
+ "RiemannXi",
+ "Riffle",
+ "Right",
+ "RightArrow",
+ "RightArrowBar",
+ "RightArrowLeftArrow",
+ "RightComposition",
+ "RightCosetRepresentative",
+ "RightDownTeeVector",
+ "RightDownVector",
+ "RightDownVectorBar",
+ "RightTee",
+ "RightTeeArrow",
+ "RightTeeVector",
+ "RightTriangle",
+ "RightTriangleBar",
+ "RightTriangleEqual",
+ "RightUpDownVector",
+ "RightUpTeeVector",
+ "RightUpVector",
+ "RightUpVectorBar",
+ "RightVector",
+ "RightVectorBar",
+ "RiskAchievementImportance",
+ "RiskReductionImportance",
+ "RogersTanimotoDissimilarity",
+ "RollPitchYawAngles",
+ "RollPitchYawMatrix",
+ "RomanNumeral",
+ "Root",
+ "RootApproximant",
+ "RootIntervals",
+ "RootLocusPlot",
+ "RootMeanSquare",
+ "RootOfUnityQ",
+ "RootReduce",
+ "Roots",
+ "RootSum",
+ "Rotate",
+ "RotateLabel",
+ "RotateLeft",
+ "RotateRight",
+ "RotationAction",
+ "RotationBox",
+ "RotationBoxOptions",
+ "RotationMatrix",
+ "RotationTransform",
+ "Round",
+ "RoundImplies",
+ "RoundingRadius",
+ "Row",
+ "RowAlignments",
+ "RowBackgrounds",
+ "RowBox",
+ "RowHeights",
+ "RowLines",
+ "RowMinHeight",
+ "RowReduce",
+ "RowsEqual",
+ "RowSpacings",
+ "RSolve",
+ "RSolveValue",
+ "RudinShapiro",
+ "RudvalisGroupRu",
+ "Rule",
+ "RuleCondition",
+ "RuleDelayed",
+ "RuleForm",
+ "RulePlot",
+ "RulerUnits",
+ "Run",
+ "RunProcess",
+ "RunScheduledTask",
+ "RunThrough",
+ "RuntimeAttributes",
+ "RuntimeOptions",
+ "RussellRaoDissimilarity",
+ "SameQ",
+ "SameTest",
+ "SameTestProperties",
+ "SampledEntityClass",
+ "SampleDepth",
+ "SampledSoundFunction",
+ "SampledSoundList",
+ "SampleRate",
+ "SamplingPeriod",
+ "SARIMAProcess",
+ "SARMAProcess",
+ "SASTriangle",
+ "SatelliteData",
+ "SatisfiabilityCount",
+ "SatisfiabilityInstances",
+ "SatisfiableQ",
+ "Saturday",
+ "Save",
+ "Saveable",
+ "SaveAutoDelete",
+ "SaveConnection",
+ "SaveDefinitions",
+ "SavitzkyGolayMatrix",
+ "SawtoothWave",
+ "Scale",
+ "Scaled",
+ "ScaleDivisions",
+ "ScaledMousePosition",
+ "ScaleOrigin",
+ "ScalePadding",
+ "ScaleRanges",
+ "ScaleRangeStyle",
+ "ScalingFunctions",
+ "ScalingMatrix",
+ "ScalingTransform",
+ "Scan",
+ "ScheduledTask",
+ "ScheduledTaskActiveQ",
+ "ScheduledTaskInformation",
+ "ScheduledTaskInformationData",
+ "ScheduledTaskObject",
+ "ScheduledTasks",
+ "SchurDecomposition",
+ "ScientificForm",
+ "ScientificNotationThreshold",
+ "ScorerGi",
+ "ScorerGiPrime",
+ "ScorerHi",
+ "ScorerHiPrime",
+ "ScreenRectangle",
+ "ScreenStyleEnvironment",
+ "ScriptBaselineShifts",
+ "ScriptForm",
+ "ScriptLevel",
+ "ScriptMinSize",
+ "ScriptRules",
+ "ScriptSizeMultipliers",
+ "Scrollbars",
+ "ScrollingOptions",
+ "ScrollPosition",
+ "SearchAdjustment",
+ "SearchIndexObject",
+ "SearchIndices",
+ "SearchQueryString",
+ "SearchResultObject",
+ "Sec",
+ "Sech",
+ "SechDistribution",
+ "SecondOrderConeOptimization",
+ "SectionGrouping",
+ "SectorChart",
+ "SectorChart3D",
+ "SectorOrigin",
+ "SectorSpacing",
+ "SecuredAuthenticationKey",
+ "SecuredAuthenticationKeys",
+ "SeedRandom",
+ "Select",
+ "Selectable",
+ "SelectComponents",
+ "SelectedCells",
+ "SelectedNotebook",
+ "SelectFirst",
+ "Selection",
+ "SelectionAnimate",
+ "SelectionCell",
+ "SelectionCellCreateCell",
+ "SelectionCellDefaultStyle",
+ "SelectionCellParentStyle",
+ "SelectionCreateCell",
+ "SelectionDebuggerTag",
+ "SelectionDuplicateCell",
+ "SelectionEvaluate",
+ "SelectionEvaluateCreateCell",
+ "SelectionMove",
+ "SelectionPlaceholder",
+ "SelectionSetStyle",
+ "SelectWithContents",
+ "SelfLoops",
+ "SelfLoopStyle",
+ "SemanticImport",
+ "SemanticImportString",
+ "SemanticInterpretation",
+ "SemialgebraicComponentInstances",
+ "SemidefiniteOptimization",
+ "SendMail",
+ "SendMessage",
+ "Sequence",
+ "SequenceAlignment",
+ "SequenceAttentionLayer",
+ "SequenceCases",
+ "SequenceCount",
+ "SequenceFold",
+ "SequenceFoldList",
+ "SequenceForm",
+ "SequenceHold",
+ "SequenceLastLayer",
+ "SequenceMostLayer",
+ "SequencePosition",
+ "SequencePredict",
+ "SequencePredictorFunction",
+ "SequenceReplace",
+ "SequenceRestLayer",
+ "SequenceReverseLayer",
+ "SequenceSplit",
+ "Series",
+ "SeriesCoefficient",
+ "SeriesData",
+ "SeriesTermGoal",
+ "ServiceConnect",
+ "ServiceDisconnect",
+ "ServiceExecute",
+ "ServiceObject",
+ "ServiceRequest",
+ "ServiceResponse",
+ "ServiceSubmit",
+ "SessionSubmit",
+ "SessionTime",
+ "Set",
+ "SetAccuracy",
+ "SetAlphaChannel",
+ "SetAttributes",
+ "Setbacks",
+ "SetBoxFormNamesPacket",
+ "SetCloudDirectory",
+ "SetCookies",
+ "SetDelayed",
+ "SetDirectory",
+ "SetEnvironment",
+ "SetEvaluationNotebook",
+ "SetFileDate",
+ "SetFileLoadingContext",
+ "SetNotebookStatusLine",
+ "SetOptions",
+ "SetOptionsPacket",
+ "SetPermissions",
+ "SetPrecision",
+ "SetProperty",
+ "SetSecuredAuthenticationKey",
+ "SetSelectedNotebook",
+ "SetSharedFunction",
+ "SetSharedVariable",
+ "SetSpeechParametersPacket",
+ "SetStreamPosition",
+ "SetSystemModel",
+ "SetSystemOptions",
+ "Setter",
+ "SetterBar",
+ "SetterBox",
+ "SetterBoxOptions",
+ "Setting",
+ "SetUsers",
+ "SetValue",
+ "Shading",
+ "Shallow",
+ "ShannonWavelet",
+ "ShapiroWilkTest",
+ "Share",
+ "SharingList",
+ "Sharpen",
+ "ShearingMatrix",
+ "ShearingTransform",
+ "ShellRegion",
+ "ShenCastanMatrix",
+ "ShiftedGompertzDistribution",
+ "ShiftRegisterSequence",
+ "Short",
+ "ShortDownArrow",
+ "Shortest",
+ "ShortestMatch",
+ "ShortestPathFunction",
+ "ShortLeftArrow",
+ "ShortRightArrow",
+ "ShortTimeFourier",
+ "ShortTimeFourierData",
+ "ShortUpArrow",
+ "Show",
+ "ShowAutoConvert",
+ "ShowAutoSpellCheck",
+ "ShowAutoStyles",
+ "ShowCellBracket",
+ "ShowCellLabel",
+ "ShowCellTags",
+ "ShowClosedCellArea",
+ "ShowCodeAssist",
+ "ShowContents",
+ "ShowControls",
+ "ShowCursorTracker",
+ "ShowGroupOpenCloseIcon",
+ "ShowGroupOpener",
+ "ShowInvisibleCharacters",
+ "ShowPageBreaks",
+ "ShowPredictiveInterface",
+ "ShowSelection",
+ "ShowShortBoxForm",
+ "ShowSpecialCharacters",
+ "ShowStringCharacters",
+ "ShowSyntaxStyles",
+ "ShrinkingDelay",
+ "ShrinkWrapBoundingBox",
+ "SiderealTime",
+ "SiegelTheta",
+ "SiegelTukeyTest",
+ "SierpinskiCurve",
+ "SierpinskiMesh",
+ "Sign",
+ "Signature",
+ "SignedRankTest",
+ "SignedRegionDistance",
+ "SignificanceLevel",
+ "SignPadding",
+ "SignTest",
+ "SimilarityRules",
+ "SimpleGraph",
+ "SimpleGraphQ",
+ "SimplePolygonQ",
+ "SimplePolyhedronQ",
+ "Simplex",
+ "Simplify",
+ "Sin",
+ "Sinc",
+ "SinghMaddalaDistribution",
+ "SingleEvaluation",
+ "SingleLetterItalics",
+ "SingleLetterStyle",
+ "SingularValueDecomposition",
+ "SingularValueList",
+ "SingularValuePlot",
+ "SingularValues",
+ "Sinh",
+ "SinhIntegral",
+ "SinIntegral",
+ "SixJSymbol",
+ "Skeleton",
+ "SkeletonTransform",
+ "SkellamDistribution",
+ "Skewness",
+ "SkewNormalDistribution",
+ "SkinStyle",
+ "Skip",
+ "SliceContourPlot3D",
+ "SliceDensityPlot3D",
+ "SliceDistribution",
+ "SliceVectorPlot3D",
+ "Slider",
+ "Slider2D",
+ "Slider2DBox",
+ "Slider2DBoxOptions",
+ "SliderBox",
+ "SliderBoxOptions",
+ "SlideView",
+ "Slot",
+ "SlotSequence",
+ "Small",
+ "SmallCircle",
+ "Smaller",
+ "SmithDecomposition",
+ "SmithDelayCompensator",
+ "SmithWatermanSimilarity",
+ "SmoothDensityHistogram",
+ "SmoothHistogram",
+ "SmoothHistogram3D",
+ "SmoothKernelDistribution",
+ "SnDispersion",
+ "Snippet",
+ "SnubPolyhedron",
+ "SocialMediaData",
+ "Socket",
+ "SocketConnect",
+ "SocketListen",
+ "SocketListener",
+ "SocketObject",
+ "SocketOpen",
+ "SocketReadMessage",
+ "SocketReadyQ",
+ "Sockets",
+ "SocketWaitAll",
+ "SocketWaitNext",
+ "SoftmaxLayer",
+ "SokalSneathDissimilarity",
+ "SolarEclipse",
+ "SolarSystemFeatureData",
+ "SolidAngle",
+ "SolidData",
+ "SolidRegionQ",
+ "Solve",
+ "SolveAlways",
+ "SolveDelayed",
+ "Sort",
+ "SortBy",
+ "SortedBy",
+ "SortedEntityClass",
+ "Sound",
+ "SoundAndGraphics",
+ "SoundNote",
+ "SoundVolume",
+ "SourceLink",
+ "Sow",
+ "Space",
+ "SpaceCurveData",
+ "SpaceForm",
+ "Spacer",
+ "Spacings",
+ "Span",
+ "SpanAdjustments",
+ "SpanCharacterRounding",
+ "SpanFromAbove",
+ "SpanFromBoth",
+ "SpanFromLeft",
+ "SpanLineThickness",
+ "SpanMaxSize",
+ "SpanMinSize",
+ "SpanningCharacters",
+ "SpanSymmetric",
+ "SparseArray",
+ "SpatialGraphDistribution",
+ "SpatialMedian",
+ "SpatialTransformationLayer",
+ "Speak",
+ "SpeakerMatchQ",
+ "SpeakTextPacket",
+ "SpearmanRankTest",
+ "SpearmanRho",
+ "SpeciesData",
+ "SpecificityGoal",
+ "SpectralLineData",
+ "Spectrogram",
+ "SpectrogramArray",
+ "Specularity",
+ "SpeechCases",
+ "SpeechInterpreter",
+ "SpeechRecognize",
+ "SpeechSynthesize",
+ "SpellingCorrection",
+ "SpellingCorrectionList",
+ "SpellingDictionaries",
+ "SpellingDictionariesPath",
+ "SpellingOptions",
+ "SpellingSuggestionsPacket",
+ "Sphere",
+ "SphereBox",
+ "SpherePoints",
+ "SphericalBesselJ",
+ "SphericalBesselY",
+ "SphericalHankelH1",
+ "SphericalHankelH2",
+ "SphericalHarmonicY",
+ "SphericalPlot3D",
+ "SphericalRegion",
+ "SphericalShell",
+ "SpheroidalEigenvalue",
+ "SpheroidalJoiningFactor",
+ "SpheroidalPS",
+ "SpheroidalPSPrime",
+ "SpheroidalQS",
+ "SpheroidalQSPrime",
+ "SpheroidalRadialFactor",
+ "SpheroidalS1",
+ "SpheroidalS1Prime",
+ "SpheroidalS2",
+ "SpheroidalS2Prime",
+ "Splice",
+ "SplicedDistribution",
+ "SplineClosed",
+ "SplineDegree",
+ "SplineKnots",
+ "SplineWeights",
+ "Split",
+ "SplitBy",
+ "SpokenString",
+ "Sqrt",
+ "SqrtBox",
+ "SqrtBoxOptions",
+ "Square",
+ "SquaredEuclideanDistance",
+ "SquareFreeQ",
+ "SquareIntersection",
+ "SquareMatrixQ",
+ "SquareRepeatingElement",
+ "SquaresR",
+ "SquareSubset",
+ "SquareSubsetEqual",
+ "SquareSuperset",
+ "SquareSupersetEqual",
+ "SquareUnion",
+ "SquareWave",
+ "SSSTriangle",
+ "StabilityMargins",
+ "StabilityMarginsStyle",
+ "StableDistribution",
+ "Stack",
+ "StackBegin",
+ "StackComplete",
+ "StackedDateListPlot",
+ "StackedListPlot",
+ "StackInhibit",
+ "StadiumShape",
+ "StandardAtmosphereData",
+ "StandardDeviation",
+ "StandardDeviationFilter",
+ "StandardForm",
+ "Standardize",
+ "Standardized",
+ "StandardOceanData",
+ "StandbyDistribution",
+ "Star",
+ "StarClusterData",
+ "StarData",
+ "StarGraph",
+ "StartAsynchronousTask",
+ "StartExternalSession",
+ "StartingStepSize",
+ "StartOfLine",
+ "StartOfString",
+ "StartProcess",
+ "StartScheduledTask",
+ "StartupSound",
+ "StartWebSession",
+ "StateDimensions",
+ "StateFeedbackGains",
+ "StateOutputEstimator",
+ "StateResponse",
+ "StateSpaceModel",
+ "StateSpaceRealization",
+ "StateSpaceTransform",
+ "StateTransformationLinearize",
+ "StationaryDistribution",
+ "StationaryWaveletPacketTransform",
+ "StationaryWaveletTransform",
+ "StatusArea",
+ "StatusCentrality",
+ "StepMonitor",
+ "StereochemistryElements",
+ "StieltjesGamma",
+ "StippleShading",
+ "StirlingS1",
+ "StirlingS2",
+ "StopAsynchronousTask",
+ "StoppingPowerData",
+ "StopScheduledTask",
+ "StrataVariables",
+ "StratonovichProcess",
+ "StreamColorFunction",
+ "StreamColorFunctionScaling",
+ "StreamDensityPlot",
+ "StreamMarkers",
+ "StreamPlot",
+ "StreamPoints",
+ "StreamPosition",
+ "Streams",
+ "StreamScale",
+ "StreamStyle",
+ "String",
+ "StringBreak",
+ "StringByteCount",
+ "StringCases",
+ "StringContainsQ",
+ "StringCount",
+ "StringDelete",
+ "StringDrop",
+ "StringEndsQ",
+ "StringExpression",
+ "StringExtract",
+ "StringForm",
+ "StringFormat",
+ "StringFreeQ",
+ "StringInsert",
+ "StringJoin",
+ "StringLength",
+ "StringMatchQ",
+ "StringPadLeft",
+ "StringPadRight",
+ "StringPart",
+ "StringPartition",
+ "StringPosition",
+ "StringQ",
+ "StringRepeat",
+ "StringReplace",
+ "StringReplaceList",
+ "StringReplacePart",
+ "StringReverse",
+ "StringRiffle",
+ "StringRotateLeft",
+ "StringRotateRight",
+ "StringSkeleton",
+ "StringSplit",
+ "StringStartsQ",
+ "StringTake",
+ "StringTemplate",
+ "StringToByteArray",
+ "StringToStream",
+ "StringTrim",
+ "StripBoxes",
+ "StripOnInput",
+ "StripWrapperBoxes",
+ "StrokeForm",
+ "StructuralImportance",
+ "StructuredArray",
+ "StructuredArrayHeadQ",
+ "StructuredSelection",
+ "StruveH",
+ "StruveL",
+ "Stub",
+ "StudentTDistribution",
+ "Style",
+ "StyleBox",
+ "StyleBoxAutoDelete",
+ "StyleData",
+ "StyleDefinitions",
+ "StyleForm",
+ "StyleHints",
+ "StyleKeyMapping",
+ "StyleMenuListing",
+ "StyleNameDialogSettings",
+ "StyleNames",
+ "StylePrint",
+ "StyleSheetPath",
+ "Subdivide",
+ "Subfactorial",
+ "Subgraph",
+ "SubMinus",
+ "SubPlus",
+ "SubresultantPolynomialRemainders",
+ "SubresultantPolynomials",
+ "Subresultants",
+ "Subscript",
+ "SubscriptBox",
+ "SubscriptBoxOptions",
+ "Subscripted",
+ "Subsequences",
+ "Subset",
+ "SubsetCases",
+ "SubsetCount",
+ "SubsetEqual",
+ "SubsetMap",
+ "SubsetPosition",
+ "SubsetQ",
+ "SubsetReplace",
+ "Subsets",
+ "SubStar",
+ "SubstitutionSystem",
+ "Subsuperscript",
+ "SubsuperscriptBox",
+ "SubsuperscriptBoxOptions",
+ "SubtitleEncoding",
+ "SubtitleTracks",
+ "Subtract",
+ "SubtractFrom",
+ "SubtractSides",
+ "SubValues",
+ "Succeeds",
+ "SucceedsEqual",
+ "SucceedsSlantEqual",
+ "SucceedsTilde",
+ "Success",
+ "SuchThat",
+ "Sum",
+ "SumConvergence",
+ "SummationLayer",
+ "Sunday",
+ "SunPosition",
+ "Sunrise",
+ "Sunset",
+ "SuperDagger",
+ "SuperMinus",
+ "SupernovaData",
+ "SuperPlus",
+ "Superscript",
+ "SuperscriptBox",
+ "SuperscriptBoxOptions",
+ "Superset",
+ "SupersetEqual",
+ "SuperStar",
+ "Surd",
+ "SurdForm",
+ "SurfaceAppearance",
+ "SurfaceArea",
+ "SurfaceColor",
+ "SurfaceData",
+ "SurfaceGraphics",
+ "SurvivalDistribution",
+ "SurvivalFunction",
+ "SurvivalModel",
+ "SurvivalModelFit",
+ "SuspendPacket",
+ "SuzukiDistribution",
+ "SuzukiGroupSuz",
+ "SwatchLegend",
+ "Switch",
+ "Symbol",
+ "SymbolName",
+ "SymletWavelet",
+ "Symmetric",
+ "SymmetricGroup",
+ "SymmetricKey",
+ "SymmetricMatrixQ",
+ "SymmetricPolynomial",
+ "SymmetricReduction",
+ "Symmetrize",
+ "SymmetrizedArray",
+ "SymmetrizedArrayRules",
+ "SymmetrizedDependentComponents",
+ "SymmetrizedIndependentComponents",
+ "SymmetrizedReplacePart",
+ "SynchronousInitialization",
+ "SynchronousUpdating",
+ "Synonyms",
+ "Syntax",
+ "SyntaxForm",
+ "SyntaxInformation",
+ "SyntaxLength",
+ "SyntaxPacket",
+ "SyntaxQ",
+ "SynthesizeMissingValues",
+ "SystemCredential",
+ "SystemCredentialData",
+ "SystemCredentialKey",
+ "SystemCredentialKeys",
+ "SystemCredentialStoreObject",
+ "SystemDialogInput",
+ "SystemException",
+ "SystemGet",
+ "SystemHelpPath",
+ "SystemInformation",
+ "SystemInformationData",
+ "SystemInstall",
+ "SystemModel",
+ "SystemModeler",
+ "SystemModelExamples",
+ "SystemModelLinearize",
+ "SystemModelParametricSimulate",
+ "SystemModelPlot",
+ "SystemModelProgressReporting",
+ "SystemModelReliability",
+ "SystemModels",
+ "SystemModelSimulate",
+ "SystemModelSimulateSensitivity",
+ "SystemModelSimulationData",
+ "SystemOpen",
+ "SystemOptions",
+ "SystemProcessData",
+ "SystemProcesses",
+ "SystemsConnectionsModel",
+ "SystemsModelDelay",
+ "SystemsModelDelayApproximate",
+ "SystemsModelDelete",
+ "SystemsModelDimensions",
+ "SystemsModelExtract",
+ "SystemsModelFeedbackConnect",
+ "SystemsModelLabels",
+ "SystemsModelLinearity",
+ "SystemsModelMerge",
+ "SystemsModelOrder",
+ "SystemsModelParallelConnect",
+ "SystemsModelSeriesConnect",
+ "SystemsModelStateFeedbackConnect",
+ "SystemsModelVectorRelativeOrders",
+ "SystemStub",
+ "SystemTest",
+ "Tab",
+ "TabFilling",
+ "Table",
+ "TableAlignments",
+ "TableDepth",
+ "TableDirections",
+ "TableForm",
+ "TableHeadings",
+ "TableSpacing",
+ "TableView",
+ "TableViewBox",
+ "TableViewBoxBackground",
+ "TableViewBoxItemSize",
+ "TableViewBoxOptions",
+ "TabSpacings",
+ "TabView",
+ "TabViewBox",
+ "TabViewBoxOptions",
+ "TagBox",
+ "TagBoxNote",
+ "TagBoxOptions",
+ "TaggingRules",
+ "TagSet",
+ "TagSetDelayed",
+ "TagStyle",
+ "TagUnset",
+ "Take",
+ "TakeDrop",
+ "TakeLargest",
+ "TakeLargestBy",
+ "TakeList",
+ "TakeSmallest",
+ "TakeSmallestBy",
+ "TakeWhile",
+ "Tally",
+ "Tan",
+ "Tanh",
+ "TargetDevice",
+ "TargetFunctions",
+ "TargetSystem",
+ "TargetUnits",
+ "TaskAbort",
+ "TaskExecute",
+ "TaskObject",
+ "TaskRemove",
+ "TaskResume",
+ "Tasks",
+ "TaskSuspend",
+ "TaskWait",
+ "TautologyQ",
+ "TelegraphProcess",
+ "TemplateApply",
+ "TemplateArgBox",
+ "TemplateBox",
+ "TemplateBoxOptions",
+ "TemplateEvaluate",
+ "TemplateExpression",
+ "TemplateIf",
+ "TemplateObject",
+ "TemplateSequence",
+ "TemplateSlot",
+ "TemplateSlotSequence",
+ "TemplateUnevaluated",
+ "TemplateVerbatim",
+ "TemplateWith",
+ "TemporalData",
+ "TemporalRegularity",
+ "Temporary",
+ "TemporaryVariable",
+ "TensorContract",
+ "TensorDimensions",
+ "TensorExpand",
+ "TensorProduct",
+ "TensorQ",
+ "TensorRank",
+ "TensorReduce",
+ "TensorSymmetry",
+ "TensorTranspose",
+ "TensorWedge",
+ "TestID",
+ "TestReport",
+ "TestReportObject",
+ "TestResultObject",
+ "Tetrahedron",
+ "TetrahedronBox",
+ "TetrahedronBoxOptions",
+ "TeXForm",
+ "TeXSave",
+ "Text",
+ "Text3DBox",
+ "Text3DBoxOptions",
+ "TextAlignment",
+ "TextBand",
+ "TextBoundingBox",
+ "TextBox",
+ "TextCases",
+ "TextCell",
+ "TextClipboardType",
+ "TextContents",
+ "TextData",
+ "TextElement",
+ "TextForm",
+ "TextGrid",
+ "TextJustification",
+ "TextLine",
+ "TextPacket",
+ "TextParagraph",
+ "TextPosition",
+ "TextRecognize",
+ "TextSearch",
+ "TextSearchReport",
+ "TextSentences",
+ "TextString",
+ "TextStructure",
+ "TextStyle",
+ "TextTranslation",
+ "Texture",
+ "TextureCoordinateFunction",
+ "TextureCoordinateScaling",
+ "TextWords",
+ "Therefore",
+ "ThermodynamicData",
+ "ThermometerGauge",
+ "Thick",
+ "Thickness",
+ "Thin",
+ "Thinning",
+ "ThisLink",
+ "ThompsonGroupTh",
+ "Thread",
+ "ThreadingLayer",
+ "ThreeJSymbol",
+ "Threshold",
+ "Through",
+ "Throw",
+ "ThueMorse",
+ "Thumbnail",
+ "Thursday",
+ "Ticks",
+ "TicksStyle",
+ "TideData",
+ "Tilde",
+ "TildeEqual",
+ "TildeFullEqual",
+ "TildeTilde",
+ "TimeConstrained",
+ "TimeConstraint",
+ "TimeDirection",
+ "TimeFormat",
+ "TimeGoal",
+ "TimelinePlot",
+ "TimeObject",
+ "TimeObjectQ",
+ "TimeRemaining",
+ "Times",
+ "TimesBy",
+ "TimeSeries",
+ "TimeSeriesAggregate",
+ "TimeSeriesForecast",
+ "TimeSeriesInsert",
+ "TimeSeriesInvertibility",
+ "TimeSeriesMap",
+ "TimeSeriesMapThread",
+ "TimeSeriesModel",
+ "TimeSeriesModelFit",
+ "TimeSeriesResample",
+ "TimeSeriesRescale",
+ "TimeSeriesShift",
+ "TimeSeriesThread",
+ "TimeSeriesWindow",
+ "TimeUsed",
+ "TimeValue",
+ "TimeWarpingCorrespondence",
+ "TimeWarpingDistance",
+ "TimeZone",
+ "TimeZoneConvert",
+ "TimeZoneOffset",
+ "Timing",
+ "Tiny",
+ "TitleGrouping",
+ "TitsGroupT",
+ "ToBoxes",
+ "ToCharacterCode",
+ "ToColor",
+ "ToContinuousTimeModel",
+ "ToDate",
+ "Today",
+ "ToDiscreteTimeModel",
+ "ToEntity",
+ "ToeplitzMatrix",
+ "ToExpression",
+ "ToFileName",
+ "Together",
+ "Toggle",
+ "ToggleFalse",
+ "Toggler",
+ "TogglerBar",
+ "TogglerBox",
+ "TogglerBoxOptions",
+ "ToHeldExpression",
+ "ToInvertibleTimeSeries",
+ "TokenWords",
+ "Tolerance",
+ "ToLowerCase",
+ "Tomorrow",
+ "ToNumberField",
+ "TooBig",
+ "Tooltip",
+ "TooltipBox",
+ "TooltipBoxOptions",
+ "TooltipDelay",
+ "TooltipStyle",
+ "ToonShading",
+ "Top",
+ "TopHatTransform",
+ "ToPolarCoordinates",
+ "TopologicalSort",
+ "ToRadicals",
+ "ToRules",
+ "ToSphericalCoordinates",
+ "ToString",
+ "Total",
+ "TotalHeight",
+ "TotalLayer",
+ "TotalVariationFilter",
+ "TotalWidth",
+ "TouchPosition",
+ "TouchscreenAutoZoom",
+ "TouchscreenControlPlacement",
+ "ToUpperCase",
+ "Tr",
+ "Trace",
+ "TraceAbove",
+ "TraceAction",
+ "TraceBackward",
+ "TraceDepth",
+ "TraceDialog",
+ "TraceForward",
+ "TraceInternal",
+ "TraceLevel",
+ "TraceOff",
+ "TraceOn",
+ "TraceOriginal",
+ "TracePrint",
+ "TraceScan",
+ "TrackedSymbols",
+ "TrackingFunction",
+ "TracyWidomDistribution",
+ "TradingChart",
+ "TraditionalForm",
+ "TraditionalFunctionNotation",
+ "TraditionalNotation",
+ "TraditionalOrder",
+ "TrainingProgressCheckpointing",
+ "TrainingProgressFunction",
+ "TrainingProgressMeasurements",
+ "TrainingProgressReporting",
+ "TrainingStoppingCriterion",
+ "TrainingUpdateSchedule",
+ "TransferFunctionCancel",
+ "TransferFunctionExpand",
+ "TransferFunctionFactor",
+ "TransferFunctionModel",
+ "TransferFunctionPoles",
+ "TransferFunctionTransform",
+ "TransferFunctionZeros",
+ "TransformationClass",
+ "TransformationFunction",
+ "TransformationFunctions",
+ "TransformationMatrix",
+ "TransformedDistribution",
+ "TransformedField",
+ "TransformedProcess",
+ "TransformedRegion",
+ "TransitionDirection",
+ "TransitionDuration",
+ "TransitionEffect",
+ "TransitiveClosureGraph",
+ "TransitiveReductionGraph",
+ "Translate",
+ "TranslationOptions",
+ "TranslationTransform",
+ "Transliterate",
+ "Transparent",
+ "TransparentColor",
+ "Transpose",
+ "TransposeLayer",
+ "TrapSelection",
+ "TravelDirections",
+ "TravelDirectionsData",
+ "TravelDistance",
+ "TravelDistanceList",
+ "TravelMethod",
+ "TravelTime",
+ "TreeForm",
+ "TreeGraph",
+ "TreeGraphQ",
+ "TreePlot",
+ "TrendStyle",
+ "Triangle",
+ "TriangleCenter",
+ "TriangleConstruct",
+ "TriangleMeasurement",
+ "TriangleWave",
+ "TriangularDistribution",
+ "TriangulateMesh",
+ "Trig",
+ "TrigExpand",
+ "TrigFactor",
+ "TrigFactorList",
+ "Trigger",
+ "TrigReduce",
+ "TrigToExp",
+ "TrimmedMean",
+ "TrimmedVariance",
+ "TropicalStormData",
+ "True",
+ "TrueQ",
+ "TruncatedDistribution",
+ "TruncatedPolyhedron",
+ "TsallisQExponentialDistribution",
+ "TsallisQGaussianDistribution",
+ "TTest",
+ "Tube",
+ "TubeBezierCurveBox",
+ "TubeBezierCurveBoxOptions",
+ "TubeBox",
+ "TubeBoxOptions",
+ "TubeBSplineCurveBox",
+ "TubeBSplineCurveBoxOptions",
+ "Tuesday",
+ "TukeyLambdaDistribution",
+ "TukeyWindow",
+ "TunnelData",
+ "Tuples",
+ "TuranGraph",
+ "TuringMachine",
+ "TuttePolynomial",
+ "TwoWayRule",
+ "Typed",
+ "TypeSpecifier",
+ "UnateQ",
+ "Uncompress",
+ "UnconstrainedParameters",
+ "Undefined",
+ "UnderBar",
+ "Underflow",
+ "Underlined",
+ "Underoverscript",
+ "UnderoverscriptBox",
+ "UnderoverscriptBoxOptions",
+ "Underscript",
+ "UnderscriptBox",
+ "UnderscriptBoxOptions",
+ "UnderseaFeatureData",
+ "UndirectedEdge",
+ "UndirectedGraph",
+ "UndirectedGraphQ",
+ "UndoOptions",
+ "UndoTrackedVariables",
+ "Unequal",
+ "UnequalTo",
+ "Unevaluated",
+ "UniformDistribution",
+ "UniformGraphDistribution",
+ "UniformPolyhedron",
+ "UniformSumDistribution",
+ "Uninstall",
+ "Union",
+ "UnionedEntityClass",
+ "UnionPlus",
+ "Unique",
+ "UnitaryMatrixQ",
+ "UnitBox",
+ "UnitConvert",
+ "UnitDimensions",
+ "Unitize",
+ "UnitRootTest",
+ "UnitSimplify",
+ "UnitStep",
+ "UnitSystem",
+ "UnitTriangle",
+ "UnitVector",
+ "UnitVectorLayer",
+ "UnityDimensions",
+ "UniverseModelData",
+ "UniversityData",
+ "UnixTime",
+ "Unprotect",
+ "UnregisterExternalEvaluator",
+ "UnsameQ",
+ "UnsavedVariables",
+ "Unset",
+ "UnsetShared",
+ "UntrackedVariables",
+ "Up",
+ "UpArrow",
+ "UpArrowBar",
+ "UpArrowDownArrow",
+ "Update",
+ "UpdateDynamicObjects",
+ "UpdateDynamicObjectsSynchronous",
+ "UpdateInterval",
+ "UpdatePacletSites",
+ "UpdateSearchIndex",
+ "UpDownArrow",
+ "UpEquilibrium",
+ "UpperCaseQ",
+ "UpperLeftArrow",
+ "UpperRightArrow",
+ "UpperTriangularize",
+ "UpperTriangularMatrixQ",
+ "Upsample",
+ "UpSet",
+ "UpSetDelayed",
+ "UpTee",
+ "UpTeeArrow",
+ "UpTo",
+ "UpValues",
+ "URL",
+ "URLBuild",
+ "URLDecode",
+ "URLDispatcher",
+ "URLDownload",
+ "URLDownloadSubmit",
+ "URLEncode",
+ "URLExecute",
+ "URLExpand",
+ "URLFetch",
+ "URLFetchAsynchronous",
+ "URLParse",
+ "URLQueryDecode",
+ "URLQueryEncode",
+ "URLRead",
+ "URLResponseTime",
+ "URLSave",
+ "URLSaveAsynchronous",
+ "URLShorten",
+ "URLSubmit",
+ "UseGraphicsRange",
+ "UserDefinedWavelet",
+ "Using",
+ "UsingFrontEnd",
+ "UtilityFunction",
+ "V2Get",
+ "ValenceErrorHandling",
+ "ValidationLength",
+ "ValidationSet",
+ "Value",
+ "ValueBox",
+ "ValueBoxOptions",
+ "ValueDimensions",
+ "ValueForm",
+ "ValuePreprocessingFunction",
+ "ValueQ",
+ "Values",
+ "ValuesData",
+ "Variables",
+ "Variance",
+ "VarianceEquivalenceTest",
+ "VarianceEstimatorFunction",
+ "VarianceGammaDistribution",
+ "VarianceTest",
+ "VectorAngle",
+ "VectorAround",
+ "VectorAspectRatio",
+ "VectorColorFunction",
+ "VectorColorFunctionScaling",
+ "VectorDensityPlot",
+ "VectorGlyphData",
+ "VectorGreater",
+ "VectorGreaterEqual",
+ "VectorLess",
+ "VectorLessEqual",
+ "VectorMarkers",
+ "VectorPlot",
+ "VectorPlot3D",
+ "VectorPoints",
+ "VectorQ",
+ "VectorRange",
+ "Vectors",
+ "VectorScale",
+ "VectorScaling",
+ "VectorSizes",
+ "VectorStyle",
+ "Vee",
+ "Verbatim",
+ "Verbose",
+ "VerboseConvertToPostScriptPacket",
+ "VerificationTest",
+ "VerifyConvergence",
+ "VerifyDerivedKey",
+ "VerifyDigitalSignature",
+ "VerifyFileSignature",
+ "VerifyInterpretation",
+ "VerifySecurityCertificates",
+ "VerifySolutions",
+ "VerifyTestAssumptions",
+ "Version",
+ "VersionedPreferences",
+ "VersionNumber",
+ "VertexAdd",
+ "VertexCapacity",
+ "VertexColors",
+ "VertexComponent",
+ "VertexConnectivity",
+ "VertexContract",
+ "VertexCoordinateRules",
+ "VertexCoordinates",
+ "VertexCorrelationSimilarity",
+ "VertexCosineSimilarity",
+ "VertexCount",
+ "VertexCoverQ",
+ "VertexDataCoordinates",
+ "VertexDegree",
+ "VertexDelete",
+ "VertexDiceSimilarity",
+ "VertexEccentricity",
+ "VertexInComponent",
+ "VertexInDegree",
+ "VertexIndex",
+ "VertexJaccardSimilarity",
+ "VertexLabeling",
+ "VertexLabels",
+ "VertexLabelStyle",
+ "VertexList",
+ "VertexNormals",
+ "VertexOutComponent",
+ "VertexOutDegree",
+ "VertexQ",
+ "VertexRenderingFunction",
+ "VertexReplace",
+ "VertexShape",
+ "VertexShapeFunction",
+ "VertexSize",
+ "VertexStyle",
+ "VertexTextureCoordinates",
+ "VertexWeight",
+ "VertexWeightedGraphQ",
+ "Vertical",
+ "VerticalBar",
+ "VerticalForm",
+ "VerticalGauge",
+ "VerticalSeparator",
+ "VerticalSlider",
+ "VerticalTilde",
+ "Video",
+ "VideoEncoding",
+ "VideoExtractFrames",
+ "VideoFrameList",
+ "VideoFrameMap",
+ "VideoPause",
+ "VideoPlay",
+ "VideoQ",
+ "VideoStop",
+ "VideoStream",
+ "VideoStreams",
+ "VideoTimeSeries",
+ "VideoTracks",
+ "VideoTrim",
+ "ViewAngle",
+ "ViewCenter",
+ "ViewMatrix",
+ "ViewPoint",
+ "ViewPointSelectorSettings",
+ "ViewPort",
+ "ViewProjection",
+ "ViewRange",
+ "ViewVector",
+ "ViewVertical",
+ "VirtualGroupData",
+ "Visible",
+ "VisibleCell",
+ "VoiceStyleData",
+ "VoigtDistribution",
+ "VolcanoData",
+ "Volume",
+ "VonMisesDistribution",
+ "VoronoiMesh",
+ "WaitAll",
+ "WaitAsynchronousTask",
+ "WaitNext",
+ "WaitUntil",
+ "WakebyDistribution",
+ "WalleniusHypergeometricDistribution",
+ "WaringYuleDistribution",
+ "WarpingCorrespondence",
+ "WarpingDistance",
+ "WatershedComponents",
+ "WatsonUSquareTest",
+ "WattsStrogatzGraphDistribution",
+ "WaveletBestBasis",
+ "WaveletFilterCoefficients",
+ "WaveletImagePlot",
+ "WaveletListPlot",
+ "WaveletMapIndexed",
+ "WaveletMatrixPlot",
+ "WaveletPhi",
+ "WaveletPsi",
+ "WaveletScale",
+ "WaveletScalogram",
+ "WaveletThreshold",
+ "WeaklyConnectedComponents",
+ "WeaklyConnectedGraphComponents",
+ "WeaklyConnectedGraphQ",
+ "WeakStationarity",
+ "WeatherData",
+ "WeatherForecastData",
+ "WebAudioSearch",
+ "WebElementObject",
+ "WeberE",
+ "WebExecute",
+ "WebImage",
+ "WebImageSearch",
+ "WebSearch",
+ "WebSessionObject",
+ "WebSessions",
+ "WebWindowObject",
+ "Wedge",
+ "Wednesday",
+ "WeibullDistribution",
+ "WeierstrassE1",
+ "WeierstrassE2",
+ "WeierstrassE3",
+ "WeierstrassEta1",
+ "WeierstrassEta2",
+ "WeierstrassEta3",
+ "WeierstrassHalfPeriods",
+ "WeierstrassHalfPeriodW1",
+ "WeierstrassHalfPeriodW2",
+ "WeierstrassHalfPeriodW3",
+ "WeierstrassInvariantG2",
+ "WeierstrassInvariantG3",
+ "WeierstrassInvariants",
+ "WeierstrassP",
+ "WeierstrassPPrime",
+ "WeierstrassSigma",
+ "WeierstrassZeta",
+ "WeightedAdjacencyGraph",
+ "WeightedAdjacencyMatrix",
+ "WeightedData",
+ "WeightedGraphQ",
+ "Weights",
+ "WelchWindow",
+ "WheelGraph",
+ "WhenEvent",
+ "Which",
+ "While",
+ "White",
+ "WhiteNoiseProcess",
+ "WhitePoint",
+ "Whitespace",
+ "WhitespaceCharacter",
+ "WhittakerM",
+ "WhittakerW",
+ "WienerFilter",
+ "WienerProcess",
+ "WignerD",
+ "WignerSemicircleDistribution",
+ "WikidataData",
+ "WikidataSearch",
+ "WikipediaData",
+ "WikipediaSearch",
+ "WilksW",
+ "WilksWTest",
+ "WindDirectionData",
+ "WindingCount",
+ "WindingPolygon",
+ "WindowClickSelect",
+ "WindowElements",
+ "WindowFloating",
+ "WindowFrame",
+ "WindowFrameElements",
+ "WindowMargins",
+ "WindowMovable",
+ "WindowOpacity",
+ "WindowPersistentStyles",
+ "WindowSelected",
+ "WindowSize",
+ "WindowStatusArea",
+ "WindowTitle",
+ "WindowToolbars",
+ "WindowWidth",
+ "WindSpeedData",
+ "WindVectorData",
+ "WinsorizedMean",
+ "WinsorizedVariance",
+ "WishartMatrixDistribution",
+ "With",
+ "WolframAlpha",
+ "WolframAlphaDate",
+ "WolframAlphaQuantity",
+ "WolframAlphaResult",
+ "WolframLanguageData",
+ "Word",
+ "WordBoundary",
+ "WordCharacter",
+ "WordCloud",
+ "WordCount",
+ "WordCounts",
+ "WordData",
+ "WordDefinition",
+ "WordFrequency",
+ "WordFrequencyData",
+ "WordList",
+ "WordOrientation",
+ "WordSearch",
+ "WordSelectionFunction",
+ "WordSeparators",
+ "WordSpacings",
+ "WordStem",
+ "WordTranslation",
+ "WorkingPrecision",
+ "WrapAround",
+ "Write",
+ "WriteLine",
+ "WriteString",
+ "Wronskian",
+ "XMLElement",
+ "XMLObject",
+ "XMLTemplate",
+ "Xnor",
+ "Xor",
+ "XYZColor",
+ "Yellow",
+ "Yesterday",
+ "YuleDissimilarity",
+ "ZernikeR",
+ "ZeroSymmetric",
+ "ZeroTest",
+ "ZeroWidthTimes",
+ "Zeta",
+ "ZetaZero",
+ "ZIPCodeData",
+ "ZipfDistribution",
+ "ZoomCenter",
+ "ZoomFactor",
+ "ZTest",
+ "ZTransform",
+ "$Aborted",
+ "$ActivationGroupID",
+ "$ActivationKey",
+ "$ActivationUserRegistered",
+ "$AddOnsDirectory",
+ "$AllowDataUpdates",
+ "$AllowExternalChannelFunctions",
+ "$AllowInternet",
+ "$AssertFunction",
+ "$Assumptions",
+ "$AsynchronousTask",
+ "$AudioDecoders",
+ "$AudioEncoders",
+ "$AudioInputDevices",
+ "$AudioOutputDevices",
+ "$BaseDirectory",
+ "$BasePacletsDirectory",
+ "$BatchInput",
+ "$BatchOutput",
+ "$BlockchainBase",
+ "$BoxForms",
+ "$ByteOrdering",
+ "$CacheBaseDirectory",
+ "$Canceled",
+ "$ChannelBase",
+ "$CharacterEncoding",
+ "$CharacterEncodings",
+ "$CloudAccountName",
+ "$CloudBase",
+ "$CloudConnected",
+ "$CloudConnection",
+ "$CloudCreditsAvailable",
+ "$CloudEvaluation",
+ "$CloudExpressionBase",
+ "$CloudObjectNameFormat",
+ "$CloudObjectURLType",
+ "$CloudRootDirectory",
+ "$CloudSymbolBase",
+ "$CloudUserID",
+ "$CloudUserUUID",
+ "$CloudVersion",
+ "$CloudVersionNumber",
+ "$CloudWolframEngineVersionNumber",
+ "$CommandLine",
+ "$CompilationTarget",
+ "$ConditionHold",
+ "$ConfiguredKernels",
+ "$Context",
+ "$ContextPath",
+ "$ControlActiveSetting",
+ "$Cookies",
+ "$CookieStore",
+ "$CreationDate",
+ "$CurrentLink",
+ "$CurrentTask",
+ "$CurrentWebSession",
+ "$DataStructures",
+ "$DateStringFormat",
+ "$DefaultAudioInputDevice",
+ "$DefaultAudioOutputDevice",
+ "$DefaultFont",
+ "$DefaultFrontEnd",
+ "$DefaultImagingDevice",
+ "$DefaultLocalBase",
+ "$DefaultMailbox",
+ "$DefaultNetworkInterface",
+ "$DefaultPath",
+ "$DefaultProxyRules",
+ "$DefaultSystemCredentialStore",
+ "$Display",
+ "$DisplayFunction",
+ "$DistributedContexts",
+ "$DynamicEvaluation",
+ "$Echo",
+ "$EmbedCodeEnvironments",
+ "$EmbeddableServices",
+ "$EntityStores",
+ "$Epilog",
+ "$EvaluationCloudBase",
+ "$EvaluationCloudObject",
+ "$EvaluationEnvironment",
+ "$ExportFormats",
+ "$ExternalIdentifierTypes",
+ "$ExternalStorageBase",
+ "$Failed",
+ "$FinancialDataSource",
+ "$FontFamilies",
+ "$FormatType",
+ "$FrontEnd",
+ "$FrontEndSession",
+ "$GeoEntityTypes",
+ "$GeoLocation",
+ "$GeoLocationCity",
+ "$GeoLocationCountry",
+ "$GeoLocationPrecision",
+ "$GeoLocationSource",
+ "$HistoryLength",
+ "$HomeDirectory",
+ "$HTMLExportRules",
+ "$HTTPCookies",
+ "$HTTPRequest",
+ "$IgnoreEOF",
+ "$ImageFormattingWidth",
+ "$ImageResolution",
+ "$ImagingDevice",
+ "$ImagingDevices",
+ "$ImportFormats",
+ "$IncomingMailSettings",
+ "$InitialDirectory",
+ "$Initialization",
+ "$InitializationContexts",
+ "$Input",
+ "$InputFileName",
+ "$InputStreamMethods",
+ "$Inspector",
+ "$InstallationDate",
+ "$InstallationDirectory",
+ "$InterfaceEnvironment",
+ "$InterpreterTypes",
+ "$IterationLimit",
+ "$KernelCount",
+ "$KernelID",
+ "$Language",
+ "$LaunchDirectory",
+ "$LibraryPath",
+ "$LicenseExpirationDate",
+ "$LicenseID",
+ "$LicenseProcesses",
+ "$LicenseServer",
+ "$LicenseSubprocesses",
+ "$LicenseType",
+ "$Line",
+ "$Linked",
+ "$LinkSupported",
+ "$LoadedFiles",
+ "$LocalBase",
+ "$LocalSymbolBase",
+ "$MachineAddresses",
+ "$MachineDomain",
+ "$MachineDomains",
+ "$MachineEpsilon",
+ "$MachineID",
+ "$MachineName",
+ "$MachinePrecision",
+ "$MachineType",
+ "$MaxExtraPrecision",
+ "$MaxLicenseProcesses",
+ "$MaxLicenseSubprocesses",
+ "$MaxMachineNumber",
+ "$MaxNumber",
+ "$MaxPiecewiseCases",
+ "$MaxPrecision",
+ "$MaxRootDegree",
+ "$MessageGroups",
+ "$MessageList",
+ "$MessagePrePrint",
+ "$Messages",
+ "$MinMachineNumber",
+ "$MinNumber",
+ "$MinorReleaseNumber",
+ "$MinPrecision",
+ "$MobilePhone",
+ "$ModuleNumber",
+ "$NetworkConnected",
+ "$NetworkInterfaces",
+ "$NetworkLicense",
+ "$NewMessage",
+ "$NewSymbol",
+ "$NotebookInlineStorageLimit",
+ "$Notebooks",
+ "$NoValue",
+ "$NumberMarks",
+ "$Off",
+ "$OperatingSystem",
+ "$Output",
+ "$OutputForms",
+ "$OutputSizeLimit",
+ "$OutputStreamMethods",
+ "$Packages",
+ "$ParentLink",
+ "$ParentProcessID",
+ "$PasswordFile",
+ "$PatchLevelID",
+ "$Path",
+ "$PathnameSeparator",
+ "$PerformanceGoal",
+ "$Permissions",
+ "$PermissionsGroupBase",
+ "$PersistenceBase",
+ "$PersistencePath",
+ "$PipeSupported",
+ "$PlotTheme",
+ "$Post",
+ "$Pre",
+ "$PreferencesDirectory",
+ "$PreInitialization",
+ "$PrePrint",
+ "$PreRead",
+ "$PrintForms",
+ "$PrintLiteral",
+ "$Printout3DPreviewer",
+ "$ProcessID",
+ "$ProcessorCount",
+ "$ProcessorType",
+ "$ProductInformation",
+ "$ProgramName",
+ "$PublisherID",
+ "$RandomState",
+ "$RecursionLimit",
+ "$RegisteredDeviceClasses",
+ "$RegisteredUserName",
+ "$ReleaseNumber",
+ "$RequesterAddress",
+ "$RequesterWolframID",
+ "$RequesterWolframUUID",
+ "$RootDirectory",
+ "$ScheduledTask",
+ "$ScriptCommandLine",
+ "$ScriptInputString",
+ "$SecuredAuthenticationKeyTokens",
+ "$ServiceCreditsAvailable",
+ "$Services",
+ "$SessionID",
+ "$SetParentLink",
+ "$SharedFunctions",
+ "$SharedVariables",
+ "$SoundDisplay",
+ "$SoundDisplayFunction",
+ "$SourceLink",
+ "$SSHAuthentication",
+ "$SubtitleDecoders",
+ "$SubtitleEncoders",
+ "$SummaryBoxDataSizeLimit",
+ "$SuppressInputFormHeads",
+ "$SynchronousEvaluation",
+ "$SyntaxHandler",
+ "$System",
+ "$SystemCharacterEncoding",
+ "$SystemCredentialStore",
+ "$SystemID",
+ "$SystemMemory",
+ "$SystemShell",
+ "$SystemTimeZone",
+ "$SystemWordLength",
+ "$TemplatePath",
+ "$TemporaryDirectory",
+ "$TemporaryPrefix",
+ "$TestFileName",
+ "$TextStyle",
+ "$TimedOut",
+ "$TimeUnit",
+ "$TimeZone",
+ "$TimeZoneEntity",
+ "$TopDirectory",
+ "$TraceOff",
+ "$TraceOn",
+ "$TracePattern",
+ "$TracePostAction",
+ "$TracePreAction",
+ "$UnitSystem",
+ "$Urgent",
+ "$UserAddOnsDirectory",
+ "$UserAgentLanguages",
+ "$UserAgentMachine",
+ "$UserAgentName",
+ "$UserAgentOperatingSystem",
+ "$UserAgentString",
+ "$UserAgentVersion",
+ "$UserBaseDirectory",
+ "$UserBasePacletsDirectory",
+ "$UserDocumentsDirectory",
+ "$Username",
+ "$UserName",
+ "$UserURLBase",
+ "$Version",
+ "$VersionNumber",
+ "$VideoDecoders",
+ "$VideoEncoders",
+ "$VoiceStyles",
+ "$WolframDocumentsDirectory",
+ "$WolframID",
+ "$WolframUUID"
+];
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function optional(re) {
+ return concat('(', re, ')?');
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/**
+ * Any of the passed expresssions may match
+ *
+ * Creates a huge this | this | that | that match
+ * @param {(RegExp | string)[] } args
+ * @returns {string}
+ */
+function either(...args) {
+ const joined = '(' + args.map((x) => source(x)).join("|") + ")";
+ return joined;
+}
+
+/*
+Language: Wolfram Language
+Description: The Wolfram Language is the programming language used in Wolfram Mathematica, a modern technical computing system spanning most areas of technical computing.
+Authors: Patrick Scheibe , Robert Jacobson
+Website: https://www.wolfram.com/mathematica/
+Category: scientific
+*/
+
+/** @type LanguageFn */
+function mathematica(hljs) {
+ /*
+ This rather scary looking matching of Mathematica numbers is carefully explained by Robert Jacobson here:
+ https://wltools.github.io/LanguageSpec/Specification/Syntax/Number-representations/
+ */
+ const BASE_RE = /([2-9]|[1-2]\d|[3][0-5])\^\^/;
+ const BASE_DIGITS_RE = /(\w*\.\w+|\w+\.\w*|\w+)/;
+ const NUMBER_RE = /(\d*\.\d+|\d+\.\d*|\d+)/;
+ const BASE_NUMBER_RE = either(concat(BASE_RE, BASE_DIGITS_RE), NUMBER_RE);
+
+ const ACCURACY_RE = /``[+-]?(\d*\.\d+|\d+\.\d*|\d+)/;
+ const PRECISION_RE = /`([+-]?(\d*\.\d+|\d+\.\d*|\d+))?/;
+ const APPROXIMATE_NUMBER_RE = either(ACCURACY_RE, PRECISION_RE);
+
+ const SCIENTIFIC_NOTATION_RE = /\*\^[+-]?\d+/;
+
+ const MATHEMATICA_NUMBER_RE = concat(
+ BASE_NUMBER_RE,
+ optional(APPROXIMATE_NUMBER_RE),
+ optional(SCIENTIFIC_NOTATION_RE)
+ );
+
+ const NUMBERS = {
+ className: 'number',
+ relevance: 0,
+ begin: MATHEMATICA_NUMBER_RE
+ };
+
+ const SYMBOL_RE = /[a-zA-Z$][a-zA-Z0-9$]*/;
+ const SYSTEM_SYMBOLS_SET = new Set(SYSTEM_SYMBOLS);
+ /** @type {Mode} */
+ const SYMBOLS = {
+ variants: [
+ {
+ className: 'builtin-symbol',
+ begin: SYMBOL_RE,
+ // for performance out of fear of regex.either(...Mathematica.SYSTEM_SYMBOLS)
+ "on:begin": (match, response) => {
+ if (!SYSTEM_SYMBOLS_SET.has(match[0])) response.ignoreMatch();
+ }
+ },
+ {
+ className: 'symbol',
+ relevance: 0,
+ begin: SYMBOL_RE
+ }
+ ]
+ };
+
+ const NAMED_CHARACTER = {
+ className: 'named-character',
+ begin: /\\\[[$a-zA-Z][$a-zA-Z0-9]+\]/
+ };
+
+ const OPERATORS = {
+ className: 'operator',
+ relevance: 0,
+ begin: /[+\-*/,;.:@~=><&|_`'^?!%]+/
+ };
+ const PATTERNS = {
+ className: 'pattern',
+ relevance: 0,
+ begin: /([a-zA-Z$][a-zA-Z0-9$]*)?_+([a-zA-Z$][a-zA-Z0-9$]*)?/
+ };
+
+ const SLOTS = {
+ className: 'slot',
+ relevance: 0,
+ begin: /#[a-zA-Z$][a-zA-Z0-9$]*|#+[0-9]?/
+ };
+
+ const BRACES = {
+ className: 'brace',
+ relevance: 0,
+ begin: /[[\](){}]/
+ };
+
+ const MESSAGES = {
+ className: 'message-name',
+ relevance: 0,
+ begin: concat("::", SYMBOL_RE)
+ };
+
+ return {
+ name: 'Mathematica',
+ aliases: [
+ 'mma',
+ 'wl'
+ ],
+ classNameAliases: {
+ brace: 'punctuation',
+ pattern: 'type',
+ slot: 'type',
+ symbol: 'variable',
+ 'named-character': 'variable',
+ 'builtin-symbol': 'built_in',
+ 'message-name': 'string'
+ },
+ contains: [
+ hljs.COMMENT(/\(\*/, /\*\)/, {
+ contains: [ 'self' ]
+ }),
+ PATTERNS,
+ SLOTS,
+ MESSAGES,
+ SYMBOLS,
+ NAMED_CHARACTER,
+ hljs.QUOTE_STRING_MODE,
+ NUMBERS,
+ OPERATORS,
+ BRACES
+ ]
+ };
+}
+
+module.exports = mathematica;
+
+
+/***/ }),
+
+/***/ 91313:
+/***/ ((module) => {
+
+/*
+Language: Matlab
+Author: Denis Bardadym
+Contributors: Eugene Nizhibitsky , Egor Rogov
+Website: https://www.mathworks.com/products/matlab.html
+Category: scientific
+*/
+
+/*
+ Formal syntax is not published, helpful link:
+ https://github.com/kornilova-l/matlab-IntelliJ-plugin/blob/master/src/main/grammar/Matlab.bnf
+*/
+function matlab(hljs) {
+
+ var TRANSPOSE_RE = '(\'|\\.\')+';
+ var TRANSPOSE = {
+ relevance: 0,
+ contains: [
+ { begin: TRANSPOSE_RE }
+ ]
+ };
+
+ return {
+ name: 'Matlab',
+ keywords: {
+ keyword:
+ 'arguments break case catch classdef continue else elseif end enumeration events for function ' +
+ 'global if methods otherwise parfor persistent properties return spmd switch try while',
+ built_in:
+ 'sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan ' +
+ 'atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot ' +
+ 'cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog ' +
+ 'realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal ' +
+ 'cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli ' +
+ 'besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma ' +
+ 'gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms ' +
+ 'nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones ' +
+ 'eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ' +
+ 'ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril ' +
+ 'triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute ' +
+ 'shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i|0 inf nan ' +
+ 'isnan isinf isfinite j|0 why compan gallery hadamard hankel hilb invhilb magic pascal ' +
+ 'rosser toeplitz vander wilkinson max min nanmax nanmin mean nanmean type table ' +
+ 'readtable writetable sortrows sort figure plot plot3 scatter scatter3 cellfun ' +
+ 'legend intersect ismember procrustes hold num2cell '
+ },
+ illegal: '(//|"|#|/\\*|\\s+/\\w+)',
+ contains: [
+ {
+ className: 'function',
+ beginKeywords: 'function', end: '$',
+ contains: [
+ hljs.UNDERSCORE_TITLE_MODE,
+ {
+ className: 'params',
+ variants: [
+ {begin: '\\(', end: '\\)'},
+ {begin: '\\[', end: '\\]'}
+ ]
+ }
+ ]
+ },
+ {
+ className: 'built_in',
+ begin: /true|false/,
+ relevance: 0,
+ starts: TRANSPOSE
+ },
+ {
+ begin: '[a-zA-Z][a-zA-Z_0-9]*' + TRANSPOSE_RE,
+ relevance: 0
+ },
+ {
+ className: 'number',
+ begin: hljs.C_NUMBER_RE,
+ relevance: 0,
+ starts: TRANSPOSE
+ },
+ {
+ className: 'string',
+ begin: '\'', end: '\'',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ {begin: '\'\''}]
+ },
+ {
+ begin: /\]|\}|\)/,
+ relevance: 0,
+ starts: TRANSPOSE
+ },
+ {
+ className: 'string',
+ begin: '"', end: '"',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ {begin: '""'}
+ ],
+ starts: TRANSPOSE
+ },
+ hljs.COMMENT('^\\s*%\\{\\s*$', '^\\s*%\\}\\s*$'),
+ hljs.COMMENT('%', '$')
+ ]
+ };
+}
+
+module.exports = matlab;
+
+
+/***/ }),
+
+/***/ 89887:
+/***/ ((module) => {
+
+/*
+Language: Maxima
+Author: Robert Dodier
+Website: http://maxima.sourceforge.net
+Category: scientific
+*/
+
+function maxima(hljs) {
+ const KEYWORDS =
+ 'if then else elseif for thru do while unless step in and or not';
+ const LITERALS =
+ 'true false unknown inf minf ind und %e %i %pi %phi %gamma';
+ const BUILTIN_FUNCTIONS =
+ ' abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate' +
+ ' addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix' +
+ ' adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type' +
+ ' alias allroots alphacharp alphanumericp amortization %and annuity_fv' +
+ ' annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2' +
+ ' applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply' +
+ ' arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger' +
+ ' asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order' +
+ ' asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method' +
+ ' av average_degree backtrace bars barsplot barsplot_description base64 base64_decode' +
+ ' bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx' +
+ ' bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify' +
+ ' bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized' +
+ ' bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp' +
+ ' bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition' +
+ ' block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description' +
+ ' break bug_report build_info|10 buildq build_sample burn cabs canform canten' +
+ ' cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli' +
+ ' cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform' +
+ ' cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel' +
+ ' cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial' +
+ ' cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson' +
+ ' cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay' +
+ ' ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic' +
+ ' cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2' +
+ ' charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps' +
+ ' chinese cholesky christof chromatic_index chromatic_number cint circulant_graph' +
+ ' clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph' +
+ ' clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse' +
+ ' collectterms columnop columnspace columnswap columnvector combination combine' +
+ ' comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph' +
+ ' complete_graph complex_number_p components compose_functions concan concat' +
+ ' conjugate conmetderiv connected_components connect_vertices cons constant' +
+ ' constantp constituent constvalue cont2part content continuous_freq contortion' +
+ ' contour_plot contract contract_edge contragrad contrib_ode convert coord' +
+ ' copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1' +
+ ' covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline' +
+ ' ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph' +
+ ' cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate' +
+ ' declare declare_constvalue declare_dimensions declare_fundamental_dimensions' +
+ ' declare_fundamental_units declare_qty declare_translated declare_unit_conversion' +
+ ' declare_units declare_weights decsym defcon define define_alt_display define_variable' +
+ ' defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten' +
+ ' delta demo demoivre denom depends derivdegree derivlist describe desolve' +
+ ' determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag' +
+ ' diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export' +
+ ' dimacs_import dimension dimensionless dimensions dimensions_as_list direct' +
+ ' directory discrete_freq disjoin disjointp disolate disp dispcon dispform' +
+ ' dispfun dispJordan display disprule dispterms distrib divide divisors divsum' +
+ ' dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart' +
+ ' draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring' +
+ ' edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth' +
+ ' einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome' +
+ ' ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using' +
+ ' ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi' +
+ ' ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp' +
+ ' equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors' +
+ ' euler ev eval_string evenp every evolution evolution2d evundiff example exp' +
+ ' expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci' +
+ ' expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li' +
+ ' expintegral_shi expintegral_si explicit explose exponentialize express expt' +
+ ' exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum' +
+ ' factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements' +
+ ' fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge' +
+ ' file_search file_type fillarray findde find_root find_root_abs find_root_error' +
+ ' find_root_rel first fix flatten flength float floatnump floor flower_snark' +
+ ' flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran' +
+ ' fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp' +
+ ' foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s' +
+ ' from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp' +
+ ' fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units' +
+ ' fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized' +
+ ' gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide' +
+ ' gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym' +
+ ' geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean' +
+ ' geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string' +
+ ' get_pixel get_plot_option get_tex_environment get_tex_environment_default' +
+ ' get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close' +
+ ' gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum' +
+ ' gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import' +
+ ' graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery' +
+ ' graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph' +
+ ' grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path' +
+ ' hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite' +
+ ' hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description' +
+ ' hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph' +
+ ' icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy' +
+ ' ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart' +
+ ' imetric implicit implicit_derivative implicit_plot indexed_tensor indices' +
+ ' induced_subgraph inferencep inference_result infix info_display init_atensor' +
+ ' init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions' +
+ ' integrate intersect intersection intervalp intopois intosum invariant1 invariant2' +
+ ' inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc' +
+ ' inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns' +
+ ' inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint' +
+ ' invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph' +
+ ' is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate' +
+ ' isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph' +
+ ' items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc' +
+ ' jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd' +
+ ' jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill' +
+ ' killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis' +
+ ' kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform' +
+ ' kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete' +
+ ' kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace' +
+ ' kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2' +
+ ' kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson' +
+ ' kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange' +
+ ' laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp' +
+ ' lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length' +
+ ' let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit' +
+ ' Lindstedt linear linearinterpol linear_program linear_regression line_graph' +
+ ' linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials' +
+ ' listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry' +
+ ' log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst' +
+ ' lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact' +
+ ' lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub' +
+ ' lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma' +
+ ' make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country' +
+ ' make_polygon make_random_state make_rgb_picture makeset make_string_input_stream' +
+ ' make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom' +
+ ' maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display' +
+ ' mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker' +
+ ' max max_clique max_degree max_flow maximize_lp max_independent_set max_matching' +
+ ' maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform' +
+ ' mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete' +
+ ' mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic' +
+ ' mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t' +
+ ' mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull' +
+ ' median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree' +
+ ' min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor' +
+ ' minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton' +
+ ' mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions' +
+ ' multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff' +
+ ' multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary' +
+ ' natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext' +
+ ' newdet new_graph newline newton new_variable next_prime nicedummies niceindices' +
+ ' ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp' +
+ ' nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst' +
+ ' nthroot nullity nullspace num numbered_boundaries numberp number_to_octets' +
+ ' num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai' +
+ ' nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin' +
+ ' oid_to_octets op opena opena_binary openr openr_binary openw openw_binary' +
+ ' operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless' +
+ ' orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap' +
+ ' out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface' +
+ ' parg parGosper parse_string parse_timedate part part2cont partfrac partition' +
+ ' partition_set partpol path_digraph path_graph pathname_directory pathname_name' +
+ ' pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform' +
+ ' pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete' +
+ ' pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal' +
+ ' pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal' +
+ ' pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t' +
+ ' pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph' +
+ ' petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding' +
+ ' playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff' +
+ ' poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar' +
+ ' polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion' +
+ ' poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal' +
+ ' poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal' +
+ ' poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation' +
+ ' poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm' +
+ ' poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form' +
+ ' poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part' +
+ ' poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension' +
+ ' poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod' +
+ ' powerseries powerset prefix prev_prime primep primes principal_components' +
+ ' print printf printfile print_graph printpois printprops prodrac product properties' +
+ ' propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct' +
+ ' puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp' +
+ ' quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile' +
+ ' quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2' +
+ ' quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f' +
+ ' quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel' +
+ ' quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal' +
+ ' quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t' +
+ ' quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t' +
+ ' quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan' +
+ ' radius random random_bernoulli random_beta random_binomial random_bipartite_graph' +
+ ' random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform' +
+ ' random_exp random_f random_gamma random_general_finite_discrete random_geometric' +
+ ' random_graph random_graph1 random_gumbel random_hypergeometric random_laplace' +
+ ' random_logistic random_lognormal random_negative_binomial random_network' +
+ ' random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto' +
+ ' random_permutation random_poisson random_rayleigh random_regular_graph random_student_t' +
+ ' random_tournament random_tree random_weibull range rank rat ratcoef ratdenom' +
+ ' ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump' +
+ ' ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array' +
+ ' read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline' +
+ ' read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate' +
+ ' realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar' +
+ ' rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus' +
+ ' rem remainder remarray rembox remcomps remcon remcoord remfun remfunction' +
+ ' remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions' +
+ ' remove_fundamental_units remove_plot_option remove_vertex rempart remrule' +
+ ' remsym remvalue rename rename_file reset reset_displays residue resolvante' +
+ ' resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein' +
+ ' resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer' +
+ ' rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann' +
+ ' rinvariant risch rk rmdir rncombine romberg room rootscontract round row' +
+ ' rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i' +
+ ' scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description' +
+ ' scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second' +
+ ' sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight' +
+ ' setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state' +
+ ' set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications' +
+ ' set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path' +
+ ' show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform' +
+ ' simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert' +
+ ' sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial' +
+ ' skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp' +
+ ' skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric' +
+ ' skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic' +
+ ' skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t' +
+ ' skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t' +
+ ' skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph' +
+ ' smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve' +
+ ' solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export' +
+ ' sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1' +
+ ' spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition' +
+ ' sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus' +
+ ' ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot' +
+ ' starplot_description status std std1 std_bernoulli std_beta std_binomial' +
+ ' std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma' +
+ ' std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace' +
+ ' std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t' +
+ ' std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull' +
+ ' stemplot stirling stirling1 stirling2 strim striml strimr string stringout' +
+ ' stringp strong_components struve_h struve_l sublis sublist sublist_indices' +
+ ' submatrix subsample subset subsetp subst substinpart subst_parallel substpart' +
+ ' substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext' +
+ ' symbolp symmdifference symmetricp system take_channel take_inference tan' +
+ ' tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract' +
+ ' tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference' +
+ ' test_normality test_proportion test_proportions_difference test_rank_sum' +
+ ' test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display' +
+ ' texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter' +
+ ' toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep' +
+ ' totalfourier totient tpartpol trace tracematrix trace_options transform_sample' +
+ ' translate translate_file transpose treefale tree_reduce treillis treinat' +
+ ' triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate' +
+ ' truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph' +
+ ' truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget' +
+ ' ultraspherical underlying_graph undiff union unique uniteigenvectors unitp' +
+ ' units unit_step unitvector unorder unsum untellrat untimer' +
+ ' untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli' +
+ ' var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform' +
+ ' var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel' +
+ ' var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial' +
+ ' var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson' +
+ ' var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp' +
+ ' verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance' +
+ ' vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle' +
+ ' vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j' +
+ ' wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian' +
+ ' xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta' +
+ ' zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors' +
+ ' zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table' +
+ ' absboxchar activecontexts adapt_depth additive adim aform algebraic' +
+ ' algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic' +
+ ' animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar' +
+ ' asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top' +
+ ' azimuth background background_color backsubst berlefact bernstein_explicit' +
+ ' besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest' +
+ ' border boundaries_array box boxchar breakup %c capping cauchysum cbrange' +
+ ' cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics' +
+ ' colorbox columns commutative complex cone context contexts contour contour_levels' +
+ ' cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp' +
+ ' cube current_let_rule_package cylinder data_file_name debugmode decreasing' +
+ ' default_let_rule_package delay dependencies derivabbrev derivsubst detout' +
+ ' diagmetric diff dim dimensions dispflag display2d|10 display_format_internal' +
+ ' distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor' +
+ ' doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules' +
+ ' dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart' +
+ ' edge_color edge_coloring edge_partition edge_type edge_width %edispflag' +
+ ' elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer' +
+ ' epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type' +
+ ' %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand' +
+ ' expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine' +
+ ' factlim factorflag factorial_expand factors_only fb feature features' +
+ ' file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10' +
+ ' file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color' +
+ ' fill_density filled_func fixed_vertices flipflag float2bf font font_size' +
+ ' fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim' +
+ ' gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command' +
+ ' gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command' +
+ ' gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command' +
+ ' gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble' +
+ ' gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args' +
+ ' Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both' +
+ ' head_length head_type height hypergeometric_representation %iargs ibase' +
+ ' icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form' +
+ ' ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval' +
+ ' infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued' +
+ ' integrate_use_rootsof integration_constant integration_constant_counter interpolate_color' +
+ ' intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr' +
+ ' julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment' +
+ ' label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max' +
+ ' leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear' +
+ ' linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params' +
+ ' linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname' +
+ ' loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx' +
+ ' logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros' +
+ ' mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult' +
+ ' matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10' +
+ ' maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint' +
+ ' maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp' +
+ ' mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver' +
+ ' modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag' +
+ ' newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc' +
+ ' noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np' +
+ ' npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties' +
+ ' opsubst optimprefix optionset orientation origin orthopoly_returns_intervals' +
+ ' outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution' +
+ ' %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart' +
+ ' png_file pochhammer_max_index points pointsize point_size points_joined point_type' +
+ ' poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm' +
+ ' poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list' +
+ ' poly_secondary_elimination_order poly_top_reduction_only posfun position' +
+ ' powerdisp pred prederror primep_number_of_tests product_use_gamma program' +
+ ' programmode promote_float_to_bigfloat prompt proportional_axes props psexpand' +
+ ' ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof' +
+ ' ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann' +
+ ' ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw' +
+ ' refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs' +
+ ' rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy' +
+ ' same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck' +
+ ' setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width' +
+ ' show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type' +
+ ' show_vertices show_weight simp simplified_output simplify_products simpproduct' +
+ ' simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn' +
+ ' solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag' +
+ ' stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda' +
+ ' subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric' +
+ ' tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials' +
+ ' tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch' +
+ ' tr track transcompile transform transform_xy translate_fast_arrays transparent' +
+ ' transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex' +
+ ' tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign' +
+ ' trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars' +
+ ' tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode' +
+ ' tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes' +
+ ' ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble' +
+ ' usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition' +
+ ' vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface' +
+ ' wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel' +
+ ' xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate' +
+ ' xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel' +
+ ' xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width' +
+ ' ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis' +
+ ' ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis' +
+ ' yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob' +
+ ' zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest';
+ const SYMBOLS = '_ __ %|0 %%|0';
+
+ return {
+ name: 'Maxima',
+ keywords: {
+ $pattern: '[A-Za-z_%][0-9A-Za-z_%]*',
+ keyword: KEYWORDS,
+ literal: LITERALS,
+ built_in: BUILTIN_FUNCTIONS,
+ symbol: SYMBOLS
+ },
+ contains: [
+ {
+ className: 'comment',
+ begin: '/\\*',
+ end: '\\*/',
+ contains: [ 'self' ]
+ },
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'number',
+ relevance: 0,
+ variants: [
+ {
+ // float number w/ exponent
+ // hmm, I wonder if we ought to include other exponent markers?
+ begin: '\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b'
+ },
+ {
+ // bigfloat number
+ begin: '\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b',
+ relevance: 10
+ },
+ {
+ // float number w/out exponent
+ // Doesn't seem to recognize floats which start with '.'
+ begin: '\\b(\\.\\d+|\\d+\\.\\d+)\\b'
+ },
+ {
+ // integer in base up to 36
+ // Doesn't seem to recognize integers which end with '.'
+ begin: '\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b'
+ }
+ ]
+ }
+ ],
+ illegal: /@/
+ };
+}
+
+module.exports = maxima;
+
+
+/***/ }),
+
+/***/ 62872:
+/***/ ((module) => {
+
+/*
+Language: MEL
+Description: Maya Embedded Language
+Author: Shuen-Huei Guan
+Website: http://www.autodesk.com/products/autodesk-maya/overview
+Category: graphics
+*/
+
+function mel(hljs) {
+ return {
+ name: 'MEL',
+ keywords:
+ 'int float string vector matrix if else switch case default while do for in break ' +
+ 'continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic ' +
+ 'addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey ' +
+ 'affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve ' +
+ 'alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor ' +
+ 'animDisplay animView annotate appendStringArray applicationName applyAttrPreset ' +
+ 'applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx ' +
+ 'artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu ' +
+ 'artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand ' +
+ 'assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface ' +
+ 'attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu ' +
+ 'attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp ' +
+ 'attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery ' +
+ 'autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults ' +
+ 'bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership ' +
+ 'bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType ' +
+ 'boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu ' +
+ 'buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge ' +
+ 'cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch ' +
+ 'catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox ' +
+ 'character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp ' +
+ 'checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip ' +
+ 'clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore ' +
+ 'closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter ' +
+ 'cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color ' +
+ 'colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp ' +
+ 'colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem ' +
+ 'componentEditor compositingInterop computePolysetVolume condition cone confirmDialog ' +
+ 'connectAttr connectControl connectDynamic connectJoint connectionInfo constrain ' +
+ 'constrainValue constructionHistory container containsMultibyte contextInfo control ' +
+ 'convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation ' +
+ 'convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache ' +
+ 'cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel ' +
+ 'cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver ' +
+ 'cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor ' +
+ 'createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer ' +
+ 'createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse ' +
+ 'currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx ' +
+ 'curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface ' +
+ 'curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox ' +
+ 'defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete ' +
+ 'deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes ' +
+ 'delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo ' +
+ 'dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable ' +
+ 'disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected ' +
+ 'displayColor displayCull displayLevelOfDetail displayPref displayRGBColor ' +
+ 'displaySmoothness displayStats displayString displaySurface distanceDimContext ' +
+ 'distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct ' +
+ 'doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator ' +
+ 'duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression ' +
+ 'dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor ' +
+ 'dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers ' +
+ 'editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor ' +
+ 'editorTemplate effector emit emitter enableDevice encodeString endString endsWith env ' +
+ 'equivalent equivalentTol erf error eval evalDeferred evalEcho event ' +
+ 'exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp ' +
+ 'expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof ' +
+ 'fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo ' +
+ 'filetest filletCurve filter filterCurve filterExpand filterStudioImport ' +
+ 'findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster ' +
+ 'finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar ' +
+ 'floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo ' +
+ 'fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint ' +
+ 'frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss ' +
+ 'geometryConstraint getApplicationVersionAsFloat getAttr getClassification ' +
+ 'getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes ' +
+ 'getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender ' +
+ 'glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl ' +
+ 'gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid ' +
+ 'gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap ' +
+ 'HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor ' +
+ 'HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached ' +
+ 'HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel ' +
+ 'headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey ' +
+ 'hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender ' +
+ 'hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox ' +
+ 'iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ' +
+ 'ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ' +
+ 'ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform ' +
+ 'insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance ' +
+ 'instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp ' +
+ 'interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf ' +
+ 'isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect ' +
+ 'itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx ' +
+ 'jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner ' +
+ 'keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx ' +
+ 'keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx ' +
+ 'keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx ' +
+ 'keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor ' +
+ 'layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList ' +
+ 'lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep ' +
+ 'listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory ' +
+ 'listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation ' +
+ 'listNodeTypes listPanelCategories listRelatives listSets listTransforms ' +
+ 'listUnselected listerEditor loadFluid loadNewShelf loadPlugin ' +
+ 'loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log ' +
+ 'longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive ' +
+ 'makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext ' +
+ 'manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx ' +
+ 'manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout ' +
+ 'menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp ' +
+ 'mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move ' +
+ 'moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute ' +
+ 'nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast ' +
+ 'nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint ' +
+ 'normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect ' +
+ 'nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref ' +
+ 'nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType ' +
+ 'objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface ' +
+ 'offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit ' +
+ 'orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier ' +
+ 'paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration ' +
+ 'panelHistory paramDimContext paramDimension paramLocator parent parentConstraint ' +
+ 'particle particleExists particleInstancer particleRenderInfo partition pasteKey ' +
+ 'pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture ' +
+ 'pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo ' +
+ 'pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult ' +
+ 'pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend ' +
+ 'polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal ' +
+ 'polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge ' +
+ 'polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge ' +
+ 'polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet ' +
+ 'polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet ' +
+ 'polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection ' +
+ 'polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge ' +
+ 'polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet ' +
+ 'polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix ' +
+ 'polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut ' +
+ 'polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet ' +
+ 'polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge ' +
+ 'polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex ' +
+ 'polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection ' +
+ 'polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection ' +
+ 'polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint ' +
+ 'polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate ' +
+ 'polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge ' +
+ 'polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing ' +
+ 'polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet ' +
+ 'polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace ' +
+ 'popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer ' +
+ 'projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx ' +
+ 'propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd ' +
+ 'python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection ' +
+ 'radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl ' +
+ 'readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference ' +
+ 'referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE ' +
+ 'registerPluginResource rehash reloadImage removeJoint removeMultiInstance ' +
+ 'removePanelCategory rename renameAttr renameSelectionList renameUI render ' +
+ 'renderGlobalsNode renderInfo renderLayerButton renderLayerParent ' +
+ 'renderLayerPostProcess renderLayerUnparent renderManip renderPartition ' +
+ 'renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor ' +
+ 'renderWindowSelectContext renderer reorder reorderDeformers requires reroot ' +
+ 'resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget ' +
+ 'reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx ' +
+ 'rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout ' +
+ 'runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage ' +
+ 'saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale ' +
+ 'scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor ' +
+ 'sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable ' +
+ 'scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt ' +
+ 'searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey ' +
+ 'selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType ' +
+ 'selectedNodes selectionConnection separator setAttr setAttrEnumResource ' +
+ 'setAttrMapping setAttrNiceNameResource setConstraintRestPosition ' +
+ 'setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr ' +
+ 'setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe ' +
+ 'setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag ' +
+ 'setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject ' +
+ 'setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets ' +
+ 'shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare ' +
+ 'shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField ' +
+ 'shortNameOf showHelp showHidden showManipCtx showSelectionInTitle ' +
+ 'showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface ' +
+ 'size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep ' +
+ 'snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound ' +
+ 'soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort ' +
+ 'spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString ' +
+ 'startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp ' +
+ 'stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex ' +
+ 'stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex ' +
+ 'stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString ' +
+ 'stringToStringArray strip stripPrefixFromName stroke subdAutoProjection ' +
+ 'subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV ' +
+ 'subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror ' +
+ 'subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease ' +
+ 'subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring ' +
+ 'surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton ' +
+ 'symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext ' +
+ 'texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext ' +
+ 'texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text ' +
+ 'textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList ' +
+ 'textToShelf textureDisplacePlane textureHairColor texturePlacementContext ' +
+ 'textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath ' +
+ 'toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower ' +
+ 'toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper ' +
+ 'trace track trackCtx transferAttributes transformCompare transformLimits translator ' +
+ 'trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence ' +
+ 'twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit ' +
+ 'unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink ' +
+ 'uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane ' +
+ 'viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex ' +
+ 'waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire ' +
+ 'wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform',
+ illegal: '',
+ contains: [
+ hljs.C_NUMBER_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'string',
+ begin: '`',
+ end: '`',
+ contains: [ hljs.BACKSLASH_ESCAPE ]
+ },
+ { // eats variables
+ begin: /[$%@](\^\w\b|#\w+|[^\s\w{]|\{\w+\}|\w+)/
+ },
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ };
+}
+
+module.exports = mel;
+
+
+/***/ }),
+
+/***/ 19763:
+/***/ ((module) => {
+
+/*
+Language: Mercury
+Author: mucaho
+Description: Mercury is a logic/functional programming language which combines the clarity and expressiveness of declarative programming with advanced static analysis and error detection features.
+Website: https://www.mercurylang.org
+*/
+
+function mercury(hljs) {
+ const KEYWORDS = {
+ keyword:
+ 'module use_module import_module include_module end_module initialise ' +
+ 'mutable initialize finalize finalise interface implementation pred ' +
+ 'mode func type inst solver any_pred any_func is semidet det nondet ' +
+ 'multi erroneous failure cc_nondet cc_multi typeclass instance where ' +
+ 'pragma promise external trace atomic or_else require_complete_switch ' +
+ 'require_det require_semidet require_multi require_nondet ' +
+ 'require_cc_multi require_cc_nondet require_erroneous require_failure',
+ meta:
+ // pragma
+ 'inline no_inline type_spec source_file fact_table obsolete memo ' +
+ 'loop_check minimal_model terminates does_not_terminate ' +
+ 'check_termination promise_equivalent_clauses ' +
+ // preprocessor
+ 'foreign_proc foreign_decl foreign_code foreign_type ' +
+ 'foreign_import_module foreign_export_enum foreign_export ' +
+ 'foreign_enum may_call_mercury will_not_call_mercury thread_safe ' +
+ 'not_thread_safe maybe_thread_safe promise_pure promise_semipure ' +
+ 'tabled_for_io local untrailed trailed attach_to_io_state ' +
+ 'can_pass_as_mercury_type stable will_not_throw_exception ' +
+ 'may_modify_trail will_not_modify_trail may_duplicate ' +
+ 'may_not_duplicate affects_liveness does_not_affect_liveness ' +
+ 'doesnt_affect_liveness no_sharing unknown_sharing sharing',
+ built_in:
+ 'some all not if then else true fail false try catch catch_any ' +
+ 'semidet_true semidet_false semidet_fail impure_true impure semipure'
+ };
+
+ const COMMENT = hljs.COMMENT('%', '$');
+
+ const NUMCODE = {
+ className: 'number',
+ begin: "0'.\\|0[box][0-9a-fA-F]*"
+ };
+
+ const ATOM = hljs.inherit(hljs.APOS_STRING_MODE, {
+ relevance: 0
+ });
+ const STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ relevance: 0
+ });
+ const STRING_FMT = {
+ className: 'subst',
+ begin: '\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]',
+ relevance: 0
+ };
+ STRING.contains = STRING.contains.slice(); // we need our own copy of contains
+ STRING.contains.push(STRING_FMT);
+
+ const IMPLICATION = {
+ className: 'built_in',
+ variants: [
+ {
+ begin: '<=>'
+ },
+ {
+ begin: '<=',
+ relevance: 0
+ },
+ {
+ begin: '=>',
+ relevance: 0
+ },
+ {
+ begin: '/\\\\'
+ },
+ {
+ begin: '\\\\/'
+ }
+ ]
+ };
+
+ const HEAD_BODY_CONJUNCTION = {
+ className: 'built_in',
+ variants: [
+ {
+ begin: ':-\\|-->'
+ },
+ {
+ begin: '=',
+ relevance: 0
+ }
+ ]
+ };
+
+ return {
+ name: 'Mercury',
+ aliases: [
+ 'm',
+ 'moo'
+ ],
+ keywords: KEYWORDS,
+ contains: [
+ IMPLICATION,
+ HEAD_BODY_CONJUNCTION,
+ COMMENT,
+ hljs.C_BLOCK_COMMENT_MODE,
+ NUMCODE,
+ hljs.NUMBER_MODE,
+ ATOM,
+ STRING,
+ { // relevance booster
+ begin: /:-/
+ },
+ { // relevance booster
+ begin: /\.$/
+ }
+ ]
+ };
+}
+
+module.exports = mercury;
+
+
+/***/ }),
+
+/***/ 52340:
+/***/ ((module) => {
+
+/*
+Language: MIPS Assembly
+Author: Nebuleon Fumika
+Description: MIPS Assembly (up to MIPS32R2)
+Website: https://en.wikipedia.org/wiki/MIPS_architecture
+Category: assembler
+*/
+
+function mipsasm(hljs) {
+ // local labels: %?[FB]?[AT]?\d{1,2}\w+
+ return {
+ name: 'MIPS Assembly',
+ case_insensitive: true,
+ aliases: [ 'mips' ],
+ keywords: {
+ $pattern: '\\.?' + hljs.IDENT_RE,
+ meta:
+ // GNU preprocs
+ '.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ',
+ built_in:
+ '$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 ' + // integer registers
+ '$16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 ' + // integer registers
+ 'zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 ' + // integer register aliases
+ 't0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 ' + // integer register aliases
+ 'k0 k1 gp sp fp ra ' + // integer register aliases
+ '$f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 ' + // floating-point registers
+ '$f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 ' + // floating-point registers
+ 'Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi ' + // Coprocessor 0 registers
+ 'HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId ' + // Coprocessor 0 registers
+ 'EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ' + // Coprocessor 0 registers
+ 'ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt ' // Coprocessor 0 registers
+ },
+ contains: [
+ {
+ className: 'keyword',
+ begin: '\\b(' + // mnemonics
+ // 32-bit integer instructions
+ 'addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|' +
+ 'bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\\.hb)?|jr(\\.hb)?|lbu?|lhu?|' +
+ 'll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|' +
+ 'multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|' +
+ 'srlv?|subu?|sw[lr]?|xori?|wsbh|' +
+ // floating-point instructions
+ 'abs\\.[sd]|add\\.[sd]|alnv.ps|bc1[ft]l?|' +
+ 'c\\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\\.[sd]|' +
+ '(ceil|floor|round|trunc)\\.[lw]\\.[sd]|cfc1|cvt\\.d\\.[lsw]|' +
+ 'cvt\\.l\\.[dsw]|cvt\\.ps\\.s|cvt\\.s\\.[dlw]|cvt\\.s\\.p[lu]|cvt\\.w\\.[dls]|' +
+ 'div\\.[ds]|ldx?c1|luxc1|lwx?c1|madd\\.[sd]|mfc1|mov[fntz]?\\.[ds]|' +
+ 'msub\\.[sd]|mth?c1|mul\\.[ds]|neg\\.[ds]|nmadd\\.[ds]|nmsub\\.[ds]|' +
+ 'p[lu][lu]\\.ps|recip\\.fmt|r?sqrt\\.[ds]|sdx?c1|sub\\.[ds]|suxc1|' +
+ 'swx?c1|' +
+ // system control instructions
+ 'break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|' +
+ 'rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|' +
+ 'tlti?u?|tnei?|wait|wrpgpr' +
+ ')',
+ end: '\\s'
+ },
+ // lines ending with ; or # aren't really comments, probably auto-detect fail
+ hljs.COMMENT('[;#](?!\\s*$)', '$'),
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'string',
+ begin: '\'',
+ end: '[^\\\\]\'',
+ relevance: 0
+ },
+ {
+ className: 'title',
+ begin: '\\|',
+ end: '\\|',
+ illegal: '\\n',
+ relevance: 0
+ },
+ {
+ className: 'number',
+ variants: [
+ { // hex
+ begin: '0x[0-9a-f]+'
+ },
+ { // bare number
+ begin: '\\b-?\\d+'
+ }
+ ],
+ relevance: 0
+ },
+ {
+ className: 'symbol',
+ variants: [
+ { // GNU MIPS syntax
+ begin: '^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:'
+ },
+ { // numbered local labels
+ begin: '^\\s*[0-9]+:'
+ },
+ { // number local label reference (backwards, forwards)
+ begin: '[0-9]+[bf]'
+ }
+ ],
+ relevance: 0
+ }
+ ],
+ // forward slashes are not allowed
+ illegal: /\//
+ };
+}
+
+module.exports = mipsasm;
+
+
+/***/ }),
+
+/***/ 14825:
+/***/ ((module) => {
+
+/*
+Language: Mizar
+Description: The Mizar Language is a formal language derived from the mathematical vernacular.
+Author: Kelley van Evert
+Website: http://mizar.org/language/
+Category: scientific
+*/
+
+function mizar(hljs) {
+ return {
+ name: 'Mizar',
+ keywords:
+ 'environ vocabularies notations constructors definitions ' +
+ 'registrations theorems schemes requirements begin end definition ' +
+ 'registration cluster existence pred func defpred deffunc theorem ' +
+ 'proof let take assume then thus hence ex for st holds consider ' +
+ 'reconsider such that and in provided of as from be being by means ' +
+ 'equals implies iff redefine define now not or attr is mode ' +
+ 'suppose per cases set thesis contradiction scheme reserve struct ' +
+ 'correctness compatibility coherence symmetry assymetry ' +
+ 'reflexivity irreflexivity connectedness uniqueness commutativity ' +
+ 'idempotence involutiveness projectivity',
+ contains: [
+ hljs.COMMENT('::', '$')
+ ]
+ };
+}
+
+module.exports = mizar;
+
+
+/***/ }),
+
+/***/ 29027:
+/***/ ((module) => {
+
+/*
+Language: Mojolicious
+Requires: xml.js, perl.js
+Author: Dotan Dimet
+Description: Mojolicious .ep (Embedded Perl) templates
+Website: https://mojolicious.org
+Category: template
+*/
+function mojolicious(hljs) {
+ return {
+ name: 'Mojolicious',
+ subLanguage: 'xml',
+ contains: [
+ {
+ className: 'meta',
+ begin: '^__(END|DATA)__$'
+ },
+ // mojolicious line
+ {
+ begin: "^\\s*%{1,2}={0,2}",
+ end: '$',
+ subLanguage: 'perl'
+ },
+ // mojolicious block
+ {
+ begin: "<%{1,2}={0,2}",
+ end: "={0,1}%>",
+ subLanguage: 'perl',
+ excludeBegin: true,
+ excludeEnd: true
+ }
+ ]
+ };
+}
+
+module.exports = mojolicious;
+
+
+/***/ }),
+
+/***/ 9853:
+/***/ ((module) => {
+
+/*
+Language: Monkey
+Description: Monkey2 is an easy to use, cross platform, games oriented programming language from Blitz Research.
+Author: Arthur Bikmullin
+Website: https://blitzresearch.itch.io/monkey2
+*/
+
+function monkey(hljs) {
+ const NUMBER = {
+ className: 'number',
+ relevance: 0,
+ variants: [
+ {
+ begin: '[$][a-fA-F0-9]+'
+ },
+ hljs.NUMBER_MODE
+ ]
+ };
+
+ return {
+ name: 'Monkey',
+ case_insensitive: true,
+ keywords: {
+ keyword: 'public private property continue exit extern new try catch ' +
+ 'eachin not abstract final select case default const local global field ' +
+ 'end if then else elseif endif while wend repeat until forever for ' +
+ 'to step next return module inline throw import',
+
+ built_in: 'DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil ' +
+ 'Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI',
+
+ literal: 'true false null and or shl shr mod'
+ },
+ illegal: /\/\*/,
+ contains: [
+ hljs.COMMENT('#rem', '#end'),
+ hljs.COMMENT(
+ "'",
+ '$',
+ {
+ relevance: 0
+ }
+ ),
+ {
+ className: 'function',
+ beginKeywords: 'function method',
+ end: '[(=:]|$',
+ illegal: /\n/,
+ contains: [ hljs.UNDERSCORE_TITLE_MODE ]
+ },
+ {
+ className: 'class',
+ beginKeywords: 'class interface',
+ end: '$',
+ contains: [
+ {
+ beginKeywords: 'extends implements'
+ },
+ hljs.UNDERSCORE_TITLE_MODE
+ ]
+ },
+ {
+ className: 'built_in',
+ begin: '\\b(self|super)\\b'
+ },
+ {
+ className: 'meta',
+ begin: '\\s*#',
+ end: '$',
+ keywords: {
+ 'meta-keyword': 'if else elseif endif end then'
+ }
+ },
+ {
+ className: 'meta',
+ begin: '^\\s*strict\\b'
+ },
+ {
+ beginKeywords: 'alias',
+ end: '=',
+ contains: [ hljs.UNDERSCORE_TITLE_MODE ]
+ },
+ hljs.QUOTE_STRING_MODE,
+ NUMBER
+ ]
+ };
+}
+
+module.exports = monkey;
+
+
+/***/ }),
+
+/***/ 15250:
+/***/ ((module) => {
+
+/*
+Language: MoonScript
+Author: Billy Quith
+Description: MoonScript is a programming language that transcompiles to Lua.
+Origin: coffeescript.js
+Website: http://moonscript.org/
+Category: scripting
+*/
+
+function moonscript(hljs) {
+ const KEYWORDS = {
+ keyword:
+ // Moonscript keywords
+ 'if then not for in while do return else elseif break continue switch and or ' +
+ 'unless when class extends super local import export from using',
+ literal:
+ 'true false nil',
+ built_in:
+ '_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load ' +
+ 'loadfile loadstring module next pairs pcall print rawequal rawget rawset require ' +
+ 'select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug ' +
+ 'io math os package string table'
+ };
+ const JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
+ const SUBST = {
+ className: 'subst',
+ begin: /#\{/,
+ end: /\}/,
+ keywords: KEYWORDS
+ };
+ const EXPRESSIONS = [
+ hljs.inherit(hljs.C_NUMBER_MODE,
+ {
+ starts: {
+ end: '(\\s*/)?',
+ relevance: 0
+ }
+ }), // a number tries to eat the following slash to prevent treating it as a regexp
+ {
+ className: 'string',
+ variants: [
+ {
+ begin: /'/,
+ end: /'/,
+ contains: [ hljs.BACKSLASH_ESCAPE ]
+ },
+ {
+ begin: /"/,
+ end: /"/,
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST
+ ]
+ }
+ ]
+ },
+ {
+ className: 'built_in',
+ begin: '@__' + hljs.IDENT_RE
+ },
+ {
+ begin: '@' + hljs.IDENT_RE // relevance booster on par with CoffeeScript
+ },
+ {
+ begin: hljs.IDENT_RE + '\\\\' + hljs.IDENT_RE // inst\method
+ }
+ ];
+ SUBST.contains = EXPRESSIONS;
+
+ const TITLE = hljs.inherit(hljs.TITLE_MODE, {
+ begin: JS_IDENT_RE
+ });
+ const POSSIBLE_PARAMS_RE = '(\\(.*\\)\\s*)?\\B[-=]>';
+ const PARAMS = {
+ className: 'params',
+ begin: '\\([^\\(]',
+ returnBegin: true,
+ /* We need another contained nameless mode to not have every nested
+ pair of parens to be called "params" */
+ contains: [
+ {
+ begin: /\(/,
+ end: /\)/,
+ keywords: KEYWORDS,
+ contains: [ 'self' ].concat(EXPRESSIONS)
+ }
+ ]
+ };
+
+ return {
+ name: 'MoonScript',
+ aliases: [ 'moon' ],
+ keywords: KEYWORDS,
+ illegal: /\/\*/,
+ contains: EXPRESSIONS.concat([
+ hljs.COMMENT('--', '$'),
+ {
+ className: 'function', // function: -> =>
+ begin: '^\\s*' + JS_IDENT_RE + '\\s*=\\s*' + POSSIBLE_PARAMS_RE,
+ end: '[-=]>',
+ returnBegin: true,
+ contains: [
+ TITLE,
+ PARAMS
+ ]
+ },
+ {
+ begin: /[\(,:=]\s*/, // anonymous function start
+ relevance: 0,
+ contains: [
+ {
+ className: 'function',
+ begin: POSSIBLE_PARAMS_RE,
+ end: '[-=]>',
+ returnBegin: true,
+ contains: [ PARAMS ]
+ }
+ ]
+ },
+ {
+ className: 'class',
+ beginKeywords: 'class',
+ end: '$',
+ illegal: /[:="\[\]]/,
+ contains: [
+ {
+ beginKeywords: 'extends',
+ endsWithParent: true,
+ illegal: /[:="\[\]]/,
+ contains: [ TITLE ]
+ },
+ TITLE
+ ]
+ },
+ {
+ className: 'name', // table
+ begin: JS_IDENT_RE + ':',
+ end: ':',
+ returnBegin: true,
+ returnEnd: true,
+ relevance: 0
+ }
+ ])
+ };
+}
+
+module.exports = moonscript;
+
+
+/***/ }),
+
+/***/ 74620:
+/***/ ((module) => {
+
+/*
+ Language: N1QL
+ Author: Andres Täht
+ Contributors: Rene Saarsoo
+ Description: Couchbase query language
+ Website: https://www.couchbase.com/products/n1ql
+ */
+
+function n1ql(hljs) {
+ return {
+ name: 'N1QL',
+ case_insensitive: true,
+ contains: [
+ {
+ beginKeywords:
+ 'build create index delete drop explain infer|10 insert merge prepare select update upsert|10',
+ end: /;/, endsWithParent: true,
+ keywords: {
+ // Taken from http://developer.couchbase.com/documentation/server/current/n1ql/n1ql-language-reference/reservedwords.html
+ keyword:
+ 'all alter analyze and any array as asc begin between binary boolean break bucket build by call ' +
+ 'case cast cluster collate collection commit connect continue correlate cover create database ' +
+ 'dataset datastore declare decrement delete derived desc describe distinct do drop each element ' +
+ 'else end every except exclude execute exists explain fetch first flatten for force from ' +
+ 'function grant group gsi having if ignore ilike in include increment index infer inline inner ' +
+ 'insert intersect into is join key keys keyspace known last left let letting like limit lsm map ' +
+ 'mapping matched materialized merge minus namespace nest not number object offset on ' +
+ 'option or order outer over parse partition password path pool prepare primary private privilege ' +
+ 'procedure public raw realm reduce rename return returning revoke right role rollback satisfies ' +
+ 'schema select self semi set show some start statistics string system then to transaction trigger ' +
+ 'truncate under union unique unknown unnest unset update upsert use user using validate value ' +
+ 'valued values via view when where while with within work xor',
+ // Taken from http://developer.couchbase.com/documentation/server/4.5/n1ql/n1ql-language-reference/literals.html
+ literal:
+ 'true false null missing|5',
+ // Taken from http://developer.couchbase.com/documentation/server/4.5/n1ql/n1ql-language-reference/functions.html
+ built_in:
+ 'array_agg array_append array_concat array_contains array_count array_distinct array_ifnull array_length ' +
+ 'array_max array_min array_position array_prepend array_put array_range array_remove array_repeat array_replace ' +
+ 'array_reverse array_sort array_sum avg count max min sum greatest least ifmissing ifmissingornull ifnull ' +
+ 'missingif nullif ifinf ifnan ifnanorinf naninf neginfif posinfif clock_millis clock_str date_add_millis ' +
+ 'date_add_str date_diff_millis date_diff_str date_part_millis date_part_str date_trunc_millis date_trunc_str ' +
+ 'duration_to_str millis str_to_millis millis_to_str millis_to_utc millis_to_zone_name now_millis now_str ' +
+ 'str_to_duration str_to_utc str_to_zone_name decode_json encode_json encoded_size poly_length base64 base64_encode ' +
+ 'base64_decode meta uuid abs acos asin atan atan2 ceil cos degrees e exp ln log floor pi power radians random ' +
+ 'round sign sin sqrt tan trunc object_length object_names object_pairs object_inner_pairs object_values ' +
+ 'object_inner_values object_add object_put object_remove object_unwrap regexp_contains regexp_like regexp_position ' +
+ 'regexp_replace contains initcap length lower ltrim position repeat replace rtrim split substr title trim upper ' +
+ 'isarray isatom isboolean isnumber isobject isstring type toarray toatom toboolean tonumber toobject tostring'
+ },
+ contains: [
+ {
+ className: 'string',
+ begin: '\'', end: '\'',
+ contains: [hljs.BACKSLASH_ESCAPE]
+ },
+ {
+ className: 'string',
+ begin: '"', end: '"',
+ contains: [hljs.BACKSLASH_ESCAPE]
+ },
+ {
+ className: 'symbol',
+ begin: '`', end: '`',
+ contains: [hljs.BACKSLASH_ESCAPE],
+ relevance: 2
+ },
+ hljs.C_NUMBER_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ },
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ };
+}
+
+module.exports = n1ql;
+
+
+/***/ }),
+
+/***/ 27158:
+/***/ ((module) => {
+
+/*
+Language: Nginx config
+Author: Peter Leonov
+Contributors: Ivan Sagalaev
+Category: common, config
+Website: https://www.nginx.com
+*/
+
+function nginx(hljs) {
+ const VAR = {
+ className: 'variable',
+ variants: [
+ {
+ begin: /\$\d+/
+ },
+ {
+ begin: /\$\{/,
+ end: /\}/
+ },
+ {
+ begin: /[$@]/ + hljs.UNDERSCORE_IDENT_RE
+ }
+ ]
+ };
+ const DEFAULT = {
+ endsWithParent: true,
+ keywords: {
+ $pattern: '[a-z/_]+',
+ literal:
+ 'on off yes no true false none blocked debug info notice warn error crit ' +
+ 'select break last permanent redirect kqueue rtsig epoll poll /dev/poll'
+ },
+ relevance: 0,
+ illegal: '=>',
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ {
+ className: 'string',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ VAR
+ ],
+ variants: [
+ {
+ begin: /"/,
+ end: /"/
+ },
+ {
+ begin: /'/,
+ end: /'/
+ }
+ ]
+ },
+ // this swallows entire URLs to avoid detecting numbers within
+ {
+ begin: '([a-z]+):/',
+ end: '\\s',
+ endsWithParent: true,
+ excludeEnd: true,
+ contains: [ VAR ]
+ },
+ {
+ className: 'regexp',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ VAR
+ ],
+ variants: [
+ {
+ begin: "\\s\\^",
+ end: "\\s|\\{|;",
+ returnEnd: true
+ },
+ // regexp locations (~, ~*)
+ {
+ begin: "~\\*?\\s+",
+ end: "\\s|\\{|;",
+ returnEnd: true
+ },
+ // *.example.com
+ {
+ begin: "\\*(\\.[a-z\\-]+)+"
+ },
+ // sub.example.*
+ {
+ begin: "([a-z\\-]+\\.)+\\*"
+ }
+ ]
+ },
+ // IP
+ {
+ className: 'number',
+ begin: '\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b'
+ },
+ // units
+ {
+ className: 'number',
+ begin: '\\b\\d+[kKmMgGdshdwy]*\\b',
+ relevance: 0
+ },
+ VAR
+ ]
+ };
+
+ return {
+ name: 'Nginx config',
+ aliases: [ 'nginxconf' ],
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ {
+ begin: hljs.UNDERSCORE_IDENT_RE + '\\s+\\{',
+ returnBegin: true,
+ end: /\{/,
+ contains: [
+ {
+ className: 'section',
+ begin: hljs.UNDERSCORE_IDENT_RE
+ }
+ ],
+ relevance: 0
+ },
+ {
+ begin: hljs.UNDERSCORE_IDENT_RE + '\\s',
+ end: ';|\\{',
+ returnBegin: true,
+ contains: [
+ {
+ className: 'attribute',
+ begin: hljs.UNDERSCORE_IDENT_RE,
+ starts: DEFAULT
+ }
+ ],
+ relevance: 0
+ }
+ ],
+ illegal: '[^\\s\\}]'
+ };
+}
+
+module.exports = nginx;
+
+
+/***/ }),
+
+/***/ 52478:
+/***/ ((module) => {
+
+/*
+Language: Nim
+Description: Nim is a statically typed compiled systems programming language.
+Website: https://nim-lang.org
+Category: system
+*/
+
+function nim(hljs) {
+ return {
+ name: 'Nim',
+ keywords: {
+ keyword:
+ 'addr and as asm bind block break case cast const continue converter ' +
+ 'discard distinct div do elif else end enum except export finally ' +
+ 'for from func generic if import in include interface is isnot iterator ' +
+ 'let macro method mixin mod nil not notin object of or out proc ptr ' +
+ 'raise ref return shl shr static template try tuple type using var ' +
+ 'when while with without xor yield',
+ literal:
+ 'shared guarded stdin stdout stderr result true false',
+ built_in:
+ 'int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float ' +
+ 'float32 float64 bool char string cstring pointer expr stmt void ' +
+ 'auto any range array openarray varargs seq set clong culong cchar ' +
+ 'cschar cshort cint csize clonglong cfloat cdouble clongdouble ' +
+ 'cuchar cushort cuint culonglong cstringarray semistatic'
+ },
+ contains: [
+ {
+ className: 'meta', // Actually pragma
+ begin: /\{\./,
+ end: /\.\}/,
+ relevance: 10
+ },
+ {
+ className: 'string',
+ begin: /[a-zA-Z]\w*"/,
+ end: /"/,
+ contains: [
+ {
+ begin: /""/
+ }
+ ]
+ },
+ {
+ className: 'string',
+ begin: /([a-zA-Z]\w*)?"""/,
+ end: /"""/
+ },
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'type',
+ begin: /\b[A-Z]\w+\b/,
+ relevance: 0
+ },
+ {
+ className: 'number',
+ relevance: 0,
+ variants: [
+ {
+ begin: /\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/
+ },
+ {
+ begin: /\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/
+ },
+ {
+ begin: /\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/
+ },
+ {
+ begin: /\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/
+ }
+ ]
+ },
+ hljs.HASH_COMMENT_MODE
+ ]
+ };
+}
+
+module.exports = nim;
+
+
+/***/ }),
+
+/***/ 14608:
+/***/ ((module) => {
+
+/*
+Language: Node REPL
+Requires: javascript.js
+Author: Marat Nagayev
+Category: scripting
+*/
+
+/** @type LanguageFn */
+function nodeRepl(hljs) {
+ return {
+ name: 'Node REPL',
+ contains: [
+ {
+ className: 'meta',
+ starts: {
+ // a space separates the REPL prefix from the actual code
+ // this is purely for cleaner HTML output
+ end: / |$/,
+ starts: {
+ end: '$',
+ subLanguage: 'javascript'
+ }
+ },
+ variants: [
+ {
+ begin: /^>(?=[ ]|$)/
+ },
+ {
+ begin: /^\.\.\.(?=[ ]|$)/
+ }
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = nodeRepl;
+
+
+/***/ }),
+
+/***/ 76035:
+/***/ ((module) => {
+
+/*
+Language: NSIS
+Description: Nullsoft Scriptable Install System
+Author: Jan T. Sott
+Website: https://nsis.sourceforge.io/Main_Page
+*/
+
+function nsis(hljs) {
+ const CONSTANTS = {
+ className: 'variable',
+ begin: /\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)/
+ };
+
+ const DEFINES = {
+ // ${defines}
+ className: 'variable',
+ begin: /\$+\{[\w.:-]+\}/
+ };
+
+ const VARIABLES = {
+ // $variables
+ className: 'variable',
+ begin: /\$+\w+/,
+ illegal: /\(\)\{\}/
+ };
+
+ const LANGUAGES = {
+ // $(language_strings)
+ className: 'variable',
+ begin: /\$+\([\w^.:-]+\)/
+ };
+
+ const PARAMETERS = {
+ // command parameters
+ className: 'params',
+ begin: '(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)'
+ };
+
+ const COMPILER = {
+ // !compiler_flags
+ className: 'keyword',
+ begin: /!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|searchparse|searchreplace|system|tempfile|undef|verbose|warning)/
+ };
+
+ const METACHARS = {
+ // $\n, $\r, $\t, $$
+ className: 'meta',
+ begin: /\$(\\[nrt]|\$)/
+ };
+
+ const PLUGINS = {
+ // plug::ins
+ className: 'class',
+ begin: /\w+::\w+/
+ };
+
+ const STRING = {
+ className: 'string',
+ variants: [
+ {
+ begin: '"',
+ end: '"'
+ },
+ {
+ begin: '\'',
+ end: '\''
+ },
+ {
+ begin: '`',
+ end: '`'
+ }
+ ],
+ illegal: /\n/,
+ contains: [
+ METACHARS,
+ CONSTANTS,
+ DEFINES,
+ VARIABLES,
+ LANGUAGES
+ ]
+ };
+
+ return {
+ name: 'NSIS',
+ case_insensitive: false,
+ keywords: {
+ keyword:
+ 'Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecShellWait ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileWriteUTF16LE FileSeek FileWrite FileWriteByte FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetKnownFolderPath GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfRtlLanguage IfShellVarContextAll IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText Int64Cmp Int64CmpU Int64Fmt IntCmp IntCmpU IntFmt IntOp IntPtrCmp IntPtrCmpU IntPtrOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadAndSetImage LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestLongPathAware ManifestMaxVersionTested ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PEAddResource PEDllCharacteristics PERemoveResource PESubsysVer Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegMultiStr WriteRegNone WriteRegStr WriteUninstaller XPStyle',
+ literal:
+ 'admin all auto both bottom bzip2 colored components current custom directory false force hide highest ifdiff ifnewer instfiles lastused leave left license listonly lzma nevershow none normal notset off on open print right show silent silentlog smooth textonly top true try un.components un.custom un.directory un.instfiles un.license uninstConfirm user Win10 Win7 Win8 WinVista zlib'
+ },
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.COMMENT(
+ ';',
+ '$',
+ {
+ relevance: 0
+ }
+ ),
+ {
+ className: 'function',
+ beginKeywords: 'Function PageEx Section SectionGroup',
+ end: '$'
+ },
+ STRING,
+ COMPILER,
+ DEFINES,
+ VARIABLES,
+ LANGUAGES,
+ PARAMETERS,
+ PLUGINS,
+ hljs.NUMBER_MODE
+ ]
+ };
+}
+
+module.exports = nsis;
+
+
+/***/ }),
+
+/***/ 92748:
+/***/ ((module) => {
+
+/*
+Language: Objective-C
+Author: Valerii Hiora
+Contributors: Angel G. Olloqui , Matt Diephouse , Andrew Farmer , Minh Nguyễn
+Website: https://developer.apple.com/documentation/objectivec
+Category: common
+*/
+
+function objectivec(hljs) {
+ const API_CLASS = {
+ className: 'built_in',
+ begin: '\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+'
+ };
+ const IDENTIFIER_RE = /[a-zA-Z@][a-zA-Z0-9_]*/;
+ const OBJC_KEYWORDS = {
+ $pattern: IDENTIFIER_RE,
+ keyword:
+ 'int float while char export sizeof typedef const struct for union ' +
+ 'unsigned long volatile static bool mutable if do return goto void ' +
+ 'enum else break extern asm case short default double register explicit ' +
+ 'signed typename this switch continue wchar_t inline readonly assign ' +
+ 'readwrite self @synchronized id typeof ' +
+ 'nonatomic super unichar IBOutlet IBAction strong weak copy ' +
+ 'in out inout bycopy byref oneway __strong __weak __block __autoreleasing ' +
+ '@private @protected @public @try @property @end @throw @catch @finally ' +
+ '@autoreleasepool @synthesize @dynamic @selector @optional @required ' +
+ '@encode @package @import @defs @compatibility_alias ' +
+ '__bridge __bridge_transfer __bridge_retained __bridge_retain ' +
+ '__covariant __contravariant __kindof ' +
+ '_Nonnull _Nullable _Null_unspecified ' +
+ '__FUNCTION__ __PRETTY_FUNCTION__ __attribute__ ' +
+ 'getter setter retain unsafe_unretained ' +
+ 'nonnull nullable null_unspecified null_resettable class instancetype ' +
+ 'NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER ' +
+ 'NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED ' +
+ 'NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE ' +
+ 'NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END ' +
+ 'NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW ' +
+ 'NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN',
+ literal:
+ 'false true FALSE TRUE nil YES NO NULL',
+ built_in:
+ 'BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once'
+ };
+ const CLASS_KEYWORDS = {
+ $pattern: IDENTIFIER_RE,
+ keyword: '@interface @class @protocol @implementation'
+ };
+ return {
+ name: 'Objective-C',
+ aliases: [
+ 'mm',
+ 'objc',
+ 'obj-c',
+ 'obj-c++',
+ 'objective-c++'
+ ],
+ keywords: OBJC_KEYWORDS,
+ illegal: '',
+ contains: [
+ API_CLASS,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.C_NUMBER_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ {
+ className: 'string',
+ variants: [
+ {
+ begin: '@"',
+ end: '"',
+ illegal: '\\n',
+ contains: [ hljs.BACKSLASH_ESCAPE ]
+ }
+ ]
+ },
+ {
+ className: 'meta',
+ begin: /#\s*[a-z]+\b/,
+ end: /$/,
+ keywords: {
+ 'meta-keyword':
+ 'if else elif endif define undef warning error line ' +
+ 'pragma ifdef ifndef include'
+ },
+ contains: [
+ {
+ begin: /\\\n/,
+ relevance: 0
+ },
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ className: 'meta-string'
+ }),
+ {
+ className: 'meta-string',
+ begin: /<.*?>/,
+ end: /$/,
+ illegal: '\\n'
+ },
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ },
+ {
+ className: 'class',
+ begin: '(' + CLASS_KEYWORDS.keyword.split(' ').join('|') + ')\\b',
+ end: /(\{|$)/,
+ excludeEnd: true,
+ keywords: CLASS_KEYWORDS,
+ contains: [ hljs.UNDERSCORE_TITLE_MODE ]
+ },
+ {
+ begin: '\\.' + hljs.UNDERSCORE_IDENT_RE,
+ relevance: 0
+ }
+ ]
+ };
+}
+
+module.exports = objectivec;
+
+
+/***/ }),
+
+/***/ 8590:
+/***/ ((module) => {
+
+/*
+Language: OCaml
+Author: Mehdi Dogguy
+Contributors: Nicolas Braud-Santoni , Mickael Delahaye
+Description: OCaml language definition.
+Website: https://ocaml.org
+Category: functional
+*/
+
+function ocaml(hljs) {
+ /* missing support for heredoc-like string (OCaml 4.0.2+) */
+ return {
+ name: 'OCaml',
+ aliases: ['ml'],
+ keywords: {
+ $pattern: '[a-z_]\\w*!?',
+ keyword:
+ 'and as assert asr begin class constraint do done downto else end ' +
+ 'exception external for fun function functor if in include ' +
+ 'inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method ' +
+ 'mod module mutable new object of open! open or private rec sig struct ' +
+ 'then to try type val! val virtual when while with ' +
+ /* camlp4 */
+ 'parser value',
+ built_in:
+ /* built-in types */
+ 'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit ' +
+ /* (some) types in Pervasives */
+ 'in_channel out_channel ref',
+ literal:
+ 'true false'
+ },
+ illegal: /\/\/|>>/,
+ contains: [
+ {
+ className: 'literal',
+ begin: '\\[(\\|\\|)?\\]|\\(\\)',
+ relevance: 0
+ },
+ hljs.COMMENT(
+ '\\(\\*',
+ '\\*\\)',
+ {
+ contains: ['self']
+ }
+ ),
+ { /* type variable */
+ className: 'symbol',
+ begin: '\'[A-Za-z_](?!\')[\\w\']*'
+ /* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */
+ },
+ { /* polymorphic variant */
+ className: 'type',
+ begin: '`[A-Z][\\w\']*'
+ },
+ { /* module or constructor */
+ className: 'type',
+ begin: '\\b[A-Z][\\w\']*',
+ relevance: 0
+ },
+ { /* don't color identifiers, but safely catch all identifiers with '*/
+ begin: '[a-z_]\\w*\'[\\w\']*', relevance: 0
+ },
+ hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
+ {
+ className: 'number',
+ begin:
+ '\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +
+ '0[oO][0-7_]+[Lln]?|' +
+ '0[bB][01_]+[Lln]?|' +
+ '[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)',
+ relevance: 0
+ },
+ {
+ begin: /->/ // relevance booster
+ }
+ ]
+ }
+}
+
+module.exports = ocaml;
+
+
+/***/ }),
+
+/***/ 76055:
+/***/ ((module) => {
+
+/*
+Language: OpenSCAD
+Author: Dan Panzarella
+Description: OpenSCAD is a language for the 3D CAD modeling software of the same name.
+Website: https://www.openscad.org
+Category: scientific
+*/
+
+function openscad(hljs) {
+ const SPECIAL_VARS = {
+ className: 'keyword',
+ begin: '\\$(f[asn]|t|vp[rtd]|children)'
+ };
+ const LITERALS = {
+ className: 'literal',
+ begin: 'false|true|PI|undef'
+ };
+ const NUMBERS = {
+ className: 'number',
+ begin: '\\b\\d+(\\.\\d+)?(e-?\\d+)?', // adds 1e5, 1e-10
+ relevance: 0
+ };
+ const STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ illegal: null
+ });
+ const PREPRO = {
+ className: 'meta',
+ keywords: {
+ 'meta-keyword': 'include use'
+ },
+ begin: 'include|use <',
+ end: '>'
+ };
+ const PARAMS = {
+ className: 'params',
+ begin: '\\(',
+ end: '\\)',
+ contains: [
+ 'self',
+ NUMBERS,
+ STRING,
+ SPECIAL_VARS,
+ LITERALS
+ ]
+ };
+ const MODIFIERS = {
+ begin: '[*!#%]',
+ relevance: 0
+ };
+ const FUNCTIONS = {
+ className: 'function',
+ beginKeywords: 'module function',
+ end: /=|\{/,
+ contains: [
+ PARAMS,
+ hljs.UNDERSCORE_TITLE_MODE
+ ]
+ };
+
+ return {
+ name: 'OpenSCAD',
+ aliases: [ 'scad' ],
+ keywords: {
+ keyword: 'function module include use for intersection_for if else \\%',
+ literal: 'false true PI undef',
+ built_in: 'circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign'
+ },
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ NUMBERS,
+ PREPRO,
+ STRING,
+ SPECIAL_VARS,
+ MODIFIERS,
+ FUNCTIONS
+ ]
+ };
+}
+
+module.exports = openscad;
+
+
+/***/ }),
+
+/***/ 51333:
+/***/ ((module) => {
+
+/*
+Language: Oxygene
+Author: Carlo Kok
+Description: Oxygene is built on the foundation of Object Pascal, revamped and extended to be a modern language for the twenty-first century.
+Website: https://www.elementscompiler.com/elements/default.aspx
+*/
+
+function oxygene(hljs) {
+ const OXYGENE_KEYWORDS = {
+ $pattern: /\.?\w+/,
+ keyword:
+ 'abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue ' +
+ 'create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false ' +
+ 'final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited ' +
+ 'inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of ' +
+ 'old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly ' +
+ 'record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple ' +
+ 'type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal ' +
+ 'register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained'
+ };
+ const CURLY_COMMENT = hljs.COMMENT(
+ /\{/,
+ /\}/,
+ {
+ relevance: 0
+ }
+ );
+ const PAREN_COMMENT = hljs.COMMENT(
+ '\\(\\*',
+ '\\*\\)',
+ {
+ relevance: 10
+ }
+ );
+ const STRING = {
+ className: 'string',
+ begin: '\'',
+ end: '\'',
+ contains: [
+ {
+ begin: '\'\''
+ }
+ ]
+ };
+ const CHAR_STRING = {
+ className: 'string',
+ begin: '(#\\d+)+'
+ };
+ const FUNCTION = {
+ className: 'function',
+ beginKeywords: 'function constructor destructor procedure method',
+ end: '[:;]',
+ keywords: 'function constructor|10 destructor|10 procedure|10 method|10',
+ contains: [
+ hljs.TITLE_MODE,
+ {
+ className: 'params',
+ begin: '\\(',
+ end: '\\)',
+ keywords: OXYGENE_KEYWORDS,
+ contains: [
+ STRING,
+ CHAR_STRING
+ ]
+ },
+ CURLY_COMMENT,
+ PAREN_COMMENT
+ ]
+ };
+ return {
+ name: 'Oxygene',
+ case_insensitive: true,
+ keywords: OXYGENE_KEYWORDS,
+ illegal: '("|\\$[G-Zg-z]|\\/\\*||=>|->)',
+ contains: [
+ CURLY_COMMENT,
+ PAREN_COMMENT,
+ hljs.C_LINE_COMMENT_MODE,
+ STRING,
+ CHAR_STRING,
+ hljs.NUMBER_MODE,
+ FUNCTION,
+ {
+ className: 'class',
+ begin: '=\\bclass\\b',
+ end: 'end;',
+ keywords: OXYGENE_KEYWORDS,
+ contains: [
+ STRING,
+ CHAR_STRING,
+ CURLY_COMMENT,
+ PAREN_COMMENT,
+ hljs.C_LINE_COMMENT_MODE,
+ FUNCTION
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = oxygene;
+
+
+/***/ }),
+
+/***/ 70990:
+/***/ ((module) => {
+
+/*
+Language: Parser3
+Requires: xml.js
+Author: Oleg Volchkov
+Website: https://www.parser.ru/en/
+Category: template
+*/
+
+function parser3(hljs) {
+ const CURLY_SUBCOMMENT = hljs.COMMENT(
+ /\{/,
+ /\}/,
+ {
+ contains: [ 'self' ]
+ }
+ );
+ return {
+ name: 'Parser3',
+ subLanguage: 'xml',
+ relevance: 0,
+ contains: [
+ hljs.COMMENT('^#', '$'),
+ hljs.COMMENT(
+ /\^rem\{/,
+ /\}/,
+ {
+ relevance: 10,
+ contains: [ CURLY_SUBCOMMENT ]
+ }
+ ),
+ {
+ className: 'meta',
+ begin: '^@(?:BASE|USE|CLASS|OPTIONS)$',
+ relevance: 10
+ },
+ {
+ className: 'title',
+ begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$'
+ },
+ {
+ className: 'variable',
+ begin: /\$\{?[\w\-.:]+\}?/
+ },
+ {
+ className: 'keyword',
+ begin: /\^[\w\-.:]+/
+ },
+ {
+ className: 'number',
+ begin: '\\^#[0-9a-fA-F]+'
+ },
+ hljs.C_NUMBER_MODE
+ ]
+ };
+}
+
+module.exports = parser3;
+
+
+/***/ }),
+
+/***/ 93238:
+/***/ ((module) => {
+
+/*
+Language: Packet Filter config
+Description: pf.conf — packet filter configuration file (OpenBSD)
+Author: Peter Piwowarski
+Website: http://man.openbsd.org/pf.conf
+Category: config
+*/
+
+function pf(hljs) {
+ const MACRO = {
+ className: 'variable',
+ begin: /\$[\w\d#@][\w\d_]*/
+ };
+ const TABLE = {
+ className: 'variable',
+ begin: /<(?!\/)/,
+ end: />/
+ };
+
+ return {
+ name: 'Packet Filter config',
+ aliases: [ 'pf.conf' ],
+ keywords: {
+ $pattern: /[a-z0-9_<>-]+/,
+ built_in: /* block match pass are "actions" in pf.conf(5), the rest are
+ * lexically similar top-level commands.
+ */
+ 'block match pass load anchor|5 antispoof|10 set table',
+ keyword:
+ 'in out log quick on rdomain inet inet6 proto from port os to route ' +
+ 'allow-opts divert-packet divert-reply divert-to flags group icmp-type ' +
+ 'icmp6-type label once probability recieved-on rtable prio queue ' +
+ 'tos tag tagged user keep fragment for os drop ' +
+ 'af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin ' +
+ 'source-hash static-port ' +
+ 'dup-to reply-to route-to ' +
+ 'parent bandwidth default min max qlimit ' +
+ 'block-policy debug fingerprints hostid limit loginterface optimization ' +
+ 'reassemble ruleset-optimization basic none profile skip state-defaults ' +
+ 'state-policy timeout ' +
+ 'const counters persist ' +
+ 'no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy ' +
+ 'source-track global rule max-src-nodes max-src-states max-src-conn ' +
+ 'max-src-conn-rate overload flush ' +
+ 'scrub|5 max-mss min-ttl no-df|10 random-id',
+ literal:
+ 'all any no-route self urpf-failed egress|5 unknown'
+ },
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ hljs.NUMBER_MODE,
+ hljs.QUOTE_STRING_MODE,
+ MACRO,
+ TABLE
+ ]
+ };
+}
+
+module.exports = pf;
+
+
+/***/ }),
+
+/***/ 21257:
+/***/ ((module) => {
+
+/*
+Language: PostgreSQL and PL/pgSQL
+Author: Egor Rogov (e.rogov@postgrespro.ru)
+Website: https://www.postgresql.org/docs/11/sql.html
+Description:
+ This language incorporates both PostgreSQL SQL dialect and PL/pgSQL language.
+ It is based on PostgreSQL version 11. Some notes:
+ - Text in double-dollar-strings is _always_ interpreted as some programming code. Text
+ in ordinary quotes is _never_ interpreted that way and highlighted just as a string.
+ - There are quite a bit "special cases". That's because many keywords are not strictly
+ they are keywords in some contexts and ordinary identifiers in others. Only some
+ of such cases are handled; you still can get some of your identifiers highlighted
+ wrong way.
+ - Function names deliberately are not highlighted. There is no way to tell function
+ call from other constructs, hence we can't highlight _all_ function names. And
+ some names highlighted while others not looks ugly.
+*/
+
+function pgsql(hljs) {
+ const COMMENT_MODE = hljs.COMMENT('--', '$');
+ const UNQUOTED_IDENT = '[a-zA-Z_][a-zA-Z_0-9$]*';
+ const DOLLAR_STRING = '\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\$';
+ const LABEL = '<<\\s*' + UNQUOTED_IDENT + '\\s*>>';
+
+ const SQL_KW =
+ // https://www.postgresql.org/docs/11/static/sql-keywords-appendix.html
+ // https://www.postgresql.org/docs/11/static/sql-commands.html
+ // SQL commands (starting words)
+ 'ABORT ALTER ANALYZE BEGIN CALL CHECKPOINT|10 CLOSE CLUSTER COMMENT COMMIT COPY CREATE DEALLOCATE DECLARE ' +
+ 'DELETE DISCARD DO DROP END EXECUTE EXPLAIN FETCH GRANT IMPORT INSERT LISTEN LOAD LOCK MOVE NOTIFY ' +
+ 'PREPARE REASSIGN|10 REFRESH REINDEX RELEASE RESET REVOKE ROLLBACK SAVEPOINT SECURITY SELECT SET SHOW ' +
+ 'START TRUNCATE UNLISTEN|10 UPDATE VACUUM|10 VALUES ' +
+ // SQL commands (others)
+ 'AGGREGATE COLLATION CONVERSION|10 DATABASE DEFAULT PRIVILEGES DOMAIN TRIGGER EXTENSION FOREIGN ' +
+ 'WRAPPER|10 TABLE FUNCTION GROUP LANGUAGE LARGE OBJECT MATERIALIZED VIEW OPERATOR CLASS ' +
+ 'FAMILY POLICY PUBLICATION|10 ROLE RULE SCHEMA SEQUENCE SERVER STATISTICS SUBSCRIPTION SYSTEM ' +
+ 'TABLESPACE CONFIGURATION DICTIONARY PARSER TEMPLATE TYPE USER MAPPING PREPARED ACCESS ' +
+ 'METHOD CAST AS TRANSFORM TRANSACTION OWNED TO INTO SESSION AUTHORIZATION ' +
+ 'INDEX PROCEDURE ASSERTION ' +
+ // additional reserved key words
+ 'ALL ANALYSE AND ANY ARRAY ASC ASYMMETRIC|10 BOTH CASE CHECK ' +
+ 'COLLATE COLUMN CONCURRENTLY|10 CONSTRAINT CROSS ' +
+ 'DEFERRABLE RANGE ' +
+ 'DESC DISTINCT ELSE EXCEPT FOR FREEZE|10 FROM FULL HAVING ' +
+ 'ILIKE IN INITIALLY INNER INTERSECT IS ISNULL JOIN LATERAL LEADING LIKE LIMIT ' +
+ 'NATURAL NOT NOTNULL NULL OFFSET ON ONLY OR ORDER OUTER OVERLAPS PLACING PRIMARY ' +
+ 'REFERENCES RETURNING SIMILAR SOME SYMMETRIC TABLESAMPLE THEN ' +
+ 'TRAILING UNION UNIQUE USING VARIADIC|10 VERBOSE WHEN WHERE WINDOW WITH ' +
+ // some of non-reserved (which are used in clauses or as PL/pgSQL keyword)
+ 'BY RETURNS INOUT OUT SETOF|10 IF STRICT CURRENT CONTINUE OWNER LOCATION OVER PARTITION WITHIN ' +
+ 'BETWEEN ESCAPE EXTERNAL INVOKER DEFINER WORK RENAME VERSION CONNECTION CONNECT ' +
+ 'TABLES TEMP TEMPORARY FUNCTIONS SEQUENCES TYPES SCHEMAS OPTION CASCADE RESTRICT ADD ADMIN ' +
+ 'EXISTS VALID VALIDATE ENABLE DISABLE REPLICA|10 ALWAYS PASSING COLUMNS PATH ' +
+ 'REF VALUE OVERRIDING IMMUTABLE STABLE VOLATILE BEFORE AFTER EACH ROW PROCEDURAL ' +
+ 'ROUTINE NO HANDLER VALIDATOR OPTIONS STORAGE OIDS|10 WITHOUT INHERIT DEPENDS CALLED ' +
+ 'INPUT LEAKPROOF|10 COST ROWS NOWAIT SEARCH UNTIL ENCRYPTED|10 PASSWORD CONFLICT|10 ' +
+ 'INSTEAD INHERITS CHARACTERISTICS WRITE CURSOR ALSO STATEMENT SHARE EXCLUSIVE INLINE ' +
+ 'ISOLATION REPEATABLE READ COMMITTED SERIALIZABLE UNCOMMITTED LOCAL GLOBAL SQL PROCEDURES ' +
+ 'RECURSIVE SNAPSHOT ROLLUP CUBE TRUSTED|10 INCLUDE FOLLOWING PRECEDING UNBOUNDED RANGE GROUPS ' +
+ 'UNENCRYPTED|10 SYSID FORMAT DELIMITER HEADER QUOTE ENCODING FILTER OFF ' +
+ // some parameters of VACUUM/ANALYZE/EXPLAIN
+ 'FORCE_QUOTE FORCE_NOT_NULL FORCE_NULL COSTS BUFFERS TIMING SUMMARY DISABLE_PAGE_SKIPPING ' +
+ //
+ 'RESTART CYCLE GENERATED IDENTITY DEFERRED IMMEDIATE LEVEL LOGGED UNLOGGED ' +
+ 'OF NOTHING NONE EXCLUDE ATTRIBUTE ' +
+ // from GRANT (not keywords actually)
+ 'USAGE ROUTINES ' +
+ // actually literals, but look better this way (due to IS TRUE, IS FALSE, ISNULL etc)
+ 'TRUE FALSE NAN INFINITY ';
+
+ const ROLE_ATTRS = // only those not in keywrods already
+ 'SUPERUSER NOSUPERUSER CREATEDB NOCREATEDB CREATEROLE NOCREATEROLE INHERIT NOINHERIT ' +
+ 'LOGIN NOLOGIN REPLICATION NOREPLICATION BYPASSRLS NOBYPASSRLS ';
+
+ const PLPGSQL_KW =
+ 'ALIAS BEGIN CONSTANT DECLARE END EXCEPTION RETURN PERFORM|10 RAISE GET DIAGNOSTICS ' +
+ 'STACKED|10 FOREACH LOOP ELSIF EXIT WHILE REVERSE SLICE DEBUG LOG INFO NOTICE WARNING ASSERT ' +
+ 'OPEN ';
+
+ const TYPES =
+ // https://www.postgresql.org/docs/11/static/datatype.html
+ 'BIGINT INT8 BIGSERIAL SERIAL8 BIT VARYING VARBIT BOOLEAN BOOL BOX BYTEA CHARACTER CHAR VARCHAR ' +
+ 'CIDR CIRCLE DATE DOUBLE PRECISION FLOAT8 FLOAT INET INTEGER INT INT4 INTERVAL JSON JSONB LINE LSEG|10 ' +
+ 'MACADDR MACADDR8 MONEY NUMERIC DEC DECIMAL PATH POINT POLYGON REAL FLOAT4 SMALLINT INT2 ' +
+ 'SMALLSERIAL|10 SERIAL2|10 SERIAL|10 SERIAL4|10 TEXT TIME ZONE TIMETZ|10 TIMESTAMP TIMESTAMPTZ|10 TSQUERY|10 TSVECTOR|10 ' +
+ 'TXID_SNAPSHOT|10 UUID XML NATIONAL NCHAR ' +
+ 'INT4RANGE|10 INT8RANGE|10 NUMRANGE|10 TSRANGE|10 TSTZRANGE|10 DATERANGE|10 ' +
+ // pseudotypes
+ 'ANYELEMENT ANYARRAY ANYNONARRAY ANYENUM ANYRANGE CSTRING INTERNAL ' +
+ 'RECORD PG_DDL_COMMAND VOID UNKNOWN OPAQUE REFCURSOR ' +
+ // spec. type
+ 'NAME ' +
+ // OID-types
+ 'OID REGPROC|10 REGPROCEDURE|10 REGOPER|10 REGOPERATOR|10 REGCLASS|10 REGTYPE|10 REGROLE|10 ' +
+ 'REGNAMESPACE|10 REGCONFIG|10 REGDICTIONARY|10 ';// +
+
+ const TYPES_RE =
+ TYPES.trim()
+ .split(' ')
+ .map(function(val) { return val.split('|')[0]; })
+ .join('|');
+
+ const SQL_BI =
+ 'CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURRENT_CATALOG|10 CURRENT_DATE LOCALTIME LOCALTIMESTAMP ' +
+ 'CURRENT_ROLE|10 CURRENT_SCHEMA|10 SESSION_USER PUBLIC ';
+
+ const PLPGSQL_BI =
+ 'FOUND NEW OLD TG_NAME|10 TG_WHEN|10 TG_LEVEL|10 TG_OP|10 TG_RELID|10 TG_RELNAME|10 ' +
+ 'TG_TABLE_NAME|10 TG_TABLE_SCHEMA|10 TG_NARGS|10 TG_ARGV|10 TG_EVENT|10 TG_TAG|10 ' +
+ // get diagnostics
+ 'ROW_COUNT RESULT_OID|10 PG_CONTEXT|10 RETURNED_SQLSTATE COLUMN_NAME CONSTRAINT_NAME ' +
+ 'PG_DATATYPE_NAME|10 MESSAGE_TEXT TABLE_NAME SCHEMA_NAME PG_EXCEPTION_DETAIL|10 ' +
+ 'PG_EXCEPTION_HINT|10 PG_EXCEPTION_CONTEXT|10 ';
+
+ const PLPGSQL_EXCEPTIONS =
+ // exceptions https://www.postgresql.org/docs/current/static/errcodes-appendix.html
+ 'SQLSTATE SQLERRM|10 ' +
+ 'SUCCESSFUL_COMPLETION WARNING DYNAMIC_RESULT_SETS_RETURNED IMPLICIT_ZERO_BIT_PADDING ' +
+ 'NULL_VALUE_ELIMINATED_IN_SET_FUNCTION PRIVILEGE_NOT_GRANTED PRIVILEGE_NOT_REVOKED ' +
+ 'STRING_DATA_RIGHT_TRUNCATION DEPRECATED_FEATURE NO_DATA NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED ' +
+ 'SQL_STATEMENT_NOT_YET_COMPLETE CONNECTION_EXCEPTION CONNECTION_DOES_NOT_EXIST CONNECTION_FAILURE ' +
+ 'SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION ' +
+ 'TRANSACTION_RESOLUTION_UNKNOWN PROTOCOL_VIOLATION TRIGGERED_ACTION_EXCEPTION FEATURE_NOT_SUPPORTED ' +
+ 'INVALID_TRANSACTION_INITIATION LOCATOR_EXCEPTION INVALID_LOCATOR_SPECIFICATION INVALID_GRANTOR ' +
+ 'INVALID_GRANT_OPERATION INVALID_ROLE_SPECIFICATION DIAGNOSTICS_EXCEPTION ' +
+ 'STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER CASE_NOT_FOUND CARDINALITY_VIOLATION ' +
+ 'DATA_EXCEPTION ARRAY_SUBSCRIPT_ERROR CHARACTER_NOT_IN_REPERTOIRE DATETIME_FIELD_OVERFLOW ' +
+ 'DIVISION_BY_ZERO ERROR_IN_ASSIGNMENT ESCAPE_CHARACTER_CONFLICT INDICATOR_OVERFLOW ' +
+ 'INTERVAL_FIELD_OVERFLOW INVALID_ARGUMENT_FOR_LOGARITHM INVALID_ARGUMENT_FOR_NTILE_FUNCTION ' +
+ 'INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION INVALID_ARGUMENT_FOR_POWER_FUNCTION ' +
+ 'INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION INVALID_CHARACTER_VALUE_FOR_CAST ' +
+ 'INVALID_DATETIME_FORMAT INVALID_ESCAPE_CHARACTER INVALID_ESCAPE_OCTET INVALID_ESCAPE_SEQUENCE ' +
+ 'NONSTANDARD_USE_OF_ESCAPE_CHARACTER INVALID_INDICATOR_PARAMETER_VALUE INVALID_PARAMETER_VALUE ' +
+ 'INVALID_REGULAR_EXPRESSION INVALID_ROW_COUNT_IN_LIMIT_CLAUSE ' +
+ 'INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE INVALID_TABLESAMPLE_ARGUMENT INVALID_TABLESAMPLE_REPEAT ' +
+ 'INVALID_TIME_ZONE_DISPLACEMENT_VALUE INVALID_USE_OF_ESCAPE_CHARACTER MOST_SPECIFIC_TYPE_MISMATCH ' +
+ 'NULL_VALUE_NOT_ALLOWED NULL_VALUE_NO_INDICATOR_PARAMETER NUMERIC_VALUE_OUT_OF_RANGE ' +
+ 'SEQUENCE_GENERATOR_LIMIT_EXCEEDED STRING_DATA_LENGTH_MISMATCH STRING_DATA_RIGHT_TRUNCATION ' +
+ 'SUBSTRING_ERROR TRIM_ERROR UNTERMINATED_C_STRING ZERO_LENGTH_CHARACTER_STRING ' +
+ 'FLOATING_POINT_EXCEPTION INVALID_TEXT_REPRESENTATION INVALID_BINARY_REPRESENTATION ' +
+ 'BAD_COPY_FILE_FORMAT UNTRANSLATABLE_CHARACTER NOT_AN_XML_DOCUMENT INVALID_XML_DOCUMENT ' +
+ 'INVALID_XML_CONTENT INVALID_XML_COMMENT INVALID_XML_PROCESSING_INSTRUCTION ' +
+ 'INTEGRITY_CONSTRAINT_VIOLATION RESTRICT_VIOLATION NOT_NULL_VIOLATION FOREIGN_KEY_VIOLATION ' +
+ 'UNIQUE_VIOLATION CHECK_VIOLATION EXCLUSION_VIOLATION INVALID_CURSOR_STATE ' +
+ 'INVALID_TRANSACTION_STATE ACTIVE_SQL_TRANSACTION BRANCH_TRANSACTION_ALREADY_ACTIVE ' +
+ 'HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION ' +
+ 'INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION ' +
+ 'NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION READ_ONLY_SQL_TRANSACTION ' +
+ 'SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED NO_ACTIVE_SQL_TRANSACTION ' +
+ 'IN_FAILED_SQL_TRANSACTION IDLE_IN_TRANSACTION_SESSION_TIMEOUT INVALID_SQL_STATEMENT_NAME ' +
+ 'TRIGGERED_DATA_CHANGE_VIOLATION INVALID_AUTHORIZATION_SPECIFICATION INVALID_PASSWORD ' +
+ 'DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST DEPENDENT_OBJECTS_STILL_EXIST ' +
+ 'INVALID_TRANSACTION_TERMINATION SQL_ROUTINE_EXCEPTION FUNCTION_EXECUTED_NO_RETURN_STATEMENT ' +
+ 'MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED ' +
+ 'READING_SQL_DATA_NOT_PERMITTED INVALID_CURSOR_NAME EXTERNAL_ROUTINE_EXCEPTION ' +
+ 'CONTAINING_SQL_NOT_PERMITTED MODIFYING_SQL_DATA_NOT_PERMITTED ' +
+ 'PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED ' +
+ 'EXTERNAL_ROUTINE_INVOCATION_EXCEPTION INVALID_SQLSTATE_RETURNED NULL_VALUE_NOT_ALLOWED ' +
+ 'TRIGGER_PROTOCOL_VIOLATED SRF_PROTOCOL_VIOLATED EVENT_TRIGGER_PROTOCOL_VIOLATED ' +
+ 'SAVEPOINT_EXCEPTION INVALID_SAVEPOINT_SPECIFICATION INVALID_CATALOG_NAME ' +
+ 'INVALID_SCHEMA_NAME TRANSACTION_ROLLBACK TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION ' +
+ 'SERIALIZATION_FAILURE STATEMENT_COMPLETION_UNKNOWN DEADLOCK_DETECTED ' +
+ 'SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION SYNTAX_ERROR INSUFFICIENT_PRIVILEGE CANNOT_COERCE ' +
+ 'GROUPING_ERROR WINDOWING_ERROR INVALID_RECURSION INVALID_FOREIGN_KEY INVALID_NAME ' +
+ 'NAME_TOO_LONG RESERVED_NAME DATATYPE_MISMATCH INDETERMINATE_DATATYPE COLLATION_MISMATCH ' +
+ 'INDETERMINATE_COLLATION WRONG_OBJECT_TYPE GENERATED_ALWAYS UNDEFINED_COLUMN ' +
+ 'UNDEFINED_FUNCTION UNDEFINED_TABLE UNDEFINED_PARAMETER UNDEFINED_OBJECT ' +
+ 'DUPLICATE_COLUMN DUPLICATE_CURSOR DUPLICATE_DATABASE DUPLICATE_FUNCTION ' +
+ 'DUPLICATE_PREPARED_STATEMENT DUPLICATE_SCHEMA DUPLICATE_TABLE DUPLICATE_ALIAS ' +
+ 'DUPLICATE_OBJECT AMBIGUOUS_COLUMN AMBIGUOUS_FUNCTION AMBIGUOUS_PARAMETER AMBIGUOUS_ALIAS ' +
+ 'INVALID_COLUMN_REFERENCE INVALID_COLUMN_DEFINITION INVALID_CURSOR_DEFINITION ' +
+ 'INVALID_DATABASE_DEFINITION INVALID_FUNCTION_DEFINITION ' +
+ 'INVALID_PREPARED_STATEMENT_DEFINITION INVALID_SCHEMA_DEFINITION INVALID_TABLE_DEFINITION ' +
+ 'INVALID_OBJECT_DEFINITION WITH_CHECK_OPTION_VIOLATION INSUFFICIENT_RESOURCES DISK_FULL ' +
+ 'OUT_OF_MEMORY TOO_MANY_CONNECTIONS CONFIGURATION_LIMIT_EXCEEDED PROGRAM_LIMIT_EXCEEDED ' +
+ 'STATEMENT_TOO_COMPLEX TOO_MANY_COLUMNS TOO_MANY_ARGUMENTS OBJECT_NOT_IN_PREREQUISITE_STATE ' +
+ 'OBJECT_IN_USE CANT_CHANGE_RUNTIME_PARAM LOCK_NOT_AVAILABLE OPERATOR_INTERVENTION ' +
+ 'QUERY_CANCELED ADMIN_SHUTDOWN CRASH_SHUTDOWN CANNOT_CONNECT_NOW DATABASE_DROPPED ' +
+ 'SYSTEM_ERROR IO_ERROR UNDEFINED_FILE DUPLICATE_FILE SNAPSHOT_TOO_OLD CONFIG_FILE_ERROR ' +
+ 'LOCK_FILE_EXISTS FDW_ERROR FDW_COLUMN_NAME_NOT_FOUND FDW_DYNAMIC_PARAMETER_VALUE_NEEDED ' +
+ 'FDW_FUNCTION_SEQUENCE_ERROR FDW_INCONSISTENT_DESCRIPTOR_INFORMATION ' +
+ 'FDW_INVALID_ATTRIBUTE_VALUE FDW_INVALID_COLUMN_NAME FDW_INVALID_COLUMN_NUMBER ' +
+ 'FDW_INVALID_DATA_TYPE FDW_INVALID_DATA_TYPE_DESCRIPTORS ' +
+ 'FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER FDW_INVALID_HANDLE FDW_INVALID_OPTION_INDEX ' +
+ 'FDW_INVALID_OPTION_NAME FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH ' +
+ 'FDW_INVALID_STRING_FORMAT FDW_INVALID_USE_OF_NULL_POINTER FDW_TOO_MANY_HANDLES ' +
+ 'FDW_OUT_OF_MEMORY FDW_NO_SCHEMAS FDW_OPTION_NAME_NOT_FOUND FDW_REPLY_HANDLE ' +
+ 'FDW_SCHEMA_NOT_FOUND FDW_TABLE_NOT_FOUND FDW_UNABLE_TO_CREATE_EXECUTION ' +
+ 'FDW_UNABLE_TO_CREATE_REPLY FDW_UNABLE_TO_ESTABLISH_CONNECTION PLPGSQL_ERROR ' +
+ 'RAISE_EXCEPTION NO_DATA_FOUND TOO_MANY_ROWS ASSERT_FAILURE INTERNAL_ERROR DATA_CORRUPTED ' +
+ 'INDEX_CORRUPTED ';
+
+ const FUNCTIONS =
+ // https://www.postgresql.org/docs/11/static/functions-aggregate.html
+ 'ARRAY_AGG AVG BIT_AND BIT_OR BOOL_AND BOOL_OR COUNT EVERY JSON_AGG JSONB_AGG JSON_OBJECT_AGG ' +
+ 'JSONB_OBJECT_AGG MAX MIN MODE STRING_AGG SUM XMLAGG ' +
+ 'CORR COVAR_POP COVAR_SAMP REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE ' +
+ 'REGR_SXX REGR_SXY REGR_SYY STDDEV STDDEV_POP STDDEV_SAMP VARIANCE VAR_POP VAR_SAMP ' +
+ 'PERCENTILE_CONT PERCENTILE_DISC ' +
+ // https://www.postgresql.org/docs/11/static/functions-window.html
+ 'ROW_NUMBER RANK DENSE_RANK PERCENT_RANK CUME_DIST NTILE LAG LEAD FIRST_VALUE LAST_VALUE NTH_VALUE ' +
+ // https://www.postgresql.org/docs/11/static/functions-comparison.html
+ 'NUM_NONNULLS NUM_NULLS ' +
+ // https://www.postgresql.org/docs/11/static/functions-math.html
+ 'ABS CBRT CEIL CEILING DEGREES DIV EXP FLOOR LN LOG MOD PI POWER RADIANS ROUND SCALE SIGN SQRT ' +
+ 'TRUNC WIDTH_BUCKET ' +
+ 'RANDOM SETSEED ' +
+ 'ACOS ACOSD ASIN ASIND ATAN ATAND ATAN2 ATAN2D COS COSD COT COTD SIN SIND TAN TAND ' +
+ // https://www.postgresql.org/docs/11/static/functions-string.html
+ 'BIT_LENGTH CHAR_LENGTH CHARACTER_LENGTH LOWER OCTET_LENGTH OVERLAY POSITION SUBSTRING TREAT TRIM UPPER ' +
+ 'ASCII BTRIM CHR CONCAT CONCAT_WS CONVERT CONVERT_FROM CONVERT_TO DECODE ENCODE INITCAP ' +
+ 'LEFT LENGTH LPAD LTRIM MD5 PARSE_IDENT PG_CLIENT_ENCODING QUOTE_IDENT|10 QUOTE_LITERAL|10 ' +
+ 'QUOTE_NULLABLE|10 REGEXP_MATCH REGEXP_MATCHES REGEXP_REPLACE REGEXP_SPLIT_TO_ARRAY ' +
+ 'REGEXP_SPLIT_TO_TABLE REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPLIT_PART STRPOS SUBSTR ' +
+ 'TO_ASCII TO_HEX TRANSLATE ' +
+ // https://www.postgresql.org/docs/11/static/functions-binarystring.html
+ 'OCTET_LENGTH GET_BIT GET_BYTE SET_BIT SET_BYTE ' +
+ // https://www.postgresql.org/docs/11/static/functions-formatting.html
+ 'TO_CHAR TO_DATE TO_NUMBER TO_TIMESTAMP ' +
+ // https://www.postgresql.org/docs/11/static/functions-datetime.html
+ 'AGE CLOCK_TIMESTAMP|10 DATE_PART DATE_TRUNC ISFINITE JUSTIFY_DAYS JUSTIFY_HOURS JUSTIFY_INTERVAL ' +
+ 'MAKE_DATE MAKE_INTERVAL|10 MAKE_TIME MAKE_TIMESTAMP|10 MAKE_TIMESTAMPTZ|10 NOW STATEMENT_TIMESTAMP|10 ' +
+ 'TIMEOFDAY TRANSACTION_TIMESTAMP|10 ' +
+ // https://www.postgresql.org/docs/11/static/functions-enum.html
+ 'ENUM_FIRST ENUM_LAST ENUM_RANGE ' +
+ // https://www.postgresql.org/docs/11/static/functions-geometry.html
+ 'AREA CENTER DIAMETER HEIGHT ISCLOSED ISOPEN NPOINTS PCLOSE POPEN RADIUS WIDTH ' +
+ 'BOX BOUND_BOX CIRCLE LINE LSEG PATH POLYGON ' +
+ // https://www.postgresql.org/docs/11/static/functions-net.html
+ 'ABBREV BROADCAST HOST HOSTMASK MASKLEN NETMASK NETWORK SET_MASKLEN TEXT INET_SAME_FAMILY ' +
+ 'INET_MERGE MACADDR8_SET7BIT ' +
+ // https://www.postgresql.org/docs/11/static/functions-textsearch.html
+ 'ARRAY_TO_TSVECTOR GET_CURRENT_TS_CONFIG NUMNODE PLAINTO_TSQUERY PHRASETO_TSQUERY WEBSEARCH_TO_TSQUERY ' +
+ 'QUERYTREE SETWEIGHT STRIP TO_TSQUERY TO_TSVECTOR JSON_TO_TSVECTOR JSONB_TO_TSVECTOR TS_DELETE ' +
+ 'TS_FILTER TS_HEADLINE TS_RANK TS_RANK_CD TS_REWRITE TSQUERY_PHRASE TSVECTOR_TO_ARRAY ' +
+ 'TSVECTOR_UPDATE_TRIGGER TSVECTOR_UPDATE_TRIGGER_COLUMN ' +
+ // https://www.postgresql.org/docs/11/static/functions-xml.html
+ 'XMLCOMMENT XMLCONCAT XMLELEMENT XMLFOREST XMLPI XMLROOT ' +
+ 'XMLEXISTS XML_IS_WELL_FORMED XML_IS_WELL_FORMED_DOCUMENT XML_IS_WELL_FORMED_CONTENT ' +
+ 'XPATH XPATH_EXISTS XMLTABLE XMLNAMESPACES ' +
+ 'TABLE_TO_XML TABLE_TO_XMLSCHEMA TABLE_TO_XML_AND_XMLSCHEMA ' +
+ 'QUERY_TO_XML QUERY_TO_XMLSCHEMA QUERY_TO_XML_AND_XMLSCHEMA ' +
+ 'CURSOR_TO_XML CURSOR_TO_XMLSCHEMA ' +
+ 'SCHEMA_TO_XML SCHEMA_TO_XMLSCHEMA SCHEMA_TO_XML_AND_XMLSCHEMA ' +
+ 'DATABASE_TO_XML DATABASE_TO_XMLSCHEMA DATABASE_TO_XML_AND_XMLSCHEMA ' +
+ 'XMLATTRIBUTES ' +
+ // https://www.postgresql.org/docs/11/static/functions-json.html
+ 'TO_JSON TO_JSONB ARRAY_TO_JSON ROW_TO_JSON JSON_BUILD_ARRAY JSONB_BUILD_ARRAY JSON_BUILD_OBJECT ' +
+ 'JSONB_BUILD_OBJECT JSON_OBJECT JSONB_OBJECT JSON_ARRAY_LENGTH JSONB_ARRAY_LENGTH JSON_EACH ' +
+ 'JSONB_EACH JSON_EACH_TEXT JSONB_EACH_TEXT JSON_EXTRACT_PATH JSONB_EXTRACT_PATH ' +
+ 'JSON_OBJECT_KEYS JSONB_OBJECT_KEYS JSON_POPULATE_RECORD JSONB_POPULATE_RECORD JSON_POPULATE_RECORDSET ' +
+ 'JSONB_POPULATE_RECORDSET JSON_ARRAY_ELEMENTS JSONB_ARRAY_ELEMENTS JSON_ARRAY_ELEMENTS_TEXT ' +
+ 'JSONB_ARRAY_ELEMENTS_TEXT JSON_TYPEOF JSONB_TYPEOF JSON_TO_RECORD JSONB_TO_RECORD JSON_TO_RECORDSET ' +
+ 'JSONB_TO_RECORDSET JSON_STRIP_NULLS JSONB_STRIP_NULLS JSONB_SET JSONB_INSERT JSONB_PRETTY ' +
+ // https://www.postgresql.org/docs/11/static/functions-sequence.html
+ 'CURRVAL LASTVAL NEXTVAL SETVAL ' +
+ // https://www.postgresql.org/docs/11/static/functions-conditional.html
+ 'COALESCE NULLIF GREATEST LEAST ' +
+ // https://www.postgresql.org/docs/11/static/functions-array.html
+ 'ARRAY_APPEND ARRAY_CAT ARRAY_NDIMS ARRAY_DIMS ARRAY_FILL ARRAY_LENGTH ARRAY_LOWER ARRAY_POSITION ' +
+ 'ARRAY_POSITIONS ARRAY_PREPEND ARRAY_REMOVE ARRAY_REPLACE ARRAY_TO_STRING ARRAY_UPPER CARDINALITY ' +
+ 'STRING_TO_ARRAY UNNEST ' +
+ // https://www.postgresql.org/docs/11/static/functions-range.html
+ 'ISEMPTY LOWER_INC UPPER_INC LOWER_INF UPPER_INF RANGE_MERGE ' +
+ // https://www.postgresql.org/docs/11/static/functions-srf.html
+ 'GENERATE_SERIES GENERATE_SUBSCRIPTS ' +
+ // https://www.postgresql.org/docs/11/static/functions-info.html
+ 'CURRENT_DATABASE CURRENT_QUERY CURRENT_SCHEMA|10 CURRENT_SCHEMAS|10 INET_CLIENT_ADDR INET_CLIENT_PORT ' +
+ 'INET_SERVER_ADDR INET_SERVER_PORT ROW_SECURITY_ACTIVE FORMAT_TYPE ' +
+ 'TO_REGCLASS TO_REGPROC TO_REGPROCEDURE TO_REGOPER TO_REGOPERATOR TO_REGTYPE TO_REGNAMESPACE TO_REGROLE ' +
+ 'COL_DESCRIPTION OBJ_DESCRIPTION SHOBJ_DESCRIPTION ' +
+ 'TXID_CURRENT TXID_CURRENT_IF_ASSIGNED TXID_CURRENT_SNAPSHOT TXID_SNAPSHOT_XIP TXID_SNAPSHOT_XMAX ' +
+ 'TXID_SNAPSHOT_XMIN TXID_VISIBLE_IN_SNAPSHOT TXID_STATUS ' +
+ // https://www.postgresql.org/docs/11/static/functions-admin.html
+ 'CURRENT_SETTING SET_CONFIG BRIN_SUMMARIZE_NEW_VALUES BRIN_SUMMARIZE_RANGE BRIN_DESUMMARIZE_RANGE ' +
+ 'GIN_CLEAN_PENDING_LIST ' +
+ // https://www.postgresql.org/docs/11/static/functions-trigger.html
+ 'SUPPRESS_REDUNDANT_UPDATES_TRIGGER ' +
+ // ihttps://www.postgresql.org/docs/devel/static/lo-funcs.html
+ 'LO_FROM_BYTEA LO_PUT LO_GET LO_CREAT LO_CREATE LO_UNLINK LO_IMPORT LO_EXPORT LOREAD LOWRITE ' +
+ //
+ 'GROUPING CAST ';
+
+ const FUNCTIONS_RE =
+ FUNCTIONS.trim()
+ .split(' ')
+ .map(function(val) { return val.split('|')[0]; })
+ .join('|');
+
+ return {
+ name: 'PostgreSQL',
+ aliases: [
+ 'postgres',
+ 'postgresql'
+ ],
+ case_insensitive: true,
+ keywords: {
+ keyword:
+ SQL_KW + PLPGSQL_KW + ROLE_ATTRS,
+ built_in:
+ SQL_BI + PLPGSQL_BI + PLPGSQL_EXCEPTIONS
+ },
+ // Forbid some cunstructs from other languages to improve autodetect. In fact
+ // "[a-z]:" is legal (as part of array slice), but improbabal.
+ illegal: /:==|\W\s*\(\*|(^|\s)\$[a-z]|\{\{|[a-z]:\s*$|\.\.\.|TO:|DO:/,
+ contains: [
+ // special handling of some words, which are reserved only in some contexts
+ {
+ className: 'keyword',
+ variants: [
+ {
+ begin: /\bTEXT\s*SEARCH\b/
+ },
+ {
+ begin: /\b(PRIMARY|FOREIGN|FOR(\s+NO)?)\s+KEY\b/
+ },
+ {
+ begin: /\bPARALLEL\s+(UNSAFE|RESTRICTED|SAFE)\b/
+ },
+ {
+ begin: /\bSTORAGE\s+(PLAIN|EXTERNAL|EXTENDED|MAIN)\b/
+ },
+ {
+ begin: /\bMATCH\s+(FULL|PARTIAL|SIMPLE)\b/
+ },
+ {
+ begin: /\bNULLS\s+(FIRST|LAST)\b/
+ },
+ {
+ begin: /\bEVENT\s+TRIGGER\b/
+ },
+ {
+ begin: /\b(MAPPING|OR)\s+REPLACE\b/
+ },
+ {
+ begin: /\b(FROM|TO)\s+(PROGRAM|STDIN|STDOUT)\b/
+ },
+ {
+ begin: /\b(SHARE|EXCLUSIVE)\s+MODE\b/
+ },
+ {
+ begin: /\b(LEFT|RIGHT)\s+(OUTER\s+)?JOIN\b/
+ },
+ {
+ begin: /\b(FETCH|MOVE)\s+(NEXT|PRIOR|FIRST|LAST|ABSOLUTE|RELATIVE|FORWARD|BACKWARD)\b/
+ },
+ {
+ begin: /\bPRESERVE\s+ROWS\b/
+ },
+ {
+ begin: /\bDISCARD\s+PLANS\b/
+ },
+ {
+ begin: /\bREFERENCING\s+(OLD|NEW)\b/
+ },
+ {
+ begin: /\bSKIP\s+LOCKED\b/
+ },
+ {
+ begin: /\bGROUPING\s+SETS\b/
+ },
+ {
+ begin: /\b(BINARY|INSENSITIVE|SCROLL|NO\s+SCROLL)\s+(CURSOR|FOR)\b/
+ },
+ {
+ begin: /\b(WITH|WITHOUT)\s+HOLD\b/
+ },
+ {
+ begin: /\bWITH\s+(CASCADED|LOCAL)\s+CHECK\s+OPTION\b/
+ },
+ {
+ begin: /\bEXCLUDE\s+(TIES|NO\s+OTHERS)\b/
+ },
+ {
+ begin: /\bFORMAT\s+(TEXT|XML|JSON|YAML)\b/
+ },
+ {
+ begin: /\bSET\s+((SESSION|LOCAL)\s+)?NAMES\b/
+ },
+ {
+ begin: /\bIS\s+(NOT\s+)?UNKNOWN\b/
+ },
+ {
+ begin: /\bSECURITY\s+LABEL\b/
+ },
+ {
+ begin: /\bSTANDALONE\s+(YES|NO|NO\s+VALUE)\b/
+ },
+ {
+ begin: /\bWITH\s+(NO\s+)?DATA\b/
+ },
+ {
+ begin: /\b(FOREIGN|SET)\s+DATA\b/
+ },
+ {
+ begin: /\bSET\s+(CATALOG|CONSTRAINTS)\b/
+ },
+ {
+ begin: /\b(WITH|FOR)\s+ORDINALITY\b/
+ },
+ {
+ begin: /\bIS\s+(NOT\s+)?DOCUMENT\b/
+ },
+ {
+ begin: /\bXML\s+OPTION\s+(DOCUMENT|CONTENT)\b/
+ },
+ {
+ begin: /\b(STRIP|PRESERVE)\s+WHITESPACE\b/
+ },
+ {
+ begin: /\bNO\s+(ACTION|MAXVALUE|MINVALUE)\b/
+ },
+ {
+ begin: /\bPARTITION\s+BY\s+(RANGE|LIST|HASH)\b/
+ },
+ {
+ begin: /\bAT\s+TIME\s+ZONE\b/
+ },
+ {
+ begin: /\bGRANTED\s+BY\b/
+ },
+ {
+ begin: /\bRETURN\s+(QUERY|NEXT)\b/
+ },
+ {
+ begin: /\b(ATTACH|DETACH)\s+PARTITION\b/
+ },
+ {
+ begin: /\bFORCE\s+ROW\s+LEVEL\s+SECURITY\b/
+ },
+ {
+ begin: /\b(INCLUDING|EXCLUDING)\s+(COMMENTS|CONSTRAINTS|DEFAULTS|IDENTITY|INDEXES|STATISTICS|STORAGE|ALL)\b/
+ },
+ {
+ begin: /\bAS\s+(ASSIGNMENT|IMPLICIT|PERMISSIVE|RESTRICTIVE|ENUM|RANGE)\b/
+ }
+ ]
+ },
+ // functions named as keywords, followed by '('
+ {
+ begin: /\b(FORMAT|FAMILY|VERSION)\s*\(/
+ // keywords: { built_in: 'FORMAT FAMILY VERSION' }
+ },
+ // INCLUDE ( ... ) in index_parameters in CREATE TABLE
+ {
+ begin: /\bINCLUDE\s*\(/,
+ keywords: 'INCLUDE'
+ },
+ // not highlight RANGE if not in frame_clause (not 100% correct, but seems satisfactory)
+ {
+ begin: /\bRANGE(?!\s*(BETWEEN|UNBOUNDED|CURRENT|[-0-9]+))/
+ },
+ // disable highlighting in commands CREATE AGGREGATE/COLLATION/DATABASE/OPERTOR/TEXT SEARCH .../TYPE
+ // and in PL/pgSQL RAISE ... USING
+ {
+ begin: /\b(VERSION|OWNER|TEMPLATE|TABLESPACE|CONNECTION\s+LIMIT|PROCEDURE|RESTRICT|JOIN|PARSER|COPY|START|END|COLLATION|INPUT|ANALYZE|STORAGE|LIKE|DEFAULT|DELIMITER|ENCODING|COLUMN|CONSTRAINT|TABLE|SCHEMA)\s*=/
+ },
+ // PG_smth; HAS_some_PRIVILEGE
+ {
+ // className: 'built_in',
+ begin: /\b(PG_\w+?|HAS_[A-Z_]+_PRIVILEGE)\b/,
+ relevance: 10
+ },
+ // extract
+ {
+ begin: /\bEXTRACT\s*\(/,
+ end: /\bFROM\b/,
+ returnEnd: true,
+ keywords: {
+ // built_in: 'EXTRACT',
+ type: 'CENTURY DAY DECADE DOW DOY EPOCH HOUR ISODOW ISOYEAR MICROSECONDS ' +
+ 'MILLENNIUM MILLISECONDS MINUTE MONTH QUARTER SECOND TIMEZONE TIMEZONE_HOUR ' +
+ 'TIMEZONE_MINUTE WEEK YEAR'
+ }
+ },
+ // xmlelement, xmlpi - special NAME
+ {
+ begin: /\b(XMLELEMENT|XMLPI)\s*\(\s*NAME/,
+ keywords: {
+ // built_in: 'XMLELEMENT XMLPI',
+ keyword: 'NAME'
+ }
+ },
+ // xmlparse, xmlserialize
+ {
+ begin: /\b(XMLPARSE|XMLSERIALIZE)\s*\(\s*(DOCUMENT|CONTENT)/,
+ keywords: {
+ // built_in: 'XMLPARSE XMLSERIALIZE',
+ keyword: 'DOCUMENT CONTENT'
+ }
+ },
+ // Sequences. We actually skip everything between CACHE|INCREMENT|MAXVALUE|MINVALUE and
+ // nearest following numeric constant. Without with trick we find a lot of "keywords"
+ // in 'avrasm' autodetection test...
+ {
+ beginKeywords: 'CACHE INCREMENT MAXVALUE MINVALUE',
+ end: hljs.C_NUMBER_RE,
+ returnEnd: true,
+ keywords: 'BY CACHE INCREMENT MAXVALUE MINVALUE'
+ },
+ // WITH|WITHOUT TIME ZONE as part of datatype
+ {
+ className: 'type',
+ begin: /\b(WITH|WITHOUT)\s+TIME\s+ZONE\b/
+ },
+ // INTERVAL optional fields
+ {
+ className: 'type',
+ begin: /\bINTERVAL\s+(YEAR|MONTH|DAY|HOUR|MINUTE|SECOND)(\s+TO\s+(MONTH|HOUR|MINUTE|SECOND))?\b/
+ },
+ // Pseudo-types which allowed only as return type
+ {
+ begin: /\bRETURNS\s+(LANGUAGE_HANDLER|TRIGGER|EVENT_TRIGGER|FDW_HANDLER|INDEX_AM_HANDLER|TSM_HANDLER)\b/,
+ keywords: {
+ keyword: 'RETURNS',
+ type: 'LANGUAGE_HANDLER TRIGGER EVENT_TRIGGER FDW_HANDLER INDEX_AM_HANDLER TSM_HANDLER'
+ }
+ },
+ // Known functions - only when followed by '('
+ {
+ begin: '\\b(' + FUNCTIONS_RE + ')\\s*\\('
+ // keywords: { built_in: FUNCTIONS }
+ },
+ // Types
+ {
+ begin: '\\.(' + TYPES_RE + ')\\b' // prevent highlight as type, say, 'oid' in 'pgclass.oid'
+ },
+ {
+ begin: '\\b(' + TYPES_RE + ')\\s+PATH\\b', // in XMLTABLE
+ keywords: {
+ keyword: 'PATH', // hopefully no one would use PATH type in XMLTABLE...
+ type: TYPES.replace('PATH ', '')
+ }
+ },
+ {
+ className: 'type',
+ begin: '\\b(' + TYPES_RE + ')\\b'
+ },
+ // Strings, see https://www.postgresql.org/docs/11/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS
+ {
+ className: 'string',
+ begin: '\'',
+ end: '\'',
+ contains: [
+ {
+ begin: '\'\''
+ }
+ ]
+ },
+ {
+ className: 'string',
+ begin: '(e|E|u&|U&)\'',
+ end: '\'',
+ contains: [
+ {
+ begin: '\\\\.'
+ }
+ ],
+ relevance: 10
+ },
+ hljs.END_SAME_AS_BEGIN({
+ begin: DOLLAR_STRING,
+ end: DOLLAR_STRING,
+ contains: [
+ {
+ // actually we want them all except SQL; listed are those with known implementations
+ // and XML + JSON just in case
+ subLanguage: [
+ 'pgsql',
+ 'perl',
+ 'python',
+ 'tcl',
+ 'r',
+ 'lua',
+ 'java',
+ 'php',
+ 'ruby',
+ 'bash',
+ 'scheme',
+ 'xml',
+ 'json'
+ ],
+ endsWithParent: true
+ }
+ ]
+ }),
+ // identifiers in quotes
+ {
+ begin: '"',
+ end: '"',
+ contains: [
+ {
+ begin: '""'
+ }
+ ]
+ },
+ // numbers
+ hljs.C_NUMBER_MODE,
+ // comments
+ hljs.C_BLOCK_COMMENT_MODE,
+ COMMENT_MODE,
+ // PL/pgSQL staff
+ // %ROWTYPE, %TYPE, $n
+ {
+ className: 'meta',
+ variants: [
+ { // %TYPE, %ROWTYPE
+ begin: '%(ROW)?TYPE',
+ relevance: 10
+ },
+ { // $n
+ begin: '\\$\\d+'
+ },
+ { // #compiler option
+ begin: '^#\\w',
+ end: '$'
+ }
+ ]
+ },
+ // <>
+ {
+ className: 'symbol',
+ begin: LABEL,
+ relevance: 10
+ }
+ ]
+ };
+}
+
+module.exports = pgsql;
+
+
+/***/ }),
+
+/***/ 16425:
+/***/ ((module) => {
+
+/*
+Language: PHP Template
+Requires: xml.js, php.js
+Author: Josh Goebel
+Website: https://www.php.net
+Category: common
+*/
+
+function phpTemplate(hljs) {
+ return {
+ name: "PHP template",
+ subLanguage: 'xml',
+ contains: [
+ {
+ begin: /<\?(php|=)?/,
+ end: /\?>/,
+ subLanguage: 'php',
+ contains: [
+ // We don't want the php closing tag ?> to close the PHP block when
+ // inside any of the following blocks:
+ {
+ begin: '/\\*',
+ end: '\\*/',
+ skip: true
+ },
+ {
+ begin: 'b"',
+ end: '"',
+ skip: true
+ },
+ {
+ begin: 'b\'',
+ end: '\'',
+ skip: true
+ },
+ hljs.inherit(hljs.APOS_STRING_MODE, {
+ illegal: null,
+ className: null,
+ contains: null,
+ skip: true
+ }),
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ illegal: null,
+ className: null,
+ contains: null,
+ skip: true
+ })
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = phpTemplate;
+
+
+/***/ }),
+
+/***/ 87241:
+/***/ ((module) => {
+
+/*
+Language: Plain text
+Author: Egor Rogov (e.rogov@postgrespro.ru)
+Description: Plain text without any highlighting.
+Category: common
+*/
+
+function plaintext(hljs) {
+ return {
+ name: 'Plain text',
+ aliases: [
+ 'text',
+ 'txt'
+ ],
+ disableAutodetect: true
+ };
+}
+
+module.exports = plaintext;
+
+
+/***/ }),
+
+/***/ 35412:
+/***/ ((module) => {
+
+/*
+Language: Pony
+Author: Joe Eli McIlvain
+Description: Pony is an open-source, object-oriented, actor-model,
+ capabilities-secure, high performance programming language.
+Website: https://www.ponylang.io
+*/
+
+function pony(hljs) {
+ const KEYWORDS = {
+ keyword:
+ 'actor addressof and as be break class compile_error compile_intrinsic ' +
+ 'consume continue delegate digestof do else elseif embed end error ' +
+ 'for fun if ifdef in interface is isnt lambda let match new not object ' +
+ 'or primitive recover repeat return struct then trait try type until ' +
+ 'use var where while with xor',
+ meta:
+ 'iso val tag trn box ref',
+ literal:
+ 'this false true'
+ };
+
+ const TRIPLE_QUOTE_STRING_MODE = {
+ className: 'string',
+ begin: '"""',
+ end: '"""',
+ relevance: 10
+ };
+
+ const QUOTE_STRING_MODE = {
+ className: 'string',
+ begin: '"',
+ end: '"',
+ contains: [ hljs.BACKSLASH_ESCAPE ]
+ };
+
+ const SINGLE_QUOTE_CHAR_MODE = {
+ className: 'string',
+ begin: '\'',
+ end: '\'',
+ contains: [ hljs.BACKSLASH_ESCAPE ],
+ relevance: 0
+ };
+
+ const TYPE_NAME = {
+ className: 'type',
+ begin: '\\b_?[A-Z][\\w]*',
+ relevance: 0
+ };
+
+ const PRIMED_NAME = {
+ begin: hljs.IDENT_RE + '\'',
+ relevance: 0
+ };
+
+ const NUMBER_MODE = {
+ className: 'number',
+ begin: '(-?)(\\b0[xX][a-fA-F0-9]+|\\b0[bB][01]+|(\\b\\d+(_\\d+)?(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)',
+ relevance: 0
+ };
+
+ /**
+ * The `FUNCTION` and `CLASS` modes were intentionally removed to simplify
+ * highlighting and fix cases like
+ * ```
+ * interface Iterator[A: A]
+ * fun has_next(): Bool
+ * fun next(): A?
+ * ```
+ * where it is valid to have a function head without a body
+ */
+
+ return {
+ name: 'Pony',
+ keywords: KEYWORDS,
+ contains: [
+ TYPE_NAME,
+ TRIPLE_QUOTE_STRING_MODE,
+ QUOTE_STRING_MODE,
+ SINGLE_QUOTE_CHAR_MODE,
+ PRIMED_NAME,
+ NUMBER_MODE,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ };
+}
+
+module.exports = pony;
+
+
+/***/ }),
+
+/***/ 47521:
+/***/ ((module) => {
+
+/*
+Language: PowerShell
+Description: PowerShell is a task-based command-line shell and scripting language built on .NET.
+Author: David Mohundro
+Contributors: Nicholas Blumhardt , Victor Zhou , Nicolas Le Gall
+Website: https://docs.microsoft.com/en-us/powershell/
+*/
+
+function powershell(hljs) {
+ const TYPES = [
+ "string",
+ "char",
+ "byte",
+ "int",
+ "long",
+ "bool",
+ "decimal",
+ "single",
+ "double",
+ "DateTime",
+ "xml",
+ "array",
+ "hashtable",
+ "void"
+ ];
+
+ // https://docs.microsoft.com/en-us/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands
+ const VALID_VERBS =
+ 'Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|' +
+ 'Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|' +
+ 'Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|' +
+ 'Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|' +
+ 'ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|' +
+ 'Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|' +
+ 'Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|' +
+ 'Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|' +
+ 'Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|' +
+ 'Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|' +
+ 'Unprotect|Use|ForEach|Sort|Tee|Where';
+
+ const COMPARISON_OPERATORS =
+ '-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|' +
+ '-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|' +
+ '-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|' +
+ '-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|' +
+ '-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|' +
+ '-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|' +
+ '-split|-wildcard|-xor';
+
+ const KEYWORDS = {
+ $pattern: /-?[A-z\.\-]+\b/,
+ keyword:
+ 'if else foreach return do while until elseif begin for trap data dynamicparam ' +
+ 'end break throw param continue finally in switch exit filter try process catch ' +
+ 'hidden static parameter',
+ // "echo" relevance has been set to 0 to avoid auto-detect conflicts with shell transcripts
+ built_in:
+ 'ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp ' +
+ 'cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx ' +
+ 'fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group ' +
+ 'gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi ' +
+ 'iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh ' +
+ 'popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp ' +
+ 'rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp ' +
+ 'spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write'
+ // TODO: 'validate[A-Z]+' can't work in keywords
+ };
+
+ const TITLE_NAME_RE = /\w[\w\d]*((-)[\w\d]+)*/;
+
+ const BACKTICK_ESCAPE = {
+ begin: '`[\\s\\S]',
+ relevance: 0
+ };
+
+ const VAR = {
+ className: 'variable',
+ variants: [
+ {
+ begin: /\$\B/
+ },
+ {
+ className: 'keyword',
+ begin: /\$this/
+ },
+ {
+ begin: /\$[\w\d][\w\d_:]*/
+ }
+ ]
+ };
+
+ const LITERAL = {
+ className: 'literal',
+ begin: /\$(null|true|false)\b/
+ };
+
+ const QUOTE_STRING = {
+ className: "string",
+ variants: [
+ {
+ begin: /"/,
+ end: /"/
+ },
+ {
+ begin: /@"/,
+ end: /^"@/
+ }
+ ],
+ contains: [
+ BACKTICK_ESCAPE,
+ VAR,
+ {
+ className: 'variable',
+ begin: /\$[A-z]/,
+ end: /[^A-z]/
+ }
+ ]
+ };
+
+ const APOS_STRING = {
+ className: 'string',
+ variants: [
+ {
+ begin: /'/,
+ end: /'/
+ },
+ {
+ begin: /@'/,
+ end: /^'@/
+ }
+ ]
+ };
+
+ const PS_HELPTAGS = {
+ className: "doctag",
+ variants: [
+ /* no paramater help tags */
+ {
+ begin: /\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/
+ },
+ /* one parameter help tags */
+ {
+ begin: /\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/
+ }
+ ]
+ };
+
+ const PS_COMMENT = hljs.inherit(
+ hljs.COMMENT(null, null),
+ {
+ variants: [
+ /* single-line comment */
+ {
+ begin: /#/,
+ end: /$/
+ },
+ /* multi-line comment */
+ {
+ begin: /<#/,
+ end: /#>/
+ }
+ ],
+ contains: [ PS_HELPTAGS ]
+ }
+ );
+
+ const CMDLETS = {
+ className: 'built_in',
+ variants: [
+ {
+ begin: '('.concat(VALID_VERBS, ')+(-)[\\w\\d]+')
+ }
+ ]
+ };
+
+ const PS_CLASS = {
+ className: 'class',
+ beginKeywords: 'class enum',
+ end: /\s*[{]/,
+ excludeEnd: true,
+ relevance: 0,
+ contains: [ hljs.TITLE_MODE ]
+ };
+
+ const PS_FUNCTION = {
+ className: 'function',
+ begin: /function\s+/,
+ end: /\s*\{|$/,
+ excludeEnd: true,
+ returnBegin: true,
+ relevance: 0,
+ contains: [
+ {
+ begin: "function",
+ relevance: 0,
+ className: "keyword"
+ },
+ {
+ className: "title",
+ begin: TITLE_NAME_RE,
+ relevance: 0
+ },
+ {
+ begin: /\(/,
+ end: /\)/,
+ className: "params",
+ relevance: 0,
+ contains: [ VAR ]
+ }
+ // CMDLETS
+ ]
+ };
+
+ // Using statment, plus type, plus assembly name.
+ const PS_USING = {
+ begin: /using\s/,
+ end: /$/,
+ returnBegin: true,
+ contains: [
+ QUOTE_STRING,
+ APOS_STRING,
+ {
+ className: 'keyword',
+ begin: /(using|assembly|command|module|namespace|type)/
+ }
+ ]
+ };
+
+ // Comperison operators & function named parameters.
+ const PS_ARGUMENTS = {
+ variants: [
+ // PS literals are pretty verbose so it's a good idea to accent them a bit.
+ {
+ className: 'operator',
+ begin: '('.concat(COMPARISON_OPERATORS, ')\\b')
+ },
+ {
+ className: 'literal',
+ begin: /(-)[\w\d]+/,
+ relevance: 0
+ }
+ ]
+ };
+
+ const HASH_SIGNS = {
+ className: 'selector-tag',
+ begin: /@\B/,
+ relevance: 0
+ };
+
+ // It's a very general rule so I'll narrow it a bit with some strict boundaries
+ // to avoid any possible false-positive collisions!
+ const PS_METHODS = {
+ className: 'function',
+ begin: /\[.*\]\s*[\w]+[ ]??\(/,
+ end: /$/,
+ returnBegin: true,
+ relevance: 0,
+ contains: [
+ {
+ className: 'keyword',
+ begin: '('.concat(
+ KEYWORDS.keyword.toString().replace(/\s/g, '|'
+ ), ')\\b'),
+ endsParent: true,
+ relevance: 0
+ },
+ hljs.inherit(hljs.TITLE_MODE, {
+ endsParent: true
+ })
+ ]
+ };
+
+ const GENTLEMANS_SET = [
+ // STATIC_MEMBER,
+ PS_METHODS,
+ PS_COMMENT,
+ BACKTICK_ESCAPE,
+ hljs.NUMBER_MODE,
+ QUOTE_STRING,
+ APOS_STRING,
+ // PS_NEW_OBJECT_TYPE,
+ CMDLETS,
+ VAR,
+ LITERAL,
+ HASH_SIGNS
+ ];
+
+ const PS_TYPE = {
+ begin: /\[/,
+ end: /\]/,
+ excludeBegin: true,
+ excludeEnd: true,
+ relevance: 0,
+ contains: [].concat(
+ 'self',
+ GENTLEMANS_SET,
+ {
+ begin: "(" + TYPES.join("|") + ")",
+ className: "built_in",
+ relevance: 0
+ },
+ {
+ className: 'type',
+ begin: /[\.\w\d]+/,
+ relevance: 0
+ }
+ )
+ };
+
+ PS_METHODS.contains.unshift(PS_TYPE);
+
+ return {
+ name: 'PowerShell',
+ aliases: [
+ "ps",
+ "ps1"
+ ],
+ case_insensitive: true,
+ keywords: KEYWORDS,
+ contains: GENTLEMANS_SET.concat(
+ PS_CLASS,
+ PS_FUNCTION,
+ PS_USING,
+ PS_ARGUMENTS,
+ PS_TYPE
+ )
+ };
+}
+
+module.exports = powershell;
+
+
+/***/ }),
+
+/***/ 74063:
+/***/ ((module) => {
+
+/*
+Language: Processing
+Description: Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts.
+Author: Erik Paluka
+Website: https://processing.org
+Category: graphics
+*/
+
+function processing(hljs) {
+ return {
+ name: 'Processing',
+ keywords: {
+ keyword: 'BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color ' +
+ 'double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject ' +
+ 'Object StringDict StringList Table TableRow XML ' +
+ // Java keywords
+ 'false synchronized int abstract float private char boolean static null if const ' +
+ 'for true while long throw strictfp finally protected import native final return void ' +
+ 'enum else break transient new catch instanceof byte super volatile case assert short ' +
+ 'package default double public try this switch continue throws protected public private',
+ literal: 'P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI',
+ title: 'setup draw',
+ built_in: 'displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key ' +
+ 'keyCode pixels focused frameCount frameRate height width ' +
+ 'size createGraphics beginDraw createShape loadShape PShape arc ellipse line point ' +
+ 'quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint ' +
+ 'curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex ' +
+ 'endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap ' +
+ 'strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased ' +
+ 'mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour ' +
+ 'millis minute month second year background clear colorMode fill noFill noStroke stroke alpha ' +
+ 'blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY ' +
+ 'screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ' +
+ 'ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle ' +
+ 'pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf ' +
+ 'nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset ' +
+ 'box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings ' +
+ 'loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput ' +
+ 'createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings ' +
+ 'saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale ' +
+ 'shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal ' +
+ 'pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap ' +
+ 'blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont ' +
+ 'loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil ' +
+ 'constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees ' +
+ 'radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed'
+ },
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE
+ ]
+ };
+}
+
+module.exports = processing;
+
+
+/***/ }),
+
+/***/ 47643:
+/***/ ((module) => {
+
+/*
+Language: Python profiler
+Description: Python profiler results
+Author: Brian Beck
+*/
+
+function profile(hljs) {
+ return {
+ name: 'Python profiler',
+ contains: [
+ hljs.C_NUMBER_MODE,
+ {
+ begin: '[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}',
+ end: ':',
+ excludeEnd: true
+ },
+ {
+ begin: '(ncalls|tottime|cumtime)',
+ end: '$',
+ keywords: 'ncalls tottime|10 cumtime|10 filename',
+ relevance: 10
+ },
+ {
+ begin: 'function calls',
+ end: '$',
+ contains: [ hljs.C_NUMBER_MODE ],
+ relevance: 10
+ },
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'string',
+ begin: '\\(',
+ end: '\\)$',
+ excludeBegin: true,
+ excludeEnd: true,
+ relevance: 0
+ }
+ ]
+ };
+}
+
+module.exports = profile;
+
+
+/***/ }),
+
+/***/ 80127:
+/***/ ((module) => {
+
+/*
+Language: Prolog
+Description: Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.
+Author: Raivo Laanemets
+Website: https://en.wikipedia.org/wiki/Prolog
+*/
+
+function prolog(hljs) {
+ const ATOM = {
+
+ begin: /[a-z][A-Za-z0-9_]*/,
+ relevance: 0
+ };
+
+ const VAR = {
+
+ className: 'symbol',
+ variants: [
+ {
+ begin: /[A-Z][a-zA-Z0-9_]*/
+ },
+ {
+ begin: /_[A-Za-z0-9_]*/
+ }
+ ],
+ relevance: 0
+ };
+
+ const PARENTED = {
+
+ begin: /\(/,
+ end: /\)/,
+ relevance: 0
+ };
+
+ const LIST = {
+
+ begin: /\[/,
+ end: /\]/
+ };
+
+ const LINE_COMMENT = {
+
+ className: 'comment',
+ begin: /%/,
+ end: /$/,
+ contains: [ hljs.PHRASAL_WORDS_MODE ]
+ };
+
+ const BACKTICK_STRING = {
+
+ className: 'string',
+ begin: /`/,
+ end: /`/,
+ contains: [ hljs.BACKSLASH_ESCAPE ]
+ };
+
+ const CHAR_CODE = {
+ className: 'string', // 0'a etc.
+ begin: /0'(\\'|.)/
+ };
+
+ const SPACE_CODE = {
+ className: 'string',
+ begin: /0'\\s/ // 0'\s
+ };
+
+ const PRED_OP = { // relevance booster
+ begin: /:-/
+ };
+
+ const inner = [
+
+ ATOM,
+ VAR,
+ PARENTED,
+ PRED_OP,
+ LIST,
+ LINE_COMMENT,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ BACKTICK_STRING,
+ CHAR_CODE,
+ SPACE_CODE,
+ hljs.C_NUMBER_MODE
+ ];
+
+ PARENTED.contains = inner;
+ LIST.contains = inner;
+
+ return {
+ name: 'Prolog',
+ contains: inner.concat([
+ { // relevance booster
+ begin: /\.$/
+ }
+ ])
+ };
+}
+
+module.exports = prolog;
+
+
+/***/ }),
+
+/***/ 9309:
+/***/ ((module) => {
+
+/*
+Language: .properties
+Contributors: Valentin Aitken , Egor Rogov
+Website: https://en.wikipedia.org/wiki/.properties
+Category: common, config
+*/
+
+function properties(hljs) {
+
+ // whitespaces: space, tab, formfeed
+ var WS0 = '[ \\t\\f]*';
+ var WS1 = '[ \\t\\f]+';
+ // delimiter
+ var EQUAL_DELIM = WS0+'[:=]'+WS0;
+ var WS_DELIM = WS1;
+ var DELIM = '(' + EQUAL_DELIM + '|' + WS_DELIM + ')';
+ var KEY_ALPHANUM = '([^\\\\\\W:= \\t\\f\\n]|\\\\.)+';
+ var KEY_OTHER = '([^\\\\:= \\t\\f\\n]|\\\\.)+';
+
+ var DELIM_AND_VALUE = {
+ // skip DELIM
+ end: DELIM,
+ relevance: 0,
+ starts: {
+ // value: everything until end of line (again, taking into account backslashes)
+ className: 'string',
+ end: /$/,
+ relevance: 0,
+ contains: [
+ { begin: '\\\\\\\\'},
+ { begin: '\\\\\\n' }
+ ]
+ }
+ };
+
+ return {
+ name: '.properties',
+ case_insensitive: true,
+ illegal: /\S/,
+ contains: [
+ hljs.COMMENT('^\\s*[!#]', '$'),
+ // key: everything until whitespace or = or : (taking into account backslashes)
+ // case of a "normal" key
+ {
+ returnBegin: true,
+ variants: [
+ { begin: KEY_ALPHANUM + EQUAL_DELIM, relevance: 1 },
+ { begin: KEY_ALPHANUM + WS_DELIM, relevance: 0 }
+ ],
+ contains: [
+ {
+ className: 'attr',
+ begin: KEY_ALPHANUM,
+ endsParent: true,
+ relevance: 0
+ }
+ ],
+ starts: DELIM_AND_VALUE
+ },
+ // case of key containing non-alphanumeric chars => relevance = 0
+ {
+ begin: KEY_OTHER + DELIM,
+ returnBegin: true,
+ relevance: 0,
+ contains: [
+ {
+ className: 'meta',
+ begin: KEY_OTHER,
+ endsParent: true,
+ relevance: 0
+ }
+ ],
+ starts: DELIM_AND_VALUE
+ },
+ // case of an empty key
+ {
+ className: 'attr',
+ relevance: 0,
+ begin: KEY_OTHER + WS0 + '$'
+ }
+ ]
+ };
+}
+
+module.exports = properties;
+
+
+/***/ }),
+
+/***/ 61719:
+/***/ ((module) => {
+
+/*
+Language: Protocol Buffers
+Author: Dan Tao
+Description: Protocol buffer message definition format
+Website: https://developers.google.com/protocol-buffers/docs/proto3
+Category: protocols
+*/
+
+function protobuf(hljs) {
+ return {
+ name: 'Protocol Buffers',
+ keywords: {
+ keyword: 'package import option optional required repeated group oneof',
+ built_in: 'double float int32 int64 uint32 uint64 sint32 sint64 ' +
+ 'fixed32 fixed64 sfixed32 sfixed64 bool string bytes',
+ literal: 'true false'
+ },
+ contains: [
+ hljs.QUOTE_STRING_MODE,
+ hljs.NUMBER_MODE,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ {
+ className: 'class',
+ beginKeywords: 'message enum service', end: /\{/,
+ illegal: /\n/,
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {
+ starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title
+ })
+ ]
+ },
+ {
+ className: 'function',
+ beginKeywords: 'rpc',
+ end: /[{;]/, excludeEnd: true,
+ keywords: 'rpc returns'
+ },
+ { // match enum items (relevance)
+ // BLAH = ...;
+ begin: /^\s*[A-Z_]+(?=\s*=[^\n]+;$)/
+ }
+ ]
+ };
+}
+
+module.exports = protobuf;
+
+
+/***/ }),
+
+/***/ 29854:
+/***/ ((module) => {
+
+/*
+Language: Puppet
+Author: Jose Molina Colmenero
+Website: https://puppet.com/docs
+Category: config
+*/
+
+function puppet(hljs) {
+ const PUPPET_KEYWORDS = {
+ keyword:
+ /* language keywords */
+ 'and case default else elsif false if in import enherits node or true undef unless main settings $string ',
+ literal:
+ /* metaparameters */
+ 'alias audit before loglevel noop require subscribe tag ' +
+ /* normal attributes */
+ 'owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check ' +
+ 'en_address ip_address realname command environment hour monute month monthday special target weekday ' +
+ 'creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore ' +
+ 'links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source ' +
+ 'souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ' +
+ 'ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel ' +
+ 'native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options ' +
+ 'device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use ' +
+ 'message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform ' +
+ 'responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running ' +
+ 'start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age ' +
+ 'password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled ' +
+ 'enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist ' +
+ 'priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey ' +
+ 'sslverify mounted',
+ built_in:
+ /* core facts */
+ 'architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers ' +
+ 'domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ' +
+ 'ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion ' +
+ 'kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease ' +
+ 'lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major ' +
+ 'macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease ' +
+ 'operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion ' +
+ 'rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced ' +
+ 'selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime ' +
+ 'uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version'
+ };
+
+ const COMMENT = hljs.COMMENT('#', '$');
+
+ const IDENT_RE = '([A-Za-z_]|::)(\\w|::)*';
+
+ const TITLE = hljs.inherit(hljs.TITLE_MODE, {
+ begin: IDENT_RE
+ });
+
+ const VARIABLE = {
+ className: 'variable',
+ begin: '\\$' + IDENT_RE
+ };
+
+ const STRING = {
+ className: 'string',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ VARIABLE
+ ],
+ variants: [
+ {
+ begin: /'/,
+ end: /'/
+ },
+ {
+ begin: /"/,
+ end: /"/
+ }
+ ]
+ };
+
+ return {
+ name: 'Puppet',
+ aliases: [ 'pp' ],
+ contains: [
+ COMMENT,
+ VARIABLE,
+ STRING,
+ {
+ beginKeywords: 'class',
+ end: '\\{|;',
+ illegal: /=/,
+ contains: [
+ TITLE,
+ COMMENT
+ ]
+ },
+ {
+ beginKeywords: 'define',
+ end: /\{/,
+ contains: [
+ {
+ className: 'section',
+ begin: hljs.IDENT_RE,
+ endsParent: true
+ }
+ ]
+ },
+ {
+ begin: hljs.IDENT_RE + '\\s+\\{',
+ returnBegin: true,
+ end: /\S/,
+ contains: [
+ {
+ className: 'keyword',
+ begin: hljs.IDENT_RE
+ },
+ {
+ begin: /\{/,
+ end: /\}/,
+ keywords: PUPPET_KEYWORDS,
+ relevance: 0,
+ contains: [
+ STRING,
+ COMMENT,
+ {
+ begin: '[a-zA-Z_]+\\s*=>',
+ returnBegin: true,
+ end: '=>',
+ contains: [
+ {
+ className: 'attr',
+ begin: hljs.IDENT_RE
+ }
+ ]
+ },
+ {
+ className: 'number',
+ begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b',
+ relevance: 0
+ },
+ VARIABLE
+ ]
+ }
+ ],
+ relevance: 0
+ }
+ ]
+ };
+}
+
+module.exports = puppet;
+
+
+/***/ }),
+
+/***/ 30006:
+/***/ ((module) => {
+
+/*
+Language: PureBASIC
+Author: Tristano Ajmone
+Description: Syntax highlighting for PureBASIC (v.5.00-5.60). No inline ASM highlighting. (v.1.2, May 2017)
+Credits: I've taken inspiration from the PureBasic language file for GeSHi, created by Gustavo Julio Fiorenza (GuShH).
+Website: https://www.purebasic.com
+*/
+
+// Base deafult colors in PB IDE: background: #FFFFDF; foreground: #000000;
+
+function purebasic(hljs) {
+ const STRINGS = { // PB IDE color: #0080FF (Azure Radiance)
+ className: 'string',
+ begin: '(~)?"',
+ end: '"',
+ illegal: '\\n'
+ };
+ const CONSTANTS = { // PB IDE color: #924B72 (Cannon Pink)
+ // "#" + a letter or underscore + letters, digits or underscores + (optional) "$"
+ className: 'symbol',
+ begin: '#[a-zA-Z_]\\w*\\$?'
+ };
+
+ return {
+ name: 'PureBASIC',
+ aliases: [
+ 'pb',
+ 'pbi'
+ ],
+ keywords: // PB IDE color: #006666 (Blue Stone) + Bold
+ // Keywords from all version of PureBASIC 5.00 upward ...
+ 'Align And Array As Break CallDebugger Case CompilerCase CompilerDefault ' +
+ 'CompilerElse CompilerElseIf CompilerEndIf CompilerEndSelect CompilerError ' +
+ 'CompilerIf CompilerSelect CompilerWarning Continue Data DataSection Debug ' +
+ 'DebugLevel Declare DeclareC DeclareCDLL DeclareDLL DeclareModule Default ' +
+ 'Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM ' +
+ 'EnableDebugger EnableExplicit End EndDataSection EndDeclareModule EndEnumeration ' +
+ 'EndIf EndImport EndInterface EndMacro EndModule EndProcedure EndSelect ' +
+ 'EndStructure EndStructureUnion EndWith Enumeration EnumerationBinary Extends ' +
+ 'FakeReturn For ForEach ForEver Global Gosub Goto If Import ImportC ' +
+ 'IncludeBinary IncludeFile IncludePath Interface List Macro MacroExpandedCount ' +
+ 'Map Module NewList NewMap Next Not Or Procedure ProcedureC ' +
+ 'ProcedureCDLL ProcedureDLL ProcedureReturn Protected Prototype PrototypeC ReDim ' +
+ 'Read Repeat Restore Return Runtime Select Shared Static Step Structure ' +
+ 'StructureUnion Swap Threaded To UndefineMacro Until Until UnuseModule ' +
+ 'UseModule Wend While With XIncludeFile XOr',
+ contains: [
+ // COMMENTS | PB IDE color: #00AAAA (Persian Green)
+ hljs.COMMENT(';', '$', {
+ relevance: 0
+ }),
+
+ { // PROCEDURES DEFINITIONS
+ className: 'function',
+ begin: '\\b(Procedure|Declare)(C|CDLL|DLL)?\\b',
+ end: '\\(',
+ excludeEnd: true,
+ returnBegin: true,
+ contains: [
+ { // PROCEDURE KEYWORDS | PB IDE color: #006666 (Blue Stone) + Bold
+ className: 'keyword',
+ begin: '(Procedure|Declare)(C|CDLL|DLL)?',
+ excludeEnd: true
+ },
+ { // PROCEDURE RETURN TYPE SETTING | PB IDE color: #000000 (Black)
+ className: 'type',
+ begin: '\\.\\w*'
+ // end: ' ',
+ },
+ hljs.UNDERSCORE_TITLE_MODE // PROCEDURE NAME | PB IDE color: #006666 (Blue Stone)
+ ]
+ },
+ STRINGS,
+ CONSTANTS
+ ]
+ };
+}
+
+/* ==============================================================================
+ CHANGELOG
+ ==============================================================================
+ - v.1.2 (2017-05-12)
+ -- BUG-FIX: Some keywords were accidentally joyned together. Now fixed.
+ - v.1.1 (2017-04-30)
+ -- Updated to PureBASIC 5.60.
+ -- Keywords list now built by extracting them from the PureBASIC SDK's
+ "SyntaxHilighting.dll" (from each PureBASIC version). Tokens from each
+ version are added to the list, and renamed or removed tokens are kept
+ for the sake of covering all versions of the language from PureBASIC
+ v5.00 upward. (NOTE: currently, there are no renamed or deprecated
+ tokens in the keywords list). For more info, see:
+ -- http://www.purebasic.fr/english/viewtopic.php?&p=506269
+ -- https://github.com/tajmone/purebasic-archives/tree/master/syntax-highlighting/guidelines
+ - v.1.0 (April 2016)
+ -- First release
+ -- Keywords list taken and adapted from GuShH's (Gustavo Julio Fiorenza)
+ PureBasic language file for GeSHi:
+ -- https://github.com/easybook/geshi/blob/master/geshi/purebasic.php
+*/
+
+module.exports = purebasic;
+
+
+/***/ }),
+
+/***/ 7078:
+/***/ ((module) => {
+
+/*
+Language: Python REPL
+Requires: python.js
+Author: Josh Goebel
+Category: common
+*/
+
+function pythonRepl(hljs) {
+ return {
+ aliases: [ 'pycon' ],
+ contains: [
+ {
+ className: 'meta',
+ starts: {
+ // a space separates the REPL prefix from the actual code
+ // this is purely for cleaner HTML output
+ end: / |$/,
+ starts: {
+ end: '$',
+ subLanguage: 'python'
+ }
+ },
+ variants: [
+ {
+ begin: /^>>>(?=[ ]|$)/
+ },
+ {
+ begin: /^\.\.\.(?=[ ]|$)/
+ }
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = pythonRepl;
+
+
+/***/ }),
+
+/***/ 16201:
+/***/ ((module) => {
+
+/*
+Language: Q
+Description: Q is a vector-based functional paradigm programming language built into the kdb+ database.
+ (K/Q/Kdb+ from Kx Systems)
+Author: Sergey Vidyuk
+Website: https://kx.com/connect-with-us/developers/
+*/
+
+function q(hljs) {
+ const KEYWORDS = {
+ $pattern: /(`?)[A-Za-z0-9_]+\b/,
+ keyword:
+ 'do while select delete by update from',
+ literal:
+ '0b 1b',
+ built_in:
+ 'neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum',
+ type:
+ '`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid'
+ };
+
+ return {
+ name: 'Q',
+ aliases: [
+ 'k',
+ 'kdb'
+ ],
+ keywords: KEYWORDS,
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE
+ ]
+ };
+}
+
+module.exports = q;
+
+
+/***/ }),
+
+/***/ 32348:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: QML
+Requires: javascript.js, xml.js
+Author: John Foster
+Description: Syntax highlighting for the Qt Quick QML scripting language, based mostly off
+ the JavaScript parser.
+Website: https://doc.qt.io/qt-5/qmlapplications.html
+Category: scripting
+*/
+
+function qml(hljs) {
+ const KEYWORDS = {
+ keyword:
+ 'in of on if for while finally var new function do return void else break catch ' +
+ 'instanceof with throw case default try this switch continue typeof delete ' +
+ 'let yield const export super debugger as async await import',
+ literal:
+ 'true false null undefined NaN Infinity',
+ built_in:
+ 'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +
+ 'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +
+ 'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +
+ 'TypeError URIError Number Math Date String RegExp Array Float32Array ' +
+ 'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +
+ 'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +
+ 'module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect ' +
+ 'Behavior bool color coordinate date double enumeration font geocircle georectangle ' +
+ 'geoshape int list matrix4x4 parent point quaternion real rect ' +
+ 'size string url variant vector2d vector3d vector4d ' +
+ 'Promise'
+ };
+
+ const QML_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9\\._]*';
+
+ // Isolate property statements. Ends at a :, =, ;, ,, a comment or end of line.
+ // Use property class.
+ const PROPERTY = {
+ className: 'keyword',
+ begin: '\\bproperty\\b',
+ starts: {
+ className: 'string',
+ end: '(:|=|;|,|//|/\\*|$)',
+ returnEnd: true
+ }
+ };
+
+ // Isolate signal statements. Ends at a ) a comment or end of line.
+ // Use property class.
+ const SIGNAL = {
+ className: 'keyword',
+ begin: '\\bsignal\\b',
+ starts: {
+ className: 'string',
+ end: '(\\(|:|=|;|,|//|/\\*|$)',
+ returnEnd: true
+ }
+ };
+
+ // id: is special in QML. When we see id: we want to mark the id: as attribute and
+ // emphasize the token following.
+ const ID_ID = {
+ className: 'attribute',
+ begin: '\\bid\\s*:',
+ starts: {
+ className: 'string',
+ end: QML_IDENT_RE,
+ returnEnd: false
+ }
+ };
+
+ // Find QML object attribute. An attribute is a QML identifier followed by :.
+ // Unfortunately it's hard to know where it ends, as it may contain scalars,
+ // objects, object definitions, or javascript. The true end is either when the parent
+ // ends or the next attribute is detected.
+ const QML_ATTRIBUTE = {
+ begin: QML_IDENT_RE + '\\s*:',
+ returnBegin: true,
+ contains: [
+ {
+ className: 'attribute',
+ begin: QML_IDENT_RE,
+ end: '\\s*:',
+ excludeEnd: true,
+ relevance: 0
+ }
+ ],
+ relevance: 0
+ };
+
+ // Find QML object. A QML object is a QML identifier followed by { and ends at the matching }.
+ // All we really care about is finding IDENT followed by { and just mark up the IDENT and ignore the {.
+ const QML_OBJECT = {
+ begin: concat(QML_IDENT_RE, /\s*\{/),
+ end: /\{/,
+ returnBegin: true,
+ relevance: 0,
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: QML_IDENT_RE
+ })
+ ]
+ };
+
+ return {
+ name: 'QML',
+ aliases: [ 'qt' ],
+ case_insensitive: false,
+ keywords: KEYWORDS,
+ contains: [
+ {
+ className: 'meta',
+ begin: /^\s*['"]use (strict|asm)['"]/
+ },
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ { // template string
+ className: 'string',
+ begin: '`',
+ end: '`',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ {
+ className: 'subst',
+ begin: '\\$\\{',
+ end: '\\}'
+ }
+ ]
+ },
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ {
+ className: 'number',
+ variants: [
+ {
+ begin: '\\b(0[bB][01]+)'
+ },
+ {
+ begin: '\\b(0[oO][0-7]+)'
+ },
+ {
+ begin: hljs.C_NUMBER_RE
+ }
+ ],
+ relevance: 0
+ },
+ { // "value" container
+ begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*',
+ keywords: 'return throw case',
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.REGEXP_MODE,
+ { // E4X / JSX
+ begin: /,
+ end: />\s*[);\]]/,
+ relevance: 0,
+ subLanguage: 'xml'
+ }
+ ],
+ relevance: 0
+ },
+ SIGNAL,
+ PROPERTY,
+ {
+ className: 'function',
+ beginKeywords: 'function',
+ end: /\{/,
+ excludeEnd: true,
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {
+ begin: /[A-Za-z$_][0-9A-Za-z$_]*/
+ }),
+ {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ excludeBegin: true,
+ excludeEnd: true,
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ }
+ ],
+ illegal: /\[|%/
+ },
+ {
+ // hack: prevents detection of keywords after dots
+ begin: '\\.' + hljs.IDENT_RE,
+ relevance: 0
+ },
+ ID_ID,
+ QML_ATTRIBUTE,
+ QML_OBJECT
+ ],
+ illegal: /#/
+ };
+}
+
+module.exports = qml;
+
+
+/***/ }),
+
+/***/ 40720:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function lookahead(re) {
+ return concat('(?=', re, ')');
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: R
+Description: R is a free software environment for statistical computing and graphics.
+Author: Joe Cheng
+Contributors: Konrad Rudolph
+Website: https://www.r-project.org
+Category: common,scientific
+*/
+
+/** @type LanguageFn */
+function r(hljs) {
+ // Identifiers in R cannot start with `_`, but they can start with `.` if it
+ // is not immediately followed by a digit.
+ // R also supports quoted identifiers, which are near-arbitrary sequences
+ // delimited by backticks (`…`), which may contain escape sequences. These are
+ // handled in a separate mode. See `test/markup/r/names.txt` for examples.
+ // FIXME: Support Unicode identifiers.
+ const IDENT_RE = /(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/;
+ const SIMPLE_IDENT = /[a-zA-Z][a-zA-Z_0-9]*/;
+
+ return {
+ name: 'R',
+
+ // only in Haskell, not R
+ illegal: /->/,
+ keywords: {
+ $pattern: IDENT_RE,
+ keyword:
+ 'function if in break next repeat else for while',
+ literal:
+ 'NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 ' +
+ 'NA_character_|10 NA_complex_|10',
+ built_in:
+ // Builtin constants
+ 'LETTERS letters month.abb month.name pi T F ' +
+ // Primitive functions
+ // These are all the functions in `base` that are implemented as a
+ // `.Primitive`, minus those functions that are also keywords.
+ 'abs acos acosh all any anyNA Arg as.call as.character ' +
+ 'as.complex as.double as.environment as.integer as.logical ' +
+ 'as.null.default as.numeric as.raw asin asinh atan atanh attr ' +
+ 'attributes baseenv browser c call ceiling class Conj cos cosh ' +
+ 'cospi cummax cummin cumprod cumsum digamma dim dimnames ' +
+ 'emptyenv exp expression floor forceAndCall gamma gc.time ' +
+ 'globalenv Im interactive invisible is.array is.atomic is.call ' +
+ 'is.character is.complex is.double is.environment is.expression ' +
+ 'is.finite is.function is.infinite is.integer is.language ' +
+ 'is.list is.logical is.matrix is.na is.name is.nan is.null ' +
+ 'is.numeric is.object is.pairlist is.raw is.recursive is.single ' +
+ 'is.symbol lazyLoadDBfetch length lgamma list log max min ' +
+ 'missing Mod names nargs nzchar oldClass on.exit pos.to.env ' +
+ 'proc.time prod quote range Re rep retracemem return round ' +
+ 'seq_along seq_len seq.int sign signif sin sinh sinpi sqrt ' +
+ 'standardGeneric substitute sum switch tan tanh tanpi tracemem ' +
+ 'trigamma trunc unclass untracemem UseMethod xtfrm',
+ },
+ compilerExtensions: [
+ // allow beforeMatch to act as a "qualifier" for the match
+ // the full match begin must be [beforeMatch][begin]
+ (mode, parent) => {
+ if (!mode.beforeMatch) return;
+ // starts conflicts with endsParent which we need to make sure the child
+ // rule is not matched multiple times
+ if (mode.starts) throw new Error("beforeMatch cannot be used with starts");
+
+ const originalMode = Object.assign({}, mode);
+ Object.keys(mode).forEach((key) => { delete mode[key]; });
+
+ mode.begin = concat(originalMode.beforeMatch, lookahead(originalMode.begin));
+ mode.starts = {
+ relevance: 0,
+ contains: [
+ Object.assign(originalMode, { endsParent: true })
+ ]
+ };
+ mode.relevance = 0;
+
+ delete originalMode.beforeMatch;
+ }
+ ],
+ contains: [
+ // Roxygen comments
+ hljs.COMMENT(
+ /#'/,
+ /$/,
+ {
+ contains: [
+ {
+ // Handle `@examples` separately to cause all subsequent code
+ // until the next `@`-tag on its own line to be kept as-is,
+ // preventing highlighting. This code is example R code, so nested
+ // doctags shouldn’t be treated as such. See
+ // `test/markup/r/roxygen.txt` for an example.
+ className: 'doctag',
+ begin: '@examples',
+ starts: {
+ contains: [
+ { begin: /\n/ },
+ {
+ begin: /#'\s*(?=@[a-zA-Z]+)/,
+ endsParent: true,
+ },
+ {
+ begin: /#'/,
+ end: /$/,
+ excludeBegin: true,
+ }
+ ]
+ }
+ },
+ {
+ // Handle `@param` to highlight the parameter name following
+ // after.
+ className: 'doctag',
+ begin: '@param',
+ end: /$/,
+ contains: [
+ {
+ className: 'variable',
+ variants: [
+ { begin: IDENT_RE },
+ { begin: /`(?:\\.|[^`\\])+`/ }
+ ],
+ endsParent: true
+ }
+ ]
+ },
+ {
+ className: 'doctag',
+ begin: /@[a-zA-Z]+/
+ },
+ {
+ className: 'meta-keyword',
+ begin: /\\[a-zA-Z]+/,
+ }
+ ]
+ }
+ ),
+
+ hljs.HASH_COMMENT_MODE,
+
+ {
+ className: 'string',
+ contains: [hljs.BACKSLASH_ESCAPE],
+ variants: [
+ hljs.END_SAME_AS_BEGIN({ begin: /[rR]"(-*)\(/, end: /\)(-*)"/ }),
+ hljs.END_SAME_AS_BEGIN({ begin: /[rR]"(-*)\{/, end: /\}(-*)"/ }),
+ hljs.END_SAME_AS_BEGIN({ begin: /[rR]"(-*)\[/, end: /\](-*)"/ }),
+ hljs.END_SAME_AS_BEGIN({ begin: /[rR]'(-*)\(/, end: /\)(-*)'/ }),
+ hljs.END_SAME_AS_BEGIN({ begin: /[rR]'(-*)\{/, end: /\}(-*)'/ }),
+ hljs.END_SAME_AS_BEGIN({ begin: /[rR]'(-*)\[/, end: /\](-*)'/ }),
+ {begin: '"', end: '"', relevance: 0},
+ {begin: "'", end: "'", relevance: 0}
+ ],
+ },
+ {
+ className: 'number',
+ relevance: 0,
+ beforeMatch: /([^a-zA-Z0-9._])/, // not part of an identifier
+ variants: [
+ // TODO: replace with negative look-behind when available
+ // { begin: /(? {
+
+/*
+Language: ReasonML
+Description: Reason lets you write simple, fast and quality type safe code while leveraging both the JavaScript & OCaml ecosystems.
+Website: https://reasonml.github.io
+Author: Gidi Meir Morris
+Category: functional
+*/
+function reasonml(hljs) {
+ function orReValues(ops) {
+ return ops
+ .map(function(op) {
+ return op
+ .split('')
+ .map(function(char) {
+ return '\\' + char;
+ })
+ .join('');
+ })
+ .join('|');
+ }
+
+ const RE_IDENT = '~?[a-z$_][0-9a-zA-Z$_]*';
+ const RE_MODULE_IDENT = '`?[A-Z$_][0-9a-zA-Z$_]*';
+
+ const RE_PARAM_TYPEPARAM = '\'?[a-z$_][0-9a-z$_]*';
+ const RE_PARAM_TYPE = '\\s*:\\s*[a-z$_][0-9a-z$_]*(\\(\\s*(' + RE_PARAM_TYPEPARAM + '\\s*(,' + RE_PARAM_TYPEPARAM + '\\s*)*)?\\))?';
+ const RE_PARAM = RE_IDENT + '(' + RE_PARAM_TYPE + '){0,2}';
+ const RE_OPERATOR = "(" + orReValues([
+ '||',
+ '++',
+ '**',
+ '+.',
+ '*',
+ '/',
+ '*.',
+ '/.',
+ '...'
+ ]) + "|\\|>|&&|==|===)";
+ const RE_OPERATOR_SPACED = "\\s+" + RE_OPERATOR + "\\s+";
+
+ const KEYWORDS = {
+ keyword:
+ 'and as asr assert begin class constraint do done downto else end exception external ' +
+ 'for fun function functor if in include inherit initializer ' +
+ 'land lazy let lor lsl lsr lxor match method mod module mutable new nonrec ' +
+ 'object of open or private rec sig struct then to try type val virtual when while with',
+ built_in:
+ 'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ',
+ literal:
+ 'true false'
+ };
+
+ const RE_NUMBER = '\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +
+ '0[oO][0-7_]+[Lln]?|' +
+ '0[bB][01_]+[Lln]?|' +
+ '[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)';
+
+ const NUMBER_MODE = {
+ className: 'number',
+ relevance: 0,
+ variants: [
+ {
+ begin: RE_NUMBER
+ },
+ {
+ begin: '\\(-' + RE_NUMBER + '\\)'
+ }
+ ]
+ };
+
+ const OPERATOR_MODE = {
+ className: 'operator',
+ relevance: 0,
+ begin: RE_OPERATOR
+ };
+ const LIST_CONTENTS_MODES = [
+ {
+ className: 'identifier',
+ relevance: 0,
+ begin: RE_IDENT
+ },
+ OPERATOR_MODE,
+ NUMBER_MODE
+ ];
+
+ const MODULE_ACCESS_CONTENTS = [
+ hljs.QUOTE_STRING_MODE,
+ OPERATOR_MODE,
+ {
+ className: 'module',
+ begin: "\\b" + RE_MODULE_IDENT,
+ returnBegin: true,
+ end: "\.",
+ contains: [
+ {
+ className: 'identifier',
+ begin: RE_MODULE_IDENT,
+ relevance: 0
+ }
+ ]
+ }
+ ];
+
+ const PARAMS_CONTENTS = [
+ {
+ className: 'module',
+ begin: "\\b" + RE_MODULE_IDENT,
+ returnBegin: true,
+ end: "\.",
+ relevance: 0,
+ contains: [
+ {
+ className: 'identifier',
+ begin: RE_MODULE_IDENT,
+ relevance: 0
+ }
+ ]
+ }
+ ];
+
+ const PARAMS_MODE = {
+ begin: RE_IDENT,
+ end: '(,|\\n|\\))',
+ relevance: 0,
+ contains: [
+ OPERATOR_MODE,
+ {
+ className: 'typing',
+ begin: ':',
+ end: '(,|\\n)',
+ returnBegin: true,
+ relevance: 0,
+ contains: PARAMS_CONTENTS
+ }
+ ]
+ };
+
+ const FUNCTION_BLOCK_MODE = {
+ className: 'function',
+ relevance: 0,
+ keywords: KEYWORDS,
+ variants: [
+ {
+ begin: '\\s(\\(\\.?.*?\\)|' + RE_IDENT + ')\\s*=>',
+ end: '\\s*=>',
+ returnBegin: true,
+ relevance: 0,
+ contains: [
+ {
+ className: 'params',
+ variants: [
+ {
+ begin: RE_IDENT
+ },
+ {
+ begin: RE_PARAM
+ },
+ {
+ begin: /\(\s*\)/
+ }
+ ]
+ }
+ ]
+ },
+ {
+ begin: '\\s\\(\\.?[^;\\|]*\\)\\s*=>',
+ end: '\\s=>',
+ returnBegin: true,
+ relevance: 0,
+ contains: [
+ {
+ className: 'params',
+ relevance: 0,
+ variants: [ PARAMS_MODE ]
+ }
+ ]
+ },
+ {
+ begin: '\\(\\.\\s' + RE_IDENT + '\\)\\s*=>'
+ }
+ ]
+ };
+ MODULE_ACCESS_CONTENTS.push(FUNCTION_BLOCK_MODE);
+
+ const CONSTRUCTOR_MODE = {
+ className: 'constructor',
+ begin: RE_MODULE_IDENT + '\\(',
+ end: '\\)',
+ illegal: '\\n',
+ keywords: KEYWORDS,
+ contains: [
+ hljs.QUOTE_STRING_MODE,
+ OPERATOR_MODE,
+ {
+ className: 'params',
+ begin: '\\b' + RE_IDENT
+ }
+ ]
+ };
+
+ const PATTERN_MATCH_BLOCK_MODE = {
+ className: 'pattern-match',
+ begin: '\\|',
+ returnBegin: true,
+ keywords: KEYWORDS,
+ end: '=>',
+ relevance: 0,
+ contains: [
+ CONSTRUCTOR_MODE,
+ OPERATOR_MODE,
+ {
+ relevance: 0,
+ className: 'constructor',
+ begin: RE_MODULE_IDENT
+ }
+ ]
+ };
+
+ const MODULE_ACCESS_MODE = {
+ className: 'module-access',
+ keywords: KEYWORDS,
+ returnBegin: true,
+ variants: [
+ {
+ begin: "\\b(" + RE_MODULE_IDENT + "\\.)+" + RE_IDENT
+ },
+ {
+ begin: "\\b(" + RE_MODULE_IDENT + "\\.)+\\(",
+ end: "\\)",
+ returnBegin: true,
+ contains: [
+ FUNCTION_BLOCK_MODE,
+ {
+ begin: '\\(',
+ end: '\\)',
+ skip: true
+ }
+ ].concat(MODULE_ACCESS_CONTENTS)
+ },
+ {
+ begin: "\\b(" + RE_MODULE_IDENT + "\\.)+\\{",
+ end: /\}/
+ }
+ ],
+ contains: MODULE_ACCESS_CONTENTS
+ };
+
+ PARAMS_CONTENTS.push(MODULE_ACCESS_MODE);
+
+ return {
+ name: 'ReasonML',
+ aliases: [ 're' ],
+ keywords: KEYWORDS,
+ illegal: '(:-|:=|\\$\\{|\\+=)',
+ contains: [
+ hljs.COMMENT('/\\*', '\\*/', {
+ illegal: '^(#,\\/\\/)'
+ }),
+ {
+ className: 'character',
+ begin: '\'(\\\\[^\']+|[^\'])\'',
+ illegal: '\\n',
+ relevance: 0
+ },
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'literal',
+ begin: '\\(\\)',
+ relevance: 0
+ },
+ {
+ className: 'literal',
+ begin: '\\[\\|',
+ end: '\\|\\]',
+ relevance: 0,
+ contains: LIST_CONTENTS_MODES
+ },
+ {
+ className: 'literal',
+ begin: '\\[',
+ end: '\\]',
+ relevance: 0,
+ contains: LIST_CONTENTS_MODES
+ },
+ CONSTRUCTOR_MODE,
+ {
+ className: 'operator',
+ begin: RE_OPERATOR_SPACED,
+ illegal: '-->',
+ relevance: 0
+ },
+ NUMBER_MODE,
+ hljs.C_LINE_COMMENT_MODE,
+ PATTERN_MATCH_BLOCK_MODE,
+ FUNCTION_BLOCK_MODE,
+ {
+ className: 'module-def',
+ begin: "\\bmodule\\s+" + RE_IDENT + "\\s+" + RE_MODULE_IDENT + "\\s+=\\s+\\{",
+ end: /\}/,
+ returnBegin: true,
+ keywords: KEYWORDS,
+ relevance: 0,
+ contains: [
+ {
+ className: 'module',
+ relevance: 0,
+ begin: RE_MODULE_IDENT
+ },
+ {
+ begin: /\{/,
+ end: /\}/,
+ skip: true
+ }
+ ].concat(MODULE_ACCESS_CONTENTS)
+ },
+ MODULE_ACCESS_MODE
+ ]
+ };
+}
+
+module.exports = reasonml;
+
+
+/***/ }),
+
+/***/ 38035:
+/***/ ((module) => {
+
+/*
+Language: RenderMan RIB
+Author: Konstantin Evdokimenko
+Contributors: Shuen-Huei Guan
+Website: https://renderman.pixar.com/resources/RenderMan_20/ribBinding.html
+Category: graphics
+*/
+
+function rib(hljs) {
+ return {
+ name: 'RenderMan RIB',
+ keywords:
+ 'ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis ' +
+ 'Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone ' +
+ 'CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail ' +
+ 'DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format ' +
+ 'FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry ' +
+ 'Hider Hyperboloid Identity Illuminate Imager Interior LightSource ' +
+ 'MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte ' +
+ 'MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option ' +
+ 'Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples ' +
+ 'PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection ' +
+ 'Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ' +
+ 'ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere ' +
+ 'SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd ' +
+ 'TransformPoints Translate TrimCurve WorldBegin WorldEnd',
+ illegal: '',
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ hljs.C_NUMBER_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE
+ ]
+ };
+}
+
+module.exports = rib;
+
+
+/***/ }),
+
+/***/ 16826:
+/***/ ((module) => {
+
+/*
+Language: Roboconf
+Author: Vincent Zurczak
+Description: Syntax highlighting for Roboconf's DSL
+Website: http://roboconf.net
+Category: config
+*/
+
+function roboconf(hljs) {
+ const IDENTIFIER = '[a-zA-Z-_][^\\n{]+\\{';
+
+ const PROPERTY = {
+ className: 'attribute',
+ begin: /[a-zA-Z-_]+/,
+ end: /\s*:/,
+ excludeEnd: true,
+ starts: {
+ end: ';',
+ relevance: 0,
+ contains: [
+ {
+ className: 'variable',
+ begin: /\.[a-zA-Z-_]+/
+ },
+ {
+ className: 'keyword',
+ begin: /\(optional\)/
+ }
+ ]
+ }
+ };
+
+ return {
+ name: 'Roboconf',
+ aliases: [
+ 'graph',
+ 'instances'
+ ],
+ case_insensitive: true,
+ keywords: 'import',
+ contains: [
+ // Facet sections
+ {
+ begin: '^facet ' + IDENTIFIER,
+ end: /\}/,
+ keywords: 'facet',
+ contains: [
+ PROPERTY,
+ hljs.HASH_COMMENT_MODE
+ ]
+ },
+
+ // Instance sections
+ {
+ begin: '^\\s*instance of ' + IDENTIFIER,
+ end: /\}/,
+ keywords: 'name count channels instance-data instance-state instance of',
+ illegal: /\S/,
+ contains: [
+ 'self',
+ PROPERTY,
+ hljs.HASH_COMMENT_MODE
+ ]
+ },
+
+ // Component sections
+ {
+ begin: '^' + IDENTIFIER,
+ end: /\}/,
+ contains: [
+ PROPERTY,
+ hljs.HASH_COMMENT_MODE
+ ]
+ },
+
+ // Comments
+ hljs.HASH_COMMENT_MODE
+ ]
+ };
+}
+
+module.exports = roboconf;
+
+
+/***/ }),
+
+/***/ 13071:
+/***/ ((module) => {
+
+/*
+Language: Microtik RouterOS script
+Author: Ivan Dementev
+Description: Scripting host provides a way to automate some router maintenance tasks by means of executing user-defined scripts bounded to some event occurrence
+Website: https://wiki.mikrotik.com/wiki/Manual:Scripting
+*/
+
+// Colors from RouterOS terminal:
+// green - #0E9A00
+// teal - #0C9A9A
+// purple - #99069A
+// light-brown - #9A9900
+
+function routeros(hljs) {
+ const STATEMENTS = 'foreach do while for if from to step else on-error and or not in';
+
+ // Global commands: Every global command should start with ":" token, otherwise it will be treated as variable.
+ const GLOBAL_COMMANDS = 'global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime';
+
+ // Common commands: Following commands available from most sub-menus:
+ const COMMON_COMMANDS = 'add remove enable disable set get print export edit find run debug error info warning';
+
+ const LITERALS = 'true false yes no nothing nil null';
+
+ const OBJECTS = 'traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw';
+
+ const VAR = {
+ className: 'variable',
+ variants: [
+ {
+ begin: /\$[\w\d#@][\w\d_]*/
+ },
+ {
+ begin: /\$\{(.*?)\}/
+ }
+ ]
+ };
+
+ const QUOTE_STRING = {
+ className: 'string',
+ begin: /"/,
+ end: /"/,
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ VAR,
+ {
+ className: 'variable',
+ begin: /\$\(/,
+ end: /\)/,
+ contains: [ hljs.BACKSLASH_ESCAPE ]
+ }
+ ]
+ };
+
+ const APOS_STRING = {
+ className: 'string',
+ begin: /'/,
+ end: /'/
+ };
+
+ return {
+ name: 'Microtik RouterOS script',
+ aliases: [
+ 'mikrotik'
+ ],
+ case_insensitive: true,
+ keywords: {
+ $pattern: /:?[\w-]+/,
+ literal: LITERALS,
+ keyword: STATEMENTS + ' :' + STATEMENTS.split(' ').join(' :') + ' :' + GLOBAL_COMMANDS.split(' ').join(' :')
+ },
+ contains: [
+ { // illegal syntax
+ variants: [
+ { // -- comment
+ begin: /\/\*/,
+ end: /\*\//
+ },
+ { // Stan comment
+ begin: /\/\//,
+ end: /$/
+ },
+ { // HTML tags
+ begin: /<\//,
+ end: />/
+ }
+ ],
+ illegal: /./
+ },
+ hljs.COMMENT('^#', '$'),
+ QUOTE_STRING,
+ APOS_STRING,
+ VAR,
+ // attribute=value
+ {
+ // > is to avoid matches with => in other grammars
+ begin: /[\w-]+=([^\s{}[\]()>]+)/,
+ relevance: 0,
+ returnBegin: true,
+ contains: [
+ {
+ className: 'attribute',
+ begin: /[^=]+/
+ },
+ {
+ begin: /=/,
+ endsWithParent: true,
+ relevance: 0,
+ contains: [
+ QUOTE_STRING,
+ APOS_STRING,
+ VAR,
+ {
+ className: 'literal',
+ begin: '\\b(' + LITERALS.split(' ').join('|') + ')\\b'
+ },
+ {
+ // Do not format unclassified values. Needed to exclude highlighting of values as built_in.
+ begin: /("[^"]*"|[^\s{}[\]]+)/
+ }
+ /*
+ {
+ // IPv4 addresses and subnets
+ className: 'number',
+ variants: [
+ {begin: IPADDR_wBITMASK+'(,'+IPADDR_wBITMASK+')*'}, //192.168.0.0/24,1.2.3.0/24
+ {begin: IPADDR+'-'+IPADDR}, // 192.168.0.1-192.168.0.3
+ {begin: IPADDR+'(,'+IPADDR+')*'}, // 192.168.0.1,192.168.0.34,192.168.24.1,192.168.0.1
+ ]
+ },
+ {
+ // MAC addresses and DHCP Client IDs
+ className: 'number',
+ begin: /\b(1:)?([0-9A-Fa-f]{1,2}[:-]){5}([0-9A-Fa-f]){1,2}\b/,
+ },
+ */
+ ]
+ }
+ ]
+ },
+ {
+ // HEX values
+ className: 'number',
+ begin: /\*[0-9a-fA-F]+/
+ },
+ {
+ begin: '\\b(' + COMMON_COMMANDS.split(' ').join('|') + ')([\\s[(\\]|])',
+ returnBegin: true,
+ contains: [
+ {
+ className: 'builtin-name', // 'function',
+ begin: /\w+/
+ }
+ ]
+ },
+ {
+ className: 'built_in',
+ variants: [
+ {
+ begin: '(\\.\\./|/|\\s)((' + OBJECTS.split(' ').join('|') + ');?\\s)+'
+ },
+ {
+ begin: /\.\./,
+ relevance: 0
+ }
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = routeros;
+
+
+/***/ }),
+
+/***/ 17355:
+/***/ ((module) => {
+
+/*
+Language: RenderMan RSL
+Author: Konstantin Evdokimenko
+Contributors: Shuen-Huei Guan
+Website: https://renderman.pixar.com/resources/RenderMan_20/shadingLanguage.html
+Category: graphics
+*/
+
+function rsl(hljs) {
+ return {
+ name: 'RenderMan RSL',
+ keywords: {
+ keyword:
+ 'float color point normal vector matrix while for if do return else break extern continue',
+ built_in:
+ 'abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise ' +
+ 'clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp ' +
+ 'faceforward filterstep floor format fresnel incident length lightsource log match ' +
+ 'max min mod noise normalize ntransform opposite option phong pnoise pow printf ' +
+ 'ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp ' +
+ 'setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan ' +
+ 'texture textureinfo trace transform vtransform xcomp ycomp zcomp'
+ },
+ illegal: '',
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'meta',
+ begin: '#',
+ end: '$'
+ },
+ {
+ className: 'class',
+ beginKeywords: 'surface displacement light volume imager',
+ end: '\\('
+ },
+ {
+ beginKeywords: 'illuminate illuminance gather',
+ end: '\\('
+ }
+ ]
+ };
+}
+
+module.exports = rsl;
+
+
+/***/ }),
+
+/***/ 52663:
+/***/ ((module) => {
+
+/*
+Language: Oracle Rules Language
+Author: Jason Jacobson
+Description: The Oracle Utilities Rules Language is used to program the Oracle Utilities Applications acquired from LODESTAR Corporation. The products include Billing Component, LPSS, Pricing Component etc. through version 1.6.1.
+Website: https://docs.oracle.com/cd/E17904_01/dev.1111/e10227/rlref.htm
+Category: enterprise
+*/
+
+function ruleslanguage(hljs) {
+ return {
+ name: 'Oracle Rules Language',
+ keywords: {
+ keyword:
+ 'BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE ' +
+ 'INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 ' +
+ 'INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 ' +
+ 'INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 ' +
+ 'INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 ' +
+ 'INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 ' +
+ 'INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 ' +
+ 'INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 ' +
+ 'INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 ' +
+ 'INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 ' +
+ 'INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 ' +
+ 'INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 ' +
+ 'INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 ' +
+ 'INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 ' +
+ 'INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 ' +
+ 'MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER ' +
+ 'OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE ' +
+ 'NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH ' +
+ 'IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND ' +
+ 'UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ' +
+ 'ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE ' +
+ 'GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE ' +
+ 'SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING ' +
+ 'DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF ' +
+ 'MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY ' +
+ 'YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE ' +
+ 'COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR ' +
+ 'READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ' +
+ 'ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE ' +
+ 'EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE ' +
+ 'SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL ' +
+ 'COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN ' +
+ 'MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING ' +
+ 'FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM ' +
+ 'NUMDAYS READ_DATE STAGING',
+ built_in:
+ 'IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML ' +
+ 'DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT ' +
+ 'DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE ' +
+ 'DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT ' +
+ 'DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME'
+ },
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'literal',
+ variants: [
+ { // looks like #-comment
+ begin: '#\\s+',
+ relevance: 0
+ },
+ {
+ begin: '#[a-zA-Z .]+'
+ }
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = ruleslanguage;
+
+
+/***/ }),
+
+/***/ 48775:
+/***/ ((module) => {
+
+/*
+Language: SAS
+Author: Mauricio Caceres
+Description: Syntax Highlighting for SAS
+*/
+
+function sas(hljs) {
+ // Data step and PROC SQL statements
+ const SAS_KEYWORDS =
+ 'do if then else end until while ' +
+ '' +
+ 'abort array attrib by call cards cards4 catname continue ' +
+ 'datalines datalines4 delete delim delimiter display dm drop ' +
+ 'endsas error file filename footnote format goto in infile ' +
+ 'informat input keep label leave length libname link list ' +
+ 'lostcard merge missing modify options output out page put ' +
+ 'redirect remove rename replace retain return select set skip ' +
+ 'startsas stop title update waitsas where window x systask ' +
+ '' +
+ 'add and alter as cascade check create delete describe ' +
+ 'distinct drop foreign from group having index insert into in ' +
+ 'key like message modify msgtype not null on or order primary ' +
+ 'references reset restrict select set table unique update ' +
+ 'validate view where';
+
+ // Built-in SAS functions
+ const SAS_FUN =
+ 'abs|addr|airy|arcos|arsin|atan|attrc|attrn|band|' +
+ 'betainv|blshift|bnot|bor|brshift|bxor|byte|cdf|ceil|' +
+ 'cexist|cinv|close|cnonct|collate|compbl|compound|' +
+ 'compress|cos|cosh|css|curobs|cv|daccdb|daccdbsl|' +
+ 'daccsl|daccsyd|dacctab|dairy|date|datejul|datepart|' +
+ 'datetime|day|dclose|depdb|depdbsl|depdbsl|depsl|' +
+ 'depsl|depsyd|depsyd|deptab|deptab|dequote|dhms|dif|' +
+ 'digamma|dim|dinfo|dnum|dopen|doptname|doptnum|dread|' +
+ 'dropnote|dsname|erf|erfc|exist|exp|fappend|fclose|' +
+ 'fcol|fdelete|fetch|fetchobs|fexist|fget|fileexist|' +
+ 'filename|fileref|finfo|finv|fipname|fipnamel|' +
+ 'fipstate|floor|fnonct|fnote|fopen|foptname|foptnum|' +
+ 'fpoint|fpos|fput|fread|frewind|frlen|fsep|fuzz|' +
+ 'fwrite|gaminv|gamma|getoption|getvarc|getvarn|hbound|' +
+ 'hms|hosthelp|hour|ibessel|index|indexc|indexw|input|' +
+ 'inputc|inputn|int|intck|intnx|intrr|irr|jbessel|' +
+ 'juldate|kurtosis|lag|lbound|left|length|lgamma|' +
+ 'libname|libref|log|log10|log2|logpdf|logpmf|logsdf|' +
+ 'lowcase|max|mdy|mean|min|minute|mod|month|mopen|' +
+ 'mort|n|netpv|nmiss|normal|note|npv|open|ordinal|' +
+ 'pathname|pdf|peek|peekc|pmf|point|poisson|poke|' +
+ 'probbeta|probbnml|probchi|probf|probgam|probhypr|' +
+ 'probit|probnegb|probnorm|probt|put|putc|putn|qtr|' +
+ 'quote|ranbin|rancau|ranexp|rangam|range|rank|rannor|' +
+ 'ranpoi|rantbl|rantri|ranuni|repeat|resolve|reverse|' +
+ 'rewind|right|round|saving|scan|sdf|second|sign|' +
+ 'sin|sinh|skewness|soundex|spedis|sqrt|std|stderr|' +
+ 'stfips|stname|stnamel|substr|sum|symget|sysget|' +
+ 'sysmsg|sysprod|sysrc|system|tan|tanh|time|timepart|' +
+ 'tinv|tnonct|today|translate|tranwrd|trigamma|' +
+ 'trim|trimn|trunc|uniform|upcase|uss|var|varfmt|' +
+ 'varinfmt|varlabel|varlen|varname|varnum|varray|' +
+ 'varrayx|vartype|verify|vformat|vformatd|vformatdx|' +
+ 'vformatn|vformatnx|vformatw|vformatwx|vformatx|' +
+ 'vinarray|vinarrayx|vinformat|vinformatd|vinformatdx|' +
+ 'vinformatn|vinformatnx|vinformatw|vinformatwx|' +
+ 'vinformatx|vlabel|vlabelx|vlength|vlengthx|vname|' +
+ 'vnamex|vtype|vtypex|weekday|year|yyq|zipfips|zipname|' +
+ 'zipnamel|zipstate';
+
+ // Built-in macro functions
+ const SAS_MACRO_FUN =
+ 'bquote|nrbquote|cmpres|qcmpres|compstor|' +
+ 'datatyp|display|do|else|end|eval|global|goto|' +
+ 'if|index|input|keydef|label|left|length|let|' +
+ 'local|lowcase|macro|mend|nrbquote|nrquote|' +
+ 'nrstr|put|qcmpres|qleft|qlowcase|qscan|' +
+ 'qsubstr|qsysfunc|qtrim|quote|qupcase|scan|str|' +
+ 'substr|superq|syscall|sysevalf|sysexec|sysfunc|' +
+ 'sysget|syslput|sysprod|sysrc|sysrput|then|to|' +
+ 'trim|unquote|until|upcase|verify|while|window';
+
+ return {
+ name: 'SAS',
+ case_insensitive: true, // SAS is case-insensitive
+ keywords: {
+ literal:
+ 'null missing _all_ _automatic_ _character_ _infile_ ' +
+ '_n_ _name_ _null_ _numeric_ _user_ _webout_',
+ meta:
+ SAS_KEYWORDS
+ },
+ contains: [
+ {
+ // Distinct highlight for proc , data, run, quit
+ className: 'keyword',
+ begin: /^\s*(proc [\w\d_]+|data|run|quit)[\s;]/
+ },
+ {
+ // Macro variables
+ className: 'variable',
+ begin: /&[a-zA-Z_&][a-zA-Z0-9_]*\.?/
+ },
+ {
+ // Special emphasis for datalines|cards
+ className: 'emphasis',
+ begin: /^\s*datalines|cards.*;/,
+ end: /^\s*;\s*$/
+ },
+ { // Built-in macro variables take precedence
+ className: 'built_in',
+ begin: '%(' + SAS_MACRO_FUN + ')'
+ },
+ {
+ // User-defined macro functions highlighted after
+ className: 'name',
+ begin: /%[a-zA-Z_][a-zA-Z_0-9]*/
+ },
+ {
+ className: 'meta',
+ begin: '[^%](' + SAS_FUN + ')[\(]'
+ },
+ {
+ className: 'string',
+ variants: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE
+ ]
+ },
+ hljs.COMMENT('\\*', ';'),
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ };
+}
+
+module.exports = sas;
+
+
+/***/ }),
+
+/***/ 77359:
+/***/ ((module) => {
+
+/*
+Language: Scheme
+Description: Scheme is a programming language in the Lisp family.
+ (keywords based on http://community.schemewiki.org/?scheme-keywords)
+Author: JP Verkamp
+Contributors: Ivan Sagalaev
+Origin: clojure.js
+Website: http://community.schemewiki.org/?what-is-scheme
+Category: lisp
+*/
+
+function scheme(hljs) {
+ const SCHEME_IDENT_RE = '[^\\(\\)\\[\\]\\{\\}",\'`;#|\\\\\\s]+';
+ const SCHEME_SIMPLE_NUMBER_RE = '(-|\\+)?\\d+([./]\\d+)?';
+ const SCHEME_COMPLEX_NUMBER_RE = SCHEME_SIMPLE_NUMBER_RE + '[+\\-]' + SCHEME_SIMPLE_NUMBER_RE + 'i';
+ const KEYWORDS = {
+ $pattern: SCHEME_IDENT_RE,
+ 'builtin-name':
+ 'case-lambda call/cc class define-class exit-handler field import ' +
+ 'inherit init-field interface let*-values let-values let/ec mixin ' +
+ 'opt-lambda override protect provide public rename require ' +
+ 'require-for-syntax syntax syntax-case syntax-error unit/sig unless ' +
+ 'when with-syntax and begin call-with-current-continuation ' +
+ 'call-with-input-file call-with-output-file case cond define ' +
+ 'define-syntax delay do dynamic-wind else for-each if lambda let let* ' +
+ 'let-syntax letrec letrec-syntax map or syntax-rules \' * + , ,@ - ... / ' +
+ '; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan ' +
+ 'boolean? caar cadr call-with-input-file call-with-output-file ' +
+ 'call-with-values car cdddar cddddr cdr ceiling char->integer ' +
+ 'char-alphabetic? char-ci<=? char-ci char-ci=? char-ci>=? char-ci>? ' +
+ 'char-downcase char-lower-case? char-numeric? char-ready? char-upcase ' +
+ 'char-upper-case? char-whitespace? char<=? char char=? char>=? char>? ' +
+ 'char? close-input-port close-output-port complex? cons cos ' +
+ 'current-input-port current-output-port denominator display eof-object? ' +
+ 'eq? equal? eqv? eval even? exact->inexact exact? exp expt floor ' +
+ 'force gcd imag-part inexact->exact inexact? input-port? integer->char ' +
+ 'integer? interaction-environment lcm length list list->string ' +
+ 'list->vector list-ref list-tail list? load log magnitude make-polar ' +
+ 'make-rectangular make-string make-vector max member memq memv min ' +
+ 'modulo negative? newline not null-environment null? number->string ' +
+ 'number? numerator odd? open-input-file open-output-file output-port? ' +
+ 'pair? peek-char port? positive? procedure? quasiquote quote quotient ' +
+ 'rational? rationalize read read-char real-part real? remainder reverse ' +
+ 'round scheme-report-environment set! set-car! set-cdr! sin sqrt string ' +
+ 'string->list string->number string->symbol string-append string-ci<=? ' +
+ 'string-ci string-ci=? string-ci>=? string-ci>? string-copy ' +
+ 'string-fill! string-length string-ref string-set! string<=? string ' +
+ 'string=? string>=? string>? string? substring symbol->string symbol? ' +
+ 'tan transcript-off transcript-on truncate values vector ' +
+ 'vector->list vector-fill! vector-length vector-ref vector-set! ' +
+ 'with-input-from-file with-output-to-file write write-char zero?'
+ };
+
+ const LITERAL = {
+ className: 'literal',
+ begin: '(#t|#f|#\\\\' + SCHEME_IDENT_RE + '|#\\\\.)'
+ };
+
+ const NUMBER = {
+ className: 'number',
+ variants: [
+ {
+ begin: SCHEME_SIMPLE_NUMBER_RE,
+ relevance: 0
+ },
+ {
+ begin: SCHEME_COMPLEX_NUMBER_RE,
+ relevance: 0
+ },
+ {
+ begin: '#b[0-1]+(/[0-1]+)?'
+ },
+ {
+ begin: '#o[0-7]+(/[0-7]+)?'
+ },
+ {
+ begin: '#x[0-9a-f]+(/[0-9a-f]+)?'
+ }
+ ]
+ };
+
+ const STRING = hljs.QUOTE_STRING_MODE;
+
+ const COMMENT_MODES = [
+ hljs.COMMENT(
+ ';',
+ '$',
+ {
+ relevance: 0
+ }
+ ),
+ hljs.COMMENT('#\\|', '\\|#')
+ ];
+
+ const IDENT = {
+ begin: SCHEME_IDENT_RE,
+ relevance: 0
+ };
+
+ const QUOTED_IDENT = {
+ className: 'symbol',
+ begin: '\'' + SCHEME_IDENT_RE
+ };
+
+ const BODY = {
+ endsWithParent: true,
+ relevance: 0
+ };
+
+ const QUOTED_LIST = {
+ variants: [
+ {
+ begin: /'/
+ },
+ {
+ begin: '`'
+ }
+ ],
+ contains: [
+ {
+ begin: '\\(',
+ end: '\\)',
+ contains: [
+ 'self',
+ LITERAL,
+ STRING,
+ NUMBER,
+ IDENT,
+ QUOTED_IDENT
+ ]
+ }
+ ]
+ };
+
+ const NAME = {
+ className: 'name',
+ relevance: 0,
+ begin: SCHEME_IDENT_RE,
+ keywords: KEYWORDS
+ };
+
+ const LAMBDA = {
+ begin: /lambda/,
+ endsWithParent: true,
+ returnBegin: true,
+ contains: [
+ NAME,
+ {
+ endsParent: true,
+ variants: [
+ {
+ begin: /\(/,
+ end: /\)/
+ },
+ {
+ begin: /\[/,
+ end: /\]/
+ }
+ ],
+ contains: [ IDENT ]
+ }
+ ]
+ };
+
+ const LIST = {
+ variants: [
+ {
+ begin: '\\(',
+ end: '\\)'
+ },
+ {
+ begin: '\\[',
+ end: '\\]'
+ }
+ ],
+ contains: [
+ LAMBDA,
+ NAME,
+ BODY
+ ]
+ };
+
+ BODY.contains = [
+ LITERAL,
+ NUMBER,
+ STRING,
+ IDENT,
+ QUOTED_IDENT,
+ QUOTED_LIST,
+ LIST
+ ].concat(COMMENT_MODES);
+
+ return {
+ name: 'Scheme',
+ illegal: /\S/,
+ contains: [
+ hljs.SHEBANG(),
+ NUMBER,
+ STRING,
+ QUOTED_IDENT,
+ QUOTED_LIST,
+ LIST
+ ].concat(COMMENT_MODES)
+ };
+}
+
+module.exports = scheme;
+
+
+/***/ }),
+
+/***/ 10348:
+/***/ ((module) => {
+
+/*
+Language: Scilab
+Author: Sylvestre Ledru
+Origin: matlab.js
+Description: Scilab is a port from Matlab
+Website: https://www.scilab.org
+Category: scientific
+*/
+
+function scilab(hljs) {
+ const COMMON_CONTAINS = [
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'string',
+ begin: '\'|\"',
+ end: '\'|\"',
+ contains: [ hljs.BACKSLASH_ESCAPE,
+ {
+ begin: '\'\''
+ } ]
+ }
+ ];
+
+ return {
+ name: 'Scilab',
+ aliases: [ 'sci' ],
+ keywords: {
+ $pattern: /%?\w+/,
+ keyword: 'abort break case clear catch continue do elseif else endfunction end for function ' +
+ 'global if pause return resume select try then while',
+ literal:
+ '%f %F %t %T %pi %eps %inf %nan %e %i %z %s',
+ built_in: // Scilab has more than 2000 functions. Just list the most commons
+ 'abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error ' +
+ 'exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty ' +
+ 'isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log ' +
+ 'max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real ' +
+ 'round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan ' +
+ 'type typename warning zeros matrix'
+ },
+ illegal: '("|#|/\\*|\\s+/\\w+)',
+ contains: [
+ {
+ className: 'function',
+ beginKeywords: 'function',
+ end: '$',
+ contains: [
+ hljs.UNDERSCORE_TITLE_MODE,
+ {
+ className: 'params',
+ begin: '\\(',
+ end: '\\)'
+ }
+ ]
+ },
+ // seems to be a guard against [ident]' or [ident].
+ // perhaps to prevent attributes from flagging as keywords?
+ {
+ begin: '[a-zA-Z_][a-zA-Z_0-9]*[\\.\']+',
+ relevance: 0
+ },
+ {
+ begin: '\\[',
+ end: '\\][\\.\']*',
+ relevance: 0,
+ contains: COMMON_CONTAINS
+ },
+ hljs.COMMENT('//', '$')
+ ].concat(COMMON_CONTAINS)
+ };
+}
+
+module.exports = scilab;
+
+
+/***/ }),
+
+/***/ 69908:
+/***/ ((module) => {
+
+const MODES = (hljs) => {
+ return {
+ IMPORTANT: {
+ className: 'meta',
+ begin: '!important'
+ },
+ HEXCOLOR: {
+ className: 'number',
+ begin: '#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})'
+ },
+ ATTRIBUTE_SELECTOR_MODE: {
+ className: 'selector-attr',
+ begin: /\[/,
+ end: /\]/,
+ illegal: '$',
+ contains: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE
+ ]
+ }
+ };
+};
+
+const TAGS = [
+ 'a',
+ 'abbr',
+ 'address',
+ 'article',
+ 'aside',
+ 'audio',
+ 'b',
+ 'blockquote',
+ 'body',
+ 'button',
+ 'canvas',
+ 'caption',
+ 'cite',
+ 'code',
+ 'dd',
+ 'del',
+ 'details',
+ 'dfn',
+ 'div',
+ 'dl',
+ 'dt',
+ 'em',
+ 'fieldset',
+ 'figcaption',
+ 'figure',
+ 'footer',
+ 'form',
+ 'h1',
+ 'h2',
+ 'h3',
+ 'h4',
+ 'h5',
+ 'h6',
+ 'header',
+ 'hgroup',
+ 'html',
+ 'i',
+ 'iframe',
+ 'img',
+ 'input',
+ 'ins',
+ 'kbd',
+ 'label',
+ 'legend',
+ 'li',
+ 'main',
+ 'mark',
+ 'menu',
+ 'nav',
+ 'object',
+ 'ol',
+ 'p',
+ 'q',
+ 'quote',
+ 'samp',
+ 'section',
+ 'span',
+ 'strong',
+ 'summary',
+ 'sup',
+ 'table',
+ 'tbody',
+ 'td',
+ 'textarea',
+ 'tfoot',
+ 'th',
+ 'thead',
+ 'time',
+ 'tr',
+ 'ul',
+ 'var',
+ 'video'
+];
+
+const MEDIA_FEATURES = [
+ 'any-hover',
+ 'any-pointer',
+ 'aspect-ratio',
+ 'color',
+ 'color-gamut',
+ 'color-index',
+ 'device-aspect-ratio',
+ 'device-height',
+ 'device-width',
+ 'display-mode',
+ 'forced-colors',
+ 'grid',
+ 'height',
+ 'hover',
+ 'inverted-colors',
+ 'monochrome',
+ 'orientation',
+ 'overflow-block',
+ 'overflow-inline',
+ 'pointer',
+ 'prefers-color-scheme',
+ 'prefers-contrast',
+ 'prefers-reduced-motion',
+ 'prefers-reduced-transparency',
+ 'resolution',
+ 'scan',
+ 'scripting',
+ 'update',
+ 'width',
+ // TODO: find a better solution?
+ 'min-width',
+ 'max-width',
+ 'min-height',
+ 'max-height'
+];
+
+// https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes
+const PSEUDO_CLASSES = [
+ 'active',
+ 'any-link',
+ 'blank',
+ 'checked',
+ 'current',
+ 'default',
+ 'defined',
+ 'dir', // dir()
+ 'disabled',
+ 'drop',
+ 'empty',
+ 'enabled',
+ 'first',
+ 'first-child',
+ 'first-of-type',
+ 'fullscreen',
+ 'future',
+ 'focus',
+ 'focus-visible',
+ 'focus-within',
+ 'has', // has()
+ 'host', // host or host()
+ 'host-context', // host-context()
+ 'hover',
+ 'indeterminate',
+ 'in-range',
+ 'invalid',
+ 'is', // is()
+ 'lang', // lang()
+ 'last-child',
+ 'last-of-type',
+ 'left',
+ 'link',
+ 'local-link',
+ 'not', // not()
+ 'nth-child', // nth-child()
+ 'nth-col', // nth-col()
+ 'nth-last-child', // nth-last-child()
+ 'nth-last-col', // nth-last-col()
+ 'nth-last-of-type', //nth-last-of-type()
+ 'nth-of-type', //nth-of-type()
+ 'only-child',
+ 'only-of-type',
+ 'optional',
+ 'out-of-range',
+ 'past',
+ 'placeholder-shown',
+ 'read-only',
+ 'read-write',
+ 'required',
+ 'right',
+ 'root',
+ 'scope',
+ 'target',
+ 'target-within',
+ 'user-invalid',
+ 'valid',
+ 'visited',
+ 'where' // where()
+];
+
+// https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements
+const PSEUDO_ELEMENTS = [
+ 'after',
+ 'backdrop',
+ 'before',
+ 'cue',
+ 'cue-region',
+ 'first-letter',
+ 'first-line',
+ 'grammar-error',
+ 'marker',
+ 'part',
+ 'placeholder',
+ 'selection',
+ 'slotted',
+ 'spelling-error'
+];
+
+const ATTRIBUTES = [
+ 'align-content',
+ 'align-items',
+ 'align-self',
+ 'animation',
+ 'animation-delay',
+ 'animation-direction',
+ 'animation-duration',
+ 'animation-fill-mode',
+ 'animation-iteration-count',
+ 'animation-name',
+ 'animation-play-state',
+ 'animation-timing-function',
+ 'auto',
+ 'backface-visibility',
+ 'background',
+ 'background-attachment',
+ 'background-clip',
+ 'background-color',
+ 'background-image',
+ 'background-origin',
+ 'background-position',
+ 'background-repeat',
+ 'background-size',
+ 'border',
+ 'border-bottom',
+ 'border-bottom-color',
+ 'border-bottom-left-radius',
+ 'border-bottom-right-radius',
+ 'border-bottom-style',
+ 'border-bottom-width',
+ 'border-collapse',
+ 'border-color',
+ 'border-image',
+ 'border-image-outset',
+ 'border-image-repeat',
+ 'border-image-slice',
+ 'border-image-source',
+ 'border-image-width',
+ 'border-left',
+ 'border-left-color',
+ 'border-left-style',
+ 'border-left-width',
+ 'border-radius',
+ 'border-right',
+ 'border-right-color',
+ 'border-right-style',
+ 'border-right-width',
+ 'border-spacing',
+ 'border-style',
+ 'border-top',
+ 'border-top-color',
+ 'border-top-left-radius',
+ 'border-top-right-radius',
+ 'border-top-style',
+ 'border-top-width',
+ 'border-width',
+ 'bottom',
+ 'box-decoration-break',
+ 'box-shadow',
+ 'box-sizing',
+ 'break-after',
+ 'break-before',
+ 'break-inside',
+ 'caption-side',
+ 'clear',
+ 'clip',
+ 'clip-path',
+ 'color',
+ 'column-count',
+ 'column-fill',
+ 'column-gap',
+ 'column-rule',
+ 'column-rule-color',
+ 'column-rule-style',
+ 'column-rule-width',
+ 'column-span',
+ 'column-width',
+ 'columns',
+ 'content',
+ 'counter-increment',
+ 'counter-reset',
+ 'cursor',
+ 'direction',
+ 'display',
+ 'empty-cells',
+ 'filter',
+ 'flex',
+ 'flex-basis',
+ 'flex-direction',
+ 'flex-flow',
+ 'flex-grow',
+ 'flex-shrink',
+ 'flex-wrap',
+ 'float',
+ 'font',
+ 'font-display',
+ 'font-family',
+ 'font-feature-settings',
+ 'font-kerning',
+ 'font-language-override',
+ 'font-size',
+ 'font-size-adjust',
+ 'font-smoothing',
+ 'font-stretch',
+ 'font-style',
+ 'font-variant',
+ 'font-variant-ligatures',
+ 'font-variation-settings',
+ 'font-weight',
+ 'height',
+ 'hyphens',
+ 'icon',
+ 'image-orientation',
+ 'image-rendering',
+ 'image-resolution',
+ 'ime-mode',
+ 'inherit',
+ 'initial',
+ 'justify-content',
+ 'left',
+ 'letter-spacing',
+ 'line-height',
+ 'list-style',
+ 'list-style-image',
+ 'list-style-position',
+ 'list-style-type',
+ 'margin',
+ 'margin-bottom',
+ 'margin-left',
+ 'margin-right',
+ 'margin-top',
+ 'marks',
+ 'mask',
+ 'max-height',
+ 'max-width',
+ 'min-height',
+ 'min-width',
+ 'nav-down',
+ 'nav-index',
+ 'nav-left',
+ 'nav-right',
+ 'nav-up',
+ 'none',
+ 'normal',
+ 'object-fit',
+ 'object-position',
+ 'opacity',
+ 'order',
+ 'orphans',
+ 'outline',
+ 'outline-color',
+ 'outline-offset',
+ 'outline-style',
+ 'outline-width',
+ 'overflow',
+ 'overflow-wrap',
+ 'overflow-x',
+ 'overflow-y',
+ 'padding',
+ 'padding-bottom',
+ 'padding-left',
+ 'padding-right',
+ 'padding-top',
+ 'page-break-after',
+ 'page-break-before',
+ 'page-break-inside',
+ 'perspective',
+ 'perspective-origin',
+ 'pointer-events',
+ 'position',
+ 'quotes',
+ 'resize',
+ 'right',
+ 'src', // @font-face
+ 'tab-size',
+ 'table-layout',
+ 'text-align',
+ 'text-align-last',
+ 'text-decoration',
+ 'text-decoration-color',
+ 'text-decoration-line',
+ 'text-decoration-style',
+ 'text-indent',
+ 'text-overflow',
+ 'text-rendering',
+ 'text-shadow',
+ 'text-transform',
+ 'text-underline-position',
+ 'top',
+ 'transform',
+ 'transform-origin',
+ 'transform-style',
+ 'transition',
+ 'transition-delay',
+ 'transition-duration',
+ 'transition-property',
+ 'transition-timing-function',
+ 'unicode-bidi',
+ 'vertical-align',
+ 'visibility',
+ 'white-space',
+ 'widows',
+ 'width',
+ 'word-break',
+ 'word-spacing',
+ 'word-wrap',
+ 'z-index'
+ // reverse makes sure longer attributes `font-weight` are matched fully
+ // instead of getting false positives on say `font`
+].reverse();
+
+/*
+Language: SCSS
+Description: Scss is an extension of the syntax of CSS.
+Author: Kurt Emch
+Website: https://sass-lang.com
+Category: common, css
+*/
+
+/** @type LanguageFn */
+function scss(hljs) {
+ const modes = MODES(hljs);
+ const PSEUDO_ELEMENTS$1 = PSEUDO_ELEMENTS;
+ const PSEUDO_CLASSES$1 = PSEUDO_CLASSES;
+
+ const AT_IDENTIFIER = '@[a-z-]+'; // @font-face
+ const AT_MODIFIERS = "and or not only";
+ const IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';
+ const VARIABLE = {
+ className: 'variable',
+ begin: '(\\$' + IDENT_RE + ')\\b'
+ };
+
+ return {
+ name: 'SCSS',
+ case_insensitive: true,
+ illegal: '[=/|\']',
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ {
+ className: 'selector-id',
+ begin: '#[A-Za-z0-9_-]+',
+ relevance: 0
+ },
+ {
+ className: 'selector-class',
+ begin: '\\.[A-Za-z0-9_-]+',
+ relevance: 0
+ },
+ modes.ATTRIBUTE_SELECTOR_MODE,
+ {
+ className: 'selector-tag',
+ begin: '\\b(' + TAGS.join('|') + ')\\b',
+ // was there, before, but why?
+ relevance: 0
+ },
+ {
+ className: 'selector-pseudo',
+ begin: ':(' + PSEUDO_CLASSES$1.join('|') + ')'
+ },
+ {
+ className: 'selector-pseudo',
+ begin: '::(' + PSEUDO_ELEMENTS$1.join('|') + ')'
+ },
+ VARIABLE,
+ { // pseudo-selector params
+ begin: /\(/,
+ end: /\)/,
+ contains: [ hljs.CSS_NUMBER_MODE ]
+ },
+ {
+ className: 'attribute',
+ begin: '\\b(' + ATTRIBUTES.join('|') + ')\\b'
+ },
+ {
+ begin: '\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b'
+ },
+ {
+ begin: ':',
+ end: ';',
+ contains: [
+ VARIABLE,
+ modes.HEXCOLOR,
+ hljs.CSS_NUMBER_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ modes.IMPORTANT
+ ]
+ },
+ // matching these here allows us to treat them more like regular CSS
+ // rules so everything between the {} gets regular rule highlighting,
+ // which is what we want for page and font-face
+ {
+ begin: '@(page|font-face)',
+ lexemes: AT_IDENTIFIER,
+ keywords: '@page @font-face'
+ },
+ {
+ begin: '@',
+ end: '[{;]',
+ returnBegin: true,
+ keywords: {
+ $pattern: /[a-z-]+/,
+ keyword: AT_MODIFIERS,
+ attribute: MEDIA_FEATURES.join(" ")
+ },
+ contains: [
+ {
+ begin: AT_IDENTIFIER,
+ className: "keyword"
+ },
+ {
+ begin: /[a-z-]+(?=:)/,
+ className: "attribute"
+ },
+ VARIABLE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+ modes.HEXCOLOR,
+ hljs.CSS_NUMBER_MODE
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = scss;
+
+
+/***/ }),
+
+/***/ 52836:
+/***/ ((module) => {
+
+/*
+Language: Shell Session
+Requires: bash.js
+Author: TSUYUSATO Kitsune
+Category: common
+Audit: 2020
+*/
+
+/** @type LanguageFn */
+function shell(hljs) {
+ return {
+ name: 'Shell Session',
+ aliases: [ 'console' ],
+ contains: [
+ {
+ className: 'meta',
+ // We cannot add \s (spaces) in the regular expression otherwise it will be too broad and produce unexpected result.
+ // For instance, in the following example, it would match "echo /path/to/home >" as a prompt:
+ // echo /path/to/home > t.exe
+ begin: /^\s{0,3}[/~\w\d[\]()@-]*[>%$#]/,
+ starts: {
+ end: /[^\\](?=\s*$)/,
+ subLanguage: 'bash'
+ }
+ }
+ ]
+ };
+}
+
+module.exports = shell;
+
+
+/***/ }),
+
+/***/ 62602:
+/***/ ((module) => {
+
+/*
+Language: Smali
+Author: Dennis Titze
+Description: Basic Smali highlighting
+Website: https://github.com/JesusFreke/smali
+*/
+
+function smali(hljs) {
+ const smali_instr_low_prio = [
+ 'add',
+ 'and',
+ 'cmp',
+ 'cmpg',
+ 'cmpl',
+ 'const',
+ 'div',
+ 'double',
+ 'float',
+ 'goto',
+ 'if',
+ 'int',
+ 'long',
+ 'move',
+ 'mul',
+ 'neg',
+ 'new',
+ 'nop',
+ 'not',
+ 'or',
+ 'rem',
+ 'return',
+ 'shl',
+ 'shr',
+ 'sput',
+ 'sub',
+ 'throw',
+ 'ushr',
+ 'xor'
+ ];
+ const smali_instr_high_prio = [
+ 'aget',
+ 'aput',
+ 'array',
+ 'check',
+ 'execute',
+ 'fill',
+ 'filled',
+ 'goto/16',
+ 'goto/32',
+ 'iget',
+ 'instance',
+ 'invoke',
+ 'iput',
+ 'monitor',
+ 'packed',
+ 'sget',
+ 'sparse'
+ ];
+ const smali_keywords = [
+ 'transient',
+ 'constructor',
+ 'abstract',
+ 'final',
+ 'synthetic',
+ 'public',
+ 'private',
+ 'protected',
+ 'static',
+ 'bridge',
+ 'system'
+ ];
+ return {
+ name: 'Smali',
+ contains: [
+ {
+ className: 'string',
+ begin: '"',
+ end: '"',
+ relevance: 0
+ },
+ hljs.COMMENT(
+ '#',
+ '$',
+ {
+ relevance: 0
+ }
+ ),
+ {
+ className: 'keyword',
+ variants: [
+ {
+ begin: '\\s*\\.end\\s[a-zA-Z0-9]*'
+ },
+ {
+ begin: '^[ ]*\\.[a-zA-Z]*',
+ relevance: 0
+ },
+ {
+ begin: '\\s:[a-zA-Z_0-9]*',
+ relevance: 0
+ },
+ {
+ begin: '\\s(' + smali_keywords.join('|') + ')'
+ }
+ ]
+ },
+ {
+ className: 'built_in',
+ variants: [
+ {
+ begin: '\\s(' + smali_instr_low_prio.join('|') + ')\\s'
+ },
+ {
+ begin: '\\s(' + smali_instr_low_prio.join('|') + ')((-|/)[a-zA-Z0-9]+)+\\s',
+ relevance: 10
+ },
+ {
+ begin: '\\s(' + smali_instr_high_prio.join('|') + ')((-|/)[a-zA-Z0-9]+)*\\s',
+ relevance: 10
+ }
+ ]
+ },
+ {
+ className: 'class',
+ begin: 'L[^\(;:\n]*;',
+ relevance: 0
+ },
+ {
+ begin: '[vp][0-9]+'
+ }
+ ]
+ };
+}
+
+module.exports = smali;
+
+
+/***/ }),
+
+/***/ 70787:
+/***/ ((module) => {
+
+/*
+Language: Smalltalk
+Description: Smalltalk is an object-oriented, dynamically typed reflective programming language.
+Author: Vladimir Gubarkov
+Website: https://en.wikipedia.org/wiki/Smalltalk
+*/
+
+function smalltalk(hljs) {
+ const VAR_IDENT_RE = '[a-z][a-zA-Z0-9_]*';
+ const CHAR = {
+ className: 'string',
+ begin: '\\$.{1}'
+ };
+ const SYMBOL = {
+ className: 'symbol',
+ begin: '#' + hljs.UNDERSCORE_IDENT_RE
+ };
+ return {
+ name: 'Smalltalk',
+ aliases: [ 'st' ],
+ keywords: 'self super nil true false thisContext', // only 6
+ contains: [
+ hljs.COMMENT('"', '"'),
+ hljs.APOS_STRING_MODE,
+ {
+ className: 'type',
+ begin: '\\b[A-Z][A-Za-z0-9_]*',
+ relevance: 0
+ },
+ {
+ begin: VAR_IDENT_RE + ':',
+ relevance: 0
+ },
+ hljs.C_NUMBER_MODE,
+ SYMBOL,
+ CHAR,
+ {
+ // This looks more complicated than needed to avoid combinatorial
+ // explosion under V8. It effectively means `| var1 var2 ... |` with
+ // whitespace adjacent to `|` being optional.
+ begin: '\\|[ ]*' + VAR_IDENT_RE + '([ ]+' + VAR_IDENT_RE + ')*[ ]*\\|',
+ returnBegin: true,
+ end: /\|/,
+ illegal: /\S/,
+ contains: [ {
+ begin: '(\\|[ ]*)?' + VAR_IDENT_RE
+ } ]
+ },
+ {
+ begin: '#\\(',
+ end: '\\)',
+ contains: [
+ hljs.APOS_STRING_MODE,
+ CHAR,
+ hljs.C_NUMBER_MODE,
+ SYMBOL
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = smalltalk;
+
+
+/***/ }),
+
+/***/ 92002:
+/***/ ((module) => {
+
+/*
+Language: SML (Standard ML)
+Author: Edwin Dalorzo
+Description: SML language definition.
+Website: https://www.smlnj.org
+Origin: ocaml.js
+Category: functional
+*/
+function sml(hljs) {
+ return {
+ name: 'SML (Standard ML)',
+ aliases: [ 'ml' ],
+ keywords: {
+ $pattern: '[a-z_]\\w*!?',
+ keyword:
+ /* according to Definition of Standard ML 97 */
+ 'abstype and andalso as case datatype do else end eqtype ' +
+ 'exception fn fun functor handle if in include infix infixr ' +
+ 'let local nonfix of op open orelse raise rec sharing sig ' +
+ 'signature struct structure then type val with withtype where while',
+ built_in:
+ /* built-in types according to basis library */
+ 'array bool char exn int list option order real ref string substring vector unit word',
+ literal:
+ 'true false NONE SOME LESS EQUAL GREATER nil'
+ },
+ illegal: /\/\/|>>/,
+ contains: [
+ {
+ className: 'literal',
+ begin: /\[(\|\|)?\]|\(\)/,
+ relevance: 0
+ },
+ hljs.COMMENT(
+ '\\(\\*',
+ '\\*\\)',
+ {
+ contains: [ 'self' ]
+ }
+ ),
+ { /* type variable */
+ className: 'symbol',
+ begin: '\'[A-Za-z_](?!\')[\\w\']*'
+ /* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */
+ },
+ { /* polymorphic variant */
+ className: 'type',
+ begin: '`[A-Z][\\w\']*'
+ },
+ { /* module or constructor */
+ className: 'type',
+ begin: '\\b[A-Z][\\w\']*',
+ relevance: 0
+ },
+ { /* don't color identifiers, but safely catch all identifiers with ' */
+ begin: '[a-z_]\\w*\'[\\w\']*'
+ },
+ hljs.inherit(hljs.APOS_STRING_MODE, {
+ className: 'string',
+ relevance: 0
+ }),
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ illegal: null
+ }),
+ {
+ className: 'number',
+ begin:
+ '\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +
+ '0[oO][0-7_]+[Lln]?|' +
+ '0[bB][01_]+[Lln]?|' +
+ '[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)',
+ relevance: 0
+ },
+ {
+ begin: /[-=]>/ // relevance booster
+ }
+ ]
+ };
+}
+
+module.exports = sml;
+
+
+/***/ }),
+
+/***/ 11516:
+/***/ ((module) => {
+
+/*
+Language: SQF
+Author: Søren Enevoldsen
+Contributors: Marvin Saignat , Dedmen Miller
+Description: Scripting language for the Arma game series
+Website: https://community.bistudio.com/wiki/SQF_syntax
+Category: scripting
+*/
+
+function sqf(hljs) {
+ // In SQF, a variable start with _
+ const VARIABLE = {
+ className: 'variable',
+ begin: /\b_+[a-zA-Z]\w*/
+ };
+
+ // In SQF, a function should fit myTag_fnc_myFunction pattern
+ // https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Adding_a_Function
+ const FUNCTION = {
+ className: 'title',
+ begin: /[a-zA-Z][a-zA-Z0-9]+_fnc_\w*/
+ };
+
+ // In SQF strings, quotes matching the start are escaped by adding a consecutive.
+ // Example of single escaped quotes: " "" " and ' '' '.
+ const STRINGS = {
+ className: 'string',
+ variants: [
+ {
+ begin: '"',
+ end: '"',
+ contains: [ {
+ begin: '""',
+ relevance: 0
+ } ]
+ },
+ {
+ begin: '\'',
+ end: '\'',
+ contains: [ {
+ begin: '\'\'',
+ relevance: 0
+ } ]
+ }
+ ]
+ };
+
+ // list of keywords from:
+ // https://community.bistudio.com/wiki/PreProcessor_Commands
+ const PREPROCESSOR = {
+ className: 'meta',
+ begin: /#\s*[a-z]+\b/,
+ end: /$/,
+ keywords: {
+ 'meta-keyword':
+ 'define undef ifdef ifndef else endif include'
+ },
+ contains: [
+ {
+ begin: /\\\n/,
+ relevance: 0
+ },
+ hljs.inherit(STRINGS, {
+ className: 'meta-string'
+ }),
+ {
+ className: 'meta-string',
+ begin: /<[^\n>]*>/,
+ end: /$/,
+ illegal: '\\n'
+ },
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ };
+
+ return {
+ name: 'SQF',
+ case_insensitive: true,
+ keywords: {
+ keyword:
+ 'case catch default do else exit exitWith for forEach from if ' +
+ 'private switch then throw to try waitUntil while with',
+ built_in:
+ 'abs accTime acos action actionIDs actionKeys actionKeysImages actionKeysNames ' +
+ 'actionKeysNamesArray actionName actionParams activateAddons activatedAddons activateKey ' +
+ 'add3DENConnection add3DENEventHandler add3DENLayer addAction addBackpack addBackpackCargo ' +
+ 'addBackpackCargoGlobal addBackpackGlobal addCamShake addCuratorAddons addCuratorCameraArea ' +
+ 'addCuratorEditableObjects addCuratorEditingArea addCuratorPoints addEditorObject addEventHandler ' +
+ 'addForce addGoggles addGroupIcon addHandgunItem addHeadgear addItem addItemCargo ' +
+ 'addItemCargoGlobal addItemPool addItemToBackpack addItemToUniform addItemToVest addLiveStats ' +
+ 'addMagazine addMagazineAmmoCargo addMagazineCargo addMagazineCargoGlobal addMagazineGlobal ' +
+ 'addMagazinePool addMagazines addMagazineTurret addMenu addMenuItem addMissionEventHandler ' +
+ 'addMPEventHandler addMusicEventHandler addOwnedMine addPlayerScores addPrimaryWeaponItem ' +
+ 'addPublicVariableEventHandler addRating addResources addScore addScoreSide addSecondaryWeaponItem ' +
+ 'addSwitchableUnit addTeamMember addToRemainsCollector addTorque addUniform addVehicle addVest ' +
+ 'addWaypoint addWeapon addWeaponCargo addWeaponCargoGlobal addWeaponGlobal addWeaponItem ' +
+ 'addWeaponPool addWeaponTurret admin agent agents AGLToASL aimedAtTarget aimPos airDensityRTD ' +
+ 'airplaneThrottle airportSide AISFinishHeal alive all3DENEntities allAirports allControls ' +
+ 'allCurators allCutLayers allDead allDeadMen allDisplays allGroups allMapMarkers allMines ' +
+ 'allMissionObjects allow3DMode allowCrewInImmobile allowCuratorLogicIgnoreAreas allowDamage ' +
+ 'allowDammage allowFileOperations allowFleeing allowGetIn allowSprint allPlayers allSimpleObjects ' +
+ 'allSites allTurrets allUnits allUnitsUAV allVariables ammo ammoOnPylon and animate animateBay ' +
+ 'animateDoor animatePylon animateSource animationNames animationPhase animationSourcePhase ' +
+ 'animationState append apply armoryPoints arrayIntersect asin ASLToAGL ASLToATL assert ' +
+ 'assignAsCargo assignAsCargoIndex assignAsCommander assignAsDriver assignAsGunner assignAsTurret ' +
+ 'assignCurator assignedCargo assignedCommander assignedDriver assignedGunner assignedItems ' +
+ 'assignedTarget assignedTeam assignedVehicle assignedVehicleRole assignItem assignTeam ' +
+ 'assignToAirport atan atan2 atg ATLToASL attachedObject attachedObjects attachedTo attachObject ' +
+ 'attachTo attackEnabled backpack backpackCargo backpackContainer backpackItems backpackMagazines ' +
+ 'backpackSpaceFor behaviour benchmark binocular boundingBox boundingBoxReal boundingCenter ' +
+ 'breakOut breakTo briefingName buildingExit buildingPos buttonAction buttonSetAction cadetMode ' +
+ 'call callExtension camCommand camCommit camCommitPrepared camCommitted camConstuctionSetParams ' +
+ 'camCreate camDestroy cameraEffect cameraEffectEnableHUD cameraInterest cameraOn cameraView ' +
+ 'campaignConfigFile camPreload camPreloaded camPrepareBank camPrepareDir camPrepareDive ' +
+ 'camPrepareFocus camPrepareFov camPrepareFovRange camPreparePos camPrepareRelPos camPrepareTarget ' +
+ 'camSetBank camSetDir camSetDive camSetFocus camSetFov camSetFovRange camSetPos camSetRelPos ' +
+ 'camSetTarget camTarget camUseNVG canAdd canAddItemToBackpack canAddItemToUniform canAddItemToVest ' +
+ 'cancelSimpleTaskDestination canFire canMove canSlingLoad canStand canSuspend ' +
+ 'canTriggerDynamicSimulation canUnloadInCombat canVehicleCargo captive captiveNum cbChecked ' +
+ 'cbSetChecked ceil channelEnabled cheatsEnabled checkAIFeature checkVisibility className ' +
+ 'clearAllItemsFromBackpack clearBackpackCargo clearBackpackCargoGlobal clearGroupIcons ' +
+ 'clearItemCargo clearItemCargoGlobal clearItemPool clearMagazineCargo clearMagazineCargoGlobal ' +
+ 'clearMagazinePool clearOverlay clearRadio clearWeaponCargo clearWeaponCargoGlobal clearWeaponPool ' +
+ 'clientOwner closeDialog closeDisplay closeOverlay collapseObjectTree collect3DENHistory ' +
+ 'collectiveRTD combatMode commandArtilleryFire commandChat commander commandFire commandFollow ' +
+ 'commandFSM commandGetOut commandingMenu commandMove commandRadio commandStop ' +
+ 'commandSuppressiveFire commandTarget commandWatch comment commitOverlay compile compileFinal ' +
+ 'completedFSM composeText configClasses configFile configHierarchy configName configProperties ' +
+ 'configSourceAddonList configSourceMod configSourceModList confirmSensorTarget ' +
+ 'connectTerminalToUAV controlsGroupCtrl copyFromClipboard copyToClipboard copyWaypoints cos count ' +
+ 'countEnemy countFriendly countSide countType countUnknown create3DENComposition create3DENEntity ' +
+ 'createAgent createCenter createDialog createDiaryLink createDiaryRecord createDiarySubject ' +
+ 'createDisplay createGearDialog createGroup createGuardedPoint createLocation createMarker ' +
+ 'createMarkerLocal createMenu createMine createMissionDisplay createMPCampaignDisplay ' +
+ 'createSimpleObject createSimpleTask createSite createSoundSource createTask createTeam ' +
+ 'createTrigger createUnit createVehicle createVehicleCrew createVehicleLocal crew ctAddHeader ' +
+ 'ctAddRow ctClear ctCurSel ctData ctFindHeaderRows ctFindRowHeader ctHeaderControls ctHeaderCount ' +
+ 'ctRemoveHeaders ctRemoveRows ctrlActivate ctrlAddEventHandler ctrlAngle ctrlAutoScrollDelay ' +
+ 'ctrlAutoScrollRewind ctrlAutoScrollSpeed ctrlChecked ctrlClassName ctrlCommit ctrlCommitted ' +
+ 'ctrlCreate ctrlDelete ctrlEnable ctrlEnabled ctrlFade ctrlHTMLLoaded ctrlIDC ctrlIDD ' +
+ 'ctrlMapAnimAdd ctrlMapAnimClear ctrlMapAnimCommit ctrlMapAnimDone ctrlMapCursor ctrlMapMouseOver ' +
+ 'ctrlMapScale ctrlMapScreenToWorld ctrlMapWorldToScreen ctrlModel ctrlModelDirAndUp ctrlModelScale ' +
+ 'ctrlParent ctrlParentControlsGroup ctrlPosition ctrlRemoveAllEventHandlers ctrlRemoveEventHandler ' +
+ 'ctrlScale ctrlSetActiveColor ctrlSetAngle ctrlSetAutoScrollDelay ctrlSetAutoScrollRewind ' +
+ 'ctrlSetAutoScrollSpeed ctrlSetBackgroundColor ctrlSetChecked ctrlSetEventHandler ctrlSetFade ' +
+ 'ctrlSetFocus ctrlSetFont ctrlSetFontH1 ctrlSetFontH1B ctrlSetFontH2 ctrlSetFontH2B ctrlSetFontH3 ' +
+ 'ctrlSetFontH3B ctrlSetFontH4 ctrlSetFontH4B ctrlSetFontH5 ctrlSetFontH5B ctrlSetFontH6 ' +
+ 'ctrlSetFontH6B ctrlSetFontHeight ctrlSetFontHeightH1 ctrlSetFontHeightH2 ctrlSetFontHeightH3 ' +
+ 'ctrlSetFontHeightH4 ctrlSetFontHeightH5 ctrlSetFontHeightH6 ctrlSetFontHeightSecondary ' +
+ 'ctrlSetFontP ctrlSetFontPB ctrlSetFontSecondary ctrlSetForegroundColor ctrlSetModel ' +
+ 'ctrlSetModelDirAndUp ctrlSetModelScale ctrlSetPixelPrecision ctrlSetPosition ctrlSetScale ' +
+ 'ctrlSetStructuredText ctrlSetText ctrlSetTextColor ctrlSetTooltip ctrlSetTooltipColorBox ' +
+ 'ctrlSetTooltipColorShade ctrlSetTooltipColorText ctrlShow ctrlShown ctrlText ctrlTextHeight ' +
+ 'ctrlTextWidth ctrlType ctrlVisible ctRowControls ctRowCount ctSetCurSel ctSetData ' +
+ 'ctSetHeaderTemplate ctSetRowTemplate ctSetValue ctValue curatorAddons curatorCamera ' +
+ 'curatorCameraArea curatorCameraAreaCeiling curatorCoef curatorEditableObjects curatorEditingArea ' +
+ 'curatorEditingAreaType curatorMouseOver curatorPoints curatorRegisteredObjects curatorSelected ' +
+ 'curatorWaypointCost current3DENOperation currentChannel currentCommand currentMagazine ' +
+ 'currentMagazineDetail currentMagazineDetailTurret currentMagazineTurret currentMuzzle ' +
+ 'currentNamespace currentTask currentTasks currentThrowable currentVisionMode currentWaypoint ' +
+ 'currentWeapon currentWeaponMode currentWeaponTurret currentZeroing cursorObject cursorTarget ' +
+ 'customChat customRadio cutFadeOut cutObj cutRsc cutText damage date dateToNumber daytime ' +
+ 'deActivateKey debriefingText debugFSM debugLog deg delete3DENEntities deleteAt deleteCenter ' +
+ 'deleteCollection deleteEditorObject deleteGroup deleteGroupWhenEmpty deleteIdentity ' +
+ 'deleteLocation deleteMarker deleteMarkerLocal deleteRange deleteResources deleteSite deleteStatus ' +
+ 'deleteTeam deleteVehicle deleteVehicleCrew deleteWaypoint detach detectedMines ' +
+ 'diag_activeMissionFSMs diag_activeScripts diag_activeSQFScripts diag_activeSQSScripts ' +
+ 'diag_captureFrame diag_captureFrameToFile diag_captureSlowFrame diag_codePerformance ' +
+ 'diag_drawMode diag_enable diag_enabled diag_fps diag_fpsMin diag_frameNo diag_lightNewLoad ' +
+ 'diag_list diag_log diag_logSlowFrame diag_mergeConfigFile diag_recordTurretLimits ' +
+ 'diag_setLightNew diag_tickTime diag_toggle dialog diarySubjectExists didJIP didJIPOwner ' +
+ 'difficulty difficultyEnabled difficultyEnabledRTD difficultyOption direction directSay disableAI ' +
+ 'disableCollisionWith disableConversation disableDebriefingStats disableMapIndicators ' +
+ 'disableNVGEquipment disableRemoteSensors disableSerialization disableTIEquipment ' +
+ 'disableUAVConnectability disableUserInput displayAddEventHandler displayCtrl displayParent ' +
+ 'displayRemoveAllEventHandlers displayRemoveEventHandler displaySetEventHandler dissolveTeam ' +
+ 'distance distance2D distanceSqr distributionRegion do3DENAction doArtilleryFire doFire doFollow ' +
+ 'doFSM doGetOut doMove doorPhase doStop doSuppressiveFire doTarget doWatch drawArrow drawEllipse ' +
+ 'drawIcon drawIcon3D drawLine drawLine3D drawLink drawLocation drawPolygon drawRectangle ' +
+ 'drawTriangle driver drop dynamicSimulationDistance dynamicSimulationDistanceCoef ' +
+ 'dynamicSimulationEnabled dynamicSimulationSystemEnabled echo edit3DENMissionAttributes editObject ' +
+ 'editorSetEventHandler effectiveCommander emptyPositions enableAI enableAIFeature ' +
+ 'enableAimPrecision enableAttack enableAudioFeature enableAutoStartUpRTD enableAutoTrimRTD ' +
+ 'enableCamShake enableCaustics enableChannel enableCollisionWith enableCopilot ' +
+ 'enableDebriefingStats enableDiagLegend enableDynamicSimulation enableDynamicSimulationSystem ' +
+ 'enableEndDialog enableEngineArtillery enableEnvironment enableFatigue enableGunLights ' +
+ 'enableInfoPanelComponent enableIRLasers enableMimics enablePersonTurret enableRadio enableReload ' +
+ 'enableRopeAttach enableSatNormalOnDetail enableSaving enableSentences enableSimulation ' +
+ 'enableSimulationGlobal enableStamina enableTeamSwitch enableTraffic enableUAVConnectability ' +
+ 'enableUAVWaypoints enableVehicleCargo enableVehicleSensor enableWeaponDisassembly ' +
+ 'endLoadingScreen endMission engineOn enginesIsOnRTD enginesRpmRTD enginesTorqueRTD entities ' +
+ 'environmentEnabled estimatedEndServerTime estimatedTimeLeft evalObjectArgument everyBackpack ' +
+ 'everyContainer exec execEditorScript execFSM execVM exp expectedDestination exportJIPMessages ' +
+ 'eyeDirection eyePos face faction fadeMusic fadeRadio fadeSound fadeSpeech failMission ' +
+ 'fillWeaponsFromPool find findCover findDisplay findEditorObject findEmptyPosition ' +
+ 'findEmptyPositionReady findIf findNearestEnemy finishMissionInit finite fire fireAtTarget ' +
+ 'firstBackpack flag flagAnimationPhase flagOwner flagSide flagTexture fleeing floor flyInHeight ' +
+ 'flyInHeightASL fog fogForecast fogParams forceAddUniform forcedMap forceEnd forceFlagTexture ' +
+ 'forceFollowRoad forceMap forceRespawn forceSpeed forceWalk forceWeaponFire forceWeatherChange ' +
+ 'forEachMember forEachMemberAgent forEachMemberTeam forgetTarget format formation ' +
+ 'formationDirection formationLeader formationMembers formationPosition formationTask formatText ' +
+ 'formLeader freeLook fromEditor fuel fullCrew gearIDCAmmoCount gearSlotAmmoCount gearSlotData ' +
+ 'get3DENActionState get3DENAttribute get3DENCamera get3DENConnections get3DENEntity ' +
+ 'get3DENEntityID get3DENGrid get3DENIconsVisible get3DENLayerEntities get3DENLinesVisible ' +
+ 'get3DENMissionAttribute get3DENMouseOver get3DENSelected getAimingCoef getAllEnvSoundControllers ' +
+ 'getAllHitPointsDamage getAllOwnedMines getAllSoundControllers getAmmoCargo getAnimAimPrecision ' +
+ 'getAnimSpeedCoef getArray getArtilleryAmmo getArtilleryComputerSettings getArtilleryETA ' +
+ 'getAssignedCuratorLogic getAssignedCuratorUnit getBackpackCargo getBleedingRemaining ' +
+ 'getBurningValue getCameraViewDirection getCargoIndex getCenterOfMass getClientState ' +
+ 'getClientStateNumber getCompatiblePylonMagazines getConnectedUAV getContainerMaxLoad ' +
+ 'getCursorObjectParams getCustomAimCoef getDammage getDescription getDir getDirVisual ' +
+ 'getDLCAssetsUsage getDLCAssetsUsageByName getDLCs getEditorCamera getEditorMode ' +
+ 'getEditorObjectScope getElevationOffset getEnvSoundController getFatigue getForcedFlagTexture ' +
+ 'getFriend getFSMVariable getFuelCargo getGroupIcon getGroupIconParams getGroupIcons getHideFrom ' +
+ 'getHit getHitIndex getHitPointDamage getItemCargo getMagazineCargo getMarkerColor getMarkerPos ' +
+ 'getMarkerSize getMarkerType getMass getMissionConfig getMissionConfigValue getMissionDLCs ' +
+ 'getMissionLayerEntities getModelInfo getMousePosition getMusicPlayedTime getNumber ' +
+ 'getObjectArgument getObjectChildren getObjectDLC getObjectMaterials getObjectProxy ' +
+ 'getObjectTextures getObjectType getObjectViewDistance getOxygenRemaining getPersonUsedDLCs ' +
+ 'getPilotCameraDirection getPilotCameraPosition getPilotCameraRotation getPilotCameraTarget ' +
+ 'getPlateNumber getPlayerChannel getPlayerScores getPlayerUID getPos getPosASL getPosASLVisual ' +
+ 'getPosASLW getPosATL getPosATLVisual getPosVisual getPosWorld getPylonMagazines getRelDir ' +
+ 'getRelPos getRemoteSensorsDisabled getRepairCargo getResolution getShadowDistance getShotParents ' +
+ 'getSlingLoad getSoundController getSoundControllerResult getSpeed getStamina getStatValue ' +
+ 'getSuppression getTerrainGrid getTerrainHeightASL getText getTotalDLCUsageTime getUnitLoadout ' +
+ 'getUnitTrait getUserMFDText getUserMFDvalue getVariable getVehicleCargo getWeaponCargo ' +
+ 'getWeaponSway getWingsOrientationRTD getWingsPositionRTD getWPPos glanceAt globalChat globalRadio ' +
+ 'goggles goto group groupChat groupFromNetId groupIconSelectable groupIconsVisible groupId ' +
+ 'groupOwner groupRadio groupSelectedUnits groupSelectUnit gunner gusts halt handgunItems ' +
+ 'handgunMagazine handgunWeapon handsHit hasInterface hasPilotCamera hasWeapon hcAllGroups ' +
+ 'hcGroupParams hcLeader hcRemoveAllGroups hcRemoveGroup hcSelected hcSelectGroup hcSetGroup ' +
+ 'hcShowBar hcShownBar headgear hideBody hideObject hideObjectGlobal hideSelection hint hintC ' +
+ 'hintCadet hintSilent hmd hostMission htmlLoad HUDMovementLevels humidity image importAllGroups ' +
+ 'importance in inArea inAreaArray incapacitatedState inflame inflamed infoPanel ' +
+ 'infoPanelComponentEnabled infoPanelComponents infoPanels inGameUISetEventHandler inheritsFrom ' +
+ 'initAmbientLife inPolygon inputAction inRangeOfArtillery insertEditorObject intersect is3DEN ' +
+ 'is3DENMultiplayer isAbleToBreathe isAgent isArray isAutoHoverOn isAutonomous isAutotest ' +
+ 'isBleeding isBurning isClass isCollisionLightOn isCopilotEnabled isDamageAllowed isDedicated ' +
+ 'isDLCAvailable isEngineOn isEqualTo isEqualType isEqualTypeAll isEqualTypeAny isEqualTypeArray ' +
+ 'isEqualTypeParams isFilePatchingEnabled isFlashlightOn isFlatEmpty isForcedWalk isFormationLeader ' +
+ 'isGroupDeletedWhenEmpty isHidden isInRemainsCollector isInstructorFigureEnabled isIRLaserOn ' +
+ 'isKeyActive isKindOf isLaserOn isLightOn isLocalized isManualFire isMarkedForCollection ' +
+ 'isMultiplayer isMultiplayerSolo isNil isNull isNumber isObjectHidden isObjectRTD isOnRoad ' +
+ 'isPipEnabled isPlayer isRealTime isRemoteExecuted isRemoteExecutedJIP isServer isShowing3DIcons ' +
+ 'isSimpleObject isSprintAllowed isStaminaEnabled isSteamMission isStreamFriendlyUIEnabled isText ' +
+ 'isTouchingGround isTurnedOut isTutHintsEnabled isUAVConnectable isUAVConnected isUIContext ' +
+ 'isUniformAllowed isVehicleCargo isVehicleRadarOn isVehicleSensorEnabled isWalking ' +
+ 'isWeaponDeployed isWeaponRested itemCargo items itemsWithMagazines join joinAs joinAsSilent ' +
+ 'joinSilent joinString kbAddDatabase kbAddDatabaseTargets kbAddTopic kbHasTopic kbReact ' +
+ 'kbRemoveTopic kbTell kbWasSaid keyImage keyName knowsAbout land landAt landResult language ' +
+ 'laserTarget lbAdd lbClear lbColor lbColorRight lbCurSel lbData lbDelete lbIsSelected lbPicture ' +
+ 'lbPictureRight lbSelection lbSetColor lbSetColorRight lbSetCurSel lbSetData lbSetPicture ' +
+ 'lbSetPictureColor lbSetPictureColorDisabled lbSetPictureColorSelected lbSetPictureRight ' +
+ 'lbSetPictureRightColor lbSetPictureRightColorDisabled lbSetPictureRightColorSelected ' +
+ 'lbSetSelectColor lbSetSelectColorRight lbSetSelected lbSetText lbSetTextRight lbSetTooltip ' +
+ 'lbSetValue lbSize lbSort lbSortByValue lbText lbTextRight lbValue leader leaderboardDeInit ' +
+ 'leaderboardGetRows leaderboardInit leaderboardRequestRowsFriends leaderboardsRequestUploadScore ' +
+ 'leaderboardsRequestUploadScoreKeepBest leaderboardState leaveVehicle libraryCredits ' +
+ 'libraryDisclaimers lifeState lightAttachObject lightDetachObject lightIsOn lightnings limitSpeed ' +
+ 'linearConversion lineIntersects lineIntersectsObjs lineIntersectsSurfaces lineIntersectsWith ' +
+ 'linkItem list listObjects listRemoteTargets listVehicleSensors ln lnbAddArray lnbAddColumn ' +
+ 'lnbAddRow lnbClear lnbColor lnbCurSelRow lnbData lnbDeleteColumn lnbDeleteRow ' +
+ 'lnbGetColumnsPosition lnbPicture lnbSetColor lnbSetColumnsPos lnbSetCurSelRow lnbSetData ' +
+ 'lnbSetPicture lnbSetText lnbSetValue lnbSize lnbSort lnbSortByValue lnbText lnbValue load loadAbs ' +
+ 'loadBackpack loadFile loadGame loadIdentity loadMagazine loadOverlay loadStatus loadUniform ' +
+ 'loadVest local localize locationPosition lock lockCameraTo lockCargo lockDriver locked ' +
+ 'lockedCargo lockedDriver lockedTurret lockIdentity lockTurret lockWP log logEntities logNetwork ' +
+ 'logNetworkTerminate lookAt lookAtPos magazineCargo magazines magazinesAllTurrets magazinesAmmo ' +
+ 'magazinesAmmoCargo magazinesAmmoFull magazinesDetail magazinesDetailBackpack ' +
+ 'magazinesDetailUniform magazinesDetailVest magazinesTurret magazineTurretAmmo mapAnimAdd ' +
+ 'mapAnimClear mapAnimCommit mapAnimDone mapCenterOnCamera mapGridPosition markAsFinishedOnSteam ' +
+ 'markerAlpha markerBrush markerColor markerDir markerPos markerShape markerSize markerText ' +
+ 'markerType max members menuAction menuAdd menuChecked menuClear menuCollapse menuData menuDelete ' +
+ 'menuEnable menuEnabled menuExpand menuHover menuPicture menuSetAction menuSetCheck menuSetData ' +
+ 'menuSetPicture menuSetValue menuShortcut menuShortcutText menuSize menuSort menuText menuURL ' +
+ 'menuValue min mineActive mineDetectedBy missionConfigFile missionDifficulty missionName ' +
+ 'missionNamespace missionStart missionVersion mod modelToWorld modelToWorldVisual ' +
+ 'modelToWorldVisualWorld modelToWorldWorld modParams moonIntensity moonPhase morale move ' +
+ 'move3DENCamera moveInAny moveInCargo moveInCommander moveInDriver moveInGunner moveInTurret ' +
+ 'moveObjectToEnd moveOut moveTime moveTo moveToCompleted moveToFailed musicVolume name nameSound ' +
+ 'nearEntities nearestBuilding nearestLocation nearestLocations nearestLocationWithDubbing ' +
+ 'nearestObject nearestObjects nearestTerrainObjects nearObjects nearObjectsReady nearRoads ' +
+ 'nearSupplies nearTargets needReload netId netObjNull newOverlay nextMenuItemIndex ' +
+ 'nextWeatherChange nMenuItems not numberOfEnginesRTD numberToDate objectCurators objectFromNetId ' +
+ 'objectParent objStatus onBriefingGroup onBriefingNotes onBriefingPlan onBriefingTeamSwitch ' +
+ 'onCommandModeChanged onDoubleClick onEachFrame onGroupIconClick onGroupIconOverEnter ' +
+ 'onGroupIconOverLeave onHCGroupSelectionChanged onMapSingleClick onPlayerConnected ' +
+ 'onPlayerDisconnected onPreloadFinished onPreloadStarted onShowNewObject onTeamSwitch ' +
+ 'openCuratorInterface openDLCPage openMap openSteamApp openYoutubeVideo or orderGetIn overcast ' +
+ 'overcastForecast owner param params parseNumber parseSimpleArray parseText parsingNamespace ' +
+ 'particlesQuality pickWeaponPool pitch pixelGrid pixelGridBase pixelGridNoUIScale pixelH pixelW ' +
+ 'playableSlotsNumber playableUnits playAction playActionNow player playerRespawnTime playerSide ' +
+ 'playersNumber playGesture playMission playMove playMoveNow playMusic playScriptedMission ' +
+ 'playSound playSound3D position positionCameraToWorld posScreenToWorld posWorldToScreen ' +
+ 'ppEffectAdjust ppEffectCommit ppEffectCommitted ppEffectCreate ppEffectDestroy ppEffectEnable ' +
+ 'ppEffectEnabled ppEffectForceInNVG precision preloadCamera preloadObject preloadSound ' +
+ 'preloadTitleObj preloadTitleRsc preprocessFile preprocessFileLineNumbers primaryWeapon ' +
+ 'primaryWeaponItems primaryWeaponMagazine priority processDiaryLink productVersion profileName ' +
+ 'profileNamespace profileNameSteam progressLoadingScreen progressPosition progressSetPosition ' +
+ 'publicVariable publicVariableClient publicVariableServer pushBack pushBackUnique putWeaponPool ' +
+ 'queryItemsPool queryMagazinePool queryWeaponPool rad radioChannelAdd radioChannelCreate ' +
+ 'radioChannelRemove radioChannelSetCallSign radioChannelSetLabel radioVolume rain rainbow random ' +
+ 'rank rankId rating rectangular registeredTasks registerTask reload reloadEnabled remoteControl ' +
+ 'remoteExec remoteExecCall remoteExecutedOwner remove3DENConnection remove3DENEventHandler ' +
+ 'remove3DENLayer removeAction removeAll3DENEventHandlers removeAllActions removeAllAssignedItems ' +
+ 'removeAllContainers removeAllCuratorAddons removeAllCuratorCameraAreas ' +
+ 'removeAllCuratorEditingAreas removeAllEventHandlers removeAllHandgunItems removeAllItems ' +
+ 'removeAllItemsWithMagazines removeAllMissionEventHandlers removeAllMPEventHandlers ' +
+ 'removeAllMusicEventHandlers removeAllOwnedMines removeAllPrimaryWeaponItems removeAllWeapons ' +
+ 'removeBackpack removeBackpackGlobal removeCuratorAddons removeCuratorCameraArea ' +
+ 'removeCuratorEditableObjects removeCuratorEditingArea removeDrawIcon removeDrawLinks ' +
+ 'removeEventHandler removeFromRemainsCollector removeGoggles removeGroupIcon removeHandgunItem ' +
+ 'removeHeadgear removeItem removeItemFromBackpack removeItemFromUniform removeItemFromVest ' +
+ 'removeItems removeMagazine removeMagazineGlobal removeMagazines removeMagazinesTurret ' +
+ 'removeMagazineTurret removeMenuItem removeMissionEventHandler removeMPEventHandler ' +
+ 'removeMusicEventHandler removeOwnedMine removePrimaryWeaponItem removeSecondaryWeaponItem ' +
+ 'removeSimpleTask removeSwitchableUnit removeTeamMember removeUniform removeVest removeWeapon ' +
+ 'removeWeaponAttachmentCargo removeWeaponCargo removeWeaponGlobal removeWeaponTurret ' +
+ 'reportRemoteTarget requiredVersion resetCamShake resetSubgroupDirection resize resources ' +
+ 'respawnVehicle restartEditorCamera reveal revealMine reverse reversedMouseY roadAt ' +
+ 'roadsConnectedTo roleDescription ropeAttachedObjects ropeAttachedTo ropeAttachEnabled ' +
+ 'ropeAttachTo ropeCreate ropeCut ropeDestroy ropeDetach ropeEndPosition ropeLength ropes ' +
+ 'ropeUnwind ropeUnwound rotorsForcesRTD rotorsRpmRTD round runInitScript safeZoneH safeZoneW ' +
+ 'safeZoneWAbs safeZoneX safeZoneXAbs safeZoneY save3DENInventory saveGame saveIdentity ' +
+ 'saveJoysticks saveOverlay saveProfileNamespace saveStatus saveVar savingEnabled say say2D say3D ' +
+ 'scopeName score scoreSide screenshot screenToWorld scriptDone scriptName scudState ' +
+ 'secondaryWeapon secondaryWeaponItems secondaryWeaponMagazine select selectBestPlaces ' +
+ 'selectDiarySubject selectedEditorObjects selectEditorObject selectionNames selectionPosition ' +
+ 'selectLeader selectMax selectMin selectNoPlayer selectPlayer selectRandom selectRandomWeighted ' +
+ 'selectWeapon selectWeaponTurret sendAUMessage sendSimpleCommand sendTask sendTaskResult ' +
+ 'sendUDPMessage serverCommand serverCommandAvailable serverCommandExecutable serverName serverTime ' +
+ 'set set3DENAttribute set3DENAttributes set3DENGrid set3DENIconsVisible set3DENLayer ' +
+ 'set3DENLinesVisible set3DENLogicType set3DENMissionAttribute set3DENMissionAttributes ' +
+ 'set3DENModelsVisible set3DENObjectType set3DENSelected setAccTime setActualCollectiveRTD ' +
+ 'setAirplaneThrottle setAirportSide setAmmo setAmmoCargo setAmmoOnPylon setAnimSpeedCoef ' +
+ 'setAperture setApertureNew setArmoryPoints setAttributes setAutonomous setBehaviour ' +
+ 'setBleedingRemaining setBrakesRTD setCameraInterest setCamShakeDefParams setCamShakeParams ' +
+ 'setCamUseTI setCaptive setCenterOfMass setCollisionLight setCombatMode setCompassOscillation ' +
+ 'setConvoySeparation setCuratorCameraAreaCeiling setCuratorCoef setCuratorEditingAreaType ' +
+ 'setCuratorWaypointCost setCurrentChannel setCurrentTask setCurrentWaypoint setCustomAimCoef ' +
+ 'setCustomWeightRTD setDamage setDammage setDate setDebriefingText setDefaultCamera setDestination ' +
+ 'setDetailMapBlendPars setDir setDirection setDrawIcon setDriveOnPath setDropInterval ' +
+ 'setDynamicSimulationDistance setDynamicSimulationDistanceCoef setEditorMode setEditorObjectScope ' +
+ 'setEffectCondition setEngineRPMRTD setFace setFaceAnimation setFatigue setFeatureType ' +
+ 'setFlagAnimationPhase setFlagOwner setFlagSide setFlagTexture setFog setFormation ' +
+ 'setFormationTask setFormDir setFriend setFromEditor setFSMVariable setFuel setFuelCargo ' +
+ 'setGroupIcon setGroupIconParams setGroupIconsSelectable setGroupIconsVisible setGroupId ' +
+ 'setGroupIdGlobal setGroupOwner setGusts setHideBehind setHit setHitIndex setHitPointDamage ' +
+ 'setHorizonParallaxCoef setHUDMovementLevels setIdentity setImportance setInfoPanel setLeader ' +
+ 'setLightAmbient setLightAttenuation setLightBrightness setLightColor setLightDayLight ' +
+ 'setLightFlareMaxDistance setLightFlareSize setLightIntensity setLightnings setLightUseFlare ' +
+ 'setLocalWindParams setMagazineTurretAmmo setMarkerAlpha setMarkerAlphaLocal setMarkerBrush ' +
+ 'setMarkerBrushLocal setMarkerColor setMarkerColorLocal setMarkerDir setMarkerDirLocal ' +
+ 'setMarkerPos setMarkerPosLocal setMarkerShape setMarkerShapeLocal setMarkerSize ' +
+ 'setMarkerSizeLocal setMarkerText setMarkerTextLocal setMarkerType setMarkerTypeLocal setMass ' +
+ 'setMimic setMousePosition setMusicEffect setMusicEventHandler setName setNameSound ' +
+ 'setObjectArguments setObjectMaterial setObjectMaterialGlobal setObjectProxy setObjectTexture ' +
+ 'setObjectTextureGlobal setObjectViewDistance setOvercast setOwner setOxygenRemaining ' +
+ 'setParticleCircle setParticleClass setParticleFire setParticleParams setParticleRandom ' +
+ 'setPilotCameraDirection setPilotCameraRotation setPilotCameraTarget setPilotLight setPiPEffect ' +
+ 'setPitch setPlateNumber setPlayable setPlayerRespawnTime setPos setPosASL setPosASL2 setPosASLW ' +
+ 'setPosATL setPosition setPosWorld setPylonLoadOut setPylonsPriority setRadioMsg setRain ' +
+ 'setRainbow setRandomLip setRank setRectangular setRepairCargo setRotorBrakeRTD setShadowDistance ' +
+ 'setShotParents setSide setSimpleTaskAlwaysVisible setSimpleTaskCustomData ' +
+ 'setSimpleTaskDescription setSimpleTaskDestination setSimpleTaskTarget setSimpleTaskType ' +
+ 'setSimulWeatherLayers setSize setSkill setSlingLoad setSoundEffect setSpeaker setSpeech ' +
+ 'setSpeedMode setStamina setStaminaScheme setStatValue setSuppression setSystemOfUnits ' +
+ 'setTargetAge setTaskMarkerOffset setTaskResult setTaskState setTerrainGrid setText ' +
+ 'setTimeMultiplier setTitleEffect setTrafficDensity setTrafficDistance setTrafficGap ' +
+ 'setTrafficSpeed setTriggerActivation setTriggerArea setTriggerStatements setTriggerText ' +
+ 'setTriggerTimeout setTriggerType setType setUnconscious setUnitAbility setUnitLoadout setUnitPos ' +
+ 'setUnitPosWeak setUnitRank setUnitRecoilCoefficient setUnitTrait setUnloadInCombat ' +
+ 'setUserActionText setUserMFDText setUserMFDvalue setVariable setVectorDir setVectorDirAndUp ' +
+ 'setVectorUp setVehicleAmmo setVehicleAmmoDef setVehicleArmor setVehicleCargo setVehicleId ' +
+ 'setVehicleLock setVehiclePosition setVehicleRadar setVehicleReceiveRemoteTargets ' +
+ 'setVehicleReportOwnPosition setVehicleReportRemoteTargets setVehicleTIPars setVehicleVarName ' +
+ 'setVelocity setVelocityModelSpace setVelocityTransformation setViewDistance ' +
+ 'setVisibleIfTreeCollapsed setWantedRPMRTD setWaves setWaypointBehaviour setWaypointCombatMode ' +
+ 'setWaypointCompletionRadius setWaypointDescription setWaypointForceBehaviour setWaypointFormation ' +
+ 'setWaypointHousePosition setWaypointLoiterRadius setWaypointLoiterType setWaypointName ' +
+ 'setWaypointPosition setWaypointScript setWaypointSpeed setWaypointStatements setWaypointTimeout ' +
+ 'setWaypointType setWaypointVisible setWeaponReloadingTime setWind setWindDir setWindForce ' +
+ 'setWindStr setWingForceScaleRTD setWPPos show3DIcons showChat showCinemaBorder showCommandingMenu ' +
+ 'showCompass showCuratorCompass showGPS showHUD showLegend showMap shownArtilleryComputer ' +
+ 'shownChat shownCompass shownCuratorCompass showNewEditorObject shownGPS shownHUD shownMap ' +
+ 'shownPad shownRadio shownScoretable shownUAVFeed shownWarrant shownWatch showPad showRadio ' +
+ 'showScoretable showSubtitles showUAVFeed showWarrant showWatch showWaypoint showWaypoints side ' +
+ 'sideChat sideEnemy sideFriendly sideRadio simpleTasks simulationEnabled simulCloudDensity ' +
+ 'simulCloudOcclusion simulInClouds simulWeatherSync sin size sizeOf skill skillFinal skipTime ' +
+ 'sleep sliderPosition sliderRange sliderSetPosition sliderSetRange sliderSetSpeed sliderSpeed ' +
+ 'slingLoadAssistantShown soldierMagazines someAmmo sort soundVolume spawn speaker speed speedMode ' +
+ 'splitString sqrt squadParams stance startLoadingScreen step stop stopEngineRTD stopped str ' +
+ 'sunOrMoon supportInfo suppressFor surfaceIsWater surfaceNormal surfaceType swimInDepth ' +
+ 'switchableUnits switchAction switchCamera switchGesture switchLight switchMove ' +
+ 'synchronizedObjects synchronizedTriggers synchronizedWaypoints synchronizeObjectsAdd ' +
+ 'synchronizeObjectsRemove synchronizeTrigger synchronizeWaypoint systemChat systemOfUnits tan ' +
+ 'targetKnowledge targets targetsAggregate targetsQuery taskAlwaysVisible taskChildren ' +
+ 'taskCompleted taskCustomData taskDescription taskDestination taskHint taskMarkerOffset taskParent ' +
+ 'taskResult taskState taskType teamMember teamName teams teamSwitch teamSwitchEnabled teamType ' +
+ 'terminate terrainIntersect terrainIntersectASL terrainIntersectAtASL text textLog textLogFormat ' +
+ 'tg time timeMultiplier titleCut titleFadeOut titleObj titleRsc titleText toArray toFixed toLower ' +
+ 'toString toUpper triggerActivated triggerActivation triggerArea triggerAttachedVehicle ' +
+ 'triggerAttachObject triggerAttachVehicle triggerDynamicSimulation triggerStatements triggerText ' +
+ 'triggerTimeout triggerTimeoutCurrent triggerType turretLocal turretOwner turretUnit tvAdd tvClear ' +
+ 'tvCollapse tvCollapseAll tvCount tvCurSel tvData tvDelete tvExpand tvExpandAll tvPicture ' +
+ 'tvSetColor tvSetCurSel tvSetData tvSetPicture tvSetPictureColor tvSetPictureColorDisabled ' +
+ 'tvSetPictureColorSelected tvSetPictureRight tvSetPictureRightColor tvSetPictureRightColorDisabled ' +
+ 'tvSetPictureRightColorSelected tvSetText tvSetTooltip tvSetValue tvSort tvSortByValue tvText ' +
+ 'tvTooltip tvValue type typeName typeOf UAVControl uiNamespace uiSleep unassignCurator ' +
+ 'unassignItem unassignTeam unassignVehicle underwater uniform uniformContainer uniformItems ' +
+ 'uniformMagazines unitAddons unitAimPosition unitAimPositionVisual unitBackpack unitIsUAV unitPos ' +
+ 'unitReady unitRecoilCoefficient units unitsBelowHeight unlinkItem unlockAchievement ' +
+ 'unregisterTask updateDrawIcon updateMenuItem updateObjectTree useAISteeringComponent ' +
+ 'useAudioTimeForMoves userInputDisabled vectorAdd vectorCos vectorCrossProduct vectorDiff ' +
+ 'vectorDir vectorDirVisual vectorDistance vectorDistanceSqr vectorDotProduct vectorFromTo ' +
+ 'vectorMagnitude vectorMagnitudeSqr vectorModelToWorld vectorModelToWorldVisual vectorMultiply ' +
+ 'vectorNormalized vectorUp vectorUpVisual vectorWorldToModel vectorWorldToModelVisual vehicle ' +
+ 'vehicleCargoEnabled vehicleChat vehicleRadio vehicleReceiveRemoteTargets vehicleReportOwnPosition ' +
+ 'vehicleReportRemoteTargets vehicles vehicleVarName velocity velocityModelSpace verifySignature ' +
+ 'vest vestContainer vestItems vestMagazines viewDistance visibleCompass visibleGPS visibleMap ' +
+ 'visiblePosition visiblePositionASL visibleScoretable visibleWatch waves waypointAttachedObject ' +
+ 'waypointAttachedVehicle waypointAttachObject waypointAttachVehicle waypointBehaviour ' +
+ 'waypointCombatMode waypointCompletionRadius waypointDescription waypointForceBehaviour ' +
+ 'waypointFormation waypointHousePosition waypointLoiterRadius waypointLoiterType waypointName ' +
+ 'waypointPosition waypoints waypointScript waypointsEnabledUAV waypointShow waypointSpeed ' +
+ 'waypointStatements waypointTimeout waypointTimeoutCurrent waypointType waypointVisible ' +
+ 'weaponAccessories weaponAccessoriesCargo weaponCargo weaponDirection weaponInertia weaponLowered ' +
+ 'weapons weaponsItems weaponsItemsCargo weaponState weaponsTurret weightRTD WFSideText wind ',
+ literal:
+ 'blufor civilian configNull controlNull displayNull east endl false grpNull independent lineBreak ' +
+ 'locationNull nil objNull opfor pi resistance scriptNull sideAmbientLife sideEmpty sideLogic ' +
+ 'sideUnknown taskNull teamMemberNull true west'
+ },
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.NUMBER_MODE,
+ VARIABLE,
+ FUNCTION,
+ STRINGS,
+ PREPROCESSOR
+ ],
+ illegal: /#|^\$ /
+ };
+}
+
+module.exports = sqf;
+
+
+/***/ }),
+
+/***/ 42318:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/**
+ * Any of the passed expresssions may match
+ *
+ * Creates a huge this | this | that | that match
+ * @param {(RegExp | string)[] } args
+ * @returns {string}
+ */
+function either(...args) {
+ const joined = '(' + args.map((x) => source(x)).join("|") + ")";
+ return joined;
+}
+
+/*
+ Language: SQL
+ Website: https://en.wikipedia.org/wiki/SQL
+ Category: common, database
+ */
+
+function sql(hljs) {
+ const COMMENT_MODE = hljs.COMMENT('--', '$');
+ const STRING = {
+ className: 'string',
+ variants: [
+ {
+ begin: /'/,
+ end: /'/,
+ contains: [
+ {begin: /''/ }
+ ]
+ }
+ ]
+ };
+ const QUOTED_IDENTIFIER = {
+ begin: /"/,
+ end: /"/,
+ contains: [ { begin: /""/ } ]
+ };
+
+ const LITERALS = [
+ "true",
+ "false",
+ // Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
+ // "null",
+ "unknown"
+ ];
+
+ const MULTI_WORD_TYPES = [
+ "double precision",
+ "large object",
+ "with timezone",
+ "without timezone"
+ ];
+
+ const TYPES = [
+ 'bigint',
+ 'binary',
+ 'blob',
+ 'boolean',
+ 'char',
+ 'character',
+ 'clob',
+ 'date',
+ 'dec',
+ 'decfloat',
+ 'decimal',
+ 'float',
+ 'int',
+ 'integer',
+ 'interval',
+ 'nchar',
+ 'nclob',
+ 'national',
+ 'numeric',
+ 'real',
+ 'row',
+ 'smallint',
+ 'time',
+ 'timestamp',
+ 'varchar',
+ 'varying', // modifier (character varying)
+ 'varbinary'
+ ];
+
+ const NON_RESERVED_WORDS = [
+ "add",
+ "asc",
+ "collation",
+ "desc",
+ "final",
+ "first",
+ "last",
+ "view"
+ ];
+
+ // https://jakewheat.github.io/sql-overview/sql-2016-foundation-grammar.html#reserved-word
+ const RESERVED_WORDS = [
+ "abs",
+ "acos",
+ "all",
+ "allocate",
+ "alter",
+ "and",
+ "any",
+ "are",
+ "array",
+ "array_agg",
+ "array_max_cardinality",
+ "as",
+ "asensitive",
+ "asin",
+ "asymmetric",
+ "at",
+ "atan",
+ "atomic",
+ "authorization",
+ "avg",
+ "begin",
+ "begin_frame",
+ "begin_partition",
+ "between",
+ "bigint",
+ "binary",
+ "blob",
+ "boolean",
+ "both",
+ "by",
+ "call",
+ "called",
+ "cardinality",
+ "cascaded",
+ "case",
+ "cast",
+ "ceil",
+ "ceiling",
+ "char",
+ "char_length",
+ "character",
+ "character_length",
+ "check",
+ "classifier",
+ "clob",
+ "close",
+ "coalesce",
+ "collate",
+ "collect",
+ "column",
+ "commit",
+ "condition",
+ "connect",
+ "constraint",
+ "contains",
+ "convert",
+ "copy",
+ "corr",
+ "corresponding",
+ "cos",
+ "cosh",
+ "count",
+ "covar_pop",
+ "covar_samp",
+ "create",
+ "cross",
+ "cube",
+ "cume_dist",
+ "current",
+ "current_catalog",
+ "current_date",
+ "current_default_transform_group",
+ "current_path",
+ "current_role",
+ "current_row",
+ "current_schema",
+ "current_time",
+ "current_timestamp",
+ "current_path",
+ "current_role",
+ "current_transform_group_for_type",
+ "current_user",
+ "cursor",
+ "cycle",
+ "date",
+ "day",
+ "deallocate",
+ "dec",
+ "decimal",
+ "decfloat",
+ "declare",
+ "default",
+ "define",
+ "delete",
+ "dense_rank",
+ "deref",
+ "describe",
+ "deterministic",
+ "disconnect",
+ "distinct",
+ "double",
+ "drop",
+ "dynamic",
+ "each",
+ "element",
+ "else",
+ "empty",
+ "end",
+ "end_frame",
+ "end_partition",
+ "end-exec",
+ "equals",
+ "escape",
+ "every",
+ "except",
+ "exec",
+ "execute",
+ "exists",
+ "exp",
+ "external",
+ "extract",
+ "false",
+ "fetch",
+ "filter",
+ "first_value",
+ "float",
+ "floor",
+ "for",
+ "foreign",
+ "frame_row",
+ "free",
+ "from",
+ "full",
+ "function",
+ "fusion",
+ "get",
+ "global",
+ "grant",
+ "group",
+ "grouping",
+ "groups",
+ "having",
+ "hold",
+ "hour",
+ "identity",
+ "in",
+ "indicator",
+ "initial",
+ "inner",
+ "inout",
+ "insensitive",
+ "insert",
+ "int",
+ "integer",
+ "intersect",
+ "intersection",
+ "interval",
+ "into",
+ "is",
+ "join",
+ "json_array",
+ "json_arrayagg",
+ "json_exists",
+ "json_object",
+ "json_objectagg",
+ "json_query",
+ "json_table",
+ "json_table_primitive",
+ "json_value",
+ "lag",
+ "language",
+ "large",
+ "last_value",
+ "lateral",
+ "lead",
+ "leading",
+ "left",
+ "like",
+ "like_regex",
+ "listagg",
+ "ln",
+ "local",
+ "localtime",
+ "localtimestamp",
+ "log",
+ "log10",
+ "lower",
+ "match",
+ "match_number",
+ "match_recognize",
+ "matches",
+ "max",
+ "member",
+ "merge",
+ "method",
+ "min",
+ "minute",
+ "mod",
+ "modifies",
+ "module",
+ "month",
+ "multiset",
+ "national",
+ "natural",
+ "nchar",
+ "nclob",
+ "new",
+ "no",
+ "none",
+ "normalize",
+ "not",
+ "nth_value",
+ "ntile",
+ "null",
+ "nullif",
+ "numeric",
+ "octet_length",
+ "occurrences_regex",
+ "of",
+ "offset",
+ "old",
+ "omit",
+ "on",
+ "one",
+ "only",
+ "open",
+ "or",
+ "order",
+ "out",
+ "outer",
+ "over",
+ "overlaps",
+ "overlay",
+ "parameter",
+ "partition",
+ "pattern",
+ "per",
+ "percent",
+ "percent_rank",
+ "percentile_cont",
+ "percentile_disc",
+ "period",
+ "portion",
+ "position",
+ "position_regex",
+ "power",
+ "precedes",
+ "precision",
+ "prepare",
+ "primary",
+ "procedure",
+ "ptf",
+ "range",
+ "rank",
+ "reads",
+ "real",
+ "recursive",
+ "ref",
+ "references",
+ "referencing",
+ "regr_avgx",
+ "regr_avgy",
+ "regr_count",
+ "regr_intercept",
+ "regr_r2",
+ "regr_slope",
+ "regr_sxx",
+ "regr_sxy",
+ "regr_syy",
+ "release",
+ "result",
+ "return",
+ "returns",
+ "revoke",
+ "right",
+ "rollback",
+ "rollup",
+ "row",
+ "row_number",
+ "rows",
+ "running",
+ "savepoint",
+ "scope",
+ "scroll",
+ "search",
+ "second",
+ "seek",
+ "select",
+ "sensitive",
+ "session_user",
+ "set",
+ "show",
+ "similar",
+ "sin",
+ "sinh",
+ "skip",
+ "smallint",
+ "some",
+ "specific",
+ "specifictype",
+ "sql",
+ "sqlexception",
+ "sqlstate",
+ "sqlwarning",
+ "sqrt",
+ "start",
+ "static",
+ "stddev_pop",
+ "stddev_samp",
+ "submultiset",
+ "subset",
+ "substring",
+ "substring_regex",
+ "succeeds",
+ "sum",
+ "symmetric",
+ "system",
+ "system_time",
+ "system_user",
+ "table",
+ "tablesample",
+ "tan",
+ "tanh",
+ "then",
+ "time",
+ "timestamp",
+ "timezone_hour",
+ "timezone_minute",
+ "to",
+ "trailing",
+ "translate",
+ "translate_regex",
+ "translation",
+ "treat",
+ "trigger",
+ "trim",
+ "trim_array",
+ "true",
+ "truncate",
+ "uescape",
+ "union",
+ "unique",
+ "unknown",
+ "unnest",
+ "update ",
+ "upper",
+ "user",
+ "using",
+ "value",
+ "values",
+ "value_of",
+ "var_pop",
+ "var_samp",
+ "varbinary",
+ "varchar",
+ "varying",
+ "versioning",
+ "when",
+ "whenever",
+ "where",
+ "width_bucket",
+ "window",
+ "with",
+ "within",
+ "without",
+ "year",
+ ];
+
+ // these are reserved words we have identified to be functions
+ // and should only be highlighted in a dispatch-like context
+ // ie, array_agg(...), etc.
+ const RESERVED_FUNCTIONS = [
+ "abs",
+ "acos",
+ "array_agg",
+ "asin",
+ "atan",
+ "avg",
+ "cast",
+ "ceil",
+ "ceiling",
+ "coalesce",
+ "corr",
+ "cos",
+ "cosh",
+ "count",
+ "covar_pop",
+ "covar_samp",
+ "cume_dist",
+ "dense_rank",
+ "deref",
+ "element",
+ "exp",
+ "extract",
+ "first_value",
+ "floor",
+ "json_array",
+ "json_arrayagg",
+ "json_exists",
+ "json_object",
+ "json_objectagg",
+ "json_query",
+ "json_table",
+ "json_table_primitive",
+ "json_value",
+ "lag",
+ "last_value",
+ "lead",
+ "listagg",
+ "ln",
+ "log",
+ "log10",
+ "lower",
+ "max",
+ "min",
+ "mod",
+ "nth_value",
+ "ntile",
+ "nullif",
+ "percent_rank",
+ "percentile_cont",
+ "percentile_disc",
+ "position",
+ "position_regex",
+ "power",
+ "rank",
+ "regr_avgx",
+ "regr_avgy",
+ "regr_count",
+ "regr_intercept",
+ "regr_r2",
+ "regr_slope",
+ "regr_sxx",
+ "regr_sxy",
+ "regr_syy",
+ "row_number",
+ "sin",
+ "sinh",
+ "sqrt",
+ "stddev_pop",
+ "stddev_samp",
+ "substring",
+ "substring_regex",
+ "sum",
+ "tan",
+ "tanh",
+ "translate",
+ "translate_regex",
+ "treat",
+ "trim",
+ "trim_array",
+ "unnest",
+ "upper",
+ "value_of",
+ "var_pop",
+ "var_samp",
+ "width_bucket",
+ ];
+
+ // these functions can
+ const POSSIBLE_WITHOUT_PARENS = [
+ "current_catalog",
+ "current_date",
+ "current_default_transform_group",
+ "current_path",
+ "current_role",
+ "current_schema",
+ "current_transform_group_for_type",
+ "current_user",
+ "session_user",
+ "system_time",
+ "system_user",
+ "current_time",
+ "localtime",
+ "current_timestamp",
+ "localtimestamp"
+ ];
+
+ // those exist to boost relevance making these very
+ // "SQL like" keyword combos worth +1 extra relevance
+ const COMBOS = [
+ "create table",
+ "insert into",
+ "primary key",
+ "foreign key",
+ "not null",
+ "alter table",
+ "add constraint",
+ "grouping sets",
+ "on overflow",
+ "character set",
+ "respect nulls",
+ "ignore nulls",
+ "nulls first",
+ "nulls last",
+ "depth first",
+ "breadth first"
+ ];
+
+ const FUNCTIONS = RESERVED_FUNCTIONS;
+
+ const KEYWORDS = [...RESERVED_WORDS, ...NON_RESERVED_WORDS].filter((keyword) => {
+ return !RESERVED_FUNCTIONS.includes(keyword);
+ });
+
+ const VARIABLE = {
+ className: "variable",
+ begin: /@[a-z0-9]+/,
+ };
+
+ const OPERATOR = {
+ className: "operator",
+ begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
+ relevance: 0,
+ };
+
+ const FUNCTION_CALL = {
+ begin: concat(/\b/, either(...FUNCTIONS), /\s*\(/),
+ keywords: {
+ built_in: FUNCTIONS
+ }
+ };
+
+ // keywords with less than 3 letters are reduced in relevancy
+ function reduceRelevancy(list, {exceptions, when} = {}) {
+ const qualifyFn = when;
+ exceptions = exceptions || [];
+ return list.map((item) => {
+ if (item.match(/\|\d+$/) || exceptions.includes(item)) {
+ return item;
+ } else if (qualifyFn(item)) {
+ return `${item}|0`;
+ } else {
+ return item;
+ }
+ });
+ }
+
+ return {
+ name: 'SQL',
+ case_insensitive: true,
+ // does not include {} or HTML tags ``
+ illegal: /[{}]|<\//,
+ keywords: {
+ $pattern: /\b[\w\.]+/,
+ keyword:
+ reduceRelevancy(KEYWORDS, { when: (x) => x.length < 3 }),
+ literal: LITERALS,
+ type: TYPES,
+ built_in: POSSIBLE_WITHOUT_PARENS
+ },
+ contains: [
+ {
+ begin: either(...COMBOS),
+ keywords: {
+ $pattern: /[\w\.]+/,
+ keyword: KEYWORDS.concat(COMBOS),
+ literal: LITERALS,
+ type: TYPES
+ },
+ },
+ {
+ className: "type",
+ begin: either(...MULTI_WORD_TYPES)
+ },
+ FUNCTION_CALL,
+ VARIABLE,
+ STRING,
+ QUOTED_IDENTIFIER,
+ hljs.C_NUMBER_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ COMMENT_MODE,
+ OPERATOR
+ ]
+ };
+}
+
+module.exports = sql;
+
+
+/***/ }),
+
+/***/ 21420:
+/***/ ((module) => {
+
+/*
+ Language: SQL More (mix of MySQL, Oracle, etc)
+ Contributors: Nikolay Lisienko , Heiko August , Travis Odom , Vadimtro , Benjamin Auder
+ Website: https://en.wikipedia.org/wiki/SQL
+ Category: database
+ */
+
+/*
+
+This is a preservation of the old bloated SQL grammar which includes pretty much
+the kitchen sink because no one was keeping track of which keywords belong to
+which databases. This is likely to be removed in the future.
+
+- Oracle SQL should be factored into it's own 3rd party grammar.
+- MySQL should be factored out into it's own 3rd party grammar.
+
+*/
+
+function sql_more(hljs) {
+ var COMMENT_MODE = hljs.COMMENT('--', '$');
+ return {
+ name: 'SQL (more)',
+ aliases: ["mysql", "oracle"],
+ disableAutodetect: true,
+ case_insensitive: true,
+ illegal: /[<>{}*]/,
+ contains: [
+ {
+ beginKeywords:
+ 'begin end start commit rollback savepoint lock alter create drop rename call ' +
+ 'delete do handler insert load replace select truncate update set show pragma grant ' +
+ 'merge describe use explain help declare prepare execute deallocate release ' +
+ 'unlock purge reset change stop analyze cache flush optimize repair kill ' +
+ 'install uninstall checksum restore check backup revoke comment values with',
+ end: /;/, endsWithParent: true,
+ keywords: {
+ $pattern: /[\w\.]+/,
+ keyword:
+ 'as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add ' +
+ 'addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias ' +
+ 'all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply ' +
+ 'archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan ' +
+ 'atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid ' +
+ 'authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile ' +
+ 'before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float ' +
+ 'binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound ' +
+ 'bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel ' +
+ 'capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base ' +
+ 'char_length character_length characters characterset charindex charset charsetform charsetid check ' +
+ 'checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close ' +
+ 'cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation ' +
+ 'collect colu colum column column_value columns columns_updated comment commit compact compatibility ' +
+ 'compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn ' +
+ 'connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection ' +
+ 'consider consistent constant constraint constraints constructor container content contents context ' +
+ 'contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost ' +
+ 'count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation ' +
+ 'critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user ' +
+ 'cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add ' +
+ 'date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts ' +
+ 'day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate ' +
+ 'declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults ' +
+ 'deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank ' +
+ 'depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor ' +
+ 'deterministic diagnostics difference dimension direct_load directory disable disable_all ' +
+ 'disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div ' +
+ 'do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable ' +
+ 'editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt ' +
+ 'end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors ' +
+ 'escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding ' +
+ 'execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external ' +
+ 'external_1 external_2 externally extract failed failed_login_attempts failover failure far fast ' +
+ 'feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final ' +
+ 'finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign ' +
+ 'form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ' +
+ 'ftp full function general generated get get_format get_lock getdate getutcdate global global_name ' +
+ 'globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups ' +
+ 'gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex ' +
+ 'hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified ' +
+ 'identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment ' +
+ 'index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile ' +
+ 'initial initialized initially initrans inmemory inner innodb input insert install instance instantiable ' +
+ 'instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat ' +
+ 'is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists ' +
+ 'keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase ' +
+ 'lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit ' +
+ 'lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate ' +
+ 'locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call ' +
+ 'logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime ' +
+ 'managed management manual map mapping mask master master_pos_wait match matched materialized max ' +
+ 'maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans ' +
+ 'md5 measures median medium member memcompress memory merge microsecond mid migration min minextents ' +
+ 'minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month ' +
+ 'months mount move movement multiset mutex name name_const names nan national native natural nav nchar ' +
+ 'nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile ' +
+ 'nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile ' +
+ 'nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder ' +
+ 'nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck ' +
+ 'noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe ' +
+ 'nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ' +
+ 'ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old ' +
+ 'on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date ' +
+ 'oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary ' +
+ 'out outer outfile outline output over overflow overriding package pad parallel parallel_enable ' +
+ 'parameters parent parse partial partition partitions pascal passing password password_grace_time ' +
+ 'password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex ' +
+ 'pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc ' +
+ 'performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin ' +
+ 'policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction ' +
+ 'prediction_cost prediction_details prediction_probability prediction_set prepare present preserve ' +
+ 'prior priority private private_sga privileges procedural procedure procedure_analyze processlist ' +
+ 'profiles project prompt protection public publishingservername purge quarter query quick quiesce quota ' +
+ 'quotename radians raise rand range rank raw read reads readsize rebuild record records ' +
+ 'recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh ' +
+ 'regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy ' +
+ 'reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename ' +
+ 'repair repeat replace replicate replication required reset resetlogs resize resource respect restore ' +
+ 'restricted result result_cache resumable resume retention return returning returns reuse reverse revoke ' +
+ 'right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows ' +
+ 'rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll ' +
+ 'sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select ' +
+ 'self semi sequence sequential serializable server servererror session session_user sessions_per_user set ' +
+ 'sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor ' +
+ 'si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin ' +
+ 'size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex ' +
+ 'source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows ' +
+ 'sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone ' +
+ 'standby start starting startup statement static statistics stats_binomial_test stats_crosstab ' +
+ 'stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep ' +
+ 'stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev ' +
+ 'stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate ' +
+ 'subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum ' +
+ 'suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate ' +
+ 'sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo ' +
+ 'template temporary terminated tertiary_weights test than then thread through tier ties time time_format ' +
+ 'time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr ' +
+ 'timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking ' +
+ 'transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate ' +
+ 'try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress ' +
+ 'under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot ' +
+ 'unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert ' +
+ 'url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date ' +
+ 'utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var ' +
+ 'var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray ' +
+ 'verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear ' +
+ 'wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped ' +
+ 'xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces ' +
+ 'xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek',
+ literal:
+ 'true false null unknown',
+ built_in:
+ 'array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number ' +
+ 'numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void'
+ },
+ contains: [
+ {
+ className: 'string',
+ begin: '\'', end: '\'',
+ contains: [{begin: '\'\''}]
+ },
+ {
+ className: 'string',
+ begin: '"', end: '"',
+ contains: [{begin: '""'}]
+ },
+ {
+ className: 'string',
+ begin: '`', end: '`'
+ },
+ hljs.C_NUMBER_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ COMMENT_MODE,
+ hljs.HASH_COMMENT_MODE
+ ]
+ },
+ hljs.C_BLOCK_COMMENT_MODE,
+ COMMENT_MODE,
+ hljs.HASH_COMMENT_MODE
+ ]
+ };
+}
+
+module.exports = sql_more;
+
+
+/***/ }),
+
+/***/ 16272:
+/***/ ((module) => {
+
+/*
+Language: Stan
+Description: The Stan probabilistic programming language
+Author: Jeffrey B. Arnold
+Website: http://mc-stan.org/
+Category: scientific
+*/
+
+function stan(hljs) {
+ // variable names cannot conflict with block identifiers
+ const BLOCKS = [
+ 'functions',
+ 'model',
+ 'data',
+ 'parameters',
+ 'quantities',
+ 'transformed',
+ 'generated'
+ ];
+ const STATEMENTS = [
+ 'for',
+ 'in',
+ 'if',
+ 'else',
+ 'while',
+ 'break',
+ 'continue',
+ 'return'
+ ];
+ const SPECIAL_FUNCTIONS = [
+ 'print',
+ 'reject',
+ 'increment_log_prob|10',
+ 'integrate_ode|10',
+ 'integrate_ode_rk45|10',
+ 'integrate_ode_bdf|10',
+ 'algebra_solver'
+ ];
+ const VAR_TYPES = [
+ 'int',
+ 'real',
+ 'vector',
+ 'ordered',
+ 'positive_ordered',
+ 'simplex',
+ 'unit_vector',
+ 'row_vector',
+ 'matrix',
+ 'cholesky_factor_corr|10',
+ 'cholesky_factor_cov|10',
+ 'corr_matrix|10',
+ 'cov_matrix|10',
+ 'void'
+ ];
+ const FUNCTIONS = [
+ 'Phi',
+ 'Phi_approx',
+ 'abs',
+ 'acos',
+ 'acosh',
+ 'algebra_solver',
+ 'append_array',
+ 'append_col',
+ 'append_row',
+ 'asin',
+ 'asinh',
+ 'atan',
+ 'atan2',
+ 'atanh',
+ 'bernoulli_cdf',
+ 'bernoulli_lccdf',
+ 'bernoulli_lcdf',
+ 'bernoulli_logit_lpmf',
+ 'bernoulli_logit_rng',
+ 'bernoulli_lpmf',
+ 'bernoulli_rng',
+ 'bessel_first_kind',
+ 'bessel_second_kind',
+ 'beta_binomial_cdf',
+ 'beta_binomial_lccdf',
+ 'beta_binomial_lcdf',
+ 'beta_binomial_lpmf',
+ 'beta_binomial_rng',
+ 'beta_cdf',
+ 'beta_lccdf',
+ 'beta_lcdf',
+ 'beta_lpdf',
+ 'beta_rng',
+ 'binary_log_loss',
+ 'binomial_cdf',
+ 'binomial_coefficient_log',
+ 'binomial_lccdf',
+ 'binomial_lcdf',
+ 'binomial_logit_lpmf',
+ 'binomial_lpmf',
+ 'binomial_rng',
+ 'block',
+ 'categorical_logit_lpmf',
+ 'categorical_logit_rng',
+ 'categorical_lpmf',
+ 'categorical_rng',
+ 'cauchy_cdf',
+ 'cauchy_lccdf',
+ 'cauchy_lcdf',
+ 'cauchy_lpdf',
+ 'cauchy_rng',
+ 'cbrt',
+ 'ceil',
+ 'chi_square_cdf',
+ 'chi_square_lccdf',
+ 'chi_square_lcdf',
+ 'chi_square_lpdf',
+ 'chi_square_rng',
+ 'cholesky_decompose',
+ 'choose',
+ 'col',
+ 'cols',
+ 'columns_dot_product',
+ 'columns_dot_self',
+ 'cos',
+ 'cosh',
+ 'cov_exp_quad',
+ 'crossprod',
+ 'csr_extract_u',
+ 'csr_extract_v',
+ 'csr_extract_w',
+ 'csr_matrix_times_vector',
+ 'csr_to_dense_matrix',
+ 'cumulative_sum',
+ 'determinant',
+ 'diag_matrix',
+ 'diag_post_multiply',
+ 'diag_pre_multiply',
+ 'diagonal',
+ 'digamma',
+ 'dims',
+ 'dirichlet_lpdf',
+ 'dirichlet_rng',
+ 'distance',
+ 'dot_product',
+ 'dot_self',
+ 'double_exponential_cdf',
+ 'double_exponential_lccdf',
+ 'double_exponential_lcdf',
+ 'double_exponential_lpdf',
+ 'double_exponential_rng',
+ 'e',
+ 'eigenvalues_sym',
+ 'eigenvectors_sym',
+ 'erf',
+ 'erfc',
+ 'exp',
+ 'exp2',
+ 'exp_mod_normal_cdf',
+ 'exp_mod_normal_lccdf',
+ 'exp_mod_normal_lcdf',
+ 'exp_mod_normal_lpdf',
+ 'exp_mod_normal_rng',
+ 'expm1',
+ 'exponential_cdf',
+ 'exponential_lccdf',
+ 'exponential_lcdf',
+ 'exponential_lpdf',
+ 'exponential_rng',
+ 'fabs',
+ 'falling_factorial',
+ 'fdim',
+ 'floor',
+ 'fma',
+ 'fmax',
+ 'fmin',
+ 'fmod',
+ 'frechet_cdf',
+ 'frechet_lccdf',
+ 'frechet_lcdf',
+ 'frechet_lpdf',
+ 'frechet_rng',
+ 'gamma_cdf',
+ 'gamma_lccdf',
+ 'gamma_lcdf',
+ 'gamma_lpdf',
+ 'gamma_p',
+ 'gamma_q',
+ 'gamma_rng',
+ 'gaussian_dlm_obs_lpdf',
+ 'get_lp',
+ 'gumbel_cdf',
+ 'gumbel_lccdf',
+ 'gumbel_lcdf',
+ 'gumbel_lpdf',
+ 'gumbel_rng',
+ 'head',
+ 'hypergeometric_lpmf',
+ 'hypergeometric_rng',
+ 'hypot',
+ 'inc_beta',
+ 'int_step',
+ 'integrate_ode',
+ 'integrate_ode_bdf',
+ 'integrate_ode_rk45',
+ 'inv',
+ 'inv_Phi',
+ 'inv_chi_square_cdf',
+ 'inv_chi_square_lccdf',
+ 'inv_chi_square_lcdf',
+ 'inv_chi_square_lpdf',
+ 'inv_chi_square_rng',
+ 'inv_cloglog',
+ 'inv_gamma_cdf',
+ 'inv_gamma_lccdf',
+ 'inv_gamma_lcdf',
+ 'inv_gamma_lpdf',
+ 'inv_gamma_rng',
+ 'inv_logit',
+ 'inv_sqrt',
+ 'inv_square',
+ 'inv_wishart_lpdf',
+ 'inv_wishart_rng',
+ 'inverse',
+ 'inverse_spd',
+ 'is_inf',
+ 'is_nan',
+ 'lbeta',
+ 'lchoose',
+ 'lgamma',
+ 'lkj_corr_cholesky_lpdf',
+ 'lkj_corr_cholesky_rng',
+ 'lkj_corr_lpdf',
+ 'lkj_corr_rng',
+ 'lmgamma',
+ 'lmultiply',
+ 'log',
+ 'log10',
+ 'log1m',
+ 'log1m_exp',
+ 'log1m_inv_logit',
+ 'log1p',
+ 'log1p_exp',
+ 'log2',
+ 'log_determinant',
+ 'log_diff_exp',
+ 'log_falling_factorial',
+ 'log_inv_logit',
+ 'log_mix',
+ 'log_rising_factorial',
+ 'log_softmax',
+ 'log_sum_exp',
+ 'logistic_cdf',
+ 'logistic_lccdf',
+ 'logistic_lcdf',
+ 'logistic_lpdf',
+ 'logistic_rng',
+ 'logit',
+ 'lognormal_cdf',
+ 'lognormal_lccdf',
+ 'lognormal_lcdf',
+ 'lognormal_lpdf',
+ 'lognormal_rng',
+ 'machine_precision',
+ 'matrix_exp',
+ 'max',
+ 'mdivide_left_spd',
+ 'mdivide_left_tri_low',
+ 'mdivide_right_spd',
+ 'mdivide_right_tri_low',
+ 'mean',
+ 'min',
+ 'modified_bessel_first_kind',
+ 'modified_bessel_second_kind',
+ 'multi_gp_cholesky_lpdf',
+ 'multi_gp_lpdf',
+ 'multi_normal_cholesky_lpdf',
+ 'multi_normal_cholesky_rng',
+ 'multi_normal_lpdf',
+ 'multi_normal_prec_lpdf',
+ 'multi_normal_rng',
+ 'multi_student_t_lpdf',
+ 'multi_student_t_rng',
+ 'multinomial_lpmf',
+ 'multinomial_rng',
+ 'multiply_log',
+ 'multiply_lower_tri_self_transpose',
+ 'neg_binomial_2_cdf',
+ 'neg_binomial_2_lccdf',
+ 'neg_binomial_2_lcdf',
+ 'neg_binomial_2_log_lpmf',
+ 'neg_binomial_2_log_rng',
+ 'neg_binomial_2_lpmf',
+ 'neg_binomial_2_rng',
+ 'neg_binomial_cdf',
+ 'neg_binomial_lccdf',
+ 'neg_binomial_lcdf',
+ 'neg_binomial_lpmf',
+ 'neg_binomial_rng',
+ 'negative_infinity',
+ 'normal_cdf',
+ 'normal_lccdf',
+ 'normal_lcdf',
+ 'normal_lpdf',
+ 'normal_rng',
+ 'not_a_number',
+ 'num_elements',
+ 'ordered_logistic_lpmf',
+ 'ordered_logistic_rng',
+ 'owens_t',
+ 'pareto_cdf',
+ 'pareto_lccdf',
+ 'pareto_lcdf',
+ 'pareto_lpdf',
+ 'pareto_rng',
+ 'pareto_type_2_cdf',
+ 'pareto_type_2_lccdf',
+ 'pareto_type_2_lcdf',
+ 'pareto_type_2_lpdf',
+ 'pareto_type_2_rng',
+ 'pi',
+ 'poisson_cdf',
+ 'poisson_lccdf',
+ 'poisson_lcdf',
+ 'poisson_log_lpmf',
+ 'poisson_log_rng',
+ 'poisson_lpmf',
+ 'poisson_rng',
+ 'positive_infinity',
+ 'pow',
+ 'print',
+ 'prod',
+ 'qr_Q',
+ 'qr_R',
+ 'quad_form',
+ 'quad_form_diag',
+ 'quad_form_sym',
+ 'rank',
+ 'rayleigh_cdf',
+ 'rayleigh_lccdf',
+ 'rayleigh_lcdf',
+ 'rayleigh_lpdf',
+ 'rayleigh_rng',
+ 'reject',
+ 'rep_array',
+ 'rep_matrix',
+ 'rep_row_vector',
+ 'rep_vector',
+ 'rising_factorial',
+ 'round',
+ 'row',
+ 'rows',
+ 'rows_dot_product',
+ 'rows_dot_self',
+ 'scaled_inv_chi_square_cdf',
+ 'scaled_inv_chi_square_lccdf',
+ 'scaled_inv_chi_square_lcdf',
+ 'scaled_inv_chi_square_lpdf',
+ 'scaled_inv_chi_square_rng',
+ 'sd',
+ 'segment',
+ 'sin',
+ 'singular_values',
+ 'sinh',
+ 'size',
+ 'skew_normal_cdf',
+ 'skew_normal_lccdf',
+ 'skew_normal_lcdf',
+ 'skew_normal_lpdf',
+ 'skew_normal_rng',
+ 'softmax',
+ 'sort_asc',
+ 'sort_desc',
+ 'sort_indices_asc',
+ 'sort_indices_desc',
+ 'sqrt',
+ 'sqrt2',
+ 'square',
+ 'squared_distance',
+ 'step',
+ 'student_t_cdf',
+ 'student_t_lccdf',
+ 'student_t_lcdf',
+ 'student_t_lpdf',
+ 'student_t_rng',
+ 'sub_col',
+ 'sub_row',
+ 'sum',
+ 'tail',
+ 'tan',
+ 'tanh',
+ 'target',
+ 'tcrossprod',
+ 'tgamma',
+ 'to_array_1d',
+ 'to_array_2d',
+ 'to_matrix',
+ 'to_row_vector',
+ 'to_vector',
+ 'trace',
+ 'trace_gen_quad_form',
+ 'trace_quad_form',
+ 'trigamma',
+ 'trunc',
+ 'uniform_cdf',
+ 'uniform_lccdf',
+ 'uniform_lcdf',
+ 'uniform_lpdf',
+ 'uniform_rng',
+ 'variance',
+ 'von_mises_lpdf',
+ 'von_mises_rng',
+ 'weibull_cdf',
+ 'weibull_lccdf',
+ 'weibull_lcdf',
+ 'weibull_lpdf',
+ 'weibull_rng',
+ 'wiener_lpdf',
+ 'wishart_lpdf',
+ 'wishart_rng'
+ ];
+ const DISTRIBUTIONS = [
+ 'bernoulli',
+ 'bernoulli_logit',
+ 'beta',
+ 'beta_binomial',
+ 'binomial',
+ 'binomial_logit',
+ 'categorical',
+ 'categorical_logit',
+ 'cauchy',
+ 'chi_square',
+ 'dirichlet',
+ 'double_exponential',
+ 'exp_mod_normal',
+ 'exponential',
+ 'frechet',
+ 'gamma',
+ 'gaussian_dlm_obs',
+ 'gumbel',
+ 'hypergeometric',
+ 'inv_chi_square',
+ 'inv_gamma',
+ 'inv_wishart',
+ 'lkj_corr',
+ 'lkj_corr_cholesky',
+ 'logistic',
+ 'lognormal',
+ 'multi_gp',
+ 'multi_gp_cholesky',
+ 'multi_normal',
+ 'multi_normal_cholesky',
+ 'multi_normal_prec',
+ 'multi_student_t',
+ 'multinomial',
+ 'neg_binomial',
+ 'neg_binomial_2',
+ 'neg_binomial_2_log',
+ 'normal',
+ 'ordered_logistic',
+ 'pareto',
+ 'pareto_type_2',
+ 'poisson',
+ 'poisson_log',
+ 'rayleigh',
+ 'scaled_inv_chi_square',
+ 'skew_normal',
+ 'student_t',
+ 'uniform',
+ 'von_mises',
+ 'weibull',
+ 'wiener',
+ 'wishart'
+ ];
+
+ return {
+ name: 'Stan',
+ aliases: [ 'stanfuncs' ],
+ keywords: {
+ $pattern: hljs.IDENT_RE,
+ title: BLOCKS,
+ keyword: STATEMENTS.concat(VAR_TYPES).concat(SPECIAL_FUNCTIONS),
+ built_in: FUNCTIONS
+ },
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.COMMENT(
+ /#/,
+ /$/,
+ {
+ relevance: 0,
+ keywords: {
+ 'meta-keyword': 'include'
+ }
+ }
+ ),
+ hljs.COMMENT(
+ /\/\*/,
+ /\*\//,
+ {
+ relevance: 0,
+ // highlight doc strings mentioned in Stan reference
+ contains: [
+ {
+ className: 'doctag',
+ begin: /@(return|param)/
+ }
+ ]
+ }
+ ),
+ {
+ // hack: in range constraints, lower must follow "<"
+ begin: /<\s*lower\s*=/,
+ keywords: 'lower'
+ },
+ {
+ // hack: in range constraints, upper must follow either , or <
+ // or
+ begin: /[<,]\s*upper\s*=/,
+ keywords: 'upper'
+ },
+ {
+ className: 'keyword',
+ begin: /\btarget\s*\+=/,
+ relevance: 10
+ },
+ {
+ begin: '~\\s*(' + hljs.IDENT_RE + ')\\s*\\(',
+ keywords: DISTRIBUTIONS
+ },
+ {
+ className: 'number',
+ variants: [
+ {
+ begin: /\b\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/
+ },
+ {
+ begin: /\.\d+(?:[eE][+-]?\d+)?\b/
+ }
+ ],
+ relevance: 0
+ },
+ {
+ className: 'string',
+ begin: '"',
+ end: '"',
+ relevance: 0
+ }
+ ]
+ };
+}
+
+module.exports = stan;
+
+
+/***/ }),
+
+/***/ 53727:
+/***/ ((module) => {
+
+/*
+Language: Stata
+Author: Brian Quistorff
+Contributors: Drew McDonald
+Description: Stata is a general-purpose statistical software package created in 1985 by StataCorp.
+Website: https://en.wikipedia.org/wiki/Stata
+Category: scientific
+*/
+
+/*
+ This is a fork and modification of Drew McDonald's file (https://github.com/drewmcdonald/stata-highlighting). I have also included a list of builtin commands from https://bugs.kde.org/show_bug.cgi?id=135646.
+*/
+
+function stata(hljs) {
+ return {
+ name: 'Stata',
+ aliases: [
+ 'do',
+ 'ado'
+ ],
+ case_insensitive: true,
+ keywords: 'if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey bias binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 bubble bubbleplot ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error esize est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 forest forestplot form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate funnel funnelplot g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labbe labbeplot labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize menl meqparse mer merg merge meta mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trimfill trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5',
+ contains: [
+ {
+ className: 'symbol',
+ begin: /`[a-zA-Z0-9_]+'/
+ },
+ {
+ className: 'variable',
+ begin: /\$\{?[a-zA-Z0-9_]+\}?/
+ },
+ {
+ className: 'string',
+ variants: [
+ {
+ begin: '`"[^\r\n]*?"\''
+ },
+ {
+ begin: '"[^\r\n"]*"'
+ }
+ ]
+ },
+
+ {
+ className: 'built_in',
+ variants: [
+ {
+ begin: '\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()'
+ }
+ ]
+ },
+
+ hljs.COMMENT('^[ \t]*\\*.*$', false),
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ };
+}
+
+module.exports = stata;
+
+
+/***/ }),
+
+/***/ 99191:
+/***/ ((module) => {
+
+/*
+Language: STEP Part 21
+Contributors: Adam Joseph Cook
+Description: Syntax highlighter for STEP Part 21 files (ISO 10303-21).
+Website: https://en.wikipedia.org/wiki/ISO_10303-21
+*/
+
+function step21(hljs) {
+ const STEP21_IDENT_RE = '[A-Z_][A-Z0-9_.]*';
+ const STEP21_KEYWORDS = {
+ $pattern: STEP21_IDENT_RE,
+ keyword: 'HEADER ENDSEC DATA'
+ };
+ const STEP21_START = {
+ className: 'meta',
+ begin: 'ISO-10303-21;',
+ relevance: 10
+ };
+ const STEP21_CLOSE = {
+ className: 'meta',
+ begin: 'END-ISO-10303-21;',
+ relevance: 10
+ };
+
+ return {
+ name: 'STEP Part 21',
+ aliases: [
+ 'p21',
+ 'step',
+ 'stp'
+ ],
+ case_insensitive: true, // STEP 21 is case insensitive in theory, in practice all non-comments are capitalized.
+ keywords: STEP21_KEYWORDS,
+ contains: [
+ STEP21_START,
+ STEP21_CLOSE,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.COMMENT('/\\*\\*!', '\\*/'),
+ hljs.C_NUMBER_MODE,
+ hljs.inherit(hljs.APOS_STRING_MODE, {
+ illegal: null
+ }),
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {
+ illegal: null
+ }),
+ {
+ className: 'string',
+ begin: "'",
+ end: "'"
+ },
+ {
+ className: 'symbol',
+ variants: [
+ {
+ begin: '#',
+ end: '\\d+',
+ illegal: '\\W'
+ }
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = step21;
+
+
+/***/ }),
+
+/***/ 49614:
+/***/ ((module) => {
+
+const MODES = (hljs) => {
+ return {
+ IMPORTANT: {
+ className: 'meta',
+ begin: '!important'
+ },
+ HEXCOLOR: {
+ className: 'number',
+ begin: '#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})'
+ },
+ ATTRIBUTE_SELECTOR_MODE: {
+ className: 'selector-attr',
+ begin: /\[/,
+ end: /\]/,
+ illegal: '$',
+ contains: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE
+ ]
+ }
+ };
+};
+
+const TAGS = [
+ 'a',
+ 'abbr',
+ 'address',
+ 'article',
+ 'aside',
+ 'audio',
+ 'b',
+ 'blockquote',
+ 'body',
+ 'button',
+ 'canvas',
+ 'caption',
+ 'cite',
+ 'code',
+ 'dd',
+ 'del',
+ 'details',
+ 'dfn',
+ 'div',
+ 'dl',
+ 'dt',
+ 'em',
+ 'fieldset',
+ 'figcaption',
+ 'figure',
+ 'footer',
+ 'form',
+ 'h1',
+ 'h2',
+ 'h3',
+ 'h4',
+ 'h5',
+ 'h6',
+ 'header',
+ 'hgroup',
+ 'html',
+ 'i',
+ 'iframe',
+ 'img',
+ 'input',
+ 'ins',
+ 'kbd',
+ 'label',
+ 'legend',
+ 'li',
+ 'main',
+ 'mark',
+ 'menu',
+ 'nav',
+ 'object',
+ 'ol',
+ 'p',
+ 'q',
+ 'quote',
+ 'samp',
+ 'section',
+ 'span',
+ 'strong',
+ 'summary',
+ 'sup',
+ 'table',
+ 'tbody',
+ 'td',
+ 'textarea',
+ 'tfoot',
+ 'th',
+ 'thead',
+ 'time',
+ 'tr',
+ 'ul',
+ 'var',
+ 'video'
+];
+
+const MEDIA_FEATURES = [
+ 'any-hover',
+ 'any-pointer',
+ 'aspect-ratio',
+ 'color',
+ 'color-gamut',
+ 'color-index',
+ 'device-aspect-ratio',
+ 'device-height',
+ 'device-width',
+ 'display-mode',
+ 'forced-colors',
+ 'grid',
+ 'height',
+ 'hover',
+ 'inverted-colors',
+ 'monochrome',
+ 'orientation',
+ 'overflow-block',
+ 'overflow-inline',
+ 'pointer',
+ 'prefers-color-scheme',
+ 'prefers-contrast',
+ 'prefers-reduced-motion',
+ 'prefers-reduced-transparency',
+ 'resolution',
+ 'scan',
+ 'scripting',
+ 'update',
+ 'width',
+ // TODO: find a better solution?
+ 'min-width',
+ 'max-width',
+ 'min-height',
+ 'max-height'
+];
+
+// https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes
+const PSEUDO_CLASSES = [
+ 'active',
+ 'any-link',
+ 'blank',
+ 'checked',
+ 'current',
+ 'default',
+ 'defined',
+ 'dir', // dir()
+ 'disabled',
+ 'drop',
+ 'empty',
+ 'enabled',
+ 'first',
+ 'first-child',
+ 'first-of-type',
+ 'fullscreen',
+ 'future',
+ 'focus',
+ 'focus-visible',
+ 'focus-within',
+ 'has', // has()
+ 'host', // host or host()
+ 'host-context', // host-context()
+ 'hover',
+ 'indeterminate',
+ 'in-range',
+ 'invalid',
+ 'is', // is()
+ 'lang', // lang()
+ 'last-child',
+ 'last-of-type',
+ 'left',
+ 'link',
+ 'local-link',
+ 'not', // not()
+ 'nth-child', // nth-child()
+ 'nth-col', // nth-col()
+ 'nth-last-child', // nth-last-child()
+ 'nth-last-col', // nth-last-col()
+ 'nth-last-of-type', //nth-last-of-type()
+ 'nth-of-type', //nth-of-type()
+ 'only-child',
+ 'only-of-type',
+ 'optional',
+ 'out-of-range',
+ 'past',
+ 'placeholder-shown',
+ 'read-only',
+ 'read-write',
+ 'required',
+ 'right',
+ 'root',
+ 'scope',
+ 'target',
+ 'target-within',
+ 'user-invalid',
+ 'valid',
+ 'visited',
+ 'where' // where()
+];
+
+// https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements
+const PSEUDO_ELEMENTS = [
+ 'after',
+ 'backdrop',
+ 'before',
+ 'cue',
+ 'cue-region',
+ 'first-letter',
+ 'first-line',
+ 'grammar-error',
+ 'marker',
+ 'part',
+ 'placeholder',
+ 'selection',
+ 'slotted',
+ 'spelling-error'
+];
+
+const ATTRIBUTES = [
+ 'align-content',
+ 'align-items',
+ 'align-self',
+ 'animation',
+ 'animation-delay',
+ 'animation-direction',
+ 'animation-duration',
+ 'animation-fill-mode',
+ 'animation-iteration-count',
+ 'animation-name',
+ 'animation-play-state',
+ 'animation-timing-function',
+ 'auto',
+ 'backface-visibility',
+ 'background',
+ 'background-attachment',
+ 'background-clip',
+ 'background-color',
+ 'background-image',
+ 'background-origin',
+ 'background-position',
+ 'background-repeat',
+ 'background-size',
+ 'border',
+ 'border-bottom',
+ 'border-bottom-color',
+ 'border-bottom-left-radius',
+ 'border-bottom-right-radius',
+ 'border-bottom-style',
+ 'border-bottom-width',
+ 'border-collapse',
+ 'border-color',
+ 'border-image',
+ 'border-image-outset',
+ 'border-image-repeat',
+ 'border-image-slice',
+ 'border-image-source',
+ 'border-image-width',
+ 'border-left',
+ 'border-left-color',
+ 'border-left-style',
+ 'border-left-width',
+ 'border-radius',
+ 'border-right',
+ 'border-right-color',
+ 'border-right-style',
+ 'border-right-width',
+ 'border-spacing',
+ 'border-style',
+ 'border-top',
+ 'border-top-color',
+ 'border-top-left-radius',
+ 'border-top-right-radius',
+ 'border-top-style',
+ 'border-top-width',
+ 'border-width',
+ 'bottom',
+ 'box-decoration-break',
+ 'box-shadow',
+ 'box-sizing',
+ 'break-after',
+ 'break-before',
+ 'break-inside',
+ 'caption-side',
+ 'clear',
+ 'clip',
+ 'clip-path',
+ 'color',
+ 'column-count',
+ 'column-fill',
+ 'column-gap',
+ 'column-rule',
+ 'column-rule-color',
+ 'column-rule-style',
+ 'column-rule-width',
+ 'column-span',
+ 'column-width',
+ 'columns',
+ 'content',
+ 'counter-increment',
+ 'counter-reset',
+ 'cursor',
+ 'direction',
+ 'display',
+ 'empty-cells',
+ 'filter',
+ 'flex',
+ 'flex-basis',
+ 'flex-direction',
+ 'flex-flow',
+ 'flex-grow',
+ 'flex-shrink',
+ 'flex-wrap',
+ 'float',
+ 'font',
+ 'font-display',
+ 'font-family',
+ 'font-feature-settings',
+ 'font-kerning',
+ 'font-language-override',
+ 'font-size',
+ 'font-size-adjust',
+ 'font-smoothing',
+ 'font-stretch',
+ 'font-style',
+ 'font-variant',
+ 'font-variant-ligatures',
+ 'font-variation-settings',
+ 'font-weight',
+ 'height',
+ 'hyphens',
+ 'icon',
+ 'image-orientation',
+ 'image-rendering',
+ 'image-resolution',
+ 'ime-mode',
+ 'inherit',
+ 'initial',
+ 'justify-content',
+ 'left',
+ 'letter-spacing',
+ 'line-height',
+ 'list-style',
+ 'list-style-image',
+ 'list-style-position',
+ 'list-style-type',
+ 'margin',
+ 'margin-bottom',
+ 'margin-left',
+ 'margin-right',
+ 'margin-top',
+ 'marks',
+ 'mask',
+ 'max-height',
+ 'max-width',
+ 'min-height',
+ 'min-width',
+ 'nav-down',
+ 'nav-index',
+ 'nav-left',
+ 'nav-right',
+ 'nav-up',
+ 'none',
+ 'normal',
+ 'object-fit',
+ 'object-position',
+ 'opacity',
+ 'order',
+ 'orphans',
+ 'outline',
+ 'outline-color',
+ 'outline-offset',
+ 'outline-style',
+ 'outline-width',
+ 'overflow',
+ 'overflow-wrap',
+ 'overflow-x',
+ 'overflow-y',
+ 'padding',
+ 'padding-bottom',
+ 'padding-left',
+ 'padding-right',
+ 'padding-top',
+ 'page-break-after',
+ 'page-break-before',
+ 'page-break-inside',
+ 'perspective',
+ 'perspective-origin',
+ 'pointer-events',
+ 'position',
+ 'quotes',
+ 'resize',
+ 'right',
+ 'src', // @font-face
+ 'tab-size',
+ 'table-layout',
+ 'text-align',
+ 'text-align-last',
+ 'text-decoration',
+ 'text-decoration-color',
+ 'text-decoration-line',
+ 'text-decoration-style',
+ 'text-indent',
+ 'text-overflow',
+ 'text-rendering',
+ 'text-shadow',
+ 'text-transform',
+ 'text-underline-position',
+ 'top',
+ 'transform',
+ 'transform-origin',
+ 'transform-style',
+ 'transition',
+ 'transition-delay',
+ 'transition-duration',
+ 'transition-property',
+ 'transition-timing-function',
+ 'unicode-bidi',
+ 'vertical-align',
+ 'visibility',
+ 'white-space',
+ 'widows',
+ 'width',
+ 'word-break',
+ 'word-spacing',
+ 'word-wrap',
+ 'z-index'
+ // reverse makes sure longer attributes `font-weight` are matched fully
+ // instead of getting false positives on say `font`
+].reverse();
+
+/*
+Language: Stylus
+Author: Bryant Williams
+Description: Stylus is an expressive, robust, feature-rich CSS language built for nodejs.
+Website: https://github.com/stylus/stylus
+Category: css
+*/
+
+/** @type LanguageFn */
+function stylus(hljs) {
+ const modes = MODES(hljs);
+
+ const AT_MODIFIERS = "and or not only";
+ const VARIABLE = {
+ className: 'variable',
+ begin: '\\$' + hljs.IDENT_RE
+ };
+
+ const AT_KEYWORDS = [
+ 'charset',
+ 'css',
+ 'debug',
+ 'extend',
+ 'font-face',
+ 'for',
+ 'import',
+ 'include',
+ 'keyframes',
+ 'media',
+ 'mixin',
+ 'page',
+ 'warn',
+ 'while'
+ ];
+
+ const LOOKAHEAD_TAG_END = '(?=[.\\s\\n[:,(])';
+
+ // illegals
+ const ILLEGAL = [
+ '\\?',
+ '(\\bReturn\\b)', // monkey
+ '(\\bEnd\\b)', // monkey
+ '(\\bend\\b)', // vbscript
+ '(\\bdef\\b)', // gradle
+ ';', // a whole lot of languages
+ '#\\s', // markdown
+ '\\*\\s', // markdown
+ '===\\s', // markdown
+ '\\|',
+ '%' // prolog
+ ];
+
+ return {
+ name: 'Stylus',
+ aliases: [ 'styl' ],
+ case_insensitive: false,
+ keywords: 'if else for in',
+ illegal: '(' + ILLEGAL.join('|') + ')',
+ contains: [
+
+ // strings
+ hljs.QUOTE_STRING_MODE,
+ hljs.APOS_STRING_MODE,
+
+ // comments
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+
+ // hex colors
+ modes.HEXCOLOR,
+
+ // class tag
+ {
+ begin: '\\.[a-zA-Z][a-zA-Z0-9_-]*' + LOOKAHEAD_TAG_END,
+ className: 'selector-class'
+ },
+
+ // id tag
+ {
+ begin: '#[a-zA-Z][a-zA-Z0-9_-]*' + LOOKAHEAD_TAG_END,
+ className: 'selector-id'
+ },
+
+ // tags
+ {
+ begin: '\\b(' + TAGS.join('|') + ')' + LOOKAHEAD_TAG_END,
+ className: 'selector-tag'
+ },
+
+ // psuedo selectors
+ {
+ className: 'selector-pseudo',
+ begin: '&?:(' + PSEUDO_CLASSES.join('|') + ')' + LOOKAHEAD_TAG_END
+ },
+ {
+ className: 'selector-pseudo',
+ begin: '&?::(' + PSEUDO_ELEMENTS.join('|') + ')' + LOOKAHEAD_TAG_END
+ },
+
+ modes.ATTRIBUTE_SELECTOR_MODE,
+
+ {
+ className: "keyword",
+ begin: /@media/,
+ starts: {
+ end: /[{;}]/,
+ keywords: {
+ $pattern: /[a-z-]+/,
+ keyword: AT_MODIFIERS,
+ attribute: MEDIA_FEATURES.join(" ")
+ },
+ contains: [ hljs.CSS_NUMBER_MODE ]
+ }
+ },
+
+ // @ keywords
+ {
+ className: 'keyword',
+ begin: '\@((-(o|moz|ms|webkit)-)?(' + AT_KEYWORDS.join('|') + '))\\b'
+ },
+
+ // variables
+ VARIABLE,
+
+ // dimension
+ hljs.CSS_NUMBER_MODE,
+
+ // functions
+ // - only from beginning of line + whitespace
+ {
+ className: 'function',
+ begin: '^[a-zA-Z][a-zA-Z0-9_\-]*\\(.*\\)',
+ illegal: '[\\n]',
+ returnBegin: true,
+ contains: [
+ {
+ className: 'title',
+ begin: '\\b[a-zA-Z][a-zA-Z0-9_\-]*'
+ },
+ {
+ className: 'params',
+ begin: /\(/,
+ end: /\)/,
+ contains: [
+ modes.HEXCOLOR,
+ VARIABLE,
+ hljs.APOS_STRING_MODE,
+ hljs.CSS_NUMBER_MODE,
+ hljs.QUOTE_STRING_MODE
+ ]
+ }
+ ]
+ },
+
+ // attributes
+ // - only from beginning of line + whitespace
+ // - must have whitespace after it
+ {
+ className: 'attribute',
+ begin: '\\b(' + ATTRIBUTES.join('|') + ')\\b',
+ starts: {
+ // value container
+ end: /;|$/,
+ contains: [
+ modes.HEXCOLOR,
+ VARIABLE,
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.CSS_NUMBER_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ modes.IMPORTANT
+ ],
+ illegal: /\./,
+ relevance: 0
+ }
+ }
+ ]
+ };
+}
+
+module.exports = stylus;
+
+
+/***/ }),
+
+/***/ 32798:
+/***/ ((module) => {
+
+/*
+Language: SubUnit
+Author: Sergey Bronnikov
+Website: https://pypi.org/project/python-subunit/
+*/
+
+function subunit(hljs) {
+ const DETAILS = {
+ className: 'string',
+ begin: '\\[\n(multipart)?',
+ end: '\\]\n'
+ };
+ const TIME = {
+ className: 'string',
+ begin: '\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}\.\\d+Z'
+ };
+ const PROGRESSVALUE = {
+ className: 'string',
+ begin: '(\\+|-)\\d+'
+ };
+ const KEYWORDS = {
+ className: 'keyword',
+ relevance: 10,
+ variants: [
+ {
+ begin: '^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?'
+ },
+ {
+ begin: '^progress(:?)(\\s+)?(pop|push)?'
+ },
+ {
+ begin: '^tags:'
+ },
+ {
+ begin: '^time:'
+ }
+ ]
+ };
+ return {
+ name: 'SubUnit',
+ case_insensitive: true,
+ contains: [
+ DETAILS,
+ TIME,
+ PROGRESSVALUE,
+ KEYWORDS
+ ]
+ };
+}
+
+module.exports = subunit;
+
+
+/***/ }),
+
+/***/ 73269:
+/***/ ((module) => {
+
+/*
+Language: Tagger Script
+Author: Philipp Wolfer
+Description: Syntax Highlighting for the Tagger Script as used by MusicBrainz Picard.
+Website: https://picard.musicbrainz.org
+ */
+function taggerscript(hljs) {
+ const COMMENT = {
+ className: 'comment',
+ begin: /\$noop\(/,
+ end: /\)/,
+ contains: [ {
+ begin: /\(/,
+ end: /\)/,
+ contains: [ 'self',
+ {
+ begin: /\\./
+ } ]
+ } ],
+ relevance: 10
+ };
+
+ const FUNCTION = {
+ className: 'keyword',
+ begin: /\$(?!noop)[a-zA-Z][_a-zA-Z0-9]*/,
+ end: /\(/,
+ excludeEnd: true
+ };
+
+ const VARIABLE = {
+ className: 'variable',
+ begin: /%[_a-zA-Z0-9:]*/,
+ end: '%'
+ };
+
+ const ESCAPE_SEQUENCE = {
+ className: 'symbol',
+ begin: /\\./
+ };
+
+ return {
+ name: 'Tagger Script',
+ contains: [
+ COMMENT,
+ FUNCTION,
+ VARIABLE,
+ ESCAPE_SEQUENCE
+ ]
+ };
+}
+
+module.exports = taggerscript;
+
+
+/***/ }),
+
+/***/ 73675:
+/***/ ((module) => {
+
+/*
+Language: Test Anything Protocol
+Description: TAP, the Test Anything Protocol, is a simple text-based interface between testing modules in a test harness.
+Requires: yaml.js
+Author: Sergey Bronnikov
+Website: https://testanything.org
+*/
+
+function tap(hljs) {
+ return {
+ name: 'Test Anything Protocol',
+ case_insensitive: true,
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ // version of format and total amount of testcases
+ {
+ className: 'meta',
+ variants: [
+ {
+ begin: '^TAP version (\\d+)$'
+ },
+ {
+ begin: '^1\\.\\.(\\d+)$'
+ }
+ ]
+ },
+ // YAML block
+ {
+ begin: /---$/,
+ end: '\\.\\.\\.$',
+ subLanguage: 'yaml',
+ relevance: 0
+ },
+ // testcase number
+ {
+ className: 'number',
+ begin: ' (\\d+) '
+ },
+ // testcase status and description
+ {
+ className: 'symbol',
+ variants: [
+ {
+ begin: '^ok'
+ },
+ {
+ begin: '^not ok'
+ }
+ ]
+ }
+ ]
+ };
+}
+
+module.exports = tap;
+
+
+/***/ }),
+
+/***/ 49717:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function optional(re) {
+ return concat('(', re, ')?');
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/*
+Language: Tcl
+Description: Tcl is a very simple programming language.
+Author: Radek Liska
+Website: https://www.tcl.tk/about/language.html
+*/
+
+function tcl(hljs) {
+ const TCL_IDENT = /[a-zA-Z_][a-zA-Z0-9_]*/;
+
+ const NUMBER = {
+ className: 'number',
+ variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]
+ };
+
+ return {
+ name: 'Tcl',
+ aliases: ['tk'],
+ keywords: 'after append apply array auto_execok auto_import auto_load auto_mkindex ' +
+ 'auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock ' +
+ 'close concat continue dde dict encoding eof error eval exec exit expr fblocked ' +
+ 'fconfigure fcopy file fileevent filename flush for foreach format gets glob global ' +
+ 'history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list ' +
+ 'llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 '+
+ 'mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex '+
+ 'platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename '+
+ 'return safe scan seek set socket source split string subst switch tcl_endOfWord '+
+ 'tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter '+
+ 'tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update '+
+ 'uplevel upvar variable vwait while',
+ contains: [
+ hljs.COMMENT(';[ \\t]*#', '$'),
+ hljs.COMMENT('^[ \\t]*#', '$'),
+ {
+ beginKeywords: 'proc',
+ end: '[\\{]',
+ excludeEnd: true,
+ contains: [
+ {
+ className: 'title',
+ begin: '[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*',
+ end: '[ \\t\\n\\r]',
+ endsWithParent: true,
+ excludeEnd: true
+ }
+ ]
+ },
+ {
+ className: "variable",
+ variants: [
+ {
+ begin: concat(
+ /\$/,
+ optional(/::/),
+ TCL_IDENT,
+ '(::',
+ TCL_IDENT,
+ ')*'
+ )
+ },
+ {
+ begin: '\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*',
+ end: '\\}',
+ contains: [
+ NUMBER
+ ]
+ }
+ ]
+ },
+ {
+ className: 'string',
+ contains: [hljs.BACKSLASH_ESCAPE],
+ variants: [
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null})
+ ]
+ },
+ NUMBER
+ ]
+ }
+}
+
+module.exports = tcl;
+
+
+/***/ }),
+
+/***/ 12287:
+/***/ ((module) => {
+
+/*
+Language: Thrift
+Author: Oleg Efimov
+Description: Thrift message definition format
+Website: https://thrift.apache.org
+Category: protocols
+*/
+
+function thrift(hljs) {
+ const BUILT_IN_TYPES = 'bool byte i16 i32 i64 double string binary';
+ return {
+ name: 'Thrift',
+ keywords: {
+ keyword:
+ 'namespace const typedef struct enum service exception void oneway set list map required optional',
+ built_in:
+ BUILT_IN_TYPES,
+ literal:
+ 'true false'
+ },
+ contains: [
+ hljs.QUOTE_STRING_MODE,
+ hljs.NUMBER_MODE,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ {
+ className: 'class',
+ beginKeywords: 'struct enum service exception',
+ end: /\{/,
+ illegal: /\n/,
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {
+ // hack: eating everything after the first title
+ starts: {
+ endsWithParent: true,
+ excludeEnd: true
+ }
+ })
+ ]
+ },
+ {
+ begin: '\\b(set|list|map)\\s*<',
+ end: '>',
+ keywords: BUILT_IN_TYPES,
+ contains: [ 'self' ]
+ }
+ ]
+ };
+}
+
+module.exports = thrift;
+
+
+/***/ }),
+
+/***/ 6180:
+/***/ ((module) => {
+
+/*
+Language: TP
+Author: Jay Strybis
+Description: FANUC TP programming language (TPP).
+*/
+
+function tp(hljs) {
+ const TPID = {
+ className: 'number',
+ begin: '[1-9][0-9]*', /* no leading zeros */
+ relevance: 0
+ };
+ const TPLABEL = {
+ className: 'symbol',
+ begin: ':[^\\]]+'
+ };
+ const TPDATA = {
+ className: 'built_in',
+ begin: '(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|' +
+ 'TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[',
+ end: '\\]',
+ contains: [
+ 'self',
+ TPID,
+ TPLABEL
+ ]
+ };
+ const TPIO = {
+ className: 'built_in',
+ begin: '(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[',
+ end: '\\]',
+ contains: [
+ 'self',
+ TPID,
+ hljs.QUOTE_STRING_MODE, /* for pos section at bottom */
+ TPLABEL
+ ]
+ };
+
+ return {
+ name: 'TP',
+ keywords: {
+ keyword:
+ 'ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB ' +
+ 'DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC ' +
+ 'IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE ' +
+ 'PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET ' +
+ 'Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN ' +
+ 'SUBSTR FINDSTR VOFFSET PROG ATTR MN POS',
+ literal:
+ 'ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET'
+ },
+ contains: [
+ TPDATA,
+ TPIO,
+ {
+ className: 'keyword',
+ begin: '/(PROG|ATTR|MN|POS|END)\\b'
+ },
+ {
+ /* this is for cases like ,CALL */
+ className: 'keyword',
+ begin: '(CALL|RUN|POINT_LOGIC|LBL)\\b'
+ },
+ {
+ /* this is for cases like CNT100 where the default lexemes do not
+ * separate the keyword and the number */
+ className: 'keyword',
+ begin: '\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)'
+ },
+ {
+ /* to catch numbers that do not have a word boundary on the left */
+ className: 'number',
+ begin: '\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b',
+ relevance: 0
+ },
+ hljs.COMMENT('//', '[;$]'),
+ hljs.COMMENT('!', '[;$]'),
+ hljs.COMMENT('--eg:', '$'),
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'string',
+ begin: '\'',
+ end: '\''
+ },
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'variable',
+ begin: '\\$[A-Za-z0-9_]+'
+ }
+ ]
+ };
+}
+
+module.exports = tp;
+
+
+/***/ }),
+
+/***/ 53201:
+/***/ ((module) => {
+
+/*
+Language: Twig
+Requires: xml.js
+Author: Luke Holder
+Description: Twig is a templating language for PHP
+Website: https://twig.symfony.com
+Category: template
+*/
+
+function twig(hljs) {
+ var PARAMS = {
+ className: 'params',
+ begin: '\\(', end: '\\)'
+ };
+
+ var FUNCTION_NAMES = 'attribute block constant cycle date dump include ' +
+ 'max min parent random range source template_from_string';
+
+ var FUNCTIONS = {
+ beginKeywords: FUNCTION_NAMES,
+ keywords: {name: FUNCTION_NAMES},
+ relevance: 0,
+ contains: [
+ PARAMS
+ ]
+ };
+
+ var FILTER = {
+ begin: /\|[A-Za-z_]+:?/,
+ keywords:
+ 'abs batch capitalize column convert_encoding date date_modify default ' +
+ 'escape filter first format inky_to_html inline_css join json_encode keys last ' +
+ 'length lower map markdown merge nl2br number_format raw reduce replace ' +
+ 'reverse round slice sort spaceless split striptags title trim upper url_encode',
+ contains: [
+ FUNCTIONS
+ ]
+ };
+
+ var TAGS = 'apply autoescape block deprecated do embed extends filter flush for from ' +
+ 'if import include macro sandbox set use verbatim with';
+
+ TAGS = TAGS + ' ' + TAGS.split(' ').map(function(t){return 'end' + t}).join(' ');
+
+ return {
+ name: 'Twig',
+ aliases: ['craftcms'],
+ case_insensitive: true,
+ subLanguage: 'xml',
+ contains: [
+ hljs.COMMENT(/\{#/, /#\}/),
+ {
+ className: 'template-tag',
+ begin: /\{%/, end: /%\}/,
+ contains: [
+ {
+ className: 'name',
+ begin: /\w+/,
+ keywords: TAGS,
+ starts: {
+ endsWithParent: true,
+ contains: [FILTER, FUNCTIONS],
+ relevance: 0
+ }
+ }
+ ]
+ },
+ {
+ className: 'template-variable',
+ begin: /\{\{/, end: /\}\}/,
+ contains: ['self', FILTER, FUNCTIONS]
+ }
+ ]
+ };
+}
+
+module.exports = twig;
+
+
+/***/ }),
+
+/***/ 89938:
+/***/ ((module) => {
+
+/*
+Language: Vala
+Author: Antono Vasiljev
+Description: Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C.
+Website: https://wiki.gnome.org/Projects/Vala
+*/
+
+function vala(hljs) {
+ return {
+ name: 'Vala',
+ keywords: {
+ keyword:
+ // Value types
+ 'char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 ' +
+ 'uint16 uint32 uint64 float double bool struct enum string void ' +
+ // Reference types
+ 'weak unowned owned ' +
+ // Modifiers
+ 'async signal static abstract interface override virtual delegate ' +
+ // Control Structures
+ 'if while do for foreach else switch case break default return try catch ' +
+ // Visibility
+ 'public private protected internal ' +
+ // Other
+ 'using new this get set const stdout stdin stderr var',
+ built_in:
+ 'DBus GLib CCode Gee Object Gtk Posix',
+ literal:
+ 'false true null'
+ },
+ contains: [
+ {
+ className: 'class',
+ beginKeywords: 'class interface namespace',
+ end: /\{/,
+ excludeEnd: true,
+ illegal: '[^,:\\n\\s\\.]',
+ contains: [ hljs.UNDERSCORE_TITLE_MODE ]
+ },
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ {
+ className: 'string',
+ begin: '"""',
+ end: '"""',
+ relevance: 5
+ },
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'meta',
+ begin: '^#',
+ end: '$',
+ relevance: 2
+ }
+ ]
+ };
+}
+
+module.exports = vala;
+
+
+/***/ }),
+
+/***/ 76053:
+/***/ ((module) => {
+
+/**
+ * @param {string} value
+ * @returns {RegExp}
+ * */
+
+/**
+ * @param {RegExp | string } re
+ * @returns {string}
+ */
+function source(re) {
+ if (!re) return null;
+ if (typeof re === "string") return re;
+
+ return re.source;
+}
+
+/**
+ * @param {...(RegExp | string) } args
+ * @returns {string}
+ */
+function concat(...args) {
+ const joined = args.map((x) => source(x)).join("");
+ return joined;
+}
+
+/**
+ * Any of the passed expresssions may match
+ *
+ * Creates a huge this | this | that | that match
+ * @param {(RegExp | string)[] } args
+ * @returns {string}
+ */
+function either(...args) {
+ const joined = '(' + args.map((x) => source(x)).join("|") + ")";
+ return joined;
+}
+
+/*
+Language: Visual Basic .NET
+Description: Visual Basic .NET (VB.NET) is a multi-paradigm, object-oriented programming language, implemented on the .NET Framework.
+Authors: Poren Chiang , Jan Pilzer
+Website: https://docs.microsoft.com/dotnet/visual-basic/getting-started
+Category: common
+*/
+
+/** @type LanguageFn */
+function vbnet(hljs) {
+ /**
+ * Character Literal
+ * Either a single character ("a"C) or an escaped double quote (""""C).
+ */
+ const CHARACTER = {
+ className: 'string',
+ begin: /"(""|[^/n])"C\b/
+ };
+
+ const STRING = {
+ className: 'string',
+ begin: /"/,
+ end: /"/,
+ illegal: /\n/,
+ contains: [
+ {
+ // double quote escape
+ begin: /""/
+ }
+ ]
+ };
+
+ /** Date Literals consist of a date, a time, or both separated by whitespace, surrounded by # */
+ const MM_DD_YYYY = /\d{1,2}\/\d{1,2}\/\d{4}/;
+ const YYYY_MM_DD = /\d{4}-\d{1,2}-\d{1,2}/;
+ const TIME_12H = /(\d|1[012])(:\d+){0,2} *(AM|PM)/;
+ const TIME_24H = /\d{1,2}(:\d{1,2}){1,2}/;
+ const DATE = {
+ className: 'literal',
+ variants: [
+ {
+ // #YYYY-MM-DD# (ISO-Date) or #M/D/YYYY# (US-Date)
+ begin: concat(/# */, either(YYYY_MM_DD, MM_DD_YYYY), / *#/)
+ },
+ {
+ // #H:mm[:ss]# (24h Time)
+ begin: concat(/# */, TIME_24H, / *#/)
+ },
+ {
+ // #h[:mm[:ss]] A# (12h Time)
+ begin: concat(/# */, TIME_12H, / *#/)
+ },
+ {
+ // date plus time
+ begin: concat(
+ /# */,
+ either(YYYY_MM_DD, MM_DD_YYYY),
+ / +/,
+ either(TIME_12H, TIME_24H),
+ / *#/
+ )
+ }
+ ]
+ };
+
+ const NUMBER = {
+ className: 'number',
+ relevance: 0,
+ variants: [
+ {
+ // Float
+ begin: /\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/
+ },
+ {
+ // Integer (base 10)
+ begin: /\b\d[\d_]*((U?[SIL])|[%&])?/
+ },
+ {
+ // Integer (base 16)
+ begin: /&H[\dA-F_]+((U?[SIL])|[%&])?/
+ },
+ {
+ // Integer (base 8)
+ begin: /&O[0-7_]+((U?[SIL])|[%&])?/
+ },
+ {
+ // Integer (base 2)
+ begin: /&B[01_]+((U?[SIL])|[%&])?/
+ }
+ ]
+ };
+
+ const LABEL = {
+ className: 'label',
+ begin: /^\w+:/
+ };
+
+ const DOC_COMMENT = hljs.COMMENT(/'''/, /$/, {
+ contains: [
+ {
+ className: 'doctag',
+ begin: /<\/?/,
+ end: />/
+ }
+ ]
+ });
+
+ const COMMENT = hljs.COMMENT(null, /$/, {
+ variants: [
+ {
+ begin: /'/
+ },
+ {
+ // TODO: Use `beforeMatch:` for leading spaces
+ begin: /([\t ]|^)REM(?=\s)/
+ }
+ ]
+ });
+
+ const DIRECTIVES = {
+ className: 'meta',
+ // TODO: Use `beforeMatch:` for indentation once available
+ begin: /[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,
+ end: /$/,
+ keywords: {
+ 'meta-keyword':
+ 'const disable else elseif enable end externalsource if region then'
+ },
+ contains: [ COMMENT ]
+ };
+
+ return {
+ name: 'Visual Basic .NET',
+ aliases: [ 'vb' ],
+ case_insensitive: true,
+ classNameAliases: {
+ label: 'symbol'
+ },
+ keywords: {
+ keyword:
+ 'addhandler alias aggregate ansi as async assembly auto binary by byref byval ' + /* a-b */
+ 'call case catch class compare const continue custom declare default delegate dim distinct do ' + /* c-d */
+ 'each equals else elseif end enum erase error event exit explicit finally for friend from function ' + /* e-f */
+ 'get global goto group handles if implements imports in inherits interface into iterator ' + /* g-i */
+ 'join key let lib loop me mid module mustinherit mustoverride mybase myclass ' + /* j-m */
+ 'namespace narrowing new next notinheritable notoverridable ' + /* n */
+ 'of off on operator option optional order overloads overridable overrides ' + /* o */
+ 'paramarray partial preserve private property protected public ' + /* p */
+ 'raiseevent readonly redim removehandler resume return ' + /* r */
+ 'select set shadows shared skip static step stop structure strict sub synclock ' + /* s */
+ 'take text then throw to try unicode until using when where while widening with withevents writeonly yield' /* t-y */,
+ built_in:
+ // Operators https://docs.microsoft.com/dotnet/visual-basic/language-reference/operators
+ 'addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor ' +
+ // Type Conversion Functions https://docs.microsoft.com/dotnet/visual-basic/language-reference/functions/type-conversion-functions
+ 'cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort',
+ type:
+ // Data types https://docs.microsoft.com/dotnet/visual-basic/language-reference/data-types
+ 'boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort',
+ literal: 'true false nothing'
+ },
+ illegal:
+ '//|\\{|\\}|endif|gosub|variant|wend|^\\$ ' /* reserved deprecated keywords */,
+ contains: [
+ CHARACTER,
+ STRING,
+ DATE,
+ NUMBER,
+ LABEL,
+ DOC_COMMENT,
+ COMMENT,
+ DIRECTIVES
+ ]
+ };
+}
+
+module.exports = vbnet;
+
+
+/***/ }),
+
+/***/ 97589:
+/***/ ((module) => {
+
+/*
+Language: VBScript in HTML
+Requires: xml.js, vbscript.js
+Author: Ivan Sagalaev