@kanidjar/cypress-qatouch-reporter
Version:
Push Cypress test results into QA Touch
1 lines • 33.2 kB
JavaScript
(()=>{var t={623:t=>{"use strict";function e(t,e,i){t instanceof RegExp&&(t=r(t,i)),e instanceof RegExp&&(e=r(e,i));var n=s(t,e,i);return n&&{start:n[0],end:n[1],pre:i.slice(0,n[0]),body:i.slice(n[0]+t.length,n[1]),post:i.slice(n[1]+e.length)}}function r(t,e){var r=e.match(t);return r?r[0]:null}function s(t,e,r){var s,i,n,o,a,c=r.indexOf(t),h=r.indexOf(e,c+1),l=c;if(c>=0&&h>0){if(t===e)return[c,h];for(s=[],n=r.length;l>=0&&!a;)l==c?(s.push(l),c=r.indexOf(t,l+1)):1==s.length?a=[s.pop(),h]:((i=s.pop())<n&&(n=i,o=h),h=r.indexOf(e,l+1)),l=c<h&&c>=0?c:h;s.length&&(a=[n,o])}return a}t.exports=e,e.range=s},334:(t,e,r)=>{t.exports=l,l.realpath=l,l.sync=u,l.realpathSync=u,l.monkeypatch=function(){s.realpath=l,s.realpathSync=u},l.unmonkeypatch=function(){s.realpath=i,s.realpathSync=n};var s=r(147),i=s.realpath,n=s.realpathSync,o=process.version,a=/^v[0-5]\./.test(o),c=r(59);function h(t){return t&&"realpath"===t.syscall&&("ELOOP"===t.code||"ENOMEM"===t.code||"ENAMETOOLONG"===t.code)}function l(t,e,r){if(a)return i(t,e,r);"function"==typeof e&&(r=e,e=null),i(t,e,(function(s,i){h(s)?c.realpath(t,e,r):r(s,i)}))}function u(t,e){if(a)return n(t,e);try{return n(t,e)}catch(r){if(h(r))return c.realpathSync(t,e);throw r}}},59:(t,e,r)=>{var s=r(17),i="win32"===process.platform,n=r(147),o=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);if(s.normalize,i)var a=/(.*?)(?:[\/\\]+|$)/g;else a=/(.*?)(?:[\/]+|$)/g;if(i)var c=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else c=/^[\/]*/;e.realpathSync=function(t,e){if(t=s.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return e[t];var r,o,h,l,u=t,p={},f={};function d(){var e=c.exec(t);r=e[0].length,o=e[0],h=e[0],l="",i&&!f[h]&&(n.lstatSync(h),f[h]=!0)}for(d();r<t.length;){a.lastIndex=r;var g=a.exec(t);if(l=o,o+=g[0],h=l+g[1],r=a.lastIndex,!(f[h]||e&&e[h]===h)){var m;if(e&&Object.prototype.hasOwnProperty.call(e,h))m=e[h];else{var y=n.lstatSync(h);if(!y.isSymbolicLink()){f[h]=!0,e&&(e[h]=h);continue}var v=null;if(!i){var b=y.dev.toString(32)+":"+y.ino.toString(32);p.hasOwnProperty(b)&&(v=p[b])}null===v&&(n.statSync(h),v=n.readlinkSync(h)),m=s.resolve(l,v),e&&(e[h]=m),i||(p[b]=v)}t=s.resolve(m,t.slice(r)),d()}}return e&&(e[u]=t),t},e.realpath=function(t,e,r){if("function"!=typeof r&&(r=function(t){return"function"==typeof t?t:function(){var t;if(o){var e=new Error;t=function(t){t&&(e.message=t.message,r(t=e))}}else t=r;return t;function r(t){if(t){if(process.throwDeprecation)throw t;if(!process.noDeprecation){var e="fs: missing callback "+(t.stack||t.message);process.traceDeprecation?console.trace(e):console.error(e)}}}}()}(e),e=null),t=s.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return process.nextTick(r.bind(null,null,e[t]));var h,l,u,p,f=t,d={},g={};function m(){var e=c.exec(t);h=e[0].length,l=e[0],u=e[0],p="",i&&!g[u]?n.lstat(u,(function(t){if(t)return r(t);g[u]=!0,y()})):process.nextTick(y)}function y(){if(h>=t.length)return e&&(e[f]=t),r(null,t);a.lastIndex=h;var s=a.exec(t);return p=l,l+=s[0],u=p+s[1],h=a.lastIndex,g[u]||e&&e[u]===u?process.nextTick(y):e&&Object.prototype.hasOwnProperty.call(e,u)?_(e[u]):n.lstat(u,v)}function v(t,s){if(t)return r(t);if(!s.isSymbolicLink())return g[u]=!0,e&&(e[u]=u),process.nextTick(y);if(!i){var o=s.dev.toString(32)+":"+s.ino.toString(32);if(d.hasOwnProperty(o))return b(null,d[o],u)}n.stat(u,(function(t){if(t)return r(t);n.readlink(u,(function(t,e){i||(d[o]=e),b(t,e)}))}))}function b(t,i,n){if(t)return r(t);var o=s.resolve(p,i);e&&(e[n]=o),_(o)}function _(e){t=s.resolve(e,t.slice(h)),m()}m()}},772:(t,e,r)=>{function s(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.setopts=function(t,e,r){if(r||(r={}),r.matchBase&&-1===e.indexOf("/")){if(r.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.silent=!!r.silent,t.pattern=e,t.strict=!1!==r.strict,t.realpath=!!r.realpath,t.realpathCache=r.realpathCache||Object.create(null),t.follow=!!r.follow,t.dot=!!r.dot,t.mark=!!r.mark,t.nodir=!!r.nodir,t.nodir&&(t.mark=!0),t.sync=!!r.sync,t.nounique=!!r.nounique,t.nonull=!!r.nonull,t.nosort=!!r.nosort,t.nocase=!!r.nocase,t.stat=!!r.stat,t.noprocess=!!r.noprocess,t.absolute=!!r.absolute,t.fs=r.fs||i,t.maxLength=r.maxLength||1/0,t.cache=r.cache||Object.create(null),t.statCache=r.statCache||Object.create(null),t.symlinks=r.symlinks||Object.create(null),function(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]),t.ignore.length&&(t.ignore=t.ignore.map(l))}(t,r),t.changedCwd=!1;var o=process.cwd();s(r,"cwd")?(t.cwd=n.resolve(r.cwd),t.changedCwd=t.cwd!==o):t.cwd=n.resolve(o),t.root=r.root||n.resolve(t.cwd,"/"),t.root=n.resolve(t.root),t.cwdAbs=a(t.cwd)?t.cwd:u(t,t.cwd),t.nomount=!!r.nomount,"win32"===process.platform&&(t.root=t.root.replace(/\\/g,"/"),t.cwd=t.cwd.replace(/\\/g,"/"),t.cwdAbs=t.cwdAbs.replace(/\\/g,"/")),r.nonegate=!0,r.nocomment=!0,r.allowWindowsEscape=!0,t.minimatch=new c(e,r),t.options=t.minimatch.options},e.ownProp=s,e.makeAbs=u,e.finish=function(t){for(var e=t.nounique,r=e?[]:Object.create(null),s=0,i=t.matches.length;s<i;s++){var n=t.matches[s];if(n&&0!==Object.keys(n).length){var o=Object.keys(n);e?r.push.apply(r,o):o.forEach((function(t){r[t]=!0}))}else if(t.nonull){var a=t.minimatch.globSet[s];e?r.push(a):r[a]=!0}}if(e||(r=Object.keys(r)),t.nosort||(r=r.sort(h)),t.mark){for(s=0;s<r.length;s++)r[s]=t._mark(r[s]);t.nodir&&(r=r.filter((function(e){var r=!/\/$/.test(e),s=t.cache[e]||t.cache[u(t,e)];return r&&s&&(r="DIR"!==s&&!Array.isArray(s)),r})))}t.ignore.length&&(r=r.filter((function(e){return!p(t,e)}))),t.found=r},e.mark=function(t,e){var r=u(t,e),s=t.cache[r],i=e;if(s){var n="DIR"===s||Array.isArray(s),o="/"===e.slice(-1);if(n&&!o?i+="/":!n&&o&&(i=i.slice(0,-1)),i!==e){var a=u(t,i);t.statCache[a]=t.statCache[r],t.cache[a]=t.cache[r]}}return i},e.isIgnored=p,e.childrenIgnored=function(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return!(!t.gmatcher||!t.gmatcher.match(e))}))};var i=r(147),n=r(17),o=r(522),a=r(17).isAbsolute,c=o.Minimatch;function h(t,e){return t.localeCompare(e,"en")}function l(t){var e=null;if("/**"===t.slice(-3)){var r=t.replace(/(\/\*\*)+$/,"");e=new c(r,{dot:!0})}return{matcher:new c(t,{dot:!0}),gmatcher:e}}function u(t,e){var r=e;return r="/"===e.charAt(0)?n.join(t.root,e):a(e)||""===e?e:t.changedCwd?n.resolve(t.cwd,e):n.resolve(e),"win32"===process.platform&&(r=r.replace(/\\/g,"/")),r}function p(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return t.matcher.match(e)||!(!t.gmatcher||!t.gmatcher.match(e))}))}},884:(t,e,r)=>{t.exports=v;var s=r(334),i=r(522),n=(i.Minimatch,r(378)),o=r(361).EventEmitter,a=r(17),c=r(491),h=r(17).isAbsolute,l=r(751),u=r(772),p=u.setopts,f=u.ownProp,d=r(844),g=(r(837),u.childrenIgnored),m=u.isIgnored,y=r(778);function v(t,e,r){if("function"==typeof e&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return l(t,e)}return new _(t,e,r)}v.sync=l;var b=v.GlobSync=l.GlobSync;function _(t,e,r){if("function"==typeof e&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new b(t,e)}if(!(this instanceof _))return new _(t,e,r);p(this,t,e),this._didRealPath=!1;var s=this.minimatch.set.length;this.matches=new Array(s),"function"==typeof r&&(r=y(r),this.on("error",r),this.on("end",(function(t){r(null,t)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===s)return o();for(var n=0;n<s;n++)this._process(this.minimatch.set[n],n,!1,o);function o(){--i._processing,i._processing<=0&&i._finish()}}v.glob=v,v.hasMagic=function(t,e){var r=function(t,e){if(null===e||"object"!=typeof e)return t;for(var r=Object.keys(e),s=r.length;s--;)t[r[s]]=e[r[s]];return t}({},e);r.noprocess=!0;var s=new _(t,r).minimatch.set;if(!t)return!1;if(s.length>1)return!0;for(var i=0;i<s[0].length;i++)if("string"!=typeof s[0][i])return!0;return!1},v.Glob=_,n(_,o),_.prototype._finish=function(){if(c(this instanceof _),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();u.finish(this),this.emit("end",this.found)}},_.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var t=this.matches.length;if(0===t)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,s)}function s(){0==--t&&e._finish()}},_.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var i=Object.keys(r),n=this,o=i.length;if(0===o)return e();var a=this.matches[t]=Object.create(null);i.forEach((function(r,i){r=n._makeAbs(r),s.realpath(r,n.realpathCache,(function(s,i){s?"stat"===s.syscall?a[r]=!0:n.emit("error",s):a[i]=!0,0==--o&&(n.matches[t]=a,e())}))}))},_.prototype._mark=function(t){return u.mark(this,t)},_.prototype._makeAbs=function(t){return u.makeAbs(this,t)},_.prototype.abort=function(){this.aborted=!0,this.emit("abort")},_.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},_.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var s=this._processQueue.slice(0);for(this._processQueue.length=0,e=0;e<s.length;e++){var i=s[e];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},_.prototype._process=function(t,e,r,s){if(c(this instanceof _),c("function"==typeof s),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([t,e,r,s]);else{for(var n,o=0;"string"==typeof t[o];)o++;switch(o){case t.length:return void this._processSimple(t.join("/"),e,s);case 0:n=null;break;default:n=t.slice(0,o).join("/")}var a,l=t.slice(o);null===n?a=".":h(n)||h(t.map((function(t){return"string"==typeof t?t:"[*]"})).join("/"))?(n&&h(n)||(n="/"+n),a=n):a=n;var u=this._makeAbs(a);if(g(this,a))return s();l[0]===i.GLOBSTAR?this._processGlobStar(n,a,u,l,e,r,s):this._processReaddir(n,a,u,l,e,r,s)}},_.prototype._processReaddir=function(t,e,r,s,i,n,o){var a=this;this._readdir(r,n,(function(c,h){return a._processReaddir2(t,e,r,s,i,n,h,o)}))},_.prototype._processReaddir2=function(t,e,r,s,i,n,o,c){if(!o)return c();for(var h=s[0],l=!!this.minimatch.negate,u=h._glob,p=this.dot||"."===u.charAt(0),f=[],d=0;d<o.length;d++)("."!==(m=o[d]).charAt(0)||p)&&(l&&!t?!m.match(h):m.match(h))&&f.push(m);var g=f.length;if(0===g)return c();if(1===s.length&&!this.mark&&!this.stat){for(this.matches[i]||(this.matches[i]=Object.create(null)),d=0;d<g;d++){var m=f[d];t&&(m="/"!==t?t+"/"+m:t+m),"/"!==m.charAt(0)||this.nomount||(m=a.join(this.root,m)),this._emitMatch(i,m)}return c()}for(s.shift(),d=0;d<g;d++)m=f[d],t&&(m="/"!==t?t+"/"+m:t+m),this._process([m].concat(s),i,n,c);c()},_.prototype._emitMatch=function(t,e){if(!this.aborted&&!m(this,e))if(this.paused)this._emitQueue.push([t,e]);else{var r=h(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var s=this.cache[r];if("DIR"===s||Array.isArray(s))return}this.matches[t][e]=!0;var i=this.statCache[r];i&&this.emit("stat",e,i),this.emit("match",e)}}},_.prototype._readdirInGlobStar=function(t,e){if(!this.aborted){if(this.follow)return this._readdir(t,!1,e);var r=this,s=d("lstat\0"+t,(function(s,i){if(s&&"ENOENT"===s.code)return e();var n=i&&i.isSymbolicLink();r.symlinks[t]=n,n||!i||i.isDirectory()?r._readdir(t,!1,e):(r.cache[t]="FILE",e())}));s&&r.fs.lstat(t,s)}},_.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=d("readdir\0"+t+"\0"+e,r))){if(e&&!f(this.symlinks,t))return this._readdirInGlobStar(t,r);if(f(this.cache,t)){var s=this.cache[t];if(!s||"FILE"===s)return r();if(Array.isArray(s))return r(null,s)}this.fs.readdir(t,function(t,e,r){return function(s,i){s?t._readdirError(e,s,r):t._readdirEntries(e,i,r)}}(this,t,r))}},_.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var s=0;s<e.length;s++){var i=e[s];i="/"===t?t+i:t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,r(null,e)}},_.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var s=this._makeAbs(t);if(this.cache[s]="FILE",s===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=e.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e)}return r()}},_.prototype._processGlobStar=function(t,e,r,s,i,n,o){var a=this;this._readdir(r,n,(function(c,h){a._processGlobStar2(t,e,r,s,i,n,h,o)}))},_.prototype._processGlobStar2=function(t,e,r,s,i,n,o,a){if(!o)return a();var c=s.slice(1),h=t?[t]:[],l=h.concat(c);this._process(l,i,!1,a);var u=this.symlinks[r],p=o.length;if(u&&n)return a();for(var f=0;f<p;f++)if("."!==o[f].charAt(0)||this.dot){var d=h.concat(o[f],c);this._process(d,i,!0,a);var g=h.concat(o[f],s);this._process(g,i,!0,a)}a()},_.prototype._processSimple=function(t,e,r){var s=this;this._stat(t,(function(i,n){s._processSimple2(t,e,i,n,r)}))},_.prototype._processSimple2=function(t,e,r,s,i){if(this.matches[e]||(this.matches[e]=Object.create(null)),!s)return i();if(t&&h(t)&&!this.nomount){var n=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=a.join(this.root,t):(t=a.resolve(this.root,t),n&&(t+="/"))}"win32"===process.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),i()},_.prototype._stat=function(t,e){var r=this._makeAbs(t),s="/"===t.slice(-1);if(t.length>this.maxLength)return e();if(!this.stat&&f(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!s||"DIR"===i)return e(null,i);if(s&&"FILE"===i)return e()}var n=this.statCache[r];if(void 0!==n){if(!1===n)return e(null,n);var o=n.isDirectory()?"DIR":"FILE";return s&&"FILE"===o?e():e(null,o,n)}var a=this,c=d("stat\0"+r,(function(s,i){if(i&&i.isSymbolicLink())return a.fs.stat(r,(function(s,n){s?a._stat2(t,r,null,i,e):a._stat2(t,r,s,n,e)}));a._stat2(t,r,s,i,e)}));c&&a.fs.lstat(r,c)},_.prototype._stat2=function(t,e,r,s,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[e]=!1,i();var n="/"===t.slice(-1);if(this.statCache[e]=s,"/"===e.slice(-1)&&s&&!s.isDirectory())return i(null,!1,s);var o=!0;return s&&(o=s.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||o,n&&"FILE"===o?i():i(null,o,s)}},146:(t,e,r)=>{var s=r(623);t.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),m(function(t){return t.split("\\\\").join(i).split("\\{").join(n).split("\\}").join(o).split("\\,").join(a).split("\\.").join(c)}(t),!0).map(l)):[]};var i="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function h(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function l(t){return t.split(i).join("\\").split(n).join("{").split(o).join("}").split(a).join(",").split(c).join(".")}function u(t){if(!t)return[""];var e=[],r=s("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,o=r.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var c=u(o);return o.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}function p(t){return"{"+t+"}"}function f(t){return/^-?0\d/.test(t)}function d(t,e){return t<=e}function g(t,e){return t>=e}function m(t,e){var r=[],i=s("{","}",t);if(!i)return[t];var n=i.pre,a=i.post.length?m(i.post,!1):[""];if(/\$$/.test(i.pre))for(var c=0;c<a.length;c++){var l=n+"{"+i.body+"}"+a[c];r.push(l)}else{var y,v,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),_=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),w=b||_,E=i.body.indexOf(",")>=0;if(!w&&!E)return i.post.match(/,.*\}/)?m(t=i.pre+"{"+i.body+o+i.post):[t];if(w)y=i.body.split(/\.\./);else if(1===(y=u(i.body)).length&&1===(y=m(y[0],!1).map(p)).length)return a.map((function(t){return i.pre+y[0]+t}));if(w){var O=h(y[0]),k=h(y[1]),A=Math.max(y[0].length,y[1].length),S=3==y.length?Math.abs(h(y[2])):1,x=d;k<O&&(S*=-1,x=g);var j=y.some(f);v=[];for(var R=O;x(R,k);R+=S){var I;if(_)"\\"===(I=String.fromCharCode(R))&&(I="");else if(I=String(R),j){var T=A-I.length;if(T>0){var N=new Array(T+1).join("0");I=R<0?"-"+N+I.slice(1):N+I}}v.push(I)}}else{v=[];for(var L=0;L<y.length;L++)v.push.apply(v,m(y[L],!1))}for(L=0;L<v.length;L++)for(c=0;c<a.length;c++)l=n+v[L]+a[c],(!e||w||l)&&r.push(l)}return r}},340:t=>{const e="object"==typeof process&&process&&"win32"===process.platform;t.exports=e?{sep:"\\"}:{sep:"/"}},522:(t,e,r)=>{const s=t.exports=(t,e,r={})=>(m(e),!(!r.nocomment&&"#"===e.charAt(0))&&new v(e,r).match(t));t.exports=s;const i=r(340);s.sep=i.sep;const n=Symbol("globstar **");s.GLOBSTAR=n;const o=r(146),a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},c="[^/]",h=c+"*?",l=t=>t.split("").reduce(((t,e)=>(t[e]=!0,t)),{}),u=l("().*{}+?[]^$\\!"),p=l("[.("),f=/\/+/;s.filter=(t,e={})=>(r,i,n)=>s(r,t,e);const d=(t,e={})=>{const r={};return Object.keys(t).forEach((e=>r[e]=t[e])),Object.keys(e).forEach((t=>r[t]=e[t])),r};s.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return s;const e=s,r=(r,s,i)=>e(r,s,d(t,i));return(r.Minimatch=class extends e.Minimatch{constructor(e,r){super(e,d(t,r))}}).defaults=r=>e.defaults(d(t,r)).Minimatch,r.filter=(r,s)=>e.filter(r,d(t,s)),r.defaults=r=>e.defaults(d(t,r)),r.makeRe=(r,s)=>e.makeRe(r,d(t,s)),r.braceExpand=(r,s)=>e.braceExpand(r,d(t,s)),r.match=(r,s,i)=>e.match(r,s,d(t,i)),r},s.braceExpand=(t,e)=>g(t,e);const g=(t,e={})=>(m(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:o(t)),m=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},y=Symbol("subparse");s.makeRe=(t,e)=>new v(t,e||{}).makeRe(),s.match=(t,e,r={})=>{const s=new v(e,r);return t=t.filter((t=>s.match(t))),s.options.nonull&&!t.length&&t.push(e),t};class v{constructor(t,e){m(t),e||(e={}),this.options=e,this.set=[],this.pattern=t,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}debug(){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate();let r=this.globSet=this.braceExpand();e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,r),r=this.globParts=r.map((t=>t.split(f))),this.debug(this.pattern,r),r=r.map(((t,e,r)=>t.map(this.parse,this))),this.debug(this.pattern,r),r=r.filter((t=>-1===t.indexOf(!1))),this.debug(this.pattern,r),this.set=r}parseNegate(){if(this.options.nonegate)return;const t=this.pattern;let e=!1,r=0;for(let s=0;s<t.length&&"!"===t.charAt(s);s++)e=!e,r++;r&&(this.pattern=t.slice(r)),this.negate=e}matchOne(t,e,r){var s=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,o=0,a=t.length,c=e.length;i<a&&o<c;i++,o++){this.debug("matchOne loop");var h,l=e[o],u=t[i];if(this.debug(e,l,u),!1===l)return!1;if(l===n){this.debug("GLOBSTAR",[e,l,u]);var p=i,f=o+1;if(f===c){for(this.debug("** at the end");i<a;i++)if("."===t[i]||".."===t[i]||!s.dot&&"."===t[i].charAt(0))return!1;return!0}for(;p<a;){var d=t[p];if(this.debug("\nglobstar while",t,p,e,f,d),this.matchOne(t.slice(p),e.slice(f),r))return this.debug("globstar found match!",p,a,d),!0;if("."===d||".."===d||!s.dot&&"."===d.charAt(0)){this.debug("dot detected!",t,p,e,f);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!r||(this.debug("\n>>> no match, partial?",t,p,e,f),p!==a))}if("string"==typeof l?(h=u===l,this.debug("string match",l,u,h)):(h=u.match(l),this.debug("pattern match",l,u,h)),!h)return!1}if(i===a&&o===c)return!0;if(i===a)return r;if(o===c)return i===a-1&&""===t[i];throw new Error("wtf?")}braceExpand(){return g(this.pattern,this.options)}parse(t,e){m(t);const r=this.options;if("**"===t){if(!r.noglobstar)return n;t="*"}if(""===t)return"";let s="",i=!!r.nocase,o=!1;const l=[],f=[];let d,g,v,b,_=!1,w=-1,E=-1;const O="."===t.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",k=()=>{if(d){switch(d){case"*":s+=h,i=!0;break;case"?":s+=c,i=!0;break;default:s+="\\"+d}this.debug("clearStateChar %j %j",d,s),d=!1}};for(let e,n=0;n<t.length&&(e=t.charAt(n));n++)if(this.debug("%s\t%s %s %j",t,n,s,e),o){if("/"===e)return!1;u[e]&&(s+="\\"),s+=e,o=!1}else switch(e){case"/":return!1;case"\\":if(_&&"-"===t.charAt(n+1)){s+=e;continue}k(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",t,n,s,e),_){this.debug(" in class"),"!"===e&&n===E+1&&(e="^"),s+=e;continue}this.debug("call clearStateChar %j",d),k(),d=e,r.noext&&k();continue;case"(":if(_){s+="(";continue}if(!d){s+="\\(";continue}l.push({type:d,start:n-1,reStart:s.length,open:a[d].open,close:a[d].close}),s+="!"===d?"(?:(?!(?:":"(?:",this.debug("plType %j %j",d,s),d=!1;continue;case")":if(_||!l.length){s+="\\)";continue}k(),i=!0,v=l.pop(),s+=v.close,"!"===v.type&&f.push(v),v.reEnd=s.length;continue;case"|":if(_||!l.length){s+="\\|";continue}k(),s+="|";continue;case"[":if(k(),_){s+="\\"+e;continue}_=!0,E=n,w=s.length,s+=e;continue;case"]":if(n===E+1||!_){s+="\\"+e;continue}g=t.substring(E+1,n);try{RegExp("["+(g.replace(/\\([^-\]])/g,"$1").replace(/[[\]\\]/g,"\\$&")+"]")),s+=e}catch(t){s=s.substring(0,w)+"(?:$.)"}i=!0,_=!1;continue;default:k(),!u[e]||"^"===e&&_||(s+="\\"),s+=e}for(_&&(g=t.slice(E+1),b=this.parse(g,y),s=s.substring(0,w)+"\\["+b[0],i=i||b[1]),v=l.pop();v;v=l.pop()){let t;t=s.slice(v.reStart+v.open.length),this.debug("setting tail",s,v),t=t.replace(/((?:\\{2}){0,64})(\\?)\|/g,((t,e,r)=>(r||(r="\\"),e+e+r+"|"))),this.debug("tail=%j\n %s",t,t,v,s);const e="*"===v.type?h:"?"===v.type?c:"\\"+v.type;i=!0,s=s.slice(0,v.reStart)+e+"\\("+t}k(),o&&(s+="\\\\");const A=p[s.charAt(0)];for(let t=f.length-1;t>-1;t--){const r=f[t],i=s.slice(0,r.reStart),n=s.slice(r.reStart,r.reEnd-8);let o=s.slice(r.reEnd);const a=s.slice(r.reEnd-8,r.reEnd)+o,c=i.split("(").length-1;let h=o;for(let t=0;t<c;t++)h=h.replace(/\)[+*?]?/,"");o=h,s=i+n+o+(""===o&&e!==y?"$":"")+a}if(""!==s&&i&&(s="(?=.)"+s),A&&(s=O+s),e===y)return[s,i];if(!i)return(t=>t.replace(/\\(.)/g,"$1"))(t);const S=r.nocase?"i":"";try{return Object.assign(new RegExp("^"+s+"$",S),{_glob:t,_src:s})}catch(t){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,r=e.noglobstar?h:e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=e.nocase?"i":"";let i=t.map((t=>(t=t.map((t=>"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===n?n:t._src)).reduce(((t,e)=>(t[t.length-1]===n&&e===n||t.push(e),t)),[]),t.forEach(((e,s)=>{e===n&&t[s-1]!==n&&(0===s?t.length>1?t[s+1]="(?:\\/|"+r+"\\/)?"+t[s+1]:t[s]=r:s===t.length-1?t[s-1]+="(?:\\/|"+r+")?":(t[s-1]+="(?:\\/|\\/"+r+"\\/)"+t[s+1],t[s+1]=n))})),t.filter((t=>t!==n)).join("/")))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,s)}catch(t){this.regexp=!1}return this.regexp}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const r=this.options;"/"!==i.sep&&(t=t.split(i.sep).join("/")),t=t.split(f),this.debug(this.pattern,"split",t);const s=this.set;let n;this.debug(this.pattern,"set",s);for(let e=t.length-1;e>=0&&(n=t[e],!n);e--);for(let i=0;i<s.length;i++){const o=s[i];let a=t;if(r.matchBase&&1===o.length&&(a=[n]),this.matchOne(a,o,e))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(t){return s.defaults(t).Minimatch}}s.Minimatch=v},751:(t,e,r)=>{t.exports=f,f.GlobSync=d;var s=r(334),i=r(522),n=(i.Minimatch,r(884).Glob,r(837),r(17)),o=r(491),a=r(17).isAbsolute,c=r(772),h=c.setopts,l=c.ownProp,u=c.childrenIgnored,p=c.isIgnored;function f(t,e){if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new d(t,e).found}function d(t,e){if(!t)throw new Error("must provide pattern");if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof d))return new d(t,e);if(h(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var s=0;s<r;s++)this._process(this.minimatch.set[s],s,!1);this._finish()}d.prototype._finish=function(){if(o.ok(this instanceof d),this.realpath){var t=this;this.matches.forEach((function(e,r){var i=t.matches[r]=Object.create(null);for(var n in e)try{n=t._makeAbs(n),i[s.realpathSync(n,t.realpathCache)]=!0}catch(e){if("stat"!==e.syscall)throw e;i[t._makeAbs(n)]=!0}}))}c.finish(this)},d.prototype._process=function(t,e,r){o.ok(this instanceof d);for(var s,n=0;"string"==typeof t[n];)n++;switch(n){case t.length:return void this._processSimple(t.join("/"),e);case 0:s=null;break;default:s=t.slice(0,n).join("/")}var c,h=t.slice(n);null===s?c=".":a(s)||a(t.map((function(t){return"string"==typeof t?t:"[*]"})).join("/"))?(s&&a(s)||(s="/"+s),c=s):c=s;var l=this._makeAbs(c);u(this,c)||(h[0]===i.GLOBSTAR?this._processGlobStar(s,c,l,h,e,r):this._processReaddir(s,c,l,h,e,r))},d.prototype._processReaddir=function(t,e,r,s,i,o){var a=this._readdir(r,o);if(a){for(var c=s[0],h=!!this.minimatch.negate,l=c._glob,u=this.dot||"."===l.charAt(0),p=[],f=0;f<a.length;f++)("."!==(m=a[f]).charAt(0)||u)&&(h&&!t?!m.match(c):m.match(c))&&p.push(m);var d=p.length;if(0!==d)if(1!==s.length||this.mark||this.stat)for(s.shift(),f=0;f<d;f++){var g;m=p[f],g=t?[t,m]:[m],this._process(g.concat(s),i,o)}else{this.matches[i]||(this.matches[i]=Object.create(null));for(f=0;f<d;f++){var m=p[f];t&&(m="/"!==t.slice(-1)?t+"/"+m:t+m),"/"!==m.charAt(0)||this.nomount||(m=n.join(this.root,m)),this._emitMatch(i,m)}}}},d.prototype._emitMatch=function(t,e){if(!p(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var s=this.cache[r];if("DIR"===s||Array.isArray(s))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}},d.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r;try{r=this.fs.lstatSync(t)}catch(t){if("ENOENT"===t.code)return null}var s=r&&r.isSymbolicLink();return this.symlinks[t]=s,s||!r||r.isDirectory()?e=this._readdir(t,!1):this.cache[t]="FILE",e},d.prototype._readdir=function(t,e){if(e&&!l(this.symlinks,t))return this._readdirInGlobStar(t);if(l(this.cache,t)){var r=this.cache[t];if(!r||"FILE"===r)return null;if(Array.isArray(r))return r}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(e){return this._readdirError(t,e),null}},d.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var s=e[r];s="/"===t?t+s:t+"/"+s,this.cache[s]=!0}return this.cache[t]=e,e},d.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var s=new Error(e.code+" invalid cwd "+this.cwd);throw s.path=this.cwd,s.code=e.code,s}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e)}},d.prototype._processGlobStar=function(t,e,r,s,i,n){var o=this._readdir(r,n);if(o){var a=s.slice(1),c=t?[t]:[],h=c.concat(a);this._process(h,i,!1);var l=o.length;if(!this.symlinks[r]||!n)for(var u=0;u<l;u++)if("."!==o[u].charAt(0)||this.dot){var p=c.concat(o[u],a);this._process(p,i,!0);var f=c.concat(o[u],s);this._process(f,i,!0)}}},d.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),r){if(t&&a(t)&&!this.nomount){var s=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=n.join(this.root,t):(t=n.resolve(this.root,t),s&&(t+="/"))}"win32"===process.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}},d.prototype._stat=function(t){var e=this._makeAbs(t),r="/"===t.slice(-1);if(t.length>this.maxLength)return!1;if(!this.stat&&l(this.cache,e)){var s=this.cache[e];if(Array.isArray(s)&&(s="DIR"),!r||"DIR"===s)return s;if(r&&"FILE"===s)return!1}var i=this.statCache[e];if(!i){var n;try{n=this.fs.lstatSync(e)}catch(t){if(t&&("ENOENT"===t.code||"ENOTDIR"===t.code))return this.statCache[e]=!1,!1}if(n&&n.isSymbolicLink())try{i=this.fs.statSync(e)}catch(t){i=n}else i=n}return this.statCache[e]=i,s=!0,i&&(s=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||s,(!r||"FILE"!==s)&&s},d.prototype._mark=function(t){return c.mark(this,t)},d.prototype._makeAbs=function(t){return c.makeAbs(this,t)}},844:(t,e,r)=>{var s=r(479),i=Object.create(null),n=r(778);function o(t){for(var e=t.length,r=[],s=0;s<e;s++)r[s]=t[s];return r}t.exports=s((function(t,e){return i[t]?(i[t].push(e),null):(i[t]=[e],function(t){return n((function e(){var r=i[t],s=r.length,n=o(arguments);try{for(var a=0;a<s;a++)r[a].apply(null,n)}finally{r.length>s?(r.splice(0,s),process.nextTick((function(){e.apply(null,n)}))):delete i[t]}}))}(t))}))},378:(t,e,r)=>{try{var s=r(837);if("function"!=typeof s.inherits)throw"";t.exports=s.inherits}catch(e){t.exports=r(717)}},717:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},778:(t,e,r)=>{var s=r(479);function i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function n(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}t.exports=s(i),t.exports.strict=s(n),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return n(this)},configurable:!0})}))},139:(t,e)=>{"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.Status=void 0,(r=e.Status||(e.Status={})).passed="passed",r.failed="failed"},479:t=>{t.exports=function t(e,r){if(e&&r)return t(e)(r);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){s[t]=e[t]})),s;function s(){for(var t=new Array(arguments.length),r=0;r<t.length;r++)t[r]=arguments[r];var s=e.apply(this,t),i=t[t.length-1];return"function"==typeof s&&s!==i&&Object.keys(i).forEach((function(t){s[t]=i[t]})),s}}},270:t=>{"use strict";t.exports=require("mocha")},491:t=>{"use strict";t.exports=require("assert")},81:t=>{"use strict";t.exports=require("child_process")},361:t=>{"use strict";t.exports=require("events")},147:t=>{"use strict";t.exports=require("fs")},17:t=>{"use strict";t.exports=require("path")},837:t=>{"use strict";t.exports=require("util")}},e={};function r(s){var i=e[s];if(void 0!==i)return i.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,r),n.exports}var s={};(()=>{"use strict";var t=s;Object.defineProperty(t,"__esModule",{value:!0});const e=r(270),i=r(81),n=r(139),o=r(884);t.default=class{_reporterOptions;_process={command:"node",args:[`${__dirname}/processes/push.process.js`]};TITLE_REGEXP=/^\[QATouch-([A-Za-z0-9]+)\]/;constructor(t,r){this._reporterOptions=r.reporterOptions,this.validateReporterOptions(["domain","apiToken","projectKey","testRunKey"]),t.on(e.Runner.constants.EVENT_TEST_PASS,(t=>{this.push(t,n.Status.passed)})),t.on(e.Runner.constants.EVENT_TEST_FAIL,(t=>{this.push(t,n.Status.failed)}))}validateReporterOptions(t){if(!this._reporterOptions)throw new Error("Missing reporterOptions in cypress config");t.forEach((t=>{if(!this._reporterOptions?.[t])throw new Error("Missing "+t+" value. Please update reporterOptions in cypress.json")}))}_getScreenshot(t,e){if(!this._reporterOptions?.screenshotsFolder||e===n.Status.passed)return null;const r=`${t.parent?`${t.parent.title} -- `:""}${t.title}`;return o.glob.sync(`${this._reporterOptions.screenshotsFolder}/**/*.*`).map((t=>t)).filter((t=>t.includes(r))).pop()??null}push(t,e){const r=this.TITLE_REGEXP.exec(t.title)?.[1];let s=null,n=null;return n=this._getScreenshot(t,e),r?(s=(0,i.spawn)(this._process.command,this._process.args,{detached:!0,stdio:"inherit",env:Object.assign(process.env,{reporterOptions:JSON.stringify(this._reporterOptions),result:JSON.stringify({testRunResultKey:r,status:e,screenshot:n})})})).unref():console.warn(`[QATouch] The test "${t.title}" does not seem to have a test result key "[QATouch-XXX]"`),s}}})();var i=exports;for(var n in s)i[n]=s[n];s.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();