# Path: craft_ai/errors.py
# class CraftAiDecisionError(CraftAiError):
#     """An error occured during the decision phase."""
# 
# class CraftAiNullDecisionError(CraftAiDecisionError):
#     """An error occured during the decision phase."""
# 
# Path: craft_ai/operators.py
# OPERATORS = OPERATORS_V2
# 
# OPERATORS_FUNCTION = OPERATORS_FUNCTION_V2
# 
# Path: craft_ai/types.py
# TYPES = {
#     "continuous": "continuous",
#     "enum": "enum",
#     "boolean": "boolean",
#     "timezone": "timezone",
#     "time_of_day": "time_of_day",
#     "day_of_week": "day_of_week",
#     "day_of_month": "day_of_month",
#     "month_of_year": "month_of_year",
# }
# 
# Path: craft_ai/timezones.py
# def is_timezone(value):
#     # Valid time zone range is -12:00 (-720 min) and +14:00 (+840 min)
#     # cf. https://en.wikipedia.org/wiki/List_of_UTC_time_offsets
#     if isinstance(value, int) and value <= 840 and value >= -720:
#         return True
#     if not isinstance(value, str):
#         return False
#     if value in TIMEZONES:
#         return True
#     result_reg_exp = _TIMEZONE_REGEX.match(value) is not None
#     return result_reg_exp


import math
import numbers
from craft_ai.errors import CraftAiDecisionError, CraftAiNullDecisionError
from craft_ai.operators import OPERATORS, OPERATORS_FUNCTION
from craft_ai.types import TYPES
from craft_ai.timezones import is_timezone


_DECISION_VERSION = "2.0.0"

_VALUE_VALIDATORS = {
    TYPES["continuous"]: lambda value: isinstance(value, numbers.Real),
    TYPES["enum"]: lambda value: isinstance(value, str),

# Path: craft_ai/errors.py
# class CraftAiDecisionError(CraftAiError):
#     """An error occured during the decision phase."""
# 
# class CraftAiNullDecisionError(CraftAiDecisionError):
#     """An error occured during the decision phase."""
# 
# Path: craft_ai/operators.py
# OPERATORS = OPERATORS_V2
# 
# OPERATORS_FUNCTION = OPERATORS_FUNCTION_V2
# 
# Path: craft_ai/types.py
# TYPES = {
#     "continuous": "continuous",
#     "enum": "enum",
#     "boolean": "boolean",
#     "timezone": "timezone",
#     "time_of_day": "time_of_day",
#     "day_of_week": "day_of_week",
#     "day_of_month": "day_of_month",
#     "month_of_year": "month_of_year",
# }
# 
# Path: craft_ai/timezones.py
# def is_timezone(value):
#     # Valid time zone range is -12:00 (-720 min) and +14:00 (+840 min)
#     # cf. https://en.wikipedia.org/wiki/List_of_UTC_time_offsets
#     if isinstance(value, int) and value <= 840 and value >= -720:
#         return True
#     if not isinstance(value, str):
#         return False
#     if value in TIMEZONES:
#         return True
#     result_reg_exp = _TIMEZONE_REGEX.match(value) is not None
#     return result_reg_exp


# Path: craft_ai/interpreter_v2.py
import math
import numbers
from craft_ai.errors import CraftAiDecisionError, CraftAiNullDecisionError
from craft_ai.operators import OPERATORS, OPERATORS_FUNCTION
from craft_ai.types import TYPES
from craft_ai.timezones import is_timezone



_DECISION_VERSION = "2.0.0"

_VALUE_VALIDATORS = {
    TYPES["continuous"]: lambda value: isinstance(value, numbers.Real),
    TYPES["enum"]: lambda value: isinstance(value, str),

    TYPES["boolean"]: lambda value: isinstance(value, bool),