{"version":3,"file":"task_id.mjs","names":[],"sources":["../../../src/client/task/task_id.ts"],"sourcesContent":["type Task = {\n\tname: string\n\tsuite?: Task | undefined\n}\n\nexport function toTaskId(task: Task) {\n\tconst l: any[] = []\n\tlet t = task\n\twhile (t?.suite) {\n\t\tl.unshift(toTaskIdSegment(t.suite.name))\n\t\tt = t.suite\n\t}\n\n\tl.push(toTaskIdSegment(task.name))\n\treturn l.join('/')\n}\n\n/**\n * Leading and trailing whitespace is trimmed so it does not leak into the snapshot path.\n * e.g. Storybook appends two spaces to the `describe` title it generates for CSF Next `story.test()`.\n */\nfunction toTaskIdSegment(name: string) {\n\treturn name\n\t\t.trim()\n\t\t.replace(/[^a-z0-9]/gi, '-')\n\t\t.toLowerCase()\n}\n"],"mappings":";AAKA,SAAgB,SAAS,MAAY;CACpC,MAAM,IAAW,EAAE;CACnB,IAAI,IAAI;AACR,QAAO,GAAG,OAAO;AAChB,IAAE,QAAQ,gBAAgB,EAAE,MAAM,KAAK,CAAC;AACxC,MAAI,EAAE;;AAGP,GAAE,KAAK,gBAAgB,KAAK,KAAK,CAAC;AAClC,QAAO,EAAE,KAAK,IAAI;;;;;;AAOnB,SAAS,gBAAgB,MAAc;AACtC,QAAO,KACL,MAAM,CACN,QAAQ,eAAe,IAAI,CAC3B,aAAa"}