@nodaro/prompts 1.50.1 → 1.52.0

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.
Files changed (74) hide show
  1. package/dist/{chunk-MJIKM4YZ.cjs → chunk-7BWDATUZ.cjs} +125 -125
  2. package/dist/{chunk-MJIKM4YZ.cjs.map → chunk-7BWDATUZ.cjs.map} +1 -1
  3. package/dist/{chunk-MUTUHJIV.js → chunk-CDTEETF3.js} +5 -2
  4. package/dist/chunk-CDTEETF3.js.map +1 -0
  5. package/dist/{chunk-WLN2MJ7F.cjs → chunk-E5EKWWOO.cjs} +3 -3
  6. package/dist/{chunk-3XSB5YDY.js.map → chunk-E5EKWWOO.cjs.map} +1 -1
  7. package/dist/{chunk-DB6A5I6V.js → chunk-ED47NNIN.js} +3 -3
  8. package/dist/{chunk-DB6A5I6V.js.map → chunk-ED47NNIN.js.map} +1 -1
  9. package/dist/{chunk-IXBTD2LW.js → chunk-EUU5W7XR.js} +4 -4
  10. package/dist/{chunk-IXBTD2LW.js.map → chunk-EUU5W7XR.js.map} +1 -1
  11. package/dist/{chunk-JGEBO6L6.cjs → chunk-F22GZF7T.cjs} +8 -8
  12. package/dist/{chunk-JGEBO6L6.cjs.map → chunk-F22GZF7T.cjs.map} +1 -1
  13. package/dist/{chunk-PLQFXCBU.cjs → chunk-GJV7KTDX.cjs} +5 -2
  14. package/dist/chunk-GJV7KTDX.cjs.map +1 -0
  15. package/dist/{chunk-RVBO63D5.cjs → chunk-GRSKB3P7.cjs} +2 -2
  16. package/dist/chunk-GRSKB3P7.cjs.map +1 -0
  17. package/dist/{chunk-3XSB5YDY.js → chunk-H322GC7M.js} +3 -3
  18. package/dist/chunk-H322GC7M.js.map +1 -0
  19. package/dist/{chunk-C5LP7DAQ.js → chunk-HETYHGGW.js} +6 -6
  20. package/dist/{chunk-C5LP7DAQ.js.map → chunk-HETYHGGW.js.map} +1 -1
  21. package/dist/{chunk-FEOVUTFC.js → chunk-HOZPYHRA.js} +5 -5
  22. package/dist/{chunk-FEOVUTFC.js.map → chunk-HOZPYHRA.js.map} +1 -1
  23. package/dist/{chunk-HR4TFBU2.cjs → chunk-KTNCB2IE.cjs} +35 -35
  24. package/dist/{chunk-HR4TFBU2.cjs.map → chunk-KTNCB2IE.cjs.map} +1 -1
  25. package/dist/{chunk-VYCTRGJ7.cjs → chunk-M6EXNY42.cjs} +39 -39
  26. package/dist/{chunk-VYCTRGJ7.cjs.map → chunk-M6EXNY42.cjs.map} +1 -1
  27. package/dist/{chunk-IADAATZK.cjs → chunk-OQ3J7OGR.cjs} +49 -49
  28. package/dist/{chunk-IADAATZK.cjs.map → chunk-OQ3J7OGR.cjs.map} +1 -1
  29. package/dist/{chunk-KYKCHOOS.cjs → chunk-P4BXE4OA.cjs} +13 -13
  30. package/dist/{chunk-KYKCHOOS.cjs.map → chunk-P4BXE4OA.cjs.map} +1 -1
  31. package/dist/{chunk-LJ5WW6KK.js → chunk-PHCYQWJP.js} +50 -11
  32. package/dist/chunk-PHCYQWJP.js.map +1 -0
  33. package/dist/{chunk-TYJCCODP.cjs → chunk-PWYASBX2.cjs} +18 -18
  34. package/dist/{chunk-TYJCCODP.cjs.map → chunk-PWYASBX2.cjs.map} +1 -1
  35. package/dist/{chunk-VJYKE6AY.js → chunk-VBCVQPQ4.js} +3 -3
  36. package/dist/{chunk-VJYKE6AY.js.map → chunk-VBCVQPQ4.js.map} +1 -1
  37. package/dist/{chunk-34JK2G34.js → chunk-WQ7FWGZ2.js} +2 -2
  38. package/dist/chunk-WQ7FWGZ2.js.map +1 -0
  39. package/dist/{chunk-IWX3Q7NH.cjs → chunk-XRCK3BCF.cjs} +50 -11
  40. package/dist/chunk-XRCK3BCF.cjs.map +1 -0
  41. package/dist/{chunk-ZZ6UOK2P.js → chunk-YAIPYPMM.js} +4 -4
  42. package/dist/{chunk-ZZ6UOK2P.js.map → chunk-YAIPYPMM.js.map} +1 -1
  43. package/dist/{chunk-BWDQEAX2.js → chunk-ZRORO6OM.js} +4 -4
  44. package/dist/{chunk-BWDQEAX2.js.map → chunk-ZRORO6OM.js.map} +1 -1
  45. package/dist/entries/assembly.cjs +28 -28
  46. package/dist/entries/assembly.js +5 -5
  47. package/dist/entries/doctrine.cjs +46 -46
  48. package/dist/entries/doctrine.js +1 -1
  49. package/dist/entries/picker-art.cjs +3 -3
  50. package/dist/entries/picker-art.js +1 -1
  51. package/dist/entries/picker-catalogs.cjs +56 -56
  52. package/dist/entries/picker-catalogs.js +4 -4
  53. package/dist/entries/pickers.cjs +382 -382
  54. package/dist/entries/pickers.js +2 -2
  55. package/dist/entries/presets.cjs +35 -35
  56. package/dist/entries/presets.js +1 -1
  57. package/dist/entries/prompt-builder.cjs +75 -75
  58. package/dist/entries/prompt-builder.js +4 -4
  59. package/dist/index.cjs +618 -618
  60. package/dist/index.js +11 -11
  61. package/package.json +2 -2
  62. package/src/__tests__/style-video-wording.test.ts +1 -1
  63. package/src/factory-presets/shared-image.ts +2 -2
  64. package/src/picker-art/restyle-previews.ts +3 -0
  65. package/src/prompt-wizard-categories.ts +20 -9
  66. package/src/provider-prompt-doctrine.ts +29 -0
  67. package/src/style.ts +1 -1
  68. package/dist/chunk-34JK2G34.js.map +0 -1
  69. package/dist/chunk-IWX3Q7NH.cjs.map +0 -1
  70. package/dist/chunk-LJ5WW6KK.js.map +0 -1
  71. package/dist/chunk-MUTUHJIV.js.map +0 -1
  72. package/dist/chunk-PLQFXCBU.cjs.map +0 -1
  73. package/dist/chunk-RVBO63D5.cjs.map +0 -1
  74. package/dist/chunk-WLN2MJ7F.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { CHARACTER_MOTION_MAX_PICKS, getCharacterMotion } from './chunk-3XSB5YDY.js';
1
+ import { CHARACTER_MOTION_MAX_PICKS, getCharacterMotion } from './chunk-H322GC7M.js';
2
2
  import { pickIds } from '@nodaro/shared/catalogs';
3
3
 
4
4
  var WARDROBE_DIMENSION_ORDER = [
@@ -196,5 +196,5 @@ function getCharacterMotionDiagnostics(value, timing, bindings = {}) {
196
196
  }
197
197
 
198
198
  export { WARDROBE, WARDROBE_CATEGORY_LABELS, WARDROBE_DIMENSION_ORDER, WARDROBE_FIELD_BY_DIMENSION, buildWardrobeHints, getCharacterMotionDiagnostics, getWardrobeEntriesByDimension, getWardrobeEntry, getWardrobePromptHint };
199
- //# sourceMappingURL=chunk-DB6A5I6V.js.map
200
- //# sourceMappingURL=chunk-DB6A5I6V.js.map
199
+ //# sourceMappingURL=chunk-ED47NNIN.js.map
200
+ //# sourceMappingURL=chunk-ED47NNIN.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/wardrobe.ts","../src/character-motion-diagnostics.ts"],"names":["id","h"],"mappings":";;;AA0BO,IAAM,wBAAA,GAA6D;AAAA,EACxE,WAAA;AAAA,EAAa,KAAA;AAAA,EAAO,QAAA;AAAA,EAAU,WAAA;AAAA,EAAa,UAAA;AAAA,EAC3C,UAAA;AAAA,EAAY,aAAA;AAAA,EAAe,eAAA;AAAA,EAAiB,UAAA;AAAA,EAAY;AAC1D;AAEO,IAAM,wBAAA,GAAwE;AAAA,EACnF,SAAA,EAAW,WAAA;AAAA,EAAa,GAAA,EAAK,KAAA;AAAA,EAAO,MAAA,EAAQ,QAAA;AAAA,EAAU,SAAA,EAAW,WAAA;AAAA,EACjE,QAAA,EAAU,UAAA;AAAA,EAAY,QAAA,EAAU,UAAA;AAAA,EAAY,WAAA,EAAa,aAAA;AAAA,EACzD,eAAA,EAAiB,eAAA;AAAA,EAAiB,QAAA,EAAU,UAAA;AAAA,EAAY,GAAA,EAAK;AAC/D;AAEO,IAAM,2BAAA,GAA8E;AAAA,EACzF,SAAA,EAAW,WAAA;AAAA,EAAa,GAAA,EAAK,KAAA;AAAA,EAAO,MAAA,EAAQ,QAAA;AAAA,EAAU,SAAA,EAAW,WAAA;AAAA,EACjE,QAAA,EAAU,UAAA;AAAA,EAAY,QAAA,EAAU,UAAA;AAAA,EAAY,WAAA,EAAa,aAA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,QAAA,CAAS,GAAA,CAAI,OAAK,CAAA,CAAE,EAAE,GAAG,CAAA,EAAG,QAAA,CAAS,MAAM,CAAA,UAAA,EAAa,QAAA,CAAS,WAAW,CAAA,GAAI,KAAA,GAAQ,OAAO,CAAA,0GAAA,CAA4G,CAAA;AAC3P,EAAA,OAAO,MAAA;AACT","file":"chunk-DB6A5I6V.js","sourcesContent":["import { pickIds } from \"@nodaro/shared/catalogs\"\n\nexport type WardrobeDimension =\n | \"archetype\" | \"top\" | \"bottom\" | \"outerwear\" | \"footwear\"\n | \"headwear\" | \"accessories\" | \"color-palette\" | \"material\" | \"era\"\n\nexport interface WardrobeEntry {\n readonly id: string\n readonly label: string\n readonly dimension: WardrobeDimension\n readonly promptHint: string\n}\n\nexport interface WardrobeValue {\n archetype?: string\n top?: string\n bottom?: string\n outerwear?: string\n footwear?: string\n headwear?: string | ReadonlyArray<string>\n accessories?: string | ReadonlyArray<string>\n colorPalette?: string\n material?: string\n era?: string\n}\n\nexport const WARDROBE_DIMENSION_ORDER: ReadonlyArray<WardrobeDimension> = [\n \"archetype\", \"top\", \"bottom\", \"outerwear\", \"footwear\",\n \"headwear\", \"accessories\", \"color-palette\", \"material\", \"era\",\n]\n\nexport const WARDROBE_CATEGORY_LABELS: Readonly<Record<WardrobeDimension, string>> = {\n archetype: \"Archetype\", top: \"Top\", bottom: \"Bottom\", outerwear: \"Outerwear\",\n footwear: \"Footwear\", headwear: \"Headwear\", accessories: \"Accessories\",\n \"color-palette\": \"Color Palette\", material: \"Material\", era: \"Era\",\n}\n\nexport const WARDROBE_FIELD_BY_DIMENSION: Record<WardrobeDimension, keyof WardrobeValue> = {\n archetype: \"archetype\", top: \"top\", bottom: \"bottom\", outerwear: \"outerwear\",\n footwear: \"footwear\", headwear: \"headwear\", accessories: \"accessories\",\n \"color-palette\": \"colorPalette\", material: \"material\", era: \"era\",\n}\n\n/** Multi-pick dims emit each picked entry independently. */\nconst MULTI_PICK: ReadonlySet<WardrobeDimension> = new Set([\"headwear\", \"accessories\"])\n/** Sentinel ids that mean \"nothing here\" and emit no hint. */\nconst NONE_IDS: ReadonlySet<string> = new Set([\"wd-outer-none\"])\n\nexport const WARDROBE: ReadonlyArray<WardrobeEntry> = [\n // archetype\n { id: \"wd-casual\", label: \"Casual\", dimension: \"archetype\", promptHint: \"in casual everyday clothing\" },\n { id: \"wd-business\", label: \"Business\", dimension: \"archetype\", promptHint: \"in smart business attire\" },\n { id: \"wd-formal\", label: \"Formal\", dimension: \"archetype\", promptHint: \"in elegant formal wear\" },\n { id: \"wd-streetwear\", label: \"Streetwear\", dimension: \"archetype\", promptHint: \"in contemporary streetwear\" },\n { id: \"wd-athletic\", label: \"Athletic\", dimension: \"archetype\", promptHint: \"in athletic sportswear\" },\n { id: \"wd-fantasy\", label: \"Fantasy\", dimension: \"archetype\", promptHint: \"in fantasy costume\" },\n { id: \"wd-scifi\", label: \"Sci-Fi\", dimension: \"archetype\", promptHint: \"in futuristic sci-fi attire\" },\n { id: \"wd-historical\", label: \"Historical\", dimension: \"archetype\", promptHint: \"in period historical dress\" },\n { id: \"wd-uniform\", label: \"Uniform\", dimension: \"archetype\", promptHint: \"in a uniform\" },\n { id: \"wd-loungewear\", label: \"Loungewear\", dimension: \"archetype\", promptHint: \"in relaxed loungewear\" },\n // top\n { id: \"wd-tshirt\", label: \"T-Shirt\", dimension: \"top\", promptHint: \"wearing a t-shirt\" },\n { id: \"wd-blouse\", label: \"Blouse\", dimension: \"top\", promptHint: \"wearing a blouse\" },\n { id: \"wd-hoodie\", label: \"Hoodie\", dimension: \"top\", promptHint: \"wearing a hoodie\" },\n { id: \"wd-buttondown\", label: \"Button-down\", dimension: \"top\", promptHint: \"wearing a button-down shirt\" },\n { id: \"wd-tank\", label: \"Tank\", dimension: \"top\", promptHint: \"wearing a tank top\" },\n { id: \"wd-sweater\", label: \"Sweater\", dimension: \"top\", promptHint: \"wearing a sweater\" },\n { id: \"wd-turtleneck\", label: \"Turtleneck\", dimension: \"top\", promptHint: \"wearing a turtleneck\" },\n // bottom\n { id: \"wd-jeans\", label: \"Jeans\", dimension: \"bottom\", promptHint: \"wearing jeans\" },\n { id: \"wd-trousers\", label: \"Trousers\", dimension: \"bottom\", promptHint: \"wearing tailored trousers\" },\n { id: \"wd-skirt\", label: \"Skirt\", dimension: \"bottom\", promptHint: \"wearing a skirt\" },\n { id: \"wd-shorts\", label: \"Shorts\", dimension: \"bottom\", promptHint: \"wearing shorts\" },\n { id: \"wd-leggings\", label: \"Leggings\", dimension: \"bottom\", promptHint: \"wearing leggings\" },\n { id: \"wd-cargo\", label: \"Cargo\", dimension: \"bottom\", promptHint: \"wearing cargo pants\" },\n // outerwear\n { id: \"wd-outer-none\", label: \"None\", dimension: \"outerwear\", promptHint: \"\" },\n { id: \"wd-leatherjkt\", label: \"Leather Jacket\", dimension: \"outerwear\", promptHint: \"in a leather jacket\" },\n { id: \"wd-blazer\", label: \"Blazer\", dimension: \"outerwear\", promptHint: \"in a blazer\" },\n { id: \"wd-trench\", label: \"Trench Coat\", dimension: \"outerwear\", promptHint: \"in a trench coat\" },\n { id: \"wd-parka\", label: \"Parka\", dimension: \"outerwear\", promptHint: \"in a parka\" },\n { id: \"wd-cloak\", label: \"Cloak\", dimension: \"outerwear\", promptHint: \"in a flowing cloak\" },\n { id: \"wd-denimjkt\", label: \"Denim Jacket\", dimension: \"outerwear\", promptHint: \"in a denim jacket\" },\n { id: \"wd-cardigan\", label: \"Cardigan\", dimension: \"outerwear\", promptHint: \"in a cardigan\" },\n // footwear\n { id: \"wd-sneakers\", label: \"Sneakers\", dimension: \"footwear\", promptHint: \"wearing sneakers\" },\n { id: \"wd-boots\", label: \"Boots\", dimension: \"footwear\", promptHint: \"wearing boots\" },\n { id: \"wd-heels\", label: \"Heels\", dimension: \"footwear\", promptHint: \"wearing heels\" },\n { id: \"wd-sandals\", label: \"Sandals\", dimension: \"footwear\", promptHint: \"wearing sandals\" },\n { id: \"wd-dressshoe\", label: \"Dress Shoes\", dimension: \"footwear\", promptHint: \"wearing dress shoes\" },\n { id: \"wd-barefoot\", label: \"Barefoot\", dimension: \"footwear\", promptHint: \"barefoot\" },\n // headwear (multi)\n { id: \"wd-cap\", label: \"Cap\", dimension: \"headwear\", promptHint: \"wearing a cap\" },\n { id: \"wd-beanie\", label: \"Beanie\", dimension: \"headwear\", promptHint: \"wearing a beanie\" },\n { id: \"wd-widehat\", label: \"Wide-brim Hat\", dimension: \"headwear\", promptHint: \"wearing a wide-brim hat\" },\n { id: \"wd-hood\", label: \"Hood\", dimension: \"headwear\", promptHint: \"with the hood up\" },\n { id: \"wd-crown\", label: \"Crown\", dimension: \"headwear\", promptHint: \"wearing a crown\" },\n { id: \"wd-helmet\", label: \"Helmet\", dimension: \"headwear\", promptHint: \"wearing a helmet\" },\n // accessories (multi)\n { id: \"wd-glasses\", label: \"Glasses\", dimension: \"accessories\", promptHint: \"wearing glasses\" },\n { id: \"wd-sunglasses\", label: \"Sunglasses\", dimension: \"accessories\", promptHint: \"wearing sunglasses\" },\n { id: \"wd-scarf\", label: \"Scarf\", dimension: \"accessories\", promptHint: \"wearing a scarf\" },\n { id: \"wd-gloves\", label: \"Gloves\", dimension: \"accessories\", promptHint: \"wearing gloves\" },\n { id: \"wd-jewelry\", label: \"Jewelry\", dimension: \"accessories\", promptHint: \"wearing statement jewelry\" },\n { id: \"wd-belt\", label: \"Belt\", dimension: \"accessories\", promptHint: \"with a belt\" },\n { id: \"wd-watch\", label: \"Watch\", dimension: \"accessories\", promptHint: \"wearing a watch\" },\n // color-palette\n { id: \"wd-neutral\", label: \"Neutral\", dimension: \"color-palette\", promptHint: \"in a neutral color palette\" },\n { id: \"wd-all-black\", label: \"All Black\", dimension: \"color-palette\", promptHint: \"in an all-black palette\" },\n { id: \"wd-earth\", label: \"Earth Tones\", dimension: \"color-palette\", promptHint: \"in earth-tone colors\" },\n { id: \"wd-pastel\", label: \"Pastel\", dimension: \"color-palette\", promptHint: \"in pastel colors\" },\n { id: \"wd-jewel\", label: \"Jewel Tones\", dimension: \"color-palette\", promptHint: \"in rich jewel-tone colors\" },\n { id: \"wd-neon\", label: \"Neon\", dimension: \"color-palette\", promptHint: \"in vivid neon colors\" },\n { id: \"wd-all-white\", label: \"All White\", dimension: \"color-palette\", promptHint: \"in an all-white palette\" },\n // material\n { id: \"wd-cotton\", label: \"Cotton\", dimension: \"material\", promptHint: \"in cotton fabric\" },\n { id: \"wd-denim\", label: \"Denim\", dimension: \"material\", promptHint: \"in denim\" },\n { id: \"wd-leather\", label: \"Leather\", dimension: \"material\", promptHint: \"in leather\" },\n { id: \"wd-silk\", label: \"Silk\", dimension: \"material\", promptHint: \"in silk\" },\n { id: \"wd-wool\", label: \"Wool\", dimension: \"material\", promptHint: \"in wool\" },\n { id: \"wd-latex\", label: \"Latex\", dimension: \"material\", promptHint: \"in latex\" },\n { id: \"wd-linen\", label: \"Linen\", dimension: \"material\", promptHint: \"in linen\" },\n // era\n { id: \"wd-contemporary\", label: \"Contemporary\", dimension: \"era\", promptHint: \"in contemporary fashion\" },\n { id: \"wd-1920s\", label: \"1920s\", dimension: \"era\", promptHint: \"in 1920s fashion\" },\n { id: \"wd-1950s\", label: \"1950s\", dimension: \"era\", promptHint: \"in 1950s fashion\" },\n { id: \"wd-1980s\", label: \"1980s\", dimension: \"era\", promptHint: \"in 1980s fashion\" },\n { id: \"wd-victorian\", label: \"Victorian\", dimension: \"era\", promptHint: \"in Victorian-era dress\" },\n { id: \"wd-medieval\", label: \"Medieval\", dimension: \"era\", promptHint: \"in medieval dress\" },\n { id: \"wd-futuristic\", label: \"Futuristic\", dimension: \"era\", promptHint: \"in futuristic clothing\" },\n] as const\n\nconst BY_ID: Map<string, WardrobeEntry> = new Map(WARDROBE.map((e) => [e.id, e]))\n\n/** Entries grouped by dimension — precomputed once so per-dimension lookups\n * (the picker calls one per dimension per render) are O(1) with stable array\n * refs, instead of a full WARDROBE scan each call. */\nconst BY_DIMENSION: Map<WardrobeDimension, WardrobeEntry[]> = (() => {\n const map = new Map<WardrobeDimension, WardrobeEntry[]>()\n for (const e of WARDROBE) {\n const list = map.get(e.dimension)\n if (list) list.push(e)\n else map.set(e.dimension, [e])\n }\n return map\n})()\n\nexport function getWardrobeEntry(id: string | undefined | null): WardrobeEntry | undefined {\n return id ? BY_ID.get(id) : undefined\n}\n\nexport function getWardrobePromptHint(id: string | undefined | null): string {\n return getWardrobeEntry(id)?.promptHint ?? \"\"\n}\n\nexport function getWardrobeEntriesByDimension(dim: WardrobeDimension): WardrobeEntry[] {\n return BY_DIMENSION.get(dim) ?? []\n}\n\nexport function buildWardrobeHints(value: Record<string, unknown> & WardrobeValue): string[] {\n const hints: string[] = []\n for (const dimension of WARDROBE_DIMENSION_ORDER) {\n const field = WARDROBE_FIELD_BY_DIMENSION[dimension]\n const raw = value[field]\n if (MULTI_PICK.has(dimension)) {\n for (const id of pickIds(raw)) {\n if (NONE_IDS.has(id)) continue\n const h = getWardrobePromptHint(id)\n if (h) hints.push(h)\n }\n continue\n }\n const id = typeof raw === \"string\" ? raw : undefined\n if (!id || NONE_IDS.has(id)) continue\n const h = getWardrobePromptHint(id)\n if (h) hints.push(h)\n }\n return hints\n}\n","import { getCharacterMotion, CHARACTER_MOTION_MAX_PICKS, type CharacterMotionTiming } from \"./character-motion.js\"\n\nexport interface CharacterMotionDiagnostic {\n readonly code: \"unknown\" | \"omitted\" | \"retired\" | \"pose\" | \"visibility\" | \"hands\" | \"pace\" | \"requirements\" | \"compound\" | \"capacity\" | \"multiple-targets\" | \"roles\"\n readonly severity: \"error\" | \"warning\" | \"info\"\n readonly ids: readonly string[]\n readonly message: string\n}\nexport interface CharacterMotionBindings {\n readonly selfPairing?: boolean\n readonly subjectMinor?: boolean\n readonly partnerNames?: readonly string[]\n readonly targetNames?: readonly string[]\n}\n\n/** Shared by editor, API clients and local review. Missing metadata means\n * unknown; this never certifies a sequence or predicts clip duration. */\nexport function getCharacterMotionDiagnostics(\n value: string | readonly string[] | null | undefined,\n timing?: CharacterMotionTiming,\n bindings: CharacterMotionBindings = {},\n): readonly CharacterMotionDiagnostic[] {\n const requested = typeof value === \"string\" ? [value] : Array.isArray(value) ? [...new Set(value)] : []\n const result: CharacterMotionDiagnostic[] = []\n const add = (code: CharacterMotionDiagnostic[\"code\"], severity: CharacterMotionDiagnostic[\"severity\"], ids: readonly string[], message: string) => result.push({ code, severity, ids, message })\n if (requested.length > CHARACTER_MOTION_MAX_PICKS) add(\"capacity\", \"warning\", requested, \"Only the first three selections contribute. Remove extra selections.\")\n const picks = requested.slice(0, CHARACTER_MOTION_MAX_PICKS)\n for (const id of picks) if (!getCharacterMotion(id)) add(\"unknown\", \"error\", [id], `Motion “${id}” is unavailable and contributes no fragment. Remove or replace it.`)\n const entries = picks.flatMap(id => { const entry = getCharacterMotion(id); return entry?.promptHint ? [entry] : [] })\n const active = entries.filter(e => !bindings.subjectMinor || !e.adultOnly)\n if (bindings.selfPairing && active.some(e => e.twoPerson || e.counterpart)) add(\"roles\", \"error\", active.filter(e => e.twoPerson || e.counterpart).map(e => e.id), \"The same reference is connected as Target and Partner. Connect distinct participants before running this interaction.\")\n const omitted = entries.filter(e => bindings.subjectMinor && e.adultOnly)\n if (omitted.length) add(\"omitted\", active.length ? \"warning\" : \"error\", omitted.map(e => e.id), `${omitted.map(e => e.label).join(\", \")} omitted for a connected minor. ${active.length ? \"Replace these selections.\" : \"No selected motion contributes a fragment.\"}`)\n if ((bindings.targetNames?.length ?? 0) > 1) add(\"multiple-targets\", \"warning\", picks, \"Each target performs a separate copy of the sequence. Use separate motion nodes for coordinated choreography.\")\n for (const entry of active) {\n if (entry.deprecated) add(\"retired\", \"warning\", [entry.id], `${entry.label} is retired from new choices but still resolves in saved workflows.${entry.replacementId ? ` Use ${getCharacterMotion(entry.replacementId)?.label ?? entry.replacementId}.` : \"\"}`)\n if (entry.fixedPace && timing?.pace && timing.pace !== \"auto\") add(\"pace\", \"warning\", [entry.id], `${entry.label} sets its own timing. Set Pace to Auto or replace the motion.`)\n if (entry.requires?.length) add(\"requirements\", \"info\", [entry.id], `${entry.label} requires: ${entry.requires.join(\", \")}.${entry.twoPerson || entry.counterpart ? bindings.partnerNames?.length ? ` Partner reference: ${bindings.partnerNames.join(\", \")}; confirm it matches the required recipient.` : \" Connect a Partner reference to identify the recipient; otherwise the model chooses it.\" : \" Establish these in the scene or prompt; the fragment does not supply reference media.\"}`)\n }\n for (let i = 1; i < active.length; i++) {\n const before = active[i - 1]!, after = active[i]!, ids = [before.id, after.id]\n if (before.endVisibility === \"out-of-frame\") add(\"visibility\", \"warning\", ids, `${before.label} ends out of view before ${after.label}. Reorder or add an entrance.`)\n if (before.endPose && after.startPose && before.endPose !== \"any\" && after.startPose !== \"any\" && before.endPose !== after.startPose) add(\"pose\", \"warning\", ids, `${before.label} ends ${before.endPose}; ${after.label} starts ${after.startPose}. Add a transition or replace a motion.`)\n if (before.handsAfter && before.handsAfter !== \"free\" && after.needsFreeHands) add(\"hands\", \"warning\", ids, `${before.label} leaves hands occupied; ${after.label} needs free hands. Add a release first.`)\n }\n const compound = active.filter(e => e.kind === \"compound\")\n if (compound.length) add(\"compound\", \"warning\", compound.map(e => e.id), `${compound.length} selection${compound.length === 1 ? \" is\" : \"s are\"} compound choreography. Short clips may not fit every phase; test the sequence before adding more actions.`)\n return result\n}\n"]}
1
+ {"version":3,"sources":["../src/wardrobe.ts","../src/character-motion-diagnostics.ts"],"names":["id","h"],"mappings":";;;AA0BO,IAAM,wBAAA,GAA6D;AAAA,EACxE,WAAA;AAAA,EAAa,KAAA;AAAA,EAAO,QAAA;AAAA,EAAU,WAAA;AAAA,EAAa,UAAA;AAAA,EAC3C,UAAA;AAAA,EAAY,aAAA;AAAA,EAAe,eAAA;AAAA,EAAiB,UAAA;AAAA,EAAY;AAC1D;AAEO,IAAM,wBAAA,GAAwE;AAAA,EACnF,SAAA,EAAW,WAAA;AAAA,EAAa,GAAA,EAAK,KAAA;AAAA,EAAO,MAAA,EAAQ,QAAA;AAAA,EAAU,SAAA,EAAW,WAAA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AA,CAAyC,CAAA;AAC3R,IAAA,IAAI,OAAO,UAAA,IAAc,MAAA,CAAO,UAAA,KAAe,MAAA,IAAU,MAAM,cAAA,EAAgB,GAAA,CAAI,OAAA,EAAS,SAAA,EAAW,KAAK,CAAA,EAAG,MAAA,CAAO,KAAK,CAAA,wBAAA,EAA2B,KAAA,CAAM,KAAK,CAAA,uCAAA,CAAyC,CAAA;AAAA,EAC5M;AACA,EAAA,MAAM,WAAW,MAAA,CAAO,MAAA,CAAO,CAAA,CAAA,KAAK,CAAA,CAAE,SAAS,UAAU,CAAA;AACzD,EAAA,IAAI,QAAA,CAAS,QAAQ,GAAA,CAAI,UAAA,EAAY,WAAW,QAAA,CAAS,GAAA,CAAI,OAAK,CAAA,CAAE,EAAE,GAAG,CAAA,EAAG,QAAA,CAAS,MAAM,CAAA,UAAA,EAAa,QAAA,CAAS,WAAW,CAAA,GAAI,KAAA,GAAQ,OAAO,CAAA,0GAAA,CAA4G,CAAA;AAC3P,EAAA,OAAO,MAAA;AACT","file":"chunk-ED47NNIN.js","sourcesContent":["import { pickIds } from \"@nodaro/shared/catalogs\"\n\nexport type WardrobeDimension =\n | \"archetype\" | \"top\" | \"bottom\" | \"outerwear\" | \"footwear\"\n | \"headwear\" | \"accessories\" | \"color-palette\" | \"material\" | \"era\"\n\nexport interface WardrobeEntry {\n readonly id: string\n readonly label: string\n readonly dimension: WardrobeDimension\n readonly promptHint: string\n}\n\nexport interface WardrobeValue {\n archetype?: string\n top?: string\n bottom?: string\n outerwear?: string\n footwear?: string\n headwear?: string | ReadonlyArray<string>\n accessories?: string | ReadonlyArray<string>\n colorPalette?: string\n material?: string\n era?: string\n}\n\nexport const WARDROBE_DIMENSION_ORDER: ReadonlyArray<WardrobeDimension> = [\n \"archetype\", \"top\", \"bottom\", \"outerwear\", \"footwear\",\n \"headwear\", \"accessories\", \"color-palette\", \"material\", \"era\",\n]\n\nexport const WARDROBE_CATEGORY_LABELS: Readonly<Record<WardrobeDimension, string>> = {\n archetype: \"Archetype\", top: \"Top\", bottom: \"Bottom\", outerwear: \"Outerwear\",\n footwear: \"Footwear\", headwear: \"Headwear\", accessories: \"Accessories\",\n \"color-palette\": \"Color Palette\", material: \"Material\", era: \"Era\",\n}\n\nexport const WARDROBE_FIELD_BY_DIMENSION: Record<WardrobeDimension, keyof WardrobeValue> = {\n archetype: \"archetype\", top: \"top\", bottom: \"bottom\", outerwear: \"outerwear\",\n footwear: \"footwear\", headwear: \"headwear\", accessories: \"accessories\",\n \"color-palette\": \"colorPalette\", material: \"material\", era: \"era\",\n}\n\n/** Multi-pick dims emit each picked entry independently. */\nconst MULTI_PICK: ReadonlySet<WardrobeDimension> = new Set([\"headwear\", \"accessories\"])\n/** Sentinel ids that mean \"nothing here\" and emit no hint. */\nconst NONE_IDS: ReadonlySet<string> = new Set([\"wd-outer-none\"])\n\nexport const WARDROBE: ReadonlyArray<WardrobeEntry> = [\n // archetype\n { id: \"wd-casual\", label: \"Casual\", dimension: \"archetype\", promptHint: \"in casual everyday clothing\" },\n { id: \"wd-business\", label: \"Business\", dimension: \"archetype\", promptHint: \"in smart business attire\" },\n { id: \"wd-formal\", label: \"Formal\", dimension: \"archetype\", promptHint: \"in elegant formal wear\" },\n { id: \"wd-streetwear\", label: \"Streetwear\", dimension: \"archetype\", promptHint: \"in contemporary streetwear\" },\n { id: \"wd-athletic\", label: \"Athletic\", dimension: \"archetype\", promptHint: \"in athletic sportswear\" },\n { id: \"wd-fantasy\", label: \"Fantasy\", dimension: \"archetype\", promptHint: \"in fantasy costume\" },\n { id: \"wd-scifi\", label: \"Sci-Fi\", dimension: \"archetype\", promptHint: \"in futuristic sci-fi attire\" },\n { id: \"wd-historical\", label: \"Historical\", dimension: \"archetype\", promptHint: \"in period historical dress\" },\n { id: \"wd-uniform\", label: \"Uniform\", dimension: \"archetype\", promptHint: \"in a uniform\" },\n { id: \"wd-loungewear\", label: \"Loungewear\", dimension: \"archetype\", promptHint: \"in relaxed loungewear\" },\n // top\n { id: \"wd-tshirt\", label: \"T-Shirt\", dimension: \"top\", promptHint: \"wearing a t-shirt\" },\n { id: \"wd-blouse\", label: \"Blouse\", dimension: \"top\", promptHint: \"wearing a blouse\" },\n { id: \"wd-hoodie\", label: \"Hoodie\", dimension: \"top\", promptHint: \"wearing a hoodie\" },\n { id: \"wd-buttondown\", label: \"Button-down\", dimension: \"top\", promptHint: \"wearing a button-down shirt\" },\n { id: \"wd-tank\", label: \"Tank\", dimension: \"top\", promptHint: \"wearing a tank top\" },\n { id: \"wd-sweater\", label: \"Sweater\", dimension: \"top\", promptHint: \"wearing a sweater\" },\n { id: \"wd-turtleneck\", label: \"Turtleneck\", dimension: \"top\", promptHint: \"wearing a turtleneck\" },\n // bottom\n { id: \"wd-jeans\", label: \"Jeans\", dimension: \"bottom\", promptHint: \"wearing jeans\" },\n { id: \"wd-trousers\", label: \"Trousers\", dimension: \"bottom\", promptHint: \"wearing tailored trousers\" },\n { id: \"wd-skirt\", label: \"Skirt\", dimension: \"bottom\", promptHint: \"wearing a skirt\" },\n { id: \"wd-shorts\", label: \"Shorts\", dimension: \"bottom\", promptHint: \"wearing shorts\" },\n { id: \"wd-leggings\", label: \"Leggings\", dimension: \"bottom\", promptHint: \"wearing leggings\" },\n { id: \"wd-cargo\", label: \"Cargo\", dimension: \"bottom\", promptHint: \"wearing cargo pants\" },\n // outerwear\n { id: \"wd-outer-none\", label: \"None\", dimension: \"outerwear\", promptHint: \"\" },\n { id: \"wd-leatherjkt\", label: \"Leather Jacket\", dimension: \"outerwear\", promptHint: \"in a leather jacket\" },\n { id: \"wd-blazer\", label: \"Blazer\", dimension: \"outerwear\", promptHint: \"in a blazer\" },\n { id: \"wd-trench\", label: \"Trench Coat\", dimension: \"outerwear\", promptHint: \"in a trench coat\" },\n { id: \"wd-parka\", label: \"Parka\", dimension: \"outerwear\", promptHint: \"in a parka\" },\n { id: \"wd-cloak\", label: \"Cloak\", dimension: \"outerwear\", promptHint: \"in a flowing cloak\" },\n { id: \"wd-denimjkt\", label: \"Denim Jacket\", dimension: \"outerwear\", promptHint: \"in a denim jacket\" },\n { id: \"wd-cardigan\", label: \"Cardigan\", dimension: \"outerwear\", promptHint: \"in a cardigan\" },\n // footwear\n { id: \"wd-sneakers\", label: \"Sneakers\", dimension: \"footwear\", promptHint: \"wearing sneakers\" },\n { id: \"wd-boots\", label: \"Boots\", dimension: \"footwear\", promptHint: \"wearing boots\" },\n { id: \"wd-heels\", label: \"Heels\", dimension: \"footwear\", promptHint: \"wearing heels\" },\n { id: \"wd-sandals\", label: \"Sandals\", dimension: \"footwear\", promptHint: \"wearing sandals\" },\n { id: \"wd-dressshoe\", label: \"Dress Shoes\", dimension: \"footwear\", promptHint: \"wearing dress shoes\" },\n { id: \"wd-barefoot\", label: \"Barefoot\", dimension: \"footwear\", promptHint: \"barefoot\" },\n // headwear (multi)\n { id: \"wd-cap\", label: \"Cap\", dimension: \"headwear\", promptHint: \"wearing a cap\" },\n { id: \"wd-beanie\", label: \"Beanie\", dimension: \"headwear\", promptHint: \"wearing a beanie\" },\n { id: \"wd-widehat\", label: \"Wide-brim Hat\", dimension: \"headwear\", promptHint: \"wearing a wide-brim hat\" },\n { id: \"wd-hood\", label: \"Hood\", dimension: \"headwear\", promptHint: \"with the hood up\" },\n { id: \"wd-crown\", label: \"Crown\", dimension: \"headwear\", promptHint: \"wearing a crown\" },\n { id: \"wd-helmet\", label: \"Helmet\", dimension: \"headwear\", promptHint: \"wearing a helmet\" },\n // accessories (multi)\n { id: \"wd-glasses\", label: \"Glasses\", dimension: \"accessories\", promptHint: \"wearing glasses\" },\n { id: \"wd-sunglasses\", label: \"Sunglasses\", dimension: \"accessories\", promptHint: \"wearing sunglasses\" },\n { id: \"wd-scarf\", label: \"Scarf\", dimension: \"accessories\", promptHint: \"wearing a scarf\" },\n { id: \"wd-gloves\", label: \"Gloves\", dimension: \"accessories\", promptHint: \"wearing gloves\" },\n { id: \"wd-jewelry\", label: \"Jewelry\", dimension: \"accessories\", promptHint: \"wearing statement jewelry\" },\n { id: \"wd-belt\", label: \"Belt\", dimension: \"accessories\", promptHint: \"with a belt\" },\n { id: \"wd-watch\", label: \"Watch\", dimension: \"accessories\", promptHint: \"wearing a watch\" },\n // color-palette\n { id: \"wd-neutral\", label: \"Neutral\", dimension: \"color-palette\", promptHint: \"in a neutral color palette\" },\n { id: \"wd-all-black\", label: \"All Black\", dimension: \"color-palette\", promptHint: \"in an all-black palette\" },\n { id: \"wd-earth\", label: \"Earth Tones\", dimension: \"color-palette\", promptHint: \"in earth-tone colors\" },\n { id: \"wd-pastel\", label: \"Pastel\", dimension: \"color-palette\", promptHint: \"in pastel colors\" },\n { id: \"wd-jewel\", label: \"Jewel Tones\", dimension: \"color-palette\", promptHint: \"in rich jewel-tone colors\" },\n { id: \"wd-neon\", label: \"Neon\", dimension: \"color-palette\", promptHint: \"in vivid neon colors\" },\n { id: \"wd-all-white\", label: \"All White\", dimension: \"color-palette\", promptHint: \"in an all-white palette\" },\n // material\n { id: \"wd-cotton\", label: \"Cotton\", dimension: \"material\", promptHint: \"in cotton fabric\" },\n { id: \"wd-denim\", label: \"Denim\", dimension: \"material\", promptHint: \"in denim\" },\n { id: \"wd-leather\", label: \"Leather\", dimension: \"material\", promptHint: \"in leather\" },\n { id: \"wd-silk\", label: \"Silk\", dimension: \"material\", promptHint: \"in silk\" },\n { id: \"wd-wool\", label: \"Wool\", dimension: \"material\", promptHint: \"in wool\" },\n { id: \"wd-latex\", label: \"Latex\", dimension: \"material\", promptHint: \"in latex\" },\n { id: \"wd-linen\", label: \"Linen\", dimension: \"material\", promptHint: \"in linen\" },\n // era\n { id: \"wd-contemporary\", label: \"Contemporary\", dimension: \"era\", promptHint: \"in contemporary fashion\" },\n { id: \"wd-1920s\", label: \"1920s\", dimension: \"era\", promptHint: \"in 1920s fashion\" },\n { id: \"wd-1950s\", label: \"1950s\", dimension: \"era\", promptHint: \"in 1950s fashion\" },\n { id: \"wd-1980s\", label: \"1980s\", dimension: \"era\", promptHint: \"in 1980s fashion\" },\n { id: \"wd-victorian\", label: \"Victorian\", dimension: \"era\", promptHint: \"in Victorian-era dress\" },\n { id: \"wd-medieval\", label: \"Medieval\", dimension: \"era\", promptHint: \"in medieval dress\" },\n { id: \"wd-futuristic\", label: \"Futuristic\", dimension: \"era\", promptHint: \"in futuristic clothing\" },\n] as const\n\nconst BY_ID: Map<string, WardrobeEntry> = new Map(WARDROBE.map((e) => [e.id, e]))\n\n/** Entries grouped by dimension — precomputed once so per-dimension lookups\n * (the picker calls one per dimension per render) are O(1) with stable array\n * refs, instead of a full WARDROBE scan each call. */\nconst BY_DIMENSION: Map<WardrobeDimension, WardrobeEntry[]> = (() => {\n const map = new Map<WardrobeDimension, WardrobeEntry[]>()\n for (const e of WARDROBE) {\n const list = map.get(e.dimension)\n if (list) list.push(e)\n else map.set(e.dimension, [e])\n }\n return map\n})()\n\nexport function getWardrobeEntry(id: string | undefined | null): WardrobeEntry | undefined {\n return id ? BY_ID.get(id) : undefined\n}\n\nexport function getWardrobePromptHint(id: string | undefined | null): string {\n return getWardrobeEntry(id)?.promptHint ?? \"\"\n}\n\nexport function getWardrobeEntriesByDimension(dim: WardrobeDimension): WardrobeEntry[] {\n return BY_DIMENSION.get(dim) ?? []\n}\n\nexport function buildWardrobeHints(value: Record<string, unknown> & WardrobeValue): string[] {\n const hints: string[] = []\n for (const dimension of WARDROBE_DIMENSION_ORDER) {\n const field = WARDROBE_FIELD_BY_DIMENSION[dimension]\n const raw = value[field]\n if (MULTI_PICK.has(dimension)) {\n for (const id of pickIds(raw)) {\n if (NONE_IDS.has(id)) continue\n const h = getWardrobePromptHint(id)\n if (h) hints.push(h)\n }\n continue\n }\n const id = typeof raw === \"string\" ? raw : undefined\n if (!id || NONE_IDS.has(id)) continue\n const h = getWardrobePromptHint(id)\n if (h) hints.push(h)\n }\n return hints\n}\n","import { getCharacterMotion, CHARACTER_MOTION_MAX_PICKS, type CharacterMotionTiming } from \"./character-motion.js\"\n\nexport interface CharacterMotionDiagnostic {\n readonly code: \"unknown\" | \"omitted\" | \"retired\" | \"pose\" | \"visibility\" | \"hands\" | \"pace\" | \"requirements\" | \"compound\" | \"capacity\" | \"multiple-targets\" | \"roles\"\n readonly severity: \"error\" | \"warning\" | \"info\"\n readonly ids: readonly string[]\n readonly message: string\n}\nexport interface CharacterMotionBindings {\n readonly selfPairing?: boolean\n readonly subjectMinor?: boolean\n readonly partnerNames?: readonly string[]\n readonly targetNames?: readonly string[]\n}\n\n/** Shared by editor, API clients and local review. Missing metadata means\n * unknown; this never certifies a sequence or predicts clip duration. */\nexport function getCharacterMotionDiagnostics(\n value: string | readonly string[] | null | undefined,\n timing?: CharacterMotionTiming,\n bindings: CharacterMotionBindings = {},\n): readonly CharacterMotionDiagnostic[] {\n const requested = typeof value === \"string\" ? [value] : Array.isArray(value) ? [...new Set(value)] : []\n const result: CharacterMotionDiagnostic[] = []\n const add = (code: CharacterMotionDiagnostic[\"code\"], severity: CharacterMotionDiagnostic[\"severity\"], ids: readonly string[], message: string) => result.push({ code, severity, ids, message })\n if (requested.length > CHARACTER_MOTION_MAX_PICKS) add(\"capacity\", \"warning\", requested, \"Only the first three selections contribute. Remove extra selections.\")\n const picks = requested.slice(0, CHARACTER_MOTION_MAX_PICKS)\n for (const id of picks) if (!getCharacterMotion(id)) add(\"unknown\", \"error\", [id], `Motion “${id}” is unavailable and contributes no fragment. Remove or replace it.`)\n const entries = picks.flatMap(id => { const entry = getCharacterMotion(id); return entry?.promptHint ? [entry] : [] })\n const active = entries.filter(e => !bindings.subjectMinor || !e.adultOnly)\n if (bindings.selfPairing && active.some(e => e.twoPerson || e.counterpart)) add(\"roles\", \"error\", active.filter(e => e.twoPerson || e.counterpart).map(e => e.id), \"The same reference is connected as Target and Partner. Connect distinct participants before running this interaction.\")\n const omitted = entries.filter(e => bindings.subjectMinor && e.adultOnly)\n if (omitted.length) add(\"omitted\", active.length ? \"warning\" : \"error\", omitted.map(e => e.id), `${omitted.map(e => e.label).join(\", \")} omitted for a connected minor. ${active.length ? \"Replace these selections.\" : \"No selected motion contributes a fragment.\"}`)\n if ((bindings.targetNames?.length ?? 0) > 1) add(\"multiple-targets\", \"warning\", picks, \"Each target performs a separate copy of the sequence. Use separate motion nodes for coordinated choreography.\")\n for (const entry of active) {\n if (entry.deprecated) add(\"retired\", \"warning\", [entry.id], `${entry.label} is retired from new choices but still resolves in saved workflows.${entry.replacementId ? ` Use ${getCharacterMotion(entry.replacementId)?.label ?? entry.replacementId}.` : \"\"}`)\n if (entry.fixedPace && timing?.pace && timing.pace !== \"auto\") add(\"pace\", \"warning\", [entry.id], `${entry.label} sets its own timing. Set Pace to Auto or replace the motion.`)\n if (entry.requires?.length) add(\"requirements\", \"info\", [entry.id], `${entry.label} requires: ${entry.requires.join(\", \")}.${entry.twoPerson || entry.counterpart ? bindings.partnerNames?.length ? ` Partner reference: ${bindings.partnerNames.join(\", \")}; confirm it matches the required recipient.` : \" Connect a Partner reference to identify the recipient; otherwise the model chooses it.\" : \" Establish these in the scene or prompt; the fragment does not supply reference media.\"}`)\n }\n for (let i = 1; i < active.length; i++) {\n const before = active[i - 1]!, after = active[i]!, ids = [before.id, after.id]\n if (before.endVisibility === \"out-of-frame\") add(\"visibility\", \"warning\", ids, `${before.label} ends out of view before ${after.label}. Reorder or add an entrance.`)\n if (before.endPose && after.startPose && before.endPose !== \"any\" && after.startPose !== \"any\" && before.endPose !== after.startPose) add(\"pose\", \"warning\", ids, `${before.label} ends ${before.endPose}; ${after.label} starts ${after.startPose}. Add a transition or replace a motion.`)\n if (before.handsAfter && before.handsAfter !== \"free\" && after.needsFreeHands) add(\"hands\", \"warning\", ids, `${before.label} leaves hands occupied; ${after.label} needs free hands. Add a release first.`)\n }\n const compound = active.filter(e => e.kind === \"compound\")\n if (compound.length) add(\"compound\", \"warning\", compound.map(e => e.id), `${compound.length} selection${compound.length === 1 ? \" is\" : \"s are\"} compound choreography. Short clips may not fit every phase; test the sequence before adding more actions.`)\n return result\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { curatedFurnitureText, curatedWeaponText, curatedVehicleText, curatedAnimalTerm, curatedAnimalPromptHint } from './chunk-VJYKE6AY.js';
2
- import { getRegisteredPickerCatalogs, composeCameraMotionHintFromConnections, readTransitionOptionValues, composeTransitionHintFromConnections, composeCharacterFxHintFromConnections, composeCharacterMotionHintFromConnections, getPickerCatalog, buildPostProcessHints, buildExposureHints, buildTemporalHints, buildAestheticHints, buildPhotographerHints, buildHeldPropHints, buildMaterialHints, buildActionFxHints, buildAtmosphereHints, buildStylingHints, buildPoseHints, buildMoodHints, buildVoiceDeliveryHints, buildVoiceCharacterHints, buildInstrumentationHints, buildMusicMoodHints, buildMusicGenreHints, buildLightingHints, buildFramingHints, getCompositionEffectTerm, getCompositionEffectPromptHint, getRenderQualityTerm, getRenderQualityPromptHint, getEraTerm, getEraPromptHint, getBackdropTerm, getBackdropPromptHint, getPhotoGenreTerm, getPhotoGenrePromptHint, getLoopSubjectTerm, getLoopSubjectPromptHint, getSettingTerm, getSettingPromptHint, getStyleTerm, getStyleVideoPromptHint, getStylePromptHint, getColorLookTerm, getColorLookPromptHint, getCameraFormatTerm, getCameraFormatPromptHint, getLensTerm, getLensPromptHint } from './chunk-3XSB5YDY.js';
1
+ import { curatedFurnitureText, curatedWeaponText, curatedVehicleText, curatedAnimalTerm, curatedAnimalPromptHint } from './chunk-VBCVQPQ4.js';
2
+ import { getRegisteredPickerCatalogs, composeCameraMotionHintFromConnections, readTransitionOptionValues, composeTransitionHintFromConnections, composeCharacterFxHintFromConnections, composeCharacterMotionHintFromConnections, getPickerCatalog, buildPostProcessHints, buildExposureHints, buildTemporalHints, buildAestheticHints, buildPhotographerHints, buildHeldPropHints, buildMaterialHints, buildActionFxHints, buildAtmosphereHints, buildStylingHints, buildPoseHints, buildMoodHints, buildVoiceDeliveryHints, buildVoiceCharacterHints, buildInstrumentationHints, buildMusicMoodHints, buildMusicGenreHints, buildLightingHints, buildFramingHints, getCompositionEffectTerm, getCompositionEffectPromptHint, getRenderQualityTerm, getRenderQualityPromptHint, getEraTerm, getEraPromptHint, getBackdropTerm, getBackdropPromptHint, getPhotoGenreTerm, getPhotoGenrePromptHint, getLoopSubjectTerm, getLoopSubjectPromptHint, getSettingTerm, getSettingPromptHint, getStyleTerm, getStyleVideoPromptHint, getStylePromptHint, getColorLookTerm, getColorLookPromptHint, getCameraFormatTerm, getCameraFormatPromptHint, getLensTerm, getLensPromptHint } from './chunk-H322GC7M.js';
3
3
  import { joinHintFragments } from './chunk-DVP6ILDR.js';
4
4
  import { getRegisteredPeople, ADULT_AGE_IDS, MINOR_IMPLYING_TYPE_IDS, isMinorAge, buildPersonHints } from './chunk-TDZFXOTE.js';
5
5
  import { resolveTerm } from './chunk-XAMHEW76.js';
@@ -412,5 +412,5 @@ function resolveBaseHint(type, data, mode = "full", surface = "image") {
412
412
  }
413
413
 
414
414
  export { ADULT_SWEPT_CATALOG_IDS, FLOORED_PICKER_KEYS, RETIRED_ADULT_ONLY_HINT_STRINGS, applyMinorAgeFloorToPickerValues, buildNeedleAlternationSource, containsMinorAgeHint, getAdultOnlyEntries, getAdultOnlyHintStrings, getAdultOnlyIds, getCharacterMotionBindings, getMinorAgeHintStrings, getParameterPromptHint };
415
- //# sourceMappingURL=chunk-IXBTD2LW.js.map
416
- //# sourceMappingURL=chunk-IXBTD2LW.js.map
415
+ //# sourceMappingURL=chunk-EUU5W7XR.js.map
416
+ //# sourceMappingURL=chunk-EUU5W7XR.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/age-floor.ts","../src/parameter-prompt-hint.ts"],"names":[],"mappings":";;;;;;;AAoCO,IAAM,0BAA0B,CAAC,SAAA,EAAW,MAAA,EAAQ,MAAA,EAAQ,eAAe,kBAAkB;AAGpG,IAAM,0BAAA,GAAkD,IAAI,GAAA,CAAI,uBAAuB,CAAA;AAMvF,SAAS,UAAU,OAAA,EAAqD;AACtE,EAAA,IAAI,QAAQ,IAAA,KAAS,QAAA,EAAU,OAAO,OAAA,CAAQ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AAAA,IAIA,KAAK,MAAA;AACH,MAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,CAAA,CAAE,IAAA,EAAK;AAAA,IAC/B,KAAK,aAAA;AAKH,MAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,CAAA,CAAE,IAAA,EAAK;AAAA,IAC/B,KAAK,aAAA;AACH,MAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,CAAA,CAAE,IAAA,EAAK;AAAA,IAC/B;AACE,MAAA,OAAO,EAAA;AAAA;AAEb","file":"chunk-IXBTD2LW.js","sourcesContent":["/**\n * The minor-age floor — Layer 1 of spec 2026-09-01-app-reports-triage-design.md\n * §3.3 (W1-a). Content-free: this module decides WHICH catalog entries a minor\n * subject may not carry; the clause a deployment appends lives in its\n * registered PromptPolicy (backend/src/lib/prompt-policies/), never here.\n *\n * `ADULT_ONLY_FLAG`, `ADULT_AGE_IDS`, `MINOR_IMPLYING_TYPE_IDS` and\n * `isMinorAge` live in the import-free leaf `age-signal.ts` and are\n * re-exported here unchanged — this module's own catalog-funnel imports\n * (`person-packs.js`, `picker-catalogs.js`) are exactly what `person.ts` /\n * `styling.ts` must NOT reach through, on pain of reopening the\n * person → age-floor → picker-catalogs load-time cycle (see `age-signal.ts`'s\n * header). `person.ts` / `styling.ts` import `isMinorAge` from\n * `age-signal.ts` directly instead of from here.\n */\n\nimport { getRegisteredPeople } from \"./person-packs.js\"\nimport { getRegisteredPickerCatalogs, type PickerCatalog, type PickerOption } from \"./picker-catalogs.js\"\nimport { isMinorAge, ADULT_AGE_IDS, MINOR_IMPLYING_TYPE_IDS } from \"./age-signal.js\"\n\nexport { ADULT_ONLY_FLAG, ADULT_AGE_IDS, MINOR_IMPLYING_TYPE_IDS, isMinorAge } from \"./age-signal.js\"\n\n/** Shape shared by every catalog entry the floor reads. */\nexport interface AdultOnlyEntry {\n readonly id: string\n readonly promptHint: string\n readonly term?: string\n readonly adultOnly?: true\n}\n\n/** The picker catalogs (by `catalogId`) this floor sweeps beside person.\n * Exported because it is the SINGLE source of truth for two things that used\n * to be maintained by hand and drifted: which catalogs `getAdultOnlyEntries`\n * sweeps for the flag, and which analyzer keys `FLOORED_PICKER_KEYS` strips\n * flagged ids out of (a `photo-genre` swept for the flag but absent from the\n * strip list let `glamour-portrait` survive on a minor). */\nexport const ADULT_SWEPT_CATALOG_IDS = [\"styling\", \"mood\", \"pose\", \"photo-genre\", \"character-motion\"] as const\n\n/** Membership form of the list above (the sweep does one lookup per catalog). */\nconst ADULT_SWEPT_CATALOG_ID_SET: ReadonlySet<string> = new Set(ADULT_SWEPT_CATALOG_IDS)\n\n/** Flatten a catalog's options regardless of shape: single-dim catalogs carry\n * `options` directly, multi-dim ones carry `dimensions[].options` (mirrors\n * `applyDeny` in catalog-packs.ts, the other consumer that has to handle\n * both shapes). */\nfunction optionsOf(catalog: PickerCatalog): ReadonlyArray<PickerOption> {\n if (catalog.kind === \"single\") return catalog.options ?? []\n return (catalog.dimensions ?? []).flatMap((d) => d.options)\n}\n\n/** Every entry, across the swept catalogs, that carries the flag. Reads every\n * catalog through the pack-composed funnel — `getRegisteredPeople()` for\n * person, `getRegisteredPickerCatalogs()` for styling/mood/pose/photo-genre —\n * so a pack-added or pack-replaced entry is included. */\nexport function getAdultOnlyEntries(): ReadonlyArray<AdultOnlyEntry> {\n const catalogEntries = getRegisteredPickerCatalogs()\n .filter((c) => ADULT_SWEPT_CATALOG_ID_SET.has(c.catalogId))\n .flatMap(optionsOf)\n const all: ReadonlyArray<AdultOnlyEntry> = [...getRegisteredPeople(), ...catalogEntries]\n return all.filter((e) => e.adultOnly === true)\n}\n\n/** The set of flagged ids (fast membership for the collectors). */\nexport function getAdultOnlyIds(): ReadonlySet<string> {\n return new Set(getAdultOnlyEntries().map((e) => e.id))\n}\n\n/**\n * The pre-rework `promptHint` of every `adultOnly` entry the spec\n * (2026-09-01-app-reports-triage-design §3.3) listed for rewording — including\n * `eye-state-half-lidded` and `feature-collarbone-visible`, which the W1-b\n * harness initially left byte-identical (0/10 and 0/22 render rate under\n * either wording) and a 2026-09-03 replay then found renderable wordings for\n * — plus the hard-coded midriff+navel fold clause. These strings are permanently part of the strip\n * set: a consumer that has not bumped `@nodaro/prompts` still emits them, and\n * the client-assembled `seedPrompt` path is exactly how the 2026-07-30\n * minor-age prompts reached a provider. Retiring can only ever cause an EXTRA\n * strip, and only for a subject `isMinorAge` has already judged a minor — so\n * the list only grows, never shrinks.\n *\n * `promptHint` ONLY, for the same reason `getAdultOnlyHintStrings` gives:\n * `term` is short display vocabulary and the composed-catalog projection\n * back-fills a derived `term` for every option, so terms collide with benign\n * everyday text. Assembled prompts and client seedPrompts are built from\n * hints, never from terms. The three W1-b entries that are NOT flagged —\n * `texture-dewy`, `texture-baby-soft`, `eye-state-staring-camera` (spec\n * §3.3's \"deliberately not flagged\" list) — are absent: their old wording\n * never belonged to the floor.\n *\n * 15 flagged hints + the fold literal = 16.\n */\nexport const RETIRED_ADULT_ONLY_HINT_STRINGS: ReadonlyArray<string> = [\n // bust-very-full\n \"very full bust\",\n // silhouette-hourglass\n \"hourglass silhouette\",\n // waist-defined\n \"defined waist\",\n // lip-state-glossy\n \"with high-shine glossy wet-look lips\",\n // lip-state-parted\n \"with lips slightly parted, taking a soft breath\",\n // lip-state-bitten\n \"playfully biting the lower lip\",\n // eye-state-half-lidded\n \"with heavy half-lidded sleepy eyes\",\n // texture-glistening\n \"with glistening skin, sweat or oil catching the light\",\n // texture-shower-fresh-wet\n \"with just-out-of-the-shower wet skin, water beading on the surface and rolling in slow droplets down the curves of the body\",\n // feature-bare-shoulders\n \"with bare shoulders exposed, the line of the collarbone and shoulder muscles uncovered\",\n // feature-collarbone-visible\n \"with a prominent collarbone clearly defined and catching the light\",\n // feature-midriff-visible\n \"wearing a cropped style with the midriff visible\",\n // state-fitted — the 2026-07-30 incident clause\n \"the clothing fitted and form-conscious, hugging the contours of the body\",\n // state-wet\n \"the clothing soaked and wet, the fabric clinging to the body and dripping water\",\n // pose `biting-lip` (the lip-state-bitten twin)\n \"biting the lower lip with a subtle playful expression\",\n // the hard-coded midriff+navel fold in emitIndependentFragments — not any\n // entry's hint, so retiring it ADDS a needle for a clause that really is\n // emitted verbatim.\n \"wearing a cropped style, midriff and navel visible\",\n]\n\n/** Every full prompt-hint string a flagged entry can inject, lower-cased,\n * longest first — the backend policy strips text that contains any of them\n * (Layer 2), which is how flagged wording arriving inside free text (a\n * client-assembled seedPrompt) is caught. Seeded with\n * `RETIRED_ADULT_ONLY_HINT_STRINGS` so a catalog rewording can never narrow\n * the strip set for a consumer still shipping the pre-rephrase wording.\n *\n * `promptHint` ONLY, deliberately — `term` is analyzer/UI vocabulary\n * (compact-mode display), and `picker-catalogs.ts`'s composed-catalog\n * projection back-fills a `term` for EVERY option via `deriveTerm(label)`\n * when no explicit term was authored (e.g. \"lounging\", \"cropped top\",\n * \"school uniform\", \"lying down\"). Those short, generic derived terms are\n * exactly the kind of everyday word that collides with unrelated, benign\n * text and over-strips it. Assembled prompts and client seedPrompts are\n * built from HINTS, never from terms, so hints are the only strings that\n * can actually arrive verbatim in free text — terms don't need to be (and\n * must not be) swept here. */\nexport function getAdultOnlyHintStrings(): ReadonlyArray<string> {\n const out = new Set<string>(RETIRED_ADULT_ONLY_HINT_STRINGS)\n for (const e of getAdultOnlyEntries()) {\n if (e.promptHint) out.add(e.promptHint.toLowerCase())\n }\n return [...out].filter((s) => s.length >= 8).sort((a, b) => b.length - a.length)\n}\n\n/**\n * Every full prompt-hint string that DESCRIBES A MINOR — the mirror of\n * `getAdultOnlyHintStrings`, and the needle list for the TEXT signal below.\n *\n * Why a text signal exists at all: `isMinorAge` reads the structured picker\n * value, and the P0 arrival path does not have one. A thin client can create a\n * character row carrying only `{nodeId, name, projectId}` and send the picker\n * selection as an already-assembled `seedPrompt`, so `row.person === null`\n * while the prompt itself says \"a young child around 5 years old\". That client\n * assembles the text FROM THESE HINTS, which is exactly why the catalog is the\n * drift-proof needle list: a new minor age entry is swept the day it is added,\n * with no second list to remember.\n *\n * Selection is DERIVED, never hand-listed: an `age` entry is a minor unless its\n * id is in the `ADULT_AGE_IDS` allow-list (so a new age id is inside the floor\n * by default — same ratchet as `isMinorAge`), plus every `type` entry named by\n * `MINOR_IMPLYING_TYPE_IDS`. Read through the pack-composed funnel\n * (`getRegisteredPeople()`), so a deployment pack's entries are swept too.\n *\n * `promptHint` ONLY — never `term` and never `label`, for the same reason\n * `getAdultOnlyHintStrings` gives: `term` is short display vocabulary\n * (\"in their teens\" as a compact chip) and the composed-catalog projection\n * back-fills a derived `term` for every option, so terms collide with benign\n * text. The `>= 8` filter drops `age-custom`'s empty hint (`\"\"`), which would\n * otherwise match every string ever written.\n */\nlet cachedMinorHints: ReadonlyArray<string> | null = null\nlet cachedMinorHintSourceCount = -1\nexport function getMinorAgeHintStrings(): ReadonlyArray<string> {\n const people = getRegisteredPeople()\n if (cachedMinorHints && cachedMinorHintSourceCount === people.length) return cachedMinorHints\n const out = new Set<string>()\n for (const e of people) {\n const minorAge = e.dimension === \"age\" && !ADULT_AGE_IDS.has(e.id)\n const minorType = e.dimension === \"type\" && MINOR_IMPLYING_TYPE_IDS.has(e.id)\n if (!minorAge && !minorType) continue\n if (e.promptHint) out.add(e.promptHint.toLowerCase())\n }\n cachedMinorHintSourceCount = people.length\n cachedMinorHints = [...out].filter((s) => s.length >= 8).sort((a, b) => b.length - a.length)\n return cachedMinorHints\n}\n\nfunction escapeReSource(s: string): string {\n return s.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")\n}\n\n/** One needle's regex source: the phrase's tokens — split on whitespace AND\n * hyphens — escaped and rejoined by `[\\s-]+`, so it matches however the text\n * that carries it happened to be spaced or hyphenated. */\nfunction needleTokenSource(needle: string): string {\n return needle\n .trim()\n .split(/[\\s-]+/)\n .filter((t) => t.length > 0)\n .map(escapeReSource)\n .join(\"[\\\\s-]+\")\n}\n\n/**\n * The word-bounded alternation SOURCE for a needle list — the one place both\n * layers of the floor build their matcher, so they can never disagree about\n * what \"the same phrase\" means.\n *\n * Two properties, both load-bearing:\n * - **Separator tolerance.** A catalog hint is authored with single spaces\n * (\"very full bust\"), but the free text that carries it is written by a\n * human or an LLM and arrives as \"very-full bust\" or \"very full bust\".\n * A literal alternation misses those, and a miss is a flagged phrase\n * reaching the provider on a minor's prompt. Each needle's tokens are\n * joined by `[\\s-]+`, which requires AT LEAST one separator — so\n * \"very fullbust\" (no separator at all) is still not a match, and the\n * phrase can't silently widen into a substring rule.\n * - **Word boundaries.** `(?<![\\w-])` / `(?![\\w-])` keep a needle from\n * gluing onto an adjacent word's characters (\"mesh tops\" must survive a\n * \"mesh top\" needle).\n *\n * Ordering is the CALLER's: pass needles longest-first so the alternation\n * consumes the longest match at a given position instead of leaving debris.\n * Returns `null` when there is nothing to match (an empty list would otherwise\n * compile to `(?:)`, which matches everywhere). Flags are the caller's too —\n * `\"i\"` for a `.test()` instance, `\"gi\"` for one used with `String.replace`.\n */\nexport function buildNeedleAlternationSource(needles: ReadonlyArray<string>): string | null {\n const alts = needles.map(needleTokenSource).filter((s) => s.length > 0)\n if (alts.length === 0) return null\n return `(?<![\\\\w-])(?:${alts.join(\"|\")})(?![\\\\w-])`\n}\n\n/** Needle alternation over `getMinorAgeHintStrings()`, word-bounded on both\n * sides so a hint can only match a whole phrase. Deliberately NOT global:\n * this instance is only ever `.test()`ed, and a `/g` regex would carry\n * `lastIndex` across calls. Cached by needle count (packs are registered\n * before the first prompt is assembled). */\nlet cachedMinorNeedleRe: RegExp | null = null\nlet cachedMinorNeedleCount = -1\nfunction minorNeedleRegex(): RegExp | null {\n const needles = getMinorAgeHintStrings()\n if (cachedMinorNeedleRe && cachedMinorNeedleCount === needles.length) return cachedMinorNeedleRe\n cachedMinorNeedleCount = needles.length\n const src = buildNeedleAlternationSource(needles)\n cachedMinorNeedleRe = src === null ? null : new RegExp(src, \"i\")\n return cachedMinorNeedleRe\n}\n\n/**\n * NUMBER-FIRST age shapes: the ones `buildAgeFragment` (person.ts) emits for a\n * CUSTOM age (\"N years old\", \"N year old\", \"N-year-old\") and the catalog's own\n * \"2-3 years old\" range (the FIRST number decides), plus the colloquial tails a\n * human or an LLM writes instead — \"12yo\", \"12 yo\", \"12 y.o.\", \"12 y/o\",\n * \"12 yr old\", \"12-yr-old\", \"12yrs old\", \"12 years of age\". The cut is `< 20`,\n * the same boundary `isMinorAge` uses for `customAge` and the same one\n * `buildAgeFragment` switches to \"in their teens\" at.\n *\n * Both boundaries are load-bearing. The LEADING one stops a match inside a\n * larger token; the TRAILING one is what makes \"a 5 year older sibling\" a\n * non-hit (\"old\" may not glue onto \"older\") and what stops \"yo\" from firing\n * inside \"12 young\" or \"12 yoga\". Used via `matchAll`, which clones the regex\n * rather than advancing this instance's `lastIndex`.\n */\nconst NUMERIC_AGE_RE =\n /(?<![\\w-])(\\d{1,3})(?:\\s*-\\s*\\d{1,3})?\\s*-?\\s*(?:years?\\s*-?\\s*old|yrs?\\s*-?\\s*old|y(?:\\.\\s*o\\.?|\\/o|o)|years?\\s+of\\s+age)(?![\\w-])/gi\n\n/**\n * AGE-FIRST shapes, where the number trails the word instead of leading it:\n * \"age 12\", \"aged 12\", \"at the age of 12\". The leading boundary is what keeps\n * \"image 12\" / \"page 12\" out (the `age` there is glued to a preceding word\n * character), and the trailing one keeps \"aged 12th\" out.\n */\nconst PREFIXED_AGE_RE = /(?<![\\w-])aged?\\s+(?:of\\s+)?(\\d{1,3})(?![\\w-])/gi\n\n/** Every rule that reads a NUMBER out of the text, each capturing the age in\n * group 1. Iterated together below so a new shape is one array entry. */\nconst AGE_NUMBER_RULES: ReadonlyArray<RegExp> = [NUMERIC_AGE_RE, PREFIXED_AGE_RE]\n\n/** The one NON-numeric shape `buildAgeFragment` emits below 20 (`${n} years\n * old, in their teens`). Kept as its own rule rather than as a catalog term.\n * Separator-tolerant on the same terms as the needle alternation, so\n * \"in their teens\" and \"in-their-teens\" are the same phrase. */\nconst IN_THEIR_TEENS_RE = /(?<![\\w-])in[\\s-]+their[\\s-]+teens(?![\\w-])/i\n\n/**\n * True when free text describes a MINOR subject. Three rules, in order:\n * 1. any minor-age / minor-implying-type prompt hint, word-bounded;\n * 2. a numeric age below 20 in any shape `buildAgeFragment` emits;\n * 3. the literal \"in their teens\".\n *\n * Deliberately NOT a bare-word check: \"child\", \"teen\", \"kid\" alone must never\n * fire, or an adult prompt that merely MENTIONS a child (\"a mother holding her\n * child\") would be floored — the spec's \"adults are byte-identical\" is a hard\n * requirement, so every rule here is a full phrase or a bounded number.\n *\n * Pairs with `isMinorAge`, never replaces it: the structured picker value is\n * the primary signal; this catches the same subject when only the assembled\n * text survives.\n */\nexport function containsMinorAgeHint(text: string | null | undefined): boolean {\n if (typeof text !== \"string\" || text.trim().length === 0) return false\n const re = minorNeedleRegex()\n if (re && re.test(text)) return true\n for (const rule of AGE_NUMBER_RULES) {\n for (const m of text.matchAll(rule)) {\n const n = Number(m[1])\n if (Number.isFinite(n) && n < 20) return true\n }\n }\n return IN_THEIR_TEENS_RE.test(text)\n}\n\n/** The analyzer/import value keys the floor strips flagged ids out of:\n * `person` plus EVERY catalog the flag sweep reads. DERIVED, never\n * hand-listed — the hand-written version omitted `photo-genre` while the\n * sweep included it, so a minor kept `glamour-portrait`. The analyzer JSON is\n * keyed by picker type id (`describe-to-picker.ts`), which is the same string\n * as the catalog id, so this list IS the set of keys to visit. */\nexport const FLOORED_PICKER_KEYS = [\"person\", ...ADULT_SWEPT_CATALOG_IDS] as const\n\nfunction stripIds(obj: Record<string, unknown>, drop: ReadonlySet<string>): Record<string, unknown> {\n const out: Record<string, unknown> = {}\n for (const [k, v] of Object.entries(obj)) {\n if (typeof v === \"string\") {\n if (!drop.has(v)) out[k] = v\n } else if (Array.isArray(v)) {\n const kept = v.filter((x) => !(typeof x === \"string\" && drop.has(x)))\n if (kept.length > 0) out[k] = kept\n } else {\n out[k] = v\n }\n }\n return out\n}\n\n/** Analyzer / import post-filter: when the person value describes a minor,\n * remove every flagged id from the person, styling, pose and mood values.\n * Identity (same reference) for an adult. */\nexport function applyMinorAgeFloorToPickerValues<T extends Record<string, unknown>>(values: T): T {\n const person = values.person\n if (!person || typeof person !== \"object\" || !isMinorAge(person as { age?: string; customAge?: number; type?: string })) return values\n const drop = getAdultOnlyIds()\n const out: Record<string, unknown> = { ...values }\n for (const key of FLOORED_PICKER_KEYS) {\n const v = out[key]\n if (v && typeof v === \"object\" && !Array.isArray(v)) out[key] = stripIds(v as Record<string, unknown>, drop)\n }\n return out as T\n}\n","import type { HintNodeLike, HintEdgeLike, HintGraphContext } from \"@nodaro/shared/types\"\nexport type { HintNodeLike, HintEdgeLike, HintGraphContext }\n/**\n * Single source of truth for parameter-node prompt-hint text.\n *\n * Every parameter node (framing, lens, camera-format, lighting, color-look,\n * atmosphere, style, setting, person, mood, pose, styling, temporal, tone,\n * text-prompt, camera-motion) dispatches through `getParameterPromptHint` to\n * produce the descriptive clause it contributes to a consumer's prompt.\n *\n * The frontend DAG executor and backend workflow orchestrator both call this,\n * so the text injected via the `cinematography` handle is identical to the\n * text injected when the node is wired directly into a Text Prompt / LLM Chat\n * / Combine Text input.\n *\n * Camera-motion is graph-aware: when `ctx` is provided the function walks the\n * node's `startState`/`endState` incoming edges and composes a fully formed\n * sentence via `composeCameraMotionHintFromConnections`. Without `ctx` only\n * the bare motion description is returned.\n */\n\nimport { buildFramingHints } from \"./framing.js\"\nimport { buildLightingHints } from \"./lighting.js\"\nimport { getLensPromptHint, getLensTerm } from \"./lens.js\"\nimport { getCameraFormatPromptHint, getCameraFormatTerm } from \"./camera-format.js\"\nimport { getColorLookPromptHint, getColorLookTerm } from \"./color-look.js\"\nimport { buildAtmosphereHints } from \"./atmosphere.js\"\nimport { buildActionFxHints } from \"./action-fx.js\"\nimport { getStylePromptHint, getStyleTerm, getStyleVideoPromptHint } from \"./style.js\"\nimport { getSettingPromptHint, getSettingTerm } from \"./setting.js\"\nimport { getLoopSubjectPromptHint, getLoopSubjectTerm } from \"./loop-subject.js\"\nimport { buildPersonHints } from \"./person.js\"\nimport { buildMoodHints } from \"./mood.js\"\nimport { buildPoseHints } from \"./pose.js\"\nimport { buildStylingHints } from \"./styling.js\"\nimport { buildTemporalHints } from \"./temporal.js\"\nimport { composeCameraMotionHintFromConnections } from \"./camera-motions.js\"\nimport { joinHintFragments } from \"./hint-join.js\"\nimport { composeTransitionHintFromConnections, readTransitionOptionValues, type TransitionDuration, type TransitionIntensity, type TransitionPosition, type TransitionTiming } from \"./transitions.js\"\nimport { composeCharacterFxHintFromConnections, type CharacterFxDuration, type CharacterFxIntensity, type CharacterFxPosition, type CharacterFxTiming } from \"./character-fx.js\"\nimport { composeCharacterMotionHintFromConnections, type CharacterMotionPace, type CharacterMotionPosition, type CharacterMotionTiming } from \"./character-motion.js\"\nimport { containsMinorAgeHint, isMinorAge } from \"./age-floor.js\"\nimport { buildMaterialHints } from \"./materials.js\"\nimport { curatedAnimalPromptHint, curatedAnimalTerm, curatedVehicleText, curatedWeaponText, curatedFurnitureText } from \"./shared-catalog-overlay.js\"\nimport { getPhotoGenrePromptHint, getPhotoGenreTerm } from \"./photo-genre.js\"\nimport { getBackdropPromptHint, getBackdropTerm } from \"./backdrop.js\"\nimport { buildHeldPropHints } from \"./held-prop.js\"\nimport { buildPhotographerHints } from \"./photographer.js\"\nimport { buildAestheticHints } from \"./aesthetic.js\"\nimport { getEraPromptHint, getEraTerm } from \"./era.js\"\nimport { buildExposureHints } from \"./exposure-settings.js\"\nimport { getRenderQualityPromptHint, getRenderQualityTerm } from \"./render-quality.js\"\nimport { getCompositionEffectPromptHint, getCompositionEffectTerm } from \"./composition-effects.js\"\nimport { buildPostProcessHints } from \"./post-process-effects.js\"\nimport { buildMusicGenreHints } from \"./music-genre.js\"\nimport { buildMusicMoodHints } from \"./music-mood.js\"\nimport { buildInstrumentationHints } from \"./instrumentation.js\"\nimport { buildVoiceCharacterHints } from \"./voice-character.js\"\nimport { buildVoiceDeliveryHints } from \"./voice-delivery.js\"\nimport { getPickerCatalog } from \"./picker-catalogs.js\"\nimport { resolveTerm, type PickerHintMode } from \"./term.js\"\n\n\nfunction asStr(v: unknown): string {\n return typeof v === \"string\" ? v : \"\"\n}\n\n/** Extract the display name from a character / face / object / location ref node. */\nfunction extractCharacterRefName(node: HintNodeLike): string | undefined {\n const d = (node.data ?? {}) as Record<string, unknown>\n const candidates = [d.characterName, d.faceName, d.objectName, d.locationName]\n for (const v of candidates) {\n if (typeof v === \"string\" && v.trim().length > 0) return v.trim()\n }\n return undefined\n}\n\n/** Character Motion's name read: the shared character / face / object / location\n * read, then a creature's `creatureName`. Local to Character Motion so the\n * Character FX prompt, which shares `extractCharacterRefName`, stays unchanged. */\nfunction extractCharacterMotionRefName(node: HintNodeLike): string | undefined {\n const name = extractCharacterRefName(node)\n if (name) return name\n const creatureName = asStr(((node.data ?? {}) as Record<string, unknown>).creatureName).trim()\n return creatureName.length > 0 ? creatureName : undefined\n}\n\n/** Free-text fields a character / face / object / location ref node describes its subject in.\n * A creature ref uses the same `description` / `canonicalDescription` names. */\nconst REF_DESCRIPTION_FIELDS = [\"description\", \"seedPrompt\", \"canonicalDescription\"] as const\n\n/** True when a character / face / object / location ref node describes a minor:\n * its structured `person` age (the primary signal) or an age phrase in its\n * free-text description. Feeds the Character Motion floor (adult-only moves\n * dropped) — errs toward flooring, never toward letting an adult-only move through. */\nfunction extractCharacterRefMinor(node: HintNodeLike): boolean {\n const d = (node.data ?? {}) as Record<string, unknown>\n const person = d.person\n if (person && typeof person === \"object\" && !Array.isArray(person) && isMinorAge(person as Parameters<typeof isMinorAge>[0])) {\n return true\n }\n return REF_DESCRIPTION_FIELDS.some((field) => containsMinorAgeHint(asStr(d[field])))\n}\n\n/** The preview, diagnostics and execution use identical graph bindings. */\nexport function getCharacterMotionBindings(node: HintNodeLike, ctx?: HintGraphContext) {\n const targetNames: string[] = []\n const partnerNames: string[] = []\n const targetIds = new Set<string>()\n const partnerIds = new Set<string>()\n let subjectMinor = false\n for (const edge of ctx?.edges ?? []) {\n if (edge.target !== node.id || (edge.targetHandle !== \"target\" && edge.targetHandle !== \"partner\")) continue\n const src = ctx?.nodes.find(n => n.id === edge.source)\n if (!src) continue\n if (edge.targetHandle === \"target\") targetIds.add(src.id)\n else partnerIds.add(src.id)\n if (extractCharacterRefMinor(src)) subjectMinor = true\n const name = extractCharacterMotionRefName(src)\n if (!name) continue\n const names = edge.targetHandle === \"target\" ? targetNames : partnerNames\n if (!names.includes(name)) names.push(name)\n }\n return { targetNames, partnerNames, subjectMinor, selfPairing: [...targetIds].some(id => partnerIds.has(id)) }\n}\n\n/** Compose `[preText, mainHint, postText]` into a comma-joined string,\n * honoring the user's free-text fragments around the structured hint.\n * Helpers like `getStylePromptHint` that already include preText/postText\n * composition (build*Hints in mood/person/etc.) bypass this — they\n * return the fully-composed string directly. */\nfunction withCustomText(data: Record<string, unknown>, mainHint: string): string {\n const fragments: string[] = []\n const pre = typeof data.preText === \"string\" ? data.preText.trim() : \"\"\n if (pre) fragments.push(pre)\n if (mainHint) fragments.push(mainHint)\n const post = typeof data.postText === \"string\" ? data.postText.trim() : \"\"\n if (post) fragments.push(post)\n return joinHintFragments(fragments)\n}\n\n/**\n * The node-level hint mode a picker declares via `data.hintMode`.\n *\n * Only the two documented values count; anything else (a stale value, a typo,\n * a non-string) is treated as UNDECLARED and falls back — to the inherited\n * mode when the node is resolved as an upstream input, and to `\"full\"`\n * otherwise. Compact is opt-in, so an unrecognized value can never silently\n * shorten a prompt.\n */\nfunction readHintMode(data: Record<string, unknown>): PickerHintMode | undefined {\n const raw = data.hintMode\n return raw === \"compact\" || raw === \"full\" ? raw : undefined\n}\n\n/** Pick the full-hint or the compact-term getter for the active mode. */\nfunction byMode<T>(mode: PickerHintMode, full: T, compact: T): T {\n return mode === \"compact\" ? compact : full\n}\n\n/** How much a shot moves (the Motion node's three steps), as the clause it\n * adds to a video prompt; the compact form is the bare term. */\nconst MOTION_INTENSITY_HINTS: Readonly<Record<string, { readonly full: string; readonly compact: string }>> = {\n subtle: { full: \"subtle, gentle motion with slow, minimal movement\", compact: \"subtle motion\" },\n moderate: { full: \"moderate, natural motion at an even pace\", compact: \"moderate motion\" },\n dynamic: { full: \"dynamic, energetic motion with fast, pronounced movement\", compact: \"dynamic motion\" },\n}\n\n/**\n * Dispatch by parameter-node type to its prompt-hint string. For camera-motion,\n * pass `ctx` to include the composed start/end clauses; otherwise only the\n * bare motion description is returned.\n *\n * VERBOSITY — a picker node may set `data.hintMode` to `\"compact\"` to inject\n * its short professional `term` (\"whip pan left\", \"hard cut\") instead of the\n * long `promptHint`. Absent, or any unrecognized value, means `\"full\"`, whose\n * output is byte-identical to what this function returned before hint modes\n * existed. ONLY the base catalog fragment swaps: `preText`/`postText`, the\n * transition / camera-motion / character-fx timing and start-state/end-state\n * clauses, multi-pick joining and multi-dimension composition are emitted the\n * same way in both modes.\n *\n * SURFACE — `opts.surface: \"video\"` is for a caller folding the hint into ONE\n * video consumer's prompt (the canvas's video nodes): a Style node then injects\n * its video wording (`getStyleVideoPromptHint`). Absent (or `\"image\"`) is the\n * output this function always returned — what a still, a `{Label}` reference\n * and every preview of the node's own text read, since a node's own output\n * text has no single consumer. Every other node type ignores it.\n */\nexport function getParameterPromptHint(\n node: HintNodeLike | undefined,\n ctx?: HintGraphContext,\n opts?: ParameterHintOptions,\n): string {\n return resolveParameterHint(node, ctx, undefined, opts?.surface === \"video\" ? \"video\" : \"image\")\n}\n\n/** How `getParameterPromptHint` resolves a node. */\nexport interface ParameterHintOptions {\n /** The stage the hint is folded into. Absent = `\"image\"`. */\n readonly surface?: \"image\" | \"video\"\n}\n\n/**\n * The dispatch body. `inherited` carries the mode DOWN into the nodes wired to\n * a composer's `startState` / `endState` handles, so a compact transition\n * composes compact start/end clauses rather than mixing a term with two\n * paragraphs. A node that declares its own `hintMode` still wins over what it\n * inherits.\n */\nfunction resolveParameterHint(\n node: HintNodeLike | undefined,\n ctx?: HintGraphContext,\n inherited?: PickerHintMode,\n surface: \"image\" | \"video\" = \"image\",\n): string {\n if (!node?.type) return \"\"\n const data = (node.data ?? {}) as Record<string, unknown>\n const mode: PickerHintMode = readHintMode(data) ?? inherited ?? \"full\"\n\n if (node.type === \"camera-motion\") {\n const motionId = asStr(data.cameraMotion) || undefined\n if (!ctx) return withCustomText(data, composeCameraMotionHintFromConnections(motionId, [], [], mode))\n const startHints: string[] = []\n const endHints: string[] = []\n for (const edge of ctx.edges) {\n if (edge.target !== node.id) continue\n const src = ctx.nodes.find((n) => n.id === edge.source)\n if (!src) continue\n // Pass no ctx for nested resolution: startState/endState inputs are\n // themselves parameter nodes (framing/tone/etc.) that don't need graph\n // context, and avoiding recursion keeps the walk cycle-safe. The mode\n // rides down so the composed clause stays at one level of detail.\n const hint = resolveParameterHint(src, undefined, mode, surface)\n if (!hint) continue\n if (edge.targetHandle === \"startState\") startHints.push(hint)\n else if (edge.targetHandle === \"endState\") endHints.push(hint)\n }\n return withCustomText(data, composeCameraMotionHintFromConnections(motionId, startHints, endHints, mode))\n }\n\n if (node.type === \"transition\") {\n const raw = data.transition\n const transitionId: string | string[] | undefined =\n Array.isArray(raw)\n ? raw.filter((s): s is string => typeof s === \"string\" && s.length > 0)\n : (asStr(raw) || undefined)\n const timing: TransitionTiming = {\n position: asStr(data.position) as TransitionPosition | undefined,\n duration: asStr(data.duration) as TransitionDuration | undefined,\n intensity: asStr(data.intensity) as TransitionIntensity | undefined,\n }\n // A picked row's own options (a wipe's `wipeDirection`), off the same node data.\n const optionValues = readTransitionOptionValues(data)\n const hintOptions = optionValues ? { optionValues } : undefined\n if (!ctx) {\n return withCustomText(data, composeTransitionHintFromConnections(transitionId, [], [], timing, mode, hintOptions))\n }\n const startHints: string[] = []\n const endHints: string[] = []\n for (const edge of ctx.edges) {\n if (edge.target !== node.id) continue\n const src = ctx.nodes.find((n) => n.id === edge.source)\n if (!src) continue\n const hint = resolveParameterHint(src, undefined, mode, surface) // no ctx — cycle-safe\n if (!hint) continue\n if (edge.targetHandle === \"startState\") startHints.push(hint)\n else if (edge.targetHandle === \"endState\") endHints.push(hint)\n }\n return withCustomText(data, composeTransitionHintFromConnections(transitionId, startHints, endHints, timing, mode, hintOptions))\n }\n\n if (node.type === \"character-fx\") {\n const raw = data.characterFx\n const effectId: string | string[] | undefined =\n Array.isArray(raw)\n ? raw.filter((s): s is string => typeof s === \"string\" && s.length > 0)\n : (asStr(raw) || undefined)\n const timing: CharacterFxTiming = {\n position: asStr(data.position) as CharacterFxPosition | undefined,\n duration: asStr(data.duration) as CharacterFxDuration | undefined,\n intensity: asStr(data.intensity) as CharacterFxIntensity | undefined,\n }\n if (!ctx) {\n return withCustomText(data, composeCharacterFxHintFromConnections(effectId, [], timing, mode))\n }\n const targetNames: string[] = []\n for (const edge of ctx.edges) {\n if (edge.target !== node.id) continue\n if (edge.targetHandle !== \"target\") continue\n const src = ctx.nodes.find((n) => n.id === edge.source)\n if (!src) continue\n const name = extractCharacterRefName(src)\n if (name) targetNames.push(name)\n }\n return withCustomText(data, composeCharacterFxHintFromConnections(effectId, targetNames, timing, mode))\n }\n\n if (node.type === \"character-motion\") {\n const raw = data.characterMotion\n const motionId: string | string[] | undefined =\n Array.isArray(raw)\n ? raw.filter((s): s is string => typeof s === \"string\" && s.length > 0)\n : (asStr(raw) || undefined)\n const timing: CharacterMotionTiming = {\n position: asStr(data.position) as CharacterMotionPosition | undefined,\n pace: asStr(data.pace) as CharacterMotionPace | undefined,\n }\n if (!ctx) {\n return withCustomText(data, composeCharacterMotionHintFromConnections(motionId, [], [], timing, mode))\n }\n const { targetNames, partnerNames, subjectMinor } = getCharacterMotionBindings(node, ctx)\n return withCustomText(\n data,\n composeCharacterMotionHintFromConnections(motionId, targetNames, partnerNames, timing, mode, { subjectMinor }),\n )\n }\n\n const base = resolveBaseHint(node.type, data, mode, surface)\n if (base) return base\n // Pack-extend fallback: a single-dim pack entry the per-catalog getter (which\n // reads the frozen base array) can't resolve. Resolve it against the\n // registered (pack-composed) catalog's options. Composition already resolved\n // `PickerOption.term`; `resolveTerm` is idempotent over a resolved option and\n // is called anyway so a pack option that reached this array by some other\n // route still injects SOMETHING in compact mode rather than `undefined`.\n const cat = getPickerCatalog(node.type)\n if (cat?.kind === \"single\" && cat.valueField) {\n const id = typeof data[cat.valueField] === \"string\" ? (data[cat.valueField] as string) : \"\"\n const opt = cat.options?.find((o) => o.id === id)\n if (opt) return byMode(mode, surface === \"video\" ? (opt.videoPromptHint ?? opt.promptHint) : opt.promptHint, resolveTerm(opt))\n }\n return base\n}\n\n/**\n * Base (upstream) hint dispatch by node type — the per-catalog getters read the\n * frozen base arrays. Pack-added single-dim ids are resolved by the caller\n * against the registered (pack-composed) catalog.\n *\n * `mode` selects the base fragment only: the compact `get<Name>Term` getter /\n * `build<Name>Terms` builder instead of the verbose one. The `withCustomText`\n * wrapper, the builders' own pre/post composition, and the free-text node\n * types (tone / style-guide / text-prompt — user prose, not catalog copy) are\n * identical in both modes.\n */\nfunction resolveBaseHint(\n type: string,\n data: Record<string, unknown>,\n mode: PickerHintMode = \"full\",\n surface: \"image\" | \"video\" = \"image\",\n): string {\n switch (type) {\n case \"framing\":\n return withCustomText(data, buildFramingHints(data, false, mode).join(\", \"))\n case \"lighting\":\n return withCustomText(data, buildLightingHints(data, mode).join(\", \"))\n case \"lens\":\n return withCustomText(data, byMode(mode, getLensPromptHint, getLensTerm)(asStr(data.lens)))\n case \"camera-format\":\n return withCustomText(data, byMode(mode, getCameraFormatPromptHint, getCameraFormatTerm)(asStr(data.cameraFormat)))\n case \"color-look\":\n return withCustomText(data, byMode(mode, getColorLookPromptHint, getColorLookTerm)(asStr(data.colorLook)))\n\n // build*Hints in music-* / voice-* / mood / person / etc. compose\n // preText/postText internally — bypass the wrapper to avoid double-\n // composition.\n case \"music-genre\":\n return buildMusicGenreHints((data ?? {}) as Parameters<typeof buildMusicGenreHints>[0], mode)\n case \"music-mood\":\n return buildMusicMoodHints((data ?? {}) as Parameters<typeof buildMusicMoodHints>[0], mode)\n case \"instrumentation\":\n return buildInstrumentationHints((data ?? {}) as Parameters<typeof buildInstrumentationHints>[0], mode)\n case \"voice-character\":\n return buildVoiceCharacterHints((data ?? {}) as Parameters<typeof buildVoiceCharacterHints>[0], mode)\n case \"voice-delivery\":\n return buildVoiceDeliveryHints((data ?? {}) as Parameters<typeof buildVoiceDeliveryHints>[0], mode)\n case \"person\":\n return buildPersonHints(data, mode).join(\", \")\n case \"mood\":\n return buildMoodHints(data, mode).join(\", \")\n case \"pose\":\n return buildPoseHints(data, mode).join(\", \")\n case \"styling\":\n return buildStylingHints(data, mode).join(\", \")\n\n case \"atmosphere\":\n return withCustomText(data, buildAtmosphereHints(data.atmosphere, mode).join(\", \"))\n case \"action-fx\":\n return withCustomText(data, buildActionFxHints(data.actionFx, mode).join(\", \"))\n case \"style\":\n return withCustomText(data, byMode(mode, surface === \"video\" ? getStyleVideoPromptHint : getStylePromptHint, getStyleTerm)(asStr(data.style)))\n case \"setting\":\n return withCustomText(data, byMode(mode, getSettingPromptHint, getSettingTerm)(asStr(data.setting)))\n case \"loop-subject\":\n return withCustomText(data, byMode(mode, getLoopSubjectPromptHint, getLoopSubjectTerm)(asStr(data.loopSubject)))\n case \"material\":\n return withCustomText(data, buildMaterialHints(data.material, mode))\n // The four object-entity catalogs are owned by @nodaro/shared and overlaid\n // in shared-catalog-overlay.ts — the ONE module every prompt-text read of\n // them goes through (the subject fold uses it too). Each returns \"\" on a\n // miss, so the entry lookup is the module's job, not this switch's.\n case \"animal\":\n return withCustomText(data, byMode(mode, curatedAnimalPromptHint, curatedAnimalTerm)(asStr(data.animal)))\n case \"vehicle\": {\n const t = curatedVehicleText(asStr(data.vehicle))\n return withCustomText(data, byMode(mode, t.hint, t.term))\n }\n case \"weapon\": {\n const t = curatedWeaponText(asStr(data.weapon))\n return withCustomText(data, byMode(mode, t.hint, t.term))\n }\n case \"furniture\": {\n const t = curatedFurnitureText(asStr(data.furniture))\n return withCustomText(data, byMode(mode, t.hint, t.term))\n }\n case \"photo-genre\":\n return withCustomText(data, byMode(mode, getPhotoGenrePromptHint, getPhotoGenreTerm)(asStr(data.photoGenre)))\n case \"backdrop\":\n return withCustomText(data, byMode(mode, getBackdropPromptHint, getBackdropTerm)(asStr(data.backdrop)))\n case \"held-prop\":\n return withCustomText(data, buildHeldPropHints(data.heldProp, mode).join(\", \"))\n case \"photographer\":\n return withCustomText(data, buildPhotographerHints(data.photographer, mode))\n case \"aesthetic\":\n return withCustomText(data, buildAestheticHints(data.aesthetic, mode))\n case \"era\":\n return withCustomText(data, byMode(mode, getEraPromptHint, getEraTerm)(asStr(data.era)))\n case \"temporal\":\n return withCustomText(data, buildTemporalHints(data, mode).join(\", \"))\n case \"exposure-settings\":\n return withCustomText(data, buildExposureHints(data, mode).join(\", \"))\n case \"render-quality\":\n return withCustomText(data, byMode(mode, getRenderQualityPromptHint, getRenderQualityTerm)(asStr(data.renderQuality)))\n case \"composition-effects\":\n return withCustomText(data, byMode(mode, getCompositionEffectPromptHint, getCompositionEffectTerm)(asStr(data.compositionEffect)))\n case \"post-process-effects\":\n return withCustomText(data, buildPostProcessHints(data.postProcess, mode).join(\", \"))\n // Motion intensity: a Generation Settings node that a video node's\n // Settings input takes as a prompt fragment (video only).\n case \"motion\": {\n const hint = MOTION_INTENSITY_HINTS[asStr(data.motion)]\n return hint ? byMode(mode, hint.full, hint.compact) : \"\"\n }\n\n // Free text authored by the user, not catalog copy — there is no shorter\n // professional form to swap in, so these are identical in both modes.\n case \"tone\":\n return asStr(data.tone).trim()\n case \"style-guide\":\n // The node's whole purpose is injecting its style text into consumer\n // prompts; without this case, {Style Guide} refs stayed as literal\n // brace text and direct wires injected nothing (only fieldMappings\n // worked, via getParameterValue).\n return asStr(data.text).trim()\n case \"text-prompt\":\n return asStr(data.text).trim()\n default:\n return \"\"\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/age-floor.ts","../src/parameter-prompt-hint.ts"],"names":[],"mappings":";;;;;;;AAoCO,IAAM,0BAA0B,CAAC,SAAA,EAAW,MAAA,EAAQ,MAAA,EAAQ,eAA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B,KAAA,CAAM,IAAA,CAAK,MAAM,CAAC,CAAA;AACtD,MAAA,OAAO,OAAO,MAAA,CAAO,IAAA,EAAM,KAAK,IAAA,EAAM,IAAA,CAAK,OAAO,CAAA,GAAI,EAAA;AAAA,IACxD;AAAA;AAAA;AAAA,IAIA,KAAK,MAAA;AACH,MAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,CAAA,CAAE,IAAA,EAAK;AAAA,IAC/B,KAAK,aAAA;AAKH,MAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,CAAA,CAAE,IAAA,EAAK;AAAA,IAC/B,KAAK,aAAA;AACH,MAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,CAAA,CAAE,IAAA,EAAK;AAAA,IAC/B;AACE,MAAA,OAAO,EAAA;AAAA;AAEb","file":"chunk-EUU5W7XR.js","sourcesContent":["/**\n * The minor-age floor — Layer 1 of spec 2026-09-01-app-reports-triage-design.md\n * §3.3 (W1-a). Content-free: this module decides WHICH catalog entries a minor\n * subject may not carry; the clause a deployment appends lives in its\n * registered PromptPolicy (backend/src/lib/prompt-policies/), never here.\n *\n * `ADULT_ONLY_FLAG`, `ADULT_AGE_IDS`, `MINOR_IMPLYING_TYPE_IDS` and\n * `isMinorAge` live in the import-free leaf `age-signal.ts` and are\n * re-exported here unchanged — this module's own catalog-funnel imports\n * (`person-packs.js`, `picker-catalogs.js`) are exactly what `person.ts` /\n * `styling.ts` must NOT reach through, on pain of reopening the\n * person → age-floor → picker-catalogs load-time cycle (see `age-signal.ts`'s\n * header). `person.ts` / `styling.ts` import `isMinorAge` from\n * `age-signal.ts` directly instead of from here.\n */\n\nimport { getRegisteredPeople } from \"./person-packs.js\"\nimport { getRegisteredPickerCatalogs, type PickerCatalog, type PickerOption } from \"./picker-catalogs.js\"\nimport { isMinorAge, ADULT_AGE_IDS, MINOR_IMPLYING_TYPE_IDS } from \"./age-signal.js\"\n\nexport { ADULT_ONLY_FLAG, ADULT_AGE_IDS, MINOR_IMPLYING_TYPE_IDS, isMinorAge } from \"./age-signal.js\"\n\n/** Shape shared by every catalog entry the floor reads. */\nexport interface AdultOnlyEntry {\n readonly id: string\n readonly promptHint: string\n readonly term?: string\n readonly adultOnly?: true\n}\n\n/** The picker catalogs (by `catalogId`) this floor sweeps beside person.\n * Exported because it is the SINGLE source of truth for two things that used\n * to be maintained by hand and drifted: which catalogs `getAdultOnlyEntries`\n * sweeps for the flag, and which analyzer keys `FLOORED_PICKER_KEYS` strips\n * flagged ids out of (a `photo-genre` swept for the flag but absent from the\n * strip list let `glamour-portrait` survive on a minor). */\nexport const ADULT_SWEPT_CATALOG_IDS = [\"styling\", \"mood\", \"pose\", \"photo-genre\", \"character-motion\"] as const\n\n/** Membership form of the list above (the sweep does one lookup per catalog). */\nconst ADULT_SWEPT_CATALOG_ID_SET: ReadonlySet<string> = new Set(ADULT_SWEPT_CATALOG_IDS)\n\n/** Flatten a catalog's options regardless of shape: single-dim catalogs carry\n * `options` directly, multi-dim ones carry `dimensions[].options` (mirrors\n * `applyDeny` in catalog-packs.ts, the other consumer that has to handle\n * both shapes). */\nfunction optionsOf(catalog: PickerCatalog): ReadonlyArray<PickerOption> {\n if (catalog.kind === \"single\") return catalog.options ?? []\n return (catalog.dimensions ?? []).flatMap((d) => d.options)\n}\n\n/** Every entry, across the swept catalogs, that carries the flag. Reads every\n * catalog through the pack-composed funnel — `getRegisteredPeople()` for\n * person, `getRegisteredPickerCatalogs()` for styling/mood/pose/photo-genre —\n * so a pack-added or pack-replaced entry is included. */\nexport function getAdultOnlyEntries(): ReadonlyArray<AdultOnlyEntry> {\n const catalogEntries = getRegisteredPickerCatalogs()\n .filter((c) => ADULT_SWEPT_CATALOG_ID_SET.has(c.catalogId))\n .flatMap(optionsOf)\n const all: ReadonlyArray<AdultOnlyEntry> = [...getRegisteredPeople(), ...catalogEntries]\n return all.filter((e) => e.adultOnly === true)\n}\n\n/** The set of flagged ids (fast membership for the collectors). */\nexport function getAdultOnlyIds(): ReadonlySet<string> {\n return new Set(getAdultOnlyEntries().map((e) => e.id))\n}\n\n/**\n * The pre-rework `promptHint` of every `adultOnly` entry the spec\n * (2026-09-01-app-reports-triage-design §3.3) listed for rewording — including\n * `eye-state-half-lidded` and `feature-collarbone-visible`, which the W1-b\n * harness initially left byte-identical (0/10 and 0/22 render rate under\n * either wording) and a 2026-09-03 replay then found renderable wordings for\n * — plus the hard-coded midriff+navel fold clause. These strings are permanently part of the strip\n * set: a consumer that has not bumped `@nodaro/prompts` still emits them, and\n * the client-assembled `seedPrompt` path is exactly how the 2026-07-30\n * minor-age prompts reached a provider. Retiring can only ever cause an EXTRA\n * strip, and only for a subject `isMinorAge` has already judged a minor — so\n * the list only grows, never shrinks.\n *\n * `promptHint` ONLY, for the same reason `getAdultOnlyHintStrings` gives:\n * `term` is short display vocabulary and the composed-catalog projection\n * back-fills a derived `term` for every option, so terms collide with benign\n * everyday text. Assembled prompts and client seedPrompts are built from\n * hints, never from terms. The three W1-b entries that are NOT flagged —\n * `texture-dewy`, `texture-baby-soft`, `eye-state-staring-camera` (spec\n * §3.3's \"deliberately not flagged\" list) — are absent: their old wording\n * never belonged to the floor.\n *\n * 15 flagged hints + the fold literal = 16.\n */\nexport const RETIRED_ADULT_ONLY_HINT_STRINGS: ReadonlyArray<string> = [\n // bust-very-full\n \"very full bust\",\n // silhouette-hourglass\n \"hourglass silhouette\",\n // waist-defined\n \"defined waist\",\n // lip-state-glossy\n \"with high-shine glossy wet-look lips\",\n // lip-state-parted\n \"with lips slightly parted, taking a soft breath\",\n // lip-state-bitten\n \"playfully biting the lower lip\",\n // eye-state-half-lidded\n \"with heavy half-lidded sleepy eyes\",\n // texture-glistening\n \"with glistening skin, sweat or oil catching the light\",\n // texture-shower-fresh-wet\n \"with just-out-of-the-shower wet skin, water beading on the surface and rolling in slow droplets down the curves of the body\",\n // feature-bare-shoulders\n \"with bare shoulders exposed, the line of the collarbone and shoulder muscles uncovered\",\n // feature-collarbone-visible\n \"with a prominent collarbone clearly defined and catching the light\",\n // feature-midriff-visible\n \"wearing a cropped style with the midriff visible\",\n // state-fitted — the 2026-07-30 incident clause\n \"the clothing fitted and form-conscious, hugging the contours of the body\",\n // state-wet\n \"the clothing soaked and wet, the fabric clinging to the body and dripping water\",\n // pose `biting-lip` (the lip-state-bitten twin)\n \"biting the lower lip with a subtle playful expression\",\n // the hard-coded midriff+navel fold in emitIndependentFragments — not any\n // entry's hint, so retiring it ADDS a needle for a clause that really is\n // emitted verbatim.\n \"wearing a cropped style, midriff and navel visible\",\n]\n\n/** Every full prompt-hint string a flagged entry can inject, lower-cased,\n * longest first — the backend policy strips text that contains any of them\n * (Layer 2), which is how flagged wording arriving inside free text (a\n * client-assembled seedPrompt) is caught. Seeded with\n * `RETIRED_ADULT_ONLY_HINT_STRINGS` so a catalog rewording can never narrow\n * the strip set for a consumer still shipping the pre-rephrase wording.\n *\n * `promptHint` ONLY, deliberately — `term` is analyzer/UI vocabulary\n * (compact-mode display), and `picker-catalogs.ts`'s composed-catalog\n * projection back-fills a `term` for EVERY option via `deriveTerm(label)`\n * when no explicit term was authored (e.g. \"lounging\", \"cropped top\",\n * \"school uniform\", \"lying down\"). Those short, generic derived terms are\n * exactly the kind of everyday word that collides with unrelated, benign\n * text and over-strips it. Assembled prompts and client seedPrompts are\n * built from HINTS, never from terms, so hints are the only strings that\n * can actually arrive verbatim in free text — terms don't need to be (and\n * must not be) swept here. */\nexport function getAdultOnlyHintStrings(): ReadonlyArray<string> {\n const out = new Set<string>(RETIRED_ADULT_ONLY_HINT_STRINGS)\n for (const e of getAdultOnlyEntries()) {\n if (e.promptHint) out.add(e.promptHint.toLowerCase())\n }\n return [...out].filter((s) => s.length >= 8).sort((a, b) => b.length - a.length)\n}\n\n/**\n * Every full prompt-hint string that DESCRIBES A MINOR — the mirror of\n * `getAdultOnlyHintStrings`, and the needle list for the TEXT signal below.\n *\n * Why a text signal exists at all: `isMinorAge` reads the structured picker\n * value, and the P0 arrival path does not have one. A thin client can create a\n * character row carrying only `{nodeId, name, projectId}` and send the picker\n * selection as an already-assembled `seedPrompt`, so `row.person === null`\n * while the prompt itself says \"a young child around 5 years old\". That client\n * assembles the text FROM THESE HINTS, which is exactly why the catalog is the\n * drift-proof needle list: a new minor age entry is swept the day it is added,\n * with no second list to remember.\n *\n * Selection is DERIVED, never hand-listed: an `age` entry is a minor unless its\n * id is in the `ADULT_AGE_IDS` allow-list (so a new age id is inside the floor\n * by default — same ratchet as `isMinorAge`), plus every `type` entry named by\n * `MINOR_IMPLYING_TYPE_IDS`. Read through the pack-composed funnel\n * (`getRegisteredPeople()`), so a deployment pack's entries are swept too.\n *\n * `promptHint` ONLY — never `term` and never `label`, for the same reason\n * `getAdultOnlyHintStrings` gives: `term` is short display vocabulary\n * (\"in their teens\" as a compact chip) and the composed-catalog projection\n * back-fills a derived `term` for every option, so terms collide with benign\n * text. The `>= 8` filter drops `age-custom`'s empty hint (`\"\"`), which would\n * otherwise match every string ever written.\n */\nlet cachedMinorHints: ReadonlyArray<string> | null = null\nlet cachedMinorHintSourceCount = -1\nexport function getMinorAgeHintStrings(): ReadonlyArray<string> {\n const people = getRegisteredPeople()\n if (cachedMinorHints && cachedMinorHintSourceCount === people.length) return cachedMinorHints\n const out = new Set<string>()\n for (const e of people) {\n const minorAge = e.dimension === \"age\" && !ADULT_AGE_IDS.has(e.id)\n const minorType = e.dimension === \"type\" && MINOR_IMPLYING_TYPE_IDS.has(e.id)\n if (!minorAge && !minorType) continue\n if (e.promptHint) out.add(e.promptHint.toLowerCase())\n }\n cachedMinorHintSourceCount = people.length\n cachedMinorHints = [...out].filter((s) => s.length >= 8).sort((a, b) => b.length - a.length)\n return cachedMinorHints\n}\n\nfunction escapeReSource(s: string): string {\n return s.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")\n}\n\n/** One needle's regex source: the phrase's tokens — split on whitespace AND\n * hyphens — escaped and rejoined by `[\\s-]+`, so it matches however the text\n * that carries it happened to be spaced or hyphenated. */\nfunction needleTokenSource(needle: string): string {\n return needle\n .trim()\n .split(/[\\s-]+/)\n .filter((t) => t.length > 0)\n .map(escapeReSource)\n .join(\"[\\\\s-]+\")\n}\n\n/**\n * The word-bounded alternation SOURCE for a needle list — the one place both\n * layers of the floor build their matcher, so they can never disagree about\n * what \"the same phrase\" means.\n *\n * Two properties, both load-bearing:\n * - **Separator tolerance.** A catalog hint is authored with single spaces\n * (\"very full bust\"), but the free text that carries it is written by a\n * human or an LLM and arrives as \"very-full bust\" or \"very full bust\".\n * A literal alternation misses those, and a miss is a flagged phrase\n * reaching the provider on a minor's prompt. Each needle's tokens are\n * joined by `[\\s-]+`, which requires AT LEAST one separator — so\n * \"very fullbust\" (no separator at all) is still not a match, and the\n * phrase can't silently widen into a substring rule.\n * - **Word boundaries.** `(?<![\\w-])` / `(?![\\w-])` keep a needle from\n * gluing onto an adjacent word's characters (\"mesh tops\" must survive a\n * \"mesh top\" needle).\n *\n * Ordering is the CALLER's: pass needles longest-first so the alternation\n * consumes the longest match at a given position instead of leaving debris.\n * Returns `null` when there is nothing to match (an empty list would otherwise\n * compile to `(?:)`, which matches everywhere). Flags are the caller's too —\n * `\"i\"` for a `.test()` instance, `\"gi\"` for one used with `String.replace`.\n */\nexport function buildNeedleAlternationSource(needles: ReadonlyArray<string>): string | null {\n const alts = needles.map(needleTokenSource).filter((s) => s.length > 0)\n if (alts.length === 0) return null\n return `(?<![\\\\w-])(?:${alts.join(\"|\")})(?![\\\\w-])`\n}\n\n/** Needle alternation over `getMinorAgeHintStrings()`, word-bounded on both\n * sides so a hint can only match a whole phrase. Deliberately NOT global:\n * this instance is only ever `.test()`ed, and a `/g` regex would carry\n * `lastIndex` across calls. Cached by needle count (packs are registered\n * before the first prompt is assembled). */\nlet cachedMinorNeedleRe: RegExp | null = null\nlet cachedMinorNeedleCount = -1\nfunction minorNeedleRegex(): RegExp | null {\n const needles = getMinorAgeHintStrings()\n if (cachedMinorNeedleRe && cachedMinorNeedleCount === needles.length) return cachedMinorNeedleRe\n cachedMinorNeedleCount = needles.length\n const src = buildNeedleAlternationSource(needles)\n cachedMinorNeedleRe = src === null ? null : new RegExp(src, \"i\")\n return cachedMinorNeedleRe\n}\n\n/**\n * NUMBER-FIRST age shapes: the ones `buildAgeFragment` (person.ts) emits for a\n * CUSTOM age (\"N years old\", \"N year old\", \"N-year-old\") and the catalog's own\n * \"2-3 years old\" range (the FIRST number decides), plus the colloquial tails a\n * human or an LLM writes instead — \"12yo\", \"12 yo\", \"12 y.o.\", \"12 y/o\",\n * \"12 yr old\", \"12-yr-old\", \"12yrs old\", \"12 years of age\". The cut is `< 20`,\n * the same boundary `isMinorAge` uses for `customAge` and the same one\n * `buildAgeFragment` switches to \"in their teens\" at.\n *\n * Both boundaries are load-bearing. The LEADING one stops a match inside a\n * larger token; the TRAILING one is what makes \"a 5 year older sibling\" a\n * non-hit (\"old\" may not glue onto \"older\") and what stops \"yo\" from firing\n * inside \"12 young\" or \"12 yoga\". Used via `matchAll`, which clones the regex\n * rather than advancing this instance's `lastIndex`.\n */\nconst NUMERIC_AGE_RE =\n /(?<![\\w-])(\\d{1,3})(?:\\s*-\\s*\\d{1,3})?\\s*-?\\s*(?:years?\\s*-?\\s*old|yrs?\\s*-?\\s*old|y(?:\\.\\s*o\\.?|\\/o|o)|years?\\s+of\\s+age)(?![\\w-])/gi\n\n/**\n * AGE-FIRST shapes, where the number trails the word instead of leading it:\n * \"age 12\", \"aged 12\", \"at the age of 12\". The leading boundary is what keeps\n * \"image 12\" / \"page 12\" out (the `age` there is glued to a preceding word\n * character), and the trailing one keeps \"aged 12th\" out.\n */\nconst PREFIXED_AGE_RE = /(?<![\\w-])aged?\\s+(?:of\\s+)?(\\d{1,3})(?![\\w-])/gi\n\n/** Every rule that reads a NUMBER out of the text, each capturing the age in\n * group 1. Iterated together below so a new shape is one array entry. */\nconst AGE_NUMBER_RULES: ReadonlyArray<RegExp> = [NUMERIC_AGE_RE, PREFIXED_AGE_RE]\n\n/** The one NON-numeric shape `buildAgeFragment` emits below 20 (`${n} years\n * old, in their teens`). Kept as its own rule rather than as a catalog term.\n * Separator-tolerant on the same terms as the needle alternation, so\n * \"in their teens\" and \"in-their-teens\" are the same phrase. */\nconst IN_THEIR_TEENS_RE = /(?<![\\w-])in[\\s-]+their[\\s-]+teens(?![\\w-])/i\n\n/**\n * True when free text describes a MINOR subject. Three rules, in order:\n * 1. any minor-age / minor-implying-type prompt hint, word-bounded;\n * 2. a numeric age below 20 in any shape `buildAgeFragment` emits;\n * 3. the literal \"in their teens\".\n *\n * Deliberately NOT a bare-word check: \"child\", \"teen\", \"kid\" alone must never\n * fire, or an adult prompt that merely MENTIONS a child (\"a mother holding her\n * child\") would be floored — the spec's \"adults are byte-identical\" is a hard\n * requirement, so every rule here is a full phrase or a bounded number.\n *\n * Pairs with `isMinorAge`, never replaces it: the structured picker value is\n * the primary signal; this catches the same subject when only the assembled\n * text survives.\n */\nexport function containsMinorAgeHint(text: string | null | undefined): boolean {\n if (typeof text !== \"string\" || text.trim().length === 0) return false\n const re = minorNeedleRegex()\n if (re && re.test(text)) return true\n for (const rule of AGE_NUMBER_RULES) {\n for (const m of text.matchAll(rule)) {\n const n = Number(m[1])\n if (Number.isFinite(n) && n < 20) return true\n }\n }\n return IN_THEIR_TEENS_RE.test(text)\n}\n\n/** The analyzer/import value keys the floor strips flagged ids out of:\n * `person` plus EVERY catalog the flag sweep reads. DERIVED, never\n * hand-listed — the hand-written version omitted `photo-genre` while the\n * sweep included it, so a minor kept `glamour-portrait`. The analyzer JSON is\n * keyed by picker type id (`describe-to-picker.ts`), which is the same string\n * as the catalog id, so this list IS the set of keys to visit. */\nexport const FLOORED_PICKER_KEYS = [\"person\", ...ADULT_SWEPT_CATALOG_IDS] as const\n\nfunction stripIds(obj: Record<string, unknown>, drop: ReadonlySet<string>): Record<string, unknown> {\n const out: Record<string, unknown> = {}\n for (const [k, v] of Object.entries(obj)) {\n if (typeof v === \"string\") {\n if (!drop.has(v)) out[k] = v\n } else if (Array.isArray(v)) {\n const kept = v.filter((x) => !(typeof x === \"string\" && drop.has(x)))\n if (kept.length > 0) out[k] = kept\n } else {\n out[k] = v\n }\n }\n return out\n}\n\n/** Analyzer / import post-filter: when the person value describes a minor,\n * remove every flagged id from the person, styling, pose and mood values.\n * Identity (same reference) for an adult. */\nexport function applyMinorAgeFloorToPickerValues<T extends Record<string, unknown>>(values: T): T {\n const person = values.person\n if (!person || typeof person !== \"object\" || !isMinorAge(person as { age?: string; customAge?: number; type?: string })) return values\n const drop = getAdultOnlyIds()\n const out: Record<string, unknown> = { ...values }\n for (const key of FLOORED_PICKER_KEYS) {\n const v = out[key]\n if (v && typeof v === \"object\" && !Array.isArray(v)) out[key] = stripIds(v as Record<string, unknown>, drop)\n }\n return out as T\n}\n","import type { HintNodeLike, HintEdgeLike, HintGraphContext } from \"@nodaro/shared/types\"\nexport type { HintNodeLike, HintEdgeLike, HintGraphContext }\n/**\n * Single source of truth for parameter-node prompt-hint text.\n *\n * Every parameter node (framing, lens, camera-format, lighting, color-look,\n * atmosphere, style, setting, person, mood, pose, styling, temporal, tone,\n * text-prompt, camera-motion) dispatches through `getParameterPromptHint` to\n * produce the descriptive clause it contributes to a consumer's prompt.\n *\n * The frontend DAG executor and backend workflow orchestrator both call this,\n * so the text injected via the `cinematography` handle is identical to the\n * text injected when the node is wired directly into a Text Prompt / LLM Chat\n * / Combine Text input.\n *\n * Camera-motion is graph-aware: when `ctx` is provided the function walks the\n * node's `startState`/`endState` incoming edges and composes a fully formed\n * sentence via `composeCameraMotionHintFromConnections`. Without `ctx` only\n * the bare motion description is returned.\n */\n\nimport { buildFramingHints } from \"./framing.js\"\nimport { buildLightingHints } from \"./lighting.js\"\nimport { getLensPromptHint, getLensTerm } from \"./lens.js\"\nimport { getCameraFormatPromptHint, getCameraFormatTerm } from \"./camera-format.js\"\nimport { getColorLookPromptHint, getColorLookTerm } from \"./color-look.js\"\nimport { buildAtmosphereHints } from \"./atmosphere.js\"\nimport { buildActionFxHints } from \"./action-fx.js\"\nimport { getStylePromptHint, getStyleTerm, getStyleVideoPromptHint } from \"./style.js\"\nimport { getSettingPromptHint, getSettingTerm } from \"./setting.js\"\nimport { getLoopSubjectPromptHint, getLoopSubjectTerm } from \"./loop-subject.js\"\nimport { buildPersonHints } from \"./person.js\"\nimport { buildMoodHints } from \"./mood.js\"\nimport { buildPoseHints } from \"./pose.js\"\nimport { buildStylingHints } from \"./styling.js\"\nimport { buildTemporalHints } from \"./temporal.js\"\nimport { composeCameraMotionHintFromConnections } from \"./camera-motions.js\"\nimport { joinHintFragments } from \"./hint-join.js\"\nimport { composeTransitionHintFromConnections, readTransitionOptionValues, type TransitionDuration, type TransitionIntensity, type TransitionPosition, type TransitionTiming } from \"./transitions.js\"\nimport { composeCharacterFxHintFromConnections, type CharacterFxDuration, type CharacterFxIntensity, type CharacterFxPosition, type CharacterFxTiming } from \"./character-fx.js\"\nimport { composeCharacterMotionHintFromConnections, type CharacterMotionPace, type CharacterMotionPosition, type CharacterMotionTiming } from \"./character-motion.js\"\nimport { containsMinorAgeHint, isMinorAge } from \"./age-floor.js\"\nimport { buildMaterialHints } from \"./materials.js\"\nimport { curatedAnimalPromptHint, curatedAnimalTerm, curatedVehicleText, curatedWeaponText, curatedFurnitureText } from \"./shared-catalog-overlay.js\"\nimport { getPhotoGenrePromptHint, getPhotoGenreTerm } from \"./photo-genre.js\"\nimport { getBackdropPromptHint, getBackdropTerm } from \"./backdrop.js\"\nimport { buildHeldPropHints } from \"./held-prop.js\"\nimport { buildPhotographerHints } from \"./photographer.js\"\nimport { buildAestheticHints } from \"./aesthetic.js\"\nimport { getEraPromptHint, getEraTerm } from \"./era.js\"\nimport { buildExposureHints } from \"./exposure-settings.js\"\nimport { getRenderQualityPromptHint, getRenderQualityTerm } from \"./render-quality.js\"\nimport { getCompositionEffectPromptHint, getCompositionEffectTerm } from \"./composition-effects.js\"\nimport { buildPostProcessHints } from \"./post-process-effects.js\"\nimport { buildMusicGenreHints } from \"./music-genre.js\"\nimport { buildMusicMoodHints } from \"./music-mood.js\"\nimport { buildInstrumentationHints } from \"./instrumentation.js\"\nimport { buildVoiceCharacterHints } from \"./voice-character.js\"\nimport { buildVoiceDeliveryHints } from \"./voice-delivery.js\"\nimport { getPickerCatalog } from \"./picker-catalogs.js\"\nimport { resolveTerm, type PickerHintMode } from \"./term.js\"\n\n\nfunction asStr(v: unknown): string {\n return typeof v === \"string\" ? v : \"\"\n}\n\n/** Extract the display name from a character / face / object / location ref node. */\nfunction extractCharacterRefName(node: HintNodeLike): string | undefined {\n const d = (node.data ?? {}) as Record<string, unknown>\n const candidates = [d.characterName, d.faceName, d.objectName, d.locationName]\n for (const v of candidates) {\n if (typeof v === \"string\" && v.trim().length > 0) return v.trim()\n }\n return undefined\n}\n\n/** Character Motion's name read: the shared character / face / object / location\n * read, then a creature's `creatureName`. Local to Character Motion so the\n * Character FX prompt, which shares `extractCharacterRefName`, stays unchanged. */\nfunction extractCharacterMotionRefName(node: HintNodeLike): string | undefined {\n const name = extractCharacterRefName(node)\n if (name) return name\n const creatureName = asStr(((node.data ?? {}) as Record<string, unknown>).creatureName).trim()\n return creatureName.length > 0 ? creatureName : undefined\n}\n\n/** Free-text fields a character / face / object / location ref node describes its subject in.\n * A creature ref uses the same `description` / `canonicalDescription` names. */\nconst REF_DESCRIPTION_FIELDS = [\"description\", \"seedPrompt\", \"canonicalDescription\"] as const\n\n/** True when a character / face / object / location ref node describes a minor:\n * its structured `person` age (the primary signal) or an age phrase in its\n * free-text description. Feeds the Character Motion floor (adult-only moves\n * dropped) — errs toward flooring, never toward letting an adult-only move through. */\nfunction extractCharacterRefMinor(node: HintNodeLike): boolean {\n const d = (node.data ?? {}) as Record<string, unknown>\n const person = d.person\n if (person && typeof person === \"object\" && !Array.isArray(person) && isMinorAge(person as Parameters<typeof isMinorAge>[0])) {\n return true\n }\n return REF_DESCRIPTION_FIELDS.some((field) => containsMinorAgeHint(asStr(d[field])))\n}\n\n/** The preview, diagnostics and execution use identical graph bindings. */\nexport function getCharacterMotionBindings(node: HintNodeLike, ctx?: HintGraphContext) {\n const targetNames: string[] = []\n const partnerNames: string[] = []\n const targetIds = new Set<string>()\n const partnerIds = new Set<string>()\n let subjectMinor = false\n for (const edge of ctx?.edges ?? []) {\n if (edge.target !== node.id || (edge.targetHandle !== \"target\" && edge.targetHandle !== \"partner\")) continue\n const src = ctx?.nodes.find(n => n.id === edge.source)\n if (!src) continue\n if (edge.targetHandle === \"target\") targetIds.add(src.id)\n else partnerIds.add(src.id)\n if (extractCharacterRefMinor(src)) subjectMinor = true\n const name = extractCharacterMotionRefName(src)\n if (!name) continue\n const names = edge.targetHandle === \"target\" ? targetNames : partnerNames\n if (!names.includes(name)) names.push(name)\n }\n return { targetNames, partnerNames, subjectMinor, selfPairing: [...targetIds].some(id => partnerIds.has(id)) }\n}\n\n/** Compose `[preText, mainHint, postText]` into a comma-joined string,\n * honoring the user's free-text fragments around the structured hint.\n * Helpers like `getStylePromptHint` that already include preText/postText\n * composition (build*Hints in mood/person/etc.) bypass this — they\n * return the fully-composed string directly. */\nfunction withCustomText(data: Record<string, unknown>, mainHint: string): string {\n const fragments: string[] = []\n const pre = typeof data.preText === \"string\" ? data.preText.trim() : \"\"\n if (pre) fragments.push(pre)\n if (mainHint) fragments.push(mainHint)\n const post = typeof data.postText === \"string\" ? data.postText.trim() : \"\"\n if (post) fragments.push(post)\n return joinHintFragments(fragments)\n}\n\n/**\n * The node-level hint mode a picker declares via `data.hintMode`.\n *\n * Only the two documented values count; anything else (a stale value, a typo,\n * a non-string) is treated as UNDECLARED and falls back — to the inherited\n * mode when the node is resolved as an upstream input, and to `\"full\"`\n * otherwise. Compact is opt-in, so an unrecognized value can never silently\n * shorten a prompt.\n */\nfunction readHintMode(data: Record<string, unknown>): PickerHintMode | undefined {\n const raw = data.hintMode\n return raw === \"compact\" || raw === \"full\" ? raw : undefined\n}\n\n/** Pick the full-hint or the compact-term getter for the active mode. */\nfunction byMode<T>(mode: PickerHintMode, full: T, compact: T): T {\n return mode === \"compact\" ? compact : full\n}\n\n/** How much a shot moves (the Motion node's three steps), as the clause it\n * adds to a video prompt; the compact form is the bare term. */\nconst MOTION_INTENSITY_HINTS: Readonly<Record<string, { readonly full: string; readonly compact: string }>> = {\n subtle: { full: \"subtle, gentle motion with slow, minimal movement\", compact: \"subtle motion\" },\n moderate: { full: \"moderate, natural motion at an even pace\", compact: \"moderate motion\" },\n dynamic: { full: \"dynamic, energetic motion with fast, pronounced movement\", compact: \"dynamic motion\" },\n}\n\n/**\n * Dispatch by parameter-node type to its prompt-hint string. For camera-motion,\n * pass `ctx` to include the composed start/end clauses; otherwise only the\n * bare motion description is returned.\n *\n * VERBOSITY — a picker node may set `data.hintMode` to `\"compact\"` to inject\n * its short professional `term` (\"whip pan left\", \"hard cut\") instead of the\n * long `promptHint`. Absent, or any unrecognized value, means `\"full\"`, whose\n * output is byte-identical to what this function returned before hint modes\n * existed. ONLY the base catalog fragment swaps: `preText`/`postText`, the\n * transition / camera-motion / character-fx timing and start-state/end-state\n * clauses, multi-pick joining and multi-dimension composition are emitted the\n * same way in both modes.\n *\n * SURFACE — `opts.surface: \"video\"` is for a caller folding the hint into ONE\n * video consumer's prompt (the canvas's video nodes): a Style node then injects\n * its video wording (`getStyleVideoPromptHint`). Absent (or `\"image\"`) is the\n * output this function always returned — what a still, a `{Label}` reference\n * and every preview of the node's own text read, since a node's own output\n * text has no single consumer. Every other node type ignores it.\n */\nexport function getParameterPromptHint(\n node: HintNodeLike | undefined,\n ctx?: HintGraphContext,\n opts?: ParameterHintOptions,\n): string {\n return resolveParameterHint(node, ctx, undefined, opts?.surface === \"video\" ? \"video\" : \"image\")\n}\n\n/** How `getParameterPromptHint` resolves a node. */\nexport interface ParameterHintOptions {\n /** The stage the hint is folded into. Absent = `\"image\"`. */\n readonly surface?: \"image\" | \"video\"\n}\n\n/**\n * The dispatch body. `inherited` carries the mode DOWN into the nodes wired to\n * a composer's `startState` / `endState` handles, so a compact transition\n * composes compact start/end clauses rather than mixing a term with two\n * paragraphs. A node that declares its own `hintMode` still wins over what it\n * inherits.\n */\nfunction resolveParameterHint(\n node: HintNodeLike | undefined,\n ctx?: HintGraphContext,\n inherited?: PickerHintMode,\n surface: \"image\" | \"video\" = \"image\",\n): string {\n if (!node?.type) return \"\"\n const data = (node.data ?? {}) as Record<string, unknown>\n const mode: PickerHintMode = readHintMode(data) ?? inherited ?? \"full\"\n\n if (node.type === \"camera-motion\") {\n const motionId = asStr(data.cameraMotion) || undefined\n if (!ctx) return withCustomText(data, composeCameraMotionHintFromConnections(motionId, [], [], mode))\n const startHints: string[] = []\n const endHints: string[] = []\n for (const edge of ctx.edges) {\n if (edge.target !== node.id) continue\n const src = ctx.nodes.find((n) => n.id === edge.source)\n if (!src) continue\n // Pass no ctx for nested resolution: startState/endState inputs are\n // themselves parameter nodes (framing/tone/etc.) that don't need graph\n // context, and avoiding recursion keeps the walk cycle-safe. The mode\n // rides down so the composed clause stays at one level of detail.\n const hint = resolveParameterHint(src, undefined, mode, surface)\n if (!hint) continue\n if (edge.targetHandle === \"startState\") startHints.push(hint)\n else if (edge.targetHandle === \"endState\") endHints.push(hint)\n }\n return withCustomText(data, composeCameraMotionHintFromConnections(motionId, startHints, endHints, mode))\n }\n\n if (node.type === \"transition\") {\n const raw = data.transition\n const transitionId: string | string[] | undefined =\n Array.isArray(raw)\n ? raw.filter((s): s is string => typeof s === \"string\" && s.length > 0)\n : (asStr(raw) || undefined)\n const timing: TransitionTiming = {\n position: asStr(data.position) as TransitionPosition | undefined,\n duration: asStr(data.duration) as TransitionDuration | undefined,\n intensity: asStr(data.intensity) as TransitionIntensity | undefined,\n }\n // A picked row's own options (a wipe's `wipeDirection`), off the same node data.\n const optionValues = readTransitionOptionValues(data)\n const hintOptions = optionValues ? { optionValues } : undefined\n if (!ctx) {\n return withCustomText(data, composeTransitionHintFromConnections(transitionId, [], [], timing, mode, hintOptions))\n }\n const startHints: string[] = []\n const endHints: string[] = []\n for (const edge of ctx.edges) {\n if (edge.target !== node.id) continue\n const src = ctx.nodes.find((n) => n.id === edge.source)\n if (!src) continue\n const hint = resolveParameterHint(src, undefined, mode, surface) // no ctx — cycle-safe\n if (!hint) continue\n if (edge.targetHandle === \"startState\") startHints.push(hint)\n else if (edge.targetHandle === \"endState\") endHints.push(hint)\n }\n return withCustomText(data, composeTransitionHintFromConnections(transitionId, startHints, endHints, timing, mode, hintOptions))\n }\n\n if (node.type === \"character-fx\") {\n const raw = data.characterFx\n const effectId: string | string[] | undefined =\n Array.isArray(raw)\n ? raw.filter((s): s is string => typeof s === \"string\" && s.length > 0)\n : (asStr(raw) || undefined)\n const timing: CharacterFxTiming = {\n position: asStr(data.position) as CharacterFxPosition | undefined,\n duration: asStr(data.duration) as CharacterFxDuration | undefined,\n intensity: asStr(data.intensity) as CharacterFxIntensity | undefined,\n }\n if (!ctx) {\n return withCustomText(data, composeCharacterFxHintFromConnections(effectId, [], timing, mode))\n }\n const targetNames: string[] = []\n for (const edge of ctx.edges) {\n if (edge.target !== node.id) continue\n if (edge.targetHandle !== \"target\") continue\n const src = ctx.nodes.find((n) => n.id === edge.source)\n if (!src) continue\n const name = extractCharacterRefName(src)\n if (name) targetNames.push(name)\n }\n return withCustomText(data, composeCharacterFxHintFromConnections(effectId, targetNames, timing, mode))\n }\n\n if (node.type === \"character-motion\") {\n const raw = data.characterMotion\n const motionId: string | string[] | undefined =\n Array.isArray(raw)\n ? raw.filter((s): s is string => typeof s === \"string\" && s.length > 0)\n : (asStr(raw) || undefined)\n const timing: CharacterMotionTiming = {\n position: asStr(data.position) as CharacterMotionPosition | undefined,\n pace: asStr(data.pace) as CharacterMotionPace | undefined,\n }\n if (!ctx) {\n return withCustomText(data, composeCharacterMotionHintFromConnections(motionId, [], [], timing, mode))\n }\n const { targetNames, partnerNames, subjectMinor } = getCharacterMotionBindings(node, ctx)\n return withCustomText(\n data,\n composeCharacterMotionHintFromConnections(motionId, targetNames, partnerNames, timing, mode, { subjectMinor }),\n )\n }\n\n const base = resolveBaseHint(node.type, data, mode, surface)\n if (base) return base\n // Pack-extend fallback: a single-dim pack entry the per-catalog getter (which\n // reads the frozen base array) can't resolve. Resolve it against the\n // registered (pack-composed) catalog's options. Composition already resolved\n // `PickerOption.term`; `resolveTerm` is idempotent over a resolved option and\n // is called anyway so a pack option that reached this array by some other\n // route still injects SOMETHING in compact mode rather than `undefined`.\n const cat = getPickerCatalog(node.type)\n if (cat?.kind === \"single\" && cat.valueField) {\n const id = typeof data[cat.valueField] === \"string\" ? (data[cat.valueField] as string) : \"\"\n const opt = cat.options?.find((o) => o.id === id)\n if (opt) return byMode(mode, surface === \"video\" ? (opt.videoPromptHint ?? opt.promptHint) : opt.promptHint, resolveTerm(opt))\n }\n return base\n}\n\n/**\n * Base (upstream) hint dispatch by node type — the per-catalog getters read the\n * frozen base arrays. Pack-added single-dim ids are resolved by the caller\n * against the registered (pack-composed) catalog.\n *\n * `mode` selects the base fragment only: the compact `get<Name>Term` getter /\n * `build<Name>Terms` builder instead of the verbose one. The `withCustomText`\n * wrapper, the builders' own pre/post composition, and the free-text node\n * types (tone / style-guide / text-prompt — user prose, not catalog copy) are\n * identical in both modes.\n */\nfunction resolveBaseHint(\n type: string,\n data: Record<string, unknown>,\n mode: PickerHintMode = \"full\",\n surface: \"image\" | \"video\" = \"image\",\n): string {\n switch (type) {\n case \"framing\":\n return withCustomText(data, buildFramingHints(data, false, mode).join(\", \"))\n case \"lighting\":\n return withCustomText(data, buildLightingHints(data, mode).join(\", \"))\n case \"lens\":\n return withCustomText(data, byMode(mode, getLensPromptHint, getLensTerm)(asStr(data.lens)))\n case \"camera-format\":\n return withCustomText(data, byMode(mode, getCameraFormatPromptHint, getCameraFormatTerm)(asStr(data.cameraFormat)))\n case \"color-look\":\n return withCustomText(data, byMode(mode, getColorLookPromptHint, getColorLookTerm)(asStr(data.colorLook)))\n\n // build*Hints in music-* / voice-* / mood / person / etc. compose\n // preText/postText internally — bypass the wrapper to avoid double-\n // composition.\n case \"music-genre\":\n return buildMusicGenreHints((data ?? {}) as Parameters<typeof buildMusicGenreHints>[0], mode)\n case \"music-mood\":\n return buildMusicMoodHints((data ?? {}) as Parameters<typeof buildMusicMoodHints>[0], mode)\n case \"instrumentation\":\n return buildInstrumentationHints((data ?? {}) as Parameters<typeof buildInstrumentationHints>[0], mode)\n case \"voice-character\":\n return buildVoiceCharacterHints((data ?? {}) as Parameters<typeof buildVoiceCharacterHints>[0], mode)\n case \"voice-delivery\":\n return buildVoiceDeliveryHints((data ?? {}) as Parameters<typeof buildVoiceDeliveryHints>[0], mode)\n case \"person\":\n return buildPersonHints(data, mode).join(\", \")\n case \"mood\":\n return buildMoodHints(data, mode).join(\", \")\n case \"pose\":\n return buildPoseHints(data, mode).join(\", \")\n case \"styling\":\n return buildStylingHints(data, mode).join(\", \")\n\n case \"atmosphere\":\n return withCustomText(data, buildAtmosphereHints(data.atmosphere, mode).join(\", \"))\n case \"action-fx\":\n return withCustomText(data, buildActionFxHints(data.actionFx, mode).join(\", \"))\n case \"style\":\n return withCustomText(data, byMode(mode, surface === \"video\" ? getStyleVideoPromptHint : getStylePromptHint, getStyleTerm)(asStr(data.style)))\n case \"setting\":\n return withCustomText(data, byMode(mode, getSettingPromptHint, getSettingTerm)(asStr(data.setting)))\n case \"loop-subject\":\n return withCustomText(data, byMode(mode, getLoopSubjectPromptHint, getLoopSubjectTerm)(asStr(data.loopSubject)))\n case \"material\":\n return withCustomText(data, buildMaterialHints(data.material, mode))\n // The four object-entity catalogs are owned by @nodaro/shared and overlaid\n // in shared-catalog-overlay.ts — the ONE module every prompt-text read of\n // them goes through (the subject fold uses it too). Each returns \"\" on a\n // miss, so the entry lookup is the module's job, not this switch's.\n case \"animal\":\n return withCustomText(data, byMode(mode, curatedAnimalPromptHint, curatedAnimalTerm)(asStr(data.animal)))\n case \"vehicle\": {\n const t = curatedVehicleText(asStr(data.vehicle))\n return withCustomText(data, byMode(mode, t.hint, t.term))\n }\n case \"weapon\": {\n const t = curatedWeaponText(asStr(data.weapon))\n return withCustomText(data, byMode(mode, t.hint, t.term))\n }\n case \"furniture\": {\n const t = curatedFurnitureText(asStr(data.furniture))\n return withCustomText(data, byMode(mode, t.hint, t.term))\n }\n case \"photo-genre\":\n return withCustomText(data, byMode(mode, getPhotoGenrePromptHint, getPhotoGenreTerm)(asStr(data.photoGenre)))\n case \"backdrop\":\n return withCustomText(data, byMode(mode, getBackdropPromptHint, getBackdropTerm)(asStr(data.backdrop)))\n case \"held-prop\":\n return withCustomText(data, buildHeldPropHints(data.heldProp, mode).join(\", \"))\n case \"photographer\":\n return withCustomText(data, buildPhotographerHints(data.photographer, mode))\n case \"aesthetic\":\n return withCustomText(data, buildAestheticHints(data.aesthetic, mode))\n case \"era\":\n return withCustomText(data, byMode(mode, getEraPromptHint, getEraTerm)(asStr(data.era)))\n case \"temporal\":\n return withCustomText(data, buildTemporalHints(data, mode).join(\", \"))\n case \"exposure-settings\":\n return withCustomText(data, buildExposureHints(data, mode).join(\", \"))\n case \"render-quality\":\n return withCustomText(data, byMode(mode, getRenderQualityPromptHint, getRenderQualityTerm)(asStr(data.renderQuality)))\n case \"composition-effects\":\n return withCustomText(data, byMode(mode, getCompositionEffectPromptHint, getCompositionEffectTerm)(asStr(data.compositionEffect)))\n case \"post-process-effects\":\n return withCustomText(data, buildPostProcessHints(data.postProcess, mode).join(\", \"))\n // Motion intensity: a Generation Settings node that a video node's\n // Settings input takes as a prompt fragment (video only).\n case \"motion\": {\n const hint = MOTION_INTENSITY_HINTS[asStr(data.motion)]\n return hint ? byMode(mode, hint.full, hint.compact) : \"\"\n }\n\n // Free text authored by the user, not catalog copy — there is no shorter\n // professional form to swap in, so these are identical in both modes.\n case \"tone\":\n return asStr(data.tone).trim()\n case \"style-guide\":\n // The node's whole purpose is injecting its style text into consumer\n // prompts; without this case, {Style Guide} refs stayed as literal\n // brace text and direct wires injected nothing (only fieldMappings\n // worked, via getParameterValue).\n return asStr(data.text).trim()\n case \"text-prompt\":\n return asStr(data.text).trim()\n default:\n return \"\"\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkWLN2MJ7F_cjs = require('./chunk-WLN2MJ7F.cjs');
3
+ var chunkE5EKWWOO_cjs = require('./chunk-E5EKWWOO.cjs');
4
4
  var catalogs = require('@nodaro/shared/catalogs');
5
5
 
6
6
  var WARDROBE_DIMENSION_ORDER = [
@@ -169,11 +169,11 @@ function getCharacterMotionDiagnostics(value, timing, bindings = {}) {
169
169
  const requested = typeof value === "string" ? [value] : Array.isArray(value) ? [...new Set(value)] : [];
170
170
  const result = [];
171
171
  const add = (code, severity, ids, message) => result.push({ code, severity, ids, message });
172
- if (requested.length > chunkWLN2MJ7F_cjs.CHARACTER_MOTION_MAX_PICKS) add("capacity", "warning", requested, "Only the first three selections contribute. Remove extra selections.");
173
- const picks = requested.slice(0, chunkWLN2MJ7F_cjs.CHARACTER_MOTION_MAX_PICKS);
174
- for (const id of picks) if (!chunkWLN2MJ7F_cjs.getCharacterMotion(id)) add("unknown", "error", [id], `Motion \u201C${id}\u201D is unavailable and contributes no fragment. Remove or replace it.`);
172
+ if (requested.length > chunkE5EKWWOO_cjs.CHARACTER_MOTION_MAX_PICKS) add("capacity", "warning", requested, "Only the first three selections contribute. Remove extra selections.");
173
+ const picks = requested.slice(0, chunkE5EKWWOO_cjs.CHARACTER_MOTION_MAX_PICKS);
174
+ for (const id of picks) if (!chunkE5EKWWOO_cjs.getCharacterMotion(id)) add("unknown", "error", [id], `Motion \u201C${id}\u201D is unavailable and contributes no fragment. Remove or replace it.`);
175
175
  const entries = picks.flatMap((id) => {
176
- const entry = chunkWLN2MJ7F_cjs.getCharacterMotion(id);
176
+ const entry = chunkE5EKWWOO_cjs.getCharacterMotion(id);
177
177
  return entry?.promptHint ? [entry] : [];
178
178
  });
179
179
  const active = entries.filter((e) => !bindings.subjectMinor || !e.adultOnly);
@@ -182,7 +182,7 @@ function getCharacterMotionDiagnostics(value, timing, bindings = {}) {
182
182
  if (omitted.length) add("omitted", active.length ? "warning" : "error", omitted.map((e) => e.id), `${omitted.map((e) => e.label).join(", ")} omitted for a connected minor. ${active.length ? "Replace these selections." : "No selected motion contributes a fragment."}`);
183
183
  if ((bindings.targetNames?.length ?? 0) > 1) add("multiple-targets", "warning", picks, "Each target performs a separate copy of the sequence. Use separate motion nodes for coordinated choreography.");
184
184
  for (const entry of active) {
185
- if (entry.deprecated) add("retired", "warning", [entry.id], `${entry.label} is retired from new choices but still resolves in saved workflows.${entry.replacementId ? ` Use ${chunkWLN2MJ7F_cjs.getCharacterMotion(entry.replacementId)?.label ?? entry.replacementId}.` : ""}`);
185
+ if (entry.deprecated) add("retired", "warning", [entry.id], `${entry.label} is retired from new choices but still resolves in saved workflows.${entry.replacementId ? ` Use ${chunkE5EKWWOO_cjs.getCharacterMotion(entry.replacementId)?.label ?? entry.replacementId}.` : ""}`);
186
186
  if (entry.fixedPace && timing?.pace && timing.pace !== "auto") add("pace", "warning", [entry.id], `${entry.label} sets its own timing. Set Pace to Auto or replace the motion.`);
187
187
  if (entry.requires?.length) add("requirements", "info", [entry.id], `${entry.label} requires: ${entry.requires.join(", ")}.${entry.twoPerson || entry.counterpart ? bindings.partnerNames?.length ? ` Partner reference: ${bindings.partnerNames.join(", ")}; confirm it matches the required recipient.` : " Connect a Partner reference to identify the recipient; otherwise the model chooses it." : " Establish these in the scene or prompt; the fragment does not supply reference media."}`);
188
188
  }
@@ -206,5 +206,5 @@ exports.getCharacterMotionDiagnostics = getCharacterMotionDiagnostics;
206
206
  exports.getWardrobeEntriesByDimension = getWardrobeEntriesByDimension;
207
207
  exports.getWardrobeEntry = getWardrobeEntry;
208
208
  exports.getWardrobePromptHint = getWardrobePromptHint;
209
- //# sourceMappingURL=chunk-JGEBO6L6.cjs.map
210
- //# sourceMappingURL=chunk-JGEBO6L6.cjs.map
209
+ //# sourceMappingURL=chunk-F22GZF7T.cjs.map
210
+ //# sourceMappingURL=chunk-F22GZF7T.cjs.map