5 lines
No EOL
37 KiB
JavaScript
5 lines
No EOL
37 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/xtermModule-BuZfJS5v.js","./assets/defaultSettingsView-B-dXF5JN.js","./assets/urlMatch-L3liM589.js","./defaultSettingsView.BLFoOugd.css","./xtermModule.kHJ-D0s7.css"])))=>i.map(i=>d[i]);
|
||
import{C as e,D as t,E as n,S as r,T as i,_ as a,a as o,b as s,c,d as l,f as u,g as d,h as f,i as p,k as m,l as h,m as g,n as _,p as v,r as y,t as b,u as x,v as S,w as C,x as w,y as T}from"./assets/defaultSettingsView-B-dXF5JN.js";import"./assets/urlMatch-L3liM589.js";var E=m(t()),D=m(S(),1),O=class{constructor(e,t={}){this.isListing=!1,this._tests=new Map,this._rootSuite=new k(``,`root`),this._options=t,this._reporter=e}reset(){this._rootSuite._entries=[],this._tests.clear()}dispatch(e){let{method:t,params:n}=e;if(t===`onConfigure`){this._onConfigure(n.config);return}if(t===`onProject`){this._onProject(n.project);return}if(t===`onBegin`){this._onBegin();return}if(t===`onTestBegin`){this._onTestBegin(n.testId,n.result);return}if(t===`onTestPaused`){this._onTestPaused(n.testId,n.resultId,n.errors);return}if(t===`onTestEnd`){this._onTestEnd(n.test,n.result);return}if(t===`onStepBegin`){this._onStepBegin(n.testId,n.resultId,n.step);return}if(t===`onAttach`){this._onAttach(n.testId,n.resultId,n.attachments);return}if(t===`onStepEnd`){this._onStepEnd(n.testId,n.resultId,n.step);return}if(t===`onError`){this._onError(n.error,n.workerInfo);return}if(t===`onStdIO`){this._onStdIO(n.type,n.testId,n.resultId,n.data,n.isBase64);return}if(t===`onEnd`)return this._onEnd(n.result);if(t===`onExit`)return this._onExit()}_onConfigure(e){this._rootDir=e.rootDir,this._config=this._parseConfig(e),this._reporter.onConfigure?.(this._config)}_onProject(e){let t=this._options.mergeProjects?this._rootSuite.suites.find(t=>t.project().name===e.name):void 0;t||(t=new k(e.name,`project`),this._rootSuite._addSuite(t));let n=this._parseProject(e);t._project=n;let r=-1;this._options.mergeProjects&&(r=this._config.projects.findIndex(t=>t.name===e.name)),r===-1?this._config.projects.push(n):this._config.projects[r]=n;for(let n of e.suites)this._mergeSuiteInto(n,t)}_onBegin(){this._reporter.onBegin?.(this._rootSuite)}_onTestBegin(e,t){let n=this._tests.get(e);this._options.clearPreviousResultsWhenTestBegins&&(n.results=[]);let r=n._createTestResult(t.id);r.retry=t.retry,r.workerIndex=t.workerIndex,r.parallelIndex=t.parallelIndex,r.setStartTimeNumber(t.startTime),this._reporter.onTestBegin?.(n,r)}_onTestPaused(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t);i.errors.push(...n),i.error=i.errors[0],this._reporter.onTestPaused?.(r,i)}_onTestEnd(e,t){let n=this._tests.get(e.testId);n.timeout=e.timeout,n.expectedStatus=e.expectedStatus;let r=n.results.find(e=>e._id===t.id);r.duration=t.duration,r.status=t.status,r.errors.push(...t.errors??[]),r.error=r.errors[0],t.attachments&&(r.attachments=this._parseAttachments(t.attachments)),t.annotations&&(this._absoluteAnnotationLocationsInplace(t.annotations),r.annotations=t.annotations,n.annotations=t.annotations),this._reporter.onTestEnd?.(n,r),r._stepMap=new Map}_onStepBegin(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t),a=n.parentStepId?i._stepMap.get(n.parentStepId):void 0,o=new ee(n,a,this._absoluteLocation(n.location),i);a?a.steps.push(o):i.steps.push(o),i._stepMap.set(n.id,o),this._reporter.onStepBegin?.(r,i,o)}_onStepEnd(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t),a=i._stepMap.get(n.id);a._endPayload=n,a.duration=n.duration,a.error=n.error,this._reporter.onStepEnd?.(r,i,a)}_onAttach(e,t,n){this._tests.get(e).results.find(e=>e._id===t).attachments.push(...n.map(e=>({name:e.name,contentType:e.contentType,path:e.path,body:e.base64&&globalThis.Buffer?Buffer.from(e.base64,`base64`):void 0})))}_onError(e,t){let n;if(t){let e=this._config.projects.find(e=>e.name===t.projectName);e&&(n={workerIndex:t.workerIndex,parallelIndex:t.parallelIndex,config:this._config,project:e})}this._reporter.onError?.(e,n)}_onStdIO(e,t,n,r,i){let a=i?globalThis.Buffer?Buffer.from(r,`base64`):atob(r):r,o=t?this._tests.get(t):void 0,s=o&&n?o.results.find(e=>e._id===n):void 0;e===`stdout`?(s?.stdout.push(a),this._reporter.onStdOut?.(a,o,s)):(s?.stderr.push(a),this._reporter.onStdErr?.(a,o,s))}async _onEnd(e){await this._reporter.onEnd?.(F(e))}_onExit(){return this._reporter.onExit?.()}_parseConfig(e){let t=I(e);return this._options.configOverrides&&(t.configFile=this._options.configOverrides.configFile,t.reportSlowTests=this._options.configOverrides.reportSlowTests,t.quiet=this._options.configOverrides.quiet,t.reporter=[...this._options.configOverrides.reporter]),t}_parseProject(e){return{metadata:e.metadata,name:e.name,outputDir:this._absolutePath(e.outputDir),repeatEach:e.repeatEach,retries:e.retries,testDir:this._absolutePath(e.testDir),testIgnore:N(e.testIgnore),testMatch:N(e.testMatch),timeout:e.timeout,grep:N(e.grep),grepInvert:N(e.grepInvert),dependencies:e.dependencies,teardown:e.teardown,snapshotDir:this._absolutePath(e.snapshotDir),ignoreSnapshots:e.ignoreSnapshots??!1,use:e.use}}_parseAttachments(e){return e.map(e=>({...e,body:e.base64&&globalThis.Buffer?Buffer.from(e.base64,`base64`):void 0}))}_mergeSuiteInto(e,t){let n=t.suites.find(t=>t.title===e.title);n||(n=new k(e.title,t.type===`project`?`file`:`describe`),t._addSuite(n)),n.location=this._absoluteLocation(e.location),e.entries.forEach(e=>{`testId`in e?this._mergeTestInto(e,n):this._mergeSuiteInto(e,n)})}_mergeTestInto(e,t){let n=this._options.mergeTestCases?t.tests.find(t=>t.title===e.title&&t.repeatEachIndex===e.repeatEachIndex):void 0;n||(n=new A(e.testId,e.title,this._absoluteLocation(e.location),e.repeatEachIndex),t._addTest(n),this._tests.set(n.id,n)),this._updateTest(e,n)}_updateTest(e,t){return t.id=e.testId,t.location=this._absoluteLocation(e.location),t.retries=e.retries,t.tags=e.tags??[],t.annotations=e.annotations??[],this._absoluteAnnotationLocationsInplace(t.annotations),t}_absoluteAnnotationLocationsInplace(e){for(let t of e)t.location&&=this._absoluteLocation(t.location)}_absoluteLocation(e){return e&&{...e,file:this._absolutePath(e.file)}}_absolutePath(e){if(e!==void 0)return this._options.resolvePath?this._options.resolvePath(this._rootDir,e):this._rootDir+`/`+e}},k=class{constructor(e,t){this._entries=[],this._requireFile=``,this._parallelMode=`none`,this.title=e,this._type=t}get type(){return this._type}get suites(){return this._entries.filter(e=>e.type!==`test`)}get tests(){return this._entries.filter(e=>e.type===`test`)}entries(){return this._entries}allTests(){let e=[],t=n=>{for(let r of n.entries())r.type===`test`?e.push(r):t(r)};return t(this),e}titlePath(){let e=this.parent?this.parent.titlePath():[];return(this.title||this._type!==`describe`)&&e.push(this.title),e}project(){return this._project??this.parent?.project()}_addTest(e){e.parent=this,this._entries.push(e)}_addSuite(e){e.parent=this,this._entries.push(e)}skip(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}fixme(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}fail(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}exclude(){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}},A=class{constructor(e,t,n,r){this.fn=()=>{},this.results=[],this.type=`test`,this.expectedStatus=`passed`,this.timeout=0,this.annotations=[],this.retries=0,this.tags=[],this.repeatEachIndex=0,this.id=e,this.title=t,this.location=n,this.repeatEachIndex=r}titlePath(){let e=this.parent?this.parent.titlePath():[];return e.push(this.title),e}outcome(){return P(this)}ok(){let e=this.outcome();return e===`expected`||e===`flaky`||e===`skipped`}_createTestResult(e){let t=new j(this.results.length,e);return this.results.push(t),t}skip(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}fixme(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}fail(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}exclude(){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}},ee=class{constructor(e,t,n,r){this.duration=-1,this.steps=[],this._startTime=0,this.title=e.title,this.category=e.category,this.location=n,this.parent=t,this._startTime=e.startTime,this._result=r}titlePath(){return[...this.parent?.titlePath()||[],this.title]}get startTime(){return new Date(this._startTime)}set startTime(e){this._startTime=+e}get attachments(){return this._endPayload?.attachments?.map(e=>this._result.attachments[e])??[]}get annotations(){return this._endPayload?.annotations??[]}},j=class{constructor(e,t){this.parallelIndex=-1,this.workerIndex=-1,this.duration=-1,this.stdout=[],this.stderr=[],this.attachments=[],this.annotations=[],this.status=`skipped`,this.steps=[],this.errors=[],this._stepMap=new Map,this._startTime=0,this.retry=e,this._id=t}setStartTimeNumber(e){this._startTime=e}get startTime(){return new Date(this._startTime)}set startTime(e){this._startTime=+e}},M={argv:[],failOnFlakyTests:!1,forbidOnly:!1,fullyParallel:!1,globalSetup:null,globalTeardown:null,globalTimeout:0,grep:/.*/,grepInvert:null,maxFailures:0,metadata:{},preserveOutput:`always`,projects:[],reporter:[[{}.CI?`dot`:`list`]],reportSlowTests:{max:5,threshold:3e5},configFile:``,rootDir:``,quiet:!1,shard:null,tags:[],updateSnapshots:`missing`,updateSourceMethod:`patch`,version:``,workers:0,webServer:null};function N(e){return e.map(e=>e.s===void 0?new RegExp(e.r.source,e.r.flags):e.s)}function P(e){let t=0,n=0,r=0,i=0,a=0;for(let o of e.results)o.status===`interrupted`?++i:o.status===`skipped`&&e.expectedStatus===`skipped`?++t:o.status===`skipped`?++n:o.status===e.expectedStatus?++r:++a;return r===0&&a===0?`skipped`:a===0?`expected`:r===0&&t===0?`unexpected`:`flaky`}function F(e){return{status:e.status,startTime:new Date(e.startTime),duration:e.duration}}function I(e){return{...M,...e}}var L=class{constructor(e,t,n,r,i,a){this._treeItemById=new Map,this._treeItemByTestId=new Map;let o=r&&[...r.values()].some(Boolean);this.pathSeparator=i,this.rootItem={kind:`group`,subKind:`folder`,id:e,title:``,location:{file:``,line:0,column:0},duration:0,parent:void 0,children:[],status:`none`,hasLoadErrors:!1},this._treeItemById.set(e,this.rootItem);let s=(e,t,n,r)=>{for(let i of r===`tests`?[]:t.suites){if(!i.title){s(e,i,n,`all`);continue}let r=n.children.find(e=>e.kind===`group`&&e.title===i.title);r||(r={kind:`group`,subKind:`describe`,id:`suite:`+t.titlePath().join(``)+``+i.title,title:i.title,location:i.location,duration:0,parent:n,children:[],status:`none`,hasLoadErrors:!1},this._addChild(n,r)),s(e,i,r,`all`)}for(let i of r===`suites`?[]:t.tests){let t=i.title,r=n.children.find(e=>e.kind!==`group`&&e.title===t);r||(r={kind:`case`,id:`test:`+i.titlePath().join(``),title:t,parent:n,children:[],tests:[],location:i.location,duration:0,status:`none`,project:void 0,test:void 0,tags:i.tags},this._addChild(n,r));let a=i.results[0],o=`none`;a?.[z]===`scheduled`?o=`scheduled`:a?.[z]===`running`?o=`running`:a?.status===`skipped`?o=`skipped`:a?.status===`interrupted`?o=`none`:a&&i.outcome()!==`expected`?o=`failed`:a&&i.outcome()===`expected`&&(o=`passed`),r.tests.push(i);let s={kind:`test`,id:i.id,title:e.name,location:i.location,test:i,parent:r,children:[],status:o,duration:i.results.length?Math.max(0,i.results[0].duration):0,project:e};this._addChild(r,s),this._treeItemByTestId.set(i.id,s),r.duration=r.children.reduce((e,t)=>e+t.duration,0)}};for(let e of t?.suites||[])if(!(o&&!r.get(e.title)))for(let t of e.suites)if(a){if(s(e.project(),t,this.rootItem,`suites`),t.tests.length){let n=this._defaultDescribeItem();s(e.project(),t,n,`tests`)}}else{let n=this._fileItem(t.location.file.split(i),!0);s(e.project(),t,n,`all`)}for(let e of n){if(!e.location)continue;let t=this._fileItem(e.location.file.split(i),!0);t.hasLoadErrors=!0}}_addChild(e,t){e.children.push(t),t.parent=e,this._treeItemById.set(t.id,t)}filterTree(e,t,n){let r=e.trim().toLowerCase().split(` `),i=[...t.values()].some(Boolean),a=e=>{let a=[...e.tests[0].titlePath(),...e.tests[0].tags].join(` `).toLowerCase();return!r.every(e=>a.includes(e))&&!e.tests.some(e=>n?.has(e.id))?!1:(e.children=e.children.filter(e=>!i||n?.has(e.test.id)||t.get(e.status)),e.tests=e.children.map(e=>e.test),!!e.children.length)},o=e=>{let t=[];for(let n of e.children)n.kind===`case`?a(n)&&t.push(n):(o(n),(n.children.length||n.hasLoadErrors)&&t.push(n));e.children=t};o(this.rootItem)}_fileItem(e,t){if(e.length===0)return this.rootItem;let n=e.join(this.pathSeparator),r=this._treeItemById.get(n);if(r)return r;let i=this._fileItem(e.slice(0,e.length-1),!1),a={kind:`group`,subKind:t?`file`:`folder`,id:n,title:e[e.length-1],location:{file:n,line:0,column:0},duration:0,parent:i,children:[],status:`none`,hasLoadErrors:!1};return this._addChild(i,a),a}_defaultDescribeItem(){let e=this._treeItemById.get(`<anonymous>`);return e||(e={kind:`group`,subKind:`describe`,id:`<anonymous>`,title:`<anonymous>`,location:{file:``,line:0,column:0},duration:0,parent:this.rootItem,children:[],status:`none`,hasLoadErrors:!1},this._addChild(this.rootItem,e)),e}sortAndPropagateStatus(){R(this.rootItem)}flattenForSingleProject(){let e=t=>{t.kind===`case`&&t.children.length===1?(t.project=t.children[0].project,t.test=t.children[0].test,t.children=[],this._treeItemByTestId.set(t.test.id,t)):t.children.forEach(e)};e(this.rootItem)}shortenRoot(){let e=this.rootItem;for(;e.children.length===1&&e.children[0].kind===`group`&&e.children[0].subKind===`folder`;)e=e.children[0];e.location=this.rootItem.location,this.rootItem=e}fileNames(){let e=new Set,t=n=>{n.kind===`group`&&n.subKind===`file`?e.add(n.id):n.children.forEach(t)};return t(this.rootItem),[...e]}flatTreeItems(){let e=[],t=n=>{e.push(n),n.children.forEach(t)};return t(this.rootItem),e}treeItemById(e){return this._treeItemById.get(e)}collectTestIds(e){return te(e)}};function R(e){for(let t of e.children)R(t);e.kind===`group`&&e.children.sort((e,t)=>e.location.file.localeCompare(t.location.file)||e.location.line-t.location.line);let t=e.children.length>0,n=e.children.length>0,r=!1,i=!1,a=!1;for(let o of e.children)n&&=o.status===`skipped`,t&&=o.status===`passed`||o.status===`skipped`,r||=o.status===`failed`,i||=o.status===`running`,a||=o.status===`scheduled`;i?e.status=`running`:a?e.status=`scheduled`:r?e.status=`failed`:n?e.status=`skipped`:t&&(e.status=`passed`)}function te(e){let t=new Set,n=new Set,r=e=>{if(e.kind!==`test`&&e.kind!==`case`){e.children.forEach(r);return}let i=e;for(;i&&i.parent&&!(i.kind===`group`&&i.subKind===`file`);)i=i.parent;n.add(i.location.file),e.kind===`case`?e.tests.forEach(e=>t.add(e.id)):t.add(e.id)};return r(e),{testIds:t,locations:n}}var z=Symbol(`statusEx`),ne=class{constructor(e){this.loadErrors=[],this.progress={total:0,passed:0,failed:0,skipped:0},this._lastRunTestCount=0,this._receiver=new O(this._createReporter(),{mergeProjects:!0,mergeTestCases:!0,resolvePath:re(e.pathSeparator),clearPreviousResultsWhenTestBegins:!0}),this._options=e}_createReporter(){return{version:()=>`v2`,onConfigure:e=>{this.config=e,this._lastRunReceiver=new O({version:()=>`v2`,onBegin:e=>{this._lastRunTestCount=e.allTests().length,this._lastRunReceiver=void 0}},{mergeProjects:!0,mergeTestCases:!1,resolvePath:re(this._options.pathSeparator)}),this._lastRunReceiver.dispatch({method:`onConfigure`,params:{config:e}})},onBegin:e=>{if(this.rootSuite||=e,this._testResultsSnapshot){for(let e of this.rootSuite.allTests())e.results=this._testResultsSnapshot?.get(e.id)||e.results;this._testResultsSnapshot=void 0}this.progress.total=this._lastRunTestCount,this.progress.passed=0,this.progress.failed=0,this.progress.skipped=0,this._options.onUpdate(!0)},onEnd:()=>{this._options.onUpdate(!0)},onTestBegin:(e,t)=>{t[z]=`running`,this._options.onUpdate()},onTestEnd:(e,t)=>{e.outcome()===`skipped`?++this.progress.skipped:e.outcome()===`unexpected`?++this.progress.failed:++this.progress.passed,t[z]=t.status,this._options.onUpdate()},onError:e=>this._handleOnError(e),printsToStdio:()=>!1}}processGlobalReport(e){let t=new O({version:()=>`v2`,onConfigure:e=>{this.config=e},onError:e=>this._handleOnError(e)});for(let n of e)t.dispatch(n)}processListReport(e){let t=this.rootSuite?.allTests()||[];this._testResultsSnapshot=new Map(t.map(e=>[e.id,e.results])),this._receiver.reset();for(let t of e)this._receiver.dispatch(t)}processTestReportEvent(e){this._lastRunReceiver?.dispatch(e)?.catch(()=>{}),this._receiver.dispatch(e)?.catch(()=>{})}_handleOnError(e){this.loadErrors.push(e),this._options.onError?.(e),this._options.onUpdate()}asModel(){return{rootSuite:this.rootSuite||new k(``,`root`),config:this.config,loadErrors:this.loadErrors,progress:this.progress}}};function re(e){return(t,n)=>{let r=[];for(let i of[...t.split(e),...n.split(e)]){let t=e===`\\`&&r.length===1&&r[0].endsWith(`:`),n=!r.length;if(!(!i&&!n&&!t)&&i!==`.`){if(i===`..`){r.pop();continue}r.push(i)}}return r.join(e)}}var B=d(),ie=({source:e})=>{let[t,n]=i(),[a,o]=E.useState(w()),[s]=E.useState(x(()=>import(`./assets/xtermModule-BuZfJS5v.js`).then(e=>e.default),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),c=E.useRef(null);return E.useEffect(()=>(T(o),()=>r(o)),[]),E.useEffect(()=>{let t=e.write,r=e.clear;return(async()=>{let{Terminal:t,FitAddon:r}=await s,i=n.current;if(!i)return;let o=a===`dark-mode`?oe:ae;if(c.current&&c.current.terminal.options.theme===o)return;c.current&&(i.textContent=``);let l=new t({convertEol:!0,fontSize:13,scrollback:1e4,fontFamily:`monospace`,theme:o}),u=new r;l.loadAddon(u);for(let t of e.pending)l.write(t);e.write=(t=>{e.pending.push(t),l.write(t)}),e.clear=()=>{e.pending=[],l.clear()},l.open(i),u.fit(),c.current={terminal:l,fitAddon:u}})(),()=>{e.clear=r,e.write=t}},[s,c,n,e,a]),E.useEffect(()=>{setTimeout(()=>{c.current&&(c.current.fitAddon.fit(),e.resize(c.current.terminal.cols,c.current.terminal.rows))},250)},[t,e]),(0,B.jsx)(`div`,{"data-testid":`output`,className:`xterm-wrapper`,style:{flex:`auto`},ref:n})},ae={foreground:`#383a42`,background:`#fafafa`,cursor:`#383a42`,black:`#000000`,red:`#e45649`,green:`#50a14f`,yellow:`#c18401`,blue:`#4078f2`,magenta:`#a626a4`,cyan:`#0184bc`,white:`#a0a0a0`,brightBlack:`#000000`,brightRed:`#e06c75`,brightGreen:`#98c379`,brightYellow:`#d19a66`,brightBlue:`#4078f2`,brightMagenta:`#a626a4`,brightCyan:`#0184bc`,brightWhite:`#383a42`,selectionBackground:`#d7d7d7`,selectionForeground:`#383a42`},oe={foreground:`#f8f8f2`,background:`#1e1e1e`,cursor:`#f8f8f0`,black:`#000000`,red:`#ff5555`,green:`#50fa7b`,yellow:`#f1fa8c`,blue:`#bd93f9`,magenta:`#ff79c6`,cyan:`#8be9fd`,white:`#bfbfbf`,brightBlack:`#4d4d4d`,brightRed:`#ff6e6e`,brightGreen:`#69ff94`,brightYellow:`#ffffa5`,brightBlue:`#d6acff`,brightMagenta:`#ff92df`,brightCyan:`#a4ffff`,brightWhite:`#e6e6e6`,selectionBackground:`#44475a`,selectionForeground:`#f8f8f2`},se=({filterText:e,setFilterText:t,statusFilters:n,setStatusFilters:r,projectFilters:i,setProjectFilters:a,onlyChanged:o,setOnlyChanged:s,testModel:c,runTests:l})=>{let[u,d]=E.useState(!1),f=E.useRef(null);E.useEffect(()=>{f.current?.focus()},[]);let p=[...n.entries()].filter(([e,t])=>t).map(([e])=>e).join(` `)||`all`,m=[...i.entries()].filter(([e,t])=>t).map(([e])=>e).join(` `)||`all`;return(0,B.jsxs)(`div`,{className:`filters`,children:[(0,B.jsx)(h,{expanded:u,setExpanded:d,title:(0,B.jsx)(`input`,{ref:f,type:`search`,placeholder:`Filter (e.g. text, @tag)`,spellCheck:!1,value:e,onChange:e=>{t(e.target.value)},onKeyDown:e=>{e.key===`Enter`&&l()}})}),(0,B.jsxs)(`div`,{className:`filter-summary`,title:`Status: `+p+`
|
||
Projects: `+m+(o?`
|
||
Only changed`:``),onClick:()=>d(!u),children:[(0,B.jsx)(`span`,{className:`filter-label`,children:`Status:`}),` `,p,(0,B.jsx)(`span`,{className:`filter-label`,children:`Projects:`}),` `,m,o&&(0,B.jsx)(B.Fragment,{children:(0,B.jsx)(`span`,{className:`filter-label`,children:`Only changed`})})]}),u&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`hbox`,style:{marginLeft:14,maxHeight:200,overflowY:`auto`},children:[(0,B.jsx)(`div`,{className:`filter-list`,role:`list`,"data-testid":`status-filters`,children:[...n.entries()].map(([e,t])=>(0,B.jsx)(`div`,{className:`filter-entry`,role:`listitem`,children:(0,B.jsxs)(`label`,{children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>{let t=new Map(n);t.set(e,!t.get(e)),r(t)}}),(0,B.jsx)(`div`,{children:e})]})},e))}),(0,B.jsx)(`div`,{className:`filter-list`,role:`list`,"data-testid":`project-filters`,children:[...i.entries()].map(([e,t])=>(0,B.jsx)(`div`,{className:`filter-entry`,role:`listitem`,children:(0,B.jsxs)(`label`,{children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>{let t=new Map(i);t.set(e,!t.get(e)),a(t);let n=c?.config?.configFile;n&&C.setObject(n+`:projects`,[...t.entries()].filter(([e,t])=>t).map(([e])=>e))}}),(0,B.jsx)(`div`,{children:e||`untitled`})]})},e))})]}),(0,B.jsx)(`div`,{className:`filter-entry`,style:{marginLeft:24},children:(0,B.jsxs)(`label`,{children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:o,onChange:()=>s(!o)}),(0,B.jsx)(`div`,{children:`Show only changed files`})]})})]})]})},ce=({tag:t,style:n,onClick:r})=>(0,B.jsx)(`span`,{className:e(`tag`,`tag-color-${le(t)}`),onClick:r,style:{margin:`6px 0 0 6px`,...n},title:`Click to filter by tag: ${t}`,children:t});function le(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<8)-t);return Math.abs(t%6)}var ue=v,de=({filterText:e,testModel:t,testServerConnection:n,testTree:r,runTests:i,runningState:a,watchAll:o,watchedTreeIds:s,setWatchedTreeIds:d,isLoading:f,onItemSelected:p,requestedCollapseAllCount:m,requestedExpandAllCount:h,setFilterText:_,onRevealSource:v})=>{let[y,b]=E.useState({expandedItems:new Map}),[x,S]=E.useState(),[C,w]=E.useState(m),[T,D]=E.useState(h);E.useEffect(()=>{if(C!==m){y.expandedItems.clear();for(let e of r.flatTreeItems())y.expandedItems.set(e.id,!1);w(m),S(void 0),b({...y});return}if(T!==h){y.expandedItems.clear();for(let e of r.flatTreeItems())y.expandedItems.set(e.id,!0);D(h),S(void 0),b({...y});return}if(!a||a.itemSelectedByUser)return;let e,t=n=>{n.children.forEach(t),!e&&n.status===`failed`&&(n.kind===`test`&&a.testIds.has(n.test.id)||n.kind===`case`&&a.testIds.has(n.tests[0]?.id))&&(e=n)};t(r.rootItem),e&&S(e.id)},[a,S,r,C,w,m,T,D,h,y,b]);let O=E.useMemo(()=>{if(x)return r.treeItemById(x)},[x,r]);E.useEffect(()=>{if(!t)return;let e=fe(O,t),n;O?.kind===`test`?n=O.test:O?.kind===`case`&&O.tests.length===1&&(n=O.tests[0]),p({treeItem:O,testCase:n,testFile:e})},[t,O,p]),E.useEffect(()=>{if(!f)if(o)n?.watchNoReply({fileNames:r.fileNames()});else{let e=new Set;for(let t of s.value){let n=r.treeItemById(t)?.location.file;n&&e.add(n)}n?.watchNoReply({fileNames:[...e]})}},[f,r,o,s,n]);let k=e=>{S(e.id),i(`bounce-if-busy`,r.collectTestIds(e))},A=(t,n)=>{if(t.preventDefault(),t.stopPropagation(),t.metaKey||t.ctrlKey){let t=e.split(` `);t.includes(n)?_(t.filter(e=>e!==n).join(` `).trim()):_((e+` `+n).trim())}else _((e.split(` `).filter(e=>!e.startsWith(`@`)).join(` `)+` `+n).trim())};return(0,B.jsx)(ue,{name:`tests`,treeState:y,setTreeState:b,rootItem:r.rootItem,dataTestId:`test-tree`,render:e=>{let t=e.id.replace(/[^\w\d-_]/g,`-`),n=t+`-label`,r=t+`-time`;return(0,B.jsxs)(`div`,{className:`hbox ui-mode-tree-item`,"aria-labelledby":`${n} ${r}`,children:[(0,B.jsxs)(`div`,{id:n,className:`ui-mode-tree-item-title`,children:[(0,B.jsx)(`span`,{children:e.title}),e.kind===`case`?e.tags.map(e=>(0,B.jsx)(ce,{tag:e.slice(1),onClick:t=>A(t,e)},e)):null]}),!!e.duration&&e.status!==`skipped`&&(0,B.jsx)(`div`,{id:r,className:`ui-mode-tree-item-time`,children:g(e.duration)}),(0,B.jsxs)(c,{noMinHeight:!0,noShadow:!0,children:[(0,B.jsx)(u,{icon:`play`,title:`Run`,onClick:()=>k(e),disabled:!!a&&!a.completed}),(0,B.jsx)(u,{icon:`go-to-file`,title:`Show source`,onClick:v,style:e.kind===`group`&&e.subKind===`folder`?{visibility:`hidden`}:{}}),!o&&(0,B.jsx)(u,{icon:`eye`,title:`Watch`,onClick:()=>{s.value.has(e.id)?s.value.delete(e.id):s.value.add(e.id),d({...s})},toggled:s.value.has(e.id)})]})]})},icon:e=>l(e.status),title:e=>e.title,selectedItem:O,onAccepted:k,onSelected:e=>{a&&(a.itemSelectedByUser=!0),S(e.id)},isError:e=>e.kind===`group`?e.hasLoadErrors:!1,autoExpandDepth:e?5:1,noItemsMessage:f?`Loading…`:`No tests`})};function fe(e,t){if(!(!e||!t))return{file:e.location.file,line:e.location.line,column:e.location.column,source:{errors:t.loadErrors.filter(t=>t.location?.file===e.location.file).map(e=>({line:e.location.line,message:e.message})),content:void 0}}}function V(e){return`.playwright-artifacts-${e}`}var pe=({item:e,rootDir:t,onOpenExternally:n,revealSource:r,pathSeparator:i})=>{let[o,s]=E.useState(void 0),[c,l]=E.useState(0),u=E.useRef(null),{outputDir:d}=E.useMemo(()=>({outputDir:e.testCase?me(e.testCase):void 0}),[e]);return E.useEffect(()=>{u.current&&clearTimeout(u.current);let t=e.testCase?.results[0];if(!t||e.treeItem?.status===`scheduled`){s(void 0);return}let n=t&&t.duration>=0&&t.attachments.find(e=>e.name===`trace`);if(n&&n.path){H(n.path,t.startTime.getTime()).then(e=>s({model:e,isLive:!1}));return}if(!d){s(void 0);return}let r=[d,V(t.workerIndex),`traces`,`${e.testCase?.id}.json`].join(i);return u.current=setTimeout(async()=>{try{s({model:await H(r,Date.now()),isLive:!0})}catch{let e=new a(``,[]);e.errorDescriptors.push(...t.errors.flatMap(e=>e.message?[{message:e.message}]:[])),s({model:e,isLive:!1})}finally{l(c+1)}},500),()=>{u.current&&clearTimeout(u.current)}},[d,e,s,c,l,i]),(0,B.jsx)(p,{model:o?.model,showSourcesFirst:!0,rootDir:t,fallbackLocation:e.testFile,isLive:o?.isLive,status:e.treeItem?.status,annotations:e.testCase?.annotations??[],onOpenExternally:n,revealSource:r},`workbench`)},me=e=>{for(let t=e.parent;t;t=t.parent)if(t.project())return t.project()?.outputDir};async function H(e,t){let n=`file?path=${encodeURIComponent(e)}×tamp=${t}`,r=new URLSearchParams;return r.set(`trace`,n),new a(n,await(await fetch(`contexts?${r.toString()}`)).json())}var he={cols:80,rows:24},U={pending:[],clear:()=>{},write:e=>U.pending.push(e),resize:()=>{}},W=new URLSearchParams(window.location.search),G=new URL(W.get(`server`)??`../`,window.location.href),ge=new URL(W.get(`ws`),G);ge.protocol=ge.protocol===`https:`?`wss:`:`ws:`;var K={args:W.getAll(`arg`),grep:W.get(`grep`)||void 0,grepInvert:W.get(`grepInvert`)||void 0,projects:W.getAll(`project`),workers:W.get(`workers`)||void 0,headed:W.has(`headed`),updateSnapshots:W.get(`updateSnapshots`)||void 0,reporters:W.has(`reporter`)?W.getAll(`reporter`):void 0,pathSeparator:W.get(`pathSeparator`)||`/`};K.updateSnapshots&&![`all`,`changed`,`none`,`missing`].includes(K.updateSnapshots)&&(K.updateSnapshots=void 0);var _e=navigator.platform===`MacIntel`;function ve(e){return e.startsWith(`/`)&&(e=e.substring(1)),e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ye(e,t,n){let r=e.passed+e.failed+e.skipped,i=t?r/t*100|0:0,a=[];return e.passed>0&&a.push(`${e.passed} passed`),e.failed>0&&a.push((0,B.jsxs)(`span`,{className:`status-line-failed`,children:[e.failed,` failed`]},`failed`)),e.skipped>0&&a.push(`${e.skipped} skipped`),(0,B.jsx)(`div`,{"data-testid":`status-line`,className:`status-line`,children:(0,B.jsxs)(`div`,{children:[n&&`Running `,r,`/`,t,` (`,i,`%)`,a.length>0&&` — `,a.map((e,t)=>(0,B.jsxs)(E.Fragment,{children:[t>0?`, `:``,e]},t))]})})}var be=({})=>{let[t,r]=E.useState(``),[i,a]=E.useState(!1),[s,l]=E.useState(!1),[d,p]=E.useState(new Map([[`passed`,!1],[`failed`,!1],[`skipped`,!1]])),[m,h]=E.useState(new Map),[g,v]=E.useState(),[x,S]=E.useState(),[w,T]=E.useState({}),[D,O]=E.useState(!1),[A,ee]=E.useState(),j=A&&!A.completed,[M,N]=n(`watch-all`,!1),[P,F]=E.useState({value:new Set}),I=E.useRef(Promise.resolve()),R=E.useRef({testIds:new Set,locations:new Set}),[te,re]=E.useState(0),[ae,oe]=E.useState(0),[ce,le]=E.useState(!1),[ue,fe]=E.useState(!0),[V,me]=E.useState(),[H,W]=E.useState(),[G,be]=E.useState(!1),[q,xe]=E.useState(!1),[Se,Ce]=E.useState(!1),we=E.useCallback(()=>Ce(!0),[Ce]),[Te,Ee]=n(`single-worker`,!1),[De,Oe]=n(`updateSnapshots`,`missing`),[J,ke]=n(`only-changed`,!1),[Ae,je]=n(`stop-on-failure`,!1),[Y]=n(`mergeFiles`,!1),Me=E.useRef(null),X=E.useCallback(()=>{me(e=>(e?.close(),new _(new y(ge))))},[]);E.useEffect(()=>{Me.current?.focus(),O(!0),X()},[X]),E.useEffect(()=>{if(!V)return;let e=[V.onStdio(e=>{if(e.buffer){let t=atob(e.buffer);U.write(t)}else U.write(e.text);e.type===`stderr`&&l(!0)}),V.onClose(()=>le(!0))];return U.resize=(e,t)=>{he={cols:e,rows:t},V.resizeTerminalNoReply({cols:e,rows:t})},()=>{for(let t of e)t.dispose()}},[V]),E.useEffect(()=>{if(!V)return;let e,t=new ne({onUpdate:n=>{clearTimeout(e),e=void 0,n?v(t.asModel()):e||=setTimeout(()=>{v(t.asModel())},250)},onError:e=>{U.write((e.stack||e.value||``)+`
|
||
`),l(!0)},pathSeparator:K.pathSeparator});return W(t),v(void 0),O(!0),F({value:new Set}),(async()=>{try{await V.initialize({interceptStdio:!0,watchTestDirs:!0});let{status:e,report:n}=await V.runGlobalSetup({});if(t.processGlobalReport(n),e!==`passed`)return;let r=await V.listTests({projects:K.projects,locations:K.args,grep:K.grep,grepInvert:K.grepInvert,onlyChanged:J});t.processListReport(r.report),V.onReport(e=>{t.processTestReportEvent(e)});let{hasBrowsers:i}=await V.checkBrowsers({});fe(i)}finally{O(!1)}})(),()=>{clearTimeout(e)}},[J,V]),E.useEffect(()=>{if(!g)return;let{config:e,rootSuite:t}=g,n=e.configFile?C.getObject(e.configFile+`:projects`,void 0):void 0,r=new Map(m);for(let e of r.keys())t.suites.find(t=>t.title===e)||r.delete(e);for(let e of t.suites)r.has(e.title)||r.set(e.title,!!n?.includes(e.title));!n&&r.size&&![...r.values()].includes(!0)&&r.set(r.entries().next().value[0],!0),(m.size!==r.size||[...m].some(([e,t])=>r.get(e)!==t))&&h(r)},[m,g]),E.useEffect(()=>{j&&g?.progress?S(g.progress):g||S(void 0)},[g,j]);let{testTree:Z}=E.useMemo(()=>{if(!g)return{testTree:new L(``,new k(``,`root`),[],m,K.pathSeparator,Y)};let e=new L(``,g.rootSuite,g.loadErrors,m,K.pathSeparator,Y);return e.filterTree(t,d,j?A?.testIds:void 0),e.sortAndPropagateStatus(),e.shortenRoot(),e.flattenForSingleProject(),{testTree:e}},[t,g,d,m,A,j,Y]),Q=E.useCallback((e,t)=>{if(!(!V||!g)&&!(e===`bounce-if-busy`&&j)){for(let e of t.testIds)R.current.testIds.add(e);for(let e of t.locations)R.current.locations.add(e);I.current=I.current.then(async()=>{let{testIds:e,locations:t}=R.current;if(R.current={testIds:new Set,locations:new Set},!e.size)return;for(let t of g.rootSuite?.allTests()||[])if(e.has(t.id)){t.results=[];let e=t._createTestResult(`pending`);e[z]=`scheduled`}v({...g});let n=` [`+new Date().toLocaleTimeString()+`]`;U.write(`\x1B[2m—`.repeat(Math.max(0,he.cols-n.length))+n+`\x1B[22m`),S({total:0,passed:0,failed:0,skipped:0}),ee({testIds:e}),await V.runTests({locations:[...t].map(ve),grep:K.grep,grepInvert:K.grepInvert,testIds:[...e],projects:[...m].filter(([e,t])=>t).map(([e])=>e),updateSnapshots:De,reporters:K.reporters,workers:Te?1:void 0,maxFailures:Ae?1:void 0,trace:`on`});for(let e of g.rootSuite?.allTests()||[])e.results[0]?.duration===-1&&(e.results=[]);v({...g}),ee(e=>e?{...e,completed:!0}:void 0)})}},[m,j,g,V,De,Te,Ae]),$=E.useCallback(()=>Q(`bounce-if-busy`,Z.collectTestIds(Z.rootItem)),[Q,Z]);E.useEffect(()=>{if(!V||!H)return;let e=V.onTestFilesChanged(async e=>{if(I.current=I.current.then(async()=>{O(!0);try{let e=await V.listTests({projects:K.projects,locations:K.args,grep:K.grep,grepInvert:K.grepInvert,onlyChanged:J});H.processListReport(e.report)}catch(e){console.log(e)}finally{O(!1)}}),await I.current,e.testFiles.length===0)return;let t=H.asModel(),n=new L(``,t.rootSuite,t.loadErrors,m,K.pathSeparator,Y),r=[],i=[],a=new Set(e.testFiles);if(M){let e=t=>{let o=t.location.file;if(o&&a.has(o)){let e=n.collectTestIds(t);r.push(...e.locations),i.push(...e.testIds)}t.kind===`group`&&t.subKind===`folder`&&t.children.forEach(e)};e(n.rootItem)}else for(let e of P.value){let t=n.treeItemById(e);if(!t)continue;let o=t;for(;!(o.kind===`group`&&(o.subKind===`file`||o.subKind===`folder`))&&o.parent;)o=o.parent;let s=o?.location.file;if(s&&a.has(s)){let e=n.collectTestIds(t);r.push(...e.locations),i.push(...e.testIds)}}Q(`queue-if-busy`,{locations:r,testIds:i})});return()=>e.dispose()},[Q,V,M,P,H,m,Y,J]),E.useEffect(()=>{if(!V)return;let e=e=>{e.code===`Backquote`&&e.ctrlKey?(e.preventDefault(),a(!i)):e.code===`F5`&&e.shiftKey?(e.preventDefault(),V?.stopTestsNoReply({})):e.code===`F5`&&(e.preventDefault(),$())};return addEventListener(`keydown`,e),()=>{removeEventListener(`keydown`,e)}},[$,X,V,i]);let Ne=E.useRef(null),Pe=E.useCallback(e=>{e.preventDefault(),e.stopPropagation(),Ne.current?.showModal()},[]),Fe=E.useCallback(e=>{e.preventDefault(),e.stopPropagation(),Ne.current?.close()},[]),Ie=E.useCallback(e=>{Fe(e),a(!0),V?.installBrowsers({}).then(async()=>{a(!1);let{hasBrowsers:e}=await V?.checkBrowsers({});fe(e)})},[Fe,V]);return(0,B.jsxs)(`div`,{className:`vbox ui-mode`,children:[!ue&&(0,B.jsxs)(`dialog`,{ref:Ne,children:[(0,B.jsxs)(`div`,{className:`title`,children:[(0,B.jsx)(`span`,{className:`codicon codicon-lightbulb`}),`Install browsers`]}),(0,B.jsxs)(`div`,{className:`body`,children:[`Playwright did not find installed browsers.`,(0,B.jsx)(`br`,{}),"Would you like to run `playwright install`?",(0,B.jsx)(`br`,{}),(0,B.jsx)(`button`,{className:`button`,onClick:Ie,children:`Install`}),(0,B.jsx)(`button`,{className:`button secondary`,onClick:Fe,children:`Dismiss`})]})]}),ce&&(0,B.jsxs)(`div`,{className:`disconnected`,children:[(0,B.jsx)(`div`,{className:`title`,children:`UI Mode disconnected`}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`a`,{href:`#`,onClick:()=>window.location.href=`/`,children:`Reload the page`}),` to reconnect`]})]}),(0,B.jsx)(f,{sidebarSize:250,minSidebarSize:150,orientation:`horizontal`,sidebarIsFirst:!0,settingName:`testListSidebar`,main:(0,B.jsxs)(`div`,{className:`vbox`,children:[(0,B.jsxs)(`div`,{className:e(`vbox`,!i&&`hidden`),children:[(0,B.jsxs)(c,{children:[(0,B.jsx)(`div`,{className:`section-title`,style:{flex:`none`},children:`Output`}),(0,B.jsx)(u,{icon:`circle-slash`,title:`Clear output`,onClick:()=>{U.clear(),l(!1)}}),(0,B.jsx)(`div`,{className:`spacer`}),(0,B.jsx)(u,{icon:`close`,title:`Close`,onClick:()=>a(!1)})]}),(0,B.jsx)(ie,{source:U})]}),(0,B.jsx)(`div`,{className:e(`vbox`,i&&`hidden`),children:(0,B.jsx)(pe,{pathSeparator:K.pathSeparator,item:w,rootDir:g?.config?.rootDir,revealSource:Se,onOpenExternally:e=>V?.openNoReply({location:{file:e.file,line:e.line,column:e.column}})})})]}),sidebar:(0,B.jsxs)(`div`,{className:`vbox ui-mode-sidebar`,children:[(0,B.jsxs)(c,{noShadow:!0,noMinHeight:!0,children:[(0,B.jsx)(`img`,{src:`playwright-logo.svg`,alt:`Playwright logo`}),(0,B.jsx)(`div`,{className:`section-title`,children:`Playwright`}),(0,B.jsx)(u,{icon:`refresh`,title:`Reload`,onClick:()=>X(),disabled:j||D}),(0,B.jsx)(`div`,{style:{position:`relative`},children:(0,B.jsx)(u,{icon:`terminal`,title:`Toggle output — `+(_e?"⌃`":"Ctrl + `"),toggled:i,errorBadge:s?`Output contains error`:void 0,onClick:()=>{a(!i)}})}),!ue&&(0,B.jsx)(u,{icon:`lightbulb-autofix`,style:{color:`var(--vscode-list-warningForeground)`},title:`Playwright browsers are missing`,onClick:Pe})]}),(0,B.jsx)(se,{filterText:t,setFilterText:r,statusFilters:d,setStatusFilters:p,projectFilters:m,setProjectFilters:h,onlyChanged:J,setOnlyChanged:ke,testModel:g,runTests:$}),(0,B.jsxs)(c,{className:`section-toolbar`,noMinHeight:!0,children:[!j&&!x&&(0,B.jsx)(`div`,{className:`section-title`,children:`Tests`}),x&&ye(x,j?A.testIds.size:x.total,!!j),(0,B.jsx)(u,{icon:`play`,title:`Run all — F5`,onClick:$,disabled:j||D}),(0,B.jsx)(u,{icon:`debug-stop`,title:`Stop — `+(_e?`⇧F5`:`Shift + F5`),onClick:()=>V?.stopTests({}),disabled:!j||D,testId:`stop-button`}),(0,B.jsx)(u,{icon:`eye`,title:`Watch all`,toggled:M,onClick:()=>{F({value:new Set}),N(!M)}}),(0,B.jsx)(u,{icon:`collapse-all`,title:`Collapse all`,onClick:()=>{re(te+1)}}),(0,B.jsx)(u,{icon:`expand-all`,title:`Expand all`,onClick:()=>{oe(ae+1)}})]}),(0,B.jsx)(de,{filterText:t,testModel:g,testTree:Z,testServerConnection:V,runningState:A,runTests:Q,onItemSelected:T,watchAll:M,watchedTreeIds:P,setWatchedTreeIds:F,isLoading:D,requestedCollapseAllCount:te,requestedExpandAllCount:ae,setFilterText:r,onRevealSource:we}),(0,B.jsxs)(c,{noShadow:!0,noMinHeight:!0,className:`settings-toolbar`,onClick:()=>xe(!q),children:[(0,B.jsx)(`span`,{className:`codicon codicon-${q?`chevron-down`:`chevron-right`}`,style:{marginLeft:5},title:q?`Hide Testing Options`:`Show Testing Options`}),(0,B.jsx)(`div`,{className:`section-title`,children:`Testing Options`})]}),q&&(0,B.jsx)(o,{settings:[{type:`check`,value:Te,set:Ee,name:`Single worker`},{type:`check`,value:Ae,set:je,name:`Stop on first failure`},{type:`select`,options:[{label:`All`,value:`all`},{label:`Changed`,value:`changed`},{label:`Missing`,value:`missing`},{label:`None`,value:`none`}],value:De,set:Oe,name:`Update snapshots`}]}),(0,B.jsxs)(c,{noShadow:!0,noMinHeight:!0,className:`settings-toolbar`,onClick:()=>be(!G),children:[(0,B.jsx)(`span`,{className:`codicon codicon-${G?`chevron-down`:`chevron-right`}`,style:{marginLeft:5},title:G?`Hide Settings`:`Show Settings`}),(0,B.jsx)(`div`,{className:`section-title`,children:`Settings`})]}),G&&(0,B.jsx)(b,{location:`ui-mode`})]})})]})};(async()=>{if(s(),window.location.protocol!==`file:`){if(window.location.href.includes(`isUnderTest=true`)&&await new Promise(e=>setTimeout(e,1e3)),!navigator.serviceWorker)throw Error(`Service workers are not supported.\nMake sure to serve the website (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register(`sw.bundle.js`),navigator.serviceWorker.controller||await new Promise(e=>{navigator.serviceWorker.oncontrollerchange=()=>e()}),setInterval(function(){fetch(`ping`)},1e4)}D.createRoot(document.querySelector(`#root`)).render((0,B.jsx)(be,{}))})(); |