'use strict';

var fs = require('fs');
var path = require('path');
var url = require('url');

var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var fs__default = /*#__PURE__*/_interopDefault(fs);
var path__default = /*#__PURE__*/_interopDefault(path);

// src/platform/prompts/markdown-assets.ts
var PACKAGE_JSON_FILE_NAME = "package.json";
function findPackageRoot(moduleFilePath) {
  let currentDirectoryPath = path__default.default.dirname(moduleFilePath);
  while (!fs__default.default.existsSync(path__default.default.join(currentDirectoryPath, PACKAGE_JSON_FILE_NAME))) {
    const parentDirectoryPath = path__default.default.dirname(currentDirectoryPath);
    if (parentDirectoryPath === currentDirectoryPath) {
      throw new Error(`markdown \uC790\uC0B0 package root\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. start=${moduleFilePath}`);
    }
    currentDirectoryPath = parentDirectoryPath;
  }
  return currentDirectoryPath;
}
function resolvePromptPackageFilePath(importMetaUrl, packageRelativeFilePath) {
  const moduleFilePath = url.fileURLToPath(importMetaUrl);
  const packageRoot = findPackageRoot(moduleFilePath);
  return path__default.default.normalize(path__default.default.resolve(packageRoot, packageRelativeFilePath));
}
function createPromptMarkdownFileAsset(importMetaUrl, packageRelativeFilePath) {
  return {
    filePath: resolvePromptPackageFilePath(importMetaUrl, packageRelativeFilePath),
    kind: "file-reference"
  };
}

// src/features/minify-md/assets/rules/md-minify-rule.md
var md_minify_rule_default = "# md minify \uADDC\uCE59\n\n- \uBAA9\uD45C\uB294 human-readable \uBB38\uC11C\uB97C machine-readable \uBB38\uC11C\uB85C \uC7AC\uAD6C\uC131\uD558\uB294 \uAC83\uC774\uB2E4.\n- \uC6D0\uBCF8 markdown\uC758 \uC758\uBBF8, \uC81C\uC57D, \uACBD\uB85C, \uBA85\uB839\uC5B4, \uC218\uCE58, \uCF54\uB4DC \uBE14\uB85D, \uD45C\uC758 \uC0AC\uC2E4\uAC12\uC740 \uAC00\uB2A5\uD55C \uD55C \uC190\uC2E4 \uC5C6\uC774 \uC720\uC9C0\uD55C\uB2E4.\n- \uBB38\uC7A5\uC744 \uC7A5\uD669\uD558\uAC8C \uBC18\uBCF5\uD558\uC9C0 \uB9D0\uACE0, \uAC19\uC740 \uC758\uBBF8\uC758 \uB0B4\uC6A9\uC744 \uADDC\uCE59\uC801\uC774\uACE0 \uC9E7\uC740 bullet\uB85C \uC815\uB9AC\uD55C\uB2E4.\n- \uC124\uBA85\uD615 \uC11C\uC220\uBCF4\uB2E4 `\uD56D\uBAA9: \uAC12` \uB610\uB294 \uC9E7\uC740 bullet\uB97C \uC6B0\uC120 \uC0AC\uC6A9\uD55C\uB2E4.\n- \uC81C\uBAA9 \uCCB4\uACC4\uB294 \uB2E8\uC21C\uD654\uD558\uB418, \uC6D0\uBCF8\uC758 \uB17C\uB9AC\uC801 \uAD6C\uD68D\uC740 \uC720\uC9C0\uD55C\uB2E4.\n- `.min.md` \uC5D0 \uB4E4\uC5B4\uAC08 \uBCF8\uBB38\uC5D0\uB294 \uAC19\uC740 \uB73B\uC774 \uBC18\uBCF5\uB418\uBA74 \uD55C \uBC88\uB9CC \uB0A8\uAE30\uACE0, \uC911\uBCF5 \uD6C4\uBCF4\uB294 \uB85C\uADF8 \uC601\uC5ED\uC758 `## \uC911\uBCF5\uD655\uC778\uD544\uC694` \uC139\uC158\uC5D0\uB9CC \uBAA8\uC544 \uC218\uC815\uC548\uC744 \uC81C\uC2DC\uD55C\uB2E4.\n- \uBB38\uB9E5\uC0C1 \uC81C\uAC70 \uAC00\uB2A5\uD574 \uBCF4\uC774\uB294 \uD56D\uBAA9\uC740 \uBCF8\uBB38\uC5D0\uC11C \uC123\uBD88\uB9AC \uC0AD\uC81C\uD558\uC9C0 \uB9D0\uACE0, \uB85C\uADF8 \uC601\uC5ED\uC758 `## \uC81C\uAC70\uD655\uC778\uD544\uC694` \uC139\uC158\uC5D0\uB9CC \uBAA8\uC544 \uC81C\uAC70\uC548\uC744 \uC81C\uC2DC\uD55C\uB2E4.\n- \uB85C\uADF8 \uC601\uC5ED\uC758 `\uC911\uBCF5\uD655\uC778\uD544\uC694`, `\uC81C\uAC70\uD655\uC778\uD544\uC694` \uC139\uC158\uC774 \uBE44\uC5B4 \uC788\uC73C\uBA74 \uAC01\uAC01 `- \uC5C6\uC74C` \uC73C\uB85C \uD45C\uAE30\uD55C\uB2E4.\n- \uC6D0\uBCF8\uC5D0 \uCF54\uB4DC \uBE14\uB85D, CLI \uBA85\uB839, \uD30C\uC77C \uACBD\uB85C, URL, JSON/YAML \uC870\uAC01\uC774 \uC788\uC73C\uBA74 \uC758\uBBF8\uAC00 \uBC14\uB00C\uC9C0 \uC54A\uAC8C \uC720\uC9C0\uD55C\uB2E4.\n- \uAE34 \uBB38\uB2E8\uC740 \uC6D0\uC790\uC801\uC778 \uC0AC\uC2E4 bullet\uB85C \uD480\uC5B4 \uC4F0\uB418, \uC6D0\uBB38\uC5D0\uB9CC \uC788\uB358 \uC870\uAC74/\uC608\uC678/\uC8FC\uC758\uC0AC\uD56D\uC744 \uBE60\uB728\uB9AC\uC9C0 \uC54A\uB294\uB2E4.\n- \uD45C\uB294 \uD1A0\uD070 \uC808\uAC10\uC744 \uC704\uD574 \uAC00\uB2A5\uD558\uBA74 bullet\uB098 `\uD544\uB4DC: \uAC12` \uBB36\uC74C\uC73C\uB85C \uBC14\uAFBC\uB2E4.\n- \uC6D0\uBCF8\uC758 \uBAA8\uD638\uC131\uC740 \uC228\uAE30\uC9C0 \uB9D0\uACE0, \uD544\uC694\uD55C \uACBD\uC6B0 \uBCF8\uBB38 \uB610\uB294 \uB85C\uADF8 \uC601\uC5ED\uC5D0 \uC9E7\uAC8C \uAE30\uB85D\uD55C\uB2E4.\n- \uCD5C\uC885 \uACB0\uACFC\uB294 \uC751\uB2F5 \uC591\uC2DD\uC758 \uB9C8\uCEE4\uB97C \uC815\uD655\uD788 \uC9C0\uCF1C \uCD9C\uB825\uD55C\uB2E4. \uCF54\uB4DC \uD39C\uC2A4, \uC11C\uBB38, \uC0AC\uACFC, \uC124\uBA85 \uBB38\uC7A5\uC744 \uB367\uBD99\uC774\uC9C0 \uC54A\uB294\uB2E4.\n";

// src/features/minify-md/assets/rules/index.ts
var minifyMdPromptRules = [
  createPromptMarkdownFileAsset((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)), "src/features/minify-md/assets/rules/md-minify-rule.md")
];
var minifyMdRules = [md_minify_rule_default];

exports.minifyMdPromptRules = minifyMdPromptRules;
exports.minifyMdRules = minifyMdRules;
