trimStart():e,n=(e,t,r,o)=>{(e=>e?.set&&e?.get&&"function"==typeof e.set&&"function"==typeof e.get&&!e.get.toString().includes("[native code]")&&!e.set.toString().includes("[native code]"))(t)?Object.defineProperty(r||globalThis,e,{get:t.get,set:t.set,configurable:!1,enumerable:o||!1}):Object.defineProperty(r||globalThis,e,{value:t,writable:!1,configurable:!1,enumerable:o||!1})},c=()=>{const e=globalThis.open,t=document.open,r=(t,r,o)=>{const n="string"!=typeof t,c=e.call(window,t,r,o);return n||((s=t).startsWith("//")&&/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/g.test(`${location.protocol}:${s}`)&&(s=`${location.protocol}${s}`),!s.startsWith("http")||new URL(s).hostname===location.hostname)?{}:c;var s};defineStrictProperty("open",r,globalThis,!0),defineStrictProperty("open",((e,o,n)=>e?r(e,o,n):t.call(document,e,o,n)),document,!0)},s=document.createElement,i=(e,t)=>{const r=s.call(document,e,t),n=Element.prototype.setAttribute,c=Element.prototype.setAttributeNS;if("iframe"===o(e)){globalThis.defineStrictProperty("srcdoc",{get:()=>{},set:()=>{console.error("`srcdoc` is not allowed in iframe elements.")}},r,!1);const e=function(e,t){"srcdoc"!==e.toLowerCase()?n.call(r,e,t):console.error("`srcdoc` attribute is not allowed to be set.")},t=function(e,t,o){"srcdoc"!==t.toLowerCase()?c.call(r,e,t,o):console.error("`srcdoc` attribute is not allowed to be set.")};r.setAttribute=e,r.setAttributeNS=t}return r},a="client-binding",l="security_overrideGlobals",d=["/_api/v1/access-tokens","/_api/v2/dynamicmodel"],u=e=>(e instanceof Headers?e.forEach(((t,r)=>{decodeURIComponent(r).toLowerCase()===a&&e.delete(r)})):Object.keys(e).forEach((t=>{decodeURIComponent(t).toLowerCase()===a&&delete e[t]})),e),p=e=>{let t=!0;const r=(e=>{let t,r;if(globalThis.Request&&e instanceof Request)t=e.url;else{if("function"!=typeof e?.toString)throw new Error("Unsupported type for url");t=e.toString()}try{return new URL(t).pathname}catch(e){return r=t.replace(/#.+/gi,"").split("?").shift(),r.startsWith("/")?r:`/${r}`}})(e),n=o(r);return d.some((e=>n.includes(e)))&&(t=!1),t},f=(e=globalThis)=>{const t=fetch;e.defineStrictProperty("fetch",(function(){const r=(o=arguments,globalThis.Request&&o[0]instanceof Request&&o[0]?.headers?u(o[0].headers):o[1]?.headers&&u(o[1].headers),o);var o;return p(arguments[0])?t.apply(e,Array.from(r)):new Promise(((e,t)=>{const r=new Error("TB002");window.fedops?.reportError(r,l),t(r)}))}))};performance.mark("overrideGlobals started");const{isExcludedFromSecurityExperiments:b,experiments:g}=window.viewerModel;try{((e=globalThis)=>{Object.defineProperty(e,"defineStrictProperty",{value:n,writable:!1,enumerable:!1,configurable:!1})})(),c(),g["specs.thunderbolt.hardenIFrames"]&&!b&&globalThis.defineStrictProperty("createElement",i,document,!0),g["specs.thunderbolt.hardenFetchAndXHR"]&&!b&&(f(),((e=globalThis)=>{const t=XMLHttpRequest;e.defineStrictProperty("XMLHttpRequest",(function(){const e=new t,r=e.open,o=e.setRequestHeader;return e.open=function(){if(arguments.length<2||p(arguments[1]))return r.apply(e,Array.from(arguments));{const e=new Error("TB002");throw window.fedops?.reportError(e,l),e}},e.setRequestHeader=function(t,r){decodeURIComponent(t).toLowerCase()!==a&&o.call(e,t,r)},e}))})()),g["specs.thunderbolt.removeServiceWorker"]&&(()=>{if(navigator&&"serviceWorker"in navigator)navigator.serviceWorker.register=()=>console.log("Service worker registration is not allowed"),Promise.resolve()})(),(e=>{let t=[],o=[];const{experiments:n}=window.viewerModel;n["specs.thunderbolt.softFreeze_TextDecoder_TextEncoder"]&&(o=o.concat(["TextEncoder","TextDecoder"])),n["specs.thunderbolt.hardenClientGlobals_EventTarget"]&&n["specs.thunderbolt.moveSentryToHeadBeforeSecurityChanges"]&&!e&&(o=o.concat(["XMLHttpRequestEventTarget","EventTarget"])),n["specs.thunderbolt.hardenArray"]&&o.push("Array"),n["specs.thunderbolt.harden_URL_JSON"]&&(o=o.concat(["URL","JSON"])),e||(t=t.concat(["addEventListener","removeEventListener"])),n["specs.thunderbolt.hardenEncodingDecoding"]&&(t=t.concat(["encodeURI","encodeURIComponent","decodeURI","decodeURIComponent"])),n["specs.thunderbolt.hardenStringAndNumber"]&&(o=o.concat(["String","Number"])),n["specs.thunderbolt.hardenObject"]&&!e&&o.push("Object"),n["specs.thunderbolt.hardenReflect"]&&(o=o.concat(["Reflect"])),t.forEach((e=>{Object.freeze(globalThis[e]),["addEventListener","removeEventListener"].includes(e)&&globalThis.defineStrictProperty(e,document[e],document,!0),globalThis.defineStrictProperty(e,globalThis[e],globalThis,!0)})),o.forEach((e=>{r(e,globalThis)}))})(b),g["specs.thunderbolt.hardenTimeout"]&&!b&&(defineStrictProperty("preventStringArgument",((e,t,r)=>{const o=r||globalThis,n=o[e];defineStrictProperty(e,(function(){const r=Array.from(arguments);if("string"!=typeof r[t])return n.apply(o,r);console.warn(`Calling ${e} with a String Argument at index ${t} is not allowed`)}),o)})),preventStringArgument("setTimeout",0),preventStringArgument("setInterval",0))}catch(e){window?.viewerModel?.mode.debug&&console.error(e);const t=new Error("TB006");window.fedops?.reportError(t,"security_overrideGlobals"),window.Sentry?window.Sentry.captureException(t):globalThis.defineStrictProperty("sentryBuffer",[t],window,!1)}performance.mark("overrideGlobals ended")})(); //# sourceMappingURL=https://static.parastorage.com/services/wix-thunderbolt/dist/overrideGlobals.inline.45eeaad6.bundle.min.js.map
top of page
bottom of page