Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@haventech/supertype

Package Overview
Dependencies
Maintainers
4
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@haventech/supertype - npm Package Compare versions

Comparing version 3.5.0 to 3.6.0-beta.0

2

dist/decorators.js

@@ -172,2 +172,2 @@ "use strict";

exports.remote = remote;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjb3JhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9kZWNvcmF0b3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEseUNBQXdDO0FBQS9CLGdDQUFBLFNBQVMsQ0FBQTtBQUNsQixtREFBa0Q7QUFFbEQsNEJBQTBCO0FBRTFCOzs7Ozs7OztNQVFNO0FBQ04sd0JBQStCLFdBQVksRUFBRSxjQUFlO0lBRXhELHNGQUFzRjtJQUN0RixvRkFBb0Y7SUFDcEYsOEZBQThGO0lBRTlGLGdDQUFnQztJQUNoQyxJQUFJLFdBQVcsQ0FBQyxTQUFTLEVBQUUsRUFBRSx3SUFBd0k7UUFDakssT0FBTyxTQUFTLENBQUMsV0FBVyxDQUFDLENBQUM7S0FDakM7SUFFRCxtQ0FBbUM7SUFDbkMsSUFBSSxLQUFLLEdBQUcsV0FBVyxDQUFDO0lBQ3hCLE9BQU8sU0FBUyxDQUFDO0lBRWpCLHNCQUFzQjtJQUN0QixtQkFBbUIsTUFBTTtRQUNyQixjQUFjLEdBQUcsY0FBYyxJQUFJLCtCQUFjLENBQUM7UUFFbEQsTUFBTSxDQUFDLFNBQVMsQ0FBQyxZQUFZLEdBQUcsTUFBTSxDQUFDO1FBQ3ZDLE1BQU0sQ0FBQyxTQUFTLENBQUMsYUFBYSxHQUFHLE1BQU0sQ0FBQztRQUN4QyxNQUFNLENBQU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0gZGVmaW5lUHJvcGVydHk7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZGVmaW5lUHJvcGVydHkudmFsdWUgaW4gWydzdHJpbmcnLCAnbnVtYmVyJ10gfHwgZGVmaW5lUHJvcGVydHkudmFsdWUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRhcmdldC5wcm90b3R5cGUsIHByb3BlcnR5TmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGVudW1lcmFibGU6IHRydWUsIHdyaXRhYmxlOiB0cnVlLCB2YWx1ZTogZGVmaW5lUHJvcGVydHkudmFsdWUgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGFyZ2V0LnByb3RvdHlwZSwgcHJvcGVydHlOYW1lLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzWydfXycgKyBwcm9wZXJ0eU5hbWVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzWydfXycgKyBwcm9wZXJ0eU5hbWVdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPYmplY3RUZW1wbGF0ZS5jbG9uZShkZWZpbmVQcm9wZXJ0eS52YWx1ZSwgZGVmaW5lUHJvcGVydHkub2YgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmaW5lUHJvcGVydHkudHlwZSB8fCBudWxsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpc1snX18nICsgcHJvcGVydHlOYW1lXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbJ19fJyArIHByb3BlcnR5TmFtZV0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgaWYgKHRhcmdldC5wcm90b3R5cGUuX19leGNlcHRpb25zX18pIHtcbiAgICAgICAgICAgIG9iamVjdFRlbXBsYXRlLl9fZXhjZXB0aW9uc19fID0gb2JqZWN0VGVtcGxhdGUuX19leGNlcHRpb25zX18gfHwgW107XG4gICAgICAgICAgICBmb3IgKHZhciBleGNlcHRpb25LZXkgaW4gdGFyZ2V0LnByb3RvdHlwZS5fX2V4Y2VwdGlvbnNfXykge1xuICAgICAgICAgICAgICAgIG9iamVjdFRlbXBsYXRlLl9fZXhjZXB0aW9uc19fLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBmdW5jOiB0YXJnZXQucHJvdG90eXBlLl9fZXhjZXB0aW9uc19fW2V4Y2VwdGlvbktleV0sXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzOiBnZXROYW1lLFxuICAgICAgICAgICAgICAgICAgICBwcm9wOiBleGNlcHRpb25LZXlcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXMoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGFyZ2V0LnByb3RvdHlwZS5fX2Ftb3JwaGljcHJvcHN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2VwdGlvbnNfXyA9IHRhcmdldC5fX2V4Y2VwdGlvbnNfXyB8fCB7fTtcbiAgICAgICAgICAgIHRhcmdldC5fX2V4Y2VwdGlvbnNfX1t0YXJnZXRLZXldID0gZnVuY3Rpb24gKGNsYXNzTmFtZSwgcHJvcCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjbGFzc05hbWUgKyAnLicgKyBwcm9wICtcbiAgICAgICAgICAgICAgICAnIC0gdHlwZSBpcyB1bmRlZmluZWQuIENpcmN1bGFyIHJlZmVyZW5jZT8gVHJ5IEBwcm9wZXJ0eSh7Z2V0VHlwZTogKCkgPT4ge3JldHVybiAnICtcbiAgICAgICAgICAgICAgICBwcm9wWzBdLnRvVXBwZXJDYXNlKCkgKyBwcm9wLnN1YnN0cigxKSArICd9fSknO1xuXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZWZsZWN0aW9uVHlwZSA9PT0gQXJyYXkpIHtcbiAgICAgICAgICAgIHByb3BzLnR5cGUgPSBBcnJheTtcbiAgICAgICAgICAgIHByb3BzLm9mID0gdHlwZTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHByb3BzLnR5cGUgPSB0eXBlO1xuICAgICAgICB9XG4gICAgICAgIHRhcmdldC5fX2Ftb3JwaGljcHJvcHNfX1t0YXJnZXRLZXldID0gcHJvcHM7XG4gICAgfTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiByZW1vdGUoZGVmaW5lUHJvcGVydHkpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24gKHRhcmdldCwgcHJvcGVydHlOYW1lLCBkZXNjcmlwdG9yKSB7XG4gICAgfVxufSJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjb3JhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9kZWNvcmF0b3JzLnRzIl0sIm5hbWVz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5KHRhcmdldC5wcm90b3R5cGUsIHByb3BlcnR5TmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGVudW1lcmFibGU6IHRydWUsIHdyaXRhYmxlOiB0cnVlLCB2YWx1ZTogZGVmaW5lUHJvcGVydHkudmFsdWUgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGFyZ2V0LnByb3RvdHlwZSwgcHJvcGVydHlOYW1lLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzWydfXycgKyBwcm9wZXJ0eU5hbWVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzWydfXycgKyBwcm9wZXJ0eU5hbWVdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPYmplY3RUZW1wbGF0ZS5jbG9uZShkZWZpbmVQcm9wZXJ0eS52YWx1ZSwgZGVmaW5lUHJvcGVydHkub2YgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmaW5lUHJvcGVydHkudHlwZSB8fCBudWxsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpc1snX18nICsgcHJvcGVydHlOYW1lXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbJ19fJyArIHByb3BlcnR5TmFtZV0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgaWYgKHRhcmdldC5wcm90b3R5cGUuX19leGNlcHRpb25zX18pIHtcbiAgICAgICAgICAgIG9iamVjdFRlbXBsYXRlLl9fZXhjZXB0aW9uc19fID0gb2JqZWN0VGVtcGxhdGUuX19leGNlcHRpb25zX18gfHwgW107XG4gICAgICAgICAgICBmb3IgKHZhciBleGNlcHRpb25LZXkgaW4gdGFyZ2V0LnByb3RvdHlwZS5fX2V4Y2VwdGlvbnNfXykge1xuICAgICAgICAgICAgICAgIG9iamVjdFRlbXBsYXRlLl9fZXhjZXB0aW9uc19fLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBmdW5jOiB0YXJnZXQucHJvdG90eXBlLl9fZXhjZXB0aW9uc19fW2V4Y2VwdGlvbktleV0sXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzOiBnZXROYW1lLFxuICAgICAgICAgICAgICAgICAgICBwcm9wOiBleGNlcHRpb25LZXlcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXMoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGFyZ2V0LnByb3RvdHlwZS5fX2Ftb3JwaGljcHJvcHNfXztcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBnZXROYW1lKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRhcmdldC50b1N0cmluZygpLm1hdGNoKC9mdW5jdGlvbiAoW14oXSopLylbMV07XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gZ2V0RGljdGlvbmFyeSgpIHtcbiAgICAgICAgICAgIG9iamVj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AgICAgICAgICAgICAgICAnIC0gdHlwZSBpcyB1bmRlZmluZWQuIENpcmN1bGFyIHJlZmVyZW5jZT8gVHJ5IEBwcm9wZXJ0eSh7Z2V0VHlwZTogKCkgPT4ge3JldHVybiAnICtcbiAgICAgICAgICAgICAgICBwcm9wWzBdLnRvVXBwZXJDYXNlKCkgKyBwcm9wLnN1YnN0cigxKSArICd9fSknO1xuXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZWZsZWN0aW9uVHlwZSA9PT0gQXJyYXkpIHtcbiAgICAgICAgICAgIHByb3BzLnR5cGUgPSBBcnJheTtcbiAgICAgICAgICAgIHByb3BzLm9mID0gdHlwZTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHByb3BzLnR5cGUgPSB0eXBlO1xuICAgICAgICB9XG4gICAgICAgIHRhcmdldC5fX2Ftb3JwaGljcHJvcHNfX1t0YXJnZXRLZXldID0gcHJvcHM7XG4gICAgfTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiByZW1vdGUoZGVmaW5lUHJvcGVydHkpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24gKHRhcmdldCwgcHJvcGVydHlOYW1lLCBkZXNjcmlwdG9yKSB7XG4gICAgfVxufSJdfQ==

@@ -168,2 +168,2 @@ "use strict";

;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyaWFsaXplci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9zZXJpYWxpemVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUE7O0dBRUc7QUFDSDs7Ozs7Ozs7R0FRRztBQUNILHNCQUE2QixHQUFHLEVBQUUsRUFBRztJQUNqQyxJQUFJLEtBQUssR0FBRyxFQUFFLENBQUM7SUFFZixJQUFJO1FBQ0EsT0FBTyxJQUFJLENBQUMsU0FBUyxDQUFDLEd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1xuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkob2JqLCBmdW5jdGlvbiBhKGtleSwgdmFsdWUpIHtcbiAgICAgICAgICAgIGlmIChrZXkgPT09ICdfX29iamVjdFRlbXBsYXRlX18nIHx8IGtleSA9PT0gJ2Ftb3JwaGljJykge1xuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHZhbHVlICYmIHZhbHVlLl9fdGVtcGxhdGVfXyAmJiB2YWx1ZS5fX2lkX18pIHtcbiAgICAgICAgICAgICAgICBpZiAoaWRNYXBbdmFsdWUuX19pZF9fXSkge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHsgX19pZF9fOiB2YWx1ZS5fX2lkX18udG9TdHJpbmcoKSB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWRNYXBbdmFsdWUuX19pZF9fLnRvU3RyaW5nKCldID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY2IpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY2Ioa2V5LCB2YWx1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIGNhdGNoIChlKSB7XG4gICAgICAgIHRocm93IGU7XG4gICAgfVxufVxuXG5mdW5jdGlvbiBwcm9wWGZlcihwcm9wLCBwb2pvLCBvYmopIHtcbiAgICBpZiAocG9qb1twcm9wXSkge1xuICAgICAgICBvYmpbcHJvcF0gPSBwb2pvW3Byb3BdO1xuICAgIH1cbn1cblxuLyoqXG4gKiBPYmplY3RUZW1wbGF0ZS5mcm9tUE9KT1xuICovXG5leHBvcnQgZnVuY3Rpb24gZnJvbVBPSk8ocG9qbywgdGVtcGxhdGUsIGRlZmluZVByb3BlcnR5PywgaWRNYXA/LCBpZFF1YWxpZmllcj8sIHBhcmVudD8sIHByb3A/LCBjcmVhdG9yPykge1xuICAgIGZ1bmN0aW9uIGdldElkKGlkKSB7XG4gICAgICAgIGlmICh0eXBlb2YgKGlkUXVhbGlmaWVyKSAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIHJldHVybiBpZCArICctJyArIGlkUXVhbGlmaWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGlkO1xuICAgIH1cblxuICAgIC8vIEZvciByZWNvcmRpbmcgYmFjayByZWZzXG4gICAgaWYgKCFpZE1hcCkge1xuICAgICAgICBpZE1hcCA9IHt9O1xuICAgIH1cblxuICAgIGlmICghcG9qby5fX2lkX18pIHtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIHZhciBvYmo7XG5cbiAgICBpZiAoY3JlYXRvcikge1xuICAgICAgICBvYmogPSBjcmVhdG9yKHBhcmVudCwgcHJvcCwgdGVtcGxhdGUsIGlkTWFwW3Bvam8uX19pZF9fLnRvU3RyaW5nKCldLCBwb2pvLl9fdHJhbnNpZW50X18pO1xuXG4gICAgICAgIGlmIChvYmogaW5zdGFuY2VvZiBBcnJheSkge1xuICAgICAgICAgICAgb2JqID0gb2JqWzBdO1xuICAgICAgICAgICAgaWRNYXBbb2JqLl9faWRfXy50b1N0cmluZygpXSA9IG9iajtcbiAgICAgICAgICAgIHJldHVybiBvYmo7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZW9mIChvYmopID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIW9iaikge1xuICAgICAgICAgICAgdGhpcy5ub0luaXQgPSB0cnVlO1xuICAgICAgICAgICAgb2JqID0gbmV3IHRlbXBsYXRlKCk7XG4gICAgICAgICAgICB0aGlzLm5vSW5pdCA9IGZhbHNlO1xuICAgICAgICB9XG4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gaWYgKHR5cGUgJiYgdHlwZW9mIChwb2pvW3Bvam9Qcm9wXSkgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICBpZiAodHlwZSA9PSBBcnJheSAmJiBkZWZpbmVQcm9wLm9mICYmIGRlZmluZVByb3Aub2YuaXNPYmplY3RUZW1wbGF0ZSkgeyAvLyBBcnJheSBvZiB0ZW1wbGF0ZWQgb2JqZWN0c1xuICAgICAgICAgICAgICAgIHZhciBhcnJheURpcmVjdGlvbnMgPSBudWxsO1xuXG4gICAgICAgICAgICAgICAgaWYgKGNyZWF0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgYXJyYXlEaXJlY3Rpb25zID0gY3JlYXRvcihvYmosIHByb3BiLCBkZWZpbmVQcm9wLm9mLCBpZE1hcFtwb2pvLl9faWRfXy50b1N0cmluZygpXSwgcG9qby5fX3RyYW5zaWVudF9fKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIChhcnJheURpcmVjdGlvbnMpICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdID0gW107XG5cbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaXggPSAwOyBpeCA8IHBvam9bcG9qb1Byb3BdLmxlbmd0aDsgKytpeCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGF0eXBlID0gcG9qb1twb2pvUHJvcF1baXhdLl9fdGVtcGxhdGVfXyB8fCBkZWZpbmVQcm9wLm9mO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBvam9bcG9qb1Byb3BdW2l4XSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwb2pvW3Bvam9Qcm9wXVtpeF0uX19pZF9fICYmIGlkTWFwW2dldElkKHBvam9bcG9qb1Byb3BdW2l4XS5fX2lkX18udG9TdHJpbmcoKSldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ialtwcm9wYl1baXhdID0gaWRNYXBbZ2V0SWQocG9qb1twb2pvUHJvcF1baXhdLl9faWRfXy50b1N0cmluZygpKV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdW2l4XSA9IHRoaXMuZnJvbVBPSk8ocG9qb1twb2pvUHJvcF1baXhdLCBhdHlwZSwgZGVmaW5lUHJvcCwgaWRNYXAsIGlkUXVhbGlmaWVyLCBvYmosIHByb3BiLCBjcmVhdG9yKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdW2l4XSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtwcm9wYl0gPSBbXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICh0eXBlLmlzT2JqZWN0VGVtcGxhdGUpIHsgLy8gVGVtcGxhdGVkIG9iamVjdHNcbiAgICAgICAgICAgICAgICB2YXIgb3R5cGUgPSBwb2pvW3Bvam9Qcm9wXS5fX3RlbXBsYXRlX18gfHwgdHlwZTtcbiAgICAgICAgICAgICAgICBpZiAocG9qb1twb2pvUHJvcF0uX19pZF9fICYmIGlkTWFwW2dldElkKHBvam9bcG9qb1Byb3BdLl9faWRfXy50b1N0cmluZygpKV0pIHtcbiAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXSA9IGlkTWFwW2dldElkKHBvam9bcG9qb1Byb3BdLl9faWRfXy50b1N0cmluZygpKV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdID0gdGhpcy5mcm9tUE9KTyhwb2pvW3Bvam9Qcm9wXSwgb3R5cGUsIGRlZmluZVByb3AsIGlkTWFwLCBpZFF1YWxpZmllciwgb2JqLCBwcm9wYiwgY3JlYXRvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAodHlwZSA9PSBEYXRlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHBvam9bcG9qb1Byb3BdKSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtwcm9wYl0gPSBuZXcgRGF0ZShwb2pvW3Bvam9Qcm9wXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBvYmpbcHJvcGJdID0gcG9qb1twb2pvUHJvcF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBGb3IgdGhlIGJlbmVmaXQgb2YgcGVyc2lzdE9iamVjdFRlbXBsYXRlXG4gICAgaWYgKCFjcmVhdG9yICYmIHBvam8uX2lkKSB7XG4gICAgICAgIG9iai5faWQgPSBnZXRJZChwb2pvLl9pZCk7XG4gICAgfVxuXG4gICAgaWYgKCFjcmVhdG9yKSB7XG4gICAgICAgIHByb3BYZmVyKCdfX2NoYW5nZWRfXycsIHBvam8sIG9iaik7XG4gICAgICAgIHByb3BYZmVyKCdfX3ZlcnNpb25fXycsIHBvam8sIG9iaik7XG4gICAgfVxuXG4gICAgcHJvcFhmZXIoJ19fdG9TZXJ2ZXJfXycsIHBvam8sIG9iaik7XG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gICAgICAgICAgICAgICAgICAgdmFsdWUgPSB7IF9faWRfXzogdmFsdWUuX19pZF9fLnRvU3RyaW5nKCkgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlkTWFwW3ZhbHVlLl9faWRfXy50b1N0cmluZygpXSA9IHZhbHVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGNiKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNiKGtleSwgdmFsdWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBjYXRjaCAoZSkge1xuICAgICAgICB0aHJvdyBlO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gcHJvcFhmZXIocHJvcCwgcG9qbywgb2JqKSB7XG4gICAgaWYgKHBvam9bcHJvcF0pIHtcbiAgICAgICAgb2JqW3Byb3BdID0gcG9qb1twcm9wXTtcbiAgICB9XG59XG5cbi8qKlxuICogT2JqZWN0VGVtcGxhdGUuZnJvbVBPSk9cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGZyb21QT0pPKHBvam8sIHRlbXBsYXRlLCBkZWZpbmVQcm9wZXJ0eT8sIGlkTWFwPywgaWRRdWFsaWZpZXI/LCBwYXJlbnQ/LCBwcm9wPywgY3JlYXRvcj8pIHtcbiAgICBmdW5jdGlvbiBnZXRJZChpZCkge1xuICAgICAgICBpZiAodHlwZW9mIChpZFF1YWxpZmllcikgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICByZXR1cm4gaWQgKyAnLScgKyBpZFF1YWxpZmllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBpZDtcbiAgICB9XG5cbiAgICAvLyBGb3IgcmVjb3JkaW5nIGJhY2sgcmVmc1xuICAgIGlmICghaWRNYXApIHtcbiAgIC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dseSBjcmVhdGVkIG9iamVjdFxuICAgIHZhciBwcm9wcyA9IG9iai5fX3RlbXBsYXRlX18uZ2V0UHJvcGVydGllcygpO1xuXG4gICAgZm9yICh2YXIgcHJvcGIgaW4gcG9qbykge1xuICAgICAgICBwcm9wYiA9IHByb3BiLnJlcGxhY2UoL15fXy8sICcnKTtcbiAgICAgICAgdmFyIGRlZmluZVByb3AgPSBwcm9wc1twcm9wYl07XG4gICAgICAgIGlmICghZGVmaW5lUHJvcClcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB2YXIgdHlwZSA9IGRlZmluZVByb3AudHlwZTtcblxuICAgICAgICAvLyBCZWNhdXNlIHNlbW90dXMgY2FuIHNlcmlhbGl6ZSBvbmx5IHRoZSBzaGFkb3cgcHJvcGVydGllcyB3ZSB0cnkgYW5kIHJlc3RvcmUgdGhlbVxuICAgICAgICB2YXIgcG9qb1Byb3AgPSAodHlwZSAmJiB0eXBlb2YgcG9qb1snX18nICsgcHJvcGJdICE9PSAndW5kZWZpbmVkJykgPyAnX18nICsgcHJvcGIgOiBwcm9wYjtcblxuICAgICAgICBpZiAodHlwZSAmJiBwb2pvW3Bvam9Qcm9wXSA9PSBudWxsKSB7XG4gICAgICAgICAgICBvYmpbcHJvcGJdID0gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0eXBlICYmIHR5cGVvZiAocG9qb1twb2pvUHJvcF0pICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgaWYgKHR5cGUgPT0gQXJyYXkgJiYgZGVmaW5lUHJvcC5vZiAmJiBkZWZpbmVQcm9wLm9mLmlzT2JqZWN0VGVtcGxhdGUpIHsgLy8gQXJyYXkgb2YgdGVtcGxhdGVkIG9iamVjdHNcbiAgICAgICAgICAgICAgICB2YXIgYXJyYXlEaXJlY3Rpb25zID0gbnVsbDtcblxuICAgICAgICAgICAgICAgIGlmIChjcmVhdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgIGFycmF5RGlyZWN0aW9ucyA9IGNyZWF0b3Iob2JqLCBwcm9wYiwgZGVmaW5lUHJvcC5vZiwgaWRNYXBbcG9qby5fX2lkX18udG9TdHJpbmcoKV0sIHBvam8uX190cmFuc2llbnRfXyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAoYXJyYXlEaXJlY3Rpb25zKSAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXSA9IFtdO1xuXG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGl4ID0gMDsgaXggPCBwb2pvW3Bvam9Qcm9wXS5sZW5ndGg7ICsraXgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdHlwZSA9IHBvam9bcG9qb1Byb3BdW2l4XS5fX3RlbXBsYXRlX18gfHwgZGVmaW5lUHJvcC5vZjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwb2pvW3Bvam9Qcm9wXVtpeF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocG9qb1twb2pvUHJvcF1baXhdLl9faWRfXyAmJiBpZE1hcFtnZXRJZChwb2pvW3Bvam9Qcm9wXVtpeF0uX19pZF9fLnRvU3RyaW5nKCkpXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdW2l4XSA9IGlkTWFwW2dldElkKHBvam9bcG9qb1Byb3BdW2l4XS5fX2lkX18udG9TdHJpbmcoKSldO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXVtpeF0gPSB0aGlzLmZyb21QT0pPKHBvam9bcG9qb1Byb3BdW2l4XSwgYXR5cGUsIGRlZmluZVByb3AsIGlkTWFwLCBpZFF1YWxpZmllciwgb2JqLCBwcm9wYiwgY3JlYXRvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXVtpeF0gPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdID0gW107XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAodHlwZS5pc09iamVjdFRlbXBsYXRlKSB7IC8vIFRlbXBsYXRlZCBvYmplY3RzXG4gICAgICAgICAgICAgICAgdmFyIG90eXBlID0gcG9qb1twb2pvUHJvcF0uX190ZW1wbGF0ZV9fIHx8IHR5cGU7XG4gICAgICAgICAgICAgICAgaWYgKHBvam9bcG9qb1Byb3BdLl9faWRfXyAmJiBpZE1hcFtnZXRJZChwb2pvW3Bvam9Qcm9wXS5fX2lkX18udG9TdHJpbmcoKSldKSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtwcm9wYl0gPSBpZE1hcFtnZXRJZChwb2pvW3Bvam9Qcm9wXS5fX2lkX18udG9TdHJpbmcoKSldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXSA9IHRoaXMuZnJvbVBPSk8ocG9qb1twb2pvUHJvcF0sIG90eXBlLCBkZWZpbmVQcm9wLCBpZE1hcCwgaWRRdWFsaWZpZXIsIG9iaiwgcHJvcGIsIGNyZWF0b3IpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGUgPT0gRGF0ZSkge1xuICAgICAgICAgICAgICAgIGlmIChwb2pvW3Bvam9Qcm9wXSkge1xuICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdID0gbmV3IERhdGUocG9qb1twb2pvUHJvcF0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXSA9IG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgb2JqW3Byb3BiXSA9IHBvam9bcG9qb1Byb3BdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gRm9yIHRoZSBiZW5lZml0IG9mIHBlcnNpc3RPYmplY3RUZW1wbGF0ZVxuICAgIGlmICghY3JlYXRvciAmJiBwb2pvLl9pZCkge1xuICAgICAgICBvYmouX2lkID0gZ2V0SWQocG9qby5faWQpO1xuICAgIH1cblxuICAgIGlmICghY3JlYXRvcikge1xuICAgICAgICBwcm9wWGZlcignX19jaGFuZ2VkX18nLCBwb2pvLCBvYmopO1xuICAgICAgICBwcm9wWGZlcignX192ZXJzaW9uX18nLCBwb2pvLCBvYmopO1xuICAgIH1cblxuICAgIHByb3BYZmVyKCdfX3RvU2VydmVyX18nLCBwb2pvLCBvYmopO1xuICAgIHByb3BYZmVyKCdfX3RvQ2xpZW50X18nLCBwb2pvLCBvYmopO1xuXG4gICAgcmV0dXJuIG9iajtcbn07XG5cblxuLyoqXG4gKiBPYmplY3RUZW1wbGF0ZS5mcm9tSlNPTlxuICovXG5leHBvcnQgZnVuY3Rpb24gZnJvbUpTT04oc3RyLCB0ZW1wbGF0ZSwgaWRRdWFsaWZpZXIpIHtcbiAgICByZXR1cm4gdGhpcy5mcm9tUE9KTyhKU09OLnBhcnNlKHN0ciksIHRlbXBsYXRlLCBudWxsLCBudWxsLCBpZFF1YWxpZmllcik7XG59O1xuIl19

@@ -113,2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cGksICdjb21tb25fc2VjdXJlJywgYXBwQ29tbW9uUGF0aCwgYGNvbmZpZ19zZWN1cmUuanNvbmApO1xuICAgIGxvYWRDb25maWdGaWxlKGFwcENmZ0FwaSwgJ2NvbW1vbicsIGFwcENvbW1vblBhdGgsIGBjb25maWcuanNvbmApO1xuXG4gICAgLy8gTG9hZCB0aGUgcm9vdCB2YWx1ZXMgaGVyZSB0b29cbiAgICBpZihlbnZOYW1lKSB7XG4gICAgICAgIGxvYWRDb25maWdGaWxlKGFwcENmZ0FwaSwgJ3Jvb3RfZW52Jywgcm9vdERpciwgYGNvbmZpZ18ke2Vudk5hbWV9Lmpzb25gKTtcbiAgICB9XG5cbiAgICBsb2FkQ29uZmlnRmlsZShhcHBDZmdBcGksICdyb290X3NlY3VyZScsIHJvb3REaXIsIGBjb25maWdfc2VjdXJlLmpzb25gKTtcbiAgICBsb2FkQ29uZmlnRmlsZShhcHBDZmdBcGksICdyb290Jywgcm9vdERpciwgYGNvbmZpZy5qc29uYCk7XG5cbiAgICByZXR1cm4gY29uZmlnO1xufVxuXG5cbmZ1bmN0aW9uIGxvYWRDb25maWdGaWxlKGNvbmZpZzogbmNvbmYuUHJvdmlkZXIsIG5hbWU6IHN0cmluZywgYXBwUGF0aDogc3RyaW5nLCBmaWxlTmFtZTogc3RyaW5nKSB7XG4gICAgdHJ5IHtcbiAgICAgICAgY29uZmlnLmZpbGUobmFtZSwgYCR7YXBwUGF0aH0vJHtmaWxlTmFtZX1gKTtcbiAgICB9XG4gICAgY2F0Y2ggKGVycikge1xuICAgICAgICBjb25zb2xlLmRlYnVnKGBFcnJvciBsb2FkaW5nICR7YXBwUGF0aH0vJHtmaWxlTmFtZX0gdG8gY29uZmlnYCk7XG4gICAgfVxufSJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3VwZXJ0eXBlQ29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL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09iamVjdCA9IHtcbiAgICAgICAgICAgIHRpbWU6IChuZXcgRGF0ZSgpKS50b0lTT1N0cmluZygpLFxuICAgICAgICAgICAgbXNnOiAnJyxcbiAgICAgICAgICAgIGxldmVsOiAnaW5mbycsIC8vZGVmYXVsdCBpbmZvXG4gICAgICAgICAgICBfX2Ftb3JwaGljQ29udGV4dDoge31cbiAgICAgICAgfTtcblxuICAgICAgICBjb25zdCBhbW9ycGhpY0NvbnRleHQgPSB7fTtcbiAgICAgICAgLy8gQ29weSBhbW9ycGhpYyBjb250ZXh0IGludG8gdGhlIGRhdGFcbiAgICAgICAgZm9yIChjb25zdCBwcm9wIGluIHRoaXMuY29udGV4dCkge1xuICAgICAgICAgICAgb2JqW3Byb3BdID0gdGhpcy5jb250ZXh0W3Byb3BdO1xuICAgICAgICAgICAgYW1vcnBoaWNDb250ZXh0W3Byb3BdID0gdGhpcy5jb250ZXh0W3Byb3BdO1xuICAgICAgICB9XG5cbiAgICAgICAgb2JqLmxldmVsID0gbGV2ZWw7XG4gICAgICAgIG9iai5fX2Ftb3JwaGljQ29udGV4dCA9IGFtb3JwaGljQ29udGV4dDtcblxuICAgICAgICBkYXRhLmZvckVhY2goKGFyZywgaW5kZXgpID0+IHtcbiAgICAgICAgICAgIGlmIChpbmRleCA9PT0gMCAmJiBpc09iamVjdChhcmcpKSB7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBwcm9wZXIgaW4gYXJnKSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtwcm9wZXJdID0gYXJnW3Byb3Blcl07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgbXNnICs9IGAke2FyZ30gYDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgaWYgKG9iai5tc2cubGVuZ3RoKSB7XG4gICAgICAgICAgICBvYmoubXNnICs9ICcgJztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChtc2cubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAob2JqLm1vZHVsZSAmJiBvYmouYWN0aXZpdHkpIHtcbiAgICAgICAgICAgICAgICBvYmoubXNnICs9IGAke29iai5tb2R1bGV9WyR7b2JqLmFjdGl2aXR5fV0gLSBgO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBvYmoubXNnICs9IG1zZztcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChvYmoubW9kdWxlICYmIG9iai5hY3Rpdml0eSkge1xuICAgICAgICAgICAgb2JqLm1zZyArPSBgJHtvYmoubW9kdWxlfVske29iai5hY3Rpdml0eX1dYDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLmlzRW5hYmxlZChsZXZlbFRvU3RyW29iai5sZXZlbF0sIG9iaikpIHtcbiAgICAgICAgICAgIHRoaXMuc2VuZFRvTG9nKGxldmVsVG9TdHJbb2JqLmxldmVsXSwgb2JqLCAuLi5kYXRhKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHN0YXJ0Q29udGV4dChjb250ZXh0KSB7XG4gICAgICAgIHRoaXMuY29udGV4dCA9IGNvbnRleHQ7XG4gICAgfVxuXG4gICAgLy8gU2F2ZSB0aGUgcHJvcGVydGllcyBpbiB0aGUgY29udGV4dCBhbmQgcmV0dXJuIGEgbmV3IG9iamVjdCB0aGF0IGhhcyB0aGUgcHJvcGVydGllcyBvbmx5IHNvIHRoZXkgY2FuIGJlIGNsZWFyZWRcbiAgICBzZXRDb250ZXh0UHJvcHMoY29udGV4dCkge1xuICAgICAgICBjb25zdCByZXZlcnNlID0ge307XG5cbiAgICAgICAgZm9yIChjb25zdCBwcm9wIGluIGNvbnRleHQpIHtcbiAgICAgICAgICAgIHJldmVyc2VbcHJvcF0gPSB0cnVlO1xuICAgICAgICAgICAgdGhpcy5jb250ZXh0W3Byb3BdID0gY29udGV4dFtwcm9wXTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZXZlcnNlO1xuICAgIH1cbiAgICAvLyBQYXJzZSBsb2cgbGV2ZWxzIHN1Y2ggYXMgd2Fybi5hY3Rpdml0eVxuICAgIHNldExldmVsKGxldmVsKSB7XG4gICAgICAgIHZhciBsZXZlbHMgPSBsZXZlbC5zcGxpdCgnOycpO1xuXG4gICAgICAgIGZvciAodmFyIGl4ID0gMDsgaXggPCBsZXZlbHMubGVuZ3RoOyArK2l4KSB7XG4gICAgICAgICAgICB2YXIgbGV2ZWxhID0gbGV2ZWxzW2l4XTtcblxuICAgICAgICAgICAgaWYgKGxldmVsYS5tYXRjaCgvOi8pKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxldmVsc1tpeF0ubWF0Y2goLyguKik6KC4qKS8pKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZ3JhbnVsYXJMZXZlbHNbUmVnRXhwLiQxXSA9IHRoaXMuZ3JhbnVsYXJMZXZlbHNbUmVnRXhwLiQxXSB8fCB7fTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ncmFudWxhckxldmVsc1tSZWdFeHAuJDFdID0gUmVnRXhwLiQyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5sZXZlbCA9IGxldmVsc1tpeF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sZXZlbCA9IGxldmVsYTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIFJlbW92ZSBhbnkgcHJvcGVydGllcyByZWNvcmRlZCBieSBzZXRDb250ZXh0XG4gICAgY2xlYXJDb250ZXh0UHJvcHMoY29udGV4dFRvQ2xlYXIpIHtcbiAgICAgICAgZm9yIChjb25zdCBwcm9wIGluIGNvbnRleHRUb0NsZWFyKSB7XG4gICAgICAgICAgICBkZWxldGU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VGltZShuZXcgRGF0ZShqc29uLnRpbWUpKSArICc6ICcgK1xuICAgICAgICAgICAgbGV2ZWwudG9VcHBlckNhc2UoKSArICc6ICcgK1xuICAgICAgICAgICAgYWRkQ29sb25JZlRva2VuKHNwbGl0WzFdLm5hbWUsICc6ICcpICtcbiAgICAgICAgICAgIGFkZENvbG9uSWZUb2tlbihzcGxpdFsxXS5tc2csICc6ICcpICtcbiAgICAgICAgICAgIHh5KHNwbGl0WzBdKTtcblxuICAgICAgICBmdW5jdGlvbiBhZGRDb2xvbklmVG9rZW4gKHRva2VuLCBjb2xvbkFuZFNwYWNlKSB7XG4gICAgICAgICAgICBpZiAodG9rZW4pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdG9rZW4gKyBjb2xvbkFuZFNwYWNlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gJyc7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiB4eShqKSB7XG4gICAgICAgICAgICB2YXIgc3RyID0gJyc7XG4gICAgICAgICAgICB2YXIgc2VwID0gJyc7XG5cbiAgICAgICAgICAgIGZvciAodmFyIHByb3AgaW4gaikge1xuICAgICAgICAgICAgICAgIHN0ciArPSBzZXAgKyBwcm9wICsgJz0nICsgSlNPTi5zdHJpbmdpZnkoaltwcm9wXSk7XG4gICAgICAgICAgICAgICAgc2VwID0gJyAnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoc3RyLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gJygnICsgc3RyICsgJyknO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gJyc7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIHNwbGl0KGpzb24sIHByb3BzKTogYW55W10ge1xuICAgICAgICBjb25zdCBhID0ge307XG4gICAgICAgIGNvbnN0IGIgPSB7fTtcblxuICAgICAgICBmb3IgKGNvbnN0IHByb3AgaW4ganNvbikge1xuICAgICAgICAgICAgKHByb3BzW3Byb3BdID8gYiA6IGEpW3Byb3BdID0ganNvbltwcm9wXTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBbYSwgYl07XG4gICAgfVxuXG4gICAgLy8gTG9nZ2luZyBpcyBlbmFibGVkIGlmIGVpdGhlciB0aGUgbGV2ZWwgdGhyZXNob2xkIGlzIG1ldCBvciB0aGUgZ3JhbnVsYXIgbGV2ZWwgbWF0Y2hlc1xuICAgIHByaXZhdGUgaXNFbmFibGVkKGxldmVsLCBvYmopIHtcbiAgICAgICAgbGV2ZWwgPSBzdHJUb0xldmVsW2xldmVsXTtcblxuICAgICAgICBpZiAobGV2ZWwgPj0gc3RyVG9MZXZlbFt0aGlzLmxldmVsXSkge1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5ncmFudWxhckxldmVscykge1xuICAgICAgICAgICAgZm9yIChsZXQgbGV2ZWxyIGluIHRoaXMuZ3JhbnVsYXJMZXZlbHMpIHtcbiAgICAgICAgICAgICAgICBpZiAob2JqW2xldmVscl0gJiYgb2JqW2xldmVscl0gPT0gdGhpcy5ncmFudWxhckxldmVsc1tsZXZlbHJdKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn0iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3VwZXJ0eXBlTG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1N1cGVydHlwZUxvZ2dlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLElBQU0sVUFBVSxHQUFHLEVBQUUsRUFBRSxFQUFFLE9BQU8sRUFBRSxFQUFFLEVBQUUsT0FBTyxFQUFFLEVBQUUsRUF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AgICAgICAgIGlmIChpbmRleCA9PT0gMCAmJiBpc09iamVjdChhcmcpKSB7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBwcm9wZXIgaW4gYXJnKSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtwcm9wZXJdID0gYXJnW3Byb3Blcl07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgbXNnICs9IGAke2FyZ30gYDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgaWYgKG9iai5tc2cubGVuZ3RoKSB7XG4gICAgICAgICAgICBvYmoubXNnICs9ICcgJztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChtc2cubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAob2JqLm1vZHVsZSAmJiBvYmouYWN0aXZpdHkpIHtcbiAgICAgICAgICAgICAgICBvYmoubXNnICs9IGAke29iai5tb2R1bGV9WyR7b2JqLmFjdGl2aXR5fV0gLSBgO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBvYmoubXNnICs9IG1zZztcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChvYmoubW9kdWxlICYmIG9iai5hY3Rpdml0eSkge1xuICAgICAgICAgICAgb2JqLm1zZyArPSBgJHtvYmoubW9kdWxlfVske29iai5hY3Rpdml0eX1dYDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLmlzRW5hYmxlZChsZXZlbFRvU3RyW29iai5sZXZlbF0sIG9iaikpIHtcbiAgICAgICAgICAgIHRoaXMuc2VuZFRvTG9nKGxldmVsVG9TdHJbb2JqLmxldmVsXSwgb2JqLCAuLi5kYXRhKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHN0YXJ0Q29udGV4dChjb250ZXh0KSB7XG4gICAgICAgIHRoaXMuY29udGV4dCA9IGNvbnRleHQ7XG4gICAgfVxuXG4gICAgLy8gU2F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ICAgICAgICAgICAgICAgdGhpcy5sZXZlbCA9IGxldmVsc1tpeF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sZXZlbCA9IGxldmVsYTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIFJlbW92ZSBhbnkgcHJvcGVydGllcyByZWNvcmRlZCBieSBzZXRDb250ZXh0XG4gICAgY2xlYXJDb250ZXh0UHJvcHMoY29udGV4dFRvQ2xlYXIpIHtcbiAgICAgICAgZm9yIChjb25zdCBwcm9wIGluIGNvbnRleHRUb0NsZWFyKSB7XG4gICAgICAgICAgICBkZWxldGUgdGhpcy5jb250ZXh0W3Byb3BdO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gQ3JlYXRlIGEgbmV3IGxvZ2dlciBhbmQgY29weSBvdmVyIGl0J3MgY29udGV4dFxuICAgIGNyZWF0ZUNoaWxkTG9nZ2VyKGNvbnRleHQpOiBTdXBlcnR5cGVMb2dnZXIge1xuICAgICAgICBsZXQgY2hpbGQ6IHsgW2tleTogc3RyaW5nXTogYW55IH0gPSB7fTtcblxuICAgICAgICBmb3IgKGxldCBwcm9wIGluIHRoaXMpIHtcbiAgICAgICAgICAgIGNoaWxkW3Byb3BdID0gdGhpc1twcm9wXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNoaWxkLmNvbnRleHQgPSBjb250ZXh0IHx8IHt9O1xuXG4gICAgICAgIGZvciAobGV0IHByb3BlciBpbiB0aGlzLmNvbnRleHQpIHtcbiAgICAgICAgICAgIGNoaWxkLmNvbnRleHRbcHJvcGVyXSA9IHRoaXMuY29udGV4dFtwcm9wZXJdO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGNoaWxkIGFzIFN1cGVydHlwZUxvZ2dlcjsgLy8gYmFkIHByYWN0aWNlIGJ1dCBzaG91bGQgZml4XG4gICAgfVx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uICAgIHByb3RlY3RlZCBzZW5kVG9Mb2cobG9nTGV2ZWwsIGxvZ09iamVjdCwgLi4ucmF3TG9nRGF0YSkge1xuICAgICAgICBjb25zb2xlLmxvZyh0aGlzLnByZXR0eVByaW50KGxvZ0xldmVsLCBsb2dPYmplY3QpKTsgICAgIC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tY29uc29sZVxuICAgIH1cblxuICAgIHByZXR0eVByaW50KGxldmVsLCBqc29uKSB7XG4gICAgICAgIGxldCBzcGxpdCA9IHRoaXMuc3BsaXQoanNvbiwge3RpbWU6IDEsIG1zZzogMSwgbGV2ZWw6IDEsIG5hbWU6IDF9KTtcblxuICAgICAgICByZXR1cm4gdGhpcy5mb3JtYXREYXRlVGltZShuZXcgRGF0ZShqc29uLnRpbWUpKSArICc6ICcgK1xuICAgICAgICAgICAgbGV2ZWwudG9VcHBlckNhc2UoKSArICc6ICcgK1xuICAgICAgICAgICAgYWRkQ29sb25JZlRva2VuKHNwbGl0WzFdLm5hbWUsICc6ICcpICtcbiAgICAgICAgICAgIGFkZENvbG9uSWZUb2tlbihzcGxpdFsxXS5tc2csICc6ICcpICtcbiAgICAgICAgICAgIHh5KHNwbGl0WzBdKTtcblxuICAgICAgICBmdW5jdGlvbiBhZGRDb2xvbklmVG9rZW4gKHRva2VuLCBjb2xvbkFuZFNwYWNlKSB7XG4gICAgICAgICAgICBpZiAodG9rZW4pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdG9rZW4gKyBjb2xvbkFuZFNwYWNlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gJyc7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiB4eShqKSB7XG4gICAgICAgICAgICB2YXIgc3RyID0gJyc7XG4gICAgICAgICAgICB2YXIgc2VwID0gJyc7XG5cbiAgICAgICAgICAgIGZvciAodmFyIHByb3AgaW4gaikge1xuICAgICAgICAgICAgICAgIHN0ciArPSBzZXAgKyBwcm9wICsgJz0nICsgSlNPTi5zdHJpbmdpZnkoaltwcm9wXSk7XG4gICAgICAgICAgICAgICAgc2VwID0gJyAnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoc3RyLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gJygnICsgc3RyICsgJyknO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gJyc7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIHNwbGl0KGpzb24sIHByb3BzKTogYW55W10ge1xuICAgICAgICBjb25zdCBhID0ge307XG4gICAgICAgIGNvbnN0IGIgPSB7fTtcblxuICAgICAgICBmb3IgKGNvbnN0IHByb3AgaW4ganNvbikge1xuICAgICAgICAgICAgKHByb3BzW3Byb3BdID8gYiA6IGEpW3Byb3BdID0ganNvbltwcm9wXTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBbYSwgYl07XG4gICAgfVxuXG4gICAgLy8gTG9nZ2luZyBpcyBlbmFibGVkIGlmIGVpdGhlciB0aGUgbGV2ZWwgdGhyZXNob2xkIGlzIG1ldCBvciB0aGUgZ3JhbnVsYXIgbGV2ZWwgbWF0Y2hlc1xuICAgIHByaXZhdGUgaXNFbmFibGVkKGxldmVsLCBvYmopIHtcbiAgICAgICAgbGV2ZWwgPSBzdHJUb0xldmVsW2xldmVsXTtcblxuICAgICAgICBpZiAobGV2ZWwgPj0gc3RyVG9MZXZlbFt0aGlzLmxldmVsXSkge1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5ncmFudWxhckxldmVscykge1xuICAgICAgICAgICAgZm9yIChsZXQgbGV2ZWxyIGluIHRoaXMuZ3JhbnVsYXJMZXZlbHMpIHtcbiAgICAgICAgICAgICAgICBpZiAob2JqW2xldmVscl0gJiYgb2JqW2xldmVscl0gPT0gdGhpcy5ncmFudWxhckxldmVsc1tsZXZlbHJdKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn0iXX0=

@@ -0,1 +1,3 @@

## 3.6.0
* Updated the minumum version of node to >=14.x
## 3.5.0

@@ -2,0 +4,0 @@ * Fixing issues in __children__ injections

{
"name": "@haventech/supertype",
"description": "A type system for classical inheritence, mix-ins and composition.",
"version": "3.5.0",
"version": "3.6.0-beta.0",
"main": "dist/index.js",

@@ -26,3 +26,3 @@ "types": "dist/index.d.ts",

"ts-node": "^8.9.0",
"typescript": "2.9.2"
"typescript": "3.5.2"
},

@@ -43,3 +43,3 @@ "scripts": {

"engines": {
"node": ">=12.x"
"node": ">=14.x"
},

@@ -46,0 +46,0 @@ "repository": {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc