"use strict";function isFullURI(t){try{new URL(t);return!0}catch(t){return!1}}var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const ajv_1=__importDefault(require("ajv")),ajv_formats_1=__importDefault(require("ajv-formats"));class AjvSingleton{constructor(){}static getInstance(){if(!AjvSingleton.instance){const t=new ajv_1.default({allErrors:!0,useDefaults:!0,strict:"log",allowUnionTypes:!0,keywords:["placeholder","example","expectedFormat"]});(0,ajv_formats_1.default)(t);t.addFormat("uuid",{type:"string",validate:t=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)});t.addFormat("uri",{type:"string",validate:t=>/^\/uploads\/.*/.test(t)||isFullURI(t)});t.addFormat("date",{type:"string",validate:t=>!isNaN(Date.parse(t))});AjvSingleton.instance=t}return AjvSingleton.instance}}exports.default=AjvSingleton;