/*
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 date_time_component_exports = {};
__export(date_time_component_exports, {
  DateTimeComponent: () => DateTimeComponent
});
module.exports = __toCommonJS(date_time_component_exports);
var import_obsidian = require('obsidian');
var import_css_class = require('../../css-class.cjs');
var import_object_utils = require('../../object-utils.cjs');
var import_typed_range_text_component = require('./typed-range-text-component.cjs');
const moment = (0, import_object_utils.extractDefaultExportInterop)(import_obsidian.moment);
const DATE_TIME_FORMAT = "YYYY-MM-DDTHH:mm";
class DateTimeComponent extends import_typed_range_text_component.TypedRangeTextComponent {
  /**
   * Creates a new date and time component.
   *
   * @param containerEl - The container element of the component.
   */
  constructor(containerEl) {
    super(containerEl, "datetime-local", import_css_class.CssClass.DateTimeComponent);
  }
  /**
   * Converts a string to a date.
   *
   * @param str - The string to convert.
   * @returns The date.
   */
  valueFromString(str) {
    return moment(str, DATE_TIME_FORMAT).toDate();
  }
  /**
   * Converts a date to a string.
   *
   * @param value - The date to convert.
   * @returns The string.
   */
  valueToString(value) {
    return moment(value).format(DATE_TIME_FORMAT);
  }
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  DateTimeComponent
});
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vLi4vc3JjL29ic2lkaWFuL3NldHRpbmctY29tcG9uZW50cy9kYXRlLXRpbWUtY29tcG9uZW50LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKipcbiAqIEBmaWxlXG4gKlxuICogQ29udGFpbnMgYSBjb21wb25lbnQgdGhhdCBkaXNwbGF5cyBhbmQgZWRpdHMgYSBkYXRlIGFuZCB0aW1lLlxuICovXG5cbmltcG9ydCB7IG1vbWVudCBhcyBtb21lbnRfIH0gZnJvbSAnb2JzaWRpYW4nO1xuXG4vLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzIC0tIFdlIG5lZWQgdG8gaW1wb3J0IGBpbml0UGx1Z2luQ29udGV4dGAgdG8gdXNlIGl0IGluIHRoZSB0c2RvY3MuXG5pbXBvcnQgdHlwZSB7IGluaXRQbHVnaW5Db250ZXh0IH0gZnJvbSAnLi4vcGx1Z2luL3BsdWdpbi1jb250ZXh0LnRzJztcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgLS0gV2UgbmVlZCB0byBpbXBvcnQgYFNldHRpbmdFeGAgdG8gdXNlIGl0IGluIHRoZSB0c2RvY3MuXG5pbXBvcnQgdHlwZSB7IFNldHRpbmdFeCB9IGZyb20gJy4uL3NldHRpbmctZXgudHMnO1xuXG5pbXBvcnQgeyBDc3NDbG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