{"version":3,"file":"_httpFormDataReadString.mjs","names":[],"sources":["../../src/internal/_httpFormDataReadString.ts"],"sourcesContent":["/**\n * Reads one form field as a string.\n *\n * The text `\"null\"` spells `null` only where the property's type admits `null`;\n * elsewhere it is the string `\"null\"` (#2450). The emitter passes `false` for a\n * string whose type does not admit `null` and omits the argument otherwise, so\n * code emitted before the parameter existed keeps its reading.\n *\n * @evidence contracts/common.md#principled-implementation A file is passed through, a missing field is absent, and the text `null` becomes null only when the property's type admits null, which the emitter states with the `nullable` argument; otherwise it is the string.\n * @evidence contracts/common.md#clear-and-simple-design One conditional chain with a default that keeps older emitted code reading as before.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The default of true preserves a documented earlier reading and is not a hidden toggle.\n * @evidence contracts/common.md#meaningful-documentation The doc explains the nullable parameter and the issue.\n */\nexport const _httpFormDataReadString = (\n  input: string | File | null,\n  nullable: boolean = true,\n): string | null | undefined =>\n  input instanceof File\n    ? (input as any)\n    : input === null\n      ? undefined\n      : nullable === true && input === \"null\"\n        ? null\n        : input;\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAa,2BACX,OACA,WAAoB,SAEpB,iBAAiB,OACZ,QACD,UAAU,OACR,KAAA,IACA,aAAa,QAAQ,UAAU,SAC7B,OACA"}