@learnosity/lib-qti-converter 0.12.6 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -2
- package/packages/cli/dist/batchProcessors-DU1HwpHY.js +3753 -0
- package/packages/cli/dist/batchProcessors-DU1HwpHY.js.map +1 -0
- package/packages/cli/dist/batchWorker.js +1 -1
- package/packages/cli/dist/{learnosityToQti-CXDJoJpl.js → learnosityToQti-BSbH3jyx.js} +4 -4
- package/packages/cli/dist/{learnosityToQti-CXDJoJpl.js.map → learnosityToQti-BSbH3jyx.js.map} +1 -1
- package/packages/cli/dist/{learnosityToQtiPackage-7v-s4ybk.js → learnosityToQtiPackage-B0xRzYmy.js} +4 -5
- package/packages/cli/dist/{learnosityToQtiPackage-7v-s4ybk.js.map → learnosityToQtiPackage-B0xRzYmy.js.map} +1 -1
- package/packages/cli/dist/main.js +6 -6
- package/packages/cli/dist/main.js.map +1 -1
- package/packages/cli/dist/nodeFileAccess-BkzSHCOh.js +291 -0
- package/packages/cli/dist/nodeFileAccess-BkzSHCOh.js.map +1 -0
- package/packages/cli/dist/{pathUtils-CgoDQyJk.js → pathUtils-B9yPTlVF.js} +3 -149
- package/packages/cli/dist/pathUtils-B9yPTlVF.js.map +1 -0
- package/packages/cli/dist/{qtiPackageToLearnosity-hT4QZ7YX.js → qtiPackageToLearnosity-C7JaaUDU.js} +5 -5
- package/packages/cli/dist/{qtiPackageToLearnosity-hT4QZ7YX.js.map → qtiPackageToLearnosity-C7JaaUDU.js.map} +1 -1
- package/packages/cli/dist/{qtiToLearnosity-BU7mHhIu.js → qtiToLearnosity-CYoG2aIX.js} +5 -5
- package/packages/cli/dist/{qtiToLearnosity-BU7mHhIu.js.map → qtiToLearnosity-CYoG2aIX.js.map} +1 -1
- package/packages/cli/dist/resolveOptions-CW80R2EQ.js +2879 -0
- package/packages/cli/dist/resolveOptions-CW80R2EQ.js.map +1 -0
- package/packages/cli/dist/{resolveOptions-ehwJSkQy.js → table-DjOn2Tsk.js} +2427 -2816
- package/packages/cli/dist/table-DjOn2Tsk.js.map +1 -0
- package/packages/cli/dist/batchProcessors-C8k2v0o_.js +0 -217
- package/packages/cli/dist/batchProcessors-C8k2v0o_.js.map +0 -1
- package/packages/cli/dist/pathUtils-CgoDQyJk.js.map +0 -1
- package/packages/cli/dist/resolveOptions-ehwJSkQy.js.map +0 -1
- package/packages/cli/dist/table-DYcNeyJ_.js +0 -2306
- package/packages/cli/dist/table-DYcNeyJ_.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveOptions-CW80R2EQ.js","names":["chalk","Table","process","process","spinners","process","process","process","cliSpinners","logSymbols.success","logSymbols.error","logSymbols.warning","logSymbols.info","chalk","input","select"],"sources":["../../core/src/conversions.ts","../src/io/readInput.ts","../src/io/writeOutput.ts","../src/ux/resolvedOptions.ts","../../../node_modules/.pnpm/mimic-function@5.0.1/node_modules/mimic-function/index.js","../../../node_modules/.pnpm/onetime@7.0.0/node_modules/onetime/index.js","../../../node_modules/.pnpm/restore-cursor@5.1.0/node_modules/restore-cursor/index.js","../../../node_modules/.pnpm/cli-cursor@5.0.0/node_modules/cli-cursor/index.js","../../../node_modules/.pnpm/cli-spinners@3.4.0/node_modules/cli-spinners/spinners.json","../../../node_modules/.pnpm/cli-spinners@3.4.0/node_modules/cli-spinners/index.js","../../../node_modules/.pnpm/yoctocolors@2.2.0/node_modules/yoctocolors/base.js","../../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js","../../../node_modules/.pnpm/log-symbols@7.0.1/node_modules/log-symbols/symbols.js","../../../node_modules/.pnpm/string-width@8.2.2/node_modules/string-width/index.js","../../../node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js","../../../node_modules/.pnpm/stdin-discarder@0.3.2/node_modules/stdin-discarder/index.js","../../../node_modules/.pnpm/ora@9.4.1/node_modules/ora/index.js","../src/ux/progress.ts","../src/options/resolveOptions.ts"],"sourcesContent":["/**\n * Browser-safe, in-memory conversion entry points (no filesystem access).\n *\n * Disk/ZIP-based conversions (`convertQtiPackageToLearnosity`,\n * `convertLearnosityToQtiPackage`) live in `conversions.node.ts` and are exposed\n * from `@learnosity/converter-core/node`.\n */\n\nimport type { Diagnostic, ConversionOptions, ConversionResult } from './types.js';\nimport type { LearnosityItemJson } from './qti-to-learnosity/types.js';\nimport { parseLearnosityItem } from './learnosity-model/parseLearnosityItem.js';\nimport { mapLearnosityToAst } from './learnosity-mapper/mapLearnosityToAst.js';\nimport { serializeAssessmentItem } from './qti-serializer/serializeAssessmentItem.js';\nimport { convertQtiAssessmentItemToLearnosity } from './qti-to-learnosity/convertQtiToLearnosity.js';\nimport { transformForwardAssetUrlsInXml } from './learnosity-mapper/forwardAssetUrlTransform.js';\n\n/**\n * Convert QTI XML to Learnosity JSON.\n *\n * Pure/in-memory: passage and LOM lookups only happen if a `fileAccess`\n * implementation is supplied in `opts` (Node callers can inject `nodeFileAccess`\n * from `@learnosity/converter-core/node`).\n *\n * @param input - QTI XML string\n * @param opts - Conversion options\n * @returns Learnosity JSON and diagnostics\n */\nexport function convertQtiToLearnosity(\n input: string,\n opts: ConversionOptions\n): Promise<ConversionResult<LearnosityItemJson | undefined>> {\n const result = convertQtiAssessmentItemToLearnosity(input, {\n qtiVersion: opts.qtiVersion,\n inputPath: opts.inputPath,\n organisationId: opts.organisationId,\n mediaVault: opts.mediaVault,\n customAssetUrl: opts.customAssetUrl,\n itemReferenceSource: opts.itemReferenceSource,\n fileAccess: opts.fileAccess,\n });\n\n return Promise.resolve({\n output: result.item,\n diagnostics: result.diagnostics,\n });\n}\n\n/**\n * Convert Learnosity JSON to QTI XML\n * @param input - Learnosity JSON object\n * @param opts - Conversion options\n * @returns QTI XML string and diagnostics\n */\nexport function convertLearnosityToQti(\n input: unknown,\n opts: ConversionOptions\n): Promise<ConversionResult<string>> {\n const allDiagnostics: Diagnostic[] = [];\n\n // Step 1: Parse Learnosity Item\n const parseResult = parseLearnosityItem(input);\n\n allDiagnostics.push(...parseResult.diagnostics);\n\n if (!parseResult.model) {\n // Parsing failed, return empty output\n return Promise.resolve({\n output: '',\n diagnostics: allDiagnostics,\n });\n }\n\n // Check for sharedpassage features (not supported in standalone item conversion)\n const hasSharedpassage = parseResult.model.features.some((f) => f.type === 'sharedpassage');\n\n if (hasSharedpassage) {\n allDiagnostics.push({\n level: 'warning',\n code: 'QTI_STIMULUS_INLINED_STANDALONE',\n message:\n 'Item contains sharedpassage features, but standalone item conversion does not support stimulus resources. Use learnosity-to-qti-package command to convert as a package with proper stimulus resources.',\n file: 'features',\n });\n }\n\n // Step 2: Map to QTI AST\n const mapResult = mapLearnosityToAst(parseResult.model);\n\n allDiagnostics.push(...mapResult.diagnostics);\n\n if (!mapResult.ast) {\n // Mapping failed, return empty output\n return Promise.resolve({\n output: '',\n diagnostics: allDiagnostics,\n });\n }\n\n // Step 3: Serialize to XML\n const serializeResult = serializeAssessmentItem(mapResult.ast, {\n pretty: true,\n version: opts.qtiVersion,\n });\n\n allDiagnostics.push(...serializeResult.diagnostics);\n\n if (!serializeResult.xml) {\n // Serialization failed, return empty output\n return Promise.resolve({\n output: '',\n diagnostics: allDiagnostics,\n });\n }\n\n // Check if there are any error-level diagnostics\n const hasErrors = allDiagnostics.some((d) => d.level === 'error');\n\n if (hasErrors) {\n // Don't emit output if there are errors\n return Promise.resolve({\n output: '',\n diagnostics: allDiagnostics,\n });\n }\n\n // Rewrite asset reference prefixes (images/audio/video) to the package\n // convention (`./assets/<filename>`) or a caller-supplied customAssetUrl.\n const output = transformForwardAssetUrlsInXml(serializeResult.xml, opts.customAssetUrl);\n\n return Promise.resolve({\n output,\n diagnostics: allDiagnostics,\n });\n}\n","import { readFile, stat } from 'fs/promises';\nimport { createInterface } from 'readline';\n\n/**\n * Read input from file or stdin\n * @param inputPath - File path or '-' for stdin\n * @returns Input content as string\n */\nexport async function readInput(inputPath: string): Promise<string> {\n if (inputPath === '-') {\n return readStdin();\n }\n\n // Check if path is a directory\n try {\n const stats = await stat(inputPath);\n\n if (stats.isDirectory()) {\n throw new Error(\n `Input path is a directory: ${inputPath}\\n` +\n `\\n` +\n `To convert a directory of Learnosity items, use:\\n` +\n ` lrn-converter learnosity-to-qti-package --in ${inputPath} --out <output-path>\\n` +\n `\\n` +\n `Or use the short alias:\\n` +\n ` lcon learnosity-to-qti-package --in ${inputPath} --out <output-path>`\n );\n }\n } catch (error) {\n // If stat fails, let readFile handle the error\n if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {\n throw error;\n }\n }\n\n return readFile(inputPath, 'utf-8');\n}\n\n/**\n * Read from stdin\n */\nasync function readStdin(): Promise<string> {\n const chunks: string[] = [];\n const rl = createInterface({\n input: process.stdin,\n crlfDelay: Infinity,\n });\n\n for await (const line of rl) {\n chunks.push(line);\n }\n\n return chunks.join('\\n');\n}\n\n/**\n * Parse JSON input safely\n * @param input - String that might be JSON\n * @returns Parsed object or throws\n */\nexport function parseJsonInput(input: string): unknown {\n try {\n return JSON.parse(input);\n } catch (error) {\n throw new Error(`Failed to parse JSON input: ${error instanceof Error ? error.message : 'unknown error'}`);\n }\n}\n","import { writeFile, mkdir } from 'fs/promises';\nimport { dirname } from 'path';\n\n/**\n * Write output to file or stdout\n * @param outputPath - File path or '-' for stdout\n * @param content - Content to write\n * @param pretty - Pretty-print JSON if applicable\n */\nexport async function writeOutput(outputPath: string, content: string | unknown, pretty: boolean = false): Promise<void> {\n let output: string;\n\n if (typeof content === 'string') {\n output = content;\n } else {\n output = JSON.stringify(content, null, pretty ? 2 : 0);\n }\n\n if (outputPath === '-') {\n process.stdout.write(output);\n if (!output.endsWith('\\n')) {\n process.stdout.write('\\n');\n }\n } else {\n await mkdir(dirname(outputPath), { recursive: true });\n await writeFile(outputPath, output, 'utf-8');\n }\n}\n","import boxen from 'boxen';\nimport chalk from 'chalk';\nimport Table from 'cli-table3';\nimport type { ResolvedOptions, ResolvedOptionsWithSources } from '../options/types.js';\n\n/**\n * Display resolved options in a box\n */\nexport function showResolvedOptions(options: ResolvedOptions, withSources?: ResolvedOptionsWithSources, quiet = false): void {\n // Don't show options if quiet mode is enabled\n if (quiet) {\n return;\n }\n\n const lines: string[] = [];\n\n lines.push(chalk.bold('Resolved Options'));\n lines.push('');\n lines.push(`${chalk.dim('Input:')} ${options.inputPath}`);\n lines.push(`${chalk.dim('Output:')} ${options.outputPath}`);\n lines.push(`${chalk.dim('QTI Version:')} ${options.qtiVersion}`);\n lines.push(`${chalk.dim('Output Format:')} ${options.outputFormat}`);\n lines.push(`${chalk.dim('Diagnostics:')} ${options.diagnostics}`);\n lines.push(`${chalk.dim('Pretty:')} ${options.pretty}`);\n lines.push(`${chalk.dim('Verbose:')} ${options.verbose}`);\n if (options.organisationId !== undefined) {\n lines.push(`${chalk.dim('Organisation ID:')} ${options.organisationId}`);\n }\n if (options.mediaVault !== undefined) {\n lines.push(`${chalk.dim('Media Vault:')} ${options.mediaVault}`);\n }\n if (options.customAssetUrl !== undefined) {\n lines.push(`${chalk.dim('Custom Asset URL:')} ${options.customAssetUrl}`);\n }\n lines.push(`${chalk.dim('Config:')} ${options.configPath ?? 'none'}`);\n\n const box = boxen(lines.join('\\n'), {\n padding: 1,\n margin: { top: 0, bottom: 1, left: 0, right: 0 },\n borderStyle: 'round',\n borderColor: 'blue',\n });\n\n console.log(box);\n\n // If verbose, show source table\n if (options.verbose && withSources) {\n showOptionSources(withSources);\n }\n}\n\n/**\n * Display option sources table (verbose mode)\n */\nfunction showOptionSources(withSources: ResolvedOptionsWithSources): void {\n const table = new Table({\n head: [chalk.bold('Option'), chalk.bold('Value'), chalk.bold('Source')],\n style: {\n head: [],\n border: [],\n },\n });\n\n table.push(\n ['qtiVersion', withSources.qtiVersion.value, formatSource(withSources.qtiVersion.source)],\n ['outputFormat', withSources.outputFormat.value, formatSource(withSources.outputFormat.source)],\n ['diagnostics', withSources.diagnostics.value, formatSource(withSources.diagnostics.source)],\n ['verbose', String(withSources.verbose.value), formatSource(withSources.verbose.source)],\n ['pretty', String(withSources.pretty.value), formatSource(withSources.pretty.source)]\n );\n\n // Add organisationId if present\n if (withSources.organisationId) {\n table.push(['organisationId', String(withSources.organisationId.value), formatSource(withSources.organisationId.source)]);\n }\n\n // Add mediaVault if present\n if (withSources.mediaVault) {\n table.push(['mediaVault', String(withSources.mediaVault.value), formatSource(withSources.mediaVault.source)]);\n }\n\n // Add customAssetUrl if present\n if (withSources.customAssetUrl) {\n table.push(['customAssetUrl', String(withSources.customAssetUrl.value), formatSource(withSources.customAssetUrl.source)]);\n }\n\n console.log(chalk.dim('Option Sources:'));\n console.log(table.toString());\n console.log();\n}\n\n/**\n * Format source with color\n */\nfunction formatSource(source: string): string {\n switch (source) {\n case 'cli':\n return chalk.cyan('CLI');\n case 'config':\n return chalk.green('Config');\n case 'default':\n return chalk.dim('Default');\n default:\n return source;\n }\n}\n","const copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\t// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.\n\tif (property === 'arguments' || property === 'caller') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable\n\t\t&& toDescriptor.enumerable === fromDescriptor.enumerable\n\t\t&& toDescriptor.configurable === fromDescriptor.configurable\n\t\t&& (toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tconst {writable, enumerable, configurable} = toStringDescriptor; // We destructue to avoid a potential `get` descriptor.\n\tObject.defineProperty(to, 'toString', {value: newToString, writable, enumerable, configurable});\n};\n\nexport default function mimicFunction(to, from, {ignoreNonConfigurable = false} = {}) {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n}\n","import mimicFunction from 'mimic-function';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '<anonymous>';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = undefined;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n","import process from 'node:process';\nimport onetime from 'onetime';\nimport {onExit} from 'signal-exit';\n\nconst terminal = process.stderr.isTTY\n\t? process.stderr\n\t: (process.stdout.isTTY ? process.stdout : undefined);\n\nconst restoreCursor = terminal ? onetime(() => {\n\tonExit(() => {\n\t\tterminal.write('\\u001B[?25h');\n\t}, {alwaysLast: true});\n}) : () => {};\n\nexport default restoreCursor;\n","import process from 'node:process';\nimport restoreCursor from 'restore-cursor';\n\nlet isHidden = false;\n\nconst cliCursor = {};\n\ncliCursor.show = (writableStream = process.stderr) => {\n\tif (!writableStream.isTTY) {\n\t\treturn;\n\t}\n\n\tisHidden = false;\n\twritableStream.write('\\u001B[?25h');\n};\n\ncliCursor.hide = (writableStream = process.stderr) => {\n\tif (!writableStream.isTTY) {\n\t\treturn;\n\t}\n\n\trestoreCursor();\n\tisHidden = true;\n\twritableStream.write('\\u001B[?25l');\n};\n\ncliCursor.toggle = (force, writableStream) => {\n\tif (force !== undefined) {\n\t\tisHidden = force;\n\t}\n\n\tif (isHidden) {\n\t\tcliCursor.show(writableStream);\n\t} else {\n\t\tcliCursor.hide(writableStream);\n\t}\n};\n\nexport default cliCursor;\n","","import spinners from './spinners.json' with {type: 'json'};\n\nexport default spinners;\n\nconst spinnersList = Object.keys(spinners);\n\nexport function randomSpinner() {\n\tconst randomIndex = Math.floor(Math.random() * spinnersList.length);\n\tconst spinnerName = spinnersList[randomIndex];\n\treturn spinners[spinnerName];\n}\n","import tty from 'node:tty';\n\n// eslint-disable-next-line no-warning-comments\n// TODO: Use a better method when it's added to Node.js (https://github.com/nodejs/node/pull/40240)\n// Lots of optionals here to support Deno.\nconst hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;\n\nconst format = (open, close) => {\n\tif (!hasColors) {\n\t\treturn input => input;\n\t}\n\n\tconst openCode = `\\u001B[${open}m`;\n\tconst closeCode = `\\u001B[${close}m`;\n\n\treturn input => {\n\t\tconst string = input + ''; // eslint-disable-line no-implicit-coercion -- This is faster.\n\t\tlet index = string.indexOf(closeCode);\n\n\t\tif (index === -1) {\n\t\t\t// Note: Intentionally not using string interpolation for performance reasons.\n\t\t\treturn openCode + string + closeCode;\n\t\t}\n\n\t\t// Handle nested colors.\n\n\t\t// We could have done this, but it's too slow (as of Node.js 22).\n\t\t// return openCode + string.replaceAll(closeCode, (close === 22 ? closeCode : '') + openCode) + closeCode;\n\n\t\tlet result = openCode;\n\t\tlet lastIndex = 0;\n\n\t\t// SGR 22 resets both bold (1) and dim (2). When we encounter a nested\n\t\t// close for styles that use 22, we need to re-open the outer style.\n\t\tconst reopenOnNestedClose = close === 22;\n\t\tconst replaceCode = (reopenOnNestedClose ? closeCode : '') + openCode;\n\n\t\twhile (index !== -1) {\n\t\t\tresult += string.slice(lastIndex, index) + replaceCode;\n\t\t\tlastIndex = index + closeCode.length;\n\t\t\tindex = string.indexOf(closeCode, lastIndex);\n\t\t}\n\n\t\tresult += string.slice(lastIndex) + closeCode;\n\n\t\treturn result;\n\t};\n};\n\nexport const reset = format(0, 0);\nexport const bold = format(1, 22);\nexport const dim = format(2, 22);\nexport const italic = format(3, 23);\nexport const underline = format(4, 24);\n// Extended underline styles (`SGR 4:x` sub-parameters).\nexport const underlineDouble = format('4:2', 24);\nexport const underlineCurly = format('4:3', 24);\nexport const underlineDotted = format('4:4', 24);\nexport const underlineDashed = format('4:5', 24);\nexport const overline = format(53, 55);\nexport const inverse = format(7, 27);\nexport const hidden = format(8, 28);\nexport const strikethrough = format(9, 29);\n\nexport const black = format(30, 39);\nexport const red = format(31, 39);\nexport const green = format(32, 39);\nexport const yellow = format(33, 39);\nexport const blue = format(34, 39);\nexport const magenta = format(35, 39);\nexport const cyan = format(36, 39);\nexport const white = format(37, 39);\nexport const gray = format(90, 39);\n\nexport const bgBlack = format(40, 49);\nexport const bgRed = format(41, 49);\nexport const bgGreen = format(42, 49);\nexport const bgYellow = format(43, 49);\nexport const bgBlue = format(44, 49);\nexport const bgMagenta = format(45, 49);\nexport const bgCyan = format(46, 49);\nexport const bgWhite = format(47, 49);\nexport const bgGray = format(100, 49);\n\nexport const redBright = format(91, 39);\nexport const greenBright = format(92, 39);\nexport const yellowBright = format(93, 39);\nexport const blueBright = format(94, 39);\nexport const magentaBright = format(95, 39);\nexport const cyanBright = format(96, 39);\nexport const whiteBright = format(97, 39);\n\nexport const bgRedBright = format(101, 49);\nexport const bgGreenBright = format(102, 49);\nexport const bgYellowBright = format(103, 49);\nexport const bgBlueBright = format(104, 49);\nexport const bgMagentaBright = format(105, 49);\nexport const bgCyanBright = format(106, 49);\nexport const bgWhiteBright = format(107, 49);\n\n// Underline color (`SGR 58`/`59`). It has no basic 16-color form, so the palette index is used.\nexport const underlineBlack = format('58;5;0', 59);\nexport const underlineRed = format('58;5;1', 59);\nexport const underlineGreen = format('58;5;2', 59);\nexport const underlineYellow = format('58;5;3', 59);\nexport const underlineBlue = format('58;5;4', 59);\nexport const underlineMagenta = format('58;5;5', 59);\nexport const underlineCyan = format('58;5;6', 59);\nexport const underlineWhite = format('58;5;7', 59);\nexport const underlineGray = format('58;5;8', 59);\n\nexport const underlineRedBright = format('58;5;9', 59);\nexport const underlineGreenBright = format('58;5;10', 59);\nexport const underlineYellowBright = format('58;5;11', 59);\nexport const underlineBlueBright = format('58;5;12', 59);\nexport const underlineMagentaBright = format('58;5;13', 59);\nexport const underlineCyanBright = format('58;5;14', 59);\nexport const underlineWhiteBright = format('58;5;15', 59);\n","import process from 'node:process';\n\nexport default function isUnicodeSupported() {\n\tconst {env} = process;\n\tconst {TERM, TERM_PROGRAM} = env;\n\n\tif (process.platform !== 'win32') {\n\t\treturn TERM !== 'linux'; // Linux console (kernel)\n\t}\n\n\treturn Boolean(env.WT_SESSION) // Windows Terminal\n\t\t|| Boolean(env.TERMINUS_SUBLIME) // Terminus (<0.2.27)\n\t\t|| env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder\n\t\t|| TERM_PROGRAM === 'Terminus-Sublime'\n\t\t|| TERM_PROGRAM === 'vscode'\n\t\t|| TERM === 'xterm-256color'\n\t\t|| TERM === 'alacritty'\n\t\t|| TERM === 'rxvt-unicode'\n\t\t|| TERM === 'rxvt-unicode-256color'\n\t\t|| env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';\n}\n","import {\n\tblue,\n\tgreen,\n\tyellow,\n\tred,\n} from 'yoctocolors';\nimport isUnicodeSupported from 'is-unicode-supported';\n\nconst _isUnicodeSupported = isUnicodeSupported();\n\nexport const info = blue(_isUnicodeSupported ? 'ℹ' : 'i');\nexport const success = green(_isUnicodeSupported ? '✔' : '√');\nexport const warning = yellow(_isUnicodeSupported ? '⚠' : '‼');\nexport const error = red(_isUnicodeSupported ? '✖' : '×');\n","import stripAnsi from 'strip-ansi';\nimport {eastAsianWidth} from 'get-east-asian-width';\n\n/**\nLogic:\n- Segment graphemes to match how terminals render clusters.\n- Width rules:\n\t1. Skip non-printing clusters (Default_Ignorable, Control, pure nonspacing/enclosing Mark, lone Surrogates). Tabs are ignored by design.\n\t2. RGI emoji clusters (\\p{RGI_Emoji}) are double-width.\n\t3. Minimally-qualified/unqualified emoji clusters (ZWJ sequences with 2+ Extended_Pictographic, or keycap sequences) are double-width.\n\t4. Hangul jamo collapse each standard modern Hangul L+V or L+V+T syllable piece to width 2.\n\t Unmatched repeated leading/vowel/trailing jamo stay additive because that matches how the terminals we target render them.\n\t5. Otherwise use East Asian Width of the cluster's first visible code point, and add widths for trailing spacing marks and Halfwidth/Fullwidth Forms within the same cluster (e.g., dakuten/handakuten/prolonged sound mark).\n*/\n\nconst segmenter = new Intl.Segmenter();\n\n// Whole-cluster zero-width\nconst zeroWidthClusterRegex = /^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Nonspacing_Mark}|\\p{Enclosing_Mark}|\\p{Surrogate})+$/v;\n\n// Pick the base scalar if the cluster starts with Prepend/Format/Marks\nconst leadingNonPrintingRegex = /^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Nonspacing_Mark}\\p{Enclosing_Mark}\\p{Surrogate}]+/v;\nconst spacingMarkRegex = /\\p{Spacing_Mark}/v;\n\n// RGI emoji sequences\nconst rgiEmojiRegex = /^\\p{RGI_Emoji}$/v;\n\n// Detect minimally-qualified/unqualified emoji sequences (missing VS16 but still render as double-width)\nconst unqualifiedKeycapRegex = /^[\\d#*]\\u20E3$/;\nconst extendedPictographicRegex = /\\p{Extended_Pictographic}/gu;\n\nfunction isDoubleWidthNonRgiEmojiSequence(segment) {\n\t// Real emoji clusters are < 30 chars; guard against pathological input\n\tif (segment.length > 50) {\n\t\treturn false;\n\t}\n\n\tif (unqualifiedKeycapRegex.test(segment)) {\n\t\treturn true;\n\t}\n\n\t// ZWJ sequences with 2+ Extended_Pictographic\n\tif (segment.includes('\\u200D')) {\n\t\tconst pictographics = segment.match(extendedPictographicRegex);\n\t\treturn pictographics !== null && pictographics.length >= 2;\n\t}\n\n\treturn false;\n}\n\nfunction baseVisible(segment) {\n\treturn segment.replace(leadingNonPrintingRegex, '');\n}\n\nfunction isZeroWidthCluster(segment) {\n\treturn zeroWidthClusterRegex.test(segment);\n}\n\nfunction isHangulLeadingJamo(codePoint) {\n\treturn (codePoint >= 0x11_00 && codePoint <= 0x11_5F)\n\t\t|| (codePoint >= 0xA9_60 && codePoint <= 0xA9_7C);\n}\n\nfunction isHangulVowelJamo(codePoint) {\n\treturn (codePoint >= 0x11_60 && codePoint <= 0x11_A7)\n\t\t|| (codePoint >= 0xD7_B0 && codePoint <= 0xD7_C6);\n}\n\nfunction isHangulTrailingJamo(codePoint) {\n\treturn (codePoint >= 0x11_A8 && codePoint <= 0x11_FF)\n\t\t|| (codePoint >= 0xD7_CB && codePoint <= 0xD7_FB);\n}\n\nfunction isHangulJamo(codePoint) {\n\treturn isHangulLeadingJamo(codePoint)\n\t\t|| isHangulVowelJamo(codePoint)\n\t\t|| isHangulTrailingJamo(codePoint);\n}\n\nfunction hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {\n\tconst codePoints = [];\n\n\tfor (const character of visibleSegment) {\n\t\tif (zeroWidthClusterRegex.test(character)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tcodePoints.push(character.codePointAt(0));\n\t}\n\n\tif (codePoints.length === 0) {\n\t\treturn undefined;\n\t}\n\n\tlet width = 0;\n\n\tfor (let index = 0; index < codePoints.length; index++) {\n\t\tconst codePoint = codePoints[index];\n\t\tif (!isHangulJamo(codePoint)) {\n\t\t\tif (width === 0) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\t// Mixed cluster (e.g., L + precomposed syllable): use EAW for non-jamo remainder\n\t\t\tfor (let remaining = index; remaining < codePoints.length; remaining++) {\n\t\t\t\twidth += eastAsianWidth(codePoints[remaining], eastAsianWidthOptions);\n\t\t\t}\n\n\t\t\treturn width;\n\t\t}\n\n\t\t// Modern Hangul L+V(+T) shapes as one syllable block. Unmatched jamo stay additive:\n\t\t// U+1100 U+1100 U+1161 => U+1100 + (U+1100 U+1161) => 2 + 2.\n\t\tif (\n\t\t\tisHangulLeadingJamo(codePoint)\n\t\t\t&& isHangulVowelJamo(codePoints[index + 1])\n\t\t) {\n\t\t\twidth += 2;\n\t\t\tindex += isHangulTrailingJamo(codePoints[index + 2]) ? 2 : 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\twidth += eastAsianWidth(codePoint, eastAsianWidthOptions);\n\t}\n\n\treturn width;\n}\n\nfunction trailingWidth(visibleSegment, eastAsianWidthOptions) {\n\tlet extra = 0;\n\tlet first = true;\n\n\tfor (const character of visibleSegment) {\n\t\tif (first) {\n\t\t\tfirst = false;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (\n\t\t\tspacingMarkRegex.test(character)\n\t\t\t|| (character >= '\\uFF00' && character <= '\\uFFEF')\n\t\t) {\n\t\t\textra += eastAsianWidth(character.codePointAt(0), eastAsianWidthOptions);\n\t\t}\n\t}\n\n\treturn extra;\n}\n\nexport default function stringWidth(input, options = {}) {\n\tif (typeof input !== 'string' || input.length === 0) {\n\t\treturn 0;\n\t}\n\n\tconst {\n\t\tambiguousIsNarrow = true,\n\t\tcountAnsiEscapeCodes = false,\n\t} = options;\n\n\tlet string = input;\n\n\t// Avoid calling stripAnsi when there are no ANSI escape sequences (ESC = 0x1B, CSI = 0x9B)\n\tif (!countAnsiEscapeCodes && (string.includes('\\u001B') || string.includes('\\u009B'))) {\n\t\tstring = stripAnsi(string);\n\t}\n\n\tif (string.length === 0) {\n\t\treturn 0;\n\t}\n\n\t// Fast path: printable ASCII (0x20–0x7E) needs no segmenter, regex, or EAW lookup — width equals length.\n\tif (/^[\\u0020-\\u007E]*$/.test(string)) {\n\t\treturn string.length;\n\t}\n\n\tlet width = 0;\n\tconst eastAsianWidthOptions = {ambiguousAsWide: !ambiguousIsNarrow};\n\n\tfor (const {segment} of segmenter.segment(string)) {\n\t\t// Zero-width / non-printing clusters\n\t\tif (isZeroWidthCluster(segment)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Emoji width logic\n\t\tif (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {\n\t\t\twidth += 2;\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst visibleSegment = baseVisible(segment);\n\t\tconst hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);\n\t\tif (hangulWidth !== undefined) {\n\t\t\twidth += hangulWidth;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Everything else: EAW of the cluster’s first visible scalar\n\t\tconst codePoint = visibleSegment.codePointAt(0);\n\t\twidth += eastAsianWidth(codePoint, eastAsianWidthOptions);\n\n\t\t// Add width for trailing spacing marks and Halfwidth/Fullwidth Forms (e.g., ゙, ゚, ー)\n\t\twidth += trailingWidth(visibleSegment, eastAsianWidthOptions);\n\t}\n\n\treturn width;\n}\n","export default function isInteractive({stream = process.stdout} = {}) {\n\treturn Boolean(\n\t\tstream && stream.isTTY &&\n\t\tprocess.env.TERM !== 'dumb' &&\n\t\t!('CI' in process.env)\n\t);\n}\n","import process from 'node:process';\n\nconst ASCII_ETX_CODE = 0x03; // Ctrl+C\n\nclass StdinDiscarder {\n\t#activeCount = 0;\n\t#stdin;\n\t#stdinWasPaused = false;\n\t#stdinWasRaw = false;\n\t#handleInputBound = chunk => {\n\t\tif (!chunk?.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst code = typeof chunk === 'string' ? chunk.codePointAt(0) : chunk[0];\n\t\tif (code === ASCII_ETX_CODE) {\n\t\t\t// Always re-signal the process. Emitting `SIGINT` directly breaks normal Ctrl+C termination when libraries install listeners for cleanup.\n\t\t\tprocess.kill(process.pid, 'SIGINT');\n\t\t}\n\t};\n\n\tstart() {\n\t\tthis.#activeCount++;\n\t\tif (this.#activeCount === 1) {\n\t\t\tthis.#realStart();\n\t\t}\n\t}\n\n\tstop() {\n\t\tif (this.#activeCount === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (--this.#activeCount === 0) {\n\t\t\tthis.#realStop();\n\t\t}\n\t}\n\n\t#realStart() {\n\t\tconst {stdin} = process;\n\n\t\tif (process.platform === 'win32' || !stdin?.isTTY || typeof stdin.setRawMode !== 'function') {\n\t\t\tthis.#stdin = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#stdin = stdin;\n\t\tthis.#stdinWasPaused = stdin.isPaused();\n\t\tthis.#stdinWasRaw = Boolean(stdin.isRaw);\n\n\t\tstdin.setRawMode(true);\n\t\tstdin.prependListener('data', this.#handleInputBound);\n\n\t\tif (this.#stdinWasPaused) {\n\t\t\tstdin.resume();\n\t\t}\n\t}\n\n\t#realStop() {\n\t\tif (!this.#stdin) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst stdin = this.#stdin;\n\n\t\tstdin.off('data', this.#handleInputBound);\n\n\t\tif (stdin.isTTY) {\n\t\t\tstdin.setRawMode?.(this.#stdinWasRaw);\n\t\t}\n\n\t\tif (this.#stdinWasPaused) {\n\t\t\tstdin.pause();\n\t\t}\n\n\t\tthis.#stdin = undefined;\n\t\tthis.#stdinWasPaused = false;\n\t\tthis.#stdinWasRaw = false;\n\t}\n}\n\nconst stdinDiscarder = new StdinDiscarder();\n\nexport default Object.freeze(stdinDiscarder);\n","import process from 'node:process';\nimport {stripVTControlCharacters} from 'node:util';\nimport chalk from 'chalk';\nimport cliCursor from 'cli-cursor';\nimport cliSpinners from 'cli-spinners';\nimport logSymbols from 'log-symbols';\nimport stringWidth from 'string-width';\nimport isInteractive from 'is-interactive';\nimport isUnicodeSupported from 'is-unicode-supported';\nimport stdinDiscarder from 'stdin-discarder';\n\n// Constants\nconst RENDER_DEFERRAL_TIMEOUT = 200; // Milliseconds to wait before re-rendering after partial chunk write\nconst SYNCHRONIZED_OUTPUT_ENABLE = '\\u001B[?2026h';\nconst SYNCHRONIZED_OUTPUT_DISABLE = '\\u001B[?2026l';\n\n// Global state for concurrent spinner detection\nconst activeHooksPerStream = new Map(); // Stream → ora instance\n\nconst validColors = new Set(['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'gray']);\n\nclass Ora {\n\t#linesToClear = 0;\n\t#frameIndex = -1;\n\t#lastFrameTime = 0;\n\t#options;\n\t#spinner;\n\t#stream;\n\t#id;\n\t#hookedStreams = new Map();\n\t#isInternalWrite = false;\n\t#drainHandler;\n\t#deferRenderTimer;\n\t#isDiscardingStdin = false;\n\t#color;\n\n\t// Helper to execute writes while preventing hook recursion\n\t#internalWrite(fn) {\n\t\tthis.#isInternalWrite = true;\n\t\ttry {\n\t\t\treturn fn();\n\t\t} finally {\n\t\t\tthis.#isInternalWrite = false;\n\t\t}\n\t}\n\n\t// Helper to render if still spinning\n\t#tryRender() {\n\t\tif (this.isSpinning) {\n\t\t\tthis.render();\n\t\t}\n\t}\n\n\t#stringifyChunk(chunk, encoding) {\n\t\tif (chunk === undefined || chunk === null) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (typeof chunk === 'string') {\n\t\t\treturn chunk;\n\t\t}\n\n\t\t/* eslint-disable n/prefer-global/buffer */\n\t\tif (Buffer.isBuffer(chunk) || ArrayBuffer.isView(chunk)) {\n\t\t\tconst normalizedEncoding = (typeof encoding === 'string' && encoding && encoding !== 'buffer') ? encoding : 'utf8';\n\t\t\treturn Buffer.from(chunk).toString(normalizedEncoding);\n\t\t}\n\t\t/* eslint-enable n/prefer-global/buffer */\n\n\t\treturn String(chunk);\n\t}\n\n\t#chunkTerminatesLine(chunkString) {\n\t\tif (!chunkString) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst lastCharacter = chunkString.at(-1);\n\t\treturn lastCharacter === '\\n' || lastCharacter === '\\r';\n\t}\n\n\t#scheduleRenderDeferral() {\n\t\t// If already deferred, don't reset timer - let it complete\n\t\tif (this.#deferRenderTimer) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#deferRenderTimer = setTimeout(() => {\n\t\t\tthis.#deferRenderTimer = undefined;\n\n\t\t\tif (this.isSpinning) {\n\t\t\t\tthis.#tryRender();\n\t\t\t}\n\t\t}, RENDER_DEFERRAL_TIMEOUT);\n\n\t\tif (typeof this.#deferRenderTimer?.unref === 'function') {\n\t\t\tthis.#deferRenderTimer.unref();\n\t\t}\n\t}\n\n\t#clearRenderDeferral() {\n\t\tif (this.#deferRenderTimer) {\n\t\t\tclearTimeout(this.#deferRenderTimer);\n\t\t\tthis.#deferRenderTimer = undefined;\n\t\t}\n\t}\n\n\t// Helper to build complete line with symbol, text, prefix, and suffix\n\t#buildOutputLine(symbol, text, prefixText, suffixText) {\n\t\tconst fullPrefixText = this.#getFullPrefixText(prefixText, ' ');\n\t\tconst separatorText = symbol ? ' ' : '';\n\t\tconst fullText = (typeof text === 'string') ? separatorText + text : '';\n\t\tconst fullSuffixText = this.#getFullSuffixText(suffixText, ' ');\n\t\treturn fullPrefixText + symbol + fullText + fullSuffixText;\n\t}\n\n\tconstructor(options) {\n\t\tif (typeof options === 'string') {\n\t\t\toptions = {\n\t\t\t\ttext: options,\n\t\t\t};\n\t\t}\n\n\t\tthis.#options = {\n\t\t\tcolor: 'cyan',\n\t\t\tstream: process.stderr,\n\t\t\tdiscardStdin: true,\n\t\t\thideCursor: true,\n\t\t\t...options,\n\t\t};\n\n\t\t// Public\n\t\tthis.color = this.#options.color;\n\n\t\tthis.#stream = this.#options.stream;\n\n\t\t// Normalize isEnabled and isSilent into options\n\t\tif (typeof this.#options.isEnabled !== 'boolean') {\n\t\t\tthis.#options.isEnabled = isInteractive({stream: this.#stream});\n\t\t}\n\n\t\tif (typeof this.#options.isSilent !== 'boolean') {\n\t\t\tthis.#options.isSilent = false;\n\t\t}\n\n\t\tif (this.#options.interval !== undefined && !(Number.isInteger(this.#options.interval) && this.#options.interval > 0)) {\n\t\t\tthrow new Error('The `interval` option must be a positive integer');\n\t\t}\n\n\t\t// Set *after* `this.#stream`.\n\t\t// Store original interval before spinner setter clears it\n\t\tconst userInterval = this.#options.interval;\n\t\t// It's important that these use the public setters.\n\t\tthis.spinner = this.#options.spinner;\n\t\tthis.#options.interval = userInterval;\n\t\tthis.text = this.#options.text;\n\t\tthis.prefixText = this.#options.prefixText;\n\t\tthis.suffixText = this.#options.suffixText;\n\t\tthis.indent = this.#options.indent;\n\n\t\tif (process.env.NODE_ENV === 'test') {\n\t\t\tthis._stream = this.#stream;\n\t\t\tthis._isEnabled = this.#options.isEnabled;\n\n\t\t\tObject.defineProperty(this, '_linesToClear', {\n\t\t\t\tget() {\n\t\t\t\t\treturn this.#linesToClear;\n\t\t\t\t},\n\t\t\t\tset(newValue) {\n\t\t\t\t\tthis.#linesToClear = newValue;\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tObject.defineProperty(this, '_frameIndex', {\n\t\t\t\tget() {\n\t\t\t\t\treturn this.#frameIndex;\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tObject.defineProperty(this, '_lineCount', {\n\t\t\t\tget() {\n\t\t\t\t\tconst columns = this.#stream.columns ?? 80;\n\t\t\t\t\tconst prefixText = typeof this.#options.prefixText === 'function' ? '' : this.#options.prefixText;\n\t\t\t\t\tconst suffixText = typeof this.#options.suffixText === 'function' ? '' : this.#options.suffixText;\n\t\t\t\t\tconst fullPrefixText = (typeof prefixText === 'string' && prefixText !== '') ? prefixText + ' ' : '';\n\t\t\t\t\tconst fullSuffixText = (typeof suffixText === 'string' && suffixText !== '') ? ' ' + suffixText : '';\n\t\t\t\t\tconst spinnerChar = '-';\n\t\t\t\t\tconst fullText = ' '.repeat(this.#options.indent) + fullPrefixText + spinnerChar + (typeof this.#options.text === 'string' ? ' ' + this.#options.text : '') + fullSuffixText;\n\t\t\t\t\treturn this.#computeLineCountFrom(fullText, columns);\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\tget indent() {\n\t\treturn this.#options.indent;\n\t}\n\n\tset indent(indent = 0) {\n\t\tif (!(indent >= 0 && Number.isInteger(indent))) {\n\t\t\tthrow new Error('The `indent` option must be an integer from 0 and up');\n\t\t}\n\n\t\tthis.#options.indent = indent;\n\t}\n\n\tget interval() {\n\t\treturn this.#options.interval ?? this.#spinner.interval ?? 100;\n\t}\n\n\tget spinner() {\n\t\treturn this.#spinner;\n\t}\n\n\tset spinner(spinner) {\n\t\tthis.#frameIndex = -1;\n\t\tthis.#options.interval = undefined;\n\n\t\tif (typeof spinner === 'object') {\n\t\t\tif (!Array.isArray(spinner.frames) || spinner.frames.length === 0 || spinner.frames.some(frame => typeof frame !== 'string')) {\n\t\t\t\tthrow new Error('The given spinner must have a non-empty `frames` array of strings');\n\t\t\t}\n\n\t\t\tif (spinner.interval !== undefined && !(Number.isInteger(spinner.interval) && spinner.interval > 0)) {\n\t\t\t\tthrow new Error('`spinner.interval` must be a positive integer if provided');\n\t\t\t}\n\n\t\t\tthis.#spinner = spinner;\n\t\t} else if (!isUnicodeSupported()) {\n\t\t\tthis.#spinner = cliSpinners.line;\n\t\t} else if (spinner === undefined) {\n\t\t\t// Set default spinner\n\t\t\tthis.#spinner = cliSpinners.dots;\n\t\t} else if (spinner !== 'default' && cliSpinners[spinner]) {\n\t\t\tthis.#spinner = cliSpinners[spinner];\n\t\t} else {\n\t\t\tthrow new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);\n\t\t}\n\t}\n\n\tget text() {\n\t\treturn this.#options.text;\n\t}\n\n\tset text(value = '') {\n\t\tthis.#options.text = value;\n\t}\n\n\tget prefixText() {\n\t\treturn this.#options.prefixText;\n\t}\n\n\tset prefixText(value = '') {\n\t\tthis.#options.prefixText = value;\n\t}\n\n\tget suffixText() {\n\t\treturn this.#options.suffixText;\n\t}\n\n\tset suffixText(value = '') {\n\t\tthis.#options.suffixText = value;\n\t}\n\n\tget isSpinning() {\n\t\treturn this.#id !== undefined;\n\t}\n\n\t#formatAffix(value, separator, placeBefore = false) {\n\t\tconst resolved = typeof value === 'function' ? value() : value;\n\t\tif (typeof resolved === 'string' && resolved !== '') {\n\t\t\treturn placeBefore ? (separator + resolved) : (resolved + separator);\n\t\t}\n\n\t\treturn '';\n\t}\n\n\t#getFullPrefixText(prefixText = this.#options.prefixText, postfix = ' ') {\n\t\treturn this.#formatAffix(prefixText, postfix, false);\n\t}\n\n\t#getFullSuffixText(suffixText = this.#options.suffixText, prefix = ' ') {\n\t\treturn this.#formatAffix(suffixText, prefix, true);\n\t}\n\n\t#computeLineCountFrom(text, columns) {\n\t\tlet count = 0;\n\t\tfor (const line of stripVTControlCharacters(text).split('\\n')) {\n\t\t\tcount += Math.max(1, Math.ceil(stringWidth(line) / columns));\n\t\t}\n\n\t\treturn count;\n\t}\n\n\tget color() {\n\t\treturn this.#color;\n\t}\n\n\tset color(value) {\n\t\tif (value !== undefined && value !== false && !validColors.has(value)) {\n\t\t\tthrow new Error('The `color` option must be a valid color or `false` to disable');\n\t\t}\n\n\t\tthis.#color = value;\n\t}\n\n\tget isEnabled() {\n\t\treturn this.#options.isEnabled && !this.#options.isSilent;\n\t}\n\n\tset isEnabled(value) {\n\t\tif (typeof value !== 'boolean') {\n\t\t\tthrow new TypeError('The `isEnabled` option must be a boolean');\n\t\t}\n\n\t\tthis.#options.isEnabled = value;\n\t}\n\n\tget isSilent() {\n\t\treturn this.#options.isSilent;\n\t}\n\n\tset isSilent(value) {\n\t\tif (typeof value !== 'boolean') {\n\t\t\tthrow new TypeError('The `isSilent` option must be a boolean');\n\t\t}\n\n\t\tthis.#options.isSilent = value;\n\t}\n\n\tframe() {\n\t\t// Only advance frame if enough time has passed (throttle to interval)\n\t\tconst now = Date.now();\n\t\tif (this.#frameIndex === -1 || now - this.#lastFrameTime >= this.interval) {\n\t\t\tthis.#frameIndex = (this.#frameIndex + 1) % this.#spinner.frames.length;\n\t\t\tthis.#lastFrameTime = now;\n\t\t}\n\n\t\tconst {frames} = this.#spinner;\n\t\tlet frame = frames[this.#frameIndex];\n\n\t\tif (this.#color) {\n\t\t\tframe = chalk[this.#color](frame);\n\t\t}\n\n\t\tconst fullPrefixText = this.#getFullPrefixText(this.#options.prefixText, ' ');\n\t\tconst fullText = typeof this.text === 'string' ? ' ' + this.text : '';\n\t\tconst fullSuffixText = this.#getFullSuffixText(this.#options.suffixText, ' ');\n\n\t\treturn fullPrefixText + frame + fullText + fullSuffixText;\n\t}\n\n\tclear() {\n\t\tif (!this.isEnabled || !this.#stream.isTTY) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Protect cursor control methods (cursorTo, moveCursor, clearLine) which internally call stream.write\n\t\tthis.#internalWrite(() => {\n\t\t\tthis.#stream.cursorTo(0);\n\n\t\t\tfor (let index = 0; index < this.#linesToClear; index++) {\n\t\t\t\tif (index > 0) {\n\t\t\t\t\tthis.#stream.moveCursor(0, -1);\n\t\t\t\t}\n\n\t\t\t\tthis.#stream.clearLine(1);\n\t\t\t}\n\n\t\t\tif (this.#options.indent) {\n\t\t\t\tthis.#stream.cursorTo(this.#options.indent);\n\t\t\t}\n\t\t});\n\n\t\tthis.#linesToClear = 0;\n\n\t\treturn this;\n\t}\n\n\t// Helper to hook a single stream\n\t#hookStream(stream) {\n\t\tif (!stream || this.#hookedStreams.has(stream) || !stream.isTTY || typeof stream.write !== 'function') {\n\t\t\treturn;\n\t\t}\n\n\t\t// Detect concurrent spinners\n\t\tif (activeHooksPerStream.has(stream)) {\n\t\t\tconsole.warn('[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.');\n\t\t}\n\n\t\tconst originalWrite = stream.write;\n\t\tthis.#hookedStreams.set(stream, originalWrite);\n\t\tactiveHooksPerStream.set(stream, this);\n\t\tstream.write = (chunk, encoding, callback) => this.#hookedWrite(stream, originalWrite, chunk, encoding, callback);\n\t}\n\n\t/**\n\tIntercept stream writes while spinner is active to handle external writes cleanly without visual corruption.\n\tHooks process stdio streams and the active spinner stream so console.log(), console.error(), and direct writes stay tidy.\n\t*/\n\t#installHook() {\n\t\tif (!this.isEnabled || this.#hookedStreams.size > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst streamsToHook = new Set([this.#stream, process.stdout, process.stderr]);\n\n\t\tfor (const stream of streamsToHook) {\n\t\t\tthis.#hookStream(stream);\n\t\t}\n\t}\n\n\t#uninstallHook() {\n\t\tfor (const [stream, originalWrite] of this.#hookedStreams) {\n\t\t\tstream.write = originalWrite;\n\t\t\tif (activeHooksPerStream.get(stream) === this) {\n\t\t\t\tactiveHooksPerStream.delete(stream);\n\t\t\t}\n\t\t}\n\n\t\tthis.#hookedStreams.clear();\n\t}\n\n\t// eslint-disable-next-line max-params -- Need stream and originalWrite for multi-stream support\n\t#hookedWrite(stream, originalWrite, chunk, encoding, callback) {\n\t\t// Handle both write(chunk, encoding, callback) and write(chunk, callback) signatures\n\t\tif (typeof encoding === 'function') {\n\t\t\tcallback = encoding;\n\t\t\tencoding = undefined;\n\t\t}\n\n\t\t// Pass through our own internal writes (spinner rendering, cursor control)\n\t\tif (this.#isInternalWrite) {\n\t\t\treturn originalWrite.call(stream, chunk, encoding, callback);\n\t\t}\n\n\t\t// External write detected - clear spinner, write content, re-render if appropriate\n\t\tthis.clear();\n\n\t\tconst chunkString = this.#stringifyChunk(chunk, encoding);\n\t\tconst chunkTerminatesLine = this.#chunkTerminatesLine(chunkString);\n\n\t\tconst writeResult = originalWrite.call(stream, chunk, encoding, callback);\n\n\t\t// Schedule or clear render deferral based on chunk content\n\t\tif (chunkTerminatesLine) {\n\t\t\tthis.#clearRenderDeferral();\n\t\t} else if (chunkString.length > 0) {\n\t\t\tthis.#scheduleRenderDeferral();\n\t\t}\n\n\t\t// Re-render spinner below the new output if still spinning and not deferred\n\t\tif (this.isSpinning && !this.#deferRenderTimer) {\n\t\t\tthis.render();\n\t\t}\n\n\t\treturn writeResult;\n\t}\n\n\trender() {\n\t\tif (!this.isEnabled || this.#drainHandler || this.#deferRenderTimer) {\n\t\t\treturn this;\n\t\t}\n\n\t\tconst useSynchronizedOutput = this.#stream.isTTY;\n\t\tlet shouldDisableSynchronizedOutput = false;\n\n\t\ttry {\n\t\t\tif (useSynchronizedOutput) {\n\t\t\t\tthis.#internalWrite(() => this.#stream.write(SYNCHRONIZED_OUTPUT_ENABLE));\n\t\t\t\tshouldDisableSynchronizedOutput = true;\n\t\t\t}\n\n\t\t\tthis.clear();\n\n\t\t\tlet frameContent = this.frame();\n\t\t\tconst columns = this.#stream.columns ?? 80;\n\t\t\tconst actualLineCount = this.#computeLineCountFrom(frameContent, columns);\n\n\t\t\t// If content would exceed viewport height, truncate it to prevent garbage\n\t\t\tconst consoleHeight = this.#stream.rows;\n\t\t\tif (consoleHeight && consoleHeight > 1 && actualLineCount > consoleHeight) {\n\t\t\t\tconst lines = frameContent.split('\\n');\n\t\t\t\tconst maxLines = consoleHeight - 1; // Reserve one line for truncation message\n\t\t\t\tframeContent = [...lines.slice(0, maxLines), '... (content truncated to fit terminal)'].join('\\n');\n\t\t\t}\n\n\t\t\tconst canContinue = this.#internalWrite(() => this.#stream.write(frameContent));\n\n\t\t\t// Handle backpressure - pause rendering if stream buffer is full\n\t\t\tif (canContinue === false && this.#stream.isTTY) {\n\t\t\t\tthis.#drainHandler = () => {\n\t\t\t\t\tthis.#drainHandler = undefined;\n\t\t\t\t\tthis.#tryRender();\n\t\t\t\t};\n\n\t\t\t\tthis.#stream.once('drain', this.#drainHandler);\n\t\t\t}\n\n\t\t\tthis.#linesToClear = this.#computeLineCountFrom(frameContent, columns);\n\t\t} finally {\n\t\t\tif (shouldDisableSynchronizedOutput) {\n\t\t\t\tthis.#internalWrite(() => this.#stream.write(SYNCHRONIZED_OUTPUT_DISABLE));\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tstart(text) {\n\t\tif (text !== undefined) {\n\t\t\tthis.text = text;\n\t\t}\n\n\t\tif (this.isSilent) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif (!this.isEnabled) {\n\t\t\tconst symbol = this.text ? '-' : '';\n\t\t\tconst line = ' '.repeat(this.#options.indent) + this.#buildOutputLine(symbol, this.text, this.#options.prefixText, this.#options.suffixText);\n\n\t\t\tif (line.trim() !== '') {\n\t\t\t\tthis.#internalWrite(() => this.#stream.write(line + '\\n'));\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\n\t\tif (this.isSpinning) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif (this.#options.hideCursor) {\n\t\t\tcliCursor.hide(this.#stream);\n\t\t}\n\n\t\tif (this.#options.discardStdin && process.stdin.isTTY) {\n\t\t\tstdinDiscarder.start();\n\t\t\tthis.#isDiscardingStdin = true;\n\t\t}\n\n\t\tthis.#installHook();\n\t\tthis.render();\n\t\tthis.#id = setInterval(this.render.bind(this), this.interval);\n\n\t\treturn this;\n\t}\n\n\tstop() {\n\t\tclearInterval(this.#id);\n\t\tthis.#id = undefined;\n\t\tthis.#frameIndex = -1;\n\t\tthis.#lastFrameTime = 0;\n\n\t\tthis.#clearRenderDeferral();\n\t\tthis.#uninstallHook();\n\n\t\t// Clean up drain handler if it exists\n\t\tif (this.#drainHandler) {\n\t\t\tthis.#stream.removeListener('drain', this.#drainHandler);\n\t\t\tthis.#drainHandler = undefined;\n\t\t}\n\n\t\tif (this.isEnabled) {\n\t\t\tthis.clear();\n\t\t\tif (this.#options.hideCursor) {\n\t\t\t\tcliCursor.show(this.#stream);\n\t\t\t}\n\t\t}\n\n\t\tif (this.#isDiscardingStdin) {\n\t\t\tthis.#isDiscardingStdin = false;\n\t\t\tstdinDiscarder.stop();\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tsucceed(text) {\n\t\treturn this.stopAndPersist({symbol: logSymbols.success, text});\n\t}\n\n\tfail(text) {\n\t\treturn this.stopAndPersist({symbol: logSymbols.error, text});\n\t}\n\n\twarn(text) {\n\t\treturn this.stopAndPersist({symbol: logSymbols.warning, text});\n\t}\n\n\tinfo(text) {\n\t\treturn this.stopAndPersist({symbol: logSymbols.info, text});\n\t}\n\n\tstopAndPersist(options = {}) {\n\t\tif (this.isSilent) {\n\t\t\treturn this;\n\t\t}\n\n\t\tconst symbol = options.symbol ?? ' ';\n\t\tconst text = options.text ?? this.text;\n\t\tconst prefixText = options.prefixText ?? this.#options.prefixText;\n\t\tconst suffixText = options.suffixText ?? this.#options.suffixText;\n\n\t\tconst textToWrite = this.#buildOutputLine(symbol, text, prefixText, suffixText) + '\\n';\n\n\t\tthis.stop();\n\t\tthis.#internalWrite(() => this.#stream.write(textToWrite));\n\n\t\treturn this;\n\t}\n}\n\nexport default function ora(options) {\n\treturn new Ora(options);\n}\n\nexport async function oraPromise(action, options) {\n\tconst actionIsFunction = typeof action === 'function';\n\tconst actionIsPromise = typeof action?.then === 'function';\n\n\tif (!actionIsFunction && !actionIsPromise) {\n\t\tthrow new TypeError('Parameter `action` must be a Function or a Promise');\n\t}\n\n\tconst {\n\t\tsuccessText,\n\t\tfailText,\n\t\tsuccessSymbol,\n\t\tfailSymbol,\n\t} = (typeof options === 'object' && options !== null)\n\t\t? options\n\t\t: {};\n\n\tconst spinner = ora(options).start();\n\n\ttry {\n\t\tconst promise = actionIsFunction ? action(spinner) : action;\n\t\tconst result = await promise;\n\n\t\tconst text = successText === undefined\n\t\t\t? undefined\n\t\t\t: (typeof successText === 'string' ? successText : successText(result));\n\n\t\tif (successSymbol === undefined) {\n\t\t\tspinner.succeed(text);\n\t\t} else {\n\t\t\tspinner.stopAndPersist({symbol: successSymbol, text});\n\t\t}\n\n\t\treturn result;\n\t} catch (error) {\n\t\tconst text = failText === undefined\n\t\t\t? undefined\n\t\t\t: (typeof failText === 'string' ? failText : failText(error));\n\n\t\tif (failSymbol === undefined) {\n\t\t\tspinner.fail(text);\n\t\t} else {\n\t\t\tspinner.stopAndPersist({symbol: failSymbol, text});\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n\nexport {default as spinners} from 'cli-spinners';\n","import ora, { Ora } from 'ora';\nimport chalk from 'chalk';\n\n/**\n * Progress tracker for conversion stages\n */\nexport class ProgressTracker {\n private spinner: Ora | null = null;\n private startTime = 0;\n private verbose: boolean;\n\n constructor(verbose: boolean) {\n this.verbose = verbose;\n }\n\n /**\n * Start a new stage\n */\n startStage(message: string): void {\n this.startTime = Date.now();\n this.spinner = ora(message).start();\n }\n\n /**\n * Update the current stage message\n */\n updateStage(message: string): void {\n if (this.spinner) {\n this.spinner.text = message;\n }\n }\n\n /**\n * Complete the current stage successfully\n */\n succeedStage(message?: string): void {\n if (this.spinner) {\n const elapsed = this.getElapsed();\n const suffix = this.verbose ? chalk.dim(` (${elapsed})`) : '';\n\n this.spinner.succeed((message ?? this.spinner.text) + suffix);\n this.spinner = null;\n }\n }\n\n /**\n * Fail the current stage\n */\n failStage(message?: string): void {\n if (this.spinner) {\n this.spinner.fail(message);\n this.spinner = null;\n }\n }\n\n /**\n * Get elapsed time since stage start\n */\n private getElapsed(): string {\n const elapsed = Date.now() - this.startTime;\n\n if (elapsed < 1000) {\n return `${elapsed}ms`;\n }\n\n return `${(elapsed / 1000).toFixed(2)}s`;\n }\n\n /**\n * Clear the spinner without marking success/failure\n */\n clear(): void {\n if (this.spinner) {\n this.spinner.stop();\n this.spinner = null;\n }\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { input, select } from '@inquirer/prompts';\nimport type { QtiVersion, OutputFormat, DiagnosticsOutput, Diagnostic } from '@learnosity/converter-core';\nimport type { CliOptions, ConfigOptions, ResolvedOptions, ResolvedOptionsWithSources, ResolvedOptionWithSource } from './types.js';\nimport { expandTilde } from '../utils/pathUtils.js';\n\n/**\n * Resolve a single option with precedence and source tracking\n */\nfunction resolveOption<T>(cliValue: T | undefined, configValue: T | undefined, defaultValue: T): ResolvedOptionWithSource<T> {\n if (cliValue !== undefined) {\n return { value: cliValue, source: 'cli' };\n }\n if (configValue !== undefined) {\n return { value: configValue, source: 'config' };\n }\n\n return { value: defaultValue, source: 'default' };\n}\n\n/**\n * Resolve all options with precedence: CLI > config > defaults\n */\nexport async function resolveOptions(\n cliOpts: CliOptions,\n config: ConfigOptions | null,\n isPackageCommand: boolean,\n configPath: string | null\n): Promise<{ options: ResolvedOptions; diagnostics: Diagnostic[]; withSources: ResolvedOptionsWithSources }> {\n const diagnostics: Diagnostic[] = [];\n const interactive = cliOpts.interactive ?? false;\n\n // Input path\n let inputPath = cliOpts.in;\n\n if (!inputPath && interactive) {\n inputPath = await input({\n message: 'Input path (or \"-\" for stdin):',\n default: '-',\n });\n }\n if (!inputPath) {\n throw new Error('Input path is required. Use --in <path> or --interactive.');\n }\n // Expand tilde to home directory (skip for stdin)\n if (inputPath !== '-') {\n inputPath = expandTilde(inputPath);\n }\n\n // Output path\n let outputPath = cliOpts.out;\n\n if (!outputPath && interactive) {\n const defaultOut = config?.output ?? '-';\n\n outputPath = await input({\n message: 'Output path (or \"-\" for stdout):',\n default: defaultOut,\n });\n }\n if (!outputPath) {\n throw new Error('Output path is required. Use --out <path> or --interactive.');\n }\n // Expand tilde to home directory (skip for stdout)\n if (outputPath !== '-') {\n outputPath = expandTilde(outputPath);\n }\n\n // QTI version\n const qtiVersionResolved = resolveOption<QtiVersion>(cliOpts.qtiVersion, config?.qtiVersion, '2.2');\n let qtiVersion = qtiVersionResolved.value;\n\n if (interactive && !cliOpts.qtiVersion && !config?.qtiVersion) {\n qtiVersion = (await select({\n message: 'QTI version:',\n choices: [\n { value: '2.2', name: '2.2 (default)' },\n { value: '2.1', name: '2.1' },\n ],\n default: '2.2',\n })) as QtiVersion;\n qtiVersionResolved.value = qtiVersion;\n qtiVersionResolved.source = 'cli';\n }\n\n // Verbose\n const verboseResolved = resolveOption(cliOpts.verbose, config?.verbose, false);\n\n // Pretty\n const prettyResolved = resolveOption(cliOpts.pretty, config?.pretty, false);\n\n // Organisation ID (TASK 030) - check both aliases\n // Note: Commander.js does NOT convert underscores to camelCase, so we need to check both\n let cliOrgId = (cliOpts as any).organisation_id ?? (cliOpts as any).org_id;\n\n // Interactive prompt for organisation ID\n if (interactive && !cliOrgId && !config?.organisationId) {\n const orgIdInput = await input({\n message: 'Organisation ID (optional, for Learnosity CDN asset URLs):',\n default: '',\n });\n\n if (orgIdInput && orgIdInput.trim() !== '') {\n const parsed = parseInt(orgIdInput.trim(), 10);\n\n if (!isNaN(parsed)) {\n cliOrgId = parsed;\n }\n }\n }\n\n const organisationId = cliOrgId ?? config?.organisationId;\n const organisationIdSource = cliOrgId !== undefined ? 'cli' : (config?.organisationId !== undefined ? 'config' : undefined);\n\n // Output format (with derived defaults)\n let outputFormatDefault: OutputFormat;\n\n if (outputPath === '-') {\n outputFormatDefault = 'stdout';\n } else {\n outputFormatDefault = isPackageCommand ? 'zip' : 'dir';\n }\n\n const outputFormatResolved = resolveOption<OutputFormat>(cliOpts.outputFormat, config?.outputFormat, outputFormatDefault);\n\n // Diagnostics (with derived defaults)\n let diagnosticsDefault: DiagnosticsOutput;\n\n if (outputPath === '-') {\n diagnosticsDefault = 'stderr';\n } else {\n diagnosticsDefault = 'file';\n }\n\n // Handle --diagnostics option: can be a mode OR a file path\n let cliDiagnostics: DiagnosticsOutput | undefined;\n let diagnosticsPath: string | undefined;\n\n if (cliOpts.diagnostics === 'stderr' || cliOpts.diagnostics === 'file' || cliOpts.diagnostics === 'both' || cliOpts.diagnostics === 'none') {\n cliDiagnostics = cliOpts.diagnostics as DiagnosticsOutput;\n } else if (cliOpts.diagnostics) {\n // It's a file path, so use 'file' mode and store the path\n cliDiagnostics = 'file';\n diagnosticsPath = cliOpts.diagnostics;\n }\n\n const diagnosticsResolved = resolveOption<DiagnosticsOutput>(cliDiagnostics, config?.diagnostics, diagnosticsDefault);\n\n // Media vault option\n // Note: Commander.js keeps the flag name as-is, so --mediavault becomes mediavault, not mediaVault\n const cliMediaVault = (cliOpts as any).mediavault;\n const mediaVault = cliMediaVault ?? config?.mediaVault ?? false;\n const mediaVaultSource = cliMediaVault !== undefined ? 'cli' : (config?.mediaVault !== undefined ? 'config' : 'default');\n\n // Custom asset URL option\n const cliCustomAssetUrl = (cliOpts as any).customAssetUrl;\n const customAssetUrl = cliCustomAssetUrl ?? config?.customAssetUrl;\n const customAssetUrlSource = cliCustomAssetUrl !== undefined ? 'cli' : (config?.customAssetUrl !== undefined ? 'config' : undefined);\n\n // Item reference source option\n const cliItemReferenceSource = cliOpts.itemReferenceSource;\n const itemReferenceSource = cliItemReferenceSource ?? config?.itemReferenceSource ?? 'sourceFilename';\n const itemReferenceSourceSource = cliItemReferenceSource !== undefined ? 'cli' : (config?.itemReferenceSource !== undefined ? 'config' : 'default');\n\n // Item filename source option (defaults to itemReferenceSource)\n const cliItemFilenameSource = cliOpts.itemFilenameSource;\n const itemFilenameSource = cliItemFilenameSource ?? config?.itemFilenameSource;\n const itemFilenameSourceSource = cliItemFilenameSource !== undefined ? 'cli' : (config?.itemFilenameSource !== undefined ? 'config' : undefined);\n\n // Truncate tags option\n const cliTruncateTags = (cliOpts as any).truncateTags;\n const truncateTags = cliTruncateTags ?? config?.truncateTags ?? false;\n const truncateTagsSource = cliTruncateTags !== undefined ? 'cli' : (config?.truncateTags !== undefined ? 'config' : 'default');\n\n const withSources: ResolvedOptionsWithSources = {\n inputPath: { value: inputPath, source: 'cli' },\n outputPath: { value: outputPath, source: 'cli' },\n qtiVersion: qtiVersionResolved,\n outputFormat: outputFormatResolved,\n diagnostics: diagnosticsResolved,\n diagnosticsPath,\n verbose: verboseResolved,\n pretty: prettyResolved,\n configPath,\n organisationId: organisationIdSource ? { value: organisationId!, source: organisationIdSource } : undefined,\n mediaVault: { value: mediaVault, source: mediaVaultSource },\n customAssetUrl: customAssetUrlSource ? { value: customAssetUrl!, source: customAssetUrlSource } : undefined,\n itemReferenceSource: { value: itemReferenceSource as any, source: itemReferenceSourceSource },\n itemFilenameSource: itemFilenameSourceSource ? { value: itemFilenameSource! as any, source: itemFilenameSourceSource } : undefined,\n truncateTags: { value: truncateTags, source: truncateTagsSource },\n };\n\n const options: ResolvedOptions = {\n inputPath,\n outputPath,\n qtiVersion: qtiVersionResolved.value,\n outputFormat: outputFormatResolved.value,\n diagnostics: diagnosticsResolved.value,\n diagnosticsPath,\n verbose: verboseResolved.value,\n pretty: prettyResolved.value,\n configPath,\n organisationId, // TASK 030\n mediaVault,\n customAssetUrl,\n itemReferenceSource: itemReferenceSource as any,\n itemFilenameSource: itemFilenameSource as any,\n truncateTags,\n };\n\n return { options, diagnostics, withSources };\n}\n"],"x_google_ignoreList":[4,5,6,7,8,9,10,11,12,13,14,15,16],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAgB,uBACZ,OACA,MACyD;CACzD,MAAM,SAAS,qCAAqC,OA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