{"version":3,"file":"range-utils.mjs","names":[],"sources":["../../../../src/_generated/style-rules/range-utils.ts"],"sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n *  Copyright (c) \"Neo4j\"\n *  Neo4j Sweden AB [http://neo4j.com]\n *\n *  This file is part of Neo4j.\n *\n *  Neo4j is free software: you can redistribute it and/or modify\n *  it under the terms of the GNU General Public License as published by\n *  the Free Software Foundation, either version 3 of the License, or\n *  (at your option) any later version.\n *\n *  This program is distributed in the hope that it will be useful,\n *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *  GNU General Public License for more details.\n *\n *  You should have received a copy of the GNU General Public License\n *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {\n  parseDateString,\n  parseLocalDateString,\n  parseTimeString,\n} from './date-utils';\nimport type { RangeLiteral } from './literal-types';\nimport { type NumericValue, resolveNumericLiteral } from './numeric-utils';\n\n/** Resolves a range literal to the numeric representation used for interpolation. */\nexport function resolveRangeLiteral(value: RangeLiteral): NumericValue | null {\n  if (typeof value === 'object' && value !== null) {\n    if ('datetime' in value) {\n      return parseDateString(value.datetime);\n    }\n    if ('localdatetime' in value) {\n      return parseLocalDateString(value.localdatetime);\n    }\n    if ('time' in value) {\n      return parseTimeString(value.time);\n    }\n  }\n  return resolveNumericLiteral(value);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAgB,oBAAoB,OAA0C;CAC5E,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM;EAC/C,IAAI,cAAc,OAChB,OAAO,gBAAgB,MAAM,QAAQ;EAEvC,IAAI,mBAAmB,OACrB,OAAO,qBAAqB,MAAM,aAAa;EAEjD,IAAI,UAAU,OACZ,OAAO,gBAAgB,MAAM,IAAI;CAErC;CACA,OAAO,sBAAsB,KAAK;AACpC"}