{"version":3,"file":"messageGuards.cjs","names":["isRecord","value","Array","isArray","exports","isOptionalString","undefined","createIsOneOf","values","some","allowedValue"],"sources":["../../../src/message-bus/messageGuards.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * Checks that a value is a plain object, so its properties can be read and checked one at a time.\n */\nexport const isRecord = (value: unknown): value is Record<string, unknown> =>\n  typeof value === \"object\" && value !== null && !Array.isArray(value);\n\n/**\n * Checks that a value is a string or `undefined`, for optional message fields.\n */\nexport const isOptionalString = (value: unknown): value is string | undefined =>\n  value === undefined || typeof value === \"string\";\n\n/**\n * Creates a check that a value is one of a fixed list, such as a banner's severity.\n */\nexport const createIsOneOf =\n  <Value extends string>(values: readonly Value[]) =>\n  (value: unknown): value is Value =>\n    values.some((allowedValue) => allowedValue === value);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAKO,MAAMA,QAAQ,GAAIC,KAAc,IACrC,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC;AAACG,OAAA,CAAAJ,QAAA,GAAAA,QAAA;AAKhE,MAAMK,gBAAgB,GAAIJ,KAAc,IAC7CA,KAAK,KAAKK,SAAS,IAAI,OAAOL,KAAK,KAAK,QAAQ;AAACG,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAK5C,MAAME,aAAa,GACDC,MAAwB,IAC9CP,KAAc,IACbO,MAAM,CAACC,IAAI,CAAEC,YAAY,IAAKA,YAAY,KAAKT,KAAK,CAAC;AAACG,OAAA,CAAAG,aAAA,GAAAA,aAAA","ignoreList":[]}