schemas/libraries/typia/download_compiled/minified.jsCopy to clipboardconst e=e=>t.test(e),t=/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,n=e=>{let t=t=>{if(e.length===0)return!0;let n=e[e.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return(n,r)=>(n&&t(r.path)&&(r.value===void 0&&(r.description??=["The value at this path is `undefined`.",``,`Please fill the \`${r.expected}\` typed value next time.`].join(` `)),e.push(r)),!1)};(()=>{let t=e=>typeof e.id==`number`&&e.created instanceof Date&&typeof e.title==`string`&&1<=e.title.length&&e.title.length<=100&&typeof e.brand==`string`&&1<=e.brand.length&&e.brand.length<=30&&typeof e.description==`string`&&1<=e.description.length&&e.description.length<=500&&typeof e.price==`number`&&1<=e.price&&e.price<=1e4&&(e.discount===null||typeof e.discount==`number`&&1<=e.discount&&e.discount<=100)&&typeof e.quantity==`number`&&1<=e.quantity&&e.quantity<=10&&Array.isArray(e.tags)&&1<=e.tags.length&&e.tags.length<=30&&e.tags.every(e=>typeof e==`string`)&&Array.isArray(e.images)&&e.images.every(e=>typeof e==`object`&&!!e&&r(e))&&Array.isArray(e.ratings)&&e.ratings.every(e=>typeof e==`object`&&!!e&&i(e)),r=t=>typeof t.id==`number`&&t.created instanceof Date&&typeof t.title==`string`&&1<=t.title.length&&t.title.length<=100&&(t.type===`jpg`||t.type===`png`)&&typeof t.size==`number`&&typeof t.url==`string`&&e(t.url),i=e=>typeof e.id==`number`&&typeof e.stars==`number`&&1<=e.stars&&e.stars<=5&&typeof e.title==`string`&&1<=e.title.length&&e.title.length<=100&&typeof e.text==`string`&&1<=e.text.length&&e.text.length<=1e3&&Array.isArray(e.images)&&e.images.every(e=>typeof e==`object`&&!!e&&r(e)),a=(e,t,n=!0)=>[typeof e.id==`number`||u(n,{path:t+`.id`,expected:`number`,value:e.id}),e.created instanceof Date||u(n,{path:t+`.created`,expected:`Date`,value:e.created}),typeof e.title==`string`&&(1<=e.title.length||u(n,{path:t+`.title`,expected:`string & MinLength<1>`,value:e.title}))&&(e.title.length<=100||u(n,{path:t+`.title`,expected:`string & MaxLength<100>`,value:e.title}))||u(n,{path:t+`.title`,expected:`(string & MinLength<1> & MaxLength<100>)`,value:e.title}),typeof e.brand==`string`&&(1<=e.brand.length||u(n,{path:t+`.brand`,expected:`string & MinLength<1>`,value:e.brand}))&&(e.brand.length<=30||u(n,{path:t+`.brand`,expected:`string & MaxLength<30>`,value:e.brand}))||u(n,{path:t+`.brand`,expected:`(string & MinLength<1> & MaxLength<30>)`,value:e.brand}),typeof e.description==`string`&&(1<=e.description.length||u(n,{path:t+`.description`,expected:`string & MinLength<1>`,value:e.description}))&&(e.description.length<=500||u(n,{path:t+`.description`,expected:`string & MaxLength<500>`,value:e.description}))||u(n,{path:t+`.description`,expected:`(string & MinLength<1> & MaxLength<500>)`,value:e.description}),typeof e.price==`number`&&(1<=e.price||u(n,{path:t+`.price`,expected:`number & Minimum<1>`,value:e.price}))&&(e.price<=1e4||u(n,{path:t+`.price`,expected:`number & Maximum<10000>`,value:e.price}))||u(n,{path:t+`.price`,expected:`(number & Minimum<1> & Maximum<10000>)`,value:e.price}),e.discount===null||typeof e.discount==`number`&&(1<=e.discount||u(n,{path:t+`.discount`,expected:`number & Minimum<1>`,value:e.discount}))&&(e.discount<=100||u(n,{path:t+`.discount`,expected:`number & Maximum<100>`,value:e.discount}))||u(n,{path:t+`.discount`,expected:`((number & Minimum<1> & Maximum<100>) | null)`,value:e.discount}),typeof e.quantity==`number`&&(1<=e.quantity||u(n,{path:t+`.quantity`,expected:`number & Minimum<1>`,value:e.quantity}))&&(e.quantity<=10||u(n,{path:t+`.quantity`,expected:`number & Maximum<10>`,value:e.quantity}))||u(n,{path:t+`.quantity`,expected:`(number & Minimum<1> & Maximum<10>)`,value:e.quantity}),(Array.isArray(e.tags)||u(n,{path:t+`.tags`,expected:`(Array<string> & MinItems<1> & MaxItems<30>)`,value:e.tags}))&&(1<=e.tags.length||u(n,{path:t+`.tags`,expected:`Array<> & MinItems<1>`,value:e.tags}))&&(e.tags.length<=30||u(n,{path:t+`.tags`,expected:`Array<> & MaxItems<30>`,value:e.tags}))&&e.tags.map((e,r)=>typeof e==`string`||u(n,{path:t+`.tags[`+r+`]`,expected:`string`,value:e})).every(e=>e)||u(n,{path:t+`.tags`,expected:`(Array<string> & MinItems<1> & MaxItems<30>)`,value:e.tags}),(Array.isArray(e.images)||u(n,{path:t+`.images`,expected:`Array<ImageSchema>`,value:e.images}))&&e.images.map((e,r)=>(typeof e==`object`&&!!e||u(n,{path:t+`.images[`+r+`]`,expected:`ImageSchema`,value:e}))&&o(e,t+`.images[`+r+`]`,n)||u(n,{path:t+`.images[`+r+`]`,expected:`ImageSchema`,value:e})).every(e=>e)||u(n,{path:t+`.images`,expected:`Array<ImageSchema>`,value:e.images}),(Array.isArray(e.ratings)||u(n,{path:t+`.ratings`,expected:`Array<RatingSchema>`,value:e.ratings}))&&e.ratings.map((e,r)=>(typeof e==`object`&&!!e||u(n,{path:t+`.ratings[`+r+`]`,expected:`RatingSchema`,value:e}))&&s(e,t+`.ratings[`+r+`]`,n)||u(n,{path:t+`.ratings[`+r+`]`,expected:`RatingSchema`,value:e})).every(e=>e)||u(n,{path:t+`.ratings`,expected:`Array<RatingSchema>`,value:e.ratings})].every(e=>e),o=(t,n,r=!0)=>[typeof t.id==`number`||u(r,{path:n+`.id`,expected:`number`,value:t.id}),t.created instanceof Date||u(r,{path:n+`.created`,expected:`Date`,value:t.created}),typeof t.title==`string`&&(1<=t.title.length||u(r,{path:n+`.title`,expected:`string & MinLength<1>`,value:t.title}))&&(t.title.length<=100||u(r,{path:n+`.title`,expected:`string & MaxLength<100>`,value:t.title}))||u(r,{path:n+`.title`,expected:`(string & MinLength<1> & MaxLength<100>)`,value:t.title}),t.type===`jpg`||t.type===`png`||u(r,{path:n+`.type`,expected:`("jpg" | "png")`,value:t.type}),typeof t.size==`number`||u(r,{path:n+`.size`,expected:`number`,value:t.size}),typeof t.url==`string`&&(e(t.url)||u(r,{path:n+`.url`,expected:`string & Format<"url">`,value:t.url}))||u(r,{path:n+`.url`,expected:`(string & Format<"url">)`,value:t.url})].every(e=>e),s=(e,t,n=!0)=>[typeof e.id==`number`||u(n,{path:t+`.id`,expected:`number`,value:e.id}),typeof e.stars==`number`&&(1<=e.stars||u(n,{path:t+`.stars`,expected:`number & Minimum<1>`,value:e.stars}))&&(e.stars<=5||u(n,{path:t+`.stars`,expected:`number & Maximum<5>`,value:e.stars}))||u(n,{path:t+`.stars`,expected:`(number & Minimum<1> & Maximum<5>)`,value:e.stars}),typeof e.title==`string`&&(1<=e.title.length||u(n,{path:t+`.title`,expected:`string & MinLength<1>`,value:e.title}))&&(e.title.length<=100||u(n,{path:t+`.title`,expected:`string & MaxLength<100>`,value:e.title}))||u(n,{path:t+`.title`,expected:`(string & MinLength<1> & MaxLength<100>)`,value:e.title}),typeof e.text==`string`&&(1<=e.text.length||u(n,{path:t+`.text`,expected:`string & MinLength<1>`,value:e.text}))&&(e.text.length<=1e3||u(n,{path:t+`.text`,expected:`string & MaxLength<1000>`,value:e.text}))||u(n,{path:t+`.text`,expected:`(string & MinLength<1> & MaxLength<1000>)`,value:e.text}),(Array.isArray(e.images)||u(n,{path:t+`.images`,expected:`Array<ImageSchema>`,value:e.images}))&&e.images.map((e,r)=>(typeof e==`object`&&!!e||u(n,{path:t+`.images[`+r+`]`,expected:`ImageSchema`,value:e}))&&o(e,t+`.images[`+r+`]`,n)||u(n,{path:t+`.images[`+r+`]`,expected:`ImageSchema`,value:e})).every(e=>e)||u(n,{path:t+`.images`,expected:`Array<ImageSchema>`,value:e.images})].every(e=>e),c=e=>typeof e==`object`&&!!e&&t(e),l,u;return e=>{if(!1===c(e)){l=[],u=n(l),((e,t,n=!0)=>(typeof e==`object`&&!!e||u(!0,{path:t+``,expected:`__type`,value:e}))&&a(e,t+``,!0)||u(!0,{path:t+``,expected:`__type`,value:e}))(e,`$input`,!0);let t=l.length===0;return t?{success:t,data:e}:{success:t,errors:l,data:e}}return{success:!0,data:e}}})()({});