securityos/node_modules/next/dist/compiled/assert/assert.js

7 lines
77 KiB
JavaScript
Raw Permalink Normal View History

2024-09-06 15:32:35 +00:00
(function(){var e={992:function(e){e.exports=function(e,r,n){if(e.filter)return e.filter(r,n);if(void 0===e||null===e)throw new TypeError;if("function"!=typeof r)throw new TypeError;var o=[];for(var i=0;i<e.length;i++){if(!t.call(e,i))continue;var a=e[i];if(r.call(n,a,i,e))o.push(a)}return o};var t=Object.prototype.hasOwnProperty},167:function(e,t,r){"use strict";function _typeof(e){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(e){return typeof e}}else{_typeof=function _typeof(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return _typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var n=r(23),o=n.codes,i=o.ERR_AMBIGUOUS_ARGUMENT,a=o.ERR_INVALID_ARG_TYPE,c=o.ERR_INVALID_ARG_VALUE,u=o.ERR_INVALID_RETURN_VALUE,f=o.ERR_MISSING_ARGS;var s=r(545);var l=r(177),p=l.inspect;var y=r(177).types,g=y.isPromise,v=y.isRegExp;var d=Object.assign?Object.assign:r(604).assign;var b=Object.is?Object.is:r(208);var h=new Map;var m;var S;var A;var E;var O;function lazyLoadComparison(){var e=r(176);m=e.isDeepEqual;S=e.isDeepStrictEqual}var w=/[\x00-\x08\x0b\x0c\x0e-\x1f]/g;var j=null&&["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","","","\\u000b","\\f","","\\u000e","\\u000f","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001a","\\u001b","\\u001c","\\u001d","\\u001e","\\u001f"];var P=function escapeFn(e){return j[e.charCodeAt(0)]};var _=false;var x=e.exports=ok;var k={};function innerFail(e){if(e.message instanceof Error)throw e.message;throw new s(e)}function fail(e,t,r,n,o){var i=arguments.length;var a;if(i===0){a="Failed"}else if(i===1){r=e;e=undefined}else{if(_===false){_=true;var c=process.emitWarning?process.emitWarning:console.warn.bind(console);c("assert.fail() with more than one argument is deprecated. "+"Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}if(i===2)n="!="}if(r instanceof Error)throw r;var u={actual:e,expected:t,operator:n===undefined?"fail":n,stackStartFn:o||fail};if(r!==undefined){u.message=r}var f=new s(u);if(a){f.message=a;f.generatedMessage=true}throw f}x.fail=fail;x.AssertionError=s;function innerOk(e,t,r,n){if(!r){var o=false;if(t===0){o=true;n="No value argument passed to `assert.ok()`"}else if(n instanceof Error){throw n}var i=new s({actual:r,expected:true,message:n,operator:"==",stackStartFn:e});i.generatedMessage=o;throw i}}function ok(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}innerOk.apply(void 0,[ok,t.length].concat(t))}x.ok=ok;x.equal=function equal(e,t,r){if(arguments.length<2){throw new f("actual","expected")}if(e!=t){innerFail({actual:e,expected:t,message:r,operator:"==",stackStartFn:equal})}};x.notEqual=function notEqual(e,t,r){if(arguments.length<2){throw new f("actual","expected")}if(e==t){innerFail({actual:e,expected:t,message:r,operator:"!=",stackStartFn:notEqual})}};x.deepEqual=function deepEqual(e,t,r){if(arguments.length<2){throw new f("actual","expected")}if(m===undefined)lazyLoadComparison();if(!m(e,t)){innerFail({actual:e,expected:t,message:r,operator:"deepEqual",stackStartFn:deepEqual})}};x.notDeepEqual=function notDeepEqual(e,t,r){if(arguments.length<2){throw new f("actual","expected")}if(m===undefined)lazyLoadComparison();if(m(e,t)){innerFail({actual:e,expected:t,message:r,operator:"notDeepEqual",stackStartFn:notDeepEqual})}};x.deepStrictEqual=function deepStrictEqual(e,t,r){if(arguments.length<2){throw new f("actual","expected")}if(m===undefined)lazyLoadComparison();if(!S(e,t)){innerFail({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:deepStrictEqual})}};x.notDeepStrictEqual=notDeepStrictEqual;function notDeepStrictEqual(e,t,r){if(arguments.length<2){throw new f("actual","expected")}if(m===undefined)lazyLoadComparison();if(S(e,t)){innerFail({actual:e,expected:t,message:r,operator:"notDeepStrictEqual",stackStartFn:notDeepStric
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/function compare(e,t){if(e===t){return 0}var r=e.length;var n=t.length;for(var o=0,i=Math.min(r,n);o<i;++o){if(e[o]!==t[o]){r=e[o];n=t[o];break}}if(r<n){return-1}if(n<r){return 1}return 0}var x=undefined;var k=true;var I=false;var F=0;var T=1;var R=2;var N=3;function areSimilarRegExps(e,t){return n?e.source===t.source&&e.flags===t.flags:RegExp.prototype.toString.call(e)===RegExp.prototype.toString.call(t)}function areSimilarFloatArrays(e,t){if(e.byteLength!==t.byteLength){return false}for(var r=0;r<e.byteLength;r++){if(e[r]!==t[r]){return false}}return true}function areSimilarTypedArrays(e,t){if(e.byteLength!==t.byteLength){return false}return compare(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))===0}function areEqualArrayBuffers(e,t){return e.byteLength===t.byteLength&&compare(new Uint8Array(e),new Uint8Array(t))===0}function isEqualBoxedPrimitive(e,t){if(A(e)){return A(t)&&a(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t))}if(E(e)){return E(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t)}if(O(e)){return O(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t)}if(w(e)){return w(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t)}return j(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}function innerDeepEqual(e,t,r,n){if(e===t){if(e!==0)return true;return r?a(e,t):true}if(r){if(_typeof(e)!=="object"){return typeof e==="number"&&u(e)&&u(t)}if(_typeof(t)!=="object"||e===null||t===null){return false}if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)){return false}}else{if(e===null||_typeof(e)!=="object"){if(t===null||_typeof(t)!=="object"){return e==t}return false}if(t===null||_typeof(t)!=="object"){return false}}var o=l(e);var i=l(t);if(o!==i){return false}if(Array.isArray(e)){if(e.length!==t.length){return false}var c=getOwnNonIndexProperties(e,x);var f=getOwnNonIndexProperties(t,x);if(c.length!==f.length){return false}return keyCheck(e,t,r,n,T,c)}if(o==="[object Object]"){if(!d(e)&&d(t)||!h(e)&&h(t)){return false}}if(v(e)){if(!v(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t)){return false}}else if(b(e)){if(!b(t)||!areSimilarRegExps(e,t)){return false}}else if(m(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name){return false}}else if(g(e)){if(!r&&(P(e)||_(e))){if(!areSimilarFloatArrays(e,t)){return false}}else if(!areSimilarTypedArrays(e,t)){return false}var s=getOwnNonIndexProperties(e,x);var p=getOwnNonIndexProperties(t,x);if(s.length!==p.length){return false}return keyCheck(e,t,r,n,F,s)}else if(h(e)){if(!h(t)||e.size!==t.size){return false}return keyCheck(e,t,r,n,R)}else if(d(e)){if(!d(t)||e.size!==t.size){return false}return keyCheck(e,t,r,n,N)}else if(y(e)){if(!areEqualArrayBuffers(e,t)){return false}}else if(S(e)&&!isEqualBoxedPrimitive(e,t)){return false}return keyCheck(e,t,r,n,F)}function getEnumerables(e,t){return t.filter((function(t){return s(e,t)}))}function keyCheck(e,t,r,n,o,i){if(arguments.length===5){i=Object.keys(e);var a=Object.keys(t);if(i.length!==a.length){return false}}var u=0;for(;u<i.length;u++){if(!f(t,i[u])){return false}}if(r&&arguments.length===5){var l=c(e);if(l.length!==0){var p=0;for(u=0;u<l.length;u++){var y=l[u];if(s(e,y)){if(!s(t,y)){return false}i.push(y);p++}else if(s(t,y)){return false}}var g=c(t);if(l.length!==g.length&&getEnumerables(t,g).length!==p){return false}}else{var v=c(t);if(v.length!==0&&getEnumerables(t,v).length!==0){return false}}}if(i.length===0&&(o===F||o===T&&e.length===0||e.size===0)){return true}if(n===undefined){n={val1:new Map,val2:new Map,position:0}}else{var d=n.val1.get(e);if(d!==undefined){var b=n.val2.get(t);if(b!==undefined){return d===b}}n.position++}n.val1.set(e,n.position);n.val2.set(t,n.position);var h=objEquiv(e,t,r,i,n,o);n.val1.delete(e);n.val2.delete(t);return h}function setHasEqualElement(e,t,r,n){var i=o(e);for(var a=0;a<i.length;a++){var c=i[a];if(innerDeepEqual(t,c,r,n)){e.delete(c);return true}}return false}function findLooseMatchingPrimitives