securityos/node_modules/next/dist/compiled/schema-utils3/index.js

3 lines
172 KiB
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
(()=>{var e={6544:(e,r,t)=>{"use strict";var a=t(9562);e.exports=defineKeywords;function defineKeywords(e,r){if(Array.isArray(r)){for(var t=0;t<r.length;t++)get(r[t])(e);return e}if(r){get(r)(e);return e}for(r in a)get(r)(e);return e}defineKeywords.get=get;function get(e){var r=a[e];if(!r)throw new Error("Unknown keyword "+e);return r}},720:(e,r,t)=>{"use strict";var a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;var s=/t|\s/i;var i={date:compareDate,time:compareTime,"date-time":compareDateTime};var o={type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:false};e.exports=function(e){var r="format"+e;return function defFunc(a){defFunc.definition={type:"string",inline:t(6549),statements:true,errors:"full",dependencies:["format"],metaSchema:{anyOf:[{type:"string"},o]}};a.addKeyword(r,defFunc.definition);a.addKeyword("formatExclusive"+e,{dependencies:["format"+e],metaSchema:{anyOf:[{type:"boolean"},o]}});extendFormats(a);return a}};function extendFormats(e){var r=e._formats;for(var t in i){var a=r[t];if(typeof a!="object"||a instanceof RegExp||!a.validate)a=r[t]={validate:a};if(!a.compare)a.compare=i[t]}}function compareDate(e,r){if(!(e&&r))return;if(e>r)return 1;if(e<r)return-1;if(e===r)return 0}function compareTime(e,r){if(!(e&&r))return;e=e.match(a);r=r.match(a);if(!(e&&r))return;e=e[1]+e[2]+e[3]+(e[4]||"");r=r[1]+r[2]+r[3]+(r[4]||"");if(e>r)return 1;if(e<r)return-1;if(e===r)return 0}function compareDateTime(e,r){if(!(e&&r))return;e=e.split(s);r=r.split(s);var t=compareDate(e[0],r[0]);if(t===undefined)return;return t||compareTime(e[1],r[1])}},3990:e=>{"use strict";e.exports={metaSchemaRef:metaSchemaRef};var r="http://json-schema.org/draft-07/schema";function metaSchemaRef(e){var t=e._opts.defaultMeta;if(typeof t=="string")return{$ref:t};if(e.getSchema(r))return{$ref:r};console.warn("meta schema not defined");return{}}},5095:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e,r){if(!e)return true;var t=Object.keys(r.properties);if(t.length==0)return true;return{required:t}},metaSchema:{type:"boolean"},dependencies:["properties"]};e.addKeyword("allRequired",defFunc.definition);return e}},3870:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){if(e.length==0)return true;if(e.length==1)return{required:e};var r=e.map((function(e){return{required:[e]}}));return{anyOf:r}},metaSchema:{type:"array",items:{type:"string"}}};e.addKeyword("anyRequired",defFunc.definition);return e}},796:(e,r,t)=>{"use strict";var a=t(3990);e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){var r=[];for(var t in e)r.push(getSchema(t,e[t]));return{allOf:r}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:a.metaSchemaRef(e)}};e.addKeyword("deepProperties",defFunc.definition);return e};function getSchema(e,r){var t=e.split("/");var a={};var s=a;for(var i=1;i<t.length;i++){var o=t[i];var n=i==t.length-1;o=unescapeJsonPointer(o);var l=s.properties={};var u=undefined;if(/[0-9]+/.test(o)){var f=+o;u=s.items=[];while(f--)u.push({})}s=n?r:{};l[o]=s;if(u)u.push(s)}return a}function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},1988:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",inline:function(e,r,t){var a="";for(var s=0;s<t.length;s++){if(s)a+=" && ";a+="("+getData(t[s],e.dataLevel)+" !== undefined)"}return a},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}};e.addKeyword("deepRequired",defFunc.definition);return e};function getData(e,r){var t="data"+(r||"");if(!e)return t;var a=t;var s=e.split("/");for(var i=1;i<s.length;i++){var o=s[i];t+=getProperty(unescapeJsonPointer(o));a+=" && "+t}return a}var r=/^[a-z$_][a-z$_0-9]*$/i;var t=/^[0-9]+$/;var a=/'|\\/g;function getProperty(e){return t.test(e)?"["+e+"]":r.test(e)?"."+e:"['"+e.replace(a,"\\$&")+"']"}function unescapeJsonPointer(e){return e.replace(/~
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
(function(e,t){true?t(r):0})(this,(function(e){"use strict";function merge(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++){r[t]=arguments[t]}if(r.length>1){r[0]=r[0].slice(0,-1);var a=r.length-1;for(var s=1;s<a;++s){r[s]=r[s].slice(1,-1)}r[a]=r[a].slice(1);return r.join("")}else{return r[0]}}function subexp(e){return"(?:"+e+")"}function typeOf(e){return e===undefined?"undefined":e===null?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(e){return e.toUpperCase()}function toArray(e){return e!==undefined&&e!==null?e instanceof Array?e:typeof e.length!=="number"||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function assign(e,r){var t=e;if(r){for(var a in r){t[a]=r[a]}}return t}function buildExps(e){var r="[A-Za-z]",t="[\\x0D]",a="[0-9]",s="[\\x22]",i=merge(a,"[A-Fa-f]"),o="[\\x0A]",n="[\\x20]",l=subexp(subexp("%[EFef]"+i+"%"+i+i+"%"+i+i)+"|"+subexp("%[89A-Fa-f]"+i+"%"+i+i)+"|"+subexp("%"+i+i)),u="[\\:\\/\\?\\#\\[\\]\\@]",f="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=merge(u,f),h=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",d=e?"[\\uE000-\\uF8FF]":"[]",p=merge(r,a,"[\\-\\.\\_\\~]",h),m=subexp(r+merge(r,a,"[\\+\\-\\.]")+"*"),g=subexp(subexp(l+"|"+merge(p,f,"[\\:]"))+"*"),y=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+a)+"|"+subexp("1"+a+a)+"|"+subexp("[1-9]"+a)+"|"+a),P=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+a)+"|"+subexp("1"+a+a)+"|"+subexp("0?[1-9]"+a)+"|0?0?"+a),b=subexp(P+"\\."+P+"\\."+P+"\\."+P),E=subexp(i+"{1,4}"),S=subexp(subexp(E+"\\:"+E)+"|"+b),w=subexp(subexp(E+"\\:")+"{6}"+S),x=subexp("\\:\\:"+subexp(E+"\\:")+"{5}"+S),$=subexp(subexp(E)+"?\\:\\:"+subexp(E+"\\:")+"{4}"+S),_=subexp(subexp(subexp(E+"\\:")+"{0,1}"+E)+"?\\:\\:"+subexp(E+"\\:")+"{3}"+S),R=subexp(subexp(subexp(E+"\\:")+"{0,2}"+E)+"?\\:\\:"+subexp(E+"\\:")+"{2}"+S),F=subexp(subexp(subexp(E+"\\:")+"{0,3}"+E)+"?\\:\\:"+E+"\\:"+S),O=subexp(subexp(subexp(E+"\\:")+"{0,4}"+E)+"?\\:\\:"+S),D=subexp(subexp(subexp(E+"\\:")+"{0,5}"+E)+"?\\:\\:"+E),j=subexp(subexp(subexp(E+"\\:")+"{0,6}"+E)+"?\\:\\:"),I=subexp([w,x,$,_,R,F,O,D,j].join("|")),k=subexp(subexp(p+"|"+l)+"+"),C=subexp(I+"\\%25"+k),A=subexp(I+subexp("\\%25|\\%(?!"+i+"{2})")+k),N=subexp("[vV]"+i+"+\\."+merge(p,f,"[\\:]")+"+"),T=subexp("\\["+subexp(A+"|"+I+"|"+N)+"\\]"),L=subexp(subexp(l+"|"+merge(p,f))+"*"),q=subexp(T+"|"+b+"(?!"+L+")"+"|"+L),z=subexp(a+"*"),M=subexp(subexp(g+"@")+"?"+q+subexp("\\:"+z)+"?"),U=subexp(l+"|"+merge(p,f,"[\\:\\@]")),V=subexp(U+"*"),Q=subexp(U+"+"),K=subexp(subexp(l+"|"+merge(p,f,"[\\@]"))+"+"),H=subexp(subexp("\\/"+V)+"*"),J=subexp("\\/"+subexp(Q+H)+"?"),B=subexp(K+H),Z=subexp(Q+H),G="(?!"+U+")",Y=subexp(H+"|"+J+"|"+B+"|"+Z+"|"+G),W=subexp(subexp(U+"|"+merge("[\\/\\?]",d))+"*"),X=subexp(subexp(U+"|[\\/\\?]")+"*"),ee=subexp(subexp("\\/\\/"+M+H)+"|"+J+"|"+Z+"|"+G),re=subexp(m+"\\:"+ee+subexp("\\?"+W)+"?"+subexp("\\#"+X)+"?"),te=subexp(subexp("\\/\\/"+M+H)+"|"+J+"|"+B+"|"+G),ae=subexp(te+subexp("\\?"+W)+"?"+subexp("\\#"+X)+"?"),se=subexp(re+"|"+ae),ie=subexp(m+"\\:"+ee+subexp("\\?"+W)+"?"),oe="^("+m+")\\:"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+q+")"+subexp("\\:("+z+")")+"?)")+"?("+H+"|"+J+"|"+Z+"|"+G+")")+subexp("\\?("+W+")")+"?"+subexp("\\#("+X+")")+"?$",ne="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+q+")"+subexp("\\:("+z+")")+"?)")+"?("+H+"|"+J+"|"+B+"|"+G+")")+subexp("\\?("+W+")")+"?"+subexp("\\#("+X+")")+"?$",le="^("+m+")\\:"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+q+")"+subexp("\\:("+z+")")+"?)")+"?("+H+"|"+J+"|"+Z+"|"+G+")")+subexp("\\?("+W+")")+"?$",ue="^"+subexp("\\#("+X+")")+"?$",fe="^"+subexp("("+g+")@")+"?("+q+")"+subexp("\\:("+z+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",r,a,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",p,f),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",p,f),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",p,f),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",p,f),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",p,f,"[\\:\\@\\/\\?]",d),"g"),NOT_FRAGMENT:new RegExp(merg