Innovenergy_trunk/frontend/node_modules/testcafe-hammerhead/lib/client/worker-hammerhead.min.js

3 lines
64 KiB
JavaScript
Raw Normal View History

!function(){function e(e,t){function r(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ee(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function t(e,t,r){if(r||2===arguments.length)for(var o,n=0,i=t.length;n<i;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function r(e){return"string"==typeof e?e.replace(/(^\s+)|(\s+$)/g,""):e}function o(e){var t={};if(!e)return t;for(var r=0,o=Fe;r<o.length;r++){var n=o[r],i=n.name,s=n.flag;e.indexOf(s)>-1&&(t[i]=!0)}return t}function n(e){if(!e)return null;for(var t="",r=0,o=Fe;r<o.length;r++){var n=o[r],i=n.name,s=n.flag;e[i]&&(t+=s)}return t||null}function i(e){return"null"===e?"":e.replace(Le,function(e,t){return t?"s*":""})}function s(e){return e?He.test(e)?e.replace(He,"https://"):"http://"+e:"null"}function a(e,t){if(!t)return!0;var r=d(t),o=!r.host;if(o)return!0;var n=d(e),i=m(e);if(r.host===n.host&&r.protocol===n.protocol)return!0;var s=i?i.destResourceInfo:n;if(!s)return!1;var a=!r.protocol||r.protocol===s.protocol,c=!s.port&&!r.port||s.port&&s.port.toString()===r.port;return a&&!!c&&s.hostname===r.hostname}function c(e){var t=d(e);return t.protocol=t.protocol&&t.protocol.toLowerCase(),t.host=t.host&&t.host.toLowerCase(),f(t)}function p(e){return null===e&&/iPad|iPhone/i.test(window.navigator.userAgent)?"":String(e).replace(/[\n\t]/g,"")}function l(e,t){var r=[t.sessionId];t.windowId&&r.push(t.windowId);var o=[r.join(Ae)];t.resourceType&&o.push(t.resourceType),t.charset&&o.push(t.charset.toLowerCase()),"number"==typeof t.credentials&&o.push(t.credentials.toString()),t.reqOrigin&&o.push(encodeURIComponent(i(t.reqOrigin)));var n=o.join(je),s=t.proxyProtocol||"http:";return"".concat(s,"//").concat(t.proxyHostname,":").concat(t.proxyPort,"/").concat(n,"/").concat(c(e))}function h(e){return"file:"===e.protocol?"null":f({protocol:e.protocol,host:e.host,hostname:e.hostname,port:String(e.port||"")})}function u(e){var t=e.split(je),r=t[0],n=t[1],i=t.slice(2);if(!r)return null;var a=r.split(Ae),c=a[0],p=a[1],l={sessionId:c,resourceType:n||null};if(p&&(l.windowId=p),n&&i.length){var h=o(n);h.isScript||h.isServiceWorker?l.charset=i[0]:h.isWebSocket?l.reqOrigin=decodeURIComponent(s(i[0])):h.isIframe&&i[0]?l.reqOrigin=decodeURIComponent(s(i[0])):h.isAjax&&(l.credentials=parseInt(i[0],10),2===i.length&&(l.reqOrigin=decodeURIComponent(s(i[1]))))}return l}function m(e){var t=d(e);if(!t.partAfterHost)return null;var r=t.partAfterHost.match(De);if(!r)return null;var o=u(r[1]);if(!o)return null;var n=r[2],i=n.replace(/#[\S\s]*$/,"");if(!b(i)&&!Me.test(n))return null;var s;return b(i)?s=We:(n=T(n),s=d(n)),{destUrl:n,destResourceInfo:s,partAfterHost:t.partAfterHost,proxy:{hostname:t.hostname||"",port:t.port||""},sessionId:o.sessionId,resourceType:o.resourceType,charset:o.charset,reqOrigin:o.reqOrigin,windowId:o.windowId,credentials:o.credentials}}function d(e){if(e=S(e),!e)return{};var t=e.match(Pe);return t?{protocol:t[1],auth:t[2],host:t[3],hostname:t[4],port:t[5],partAfterHost:t[6]}:{}}function y(e){e=r(e||"");var t=Re.test(e);if(t)return!1;var o=e.match(Te);return!o||Me.test(o[0])}function g(e,t,r){if(void 0===r&&(r=!1),r)return v(g,e,t);if(t=t||l,y(e)){var o=t(e),n=m(o);return n?f(n.destResourceInfo):e}return e}function f(e){if(!("file:"===e.protocol||"about:"===e.protocol||e.host||e.hostname&&e.port))return e.partAfterHost||"";var t=e.protocol||"";return"about:"!==e.protocol&&(t+="//"),e.auth&&(t+=e.auth+"@"),e.host?t+=e.host:e.hostname&&(t+=e.hostname,e.port&&(t+=":"+e.port)),e.partAfterHost&&(t+=e.partAfterHost),t}function v(e,r){for(var o=[],n=2;n<arguments.length;n++)o[n-2]=arguments[n];for(var i=r.split(","),s=[],a=0,c=i;a<c.length;a++){var p=c[a],l=p.replace(/ +/g," ").trim().split(" "),h=l[0],u=l[1];if(h){var m=e.apply(void 0,t([h],o,!1));s.push(m+(u?" ".concat(u):""))}}return s.join(",")}function w(e,t){return void 0===t&&(t=""),e.match(xe)||t.match(xe)?e.replace(/^(file:)?\/+(\/\/\/.*$)/i,"$1
le&&(this.windowOriginGetter=le.get,this.windowOriginSetter=le.set),v&&(this.inputDisabledSetter=v.set,this.inputDisabledGetter=v.get),this.elementHTMLPropOwnerName=e.Element.prototype.hasOwnProperty("innerHTML")?"Element":"HTMLElement";var he=e.Object.getOwnPropertyDescriptor(e[this.elementHTMLPropOwnerName].prototype,"innerHTML"),ue=e.Object.getOwnPropertyDescriptor(e[this.elementHTMLPropOwnerName].prototype,"outerHTML");this.objectDataSetter=y.set,this.inputTypeSetter=g.set,this.inputValueSetter=f.set,this.inputRequiredSetter=w.set,this.textAreaValueSetter=S.set,this.imageSrcSetter=O.set,this.scriptSrcSetter=E.set,this.embedSrcSetter=T.set,this.sourceSrcSetter=D.set,this.mediaSrcSetter=x.set,this.inputSrcSetter=L.set,this.frameSrcSetter=H.set,this.iframeSrcSetter=M.set,this.anchorHrefSetter=R.set,this.linkHrefSetter=j.set,this.linkRelSetter=G.set,this.linkAsSetter=C&&C.set,this.areaHrefSetter=N.set,this.baseHrefSetter=I.set,this.anchorHostSetter=_.set,this.anchorHostnameSetter=k.set,this.anchorPathnameSetter=W.set,this.anchorPortSetter=F.set,this.anchorProtocolSetter=q.set,this.anchorSearchSetter=B.set,this.anchorTargetSetter=U.set,this.formTargetSetter=V.set,this.areaTargetSetter=X.set,this.baseTargetSetter=$.set,this.inputFormTargetSetter=z.set,this.buttonFormTargetSetter=Q.set,this.svgAnimStrBaseValSetter=Z.set,this.inputAutocompleteSetter=Y.set,this.formActionSetter=ee.set,this.inputFormActionSetter=te.set,this.buttonFormActionSetter=re.set,this.iframeSandboxSetter=ce.set,this.metaHttpEquivSetter=pe.set,this.htmlElementOnloadSetter=e.Object.getOwnPropertyDescriptor(e.HTMLElement.prototype,"onload").set,this.nodeTextContentSetter=oe.set,this.htmlElementInnerTextSetter=ne.set,this.scriptTextSetter=ie.set,this.anchorTextSetter=se.set,this.elementInnerHTMLSetter=he.set,this.elementOuterHTMLSetter=ue.set,P&&A&&(this.scriptIntegritySetter=P.set,this.linkIntegritySetter=A.set),this.titleElementTextSetter=ae.set,this.elementClassListPropOwnerName=e.Element.prototype.hasOwnProperty("classList")?"Element":"HTMLElement",this.elementClassListGetter=e.Object.getOwnPropertyDescriptor(e[this.elementClassListPropOwnerName].prototype,"classList").get,this.htmlCollectionLengthGetter=e.Object.getOwnPropertyDescriptor(e.HTMLCollection.prototype,"length").get,this.nodeListLengthGetter=e.Object.getOwnPropertyDescriptor(e.NodeList.prototype,"length").get,this.elementChildElementCountGetter=e.Object.getOwnPropertyDescriptor(e.Element.prototype,"childElementCount").get,this.inputFilesGetter=e.Object.getOwnPropertyDescriptor(e.HTMLInputElement.prototype,"files").get,this.styleSheetHrefGetter=e.Object.getOwnPropertyDescriptor(e.StyleSheet.prototype,"href").get,this.objectDataGetter=y.get,this.inputTypeGetter=g.get,this.inputValueGetter=f.get,this.inputRequiredGetter=w.get,this.textAreaValueGetter=S.get,this.imageSrcGetter=O.get,this.scriptSrcGetter=E.get,this.embedSrcGetter=T.get,this.sourceSrcGetter=D.get,this.mediaSrcGetter=x.get,this.inputSrcGetter=L.get,this.frameSrcGetter=H.get,this.iframeSrcGetter=M.get,this.anchorHrefGetter=R.get,this.linkHrefGetter=j.get,this.linkRelGetter=G.get,this.areaHrefGetter=N.get,this.baseHrefGetter=I.get,this.anchorHostGetter=_.get,this.anchorHostnameGetter=k.get,this.anchorPathnameGetter=W.get,this.anchorPortGetter=F.get,this.anchorProtocolGetter=q.get,this.anchorSearchGetter=B.get,this.anchorTargetGetter=U.get,this.formTargetGetter=V.get,this.areaTargetGetter=X.get,this.baseTargetGetter=$.get,this.inputFormTargetGetter=z.get,this.buttonFormTargetGetter=Q.get,this.svgImageHrefGetter=K.get,this.svgAnimStrAnimValGetter=J.get,this.svgAnimStrBaseValGetter=Z.get,this.inputAutocompleteGetter=Y.get,this.formActionGetter=ee.get,this.inputFormActionGetter=te.get,this.buttonFormActionGetter=re.get,this.iframeSandboxGetter=ce.get,this.metaHttpEquivGetter=pe.get,this.contentWindowGetter=e.Object.getOwnPropertyDescriptor(e.HTMLIFrameElement.prototype,"contentWindow").get,this.contentDocumentGetter=e.Object.getOwnPropertyDescriptor(e.HTMLIFrameElement.prototype,"contentDocument").get,this.frameContentWindowGetter=e.Obj
processScript:"__proc$Script",processHtml:"__proc$Html",getEval:"__get$Eval",getPostMessage:"__get$PostMessage",getProxyUrl:"__get$ProxyUrl",restArray:"__rest$Array",arrayFrom:"__arrayFrom$",restObject:"__rest$Object",swScopeHeaderValue:"__swScopeHeaderValue",getWorkerSettings:"__getWorkerSettings$"},jt={protocol:"",host:"",scope:""},At=function(){function e(){var t=m(location.toString()),r={syncCookie:Oe};t?e._setProxySettings(t.sessionId,t.windowId):this._getBlobSettings(),this.fetch=new Ht(r),this.fetch.attach(self),e._overrideImportScripts(),Xe.isServiceWorker?Se():(this.xhr=new xt(r),this.xhr.attach(self))}return e._setProxySettings=function(e,t){var r=ut.get();r.sessionId=e,r.windowId=t,ut.set(r)},e._overrideImportScripts=function(){A(self,"importScripts",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0;r<e.length;r++)e[r]=ft(e[r],{resourceType:ae({isScript:!0})});return rt.importScripts.apply(self,e)})},e.prototype._getBlobSettings=function(){var t=self[Rt.getWorkerSettings]();e._setProxySettings(t.sessionId,t.windowId),z(t.origin)},e}(),Gt=new At;return Gt}();