/*
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 __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var components_exports = {};
__export(components_exports, {
  "abort-signal-component": () => abort_signal_component,
  "all-windows-event-component": () => all_windows_event_component,
  "async-error-handler-component": () => async_error_handler_component,
  "async-events-component": () => async_events_component,
  "component-ex": () => component_ex,
  "console-debug-component": () => console_debug_component,
  "disposable-component": () => disposable_component,
  "i18n-component": () => i18n_component,
  "layout-ready-component": () => layout_ready_component,
  "menu-event-registrar-component": () => menu_event_registrar_component,
  "monkey-around-component": () => monkey_around_component,
  "plugin-context-component": () => plugin_context_component,
  "plugin-notice-component": () => plugin_notice_component,
  "plugin-settings-component": () => plugin_settings_component,
  "plugin-settings-tab-component": () => plugin_settings_tab_component,
  "registry-component": () => registry_component,
  "rename-delete-handler-component": () => rename_delete_handler_component
});
module.exports = __toCommonJS(components_exports);
var abort_signal_component = __toESM(__extractDefault(require('./abort-signal-component.cjs')), 1);
var all_windows_event_component = __toESM(__extractDefault(require('./all-windows-event-component.cjs')), 1);
var async_error_handler_component = __toESM(__extractDefault(require('./async-error-handler-component.cjs')), 1);
var async_events_component = __toESM(__extractDefault(require('./async-events-component.cjs')), 1);
var component_ex = __toESM(__extractDefault(require('./component-ex.cjs')), 1);
var console_debug_component = __toESM(__extractDefault(require('./console-debug-component.cjs')), 1);
var disposable_component = __toESM(__extractDefault(require('./disposable-component.cjs')), 1);
var i18n_component = __toESM(__extractDefault(require('./i18n-component.cjs')), 1);
var layout_ready_component = __toESM(__extractDefault(require('./layout-ready-component.cjs')), 1);
var menu_event_registrar_component = __toESM(__extractDefault(require('./menu-event-registrar-component.cjs')), 1);
var monkey_around_component = __toESM(__extractDefault(require('./monkey-around-component.cjs')), 1);
var plugin_context_component = __toESM(__extractDefault(require('./plugin-context-component.cjs')), 1);
var plugin_notice_component = __toESM(__extractDefault(require('./plugin-notice-component.cjs')), 1);
var plugin_settings_component = __toESM(__extractDefault(require('./plugin-settings-component.cjs')), 1);
var plugin_settings_tab_component = __toESM(__extractDefault(require('./plugin-settings-tab-component.cjs')), 1);
var registry_component = __toESM(__extractDefault(require('./registry-component.cjs')), 1);
var rename_delete_handler_component = __toESM(__extractDefault(require('./rename-delete-handler-component.cjs')), 1);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  "abort-signal-component": null,
  "all-windows-event-component": null,
  "async-error-handler-component": null,
  "async-events-component": null,
  "component-ex": null,
  "console-debug-component": null,
  "disposable-component": null,
  "i18n-component": null,
  "layout-ready-component": null,
  "menu-event-registrar-component": null,
  "monkey-around-component": null,
  "plugin-context-component": null,
  "plugin-notice-component": null,
  "plugin-settings-component": null,
  "plugin-settings-tab-component": null,
  "registry-component": null,
  "rename-delete-handler-component": null
});
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vLi4vc3JjL29ic2lkaWFuL2NvbXBvbmVudHMvaW5kZXgudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qIFRISVMgSVMgQSBHRU5FUkFURUQvQlVORExFRCBGSUxFIEJZIEJVSUxEIFNDUklQVCAqL1xuXG5leHBvcnQgKiBhcyAnYWJvcnQtc2lnbmFsLWNvbXBvbmVudCcgZnJvbSAnLi9hYm9ydC1zaWduYWwtY29tcG9uZW50LnRzJztcbmV4cG9ydCAqIGFzICdhbGwtd2luZG93cy1ldmVudC1jb21wb25lbnQnIGZyb20gJy4vYWxsLXdpbmRvd3MtZXZlbnQtY29tcG9uZW50LnRzJztcbmV4cG9ydCAqIGFzICdhc3luYy1lcnJvci1oYW5kbGVyLWNvbXBvbmVudCcgZnJvbSAnLi9hc3luYy1lcnJvci1oYW5kbGVyLWNvbXBvbmVudC50cyc7XG5leHBvcnQgKiBhcyAnYXN5bmMtZXZlbnRzLWNvbXBvbmVudCcgZnJvbSAnLi9hc3luYy1ldmVudHMtY29tcG9uZW50LnRzJztcbmV4cG9ydCAqIGFzICdjb21wb25lbnQtZXgnIGZyb20gJy4vY29tcG9uZW50LWV4LnRzJztcbmV4cG9ydCAqIGFzICdjb25zb2xlLWRlYnVnLWNvbXBvbmVudCcgZnJvbSAnLi9jb25zb2xlLWRlYnVnLWNvbXBvbmVudC50cyc7XG5leHBvcnQgKiBhcyAnZGlzcG9zYWJsZS1jb21wb25lbnQnIGZyb20gJy4vZGlzcG9zYWJsZS1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