/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/

(function initCjs() {
  // eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
  const globalThisRecord = globalThis;
  globalThisRecord['__name'] ??= name;
  const originalRequire = require;
  if (originalRequire && !originalRequire.__isPatched) {
    // eslint-disable-next-line no-global-assign, no-implicit-globals -- We need to patch the `require()` function.
    require = Object.assign(
      (id) => requirePatched(id),
      originalRequire,
      {
        __isPatched: true
      }
    );
  }

  const newFuncs = {
    __extractDefault() {
      return extractDefault;
    },
    process() {
      const browserProcess = {
        browser: true,
        cwd() {
          return '/';
        },
        env: {},
        platform: 'android'
      };
      return browserProcess;
    }
  };

  for (const key of Object.keys(newFuncs)) {
    globalThisRecord[key] ??= newFuncs[key]?.();
  }

  function name(obj) {
    return obj;
  }

  function extractDefault(module) {
    return module && module.__esModule && 'default' in module ? module.default : module;
  }

  const OBSIDIAN_BUILT_IN_MODULE_NAMES = [
  'obsidian',
  '@codemirror/autocomplete',
  '@codemirror/collab',
  '@codemirror/commands',
  '@codemirror/language',
  '@codemirror/lint',
  '@codemirror/search',
  '@codemirror/state',
  '@codemirror/text',
  '@codemirror/view',
  '@lezer/common',
  '@lezer/lr',
  '@lezer/highlight'];


  const DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES = [
  '@codemirror/closebrackets',
  '@codemirror/comment',
  '@codemirror/fold',
  '@codemirror/gutter',
  '@codemirror/highlight',
  '@codemirror/history',
  '@codemirror/matchbrackets',
  '@codemirror/panel',
  '@codemirror/rangeset',
  '@codemirror/rectangular-selection',
  '@codemirror/stream-parser',
  '@codemirror/tooltip'];


  function requirePatched(id) {
    if (OBSIDIAN_BUILT_IN_MODULE_NAMES.includes(id) || DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES.includes(id)) {
      return originalRequire?.(id);
    }

    // eslint-disable-next-line @typescript-eslint/no-deprecated, obsidianmd/no-global-this  -- Need access to app. Actively use globalThis.
    if (globalThis.app.isMobile) {
      if (id === 'process' || id === 'node:process') {
        // eslint-disable-next-line no-console -- Valid usage.
        console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Fake process object is returned instead.`);
        // eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
        return globalThis.process;
      }
    } else {
      const module = originalRequire?.(id);
      if (module) {
        return extractDefault(module);
      }
    }

    // eslint-disable-next-line no-console -- Valid usage.
    console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Empty object is returned instead.`);
    return {};
  }
})();

"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var obsidian_dev_utils_plugin_exports = {};
__export(obsidian_dev_utils_plugin_exports, {
  obsidianDevUtilsPlugin: () => obsidianDevUtilsPlugin
});
module.exports = __toCommonJS(obsidian_dev_utils_plugin_exports);
var import_no_async_callback_to_unsafe_return = require('./no-async-callback-to-unsafe-return.cjs');
var import_no_used_underscore_variables = require('./no-used-underscore-variables.cjs');
var import_params_options_name_match = require('./params-options-name-match.cjs');
var import_prefer_noop_async = require('./prefer-noop-async.cjs');
var import_readonly_params_options_members = require('./readonly-params-options-members.cjs');
var import_require_component_suffix = require('./require-component-suffix.cjs');
var import_require_method_template = require('./require-method-template.cjs');
var import_require_super_call = require('./require-super-call.cjs');
const obsidianDevUtilsPlugin = {
  rules: {
    "no-async-callback-to-unsafe-return": import_no_async_callback_to_unsafe_return.noAsyncCallbackToUnsafeReturn,
    "no-used-underscore-variables": import_no_used_underscore_variables.noUsedUnderscoreVariables,
    "params-options-name-match": import_params_options_name_match.paramsOptionsNameMatch,
    "prefer-noop-async": import_prefer_noop_async.preferNoopAsync,
    "readonly-params-options-members": import_readonly_params_options_members.readonlyParamsOptionsMembers,
    "require-component-suffix": import_require_component_suffix.requireComponentSuffix,
    "require-method-template": import_require_method_template.requireMethodTemplate,
    "require-super-call": import_require_super_call.requireSuperCall
  }
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  obsidianDevUtilsPlugin
});
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3NjcmlwdC11dGlscy9saW50ZXJzL2VzbGludC1ydWxlcy9vYnNpZGlhbi1kZXYtdXRpbHMtcGx1Z2luLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKipcbiAqIEBmaWxlXG4gKlxuICogRVNMaW50IHBsdWdpbiBmb3IgT2JzaWRpYW4gZGV2ZWxvcG1lbnQgdXRpbGl0aWVzLlxuICovXG5pbXBvcnQgdHlwZSB7IEVTTGludCB9IGZyb20gJ2VzbGludCc7XG5cbmltcG9ydCB7IG5vQXN5bmNDYWxsYmFja1RvVW5zYWZlUmV0dXJuIH0gZnJvbSAnLi9uby1hc3luYy1jYWxsYmFjay10by11bnNhZmUtcmV0dXJuLnRzJztcbmltcG9ydCB7IG5vVXNlZFVuZGVyc2NvcmVWYXJpYWJsZXMgfSBmcm9tICcuL25vLXVzZWQtdW5kZXJzY29yZS12YXJpYWJsZXMudHMnO1xuaW1wb3J0IHsgcGFyYW1zT3B0aW9uc05hbWVNYXRjaCB9IGZyb20gJy4vcGFyYW1zLW9wdGlvbnMtbmFtZS1tYXRjaC50cyc7XG5pbXBvcnQgeyBwcmVmZXJOb29wQXN5bmMgfSBmcm9tICcuL3ByZWZ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