First Commit
This commit is contained in:
commit
264e65006a
488 files changed
+155661
No files matched your search
Generated
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
import{n as Wu}from"./defaultSettingsView-Do_wwdKw.js";var vi={exports:{}},_u=vi.exports,ha;function It(){return ha||(ha=1,function(Et,zt){(function(C,De){Et.exports=De()})(_u,function(){var C=navigator.userAgent,De=navigator.platform,I=/gecko\/\d/i.test(C),K=/MSIE \d/.test(C),$=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C),V=/Edge\/(\d+)/.exec(C),b=K||$||V,N=b&&(K?document.documentMode||6:+(V||$)[1]),_=!V&&/WebKit\//.test(C),ie=_&&/Qt\/\d+\.\d+/.test(C),O=!V&&/Chrome\/(\d+)/.exec(C),q=O&&+O[1],z=/Opera\//.test(C),X=/Apple Computer/.test(navigator.vendor),ke=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(C),we=/PhantomJS/.test(C),te=X&&(/Mobile\/\w+/.test(C)||navigator.maxTouchPoints>2),re=/Android/.test(C),ne=te||re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(C),se=te||/Mac/.test(De),Ae=/\bCrOS\b/.test(C),ye=/win/i.test(De),de=z&&C.match(/Version\/(\d*\.\d*)/);de&&(de=Number(de[1])),de&&de>=15&&(z=!1,_=!0);var ze=se&&(ie||z&&(de==null||de<12.11)),fe=I||b&&N>=9;function H(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ee=function(e,t){var n=e.className,r=H(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return D(e).appendChild(t)}function d(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function S(e,t,n,r){var i=d(e,t,n,r);return i.setAttribute("role","presentation"),i}var w;document.createRange?w=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:w=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function m(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function y(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function P(e,t){var n=e.className;H(t).test(n)||(e.className+=(n?" ":"")+t)}function le(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!H(n[r]).test(t)&&(t+=" "+n[r]);return t}var p=function(e){e.select()};te?p=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:b&&(p=function(e){try{e.select()}catch{}});function c(e){return e.display.wrapper.ownerDocument}function Y(e){return xe(e.display.wrapper)}function xe(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function j(e){return c(e).defaultView}function ue(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Te(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Le(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=i||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var be=function(){this.id=null,this.f=null,this.time=0,this.handler=ue(this.onTimeout,this)};be.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},be.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function oe(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Ne=50,qe={toString:function(){return"CodeMirror.Pass"}},Ve={scroll:!1},ct={origin:"*mouse"},Oe={origin:"+move"};function Re(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(ge(Ue)+" ");return Ue[e]}function ge(e){return e[e.length-1]}function Pe(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function T(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function B(){}function F(e,t){var n;return Object.create?n=Object.create(e):(B.prototype=e,n=new B),t&&Te(t,n),n}var Ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ae(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Ie.test(e))}function Se(e,t){return t?t.source.indexOf("\\w")>-1&&ae(e)?!0:t.test(e):ae(e)}function he(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4Line truncated
|
||||
|
||||
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
||||
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},_n=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),_t=null;function xi(e){if(_t!=null)return _t;var t=J(e,d("span","x")),n=t.getBoundingClientRect(),r=w(t,0,1).getBoundingClientRect();return _t=Math.abs(n.left-r.left)>1}var Pr={},Ht={};function Rt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){Ht[e]=t}function Ir(e){if(typeof e=="string"&&Ht.hasOwnProperty(e))e=Ht[e];else if(e&&typeof e.name=="string"&&Ht.hasOwnProperty(e.name)){var t=Ht[e.name];typeof t=="string"&&(t={name:t}),e=F(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Te(t,n)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function sn(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Wr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Je.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},Je.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Le(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Le(this.string,this.lineStart,this.tabSize):0)},Je.prototype.indentation=function(){return Le(this.string,null,this.tabSize)-(this.lineStart?Le(this.string,this.lineStart,this.tabSize):0)},Je.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ce(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Vt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(o){var l=o.text;i==n.line&&(l=l.slice(0,n.ch)),i==t.line&&(l=l.slice(t.ch)),r.push(l),++i}),r}function un(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Ft(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function f(e){if(e.parent==null)return null;for(var t=e.parent,n=oe(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function g(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e
Line truncated
|
||||
`?(E=h.appendChild(d("span",k[0]=="\r"?"␍":"","cm-invalidchar")),E.setAttribute("cm-text",k[0]),e.col+=1):(E=e.cm.options.specialCharPlaceholder(k[0]),E.setAttribute("cm-text",k[0]),b&&N<9?h.appendChild(d("span",[E])):h.appendChild(E),e.col+=1);e.map.push(e.pos,e.pos+1,E),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,n||r||i||u||o||l){var Q=n||"";r&&(Q+=r),i&&(Q+=i);var G=d("span",[h],Q,o);if(l)for(var ee in l)l.hasOwnProperty(ee)&&ee!="style"&&ee!="class"&&G.setAttribute(ee,l[ee]);return e.content.appendChild(G)}e.content.appendChild(h)}}function is(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o=" "),r+=o,n=o==" "}return r}function os(e,t){return function(n,r,i,o,l,a,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,h=u+r.length;;){for(var v=void 0,k=0;k<t.length&&(v=t[k],!(v.to>u&&v.from<=u));k++);if(v.to>=h)return e(n,r,i,o,l,a,s);e(n,r.slice(0,v.to-u),i,o,null,a,s),o=null,r=r.slice(v.to-u),u=v.to}}}function Oo(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function ls(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var l=1;l<n.length;l+=2)t.addToken(t,i.slice(o,o=n[l]),Eo(n[l+1],t.cm.options));return}for(var a=i.length,s=0,u=1,h="",v,k,x=0,M,E,R,U,Q;;){if(x==s){M=E=R=k="",Q=null,U=null,x=1/0;for(var G=[],ee=void 0,me=0;me<r.length;++me){var pe=r[me],Fe=pe.marker;if(Fe.type=="bookmark"&&pe.from==s&&Fe.widgetNode)G.push(Fe);else if(pe.from<=s&&(pe.to==null||pe.to>s||Fe.collapsed&&pe.to==s&&pe.from==s)){if(pe.to!=null&&pe.to!=s&&x>pe.to&&(x=pe.to,E=""),Fe.className&&(M+=" "+Fe.className),Fe.css&&(k=(k?k+";":"")+Fe.css),Fe.startStyle&&pe.from==s&&(R+=" "+Fe.startStyle),Fe.endStyle&&pe.to==x&&(ee||(ee=[])).push(Fe.endStyle,pe.to),Fe.title&&((Q||(Q={})).title=Fe.title),Fe.attributes)for(var Ke in Fe.attributes)(Q||(Q={}))[Ke]=Fe.attributes[Ke];Fe.collapsed&&(!U||Si(U.marker,Fe)<0)&&(U=pe)}else pe.from>s&&x>pe.from&&(x=pe.from)}if(ee)for(var st=0;st<ee.length;st+=2)ee[st+1]==x&&(E+=" "+ee[st]);if(!U||U.from==s)for(var Xe=0;Xe<G.length;++Xe)Oo(t,0,G[Xe]);if(U&&(U.from||0)==s){if(Oo(t,(U.to==null?a+1:U.to)-s,U.marker,U.from==null),U.to==null)return;U.to==s&&(U=!1)}}if(s>=a)break;for(var Mt=Math.min(a,x);;){if(h){var wt=s+h.length;if(!U){var tt=wt>Mt?h.slice(0,Mt-s):h;t.addToken(t,tt,v?v+M:M,R,s+tt.length==x?E:"",k,Q)}if(wt>=Mt){h=h.slice(Mt-s),s=Mt;break}s=wt,R=""}h=i.slice(o,o=n[u++]),v=Eo(n[u++],t.cm.options)}}}function Po(e,t,n){this.line=t,this.rest=Qa(t),this.size=this.rest?f(ge(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cr(e,t)}function Gn(e,t,n){for(var r=[],i,o=t;o<n;o=i){var l=new Po(e.doc,ce(e.doc,o),o);i=o+l.size,r.push(l)}return r}var Rr=null;function as(e){Rr?Rr.ops.push(e):e.ownsGroup=Rr={ops:[e],delayedCallbacks:[]}}function ss(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function us(e,t){var n=e.ownsGroup;if(n)try{ss(n)}finally{Rr=null,t(n)}}var dn=null;function ot(e,t){var n=Qt(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Rr?i=Rr.delayedCallbacks:dn?i=dn:(i=dn=[],setTimeout(fs,0));for(var o=function(a){i.push(function(){return n[a].apply(null,r)})},l=0;l<n.length;++l)o(l)}}function fs(){var e=dn;dn=null;for(var t=0;t<e.length;++t)e[t]()}function Io(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?ds(e,t):o=="gutter"?Bo(e,t,n,r):o=="class"?Di(e,t):o=="widget"&&hs(e,t,r)}t.changes=null}function hn(e){return e.node==e.text&&(e.node=d("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),b&&N<8&&(e.node.style.zIndex=2)),e.node}function cs(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=hn(t);t.background=r.insertBefore(d("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function zo(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):No(e,t)}function ds(e,t){var n=t.text.className,r=zo(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Di(e,t)):n&&(t.text.className=n)}function Di(e,t){cs(e,t),t.line.wrapClass?hn(t).className=t.lin
Line truncated
|
||||
top: `+ee+"px; width: "+(me??s-G)+`px;
|
||||
height: `+(pe-ee)+"px"))}function v(G,ee,me){var pe=ce(i,G),Fe=pe.text.length,Ke,st;function Xe(tt,St){return Zn(e,L(G,tt),"div",pe,St)}function Mt(tt,St,ft){var nt=Vo(e,pe,null,tt),rt=St=="ltr"==(ft=="after")?"left":"right",Qe=ft=="after"?nt.begin:nt.end-(/\s/.test(pe.text.charAt(nt.end-1))?2:1);return Xe(Qe,rt)[rt]}var wt=We(pe,i.direction);return or(wt,ee||0,me??Fe,function(tt,St,ft,nt){var rt=ft=="ltr",Qe=Xe(tt,rt?"left":"right"),Tt=Xe(St-1,rt?"right":"left"),nn=ee==null&&tt==0,xr=me==null&&St==Fe,gt=nt==0,Jt=!wt||nt==wt.length-1;if(Tt.top-Qe.top<=3){var ut=(u?nn:xr)&>,co=(u?xr:nn)&&Jt,ir=ut?a:(rt?Qe:Tt).left,Ar=co?s:(rt?Tt:Qe).right;h(ir,Qe.top,Ar-ir,Qe.bottom)}else{var Er,mt,on,ho;rt?(Er=u&&nn&>?a:Qe.left,mt=u?s:Mt(tt,ft,"before"),on=u?a:Mt(St,ft,"after"),ho=u&&xr&&Jt?s:Tt.right):(Er=u?Mt(tt,ft,"before"):a,mt=!u&&nn&>?s:Qe.right,on=!u&&xr&&Jt?a:Tt.left,ho=u?Mt(St,ft,"after"):s),h(Er,Qe.top,mt-Er,Qe.bottom),Qe.bottom<Tt.top&&h(a,Qe.bottom,null,Tt.top),h(on,Tt.top,ho-on,Tt.bottom)}(!Ke||Qn(Qe,Ke)<0)&&(Ke=Qe),Qn(Tt,Ke)<0&&(Ke=Tt),(!st||Qn(Qe,st)<0)&&(st=Qe),Qn(Tt,st)<0&&(st=Tt)}),{start:Ke,end:st}}var k=t.from(),x=t.to();if(k.line==x.line)v(k.line,k.ch,x.ch);else{var M=ce(i,k.line),E=ce(i,x.line),R=qt(M)==qt(E),U=v(k.line,k.ch,R?M.text.length+1:null).end,Q=v(x.line,R?0:null,x.ch).start;R&&(U.top<Q.top-2?(h(U.right,U.top,null,U.bottom),h(a,Q.top,Q.left,Q.bottom)):h(U.right,U.top,Q.left-U.right,U.bottom)),U.bottom<Q.top&&h(a,U.bottom,null,Q.top)}n.appendChild(o)}function _i(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ur(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function rl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ri(e))}function Hi(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Ur(e))},100)}function Ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ye(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),_&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),_i(e))}function Ur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ye(e,"blur",e,t),e.state.focused=!1,Ee(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Vn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var a=t.view[l],s=e.options.lineWrapping,u=void 0,h=0;if(!a.hidden){if(i+=a.line.height,b&&N<8){var v=a.node.offsetTop+a.node.offsetHeight;u=v-n,n=v}else{var k=a.node.getBoundingClientRect();u=k.bottom-k.top,!s&&a.text.firstChild&&(h=a.text.firstChild.getBoundingClientRect().right-k.left-1)}var x=a.line.height-u;if((x>.005||x<-.005)&&(i<r&&(o-=x),Ft(a.line,u),nl(a.line),a.rest))for(var M=0;M<a.rest.length;M++)nl(a.rest[M]);if(h>e.display.sizerWidth){var E=Math.ceil(h/Kr(e.display));E>e.display.maxLineLength&&(e.display.maxLineLength=E,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function nl(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function $n(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Xn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=g(t,r),l=g(t,i);if(n&&n.ensure){var a=n.ensure.from.line,s=n.ensure.to.line;a<o?(o=a,l=g(t,er(ce(t,a))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=l&&(o=g(t,er(ce(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function Cs(e,t){if(!Ze(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),i!=null&&!we){var l=d("div","",null,`position: absolute;
|
||||
top: `+(t.top-n.viewOffset-Xn(e.display))+`px;
|
||||
height: `+(t.bottom-t.top+Yt(e)+n.barHeight)+`px;
|
||||
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function Ds(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?L(t.line,t.ch+1,"before"):t,t=t.ch?L(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=jt(e,t),s=!n||n==t?a:jt(e,n);i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=qi(e,i),h=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(yn(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(l=!0)),u.scrollLeft!=null&&(Cr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(l=!0)),!l)break}return i}function Ms(e,t){var n=qi(e,t);n.scrollTop!=null&&yn(e,n.scrollTop),n.scrollLeft!=null&&Cr(e,n.scrollLeft)}function qi(e,t){var n=e.display,r=jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Fi(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Mi(n),s=t.top<r,u=t.bottom>a-r;if(t.top<i)l.scrollTop=s?0:t.top;else if(t.bottom>i+o){var h=Math.min(t.top,(u?a:t.bottom)-o);h!=i&&(l.scrollTop=h)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,k=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,x=wr(e)-n.gutters.offsetWidth,M=t.right-t.left>x;return M&&(t.right=t.left+x),t.left<10?l.scrollLeft=0:t.left<k?l.scrollLeft=Math.max(0,t.left+v-(M?0:10)):t.right>x+k-3&&(l.scrollLeft=t.right+(M?0:10)-x),l}function ji(e,t){t!=null&&(ei(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Gr(e){ei(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mn(e,t,n){(t!=null||n!=null)&&ei(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Fs(e,t){ei(e),e.curOp.scrollToPos=t}function ei(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Jo(e,t.from),r=Jo(e,t.to);il(e,n,r,t.margin)}}function il(e,t,n,r){var i=qi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});mn(e,i.scrollLeft,i.scrollTop)}function yn(e,t){Math.abs(e.doc.scrollTop-t)<2||(I||Ui(e,{top:t}),ol(e,t,!0),I&&Ui(e),kn(e,100))}function ol(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Cr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,fl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function xn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Mi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Dr=function(e,t,n){this.cm=n;var r=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ve(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ve(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&N<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert
Line truncated
|
||||
`},setDirection:at(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Us(this.cm))})}),kt.prototype.eachLine=kt.prototype.iter;var Rl=0;function iu(e){var t=this;if(ql(t),!(Ze(t,e)||tr(t.display,e))){ht(e),b&&(Rl=+new Date);var n=Tr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),l=0,a=function(){++l==i&<(t,function(){n=Ce(t.doc,n);var x={from:n,to:n,text:t.doc.splitLines(o.filter(function(M){return M!=null}).join(t.doc.lineSeparator())),origin:"paste"};Jr(t.doc,x),Cl(t.doc,pr(Ce(t.doc,n),Ce(t.doc,gr(x))))})()},s=function(x,M){if(t.options.allowDropFileTypes&&oe(t.options.allowDropFileTypes,x.type)==-1){a();return}var E=new FileReader;E.onerror=function(){return a()},E.onload=function(){var R=E.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(R)){a();return}o[M]=R,a()},E.readAsText(x)},u=0;u<r.length;u++)s(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h=e.dataTransfer.getData("Text");if(h){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),li(t.doc,pr(n,n)),v)for(var k=0;k<v.length;++k)Qr(t.doc,"",v[k].anchor,v[k].head,"drag");t.replaceSelection(h,"around","paste"),t.display.input.focus()}}catch{}}}}function ou(e,t){if(b&&(!e.state.draggingText||+new Date-Rl<100)){ar(t);return}if(!(Ze(e,t)||tr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!X)){var n=d("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",z&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),z&&n.parentNode.removeChild(n)}}function lu(e,t){var n=Tr(e,t);if(n){var r=document.createDocumentFragment();Wi(e,n,r),e.display.dragCursor||(e.display.dragCursor=d("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),J(e.display.dragCursor,r)}}function ql(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function jl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var o=0;o<n.length;o++)e(n[o])})}}var Kl=!1;function au(){Kl||(su(),Kl=!0)}function su(){var e;ve(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,jl(uu)},100))}),ve(window,"blur",function(){return jl(Ur)})}function uu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var yr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},An=0;An<10;An++)yr[An+48]=yr[An+96]=String(An);for(var ui=65;ui<=90;ui++)yr[ui]=String.fromCharCode(ui);for(var En=1;En<=12;En++)yr[En+111]=yr[En+63235]="F"+En;var nr={};nr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},nr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},nr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O"Line truncated
|
||||
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yl(e,t){var n=ce(e.doc,t),r=qt(n);return r!=n&&(t=f(r)),no(!0,e,r,t,1)}function hu(e,t){var n=ce(e.doc,t),r=Ja(n);return r!=n&&(t=f(r)),no(!0,e,n,t,-1)}function Zl(e,t){var n=Yl(e,t.line),r=ce(e.doc,n.line),i=We(r,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=o&&t.ch;return L(n.line,l?0:o,n.sticky)}return n}function ci(e,t,n){if(typeof t=="string"&&(t=Nn[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=qe}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function pu(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=$r(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&$r(t,e.options.extraKeys,n,e)||$r(t,e.options.keyMap,n,e)}var gu=new be;function On(e,t,n,r){var i=e.state.keySeq;if(i){if(Ul(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:gu.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Jl(e,i+" "+t,n,r))return!0}return Jl(e,t,n,r)}function Jl(e,t,n,r){var i=pu(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ot(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(ht(n),_i(e)),!!i}function Ql(e,t){var n=Xl(t,!0);return n?t.shiftKey&&!e.state.keySeq?On(e,"Shift-"+n,t,function(r){return ci(e,r,!0)})||On(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return ci(e,r)}):On(e,n,t,function(r){return ci(e,r)}):!1}function vu(e,t,n){return On(e,"'"+n+"'",t,function(r){return ci(e,r,!0)})}var io=null;function Vl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=y(Y(t)),!Ze(t,e))){b&&N<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Ql(t,e);z&&(io=r?n:null,!r&&n==88&&!_n&&(se?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),I&&!se&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&mu(t)}}function mu(e){var t=e.display.lineDiv;P(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(Ee(t,"CodeMirror-crosshair"),dt(document,"keyup",n),dt(document,"mouseover",n))}ve(document,"keyup",n),ve(document,"mouseover",n)}function $l(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ze(this,e)}function ea(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(tr(t.display,e)||Ze(t,e)||e.ctrlKey&&!e.altKey||se&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(z&&n==io){io=null,ht(e);return}if(!(z&&(!e.which||e.which<10)&&Ql(t,e))){var i=String.fromCharCode(r??n);i!="\b"&&(vu(t,e,i)||t.display.input.onKeyPress(e))}}}var yu=400,oo=function(e,t,n){this.time=e,this.pos=t,this.button=n};oo.prototype.compare=function(e,t,n){return this.time+yu>e&&Z(t,this.pos)==0&&n==this.button};var Pn,In;function xu(e,t){var n=+new Date;return In&&In.compare(n,e,t)?(Pn=In=null,"triple"):Pn&&Pn.compare(n,e,t)?(In=new oo(n,e,t),Pn=null,"double"):(Pn=new oo(n,e,t),In=null,"single")}function ta(e){var t=this,n=t.display;if(!(Ze(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){_||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!lo(t,e)){var r=Tr(t,e),i=Wt(e),o=r?xu(r,i):"single";j(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&bu(t,i,r,o,e))&&(i==1?r?wu(t,r,o,e):ln(e)==n.scroller&&ht(e):i==2?(r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(fe?t.display.input.onContextMenu(e):Hi(t)))}}}function bu(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,On(e,Gl(o,i),i,function(l){if(typeof l=="string"&&(l=Nn[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,n)!=qe}finally{e.state.suppressEdits=!1}return a})}function ku(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=Ae?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=se?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(se?n.altKey:n.ctrlKey)),i}function wu(e,t,n,r){b?setTimeout(ue(rl,e),0):e.curOp.focus=y(Y(e));var i=ku(e,n,r),o=e.doc.sel,l;e.options.dragDrop&&yi&&!e.isReadOnly()&&n=="single"&&(l=o.contains(t))>-1&&(Z((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(Z(l.to(),t)>0||t.xRel<0)?Su(e,r,t,i):Tu(e,r,t,i)}function Su(e,t,n,r){var i=e.display,o=!1,l=lt(e,function(u){_&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Hi(e)),dt(i.wrapper.ownerDocument,"mouseup",l),dt(i.wrapper.ownerDocument,"mousemove",a),dt(i.scroller,"dragstart",s),dt(i.scroller,"drop",l),o||(ht(u),r.a
Line truncated
|
||||
`)==t){if(r.ranges.length%Ut.text.length==0){u=[];for(var h=0;h<Ut.text.length;h++)u.push(o.splitLines(Ut.text[h]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=Pe(s,function(U){return[U]}));for(var v=e.curOp.updateInput,k=r.ranges.length-1;k>=0;k--){var x=r.ranges[k],M=x.from(),E=x.to();x.empty()&&(n&&n>0?M=L(M.line,M.ch-n):e.state.overwrite&&!a?E=L(E.line,Math.min(ce(o,E.line).text.length,E.ch+ge(s).length)):a&&Ut&&Ut.lineWise&&Ut.text.join(`
|
||||
`)==s.join(`
|
||||
`)&&(M=E=L(M.line,0)));var R={from:M,to:E,text:u?u[k%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jr(e.doc,R),ot(e,"inputRead",e,R)}t&&!a&&sa(e,t),Gr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function aa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Dt(t,function(){return so(t,n,0,null,"paste")}),!0}function sa(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){l=zn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ce(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=zn(e,i.head.line,"smart"));l&&ot(e,"electricInput",e,i.head.line)}}}function ua(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:L(i,0),head:L(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function uo(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function fa(){var e=d("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=d("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return _?e.style.width="1000px":e.setAttribute("wrap","off"),te&&(e.style.border="1px solid black"),t}function Eu(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){j(this).focus(),this.display.input.focus()},setOption:function(r,i){var o=this.options,l=o[r];o[r]==i&&r!="mode"||(o[r]=i,t.hasOwnProperty(r)&<(this,t[r])(this,i,l),Ye(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](fi(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==r||i[o].name==r)return i.splice(o,1),!0},addOverlay:vt(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");T(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(l){return l.priority}),this.state.modeGen++,bt(this)}),removeOverlay:vt(function(r){for(var i=this.state.overlays,o=0;o<i.length;++o){var l=i[o].modeSpec;if(l==r||typeof r=="string"&&l.name==r){i.splice(o,1),this.state.modeGen++,bt(this);return}}}),indentLine:vt(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),A(this.doc,r)&&zn(this,r,i,o)}),indentSelection:vt(function(r){for(var i=this.doc.sel.ranges,o=-1,l=0;l<i.length;l++){var a=i[l];if(a.empty())a.head.line>o&&(zn(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Gr(this));else{var s=a.from(),u=a.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=h;v<o;++v)zn(this,v,r);var k=this.doc.sel.ranges;s.ch==0&&i.length==k.length&&k[l].from().ch>0&&eo(this.doc,l,new He(s,k[l].to()),Ve)}}}),getTokenAt:function(r,i){return bo(this,r,i)},getLineTokens:function(r,i){return bo(this,L(r),i,!0)},getTokenTypeAt:function(r){r=Ce(this.doc,r);var i=mo(this,ce(this.doc,r.line)),o=0,l=(i.length-1)/2,a=r.ch,s;if(a==0)s=i[2];else for(;;){var u=o+l>>1;if((u?i[u*2-1]:0)>=a)l=u;else if(i[u*2+1]<a)o=u+1;else{s=i[u*2+2];break}}var h=s?s.indexOf("overlay "):-1;return h<0?s:h==0?null:s.slice(0,h-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var o=[];if(!n.hasOwnProperty(i))return o;var l=n[i],a=this.getModeAt(r);if(typeof a[i]=="string")l[a[i]]&&o.push(l[a[i]]);else if(a[i])for(var s=0;s<a[i].length;s++){var u=l[a[i][s]];u&&o.push(u)}else a.helperType&&l[a.helperType]?o.push(l[a.helperType]):l[a.name]&&o.push(l[a.name]);for(var h=0;h<l._global.length;h++){var v=l._global[h];v.pred(a,this)&&oe(o,v.val)==-1&&o.push(v.val)}return o},getStateAfter:function(r,i){var o=this.doc;return r=po(o,r??o.first+o.size-1),fn(this,r+1,i).state},cursorCoords:function(r,i){var o,l=this.doc.sel.primary();return r==null?o=l.head:typeof r=="object"?o=Ce(this.doc,r):o=r?l.from():l.to(),jt(this,o,i||"page")},charCoords:function(r,i){return Zn(this,Ce(this.doc,r),i||"page")},coordsChar:function(r,i){return r=Zo(this,r,i||"page"),Oi(this,r.left,r.top)},lineAtHeight:function(r,i){return r=Zo(this,{top:r,left:0},i||"page").top,g(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,o){var l=!1,a;if(typeof r=="number"){var s=this.doc.first+this.doc.size-1;r<t
Line truncated
|
||||
`,R=Se(E,x)?"w":k&&E==`
|
||||
`?"n":!k||/\s/.test(E)?null:"p";if(k&&!M&&!R&&(R="s"),v&&v!=R){n<0&&(n=1,h(),t.sticky="after");break}if(R&&(v=R),n>0&&!h(!M))break}var U=ai(e,t,o,l,!0);return _e(o,U)&&(U.hitSide=!0),U}function ca(e,t,n,r){var i=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,j(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(a-.5*jr(e.display),3);l=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var u;u=Oi(e,o,l),!!u.outside;){if(n<0?l<=0:l>=i.height){u.hitSide=!0;break}l+=n*5}return u}var je=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new be,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};je.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,uo(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}ve(i,"paste",function(a){!o(a)||Ze(r,a)||aa(a,r)||N<=11&&setTimeout(lt(r,function(){return t.updateFromDOM()}),20)}),ve(i,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),ve(i,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),ve(i,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ve(i,"touchstart",function(){return n.forceCompositionEnd()}),ve(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||Ze(r,a))){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ua(r);hi({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ve),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Ut.text.join(`
|
||||
`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var h=fa(),v=h.firstChild;uo(v),r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),v.value=Ut.text.join(`
|
||||
`);var k=y(xe(i));p(v),setTimeout(function(){r.display.lineSpace.removeChild(h),k.focus(),k==i&&n.showPrimarySelection()},50)}}ve(i,"copy",l),ve(i,"cut",l)},je.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},je.prototype.prepareSelection=function(){var e=tl(this.cm,!1);return e.focus=y(xe(this.div))==this.div,e},je.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},je.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},je.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=pi(t,e.anchorNode,e.anchorOffset),l=pi(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&l&&!l.bad&&Z(_r(o,l),r)==0&&Z(xt(o,l),i)==0)){var a=t.display.view,s=r.line>=t.display.viewFrom&&da(t,r)||{node:a[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&da(t,i);if(!u){var h=a[a.length-1].measure,v=h.maps?h.maps[h.maps.length-1]:h.map;u={node:v[v.length-1],offset:v[v.length-2]-v[v.length-3]}}if(!s||!u){e.removeAllRanges();return}var k=e.rangeCount&&e.getRangeAt(0),x;try{x=w(s.node,s.offset,u.offset,u.node)}catch{}x&&(!I&&t.state.focused?(e.collapse(s.node,s.offset),x.collapsed||(e.removeAllRanges(),e.addRange(x))):(e.removeAllRanges(),e.addRange(x)),k&&e.anchorNode==null?e.addRange(k):I&&this.startGracePeriod()),this.rememberSelection()}},je.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},je.prototype.showMultipleSelections=function(e){J(this.cm.display.cursorDiv,e.cursors),J(this.cm.display.selectionDiv,e.selection)},je.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},je.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return m(this.div,t)},je.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||y(xe(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},je.prototype.blur=function(){this.div.blur()},je.prototype.getField=function(){return this.div},je.prototype.supportsTouch=function(){return!0},je.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Dt(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},je.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},je.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(re&&O&&this.cm.display.gutterSpecs.length&&Nu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=pi(t,e.anchorNode,e.anchorOffset),r=pi(t,e.focusNode,e.focusOffset);n&&r&&Dt(t,function(){pt(t.doc,pr(n,r),Ve),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},je.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=L(r.line-1,ce(e.doc,r.line-1).length)),i.ch==ce(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=L(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Lr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Lr(e,i.line),u,h;if(s==t.view.length-1?(u=t.viewTo-1,h=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,h=t.view[s+1].node.previousSibling),!a)return!1;for(var v=e.doc.splitLines(Ou(e,a,h,l,u)),k=Vt(e.doc,L(l,0),L(u,ce(e.doc,u).text.length));v.length>1&&k.length>1;)if(ge(v)==ge(k))v.pop(),k.pop(),u--;else if(v[0]==k[0])v.shift(),k.shift(),l++;else break;for(var x=0,M=0,E=v[0],R=k[0],U=Math.min(E.length,R.length);x<U&&E.charCodeAt(x)==R.charCodeAt(x);)++x;for(var Q=ge(v),G=ge(k),ee=Math.min(Q.length-(v.length==1?x:0),G.length-(k.length==1?x:0));M<ee&&Q.charCodeAt(Q.length-M-1)==G.charCodeAt(G.length-M-1);)++M;if(v.length==1&&k.length==1&&l==r.line)for(;x&&
Line truncated
|
||||
`),p(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}ve(i,"cut",o),ve(i,"copy",o),ve(e.scroller,"paste",function(l){if(!(tr(e,l)||Ze(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,i.dispatchEvent(a)}}),ve(e.lineSpace,"selectstart",function(l){tr(e,l)||ht(l)}),ve(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ve(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$e.prototype.createField=function(e){this.wrapper=fa(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;uo(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$e.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=tl(e);if(e.options.moveInputWithCursor){var i=jt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$e.prototype.showSelection=function(e){var t=this.cm,n=t.display;J(n.cursorDiv,e.cursors),J(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$e.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&p(this.textarea),b&&N>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",b&&N>=9&&(this.hasSelection=null));this.resetting=!1}},$e.prototype.getField=function(){return this.textarea},$e.prototype.supportsTouch=function(){return!1},$e.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ne||y(xe(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},$e.prototype.blur=function(){this.textarea.blur()},$e.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$e.prototype.receivedFocus=function(){this.slowPoll()},$e.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$e.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},$e.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||ur(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(b&&N>=9&&this.hasSelection===i||se&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r=""),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,i.length);l<a&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Dt(t,function(){so(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
||||
`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$e.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$e.prototype.onKeyPress=function(){b&&N>=9&&(this.hasSelection=null),this.fastPoll()},$e.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Tr(n,e),l=r.scroller.scrollTop;if(!o||z)return;var a=n.options.resetSelectionOnContextMenu;a&&n.doc.sel.contains(o)==-1&<(n,pt)(n.doc,pr(o),Ve);var s=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||||
top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px;
|
||||
z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||||
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;_&&(v=i.ownerDocument.defaultView.scrollY),r.input.focus(),_&&i.ownerDocument.defaultView.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=x,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function k(){if(i.selectionStart!=null){var E=n.somethingSelected(),R=""+(E?i.value:"");i.value="⇚",i.value=R,t.prevInput=E?"":"",i.selectionStart=1,i.selectionEnd=R.length,r.selForContextMenu=n.doc.sel}}function x(){if(t.contextMenuPending==x&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&N<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!b||b&&N<9)&&k();var E=0,R=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==""?lt(n,El)(n):E++<10?r.detectingSelectAll=setTimeout(R,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(R,200)}}if(b&&N>=9&&k(),fe){ar(e);var M=function(){dt(window,"mouseup",M),setTimeout(x,20)};ve(window,"mouseup",M)}else setTimeout(x,50)},$e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$e.prototype.setUneditable=function(){},$e.prototype.needsContentAttribute=!1;function Iu(e,t){if(t=t?Te(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=y(xe(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(ve(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(dt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var a=Ge(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function zu(e){e.off=dt,e.on=ve,e.wheelEventPixels=js,e.Doc=kt,e.splitLines=Pt,e.countColumn=Le,e.findColumn=Re,e.isWordChar=ae,e.Pass=qe,e.signal=Ye,e.Line=Hr,e.changeEnd=gr,e.scrollbarModel=al,e.Pos=L,e.cmpPos=Z,e.modes=Pr,e.mimeModes=Ht,e.resolveMode=Ir,e.getMode=zr,e.modeExtensions=fr,e.extendMode=Br,e.copyState=Gt,e.startState=Wr,e.innerMode=sn,e.commands=Nn,e.keyMap=nr,e.keyName=Xl,e.isModifierKey=Ul,e.lookupKey=$r,e.normalizeKeyMap=cu,e.StringStream=Je,e.SharedTextMarker=Fn,e.TextMarker=mr,e.LineWidget=Mn,e.e_preventDefault=ht,e.e_stopPropagation=Nr,e.e_stop=ar,e.addClass=P,e.contains=m,e.rmClass=Ee,e.keyNames=yr}Du(Ge),Eu(Ge);var Bu="iter insert remove copy getEditor constructor".split(" ");for(var gi in kt.prototype)kt.prototype.hasOwnProperty(gi)&&oe(Bu,gi)<0&&(Ge.prototype[gi]=function(e){return function(){return e.apply(this.doc,arguments)}}(kt.prototype[gi]));return Bt(kt),Ge.inputStyles={textarea:$e,contenteditable:je},Ge.defineMode=function(e){!Ge.defaults.mode&&e!="null"&&(Ge.defaults.mode=e),Rt.apply(this,arguments)},Ge.defineMIME=kr,Ge.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ge.defineMIME("text/plain","null"),Ge.defineExtension=function(e,t){Ge.prototype[e]=t},Ge.defineDocExtension=function(e,t){kt.prototype[e]=t},Ge.fromTextArea=Iu,zu(Ge),Ge.version="5.65.18",Ge})}(vi)),vi.exports}var Hu=It();const Ju=Wu(Hu);var pa={exports:{}},ga;function za(){return ga||(ga=1,function(Et,zt){(function(C){C(It())})(function(C){C.defineMode("css",function(fe,H){var Ee=H.inline;H.propertyKeywords||(H=C.resolveMode("text/css"));var D=fe.indentUnit,J=H.tokenHooks,d=H.documentTypes||{},S=H.mediaTypes||{},w=H.mediaFeatures||{},m=H.mediaValueKeywords||{},y=H.propertyKeywords||{},P=H.nonStandardPropertyKeywords||{},le=H.fontProperties||{},p=H.counterDescriptors||{},c=H.colorKeywords||{},Y=H.valueKeywords||{},xe=H.allowNested,j=H.lineComment,ue=H.supportsAtComponent===!0,Te=fe.highlightNonStandardPropertyKeywords!==!1,Le,be;function oe(T,B){return Le=B,T}function Ne(T,B){var F=T.next();if(J[F]){var Ie=J[F](T,B);if(Ie!==!1)return Ie}if(F=="@")return T.eatWhile(/[\w\\\-]/),oe("def",T.current());if(F=="="||(F=="~"||F=="|")&&T.eat("="))return oe(null,"compare");if(F=='"'||F=="'")return B.tokenize=qe(F),B.tokenize(T,B);if(F=="#")return T.eatWhile(/[\w\\\-]/),oe("atom","hash");if(F=="!")return T.match(/^\s*\w*/),oe("keyword","important");if(/\d/.test(F)||F=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),oe("number","unit");if(F==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),oe("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?oe("variable-2","variable-definition"):oe("variable-2","variable");if(T.match(/^\w+-/))return
Line truncated
|
||||
Generated
Vendored
+256
@@ -0,0 +1,256 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-B9MwJ51G.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
|
||||
var p0=Object.defineProperty;var m0=(t,e,n)=>e in t?p0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var be=(t,e,n)=>m0(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function g0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uu={exports:{}},Ti={},fu={exports:{}},he={};/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var kp;function y0(){if(kp)return he;kp=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function k(I,B,ce){this.props=I,this.context=B,this.refs=S,this.updater=ce||x}k.prototype.isReactComponent={},k.prototype.setState=function(I,B){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,B,"setState")},k.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function C(){}C.prototype=k.prototype;function A(I,B,ce){this.props=I,this.context=B,this.refs=S,this.updater=ce||x}var U=A.prototype=new C;U.constructor=A,E(U,k.prototype),U.isPureReactComponent=!0;var R=Array.isArray,D=Object.prototype.hasOwnProperty,z={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function F(I,B,ce){var de,ye={},me=null,ve=null;if(B!=null)for(de in B.ref!==void 0&&(ve=B.ref),B.key!==void 0&&(me=""+B.key),B)D.call(B,de)&&!q.hasOwnProperty(de)&&(ye[de]=B[de]);var _e=arguments.length-2;if(_e===1)ye.children=ce;else if(1<_e){for(var ke=Array(_e),Ne=0;Ne<_e;Ne++)ke[Ne]=arguments[Ne+2];ye.children=ke}if(I&&I.defaultProps)for(de in _e=I.defaultProps,_e)ye[de]===void 0&&(ye[de]=_e[de]);return{$$typeof:t,type:I,key:me,ref:ve,props:ye,_owner:z.current}}function j(I,B){return{$$typeof:t,type:I.type,key:B,ref:I.ref,props:I.props,_owner:I._owner}}function oe(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function ae(I){var B={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(ce){return B[ce]})}var M=/\/+/g;function H(I,B){return typeof I=="object"&&I!==null&&I.key!=null?ae(""+I.key):B.toString(36)}function fe(I,B,ce,de,ye){var me=typeof I;(me==="undefined"||me==="boolean")&&(I=null);var ve=!1;if(I===null)ve=!0;else switch(me){case"string":case"number":ve=!0;break;case"object":switch(I.$$typeof){case t:case e:ve=!0}}if(ve)return ve=I,ye=ye(ve),I=de===""?"."+H(ve,0):de,R(ye)?(ce="",I!=null&&(ce=I.replace(M,"$&/")+"/"),fe(ye,B,ce,"",function(Ne){return Ne})):ye!=null&&(oe(ye)&&(ye=j(ye,ce+(!ye.key||ve&&ve.key===ye.key?"":(""+ye.key).replace(M,"$&/")+"/")+I)),B.push(ye)),1;if(ve=0,de=de===""?".":de+":",R(I))for(var _e=0;_e<I.length;_e++){me=I[_e];var ke=de+H(me,_e);ve+=fe(me,B,ce,ke,ye)}else if(ke=v(I),typeof ke=="function")for(I=ke.call(I),_e=0;!(me=I.next()).done;)me=me.value,ke=de+H(me,_e++),ve+=fe(me,B,ce,ke,ye);else if(me==="object")throw B=String(I),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return ve}function xe(I,B,ce){if(I==null)return I;var de=[],ye=0;return fe(I,de,"","",function(me){return B.call(ce,me,ye++)}),de}function pe(I){if(I._status===-1){var B=I._result;B=B(),B.then(function(ce){(I._status===0||I._status===-1)&&(I._status=1,I._result=ce)},function(ce){(I._status===0||I._status===-1)&&(I._status=2,I._result=ce)}),I._status===-1&&(I._status=0,I._result=B)}if(I._status===1)return I._result.default;throw I._result}var ge={current:null},Q={transition:null},ne={ReactCurrentDispatcher:ge,ReactCurrentBatchConfig:Q,ReactCurrentOwner:z};function J(){throw Error("act(...) is not supported in production builds of React.")}return he.Children={map:xe,forEach:function(I,B,ce){xe(I,function(){B.apply(this,arguments)},ce)},count:function(I){var B=0;return xe(I,function(){B++}),B},toArray:function(I){return xe(I,function(B){return B})||[]},only:function(I){if(!oe(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},he.Component=k,he.Fragment=n,he.Profiler=o,he.PureComponent=A,he.StrictMode=r,he.Suspense=d,he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,he.act=J,he.cloneElement=function(I,B,ce){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var de=E({},I.props),ye=I.key,me=I.ref,ve=I._owner;if(B!=null){if(B.ref!==void 0&&(me=B.ref,ve=z.current),B.key!==void 0&&(ye=""+B.key),I.type&&I.type.defaultProps)var _e=I.type.defaultProps;for(ke in B)D.call(B,ke)&&!q.hasOwnProperty(ke)&&(de[ke]=B[ke]===void 0&&_e!==void 0?_e[ke]:B[ke])}var ke=arguments.length-2;if(ke===1)de.children=ce;else if(1<ke){_e=Array(ke);for(var Ne=0;Ne<ke;Ne++)_e[Ne]=arguments[Ne+2];de.children=_e}return{$$typeof:t,Line truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Tp;function v0(){if(Tp)return Ti;Tp=1;var t=Qu(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(u,d,p){var g,y={},v=null,x=null;p!==void 0&&(v=""+p),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(x=d.ref);for(g in d)r.call(d,g)&&!l.hasOwnProperty(g)&&(y[g]=d[g]);if(u&&u.defaultProps)for(g in d=u.defaultProps,d)y[g]===void 0&&(y[g]=d[g]);return{$$typeof:e,type:u,key:v,ref:x,props:y,_owner:o.current}}return Ti.Fragment=n,Ti.jsx=c,Ti.jsxs=c,Ti}var Cp;function w0(){return Cp||(Cp=1,uu.exports=v0()),uu.exports}var w=w0(),$=Qu();const Mt=g0($);function Bl(t,e,n,r){const[o,l]=Mt.useState(n);return Mt.useEffect(()=>{let c=!1;return t().then(u=>{c||l(u)}),()=>{c=!0}},e),o}function jr(){const t=Mt.useRef(null),[e,n]=Mt.useState(new DOMRect(0,0,10,10));return Mt.useLayoutEffect(()=>{const r=t.current;if(!r)return;const o=r.getBoundingClientRect();n(new DOMRect(0,0,o.width,o.height));const l=new ResizeObserver(c=>{const u=c[c.length-1];u&&u.contentRect&&n(u.contentRect)});return l.observe(r),()=>l.disconnect()},[t]),[e,t]}function pt(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0)+"ms";const e=t/1e3;if(e<60)return e.toFixed(1)+"s";const n=e/60;if(n<60)return n.toFixed(1)+"m";const r=n/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function S0(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0);const e=t/1024;if(e<1e3)return e.toFixed(1)+"K";const n=e/1024;return n<1e3?n.toFixed(1)+"M":(n/1024).toFixed(1)+"G"}function Pm(t,e,n,r,o){let l=0,c=t.length;for(;l<c;){const u=l+c>>1;n(e,t[u])>=0?l=u+1:c=u}return c}function Np(t){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function Nn(t,e){t&&(e=kr.getObject(t,e));const[n,r]=Mt.useState(e),o=Mt.useCallback(l=>{t?kr.setObject(t,l):r(l)},[t,r]);return Mt.useEffect(()=>{if(t){const l=()=>r(kr.getObject(t,e));return kr.onChangeEmitter.addEventListener(t,l),()=>kr.onChangeEmitter.removeEventListener(t,l)}},[e,t]),[n,o]}class x0{constructor(){this.onChangeEmitter=new EventTarget}getString(e,n){return localStorage[e]||n}setString(e,n){var r;localStorage[e]=n,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,n){if(!localStorage[e])return n;try{return JSON.parse(localStorage[e])}catch{return n}}setObject(e,n){var r;localStorage[e]=JSON.stringify(n),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const kr=new x0;function ze(...t){return t.filter(Boolean).join(" ")}function Om(t){t&&(t!=null&&t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t==null||t.scrollIntoView())}const Ap="\\u0000-\\u0020\\u007f-\\u009f",Rm=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Ap+'"]{2,}[^\\s'+Ap+`"')}\\],:;.!?]`,"ug");function _0(){const[t,e]=Mt.useState(!1),n=Mt.useCallback(()=>{const r=[];return e(o=>(r.push(setTimeout(()=>e(!1),1e3)),o?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[t,n]}function Ak(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",r=>{r.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",r=>{document.body.classList.add("inactive")},!1);const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-mode":"light-mode";kr.getString("theme",e)==="dark-mode"&&document.body.classList.add("dark-mode")}const Ju=new Set;function E0(){const t=Mu(),e=t==="dark-mode"?"light-mode":"dark-mode";t&&document.body.classList.remove(t),document.body.classList.add(e),kr.setString("theme",e);for(const n of Ju)n(e)}function Ik(t){Ju.add(t)}function Lk(t){Ju.delete(t)}function Mu(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function k0(){const[t,e]=Mt.useState(Mu()==="dark-mode");return[t,n=>{Mu()==="dark-mode"!==n&&E0(),e(n)}]}var gl={},du={exports:{}},xt={},hu={exports:{}},pu={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Ip;function b0(){return Ip||(Ip=1,function(t){function e(Q,ne){var J=Q.length;Q.push(ne);e:for(;0<J;){var I=J-1>>>1,B=Q[I];if(0<o(B,ne))Q[I]=ne,Q[J]=B,J=I;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ne=Q[0],J=Q.pop();if(J!==ne){Q[0]=J;e:for(var I=0,B=Q.length,ce=B>>>1;I<ce;){var de=2*(I+1)-1,ye=Q[de],me=de+1,ve=Q[me];if(0>o(ye,J))me<B&&0>o(ve,ye)?(Q[I]=ve,Q[me]=J,I=me):(Q[I]=ye,Q[de]=J,I=de);else if(me<B&&0>o(ve,J))Q[I]=ve,Q[me]=J,I=me;else break e}}return ne}function o(Q,ne){var J=Q.sortIndex-ne.sortIndex;return J!==0?J:Q.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var c=Date,u=c.now();t.unstable_now=function(){return c.now()-u}}var d=[],p=[],g=1,y=null,v=3,x=!1,E=!1,S=!1,k=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function U(Q){for(var ne=n(p);ne!==null;){if(ne.callback===null)r(p);else if(ne.startTime<=Q)r(p),ne.sortIndex=ne.expirationTime,e(d,ne);else break;ne=n(p)}}function R(Q){if(S=!1,U(Q),!E)if(n(d)!==null)E=!0,pe(D);else{var ne=n(p);ne!==null&&ge(R,ne.startTime-Q)}}function D(Q,ne){E=!1,S&&(S=!1,C(F),F=-1),x=!0;var J=v;try{for(U(ne),y=n(d);y!==null&&(!(y.expirationTime>ne)||Q&&!ae());){var I=y.callback;if(typeof I=="function"){y.callback=null,v=y.priorityLevel;var B=I(y.expirationTime<=ne);ne=t.unstable_now(),typeof B=="function"?y.callback=B:y===n(d)&&r(d),U(ne)}else r(d);y=n(d)}if(y!==null)var ce=!0;else{var de=n(p);de!==null&&ge(R,de.startTime-ne),ce=!1}return ce}finally{y=null,v=J,x=!1}}var z=!1,q=null,F=-1,j=5,oe=-1;function ae(){return!(t.unstable_now()-oe<j)}function M(){if(q!==null){var Q=t.unstable_now();oe=Q;var ne=!0;try{ne=q(!0,Q)}finally{ne?H():(z=!1,q=null)}}else z=!1}var H;if(typeof A=="function")H=function(){A(M)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,xe=fe.port2;fe.port1.onmessage=M,H=function(){xe.postMessage(null)}}else H=function(){k(M,0)};function pe(Q){q=Q,z||(z=!0,H())}function ge(Q,ne){F=k(function(){Q(t.unstable_now())},ne)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Q){Q.callback=null},t.unstable_continueExecution=function(){E||x||(E=!0,pe(D))},t.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<Q?Math.floor(1e3/Q):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return n(d)},t.unstable_next=function(Q){switch(v){case 1:case 2:case 3:var ne=3;break;default:ne=v}var J=v;v=ne;try{return Q()}finally{v=J}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(Q,ne){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var J=v;v=Q;try{return ne()}finally{v=J}},t.unstable_scheduleCallback=function(Q,ne,J){var I=t.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?I+J:I):J=I,Q){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=J+B,Q={id:g++,callback:ne,priorityLevel:Q,startTime:J,expirationTime:B,sortIndex:-1},J>I?(Q.sortIndex=J,e(p,Q),n(d)===null&&Q===n(p)&&(S?(C(F),F=-1):S=!0,ge(R,J-I))):(Q.sortIndex=B,e(d,Q),E||x||(E=!0,pe(D))),Q},t.unstable_shouldYield=ae,t.unstable_wrapCallback=function(Q){var ne=v;return function(){var J=v;v=ne;try{return Q.apply(this,arguments)}finally{v=J}}}}(pu)),pu}var Lp;function T0(){return Lp||(Lp=1,hu.exports=b0()),hu.exports}/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Mp;function C0(){if(Mp)return xt;Mp=1;var t=Qu(),e=T0();function n(s){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+s,a=1;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+s+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function l(s,i){c(s,i),c(s+"Capture",i)}function c(s,i){for(o[s]=i,s=0;s<i.length;s++)r.add(i[s])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function v(s){return d.call(y,s)?!0:d.call(g,s)?!1:p.test(s)?y[s]=!0:(g[s]=!0,!1)}function x(s,i,a,f){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return f?!1:a!==null?!a.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function E(s,i,a,f){if(i===null||typeof i>"u"||x(s,i,a,f))return!0;if(f)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function S(s,i,a,f,h,m,_){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=f,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=s,this.type=i,this.sanitizeURL=m,this.removeEmptyString=_}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){k[s]=new S(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var i=s[0];k[i]=new S(i,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){k[s]=new S(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){k[s]=new S(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){k[s]=new S(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){k[s]=new S(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){k[s]=new S(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){k[s]=new S(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){k[s]=new S(s,5,!1,s.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function A(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var i=s.replace(C,A);k[i]=new S(i,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var i=s.replace(C,A);k[i]=new S(i,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var i=s.replace(C,A);k[i]=new S(i,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){k[s]=new S(s,1,!1,s.toLowerCase(),null,!1,!1)}),k.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){k[s]=new S(s,1,!1,s.toLowerCase(),null,!0,!0)});function U(s,i,a,f){var h=k.hasOwnProperty(i)?k[i]:null;(h!==null?h.type!==0:f||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=
Line truncated
|
||||
`+I+s}var ce=!1;function de(s,i){if(!s||ce)return"";ce=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(O){var f=O}Reflect.construct(s,[],i)}else{try{i.call()}catch(O){f=O}s.call(i.prototype)}else{try{throw Error()}catch(O){f=O}s()}}catch(O){if(O&&f&&typeof O.stack=="string"){for(var h=O.stack.split(`
|
||||
`),m=f.stack.split(`
|
||||
`),_=h.length-1,b=m.length-1;1<=_&&0<=b&&h[_]!==m[b];)b--;for(;1<=_&&0<=b;_--,b--)if(h[_]!==m[b]){if(_!==1||b!==1)do if(_--,b--,0>b||h[_]!==m[b]){var T=`
|
||||
`+h[_].replace(" at new "," at ");return s.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",s.displayName)),T}while(1<=_&&0<=b);break}}}finally{ce=!1,Error.prepareStackTrace=a}return(s=s?s.displayName||s.name:"")?B(s):""}function ye(s){switch(s.tag){case 5:return B(s.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return s=de(s.type,!1),s;case 11:return s=de(s.type.render,!1),s;case 1:return s=de(s.type,!0),s;default:return""}}function me(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case q:return"Fragment";case z:return"Portal";case j:return"Profiler";case F:return"StrictMode";case H:return"Suspense";case fe:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case ae:return(s.displayName||"Context")+".Consumer";case oe:return(s._context.displayName||"Context")+".Provider";case M:var i=s.render;return s=s.displayName,s||(s=i.displayName||i.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case xe:return i=s.displayName||null,i!==null?i:me(s.type)||"Memo";case pe:i=s._payload,s=s._init;try{return me(s(i))}catch{}}return null}function ve(s){var i=s.type;switch(s.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=i.render,s=s.displayName||s.name||"",i.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(i);case 8:return i===F?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function _e(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ke(s){var i=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Ne(s){var i=ke(s)?"checked":"value",a=Object.getOwnPropertyDescriptor(s.constructor.prototype,i),f=""+s[i];if(!s.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,m=a.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return h.call(this)},set:function(_){f=""+_,m.call(this,_)}}),Object.defineProperty(s,i,{enumerable:a.enumerable}),{getValue:function(){return f},setValue:function(_){f=""+_},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}function sr(s){s._valueTracker||(s._valueTracker=Ne(s))}function no(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var a=i.getValue(),f="";return s&&(f=ke(s)?s.checked?"true":"false":s.value),s=f,s!==a?(i.setValue(s),!0):!1}function $r(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function ir(s,i){var a=i.checked;return J({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??s._wrapperState.initialChecked})}function zs(s,i){var a=i.defaultValue==null?"":i.defaultValue,f=i.checked!=null?i.checked:i.defaultChecked;a=_e(i.value!=null?i.value:a),s._wrapperState={initialChecked:f,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Us(s,i){i=i.checked,i!=null&&U(s,"checked",i,!1)}function rn(s,i){Us(s,i);var a=_e(i.value),f=i.type;if(a!=null)f==="number"?(a===0&&s.value===""||s.value!=a)&&(s.value=""+a):s.value!==""+a&&(s.value=""+a);else if(f==="submit"||f==="reset"){s.removeAttribute("value");return}i.hasOwnProperty("value")?Hs(s,i.type,a):i.hasOwnProperty("defaultValue")&&Hs(s,i.type,_e(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(s.defaultChecked=!!i.defaultChecked)}function ro(s,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var f=i.type;if(!(f!=="submit"&&f!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+s._wrapperState.initialValue,a||i===s.value||(s.value=i),s.defaultValue=i}a=s.name,a!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,a!==""&&(s.name=a)}function Hs(s,i,a){(i!=="number"||$r(s.ownerDocument)!==s)&&(a==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+a&&(s.defaultValue=""+a))}var or=Array.isArray;function In(s,i,a,f){if(s=s.options,i){i={};for(var h=0;h<a.length;h++)i["$"+a[h]]=!0;for(a=0;a<s.length;a++)h=i.hasOwnProperty("$"+s[a].value),s[a].selected!==h&&(s[a].selected=h),h&&f&&(s[a].defaultSelected=!0)}else{for(a=""+_e(a),i=null,h=0;h<s.length;h++){if(s[h].value===a){s[h].selected=!0,f&&(s[h].defaultSelected=!0);return}i!==null||s[h].disabled||(i=s[h])}i!==null&&(i.selected=!0)}}function Dr(s,i){if(i.dangerouslySetInn
Line truncated
|
||||
`).replace(Cw,"")}function Ao(s,i,a){if(i=Hd(i),Hd(s)!==i&&a)throw Error(n(425))}function Io(){}var tc=null,nc=null;function rc(s,i){return s==="textarea"||s==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var sc=typeof setTimeout=="function"?setTimeout:void 0,Nw=typeof clearTimeout=="function"?clearTimeout:void 0,qd=typeof Promise=="function"?Promise:void 0,Aw=typeof queueMicrotask=="function"?queueMicrotask:typeof qd<"u"?function(s){return qd.resolve(null).then(s).catch(Iw)}:sc;function Iw(s){setTimeout(function(){throw s})}function ic(s,i){var a=i,f=0;do{var h=a.nextSibling;if(s.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"){if(f===0){s.removeChild(h),Zs(i);return}f--}else a!=="$"&&a!=="$?"&&a!=="$!"||f++;a=h}while(a);Zs(i)}function Dn(s){for(;s!=null;s=s.nextSibling){var i=s.nodeType;if(i===1||i===3)break;if(i===8){if(i=s.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return s}function Vd(s){s=s.previousSibling;for(var i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="$"||a==="$!"||a==="$?"){if(i===0)return s;i--}else a==="/$"&&i++}s=s.previousSibling}return null}var Gr=Math.random().toString(36).slice(2),on="__reactFiber$"+Gr,ui="__reactProps$"+Gr,pn="__reactContainer$"+Gr,oc="__reactEvents$"+Gr,Lw="__reactListeners$"+Gr,Mw="__reactHandles$"+Gr;function fr(s){var i=s[on];if(i)return i;for(var a=s.parentNode;a;){if(i=a[pn]||a[on]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(s=Vd(s);s!==null;){if(a=s[on])return a;s=Vd(s)}return i}s=a,a=s.parentNode}return null}function fi(s){return s=s[on]||s[pn],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Qr(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function Lo(s){return s[ui]||null}var lc=[],Jr=-1;function Fn(s){return{current:s}}function Ie(s){0>Jr||(s.current=lc[Jr],lc[Jr]=null,Jr--)}function Ce(s,i){Jr++,lc[Jr]=s.current,s.current=i}var Bn={},st=Fn(Bn),gt=Fn(!1),dr=Bn;function Xr(s,i){var a=s.type.contextTypes;if(!a)return Bn;var f=s.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===i)return f.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in a)h[m]=i[m];return f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=h),h}function yt(s){return s=s.childContextTypes,s!=null}function Mo(){Ie(gt),Ie(st)}function Wd(s,i,a){if(st.current!==Bn)throw Error(n(168));Ce(st,i),Ce(gt,a)}function Kd(s,i,a){var f=s.stateNode;if(i=i.childContextTypes,typeof f.getChildContext!="function")return a;f=f.getChildContext();for(var h in f)if(!(h in i))throw Error(n(108,ve(s)||"Unknown",h));return J({},a,f)}function jo(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Bn,dr=st.current,Ce(st,s),Ce(gt,gt.current),!0}function Gd(s,i,a){var f=s.stateNode;if(!f)throw Error(n(169));a?(s=Kd(s,i,dr),f.__reactInternalMemoizedMergedChildContext=s,Ie(gt),Ie(st),Ce(st,s)):Ie(gt),Ce(gt,a)}var mn=null,Po=!1,ac=!1;function Qd(s){mn===null?mn=[s]:mn.push(s)}function jw(s){Po=!0,Qd(s)}function zn(){if(!ac&&mn!==null){ac=!0;var s=0,i=Ee;try{var a=mn;for(Ee=1;s<a.length;s++){var f=a[s];do f=f(!0);while(f!==null)}mn=null,Po=!1}catch(h){throw mn!==null&&(mn=mn.slice(s+1)),Xf(Ia,zn),h}finally{Ee=i,ac=!1}}return null}var Yr=[],Zr=0,Oo=null,Ro=0,jt=[],Pt=0,hr=null,gn=1,yn="";function pr(s,i){Yr[Zr++]=Ro,Yr[Zr++]=Oo,Oo=s,Ro=i}function Jd(s,i,a){jt[Pt++]=gn,jt[Pt++]=yn,jt[Pt++]=hr,hr=s;var f=gn;s=yn;var h=32-Kt(f)-1;f&=~(1<<h),a+=1;var m=32-Kt(i)+h;if(30<m){var _=h-h%5;m=(f&(1<<_)-1).toString(32),f>>=_,h-=_,gn=1<<32-Kt(i)+h|a<<h|f,yn=m+s}else gn=1<<m|a<<h|f,yn=s}function cc(s){s.return!==null&&(pr(s,1),Jd(s,1,0))}function uc(s){for(;s===Oo;)Oo=Yr[--Zr],Yr[Zr]=null,Ro=Yr[--Zr],Yr[Zr]=null;for(;s===hr;)hr=jt[--Pt],jt[Pt]=null,yn=jt[--Pt],jt[Pt]=null,gn=jt[--Pt],jt[Pt]=null}var Nt=null,At=null,Le=!1,Qt=null;function Xd(s,i){var a=Dt(5,null,null,0);a.elementType="DELETED",a.stateNode=i,a.return=s,i=s.deletions,i===null?(s.deletions=[a],s.flags|=16):i.push(a)}function Yd(s,i){switch(s.tag){case 5:var a=s.type;return i=i.nodeType!==1||a.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(s.stateNode=i,Nt=s,At=Dn(i.firstChild),!0):!1;case 6:return i=s.pendingProps===""||i.nodeType!==3?null:i,i!==null?(s.stateNode=i,Nt=s,At=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(a=hr!==null?{id:gn,overflow:yn}:null,s.memoizedState={dehydrated:i,treeContext:a,retryLane:1073741824},a=Dt(18,null,null,0),a.stateNode=i,a.return=s,s.child=a,Nt=s,At=null,!0):!1;default:return!1}}function fc(s){return(s.mode&1)!==0&&(s.flags&128)===0}function dc(s){if(Le){var i=At;if(i){var a=i;if(!Yd(s,i)){if(fc(s))throw Error(n(418));i=Dn(a.nextSibling);var f=Nt;i&&Yd(s,i)?Xd(f,a):(s.flags=s.flags&-4097|2,Le=!1,Nt=s)}}else{if(fc(s))throw Error(n(418));s.flags=s.flags&-4097|2,Le=!1,Nt=s}}}function Zd(s){for(s=s.
Line truncated
|
||||
Error generating stack: `+m.message+`
|
||||
`+m.stack}return{value:s,source:i,stack:h,digest:null}}function Pc(s,i,a){return{value:s,source:null,stack:a??null,digest:i??null}}function Oc(s,i){try{console.error(i.value)}catch(a){setTimeout(function(){throw a})}}var Uw=typeof WeakMap=="function"?WeakMap:Map;function jh(s,i,a){a=wn(-1,a),a.tag=3,a.payload={element:null};var f=i.value;return a.callback=function(){nl||(nl=!0,Jc=f),Oc(s,i)},a}function Ph(s,i,a){a=wn(-1,a),a.tag=3;var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var h=i.value;a.payload=function(){return f(h)},a.callback=function(){Oc(s,i)}}var m=s.stateNode;return m!==null&&typeof m.componentDidCatch=="function"&&(a.callback=function(){Oc(s,i),typeof f!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})}),a}function Oh(s,i,a){var f=s.pingCache;if(f===null){f=s.pingCache=new Uw;var h=new Set;f.set(i,h)}else h=f.get(i),h===void 0&&(h=new Set,f.set(i,h));h.has(a)||(h.add(a),s=n0.bind(null,s,i,a),i.then(s,s))}function Rh(s){do{var i;if((i=s.tag===13)&&(i=s.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return s;s=s.return}while(s!==null);return null}function $h(s,i,a,f,h){return(s.mode&1)===0?(s===i?s.flags|=65536:(s.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(i=wn(-1,1),i.tag=2,Hn(a,i,1))),a.lanes|=1),s):(s.flags|=65536,s.lanes=h,s)}var Hw=R.ReactCurrentOwner,vt=!1;function ut(s,i,a,f){i.child=s===null?rh(i,null,a,f):ts(i,s.child,a,f)}function Dh(s,i,a,f,h){a=a.render;var m=i.ref;return rs(i,h),f=Tc(s,i,a,f,m,h),a=Cc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Le&&a&&cc(i),i.flags|=1,ut(s,i,f,h),i.child)}function Fh(s,i,a,f,h){if(s===null){var m=a.type;return typeof m=="function"&&!ru(m)&&m.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(i.tag=15,i.type=m,Bh(s,i,m,f,h)):(s=al(a.type,null,f,i,i.mode,h),s.ref=i.ref,s.return=i,i.child=s)}if(m=s.child,(s.lanes&h)===0){var _=m.memoizedProps;if(a=a.compare,a=a!==null?a:ii,a(_,f)&&s.ref===i.ref)return Sn(s,i,h)}return i.flags|=1,s=Qn(m,f),s.ref=i.ref,s.return=i,i.child=s}function Bh(s,i,a,f,h){if(s!==null){var m=s.memoizedProps;if(ii(m,f)&&s.ref===i.ref)if(vt=!1,i.pendingProps=f=m,(s.lanes&h)!==0)(s.flags&131072)!==0&&(vt=!0);else return i.lanes=s.lanes,Sn(s,i,h)}return Rc(s,i,a,f,h)}function zh(s,i,a){var f=i.pendingProps,h=f.children,m=s!==null?s.memoizedState:null;if(f.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(ls,It),It|=a;else{if((a&1073741824)===0)return s=m!==null?m.baseLanes|a:a,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:s,cachePool:null,transitions:null},i.updateQueue=null,Ce(ls,It),It|=s,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=m!==null?m.baseLanes:a,Ce(ls,It),It|=f}else m!==null?(f=m.baseLanes|a,i.memoizedState=null):f=a,Ce(ls,It),It|=f;return ut(s,i,h,a),i.child}function Uh(s,i){var a=i.ref;(s===null&&a!==null||s!==null&&s.ref!==a)&&(i.flags|=512,i.flags|=2097152)}function Rc(s,i,a,f,h){var m=yt(a)?dr:st.current;return m=Xr(i,m),rs(i,h),a=Tc(s,i,a,f,m,h),f=Cc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Le&&f&&cc(i),i.flags|=1,ut(s,i,a,h),i.child)}function Hh(s,i,a,f,h){if(yt(a)){var m=!0;jo(i)}else m=!1;if(rs(i,h),i.stateNode===null)Xo(s,i),Lh(i,a,f),jc(i,a,f,h),f=!0;else if(s===null){var _=i.stateNode,b=i.memoizedProps;_.props=b;var T=_.context,O=a.contextType;typeof O=="object"&&O!==null?O=Ot(O):(O=yt(a)?dr:st.current,O=Xr(i,O));var W=a.getDerivedStateFromProps,K=typeof W=="function"||typeof _.getSnapshotBeforeUpdate=="function";K||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(b!==f||T!==O)&&Mh(i,_,f,O),Un=!1;var V=i.memoizedState;_.state=V,Uo(i,f,_,h),T=i.memoizedState,b!==f||V!==T||gt.current||Un?(typeof W=="function"&&(Mc(i,a,W,f),T=i.memoizedState),(b=Un||Ih(i,a,b,f,V,T,O))?(K||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(i.flags|=4194308)):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=T),_.props=f,_.state=T,_.context=O,f=b):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{_=i.stateNode,ih(s,i),b=i.memoizedProps,O=i.type===i.elementType?b:Jt(i.type,b),_.props=O,K=i.pendingProps,V=_.context,T=a.contextType,typeof T=="object"&&T!==null?T=Ot(T):(T=yt(a)?dr:st.current,T=Xr(i,T));var X=a.getDerivedStateFromProps;(W=typeof X=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(b!==K||V!==T)&&Mh(i,_,f,T),Un=!1,V=i.memoizedState,_.state=V,Uo(i,f,_,h
Line truncated
|
||||
`:this.value}}class Ms extends Ue{constructor(){super(...arguments),this.value=""}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}}class Zu extends Ms{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return Xi(this.value)}}class Di extends Ms{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return Xi(this.value)+"("}}class Zm extends Ms{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+Xi(this.value)}}class eg extends Ms{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+Xi(this.value):"#"+sS(this.value)}}class ef extends Ms{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+sg(this.value)+'"'}}class tg extends Ms{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+sg(this.value)+'")'}}class ng extends Ue{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}}class rg extends Ue{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class rS extends Ue{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let n=Xi(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||Ve(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),e+n}}function Xi(t){t=""+t;let e="";const n=t.charCodeAt(0);for(let r=0;r<t.length;r++){const o=t.charCodeAt(r);if(o===0)throw new Xu("Invalid character: the input contains U+0000.");Ve(o,1,31)||o===127||r===0&&Ve(o,48,57)||r===1&&Ve(o,48,57)&&n===45?e+="\\"+o.toString(16)+" ":o>=128||o===45||o===95||Ve(o,48,57)||Ve(o,65,90)||Ve(o,97,122)?e+=t[r]:e+="\\"+t[r]}return e}function sS(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Xu("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||Ve(r,48,57)||Ve(r,65,90)||Ve(r,97,122)?e+=t[n]:e+="\\"+r.toString(16)+" "}return e}function sg(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Xu("Invalid character: the input contains U+0000.");Ve(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+t[n]:e+=t[n]}return e}class Et extends Error{}function iS(t,e){let n;try{n=zm(t),n[n.length-1]instanceof Il||n.push(new Il)}catch(j){const oe=j.message+` while parsing css selector "${t}". Did you mean to CSS.escape it?`,ae=(j.stack||"").indexOf(j.message);throw ae!==-1&&(j.stack=j.stack.substring(0,ae)+oe+j.stack.substring(ae+j.message.length)),j.message=oe,j}const r=n.find(j=>j instanceof Zm||j instanceof Um||j instanceof Al||j instanceof Ym||j instanceof Hm||j instanceof qm||j instanceof Wm||j instanceof Gm||j instanceof Qm||j instanceof tg||j instanceof rg);if(r)throw new Et(`Unsupported token "${r.toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`);let o=0;const l=new Set;function c(){return new Et(`Unexpected token "${n[o].toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`)}function u(){for(;n[o]instanceof Hl;)o++}function d(j=o){return n[j]instanceof Zu}function p(j=o){return n[j]instanceof ef}function g(j=o){return n[j]instanceof ng}function y(j=o){return n[j]instanceof Km}function v(j=o){return n[j]instanceof Xm}function x(j=o){return n[j]instanceof Yu}function E(j=o){return n[j]instanceof Di}function S(j=o){return n[j]instanceof tt&&n[j].value==="*"}function k(j=o){return n[j]instanceof Il}function C(j=o){return n[j]instanceof tt&&[">","+","~"].includes(n[j].value)}function A(j=o){return y(j)||x(j)||k(j)||C(j)||n[j]instanceof Hl}function U(){const j=[R()];for(;u(),!!y();)o++,j.push(R());return j}function R(){return u(),g()||p()?n[o++].value:D()}function D(){const j={simples:[]};for(u(),C()?j.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):j.simples.push(
Line truncated
|
||||
linear-gradient(-45deg, #80808020 25%, transparent 25%),
|
||||
linear-gradient(45deg, transparent 75%, #80808020 75%),
|
||||
linear-gradient(-45deg, transparent 75%, #80808020 75%)`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px",boxShadow:`rgb(0 0 0 / 10%) 0px 1.8px 1.9px,
|
||||
rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
|
||||
rgb(0 0 0 / 10%) 0px -2px 4px,
|
||||
rgb(0 0 0 / 15%) 0px -6.1px 12px,
|
||||
rgb(0 0 0 / 25%) 0px 6px 12px`},PS=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,o]=$.useState(t.diff?"diff":"actual"),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,g]=$.useState("Expected"),[y,v]=$.useState(null),[x,E]=$.useState(null),[S,k]=jr();$.useEffect(()=>{(async()=>{var j,oe,ae,M;d(await mu((j=t.expected)==null?void 0:j.attachment.path)),g(((oe=t.expected)==null?void 0:oe.title)||"Expected"),v(await mu((ae=t.actual)==null?void 0:ae.attachment.path)),E(await mu((M=t.diff)==null?void 0:M.attachment.path))})()},[t]);const C=u&&y&&x,A=C?Math.max(u.naturalWidth,y.naturalWidth,200):500,U=C?Math.max(u.naturalHeight,y.naturalHeight,200):500,R=Math.min(1,(S.width-30)/A),D=Math.min(1,(S.width-50)/A/2),z=A*R,q=U*R,F={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return w.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:k,children:C&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[t.diff&&w.jsx("div",{style:{...F,fontWeight:r==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),w.jsx("div",{style:{...F,fontWeight:r==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),w.jsx("div",{style:{...F,fontWeight:r==="expected"?600:"initial"},onClick:()=>o("expected"),children:p}),w.jsx("div",{style:{...F,fontWeight:r==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),w.jsx("div",{style:{...F,fontWeight:r==="slider"?600:"initial"},onClick:()=>o("slider"),children:"Slider"})]}),w.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:q+60},children:[t.diff&&r==="diff"&&w.jsx(En,{image:x,alt:"Diff",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="actual"&&w.jsx(En,{image:y,alt:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="expected"&&w.jsx(En,{image:u,alt:p,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="slider"&&w.jsx(OS,{expectedImage:u,actualImage:y,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R,expectedTitle:p}),t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:l?x:y,title:l?"Diff":"Actual",onClick:()=>c(!l),hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D})]}),!t.diff&&r==="actual"&&w.jsx(En,{image:y,title:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="expected"&&w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:y,title:"Actual",canvasWidth:D*A,canvasHeight:D*U,scale:D})]})]}),!n&&w.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[w.jsx("div",{children:t.diff&&w.jsx("a",{target:"_blank",href:t.diff.attachment.path,rel:"noreferrer",children:t.diff.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.actual.attachment.path,rel:"noreferrer",children:t.actual.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.expected.attachment.path,rel:"noreferrer",children:t.expected.attachment.name})})]})]})})},OS=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:o,expectedTitle:l,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[d,p]=$.useState(n/2),g=t.naturalWidth===e.naturalWidth&&t.naturalHeight===e.naturalHeight;return w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&w.jsxs("div",{style:{margin:5},children:[!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!g&&w.jsx("span",{children:e.naturalWidth}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!g&&w.jsx("span",{children:e.naturalHeight})]}),w.jsxs("div",{style:{position:"relative",width:n,height:r,margin:15,...Ou},children:[w.jsx(hg,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),w.jsx("img",{alt:l,style:{width:t.naturalWidth*o,height:t.naturalHeight*o},draggable:"false",src:t.src}),w.jsx("div",{style:{...u,bottom:0,overflow:"hidden",width:d,...Ou},children:w.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*o,height:e.naturalHeight*o},draggable:"false",src:e.src})})]})]})},En=({image:t,title:e,alt:n,hideSize:r,canvasWidth:o,canvasHeight:l,scale:c,onClick:u})=>w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&w.jsxs("div",{style:{margin:5},children:[e&&
Line truncated
|
||||
`).length:0;return Math.min(Math.max(5,S),20)*FS},[o]),E=w.jsxs("span",{style:{marginLeft:5},ref:g,"aria-label":t.name,children:[w.jsx("span",{children:pg(t.name)}),v&&w.jsx("a",{style:{marginLeft:5},href:Ml(t),children:"download"})]});return!y||!v?w.jsx("div",{style:{marginLeft:20},children:E}):w.jsxs("div",{className:ze(d&&"yellow-flash"),children:[w.jsx(VS,{title:E,expanded:n,setExpanded:r,expandOnTitleClick:!0,children:c&&w.jsx("i",{children:c})}),n&&o!==null&&w.jsx("div",{className:"vbox",style:{height:x},children:w.jsx(Ns,{text:o,readOnly:!0,mimeType:t.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},GS=({model:t,revealedAttachment:e})=>{const{diffMap:n,screenshots:r,attachments:o}=$.useMemo(()=>{const l=new Set((t==null?void 0:t.visibleAttachments)??[]),c=new Set,u=new Map;for(const d of l){if(!d.path&&!d.sha1)continue;const p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const g=p[1],y=p[2],v=u.get(g)||{expected:void 0,actual:void 0,diff:void 0};v[y]=d,u.set(g,v),l.delete(d)}else d.contentType.startsWith("image/")&&(c.add(d),l.delete(d))}return{diffMap:u,attachments:l,screenshots:c}},[t]);return!n.size&&!r.size&&!o.size?w.jsx(Pr,{text:"No attachments"}):w.jsxs("div",{className:"attachments-tab",children:[[...n.values()].map(({expected:l,actual:c,diff:u})=>w.jsxs(w.Fragment,{children:[l&&c&&w.jsx("div",{className:"attachments-section",children:"Image diff"}),l&&c&&w.jsx(PS,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...l,path:Ml(l)},title:"Expected"},actual:{attachment:{...c,path:Ml(c)}},diff:u?{attachment:{...u,path:Ml(u)}}:void 0}})]})),r.size?w.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((l,c)=>{const u=ia(l);return w.jsxs("div",{className:"attachment-item",children:[w.jsx("div",{children:w.jsx("img",{draggable:"false",src:u})}),w.jsx("div",{children:w.jsx("a",{target:"_blank",href:u,rel:"noreferrer",children:l.name})})]},`screenshot-${c}`)}),o.size?w.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...o.values()].map((l,c)=>w.jsx("div",{className:"attachment-item",children:w.jsx(KS,{attachment:l,reveal:e&&QS(l,e[0])?e:void 0})},JS(l,c)))]})};function QS(t,e){return t.name===e.name&&t.path===e.path&&t.sha1===e.sha1}function ia(t,e={}){const n=new URLSearchParams(e);return t.sha1?(n.set("trace",t.traceUrl),"sha1/"+t.sha1+"?"+n.toString()):(n.set("path",t.path),"file?"+n.toString())}function Ml(t){const e={dn:t.name};return t.contentType&&(e.dct=t.contentType),ia(t,e)}function JS(t,e){return e+"-"+(t.sha1?"sha1-"+t.sha1:"path-"+t.path)}const XS=`
|
||||
# Instructions
|
||||
|
||||
- Following Playwright test failed.
|
||||
- Explain why, be concise, respect Playwright best practices.
|
||||
- Provide a snippet of code with the fix, if possible.
|
||||
`.trimStart();async function YS({testInfo:t,metadata:e,errorContext:n,errors:r,buildCodeFrame:o,stdout:l,stderr:c}){var y;const u=new Set(r.filter(v=>v.message&&!v.message.includes(`
|
||||
`)).map(v=>v.message));for(const v of r)for(const x of u.keys())(y=v.message)!=null&&y.includes(x)&&u.delete(x);const d=r.filter(v=>!(!v.message||!v.message.includes(`
|
||||
`)&&!u.has(v.message)));if(!d.length)return;const p=[XS,"# Test info","",t];l&&p.push("","# Stdout","","```",jl(l),"```"),c&&p.push("","# Stderr","","```",jl(c),"```"),p.push("","# Error details");for(const v of d)p.push("","```",jl(v.message||""),"```");n&&p.push(n);const g=await o(d[d.length-1]);return g&&p.push("","# Test source","","```ts",g,"```"),e!=null&&e.gitDiff&&p.push("","# Local changes","","```diff",e.gitDiff,"```"),p.join(`
|
||||
`)}const ZS=new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))","g");function jl(t){return t.replace(ZS,"")}const e1=sa,t1=({stack:t,setSelectedFrame:e,selectedFrame:n})=>{const r=t||[];return w.jsx(e1,{name:"stack-trace",ariaLabel:"Stack trace",items:r,selectedItem:r[n],render:o=>{const l=o.file[1]===":"?"\\":"/";return w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"stack-trace-frame-function",children:o.function||"(anonymous)"}),w.jsx("span",{className:"stack-trace-frame-location",children:o.file.split(l).pop()}),w.jsx("span",{className:"stack-trace-frame-line",children:":"+o.line})]})},onSelected:o=>e(r.indexOf(o))})},rf=({noShadow:t,children:e,noMinHeight:n,className:r,sidebarBackground:o,onClick:l})=>w.jsx("div",{className:ze("toolbar",t&&"no-shadow",n&&"no-min-height",r,o&&"toolbar-sidebar-background"),onClick:l,children:e});function n1(t,e,n,r,o){return Bl(async()=>{var v,x,E,S;const l=t==null?void 0:t[e],c=l!=null&&l.file?l:o;if(!c)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const u=c.file;let d=n.get(u);d||(d={errors:((v=o==null?void 0:o.source)==null?void 0:v.errors)||[],content:(x=o==null?void 0:o.source)==null?void 0:x.content},n.set(u,d));const p=(c==null?void 0:c.line)||((E=d.errors[0])==null?void 0:E.line)||0,g=r&&u.startsWith(r)?u.substring(r.length+1):u,y=d.errors.map(k=>({type:"error",line:k.line,message:k.message}));if(y.push({line:p,type:"running"}),((S=o==null?void 0:o.source)==null?void 0:S.content)!==void 0)d.content=o.source.content;else if(d.content===void 0||c===o){const k=await mg(u);try{let C=await fetch(`sha1/src@${k}.txt`);C.status===404&&(C=await fetch(`file?path=${encodeURIComponent(u)}`)),C.status>=400?d.content=`<Unable to read "${u}">`:d.content=await C.text()}catch{d.content=`<Unable to read "${u}">`}}return{source:d,highlight:y,targetLine:p,fileName:g,location:c}},[t,e,r,o],{source:{errors:[],content:"Loading…"},highlight:[]})}const r1=({stack:t,sources:e,rootDir:n,fallbackLocation:r,stackFrameLocation:o,onOpenExternally:l})=>{const[c,u]=$.useState(),[d,p]=$.useState(0);$.useEffect(()=>{c!==t&&(u(t),p(0))},[t,c,u,p]);const{source:g,highlight:y,targetLine:v,fileName:x,location:E}=n1(t,d,e,n,r),S=$.useCallback(()=>{E&&(l?l(E):window.location.href=`vscode://file//${E.file}:${E.line}`)},[l,E]),k=((t==null?void 0:t.length)??0)>1,C=s1(x);return w.jsx(Ul,{sidebarSize:200,orientation:o==="bottom"?"vertical":"horizontal",sidebarHidden:!k,main:w.jsxs("div",{className:"vbox","data-testid":"source-code",children:[x&&w.jsxs(rf,{children:[w.jsx("div",{className:"source-tab-file-name",title:x,children:w.jsx("div",{children:C})}),w.jsx(nf,{description:"Copy filename",value:C}),E&&w.jsx(Ht,{icon:"link-external",title:"Open in VS Code",onClick:S})]}),w.jsx(Ns,{text:g.content||"",highlighter:"javascript",highlight:y,revealLine:v,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:w.jsx(t1,{stack:t,selectedFrame:d,setSelectedFrame:p})})};async function mg(t){const e=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-1",e),r=[],o=new DataView(n);for(let l=0;l<o.byteLength;l+=1){const c=o.getUint8(l).toString(16).padStart(2,"0");r.push(c)}return r.join("")}function s1(t){if(!t)return"";const e=t!=null&&t.includes("/")?"/":"\\";return(t==null?void 0:t.split(e).pop())??""}const i1=({prompt:t})=>w.jsx(Ll,{value:t,description:"Copy prompt",copiedDescription:w.jsxs(w.Fragment,{children:["Copied ",w.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function o1(t){return $.useMemo(()=>{if(!t)return{errors:new Map};const e=new Map;for(const n of t.errorDescriptors)e.set(n.message,n);return{errors:e}},[t])}function l1({message:t,error:e,sdkLanguage:n,revealInSource:r}){var u;let o,l;const c=(u=e.stack)==null?void 0:u[0];return c&&(o=c.file.replace(/.*[/\\](.*)/,"$1")+":"+c.line,l=c.file+":"+c.line),w.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[w.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&tf(e.action,{sdkLanguage:n}),o&&w.jsxs("div",{className:"action-location",children:["@ ",w.jsx("span",{title:l,onClick:()=>r(e),children:o})]})]}),w.jsx(MS,{error:t})]})}const a1=({errorsModel:t,model:e,sdkLanguage:n,revealInSource:r,wallTime:o,testRunMetadata:l})=>{const c=Bl(async()=>{const p=e==null?void 0:e.attachments.find(g=>g.name==="error-context");if(p)return await fetch(ia(p)).then(g=>g.text())},[e],void 0),u=$.useCallback(async p=>{var x;const g=(x=p.stack)==null?void 0:x[0];if(!g)return;let y=await fetch(`sha1/src@${await mg(g.file)}.txt`);if(y.status===404&&(y=await fetch(`file?path=${encodeURIComponent(g.file)}`)),y.status>=400)return;const v=await y.text();return c1({source:v,message
Line truncated
|
||||
`)[0]||void 0,location:g,linesAbove:100,linesBelow:100})},[]),d=Bl(()=>YS({testInfo:(e==null?void 0:e.title)??"",metadata:l,errorContext:c,errors:(e==null?void 0:e.errorDescriptors)??[],buildCodeFrame:u}),[c,l,e,u],void 0);return t.errors.size?w.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[w.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:d&&w.jsx(i1,{prompt:d})}),[...t.errors.entries()].map(([p,g])=>{const y=`error-${o}-${p}`;return w.jsx(l1,{message:p,error:g,revealInSource:r,sdkLanguage:n},y)})]}):w.jsx(Pr,{text:"No errors"})};function c1({source:t,message:e,location:n,linesAbove:r,linesBelow:o}){const l=t.split(`
|
||||
`).slice(),c=Math.max(0,n.line-r-1),u=Math.min(l.length,n.line+o),d=l.slice(c,u),p=String(u).length,g=d.map((y,v)=>`${c+v+1===n.line?"> ":" "}${(c+v+1).toString().padEnd(p," ")} | ${y}`);return e&&g.splice(n.line-c,0,`${" ".repeat(p+2)} | ${" ".repeat(n.column-2)} ^ ${e}`),g.join(`
|
||||
`)}const u1=sa;function f1(t,e){const{entries:n}=$.useMemo(()=>{if(!t)return{entries:[]};const o=[];function l(u){var g,y,v,x,E,S;const d=o[o.length-1];d&&((g=u.browserMessage)==null?void 0:g.bodyString)===((y=d.browserMessage)==null?void 0:y.bodyString)&&((v=u.browserMessage)==null?void 0:v.location)===((x=d.browserMessage)==null?void 0:x.location)&&u.browserError===d.browserError&&((E=u.nodeMessage)==null?void 0:E.html)===((S=d.nodeMessage)==null?void 0:S.html)&&u.isError===d.isError&&u.isWarning===d.isWarning&&u.timestamp-d.timestamp<1e3?d.repeat++:o.push({...u,repeat:1})}const c=[...t.events,...t.stdio].sort((u,d)=>{const p="time"in u?u.time:u.timestamp,g="time"in d?d.time:d.timestamp;return p-g});for(const u of c){if(u.type==="console"){const d=u.args&&u.args.length?h1(u.args):gg(u.text),p=u.location.url,y=`${p?p.substring(p.lastIndexOf("/")+1):"<anonymous>"}:${u.location.lineNumber}`;l({browserMessage:{body:d,bodyString:u.text,location:y},isError:u.messageType==="error",isWarning:u.messageType==="warning",timestamp:u.time})}if(u.type==="event"&&u.method==="pageError"&&l({browserError:u.params.error,isError:!0,isWarning:!1,timestamp:u.time}),u.type==="stderr"||u.type==="stdout"){let d="";u.text&&(d=Wi(u.text.trim())||""),u.base64&&(d=Wi(atob(u.base64).trim())||""),l({nodeMessage:{html:d},isError:u.type==="stderr",isWarning:!1,timestamp:u.timestamp})}}return{entries:o}},[t]);return{entries:$.useMemo(()=>e?n.filter(o=>o.timestamp>=e.minimum&&o.timestamp<=e.maximum):n,[n,e])}}const d1=({consoleModel:t,boundaries:e,onEntryHovered:n,onAccepted:r})=>t.entries.length?w.jsx("div",{className:"console-tab",children:w.jsx(u1,{name:"console",onAccepted:r,onHighlighted:n,items:t.entries,isError:o=>o.isError,isWarning:o=>o.isWarning,render:o=>{const l=pt(o.timestamp-e.minimum),c=w.jsx("span",{className:"console-time",children:l}),u=o.isError?"status-error":o.isWarning?"status-warning":"status-none",d=o.browserMessage||o.browserError?w.jsx("span",{className:ze("codicon","codicon-browser",u),title:"Browser message"}):w.jsx("span",{className:ze("codicon","codicon-file",u),title:"Runner message"});let p,g,y,v;const{browserMessage:x,browserError:E,nodeMessage:S}=o;if(x&&(p=x.location,g=x.body),E){const{error:k,value:C}=E;k?(g=k.message,v=k.stack):g=String(C)}return S&&(y=S.html),w.jsxs("div",{className:"console-line",children:[c,d,p&&w.jsx("span",{className:"console-location",children:p}),o.repeat>1&&w.jsx("span",{className:"console-repeat",children:o.repeat}),g&&w.jsx("span",{className:"console-line-message",children:g}),y&&w.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),v&&w.jsx("div",{className:"console-stack",children:v})]})}})}):w.jsx(Pr,{text:"No console entries"});function h1(t){if(t.length===1)return gg(t[0].preview);const e=typeof t[0].value=="string"&&t[0].value.includes("%"),n=e?t[0].value:"",r=e?t.slice(1):t;let o=0;const l=/%([%sdifoOc])/g;let c;const u=[];let d=[];u.push(w.jsx("span",{children:d},u.length+1));let p=0;for(;(c=l.exec(n))!==null;){const g=n.substring(p,c.index);d.push(w.jsx("span",{children:g},d.length+1)),p=c.index+2;const y=c[0][1];if(y==="%")d.push(w.jsx("span",{children:"%"},d.length+1));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const v=r[o++],x={};typeof(v==null?void 0:v.value)!="string"&&(x.color="var(--vscode-debugTokenExpression-number)"),d.push(w.jsx("span",{style:x,children:(v==null?void 0:v.preview)||""},d.length+1))}else if(y==="c"){d=[];const v=r[o++],x=v?p1(v.preview):{};u.push(w.jsx("span",{style:x,children:d},u.length+1))}}for(p<n.length&&d.push(w.jsx("span",{children:n.substring(p)},d.length+1));o<r.length;o++){const g=r[o],y={};d.length&&d.push(w.jsx("span",{children:" "},d.length+1)),typeof(g==null?void 0:g.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(w.jsx("span",{style:y,children:(g==null?void 0:g.preview)||""},d.length+1))}return u}function gg(t){return[w.jsx("span",{dangerouslySetInnerHTML:{__html:Wi(t.trim())}})]}function p1(t){try{const e={},n=t.split(";");for(const r of n){const o=r.trim();if(!o)continue;let[l,c]=o.split(":");if(l=l.trim(),c=c.trim(),!m1(l))continue;const u=l.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[u]=c}return e}catch{return{}}}function m1(t){return["background","border","color","font","line","margin","padding","text"].some(n=>t.startsWith(n))}const Ru=({tabs:t,selectedTab:e,setSelectedTab:n,leftToolbar:r,rightToolbar:o,dataTestId:l,mode:c})=>{const u=$.useId();return e||(e=t[0].id),c||(c="default"),w.jsx("div",{className:"tabbed-pane","data-testid":l,children:w.jsxs("div",{className:"vbox",children:[w.jsxs(rf,{children:[r&&w.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),c==="default"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...t.map(d=>w.jsx(yg,{id:d.id,ariaControls:`${u}-${d.id}`,title:d.title,count:d.count,errorCount:d.errorCount,selecte
Line truncated
|
||||
|
||||
`)+v}function l(y){function v(x){let S=x.charCodeAt(0).toString(16);for(;S.length<4;)S="0"+S;return"\\u"+S}return/[\0-\x1F\x7F-\x9F!]|\'/.test(y)?"$'"+y.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,v)+"'":"'"+y+"'"}const c=e==="win"?o:l;n.push(c(t.request.url).replace(/[[{}\]]/g,"\\$&"));let u="GET";const d=[],p=await vg(t);p&&(d.push("--data-raw "+c(p)),r.add("content-length"),u="POST"),t.request.method!==u&&n.push("-X "+c(t.request.method));const g=t.request.headers;for(let y=0;y<g.length;y++){const v=g[y],x=v.name.replace(/^:/,"");r.has(x.toLowerCase())||(v.value.trim()?n.push("-H "+c(x+": "+v.value)):n.push("-H "+c(x+";")))}return n=n.concat(d),"curl "+n.join(n.length>=3?e==="win"?` ^
|
||||
`:` \\
|
||||
`:" ")}async function y1(t,e=0){const n=new Set(["method","path","scheme","version","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via","user-agent"]),r=new Set(["cookie","authorization"]),o=JSON.stringify(t.request.url),l=t.request.headers,c=l.reduce((E,S)=>{const k=S.name;return!n.has(k.toLowerCase())&&!k.includes(":")&&E.append(k,S.value),E},new Headers),u={};for(const E of c)u[E[0]]=E[1];const d=t.request.cookies.length||l.some(({name:E})=>r.has(E.toLowerCase()))?"include":"omit",p=l.find(({name:E})=>E.toLowerCase()==="referer"),g=p?p.value:void 0,y=await vg(t),v={headers:Object.keys(u).length?u:void 0,referrer:g,body:y,method:t.request.method,mode:"cors"};if(e===1){const E=l.find(k=>k.name.toLowerCase()==="cookie"),S={};delete v.mode,E&&(S.cookie=E.value),g&&(delete v.referrer,S.Referer=g),Object.keys(S).length&&(v.headers={...u,...S})}else v.credentials=d;const x=JSON.stringify(v,null,2);return`fetch(${o}, ${x});`}async function vg(t){var e,n;return(e=t.request.postData)!=null&&e._sha1?await fetch(`sha1/${t.request.postData._sha1}`).then(r=>r.text()):(n=t.request.postData)==null?void 0:n.text}class v1{generatePlaywrightRequestCall(e,n){let r=e.method.toLowerCase();const o=new URL(e.url),l=`${o.origin}${o.pathname}`,c={};["delete","get","head","post","put","patch"].includes(r)||(c.method=r,r="fetch"),o.searchParams.size&&(c.params=Object.fromEntries(o.searchParams.entries())),n&&(c.data=n),e.headers.length&&(c.headers=Object.fromEntries(e.headers.map(p=>[p.name,p.value])));const u=[`'${l}'`];return Object.keys(c).length>0&&u.push(this.prettyPrintObject(c)),`await page.request.${r}(${u.join(", ")});`}prettyPrintObject(e,n=2,r=0){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`[
|
||||
${e.map(g=>`${d}${this.prettyPrintObject(g,n,r+1)}`).join(`,
|
||||
`)}
|
||||
${u}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`{
|
||||
${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1),g=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(u)?u:this.stringLiteral(u);return`${l}${g}: ${p}`}).join(`,
|
||||
`)}
|
||||
${o}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
|
||||
`)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class w1{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),l=[`"${`${r.origin}${r.pathname}`}"`];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(l.push(`method="${c}"`),c="fetch"),r.searchParams.size&&l.push(`params=${this.prettyPrintObject(Object.fromEntries(r.searchParams.entries()))}`),n&&l.push(`data=${this.prettyPrintObject(n)}`),e.headers.length&&l.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const u=l.length===1?l[0]:`
|
||||
${l.map(d=>this.indent(d,2)).join(`,
|
||||
`)}
|
||||
`;return`await page.request.${c}(${u})`}indent(e,n){return e.split(`
|
||||
`).map(r=>" ".repeat(n)+r).join(`
|
||||
`)}prettyPrintObject(e,n=2,r=0){if(e===null||e===void 0)return"None";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"True":"False":String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`[
|
||||
${e.map(g=>`${d}${this.prettyPrintObject(g,n,r+1)}`).join(`,
|
||||
`)}
|
||||
${u}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`{
|
||||
${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1);return`${l}${this.stringLiteral(u)}: ${p}`}).join(`,
|
||||
`)}
|
||||
${o}}`}stringLiteral(e){return JSON.stringify(e)}}class S1{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),o=`${r.origin}${r.pathname}`,l={},c=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(l.Method=u,u="fetch"),r.searchParams.size&&(l.Params=Object.fromEntries(r.searchParams.entries())),n&&(l.Data=n),e.headers.length&&(l.Headers=Object.fromEntries(e.headers.map(g=>[g.name,g.value])));const d=[`"${o}"`];return Object.keys(l).length>0&&d.push(this.prettyPrintObject(l)),`${c.join(`
|
||||
`)}${c.length?`
|
||||
`:""}await request.${this.toFunctionName(u)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,n=2,r=0){if(e===null||e===void 0)return"null";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"true":"false":String(e);if(Array.isArray(e)){if(e.length===0)return"new object[] {}";const u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`new object[] {
|
||||
${e.map(g=>`${d}${this.prettyPrintObject(g,n,r+1)}`).join(`,
|
||||
`)}
|
||||
${u}}`}if(Object.keys(e).length===0)return"new {}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`new() {
|
||||
${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1),g=r===0?u:`[${this.stringLiteral(u)}]`;return`${l}${g} = ${p}`}).join(`,
|
||||
`)}
|
||||
${o}}`}stringLiteral(e){return JSON.stringify(e)}}class x1{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),o=[`"${r.origin}${r.pathname}"`],l=[];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(l.push(`setMethod("${c}")`),c="fetch");for(const[u,d]of r.searchParams)l.push(`setQueryParam(${this.stringLiteral(u)}, ${this.stringLiteral(d)})`);n&&l.push(`setData(${this.stringLiteral(n)})`);for(const u of e.headers)l.push(`setHeader(${this.stringLiteral(u.name)}, ${this.stringLiteral(u.value)})`);return l.length>0&&o.push(`RequestOptions.create()
|
||||
.${l.join(`
|
||||
.`)}
|
||||
`),`request.${c}(${o.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function _1(t){if(t==="javascript")return new v1;if(t==="python")return new w1;if(t==="csharp")return new S1;if(t==="java")return new x1;throw new Error("Unsupported language: "+t)}const E1=({resource:t,sdkLanguage:e,startTimeOffset:n,onClose:r})=>{const[o,l]=$.useState("request"),c=Bl(async()=>{if(t.request.postData){const u=t.request.headers.find(p=>p.name.toLowerCase()==="content-type"),d=u?u.value:"";if(t.request.postData._sha1){const p=await fetch(`sha1/${t.request.postData._sha1}`);return{text:$u(await p.text(),d),mimeType:d}}else return{text:$u(t.request.postData.text,d),mimeType:d}}else return null},[t],null);return w.jsx(Ru,{dataTestId:"network-request-details",leftToolbar:[w.jsx(Ht,{icon:"close",title:"Close",onClick:r},"close")],rightToolbar:[w.jsx(k1,{requestBody:c,resource:t,sdkLanguage:e},"dropdown")],tabs:[{id:"request",title:"Request",render:()=>w.jsx(b1,{resource:t,startTimeOffset:n,requestBody:c})},{id:"response",title:"Response",render:()=>w.jsx(T1,{resource:t})},{id:"body",title:"Body",render:()=>w.jsx(C1,{resource:t})}],selectedTab:o,setSelectedTab:l})},k1=({resource:t,sdkLanguage:e,requestBody:n})=>{const r=w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>_1(e).generatePlaywrightRequestCall(t.request,n==null?void 0:n.text);return w.jsxs("div",{className:"copy-request-dropdown",children:[w.jsxs(Ht,{className:"copy-request-dropdown-toggle",children:[w.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",w.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),w.jsxs("div",{className:"copy-request-dropdown-menu",children:[w.jsx(Ll,{description:"Copy as cURL",copiedDescription:r,value:()=>g1(t)}),w.jsx(Ll,{description:"Copy as Fetch",copiedDescription:r,value:()=>y1(t)}),w.jsx(Ll,{description:"Copy as Playwright",copiedDescription:r,value:o})]})]})},b1=({resource:t,startTimeOffset:e,requestBody:n})=>w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"General"}),w.jsx("div",{className:"network-request-details-url",children:`URL: ${t.request.url}`}),w.jsx("div",{className:"network-request-details-general",children:`Method: ${t.request.method}`}),t.response.status!==-1&&w.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",w.jsx("span",{className:A1(t.response.status),style:{display:"inline-flex"},children:`${t.response.status} ${t.response.statusText}`})]}),t.request.queryString.length?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),w.jsx("div",{className:"network-request-details-headers",children:t.request.queryString.map(r=>`${r.name}: ${r.value}`).join(`
|
||||
`)})]}):null,w.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),w.jsx("div",{className:"network-request-details-headers",children:t.request.headers.map(r=>`${r.name}: ${r.value}`).join(`
|
||||
`)}),w.jsx("div",{className:"network-request-details-header",children:"Time"}),w.jsx("div",{className:"network-request-details-general",children:`Start: ${pt(e)}`}),w.jsx("div",{className:"network-request-details-general",children:`Duration: ${pt(t.time)}`}),n&&w.jsx("div",{className:"network-request-details-header",children:"Request Body"}),n&&w.jsx(Ns,{text:n.text,mimeType:n.mimeType,readOnly:!0,lineNumbers:!0})]}),T1=({resource:t})=>w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),w.jsx("div",{className:"network-request-details-headers",children:t.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
|
||||
`)})]}),C1=({resource:t})=>{const[e,n]=$.useState(null);return $.useEffect(()=>{(async()=>{if(t.response.content._sha1){const o=t.response.content.mimeType.includes("image"),l=t.response.content.mimeType.includes("font"),c=await fetch(`sha1/${t.response.content._sha1}`);if(o){const u=await c.blob(),d=new FileReader,p=new Promise(g=>d.onload=g);d.readAsDataURL(u),n({dataUrl:(await p).target.result})}else if(l){const u=await c.arrayBuffer();n({font:u})}else{const u=$u(await c.text(),t.response.content.mimeType);n({text:u,mimeType:t.response.content.mimeType})}}else n(null)})()},[t]),w.jsxs("div",{className:"network-request-details-tab",children:[!t.response.content._sha1&&w.jsx("div",{children:"Response body is not available for this request."}),e&&e.font&&w.jsx(N1,{font:e.font}),e&&e.dataUrl&&w.jsx("img",{draggable:"false",src:e.dataUrl}),e&&e.text&&w.jsx(Ns,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})]})},N1=({font:t})=>{const[e,n]=$.useState(!1);return $.useEffect(()=>{let r;try{r=new FontFace("font-preview",t),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&n(!0)}catch{n(!0)}return()=>{document.fonts.delete(r)}},[t]),e?w.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):w.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",w.jsx("br",{}),"NOPQRSTUVWXYZ",w.jsx("br",{}),"abcdefghijklm",w.jsx("br",{}),"nopqrstuvwxyz",w.jsx("br",{}),"1234567890"]})};function A1(t){return t<300||t===304?"green-circle":t<400?"yellow-circle":"red-circle"}function $u(t,e){if(t===null)return"Loading...";const n=t;if(n==="")return"<Empty>";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(n),null,2)}catch{return n}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}function I1(t){const[e,n]=$.useState([]);$.useEffect(()=>{const l=[];for(let c=0;c<t.columns.length-1;++c){const u=t.columns[c];l[c]=(l[c-1]||0)+t.columnWidths.get(u)}n(l)},[t.columns,t.columnWidths]);function r(l){const c=new Map(t.columnWidths.entries());for(let u=0;u<l.length;++u){const d=l[u]-(l[u-1]||0),p=t.columns[u];c.set(p,d)}t.setColumnWidths(c)}const o=$.useCallback(l=>{var c,u;(u=t.setSorting)==null||u.call(t,{by:l,negate:((c=t.sorting)==null?void 0:c.by)===l?!t.sorting.negate:!1})},[t]);return w.jsxs("div",{className:`grid-view ${t.name}-grid-view`,children:[w.jsx(hg,{orientation:"horizontal",offsets:e,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),w.jsxs("div",{className:"vbox",children:[w.jsx("div",{className:"grid-view-header",children:t.columns.map((l,c)=>w.jsxs("div",{className:"grid-view-header-cell "+L1(l,t.sorting),style:{width:c<t.columns.length-1?t.columnWidths.get(l):void 0},onClick:()=>t.setSorting&&o(l),children:[w.jsx("span",{className:"grid-view-header-cell-title",children:t.columnTitle(l)}),w.jsx("span",{className:"codicon codicon-triangle-up"}),w.jsx("span",{className:"codicon codicon-triangle-down"})]},t.columnTitle(l)))}),w.jsx(sa,{name:t.name,items:t.items,ariaLabel:t.ariaLabel,id:t.id,render:(l,c)=>w.jsx(w.Fragment,{children:t.columns.map((u,d)=>{const{body:p,title:g}=t.render(l,u,c);return w.jsx("div",{className:`grid-view-cell grid-view-column-${String(u)}`,title:g,style:{width:d<t.columns.length-1?t.columnWidths.get(u):void 0},children:p},t.columnTitle(u))})}),icon:t.icon,isError:t.isError,isWarning:t.isWarning,isInfo:t.isInfo,selectedItem:t.selectedItem,onAccepted:t.onAccepted,onSelected:t.onSelected,onHighlighted:t.onHighlighted,onIconClicked:t.onIconClicked,noItemsMessage:t.noItemsMessage,dataTestId:t.dataTestId,notSelectable:t.notSelectable})]})]})}function L1(t,e){return t===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const M1=["All","Fetch","HTML","JS","CSS","Font","Image"],j1={searchValue:"",resourceType:"All"},P1=({filterState:t,onFilterStateChange:e})=>w.jsxs("div",{className:"network-filters",children:[w.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:t.searchValue,onChange:n=>e({...t,searchValue:n.target.value})}),w.jsx("div",{className:"network-filters-resource-types",children:M1.map(n=>w.jsx("div",{title:n,onClick:()=>e({...t,resourceType:n}),className:`network-filters-resource-type ${t.resourceType===n?"selected":""}`,children:n},n))})]}),O1=I1;function R1(t,e){const n=$.useMemo(()=>((t==null?void 0:t.resources)||[]).filter(c=>e?!!c._monotonicTime&&c._monotonicTime>=e.minimum&&c._monotonicTime<=e.maximum:!0),[t,e]),r=$.useMemo(()=>new U1(t),[t]);return{resources:n,contextIdMap:r}}const $1=({boundaries:t,networkModel:e,onEntryHovered:n,sdkLanguage:r})=>{const[o,l]=$.useState(void 0),[c,u]=$.useState(void 0),[d,p]=$.useState(j1),{renderedEntries:g}=$.useMemo(()=>{const S=e.resources.map(k=>H1(k,t,e.contextIdMap)).filter(G1(d));return o&&V1(S,o),{renderedEntries:S}},[e.resources,e.contextIdMap,d,o,t]),[y,v]=$.useState(()=>new Map(wg().map(S=>[S,F1(S)]))),x=$.useCallback(S=>{p(S),u(void 0)},[]
Line truncated
|
||||
|
||||
`+e.value+`
|
||||
`+" ".repeat(o.pos)+`^
|
||||
`;return r.push({message:l,range:[n.lineCounter.linePos(e.range[0]),n.lineCounter.linePos(e.range[0]+o.pos)]}),null}throw o}}constructor(e,n){this._input=e,this._pos=0,this._length=e.length,this._options=n}_peek(){return this._input[this._pos]||""}_next(){return this._pos<this._length?this._input[this._pos++]:null}_eof(){return this._pos>=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(e){this._eof()&&this._throwError(`Unexpected end of input when expecting ${e}`);const n=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(n,this._pos)}_readString(){let e="",n=!1;for(;!this._eof();){const r=this._next();if(n)e+=r,n=!1;else if(r==="\\")n=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,n=0){throw new Zp(e,n||this._pos)}_readRegex(){let e="",n=!1,r=!1;for(;!this._eof();){const o=this._next();if(n)e+=o,n=!1;else if(o==="\\")n=!0,e+=o;else{if(o==="/"&&!r)return{pattern:e};o==="["?(r=!0,e+=o):o==="]"&&r?(e+=o,r=!1):e+=o}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),Sg(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let n=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),n=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let o="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),n=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)o+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,o||"true",n)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const n=this._readStringOrRegex()||"",r={kind:"role",role:e,name:n};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,n,r,o){if(n==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',o),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',o),e.disabled=r==="true";return}if(n==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',o),e.expanded=r==="true";return}if(n==="active"){this._assert(r==="true"||r==="false",'Value of "active" attribute must be a boolean',o),e.active=r==="true";return}if(n==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',o),e.level=Number(r);return}if(n==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',o),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',o),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${n}]`,o)}_assert(e,n,r){e||this._throwError(n||"Assertion error",r)}}class Zp extends Error{constructor(e,n){super(e),this.pos=n}}let xg={};function J1(t){xg=t}function oa(t,e){for(;e;){if(t.contains(e))return!0;e=Eg(e)}return!1}function at(t){if(t.parentElement)return t.parentElement;if(t.parentNode&&t.parentNode.nodeType===11&&t.parentNode.host)return t.parentNode.host}function _g(t){let e=t;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Eg(t){for(;t.parentElement;)t=t.parentElement;return at(t)}function Pi(t,e,n){for(;t;){const r=t.closest(e);if(n&&r!==n&&(r!=null&&r.contains(n)))return;if(r)return r;t=Eg(t)}}function rr(t,e){return t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,e):void 0}function kg(t,e){if(e=e??rr(t),!e)return!0;if(Element.prototype.checkVisibility&&xg.browserNameForWorkarounds!=="webkit"){if(!t.checkVisibility())return!1}else{const n=t.closest("details,summary");if(n!==t&&(n==null?void 0:n.nodeName)==="DETAILS"&&!n.open)return!1}return e.visibility==="visible"}function Gl(t){const e=rr(t);if(!e)return{visible:!0};if(e.display==="contents"){for(let r=t.firstChild;r;r=r.nextSibling){if(r.nodeType===1&&Zn(r))return{visible:!0,style:e};if(r.nodeType===3&&bg(r))return{visible:!0,style:e}}return{visible:!1,style:e}}if(!kg(t,e))return{style:e,visible:!1};const n=t.getBoundingClientRect();return{rect:n,style:e,visible:n.width>0&&n.height>0}}function Zn(t){return Gl(t).visible}function bg(t){const e=t.ownerDocument.createRange();e.selectNode(t);const n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Ye(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function em(t){return t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")}const tm="article:not([role]), aside:not([role]), main:not([
Line truncated
|
||||
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function rm(t,e){const n=[...t.querySelectorAll(e)];for(const r of js(t,t.getAttribute("aria-owns")))r.matches(e)&&n.push(r),n.push(...r.querySelectorAll(e));return n}function Bi(t,e){const n=e==="::before"?yf:e==="::after"?vf:gf;if(n!=null&&n.has(t))return n==null?void 0:n.get(t);const r=rr(t,e);let o;return r&&r.display!=="none"&&r.visibility!=="hidden"&&(o=nx(t,r.content,!!e)),e&&o!==void 0&&((r==null?void 0:r.display)||"inline")!=="inline"&&(o=" "+o+" "),n&&n.set(t,o),o}function nx(t,e,n){if(!(!e||e==="none"||e==="normal"))try{let r=zm(e).filter(u=>!(u instanceof Hl));const o=r.findIndex(u=>u instanceof tt&&u.value==="/");if(o!==-1)r=r.slice(o+1);else if(!n)return;const l=[];let c=0;for(;c<r.length;)if(r[c]instanceof ef)l.push(r[c].value),c++;else if(c+2<r.length&&r[c]instanceof Di&&r[c].value==="attr"&&r[c+1]instanceof Zu&&r[c+2]instanceof Yu){const u=r[c+1].value;l.push(t.getAttribute(u)||""),c+=3}else return;return l.join("")}catch{}}function Mg(t){const e=t.getAttribute("aria-labelledby");if(e===null)return null;const n=js(t,e);return n.length?n:null}function rx(t,e){const n=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(t),r=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(t);return n||r}function Ki(t,e){const n=e?hf:df;let r=n==null?void 0:n.get(t);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(rt(t)||"")||(r=Fi(tn(t,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),n==null||n.set(t,r)),r}function sm(t,e){const n=e?mf:pf;let r=n==null?void 0:n.get(t);if(r===void 0){if(r="",t.hasAttribute("aria-describedby")){const o=js(t,t.getAttribute("aria-describedby"));r=Fi(o.map(l=>tn(l,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:l,hidden:Bt(l)}})).join(" "))}else t.hasAttribute("aria-description")?r=Fi(t.getAttribute("aria-description")||""):r=Fi(t.getAttribute("title")||"");n==null||n.set(t,r)}return r}function sx(t){const e=t.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function ix(t){if("validity"in t){const e=t.validity;return(e==null?void 0:e.valid)===!1}return!1}function ox(t){const e=ws;let n=ws==null?void 0:ws.get(t);if(n===void 0){n="";const r=sx(t)!=="false",o=ix(t);if(r||o){const l=t.getAttribute("aria-errormessage");n=js(t,l).map(d=>Fi(tn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:Bt(d)}}))).join(" ").trim()}e==null||e.set(t,n)}return n}function tn(t,e){var d,p,g,y;if(e.visitedElements.has(t))return"";const n={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const v=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((p=e.embeddedInDescribedBy)!=null&&p.hidden)||!!((g=e.embeddedInNativeTextAlternative)!=null&&g.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(Ig(t)||!v&&Bt(t))return e.visitedElements.add(t),""}const r=Mg(t);if(!e.embeddedInLabelledBy){const v=(r||[]).map(x=>tn(x,{...e,embeddedInLabelledBy:{element:x,hidden:Bt(x)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(v)return v}const o=rt(t)||"",l=Ye(t);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const v=[...t.labels||[]].includes(t),x=(r||[]).includes(t);if(!v&&!x){if(o==="textbox")return e.visitedElements.add(t),l==="INPUT"||l==="TEXTAREA"?t.value:t.textContent||"";if(["combobox","listbox"].includes(o)){e.visitedElements.add(t);let E;if(l==="SELECT")E=[...t.selectedOptions],!E.length&&t.options.length&&E.push(t.options[0]);else{const S=o==="combobox"?rm(t,"*").find(k=>rt(k)==="listbox"):t;E=S?rm(S,'[aria-selected="true"]').filter(k=>rt(k)==="option"):[]}return!E.length&&l==="INPUT"?t.value:E.map(S=>tn(S,n)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(o))return e.visitedElements.add(t),t.hasAttribute("aria-valuetext")?t.getAttribute("aria-valuetext")||"":t.hasAttribute("aria-valuenow")?t.getAttribute("aria-valuenow")||"":t.getAttribute("value")||"";if(["menu"].includes(o))return e.visitedElements.add(t),""}}const c=t.getAttribute("aria-label")||"";if(kn(c))return e.visitedElements.add(t),c;if(!["presentation","none"].includes(o)){if(l==="INPUT"&&["button","submit","reset"].includes(t.type)){e.visitedElements.add(t);const v=t.value||"";return kn
Line truncated
|
||||
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':t}function Ug(t){return!!(t.length===0||/^\s|\s$/.test(t)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(t)||/^-/.test(t)||/[\n:](\s|$)/.test(t)||/\s#/.test(t)||/[\n\r]/.test(t)||/^[&*\],?!>|@"'#%]/.test(t)||/[{}`]/.test(t)||/^\[/.test(t)||!isNaN(Number(t))||["y","n","yes","no","true","false","on","off","null"].includes(t.toLowerCase()))}let yx=0;function Hg(t){return t.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:t.refPrefix,includeGenericRole:!0,renderActive:!0,renderCursorPointer:!0}:t.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:t.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function zi(t,e){const n=Hg(e),r=new Set,o={root:{role:"fragment",name:"",children:[],element:t,props:{},box:Gl(t),receivesPointerEvents:!0},elements:new Map,refs:new Map},l=(u,d,p)=>{if(r.has(d))return;if(r.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!p)return;const S=d.nodeValue;u.role!=="textbox"&&S&&u.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const g=d,y=!Bt(g);let v=y;if(n.visibility==="ariaOrVisible"&&(v=y||Zn(g)),n.visibility==="ariaAndVisible"&&(v=y&&Zn(g)),n.visibility==="aria"&&!v)return;const x=[];if(g.hasAttribute("aria-owns")){const S=g.getAttribute("aria-owns").split(/\s+/);for(const k of S){const C=t.ownerDocument.getElementById(k);C&&x.push(C)}}const E=v?vx(g,n):null;E&&(E.ref&&(o.elements.set(E.ref,g),o.refs.set(g,E.ref)),u.children.push(E)),c(E||u,g,x,v)};function c(u,d,p,g){var E;const v=(((E=rr(d))==null?void 0:E.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";v&&u.children.push(v),u.children.push(Bi(d,"::before")||"");const x=d.nodeName==="SLOT"?d.assignedNodes():[];if(x.length)for(const S of x)l(u,S,g);else{for(let S=d.firstChild;S;S=S.nextSibling)S.assignedSlot||l(u,S,g);if(d.shadowRoot)for(let S=d.shadowRoot.firstChild;S;S=S.nextSibling)l(u,S,g)}for(const S of p)l(u,S,g);if(u.children.push(Bi(d,"::after")||""),v&&u.children.push(v),u.children.length===1&&u.name===u.children[0]&&(u.children=[]),u.role==="link"&&d.hasAttribute("href")){const S=d.getAttribute("href");u.props.url=S}}Sf();try{l(o.root,t,!0)}finally{xf()}return Sx(o.root),wx(o.root),o}function im(t,e){if(e.refs==="none"||e.refs==="interactable"&&(!t.box.visible||!t.receivesPointerEvents))return;let n;n=t.element._ariaRef,(!n||n.role!==t.role||n.name!==t.name)&&(n={role:t.role,name:t.name,ref:(e.refPrefix??"")+"e"+ ++yx},t.element._ariaRef=n),t.ref=n.ref}function vx(t,e){const n=t.ownerDocument.activeElement===t;if(t.nodeName==="IFRAME"){const d={role:"iframe",name:"",children:[],props:{},element:t,box:Gl(t),receivesPointerEvents:!0,active:n};return im(d,e),d}const r=e.includeGenericRole?"generic":null,o=rt(t)??r;if(!o||o==="presentation"||o==="none")return null;const l=mt(Ki(t,!1)||""),c=px(t),u={role:o,name:l,children:[],props:{},element:t,box:Gl(t),receivesPointerEvents:c,active:n};return im(u,e),lf.includes(o)&&(u.checked=Pg(t)),Dg.includes(o)&&(u.disabled=Jl(t)),uf.includes(o)&&(u.expanded=Rg(t)),ff.includes(o)&&(u.level=$g(t)),cf.includes(o)&&(u.pressed=Og(t)),of.includes(o)&&(u.selected=jg(t)),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.type!=="checkbox"&&t.type!=="radio"&&t.type!=="file"&&(u.children=[t.value]),u}function wx(t){const e=n=>{const r=[];for(const l of n.children||[]){if(typeof l=="string"){r.push(l);continue}const c=e(l);r.push(...c)}return n.role==="generic"&&r.length<=1&&r.every(l=>typeof l!="string"&&!!l.ref)?r:(n.children=r,[n])};e(t)}function Sx(t){const e=(r,o)=>{if(!r.length)return;const l=mt(r.join(""));l&&o.push(l),r.length=0},n=r=>{const o=[],l=[];for(const c of r.children||[])typeof c=="string"?l.push(c):(e(l,o),n(c),o.push(c));e(l,o),r.children=o.length?o:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};n(t)}function _f(t,e){return e?t?typeof e=="string"?t===e:!!t.match(new RegExp(e.pattern)):!1:!0}function xx(t,e){return _f(t,e.text)}function _x(t,e){return _f(t,e.name)}function Ex(t,e){const n=zi(t,{mode:"expect"});return{matches:qg(n.root,e,!1,!1),received:{raw:Xl(n,{mode:"expect"}),regex:Xl(n,{mode:"codegen"})}}}function kx(t,e){const n=zi(t,{mode:"expect"}).root;return qg(n,e,!0,!1).map(o=>o.element)}function Ef(t,e,n){var r;return typeof t=="string"&&e.kind==="text"?xx(t,e):t===null||typeof t!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==t.role||e.checked!==void 0&&e.checked!==t.checked||e.disabled!==void 0&&e.disabled!==t.disabled||e.expanded!==void 0&&e.expanded!==t.expanded||e.level!==void 0&&e.level!==t.level||e.pressed!==void 0&&e.pressed!==t.pressed||e.selected!==void 0&&e.selected!==t.selected||!_x(t.name,e)||!_f(t.props.url,(r=e.props)==null?void 0:r.url)?!1:e.containerMode==="contain"?lm(t.children||[],e.children||[]):e.containerMode==="equal"?om(t.children||[],e.childrLine truncated
|
||||
`)}function bx(t){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let n="",r=0;const o=new RegExp(e.map(l=>"("+l.regex.source+")").join("|"),"g");return t.replace(o,(l,...c)=>{const u=c[c.length-2],d=c.slice(0,-2);n+=Vl(t.slice(r,u));for(let p=0;p<d.length;p++)if(d[p]){const{replacement:g}=e[p];n+=g;break}return r=u+l.length,l}),n?(n+=Vl(t.slice(r)),String(new RegExp(n))):t}function Tx(t,e){if(!e.length)return!1;if(!t.name)return!0;if(t.name.length>e.length)return!1;const n=e.length<=200&&t.name.length<=200?dS(e,t.name):"";let r=e;for(;n&&r.includes(n);)r=r.replace(n,"");return r.trim().length/e.length>.1}function Cx(t){var e;return((e=t.box.style)==null?void 0:e.cursor)==="pointer"}const am=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-line.selectable:hover{background-color:#f2f2f2;overflow:hidden}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;width:400px;height:150px;z-index:10;font-size:13px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}";class wu{constructor(e){
Line truncated
|
||||
${t.stack}`,{e:{n:t.name,m:t.message,s:c}}}if(M_(t))return{d:t.toJSON()};if(j_(t))return{u:t.toJSON()};if(L_(t))return{r:{p:t.source,f:t.flags}};for(const[c,u]of Object.entries(py))if(O_(t,u))return{ta:{b:R_(t),k:c}};const o=n.visited.get(t);if(o)return{ref:o};if(Array.isArray(t)){const c=[],u=++n.lastId;n.visited.set(t,u);for(let d=0;d<t.length;++d)c.push(Bu(t[d],e,n));return{a:c,id:u}}if(typeof t=="object"){const c=[],u=++n.lastId;n.visited.set(t,u);for(const p of Object.keys(t)){let g;try{g=t[p]}catch{continue}p==="toJSON"&&typeof g=="function"?c.push({k:p,v:{o:[],id:0}}):c.push({k:p,v:Bu(g,e,n)})}let d;try{c.length===0&&t.toJSON&&typeof t.toJSON=="function"&&(d={value:t.toJSON()})}catch{}return d?my(d.value,e,n):{o:c,id:u}}}class F_{constructor(e,n){var r,o,l,c,u,d,p,g;this.global=e,this.isUnderTest=n,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(r=e.setTimeout)==null?void 0:r.bind(e),clearTimeout:(o=e.clearTimeout)==null?void 0:o.bind(e),setInterval:(l=e.setInterval)==null?void 0:l.bind(e),clearInterval:(c=e.clearInterval)==null?void 0:c.bind(e),requestAnimationFrame:(u=e.requestAnimationFrame)==null?void 0:u.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(p=e.requestIdleCallback)==null?void 0:p.bind(e),cancelIdleCallback:(g=e.cancelIdleCallback)==null?void 0:g.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,n,r,o,...l){const c=l.slice(0,o),u=l.slice(o),d=[];for(let g=0;g<c.length;g++)d[g]=Fu(c[g],u);let p=this.global.eval(r);return e===!0?p=p(...d):e===!1?p=p:typeof p=="function"&&(p=p(...d)),n?this._promiseAwareJsonValueNoThrow(p):p}jsonValue(e,n){if(n!==void 0)return D_(n,r=>({fallThrough:r}))}_promiseAwareJsonValueNoThrow(e){const n=r=>{try{return this.jsonValue(!0,r)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const r=await e;return n(r)})():n(e)}}class gy{constructor(e,n){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Lr,cacheNormalizedWhitespaces:uS,elementText:Tt,getAriaRole:rt,getElementAccessibleDescription:sm,getElementAccessibleName:Ki,isElementVisible:Zn,isInsideScope:oa,normalizeWhiteSpace:mt,parseAriaSnapshot:sf,generateAriaTree:zi,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=n.isUnderTest,this.utils.builtins=new F_(e,n.isUnderTest).builtins,this._sdkLanguage=n.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=n.testIdAttributeName,this._evaluator=new zx,this.consoleApi=new I_(this),this.onGlobalListenersRemoved=new Set,this._autoClosingTags=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),this._booleanAttributes=new Set(["checked","selected","disabled","readonly","multiple"]),this._eventTypes=new Map([["auxclick","mouse"],["click","mouse"],["dblclick","mouse"],["mousedown","mouse"],["mouseeenter","mouse"],["mouseleave","mouse"],["mousemove","mouse"],["mouseout","mouse"],["mouseover","mouse"],["mouseup","mouse"],["mouseleave","mouse"],["mousewheel","mouse"],["keydown","keyboard"],["keyup","keyboard"],["keypress","keyboard"],["textInput","keyboard"],["touchstart","touch"],["touchmove","touch"],["touchend","touch"],["touchcancel","touch"],["pointerover","pointer"],["pointerout","pointer"],["pointerenter","pointer"],["pointerleave","pointer"],["pointerdown","pointer"],["pointerup","pointer"],["pointermove","pointer"],["pointercancel","pointer"],["gotpointercapture","pointer"],["lostpointercapture","pointer"],["focus","focus"],["blur","focus"],["drag","drag"],["dragstart","drag"],["dragend","drag"],["dragover","drag"],["dragenter","drag"],["dragleave","drag"],["dragexit","drag"],["drop","drag"],["wheel","wheel"],["deviceorientation","deviceorientation"],["deviceorientationabsolute","deviceorientation"],["devicemotion","devicemotion"]]),this._hoverHitTargetInterceptorEvents=new Set(["mousemove"]),this._tapHitTargetInterceptorEvents=new Set(["pointerdown","pointerup","touchstart","touchend","touchcancel"]),this._mouseHitTargetInterceptorEvents=new Set(["mousedown","mouseup","pointerdown","pointerup","click","auxclick","dblclick","contextmenu"]),this._allHitTargetInterceptorEvents=new Set([...this._hoverHitTargetInterceptorEvents,...this._tapHitTargetInterceptorEvents,...this._mouseHitTargetInterceptorEvents]),this._engines=new Map,this._engines.set("xpath",gm),this._engines.set("xpath:light",gm),this._engines.set("_react",Dx()),this._engines.set("_vue",S_()),this._engines.set("role",um(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-t
Line truncated
|
||||
(() => {
|
||||
const module = {};
|
||||
${e}
|
||||
return module.exports.default();
|
||||
})()`);return new r(this,n)}async viewportRatio(e){return await new Promise(n=>{const r=new IntersectionObserver(o=>{n(o[0].intersectionRatio),r.disconnect()});r.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const n=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(n.borderLeftWidth||"",10),top:parseInt(n.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const n=e.ownerDocument.defaultView;for(let o=e;o;o=at(o))if(n.getComputedStyle(o).transform!=="none")return"transformed";const r=n.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,n){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(n==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(n==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),n==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const o=r.closest("label");o&&o.control&&(r=o.control)}return r}async checkElementStates(e,n){if(n.includes("stable")){const r=await this._checkElementIsStable(e);if(r===!1)return{missingState:"stable"};if(r==="error:notconnected")return"error:notconnected"}for(const r of n)if(r!=="stable"){const o=this.elementState(e,r);if(o.received==="error:notconnected")return"error:notconnected";if(!o.matches)return{missingState:r}}}async _checkElementIsStable(e){const n=Symbol("continuePolling");let r,o=0,l=0;const c=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const v=this.utils.builtins.performance.now();if(this._stableRafCount>1&&v-l<15)return n;l=v;const x=y.getBoundingClientRect(),E={x:x.top,y:x.left,width:x.width,height:x.height};if(r){if(!(E.x===r.x&&E.y===r.y&&E.width===r.width&&E.height===r.height))return!1;if(++o>=this._stableRafCount)return!0}return r=E,n};let u,d;const p=new Promise((y,v)=>{u=y,d=v}),g=()=>{try{const y=c();y!==n?u(y):this.utils.builtins.requestAnimationFrame(g)}catch(y){d(y)}};return this.utils.builtins.requestAnimationFrame(g),p}_createAriaRefEngine(){return{queryAll:(n,r)=>{var l,c;const o=(c=(l=this._lastAriaSnapshot)==null?void 0:l.elements)==null?void 0:c.get(r);return o&&o.isConnected?[o]:[]}}}elementState(e,n){const r=this.retarget(e,["visible","hidden"].includes(n)?"none":"follow-label");if(!r||!r.isConnected)return n==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(n==="visible"||n==="hidden"){const o=Zn(r);return{matches:n==="visible"?o:!o,received:o?"visible":"hidden"}}if(n==="disabled"||n==="enabled"){const o=Jl(r);return{matches:n==="disabled"?o:!o,received:o?"disabled":"enabled"}}if(n==="editable"){const o=Jl(r),l=fx(r);if(l==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!o&&!l,received:o?"disabled":l?"readOnly":"editable"}}if(n==="checked"||n==="unchecked"){const o=n==="checked",l=cx(r);if(l==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:o===l,received:l?"checked":"unchecked"}}if(n==="indeterminate"){const o=ax(r);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:o==="mixed",received:o===!0?"checked":o===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${n}"`)}selectOptions(e,n){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const o=r,l=[...o.options],c=[];let u=n.slice();for(let d=0;d<l.length;d++){const p=l[d],g=y=>{if(y instanceof Node)return p===y;let v=!0;return y.valueOrLabel!==void 0&&(v=v&&(y.valueOrLabel===p.value||y.valueOrLabel===p.label)),y.value!==void 0&&(v=v&&y.value===p.value),y.label!==void 0&&(v=v&&y.label===p.label),y.index!==void 0&&(v=v&&y.index===d),v};if(u.some(g)){if(!this.elementState(p,"enabled").matches)return"error:optionnotenabled";if(c.push(p),o.multiple)u=u.filter(y=>!g(y));else{u=[];break}}}return u.length?"error:optionsnotfound":(o.value=void 0,c.forEach(d=>d.selected=!0),o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0})),c.map(d=>d.value))}fill(e,n){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()==="input"){const o=r,l=o.type.toLowerCase(),c=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","
Line truncated
|
||||
${c+1}) ${l.preview} aka ${Lr(this._sdkLanguage,l.selector)}`);return r.length<n.length&&o.push(`
|
||||
...`),this.createStacklessError(`strict mode violation: ${Lr(this._sdkLanguage,Tn(e))} resolved to ${n.length} elements:${o.join("")}
|
||||
`)}createStacklessError(e){if(this._browserName==="firefox"){const r=new Error("Error: "+e);return r.stack="",r}const n=new Error(e);return delete n.stack,n}createHighlight(){return new wu(this)}maskSelectors(e,n){this._highlight&&this.hideHighlight(),this._highlight=new wu(this),this._highlight.install();const r=[];for(const o of e)r.push(this.querySelectorAll(o,this.document.documentElement));this._highlight.maskElements(r.flat(),n)}highlight(e){this._highlight||(this._highlight=new wu(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,n){var c,u;((c=this._markedElements)==null?void 0:c.callId)!==n&&(this._markedElements=void 0);const r=((u=this._markedElements)==null?void 0:u.elements)||new Set,o=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const d of r)e.has(d)||d.dispatchEvent(o);const l=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const d of e)r.has(d)||d.dispatchEvent(l);this._markedElements={callId:n,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let n=!1;const r=()=>n=!0;this.window.addEventListener(e,r),new MutationObserver(o=>{if(o.some(c=>Array.from(c.addedNodes).includes(this.document.documentElement))&&(n=!1,this.window.dispatchEvent(new CustomEvent(e)),!n)){this.window.addEventListener(e,r);for(const c of this.onGlobalListenersRemoved)c()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=r=>{var o;return(o=this._hitTargetInterceptor)==null?void 0:o.call(this,r)},n=()=>{for(const r of this._allHitTargetInterceptorEvents)this.window.addEventListener(r,e,{capture:!0,passive:!1})};n(),this.onGlobalListenersRemoved.add(n)}async expect(e,n,r){var l,c;if(n.expression==="to.have.count"||n.expression.endsWith(".array"))return this.expectArray(r,n);if(!e){if(!n.isNot&&n.expression==="to.be.hidden")return{matches:!0};if(n.isNot&&n.expression==="to.be.visible")return{matches:!1};if(!n.isNot&&n.expression==="to.be.detached")return{matches:!0};if(n.isNot&&n.expression==="to.be.attached")return{matches:!1};if(n.isNot&&n.expression==="to.be.in.viewport")return{matches:!1};if(n.expression==="to.have.title"&&((l=n==null?void 0:n.expectedText)!=null&&l[0])){const u=new hs(n.expectedText[0]),d=this.document.title;return{received:d,matches:u.matches(d)}}if(n.expression==="to.have.url"&&((c=n==null?void 0:n.expectedText)!=null&&c[0])){const u=new hs(n.expectedText[0]),d=this.document.location.href;return{received:d,matches:u.matches(d)}}return{matches:n.isNot,missingReceived:!0}}return await this.expectSingleElement(e,n)}async expectSingleElement(e,n){var o;const r=n.expression;{let l;if(r==="to.have.attribute"){const c=e.hasAttribute(n.expressionArg);l={matches:c,received:c?"attribute present":"attribute not present"}}else if(r==="to.be.checked"){const{checked:c,indeterminate:u}=n.expectedValue;if(u){if(c!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");l=this.elementState(e,"indeterminate")}else l=this.elementState(e,c===!1?"unchecked":"checked")}else if(r==="to.be.disabled")l=this.elementState(e,"disabled");else if(r==="to.be.editable")l=this.elementState(e,"editable");else if(r==="to.be.readonly")l=this.elementState(e,"editable"),l.matches=!l.matches;else if(r==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e.value;l={matches:!c,received:c?"notEmpty":"empty"}}else{const c=(o=e.textContent)==null?void 0:o.trim();l={matches:!c,received:c?"notEmpty":"empty"}}else if(r==="to.be.enabled")l=this.elementState(e,"enabled");else if(r==="to.be.focused"){const c=this._activelyFocused(e).isFocused;l={matches:c,received:c?"focused":"inactive"}}else r==="to.be.hidden"?l=this.elementState(e,"hidden"):r==="to.be.visible"?l=this.elementState(e,"visible"):r==="to.be.attached"?l={matches:!0,received:"attached"}:r==="to.be.detached"&&(l={matches:!1,received:"attached"});if(l){if(l.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return l}}if(r==="to.have.property"){let l=e;const c=n.expressionArg.split(".");for(let p=0;p<c.length-1;p++){if(typeof l!="object"||!(c[p]in l))return{received:void 0,matches:!1};l=l[c[p]]}const u=l[c[c.length-1]],d=zu(u,n.expectedValue);return{received:u,matches:d}}if(r==="to.be.in.viewport"){const l=await this.viewportRatio(e);return{received:`viewport ratio ${l}`,matches:l>0&&l>(n.expectedNumber??0)-1e-9}}if(r==="to.have.values"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="SELECT"||!e.multiple)throw this.createStacklessError("Not a select element with a multiple attribute");const l=[...e.selectedOptions].map(c=>c.value);return l.length!==n.expectedText.length?{received:l,matches:!1}:{received:l,matches:l.map((c,u)=>new hs(n.expectedText[u]).matches(c)).every(Boolean
Line truncated
|
||||
body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
|
||||
body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
|
||||
`),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var r,o,l;yy(this._listeners),this._listeners=[Me(this.document,"click",c=>this._onClick(c),!0),Me(this.document,"auxclick",c=>this._onClick(c),!0),Me(this.document,"dblclick",c=>this._onDblClick(c),!0),Me(this.document,"contextmenu",c=>this._onContextMenu(c),!0),Me(this.document,"dragstart",c=>this._onDragStart(c),!0),Me(this.document,"input",c=>this._onInput(c),!0),Me(this.document,"keydown",c=>this._onKeyDown(c),!0),Me(this.document,"keyup",c=>this._onKeyUp(c),!0),Me(this.document,"pointerdown",c=>this._onPointerDown(c),!0),Me(this.document,"pointerup",c=>this._onPointerUp(c),!0),Me(this.document,"mousedown",c=>this._onMouseDown(c),!0),Me(this.document,"mouseup",c=>this._onMouseUp(c),!0),Me(this.document,"mousemove",c=>this._onMouseMove(c),!0),Me(this.document,"mouseleave",c=>this._onMouseLeave(c),!0),Me(this.document,"mouseenter",c=>this._onMouseEnter(c),!0),Me(this.document,"focus",c=>this._onFocus(c),!0),Me(this.document,"scroll",c=>this._onScroll(c),!0)],this.highlight.install();let e;const n=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(n,500)};e=this.injectedScript.utils.builtins.setTimeout(n,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(vy(this.document,z_)),(r=this.overlay)==null||r.install(),(l=(o=this._currentTool)==null?void 0:o.install)==null||l.call(o),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var r,o,l,c,u,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(o=(r=this._currentTool).uninstall)==null||o.call(r),this.clearHighlight(),this._currentTool=e,(c=(l=this._currentTool).install)==null||c.call(l);const n=(u=e.cursor)==null?void 0:u.call(e);n&&((d=this.injectedScript.document.body)==null||d.setAttribute("data-pw-cursor",n))}setUIState(e,n){var l;this._delegate=n,e.actionPoint&&this.state.actionPoint&&e.actionPoint.x===this.state.actionPoint.x&&e.actionPoint.y===this.state.actionPoint.y||!e.actionPoint&&!this.state.actionPoint||(e.actionPoint?this.highlight.showActionPoint(e.actionPoint.x,e.actionPoint.y):this.highlight.hideActionPoint()),this.state=e,this.highlight.setLanguage(e.language),this._switchCurrentTool(),(l=this.overlay)==null||l.setUIState(e);let r="noop";if(e.actionSelector!==this._lastHighlightedSelector){const c=e.actionSelector?G_(this.injectedScript,e.language,e.actionSelector,this.document):null;r=c!=null&&c.length?c:"clear",this._lastHighlightedSelector=c!=null&&c.length?e.actionSelector:void 0}const o=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==o){const c=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(c.length){const u=c.length>1?zt.multiple:zt.single;r=c.map(d=>({element:d,color:u})),this._lastHighlightedAriaTemplateJSON=o}else this._lastHighlightedSelector||(r="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}r==="clear"?this.highlight.clearHighlight():r!=="noop"&&this.highlight.updateHighlight(r)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onClick(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onClick)==null||o.call(r,e))}_onDblClick(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onDblClick(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onDblClick)==null||o.call(r,e))}_onContextMenu(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onContextMenu)==null||r.call(n,e))}_onDragStart(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onDragStart)==null||r.call(n,e))}_onPointerDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerDown)==null||r.call(n,e))}_onPointerUp(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerUp)==null||r.call(n,e))}_onMouseDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseDown)==null||r.call(n,e))}_onMouseUp(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseUp(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onMouseUp)==null||o.call(r,e))}_onMouseMove(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseMove(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onMouseMove)==null||o.call(r,e))}_onMouseEnter(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseEnter)==null||r.call(n,e))}_onMouseLeave(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseLeave)==null||r.call(n,e))}_onFocus(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onFocus)==null||r.call(n,e))}_onScroll(e){var n,r;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._l
Line truncated
|
||||
`:t[l]==="r"?d+="\r":t[l]==="t"?d+=" ":d+=t[l]),++l;continue}if(t[l]!==c){d+=t[l++];continue}break}n.push({quote:c,text:d}),r+=(c==="/"?"r":"")+"$"+n.length}r=r.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",").replace(/,\)/g,")");const o=n.map(l=>l.quote).filter(l=>"'\"`".includes(l))[0];return{selector:wy(r,n,e),preferredQuote:o}}function vm(t){return[...t.matchAll(/\$\d+/g)].length}function wm(t,e){return t.replace(/\$(\d+)/g,(n,r)=>`$${r-e}`)}function wy(t,e,n){for(;;){const o=t.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!o)break;const l=o.index+o[0].length;let c=0,u=l;for(;u<t.length&&(t[u]==="("?c++:t[u]===")"&&c--,!(c<0));u++);let d=t.substring(0,l),p=0;["sethas(","sethasnot("].includes(o[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const g=vm(t.substring(0,l)),y=wm(t.substring(l,u),g),v=vm(y),x=e.slice(g,g+v),E=JSON.stringify(wy(y,x,n));t=d.replace(/=$/,"2=")+`$${g+1}`+wm(t.substring(u+p),v-1);const S=e.slice(0,g),k=e.slice(g+v);e=S.concat([{quote:'"',text:E}]).concat(k)}t=t.replace(/\,set([\w]+)\(([^)]+)\)/g,(o,l,c)=>","+l.toLowerCase()+"="+c.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${n}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?visible=true\)/g,"visible=true").replace(/filter\(,?visible=false\)/g,"visible=false").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const r=t.split(".");for(let o=0;o<r.length-1;o++)if(r[o]==="internal:control=enter-frame"&&r[o+1].startsWith("nth=")){const[l]=r.splice(o,1);r.splice(o+1,0,l)}return r.map(o=>!o.startsWith("internal:")||o==="internal:control"?o.replace(/\$(\d+)/g,(l,c)=>e[+c-1].text):(o=o.includes("[")?o.replace(/\]/,"")+"]":o,o=o.replace(/(?:r)\$(\d+)(i)?/g,(l,c,u)=>{const d=e[+c-1];return o.startsWith("internal:attr")||o.startsWith("internal:testid")||o.startsWith("internal:role")?ht(new RegExp(d.text),!1)+(u||""):kt(new RegExp(d.text,u),!1)}).replace(/\$(\d+)(i|s)?/g,(l,c,u)=>{const d=e[+c-1];return o.startsWith("internal:has=")||o.startsWith("internal:has-not=")?d.text:o.startsWith("internal:testid")?ht(d.text,!0):o.startsWith("internal:attr")||o.startsWith("internal:role")?ht(d.text,u==="s"):kt(d.text,u==="s")}),o)).join(" >> ")}function Y_(t,e,n){try{return Z_(t,e,n)}catch{return""}}function Z_(t,e,n){try{return Yi(e),e}catch{}const{selector:r,preferredQuote:o}=X_(e,n),l=ag(t,r,void 0,void 0,o),c=Sm(t,e);return l.some(u=>Sm(t,u)===c)?r:""}function Sm(t,e){return e=e.replace(/\s/g,""),t==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const eE=({url:t})=>w.jsxs("div",{className:"browser-frame-header",children:[w.jsxs("div",{style:{whiteSpace:"nowrap"},children:[w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),w.jsxs("div",{className:"browser-frame-address-bar",title:t||"about:blank",children:[t||"about:blank",t&&w.jsx(nf,{value:t})]}),w.jsx("div",{style:{marginLeft:"auto"},children:w.jsxs("div",{children:[w.jsx("span",{className:"browser-frame-menu-bLine truncated
|
||||
`)}}dt.defaultYaml={explicit:!1,version:"1.2"};dt.defaultTags={"!!":"tag:yaml.org,2002:"};function by(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function Ty(t){const e=new Set;return tr(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Cy(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function sE(t,e){const n=[],r=new Map;let o=null;return{onAnchor:l=>{n.push(l),o||(o=Ty(t));const c=Cy(e,o);return o.add(c),c},setAnchors:()=>{for(const l of n){const c=r.get(l);if(typeof c=="object"&&c.anchor&&(Te(c.node)||Re(c.node)))c.node.anchor=c.anchor;else{const u=new Error("Failed to resolve repeated object (this should not happen)");throw u.source=l,u}}},sourceObjects:r}}function Es(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let o=0,l=r.length;o<l;++o){const c=r[o],u=Es(t,r,String(o),c);u===void 0?delete r[o]:u!==c&&(r[o]=u)}else if(r instanceof Map)for(const o of Array.from(r.keys())){const l=r.get(o),c=Es(t,r,o,l);c===void 0?r.delete(o):c!==l&&r.set(o,c)}else if(r instanceof Set)for(const o of Array.from(r)){const l=Es(t,r,o,o);l===void 0?r.delete(o):l!==o&&(r.delete(o),r.add(l))}else for(const[o,l]of Object.entries(r)){const c=Es(t,r,o,l);c===void 0?delete r[o]:c!==l&&(r[o]=c)}return t.call(e,n,r)}function Ut(t,e,n){if(Array.isArray(t))return t.map((r,o)=>Ut(r,String(o),n));if(t&&typeof t.toJSON=="function"){if(!n||!tE(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=l=>{r.res=l,delete n.onCreate};const o=t.toJSON(e,n);return n.onCreate&&n.onCreate(o),o}return typeof t=="bigint"&&!(n!=null&&n.keep)?Number(t):t}class Cf{constructor(e){Object.defineProperty(this,qt,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:o,reviver:l}={}){if(!Rr(e))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},u=Ut(this,"",c);if(typeof o=="function")for(const{count:d,res:p}of c.anchors.values())o(p,d);return typeof l=="function"?Es(l,{"":u},"",u):u}}class ca extends Cf{constructor(e){super(Tf),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return tr(e,{Node:(r,o)=>{if(o===this)return tr.BREAK;o.anchor===this.source&&(n=o)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:o,maxAliasCount:l}=n,c=this.resolve(o);if(!c){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let u=r.get(c);if(u||(Ut(c,null,n),u=r.get(c)),!u||u.res===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(l>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=Rl(o,c,r)),u.count*u.aliasCount>l)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return u.res}toString(e,n,r){const o=`*${this.source}`;if(e){if(by(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(l)}if(e.implicitKey)return`${o} `}return o}}function Rl(t,e,n){if(Or(e)){const r=e.resolve(t),o=n&&r&&n.get(r);return o?o.count*o.aliasCount:0}else if(Re(e)){let r=0;for(const o of e.items){const l=Rl(t,o,n);l>r&&(r=l)}return r}else if(je(e)){const r=Rl(t,e.key,n),o=Rl(t,e.value,n);return Math.max(r,o)}return 1}const Ny=t=>!t||typeof t!="function"&&typeof t!="object";class ue extends Cf{constructor(e){super(dn),this.value=e}toJSON(e,n){return n!=null&&n.keep?this.value:Ut(this.value,e,n)}toString(){return String(this.value)}}ue.BLOCK_FOLDED="BLOCK_FOLDED";ue.BLOCK_LITERAL="BLOCK_LITERAL";ue.PLAIN="PLAIN";ue.QUOTE_DOUBLE="QUOTE_DOUBLE";ue.QUOTE_SINGLE="QUOTE_SINGLE";const iE="tag:yaml.org,2002:";function oE(t,e,n){if(e){const r=n.filter(l=>l.tag===e),o=r.find(l=>!l.format)??r[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return n.find(r=>{var o;return((o=r.identify)==null?void 0:o.call(r,t))&&!r.format})}function Gi(t,e,n){var y,v,x;if(Rr(t)&&(t=t.contents),$e(t))return t;if(je(t)){const E=(v=(y=n.schema[er]).createNode)==null?void 0:v.call(y,n.schema,null,n);return E.items.push(t),E}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:o,onTagObj:l,schema:c,sourceObjects:u}=n;let d;if(r&&t&&typeof t=="object"){if(d=u.get(t),d)return d.anchor||(d.anchor=o(t)),new ca(d.anchor);d={anchor:null,node:null},u.set(t,d)}e!=null&&e.startsWith("!!")&&(e=iE+e.slice(2));let p=oE(t,e,c.tags);if(!p){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const E=new ue(t);r
Line truncated
|
||||
`)?Cn(n,e):n.includes(`
|
||||
`)?`
|
||||
`+Cn(n,e):(t.endsWith(" ")?"":" ")+n,Iy="flow",qu="block",$l="quoted";function ua(t,e,n="flow",{indentAtStart:r,lineWidth:o=80,minContentWidth:l=20,onFold:c,onOverflow:u}={}){if(!o||o<0)return t;o<l&&(l=0);const d=Math.max(1+l,1+o-e.length);if(t.length<=d)return t;const p=[],g={};let y=o-e.length;typeof r=="number"&&(r>o-Math.max(2,l)?p.push(0):y=o-r);let v,x,E=!1,S=-1,k=-1,C=-1;n===qu&&(S=xm(t,S,e.length),S!==-1&&(y=S+d));for(let U;U=t[S+=1];){if(n===$l&&U==="\\"){switch(k=S,t[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}C=S}if(U===`
|
||||
`)n===qu&&(S=xm(t,S,e.length)),y=S+e.length+d,v=void 0;else{if(U===" "&&x&&x!==" "&&x!==`
|
||||
`&&x!==" "){const R=t[S+1];R&&R!==" "&&R!==`
|
||||
`&&R!==" "&&(v=S)}if(S>=y)if(v)p.push(v),y=v+d,v=void 0;else if(n===$l){for(;x===" "||x===" ";)x=U,U=t[S+=1],E=!0;const R=S>C+1?S-2:k-1;if(g[R])return t;p.push(R),g[R]=!0,y=R+d,v=void 0}else E=!0}x=U}if(E&&u&&u(),p.length===0)return t;c&&c();let A=t.slice(0,p[0]);for(let U=0;U<p.length;++U){const R=p[U],D=p[U+1]||t.length;R===0?A=`
|
||||
${e}${t.slice(0,D)}`:(n===$l&&g[R]&&(A+=`${t[R]}\\`),A+=`
|
||||
${e}${t.slice(R+1,D)}`)}return A}function xm(t,e,n){let r=e,o=e+1,l=t[o];for(;l===" "||l===" ";)if(e<o+n)l=t[++e];else{do l=t[++e];while(l&&l!==`
|
||||
`);r=e,o=e+1,l=t[o]}return r}const fa=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),da=t=>/^(%|---|\.\.\.)/m.test(t);function aE(t,e,n){if(!e||e<0)return!1;const r=e-n,o=t.length;if(o<=r)return!1;for(let l=0,c=0;l<o;++l)if(t[l]===`
|
||||
`){if(l-c>r)return!0;if(c=l+1,o-c<=r)return!1}return!0}function Vi(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,o=e.options.doubleQuotedMinMultiLineLength,l=e.indent||(da(t)?" ":"");let c="",u=0;for(let d=0,p=n[d];p;p=n[++d])if(p===" "&&n[d+1]==="\\"&&n[d+2]==="n"&&(c+=n.slice(u,d)+"\\ ",d+=1,u=d,p="\\"),p==="\\")switch(n[d+1]){case"u":{c+=n.slice(u,d);const g=n.substr(d+2,4);switch(g){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:g.substr(0,2)==="00"?c+="\\x"+g.substr(2):c+=n.substr(d,6)}d+=5,u=d+1}break;case"n":if(r||n[d+2]==='"'||n.length<o)d+=1;else{for(c+=n.slice(u,d)+`
|
||||
|
||||
`;n[d+2]==="\\"&&n[d+3]==="n"&&n[d+4]!=='"';)c+=`
|
||||
`,d+=2;c+=l,n[d+2]===" "&&(c+="\\"),d+=1,u=d+1}break;default:d+=1}return c=u?c+n.slice(u):n,r?c:ua(c,l,$l,fa(e,!1))}function Vu(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
||||
`)||/[ \t]\n|\n[ \t]/.test(t))return Vi(t,e);const n=e.indent||(da(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
||||
${n}`)+"'";return e.implicitKey?r:ua(r,n,Iy,fa(e,!1))}function ks(t,e){const{singleQuote:n}=e.options;let r;if(n===!1)r=Vi;else{const o=t.includes('"'),l=t.includes("'");o&&!l?r=Vu:l&&!o?r=Vi:r=n?Vu:Vi}return r(t,e)}let Wu;try{Wu=new RegExp(`(^|(?<!
|
||||
))
|
||||
+(?!
|
||||
|$)`,"g")}catch{Wu=/\n+(?!\n|$)/g}function Dl({comment:t,type:e,value:n},r,o,l){const{blockQuote:c,commentString:u,lineWidth:d}=r.options;if(!c||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return ks(n,r);const p=r.indent||(r.forceBlockIndent||da(n)?" ":""),g=c==="literal"?!0:c==="folded"||e===ue.BLOCK_FOLDED?!1:e===ue.BLOCK_LITERAL?!0:!aE(n,d,p.length);if(!n)return g?`|
|
||||
`:`>
|
||||
`;let y,v;for(v=n.length;v>0;--v){const z=n[v-1];if(z!==`
|
||||
`&&z!==" "&&z!==" ")break}let x=n.substring(v);const E=x.indexOf(`
|
||||
`);E===-1?y="-":n===x||E!==x.length-1?(y="+",l&&l()):y="",x&&(n=n.slice(0,-x.length),x[x.length-1]===`
|
||||
`&&(x=x.slice(0,-1)),x=x.replace(Wu,`$&${p}`));let S=!1,k,C=-1;for(k=0;k<n.length;++k){const z=n[k];if(z===" ")S=!0;else if(z===`
|
||||
`)C=k;else break}let A=n.substring(0,C<k?C+1:k);A&&(n=n.substring(A.length),A=A.replace(/\n+/g,`$&${p}`));let R=(g?"|":">")+(S?p?"2":"1":"")+y;if(t&&(R+=" "+u(t.replace(/ ?[\r\n]+/g," ")),o&&o()),g)return n=n.replace(/\n+/g,`$&${p}`),`${R}
|
||||
${p}${A}${n}${x}`;n=n.replace(/\n+/g,`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);const D=ua(`${A}${n}${x}`,p,qu,fa(r,!0));return`${R}
|
||||
${p}${D}`}function cE(t,e,n,r){const{type:o,value:l}=t,{actualString:c,implicitKey:u,indent:d,indentStep:p,inFlow:g}=e;if(u&&l.includes(`
|
||||
`)||g&&/[[\]{},]/.test(l))return ks(l,e);if(!l||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return u||g||!l.includes(`
|
||||
`)?ks(l,e):Dl(t,e,n,r);if(!u&&!g&&o!==ue.PLAIN&&l.includes(`
|
||||
`))return Dl(t,e,n,r);if(da(l)){if(d==="")return e.forceBlockIndent=!0,Dl(t,e,n,r);if(u&&d===p)return ks(l,e)}const y=l.replace(/\n+/g,`$&
|
||||
${d}`);if(c){const v=S=>{var k;return S.default&&S.tag!=="tag:yaml.org,2002:str"&&((k=S.test)==null?void 0:k.test(y))},{compat:x,tags:E}=e.doc.schema;if(E.some(v)||x!=null&&x.some(v))return ks(l,e)}return u?y:ua(y,d,Iy,fa(e,!1))}function Zi(t,e,n,r){const{implicitKey:o,inFlow:l}=e,c=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:u}=t;u!==ue.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(u=ue.QUOTE_DOUBLE);const d=g=>{switch(g){case ue.BLOCK_FOLDED:case ue.BLOCK_LITERAL:return o||l?ks(c.value,e):Dl(c,e,n,r);case ue.QUOTE_DOUBLE:return Vi(c.value,e);case ue.QUOTE_SINGLE:return Vu(c.value,e);case ue.PLAIN:return cE(c,e,n,r);default:return null}};let p=d(u);if(p===null){const{defaultKeyType:g,defaultStringType:y}=e.options,v=o&&g||y;if(p=d(v),p===null)throw new Error(`Unsupported default string type ${v}`)}return p}function Ly(t,e){const n=Object.assign({blockQuote:!0,commentString:lE,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function uE(t,e){var o;if(e.tag){const l=t.filter(c=>c.tag===e.tag);if(l.length>0)return l.find(c=>c.format===e.format)??l[0]}let n,r;if(Te(e)){r=e.value;let l=t.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){const c=l.filter(u=>u.test);c.length>0&&(l=c)}n=l.find(c=>c.format===e.format)??l.find(c=>!c.format)}else r=e,n=t.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!n){const l=((o=r==null?void 0:r.constructor)==null?void 0:o.name)??typeof r;throw new Error(`Tag not resolved for ${l} value`)}return n}function fE(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const o=[],l=(Te(t)||Re(t))&&t.anchor;l&&by(l)&&(n.add(l),o.push(`&${l}`));const c=t.tag?t.tag:e.default?null:e.tag;return c&&o.push(r.directives.tagString(c)),o.join(" ")}function As(t,e,n,r){var d;if(je(t))return t.toString(e,n,r);if(Or(t)){if(e.doc.directives)return t.toString(e);if((d=e.resolvedAliases)!=null&&d.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let o;const l=$e(t)?t:e.doc.createNode(t,{onTagObj:p=>o=p});o||(o=uE(e.doc.schema.tags,l));const c=fE(l,o,e);c.length>0&&(e.indentAtStart=(e.indentAtStart??0)+c.length+1);const u=typeof o.stringify=="function"?o.stringify(l,e,n,r):Te(l)?Zi(l,e,n,r):l.toString(e,n,r);return c?Te(l)||u[0]==="{"||u[0]==="["?`${c} ${u}`:`${c}
|
||||
${e.indent}${u}`:u}function dE({key:t,value:e},n,r,o){const{allNullValues:l,doc:c,indent:u,indentStep:d,options:{commentString:p,indentSeq:g,simpleKeys:y}}=n;let v=$e(t)&&t.comment||null;if(y){if(v)throw new Error("With simple keys, key nodes cannot have comments");if(Re(t)||!$e(t)&&typeof t=="object"){const q="With simple keys, collection cannot be used as a key value";throw new Error(q)}}let x=!y&&(!t||v&&e==null&&!n.inFlow||Re(t)||(Te(t)?t.type===ue.BLOCK_FOLDED||t.type===ue.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!x&&(y||!l),indent:u+d});let E=!1,S=!1,k=As(t,n,()=>E=!0,()=>S=!0);if(!x&&!n.inFlow&&k.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");x=!0}if(n.inFlow){if(l||e==null)return E&&r&&r(),k===""?"?":x?`? ${k}`:k}else if(l&&!y||e==null&&x)return k=`? ${k}`,v&&!E?k+=Cr(k,n.indent,p(v)):S&&o&&o(),k;E&&(v=null),x?(v&&(k+=Cr(k,n.indent,p(v))),k=`? ${k}
|
||||
${u}:`):(k=`${k}:`,v&&(k+=Cr(k,n.indent,p(v))));let C,A,U;$e(e)?(C=!!e.spaceBefore,A=e.commentBefore,U=e.comment):(C=!1,A=null,U=null,e&&typeof e=="object"&&(e=c.createNode(e))),n.implicitKey=!1,!x&&!v&&Te(e)&&(n.indentAtStart=k.length+1),S=!1,!g&&d.length>=2&&!n.inFlow&&!x&&$s(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let R=!1;const D=As(e,n,()=>R=!0,()=>S=!0);let z=" ";if(v||C||A){if(z=C?`
|
||||
`:"",A){const q=p(A);z+=`
|
||||
${Cn(q,n.indent)}`}D===""&&!n.inFlow?z===`
|
||||
`&&(z=`
|
||||
|
||||
`):z+=`
|
||||
${n.indent}`}else if(!x&&Re(e)){const q=D[0],F=D.indexOf(`
|
||||
`),j=F!==-1,oe=n.inFlow??e.flow??e.items.length===0;if(j||!oe){let ae=!1;if(j&&(q==="&"||q==="!")){let M=D.indexOf(" ");q==="&"&&M!==-1&&M<F&&D[M+1]==="!"&&(M=D.indexOf(" ",M+1)),(M===-1||F<M)&&(ae=!0)}ae||(z=`
|
||||
${n.indent}`)}}else(D===""||D[0]===`
|
||||
`)&&(z="");return k+=z+D,n.inFlow?R&&r&&r():U&&!R?k+=Cr(k,n.indent,p(U)):S&&o&&o(),k}function My(t,e){(t==="debug"||t==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const _l="<<",An={identify:t=>t===_l||typeof t=="symbol"&&t.description===_l,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ue(Symbol(_l)),{addToJSMap:jy}),stringify:()=>_l},hE=(t,e)=>(An.identify(e)||Te(e)&&(!e.type||e.type===ue.PLAIN)&&An.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(n=>n.tag===An.tag&&n.default));function jy(t,e,n){if(n=t&&Or(n)?n.resolve(t.doc):n,$s(n))for(const r of n.items)bu(t,e,r);else if(Array.isArray(n))for(const r of n)bu(t,e,r);else bu(t,e,n)}function bu(t,e,n){const r=t&&Or(n)?n.resolve(t.doc):n;if(!Rs(r))throw new Error("Merge sources must be maps or map aliases");const o=r.toJSON(null,t,Map);for(const[l,c]of o)e instanceof Map?e.has(l)||e.set(l,c):e instanceof Set?e.add(l):Object.prototype.hasOwnProperty.call(e,l)||Object.defineProperty(e,l,{value:c,writable:!0,enumerable:!0,configurable:!0});return e}function Py(t,e,{key:n,value:r}){if($e(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(hE(t,n))jy(t,e,r);else{const o=Ut(n,"",t);if(e instanceof Map)e.set(o,Ut(r,o,t));else if(e instanceof Set)e.add(o);else{const l=pE(n,o,t),c=Ut(r,l,t);l in e?Object.defineProperty(e,l,{value:c,writable:!0,enumerable:!0,configurable:!0}):e[l]=c}}return e}function pE(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if($e(t)&&(n!=null&&n.doc)){const r=Ly(n.doc,{});r.anchors=new Set;for(const l of n.anchors.keys())r.anchors.add(l.anchor);r.inFlow=!0,r.inStringifyKey=!0;const o=t.toString(r);if(!n.mapKeyWarned){let l=JSON.stringify(o);l.length>40&&(l=l.substring(0,36)+'..."'),My(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${l}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return o}return JSON.stringify(e)}function Nf(t,e,n){const r=Gi(t,void 0,n),o=Gi(e,void 0,n);return new ct(r,o)}class ct{constructor(e,n=null){Object.defineProperty(this,qt,{value:Sy}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return $e(n)&&(n=n.clone(e)),$e(r)&&(r=r.clone(e)),new ct(n,r)}toJSON(e,n){const r=n!=null&&n.mapAsMap?new Map:{};return Py(n,r,this)}toString(e,n,r){return e!=null&&e.doc?dE(this,e,n,r):JSON.stringify(this)}}function Oy(t,e,n){return(e.inFlow??t.flow?gE:mE)(t,e,n)}function mE({comment:t,items:e},n,{blockItemPrefix:r,flowChars:o,itemIndent:l,onChompKeep:c,onComment:u}){const{indent:d,options:{commentString:p}}=n,g=Object.assign({},n,{indent:l,type:null});let y=!1;const v=[];for(let E=0;E<e.length;++E){const S=e[E];let k=null;if($e(S))!y&&S.spaceBefore&&v.push(""),Zl(n,v,S.commentBefore,y),S.comment&&(k=S.comment);else if(je(S)){const A=$e(S.key)?S.key:null;A&&(!y&&A.spaceBefore&&v.push(""),Zl(n,v,A.commentBefore,y))}y=!1;let C=As(S,g,()=>k=null,()=>y=!0);k&&(C+=Cr(C,l,p(k))),y&&k&&(y=!1),v.push(r+C)}let x;if(v.length===0)x=o.start+o.end;else{x=v[0];for(let E=1;E<v.length;++E){const S=v[E];x+=S?`
|
||||
${d}${S}`:`
|
||||
`}}return t?(x+=`
|
||||
`+Cn(p(t),d),u&&u()):y&&c&&c(),x}function gE({items:t},e,{flowChars:n,itemIndent:r}){const{indent:o,indentStep:l,flowCollectionPadding:c,options:{commentString:u}}=e;r+=l;const d=Object.assign({},e,{indent:r,inFlow:!0,type:null});let p=!1,g=0;const y=[];for(let E=0;E<t.length;++E){const S=t[E];let k=null;if($e(S))S.spaceBefore&&y.push(""),Zl(e,y,S.commentBefore,!1),S.comment&&(k=S.comment);else if(je(S)){const A=$e(S.key)?S.key:null;A&&(A.spaceBefore&&y.push(""),Zl(e,y,A.commentBefore,!1),A.comment&&(p=!0));const U=$e(S.value)?S.value:null;U?(U.comment&&(k=U.comment),U.commentBefore&&(p=!0)):S.value==null&&(A!=null&&A.comment)&&(k=A.comment)}k&&(p=!0);let C=As(S,d,()=>k=null);E<t.length-1&&(C+=","),k&&(C+=Cr(C,r,u(k))),!p&&(y.length>g||C.includes(`
|
||||
`))&&(p=!0),y.push(C),g=y.length}const{start:v,end:x}=n;if(y.length===0)return v+x;if(!p){const E=y.reduce((S,k)=>S+k.length+2,2);p=e.options.lineWidth>0&&E>e.options.lineWidth}if(p){let E=v;for(const S of y)E+=S?`
|
||||
${l}${o}${S}`:`
|
||||
`;return`${E}
|
||||
${o}${x}`}else return`${v}${c}${y.join(" ")}${c}${x}`}function Zl({indent:t,options:{commentString:e}},n,r,o){if(r&&o&&(r=r.replace(/^\n+/,"")),r){const l=Cn(e(r),t);n.push(l.trimStart())}}function Nr(t,e){const n=Te(e)?e.value:e;for(const r of t)if(je(r)&&(r.key===e||r.key===n||Te(r.key)&&r.key.value===n))return r}class Lt extends Ay{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(er,e),this.items=[]}static from(e,n,r){const{keepUndefined:o,replacer:l}=r,c=new this(e),u=(d,p)=>{if(typeof l=="function")p=l.call(n,d,p);else if(Array.isArray(l)&&!l.includes(d))return;(p!==void 0||o)&&c.items.push(Nf(d,p,r))};if(n instanceof Map)for(const[d,p]of n)u(d,p);else if(n&&typeof n=="object")for(const d of Object.keys(n))u(d,n[d]);return typeof e.sortMapEntries=="function"&&c.items.sort(e.sortMapEntries),c}add(e,n){var c;let r;je(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new ct(e,e==null?void 0:e.value):r=new ct(e.key,e.value);const o=Nr(this.items,r.key),l=(c=this.schema)==null?void 0:c.sortMapEntries;if(o){if(!n)throw new Error(`Key ${r.key} already set`);Te(o.value)&&Ny(r.value)?o.value.value=r.value:o.value=r.value}else if(l){const u=this.items.findIndex(d=>l(r,d)<0);u===-1?this.items.push(r):this.items.splice(u,0,r)}else this.items.push(r)}delete(e){const n=Nr(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const r=Nr(this.items,e),o=r==null?void 0:r.value;return(!n&&Te(o)?o.value:o)??void 0}has(e){return!!Nr(this.items,e)}set(e,n){this.add(new ct(e,n),!0)}toJSON(e,n,r){const o=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(o);for(const l of this.items)Py(n,o,l);return o}toString(e,n,r){if(!e)return JSON.stringify(this);for(const o of this.items)if(!je(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Oy(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const Ds={collection:"map",default:!0,nodeClass:Lt,tag:"tag:yaml.org,2002:map",resolve(t,e){return Rs(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>Lt.from(t,e,n)};class nr extends Ay{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Os,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=El(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=El(e);if(typeof r!="number")return;const o=this.items[r];return!n&&Te(o)?o.value:o}has(e){const n=El(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=El(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[r];Te(o)&&Ny(n)?o.value=n:this.items[r]=n}toJSON(e,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let o=0;for(const l of this.items)r.push(Ut(l,String(o++),n));return r}toString(e,n,r){return e?Oy(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:o}=r,l=new this(e);if(n&&Symbol.iterator in Object(n)){let c=0;for(let u of n){if(typeof o=="function"){const d=n instanceof Set?u:String(c++);u=o.call(n,d,u)}l.items.push(Gi(u,void 0,r))}}return l}}function El(t){let e=Te(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Fs={collection:"seq",default:!0,nodeClass:nr,tag:"tag:yaml.org,2002:seq",resolve(t,e){return $s(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>nr.from(t,e,n)},ha={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Zi(t,e,n,r)}},pa={identify:t=>t==null,createNode:()=>new ue(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ue(null),stringify:({source:t},e)=>typeof t=="string"&&pa.test.test(t)?t:e.options.nullStr},Af={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new ue(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Af.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function nn({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const o=typeof r=="number"?r:Number(r);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let l=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(l)){let c=l.indexOf(".");c<0&&(c=l.length,l+=".");let u=e-(l.length-c-1);for(;u-- >0;)l+="0"}return l}const Ry={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nn},$y={identify:t=>type
Line truncated
|
||||
`:" ")}return Zi({comment:t,type:e,value:u},r,o,l)}};function Hy(t,e){if($s(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!je(r)){if(Rs(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const o=r.items[0]||new ct(new ue(null));if(r.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${r.commentBefore}
|
||||
${o.key.commentBefore}`:r.commentBefore),r.comment){const l=o.value??o.key;l.comment=l.comment?`${r.comment}
|
||||
${l.comment}`:r.comment}r=o}t.items[n]=je(r)?r:new ct(r)}}else e("Expected a sequence for this tag");return t}function qy(t,e,n){const{replacer:r}=n,o=new nr(t);o.tag="tag:yaml.org,2002:pairs";let l=0;if(e&&Symbol.iterator in Object(e))for(let c of e){typeof r=="function"&&(c=r.call(e,String(l++),c));let u,d;if(Array.isArray(c))if(c.length===2)u=c[0],d=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const p=Object.keys(c);if(p.length===1)u=p[0],d=c[u];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else u=c;o.items.push(Nf(u,d,n))}return o}const Mf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Hy,createNode:qy};class Ts extends nr{constructor(){super(),this.add=Lt.prototype.add.bind(this),this.delete=Lt.prototype.delete.bind(this),this.get=Lt.prototype.get.bind(this),this.has=Lt.prototype.has.bind(this),this.set=Lt.prototype.set.bind(this),this.tag=Ts.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const o of this.items){let l,c;if(je(o)?(l=Ut(o.key,"",n),c=Ut(o.value,l,n)):l=Ut(o,"",n),r.has(l))throw new Error("Ordered maps must not include duplicate keys");r.set(l,c)}return r}static from(e,n,r){const o=qy(e,n,r),l=new this;return l.items=o.items,l}}Ts.tag="tag:yaml.org,2002:omap";const jf={collection:"seq",identify:t=>t instanceof Map,nodeClass:Ts,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=Hy(t,e),r=[];for(const{key:o}of n.items)Te(o)&&(r.includes(o.value)?e(`Ordered maps must not include duplicate keys: ${o.value}`):r.push(o.value));return Object.assign(new Ts,n)},createNode:(t,e,n)=>Ts.from(t,e,n)};function Vy({value:t,source:e},n){return e&&(t?Wy:Ky).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const Wy={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ue(!0),stringify:Vy},Ky={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ue(!1),stringify:Vy},xE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nn},_E={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():nn(t)}},EE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new ue(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:nn},eo=t=>typeof t=="bigint"||Number.isInteger(t);function ga(t,e,n,{intAsBigInt:r}){const o=t[0];if((o==="-"||o==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const c=BigInt(t);return o==="-"?BigInt(-1)*c:c}const l=parseInt(t,n);return o==="-"?-1*l:l}function Pf(t,e,n){const{value:r}=t;if(eo(r)){const o=r.toString(e);return r<0?"-"+n+o.substr(1):n+o}return nn(t)}const kE={identify:eo,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>ga(t,2,2,n),stringify:t=>Pf(t,2,"0b")},bE={identify:eo,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>ga(t,1,8,n),stringify:t=>Pf(t,8,"0")},TE={identify:eo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>ga(t,0,10,n),stringify:nn},CE={identify:eo,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>ga(t,2,16,n),stringify:t=>Pf(t,16,"0x")};class Cs extends Lt{constructor(e){super(e),this.tag=Cs.tag}add(e){let n;je(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new ct(e.key,null):n=new ct(e,null),Nr(this.items,n.key)||this.items.push(n)}get(e,n){const r=Nr(this.items,e);return!n&&je(r)?Te(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Nr(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new ct(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:o}=r,l=new this(e);if(n&&Symbol.iterator in Object(n))for(let c of n)typeof o=="function"&&(c=o.call(n,c,c)),l.items.push(Nf(c,null,r));return l}}Cs.tag="tag:yaml.org,2002:set";const Of={col
Line truncated
|
||||
`)?(n.push("..."),n.push(Cn(p,""))):n.push(`... ${p}`)}else n.push("...");else{let p=t.comment;p&&c&&(p=p.replace(/^\n+/,"")),p&&((!c||u)&&n[n.length-1]!==""&&n.push(""),n.push(Cn(l(p),"")))}return n.join(`
|
||||
`)+`
|
||||
`}class Bs{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,qt,{value:Hu});let o=null;typeof n=="function"||Array.isArray(n)?o=n:r===void 0&&n&&(r=n,n=void 0);const l=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=l;let{version:c}=l;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new dt({version:c}),this.setSchema(c,r),this.contents=e===void 0?null:this.createNode(e,o,r)}clone(){const e=Object.create(Bs.prototype,{[qt]:{value:Hu}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=$e(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ps(this.contents)&&this.contents.add(e)}addIn(e,n){ps(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=Ty(this);e.anchor=!n||r.has(n)?Cy(n||"a",r):n}return new ca(e.anchor)}createNode(e,n,r){let o;if(typeof n=="function")e=n.call({"":e},"",e),o=n;else if(Array.isArray(n)){const k=A=>typeof A=="number"||A instanceof String||A instanceof Number,C=n.filter(k).map(String);C.length>0&&(n=n.concat(C)),o=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:l,anchorPrefix:c,flow:u,keepUndefined:d,onTagObj:p,tag:g}=r??{},{onAnchor:y,setAnchors:v,sourceObjects:x}=sE(this,c||"a"),E={aliasDuplicateObjects:l??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:x},S=Gi(e,g,E);return u&&Re(S)&&(S.flow=!0),v(),S}createPair(e,n,r={}){const o=this.createNode(e,null,r),l=this.createNode(n,null,r);return new ct(o,l)}delete(e){return ps(this.contents)?this.contents.delete(e):!1}deleteIn(e){return $i(e)?this.contents==null?!1:(this.contents=null,!0):ps(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return Re(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return $i(e)?!n&&Te(this.contents)?this.contents.value:this.contents:Re(this.contents)?this.contents.getIn(e,n):void 0}has(e){return Re(this.contents)?this.contents.has(e):!1}hasIn(e){return $i(e)?this.contents!==void 0:Re(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Yl(this.schema,[e],n):ps(this.contents)&&this.contents.set(e,n)}setIn(e,n){$i(e)?this.contents=n:this.contents==null?this.contents=Yl(this.schema,Array.from(e),n):ps(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new dt({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new dt({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const o=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new va(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:o,onAnchor:l,reviver:c}={}){const u={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},d=Ut(this.contents,n??"",u);if(typeof l=="function")for(const{count:p,res:g}of u.anchors.values())l(g,p);return typeof c=="function"?Es(c,{"":d},"",d):d}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return IE(this,e)}}function ps(t){if(Re(t))return!0;throw new Error("Expected a YAML collection as document contents")}class $f extends Error{constructor(e,n,r,o){super(),this.name=e,this.code=r,this.message=o,this.pos=n}}class Ar extends $f{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class Xy extends $f{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const ea=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(u=>e.linePos(u));const{line:r,col:o}=n.linePos[0];n.message+=` at line ${r}, column ${o}`;let l=o-1,c=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(l>=60&&c.length>80){const u=Math.min(l-39,c.length-79);c="…"+c.substring(u),l-=u-1}if(c.length>80&&(c=c.substring(0,79)+"…"),r>1&&/^ *$/.test(c.substring(0,l))){let u=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);u.len
Line truncated
|
||||
`),c=u+c}if(/[^ ]/.test(c)){let u=1;const d=n.linePos[1];d&&d.line===r&&d.col>o&&(u=Math.max(1,Math.min(d.col-o,80-l)));const p=" ".repeat(l)+"^".repeat(u);n.message+=`:
|
||||
|
||||
${c}
|
||||
${p}
|
||||
`}};function Is(t,{flow:e,indicator:n,next:r,offset:o,onError:l,parentIndent:c,startOnNewline:u}){let d=!1,p=u,g=u,y="",v="",x=!1,E=!1,S=null,k=null,C=null,A=null,U=null,R=null,D=null;for(const F of t)switch(E&&(F.type!=="space"&&F.type!=="newline"&&F.type!=="comma"&&l(F.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),S&&(p&&F.type!=="comment"&&F.type!=="newline"&&l(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),S=null),F.type){case"space":!e&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&F.source.includes(" ")&&(S=F),g=!0;break;case"comment":{g||l(F,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const j=F.source.substring(1)||" ";y?y+=v+j:y=j,v="",p=!1;break}case"newline":p?y?y+=F.source:d=!0:v+=F.source,p=!0,x=!0,(k||C)&&(A=F),g=!0;break;case"anchor":k&&l(F,"MULTIPLE_ANCHORS","A node can have at most one anchor"),F.source.endsWith(":")&&l(F.offset+F.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=F,D===null&&(D=F.offset),p=!1,g=!1,E=!0;break;case"tag":{C&&l(F,"MULTIPLE_TAGS","A node can have at most one tag"),C=F,D===null&&(D=F.offset),p=!1,g=!1,E=!0;break}case n:(k||C)&&l(F,"BAD_PROP_ORDER",`Anchors and tags must be after the ${F.source} indicator`),R&&l(F,"UNEXPECTED_TOKEN",`Unexpected ${F.source} in ${e??"collection"}`),R=F,p=n==="seq-item-ind"||n==="explicit-key-ind",g=!1;break;case"comma":if(e){U&&l(F,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),U=F,p=!1,g=!1;break}default:l(F,"UNEXPECTED_TOKEN",`Unexpected ${F.type} token`),p=!1,g=!1}const z=t[t.length-1],q=z?z.offset+z.source.length:o;return E&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&l(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S&&(p&&S.indent<=c||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&l(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:U,found:R,spaceBefore:d,comment:y,hasNewline:x,anchor:k,tag:C,newlineAfterProp:A,end:q,start:D??q}}function Qi(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
||||
`))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(Qi(e.key)||Qi(e.value))return!0}return!1;default:return!0}}function Ku(t,e,n){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&Qi(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Yy(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const o=typeof r=="function"?r:(l,c)=>l===c||Te(l)&&Te(c)&&l.value===c.value;return e.some(l=>o(l.key,n))}const Tm="All mapping items must start at the same column";function LE({composeNode:t,composeEmptyNode:e},n,r,o,l){var g;const c=(l==null?void 0:l.nodeClass)??Lt,u=new c(n.schema);n.atRoot&&(n.atRoot=!1);let d=r.offset,p=null;for(const y of r.items){const{start:v,key:x,sep:E,value:S}=y,k=Is(v,{indicator:"explicit-key-ind",next:x??(E==null?void 0:E[0]),offset:d,onError:o,parentIndent:r.indent,startOnNewline:!0}),C=!k.found;if(C){if(x&&(x.type==="block-seq"?o(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==r.indent&&o(d,"BAD_INDENT",Tm)),!k.anchor&&!k.tag&&!E){p=k.end,k.comment&&(u.comment?u.comment+=`
|
||||
`+k.comment:u.comment=k.comment);continue}(k.newlineAfterProp||Qi(x))&&o(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((g=k.found)==null?void 0:g.indent)!==r.indent&&o(d,"BAD_INDENT",Tm);n.atKey=!0;const A=k.end,U=x?t(n,x,k,o):e(n,A,v,null,k,o);n.schema.compat&&Ku(r.indent,x,o),n.atKey=!1,Yy(n,u.items,U)&&o(A,"DUPLICATE_KEY","Map keys must be unique");const R=Is(E??[],{indicator:"map-value-ind",next:S,offset:U.range[2],onError:o,parentIndent:r.indent,startOnNewline:!x||x.type==="block-scalar"});if(d=R.end,R.found){C&&((S==null?void 0:S.type)==="block-map"&&!R.hasNewline&&o(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&k.start<R.found.offset-1024&&o(U.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=S?t(n,S,R,o):e(n,d,E,null,R,o);n.schema.compat&&Ku(r.indent,S,o),d=D.range[2];const z=new ct(U,D);n.options.keepSourceTokens&&(z.srcToken=y),u.items.push(z)}else{C&&o(U.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),R.comment&&(U.comment?U.comment+=`
|
||||
`+R.comment:U.comment=R.comment);const D=new ct(U);n.options.keepSourceTokens&&(D.srcToken=y),u.items.push(D)}}return p&&p<d&&o(p,"IMPOSSIBLE","Map comment with trailing content"),u.range=[r.offset,d,p??d],u}function ME({composeNode:t,composeEmptyNode:e},n,r,o,l){const c=(l==null?void 0:l.nodeClass)??nr,u=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=r.offset,p=null;for(const{start:g,value:y}of r.items){const v=Is(g,{indicator:"seq-item-ind",next:y,offset:d,onError:o,parentIndent:r.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||y)y&&y.type==="block-seq"?o(v.end,"BAD_INDENT","All sequence items must start at the same column"):o(d,"MISSING_CHAR","Sequence item without - indicator");else{p=v.end,v.comment&&(u.comment=v.comment);continue}const x=y?t(n,y,v,o):e(n,v.end,g,null,v,o);n.schema.compat&&Ku(r.indent,y,o),d=x.range[2],u.items.push(x)}return u.range=[r.offset,d,p??d],u}function to(t,e,n,r){let o="";if(t){let l=!1,c="";for(const u of t){const{source:d,type:p}=u;switch(p){case"space":l=!0;break;case"comment":{n&&!l&&r(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const g=d.substring(1)||" ";o?o+=c+g:o=g,c="";break}case"newline":o&&(c+=d),l=!0;break;default:r(u,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:o,offset:e}}const Cu="Block collections are not allowed within flow collections",Nu=t=>t&&(t.type==="block-map"||t.type==="block-seq");function jE({composeNode:t,composeEmptyNode:e},n,r,o,l){const c=r.start.source==="{",u=c?"flow map":"flow sequence",d=(l==null?void 0:l.nodeClass)??(c?Lt:nr),p=new d(n.schema);p.flow=!0;const g=n.atRoot;g&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let y=r.offset+r.start.source.length;for(let k=0;k<r.items.length;++k){const C=r.items[k],{start:A,key:U,sep:R,value:D}=C,z=Is(A,{flow:u,indicator:"explicit-key-ind",next:U??(R==null?void 0:R[0]),offset:y,onError:o,parentIndent:r.indent,startOnNewline:!1});if(!z.found){if(!z.anchor&&!z.tag&&!R&&!D){k===0&&z.comma?o(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`):k<r.items.length-1&&o(z.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${u}`),z.comment&&(p.comment?p.comment+=`
|
||||
`+z.comment:p.comment=z.comment),y=z.end;continue}!c&&n.options.strict&&Qi(U)&&o(U,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0)z.comma&&o(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`);else if(z.comma||o(z.start,"MISSING_CHAR",`Missing , between ${u} items`),z.comment){let q="";e:for(const F of A)switch(F.type){case"comma":case"space":break;case"comment":q=F.source.substring(1);break e;default:break e}if(q){let F=p.items[p.items.length-1];je(F)&&(F=F.value??F.key),F.comment?F.comment+=`
|
||||
`+q:F.comment=q,z.comment=z.comment.substring(q.length+1)}}if(!c&&!R&&!z.found){const q=D?t(n,D,z,o):e(n,z.end,R,null,z,o);p.items.push(q),y=q.range[2],Nu(D)&&o(q.range,"BLOCK_IN_FLOW",Cu)}else{n.atKey=!0;const q=z.end,F=U?t(n,U,z,o):e(n,q,A,null,z,o);Nu(U)&&o(F.range,"BLOCK_IN_FLOW",Cu),n.atKey=!1;const j=Is(R??[],{flow:u,indicator:"map-value-ind",next:D,offset:F.range[2],onError:o,parentIndent:r.indent,startOnNewline:!1});if(j.found){if(!c&&!z.found&&n.options.strict){if(R)for(const M of R){if(M===j.found)break;if(M.type==="newline"){o(M,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}z.start<j.found.offset-1024&&o(j.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else D&&("source"in D&&D.source&&D.source[0]===":"?o(D,"MISSING_CHAR",`Missing space after : in ${u}`):o(j.start,"MISSING_CHAR",`Missing , or : between ${u} items`));const oe=D?t(n,D,j,o):j.found?e(n,j.end,R,null,j,o):null;oe?Nu(D)&&o(oe.range,"BLOCK_IN_FLOW",Cu):j.comment&&(F.comment?F.comment+=`
|
||||
`+j.comment:F.comment=j.comment);const ae=new ct(F,oe);if(n.options.keepSourceTokens&&(ae.srcToken=C),c){const M=p;Yy(n,M.items,F)&&o(q,"DUPLICATE_KEY","Map keys must be unique"),M.items.push(ae)}else{const M=new Lt(n.schema);M.flow=!0,M.items.push(ae);const H=(oe??F).range;M.range=[F.range[0],H[1],H[2]],p.items.push(M)}y=oe?oe.range[2]:j.end}}const v=c?"}":"]",[x,...E]=r.end;let S=y;if(x&&x.source===v)S=x.offset+x.source.length;else{const k=u[0].toUpperCase()+u.substring(1),C=g?`${k} must end with a ${v}`:`${k} in block collection must be sufficiently indented and end with a ${v}`;o(y,g?"MISSING_CHAR":"BAD_INDENT",C),x&&x.source.length!==1&&E.unshift(x)}if(E.length>0){const k=to(E,S,n.options.strict,o);k.comment&&(p.comment?p.comment+=`
|
||||
`+k.comment:p.comment=k.comment),p.range=[r.offset,S,k.offset]}else p.range=[r.offset,S,S];return p}function Au(t,e,n,r,o,l){const c=n.type==="block-map"?LE(t,e,n,r,l):n.type==="block-seq"?ME(t,e,n,r,l):jE(t,e,n,r,l),u=c.constructor;return o==="!"||o===u.tagName?(c.tag=u.tagName,c):(o&&(c.tag=o),c)}function PE(t,e,n,r,o){var v;const l=r.tag,c=l?e.directives.tagName(l.source,x=>o(l,"TAG_RESOLVE_FAILED",x)):null;if(n.type==="block-seq"){const{anchor:x,newlineAfterProp:E}=r,S=x&&l?x.offset>l.offset?x:l:x??l;S&&(!E||E.offset<S.offset)&&o(S,"MISSING_CHAR","Missing newline after block sequence props")}const u=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!l||!c||c==="!"||c===Lt.tagName&&u==="map"||c===nr.tagName&&u==="seq")return Au(t,e,n,o,c);let d=e.schema.tags.find(x=>x.tag===c&&x.collection===u);if(!d){const x=e.schema.knownTags[c];if(x&&x.collection===u)e.schema.tags.push(Object.assign({},x,{default:!1})),d=x;else return x!=null&&x.collection?o(l,"BAD_COLLECTION_TYPE",`${x.tag} used for ${u} collection, but expects ${x.collection}`,!0):o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),Au(t,e,n,o,c)}const p=Au(t,e,n,o,c,d),g=((v=d.resolve)==null?void 0:v.call(d,p,x=>o(l,"TAG_RESOLVE_FAILED",x),e.options))??p,y=$e(g)?g:new ue(g);return y.range=p.range,y.tag=c,d!=null&&d.format&&(y.format=d.format),y}function Zy(t,e,n){const r=e.offset,o=OE(e,t.options.strict,n);if(!o)return{value:"",type:null,comment:"",range:[r,r,r]};const l=o.mode===">"?ue.BLOCK_FOLDED:ue.BLOCK_LITERAL,c=e.source?RE(e.source):[];let u=c.length;for(let S=c.length-1;S>=0;--S){const k=c[S][1];if(k===""||k==="\r")u=S;else break}if(u===0){const S=o.chomp==="+"&&c.length>0?`
|
||||
`.repeat(Math.max(1,c.length-1)):"";let k=r+o.length;return e.source&&(k+=e.source.length),{value:S,type:l,comment:o.comment,range:[r,k,k]}}let d=e.indent+o.indent,p=e.offset+o.length,g=0;for(let S=0;S<u;++S){const[k,C]=c[S];if(C===""||C==="\r")o.indent===0&&k.length>d&&(d=k.length);else{k.length<d&&n(p+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(d=k.length),g=S,d===0&&!t.atRoot&&n(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=k.length+C.length+1}for(let S=c.length-1;S>=u;--S)c[S][0].length>d&&(u=S+1);let y="",v="",x=!1;for(let S=0;S<g;++S)y+=c[S][0].slice(d)+`
|
||||
`;for(let S=g;S<u;++S){let[k,C]=c[S];p+=k.length+C.length+1;const A=C[C.length-1]==="\r";if(A&&(C=C.slice(0,-1)),C&&k.length<d){const R=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;n(p-C.length-(A?2:1),"BAD_INDENT",R),k=""}l===ue.BLOCK_LITERAL?(y+=v+k.slice(d)+C,v=`
|
||||
`):k.length>d||C[0]===" "?(v===" "?v=`
|
||||
`:!x&&v===`
|
||||
`&&(v=`
|
||||
|
||||
`),y+=v+k.slice(d)+C,v=`
|
||||
`,x=!0):C===""?v===`
|
||||
`?y+=`
|
||||
`:v=`
|
||||
`:(y+=v+C,v=" ",x=!1)}switch(o.chomp){case"-":break;case"+":for(let S=u;S<c.length;++S)y+=`
|
||||
`+c[S][0].slice(d);y[y.length-1]!==`
|
||||
`&&(y+=`
|
||||
`);break;default:y+=`
|
||||
`}const E=r+o.length+e.source.length;return{value:y,type:l,comment:o.comment,range:[r,E,E]}}function OE({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=e[0],l=o[0];let c=0,u="",d=-1;for(let v=1;v<o.length;++v){const x=o[v];if(!u&&(x==="-"||x==="+"))u=x;else{const E=Number(x);!c&&E?c=E:d===-1&&(d=t+v)}}d!==-1&&r(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let p=!1,g="",y=o.length;for(let v=1;v<e.length;++v){const x=e[v];switch(x.type){case"space":p=!0;case"newline":y+=x.source.length;break;case"comment":n&&!p&&r(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=x.source.length,g=x.source.substring(1);break;case"error":r(x,"UNEXPECTED_TOKEN",x.message),y+=x.source.length;break;default:{const E=`Unexpected token in block scalar header: ${x.type}`;r(x,"UNEXPECTED_TOKEN",E);const S=x.source;S&&typeof S=="string"&&(y+=S.length)}}}return{mode:l,indent:c,chomp:u,comment:g,length:y}}function RE(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),l=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let c=1;c<e.length;c+=2)l.push([e[c],e[c+1]]);return l}function ev(t,e,n){const{offset:r,type:o,source:l,end:c}=t;let u,d;const p=(v,x,E)=>n(r+v,x,E);switch(o){case"scalar":u=ue.PLAIN,d=$E(l,p);break;case"single-quoted-scalar":u=ue.QUOTE_SINGLE,d=DE(l,p);break;case"double-quoted-scalar":u=ue.QUOTE_DOUBLE,d=FE(l,p);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+l.length,r+l.length]}}const g=r+l.length,y=to(c,g,e,n);return{value:d,type:u,comment:y.comment,range:[r,g,y.offset]}}function $E(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),tv(t)}function DE(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),tv(t.slice(1,-1)).replace(/''/g,"'")}function tv(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
||||
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
||||
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let o=r[1],l=" ",c=e.lastIndex;for(n.lastIndex=c;r=n.exec(t);)r[1]===""?l===`
|
||||
`?o+=l:l=`
|
||||
`:(o+=l+r[1],l=" "),c=n.lastIndex;const u=/[ \t]*(.*)/sy;return u.lastIndex=c,r=u.exec(t),o+l+((r==null?void 0:r[1])??"")}function FE(t,e){let n="";for(let r=1;r<t.length-1;++r){const o=t[r];if(!(o==="\r"&&t[r+1]===`
|
||||
`))if(o===`
|
||||
`){const{fold:l,offset:c}=BE(t,r);n+=l,r=c}else if(o==="\\"){let l=t[++r];const c=zE[l];if(c)n+=c;else if(l===`
|
||||
`)for(l=t[r+1];l===" "||l===" ";)l=t[++r+1];else if(l==="\r"&&t[r+1]===`
|
||||
`)for(l=t[++r+1];l===" "||l===" ";)l=t[++r+1];else if(l==="x"||l==="u"||l==="U"){const u={x:2,u:4,U:8}[l];n+=UE(t,r+1,u,e),r+=u}else{const u=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),n+=u}}else if(o===" "||o===" "){const l=r;let c=t[r+1];for(;c===" "||c===" ";)c=t[++r+1];c!==`
|
||||
`&&!(c==="\r"&&t[r+2]===`
|
||||
`)&&(n+=r>l?t.slice(l,r+1):o)}else n+=o}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function BE(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
|
||||
`||r==="\r")&&!(r==="\r"&&t[e+2]!==`
|
||||
`);)r===`
|
||||
`&&(n+=`
|
||||
`),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const zE={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
||||
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function UE(t,e,n,r){const o=t.substr(e,n),c=o.length===n&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(c)){const u=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),u}return String.fromCodePoint(c)}function nv(t,e,n,r){const{value:o,type:l,comment:c,range:u}=e.type==="block-scalar"?Zy(t,e,r):ev(e,t.options.strict,r),d=n?t.directives.tagName(n.source,y=>r(n,"TAG_RESOLVE_FAILED",y)):null;let p;t.options.stringKeys&&t.atKey?p=t.schema[dn]:d?p=HE(t.schema,o,d,n,r):e.type==="scalar"?p=qE(t,o,e,r):p=t.schema[dn];let g;try{const y=p.resolve(o,v=>r(n??e,"TAG_RESOLVE_FAILED",v),t.options);g=Te(y)?y:new ue(y)}catch(y){const v=y instanceof Error?y.message:String(y);r(n??e,"TAG_RESOLVE_FAILED",v),g=new ue(o)}return g.range=u,g.source=o,l&&(g.type=l),d&&(g.tag=d),p.format&&(g.format=p.format),c&&(g.comment=c),g}function HE(t,e,n,r,o){var u;if(n==="!")return t[dn];const l=[];for(const d of t.tags)if(!d.collection&&d.tag===n)if(d.default&&d.test)l.push(d);else return d;for(const d of l)if((u=d.test)!=null&&u.test(e))return d;const c=t.knownTags[n];return c&&!c.collection?(t.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(o(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[dn])}function qE({atKey:t,directives:e,schema:n},r,o,l){const c=n.tags.find(u=>{var d;return(u.default===!0||t&&u.default==="key")&&((d=u.test)==null?void 0:d.test(r))})||n[dn];if(n.compat){const u=n.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(r))})??n[dn];if(c.tag!==u.tag){const d=e.tagString(c.tag),p=e.tagString(u.tag),g=`Value may be parsed as either ${d} or ${p}`;l(o,"TAG_RESOLVE_FAILED",g,!0)}}return c}function VE(t,e,n){if(e){n===null&&(n=e.length);for(let r=n-1;r>=0;--r){let o=e[r];switch(o.type){case"space":case"comment":case"newline":t-=o.source.length;continue}for(o=e[++r];(o==null?void 0:o.type)==="space";)t+=o.source.length,o=e[++r];break}}return t}const WE={composeNode:rv,composeEmptyNode:Df};function rv(t,e,n,r){const o=t.atKey,{spaceBefore:l,comment:c,anchor:u,tag:d}=n;let p,g=!0;switch(e.type){case"alias":p=KE(t,e,r),(u||d)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=nv(t,e,d,r),u&&(p.anchor=u.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=PE(WE,t,e,n,r),u&&(p.anchor=u.source.substring(1));break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",y),p=Df(t,e.offset,void 0,null,n,r),g=!1}}return u&&p.anchor===""&&r(u,"BAD_ALIAS","Anchor cannot be an empty string"),o&&t.options.stringKeys&&(!Te(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&r(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),l&&(p.spaceBefore=!0),c&&(e.type==="scalar"&&e.source===""?p.comment=c:p.commentBefore=c),t.options.keepSourceTokens&&g&&(p.srcToken=e),p}function Df(t,e,n,r,{spaceBefore:o,comment:l,anchor:c,tag:u,end:d},p){const g={type:"scalar",offset:VE(e,n,r),indent:-1,source:""},y=nv(t,g,u,p);return c&&(y.anchor=c.source.substring(1),y.anchor===""&&p(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(y.spaceBefore=!0),l&&(y.comment=l,y.range[2]=d),y}function KE({options:t},{offset:e,source:n,end:r},o){const l=new ca(n.substring(1));l.source===""&&o(e,"BAD_ALIAS","Alias cannot be an empty string"),l.source.endsWith(":")&&o(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=e+n.length,u=to(r,c,t.strict,o);return l.range=[e,c,u.offset],u.comment&&(l.comment=u.comment),l}function GE(t,e,{offset:n,start:r,value:o,end:l},c){const u=Object.assign({_directives:e},t),d=new Bs(void 0,u),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},g=Is(r,{indicator:"doc-start",next:o??(l==null?void 0:l[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});g.found&&(d.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!g.hasNewline&&c(g.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=o?rv(p,o,g,c):Df(p,g.end,r,null,g,c);const y=d.contents.range[2],v=to(l,y,!1,c);return v.comment&&(d.comment=v.comment),d.range=[n,y,v.offset],d}function Mi(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function Cm(t){var o;let e="",n=!1,r=!1;for(let l=0;l<t.length;++l){const c=t[l];switch(c[0]){case"#":e+=(e===""?"":r?`
|
||||
|
||||
`:`
|
||||
`)+(c.substring(1)||" "),n=!0,r=!1;break;case"%":((o=t[l+1])==null?void 0:o[0])!=="#"&&(l+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}class Ff{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,o,l)=>{const c=Mi(n);l?this.warnings.push(new Xy(c,r,o)):this.errors.push(new Ar(c,r,o))},this.directives=new dt({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:r,afterEmptyLine:o}=Cm(this.prelude);if(r){const l=e.contents;if(n)e.comment=e.comment?`${e.comment}
|
||||
${r}`:r;else if(o||e.directives.docStart||!l)e.commentBefore=r;else if(Re(l)&&!l.flow&&l.items.length>0){let c=l.items[0];je(c)&&(c=c.key);const u=c.commentBefore;c.commentBefore=u?`${r}
|
||||
${u}`:r}else{const c=l.commentBefore;l.commentBefore=c?`${r}
|
||||
${c}`:r}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Cm(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const o of e)yield*this.next(o);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,o)=>{const l=Mi(e);l[0]+=n,this.onError(l,"BAD_DIRECTIVE",r,o)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=GE(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Ar(Mi(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Ar(Mi(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=to(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
|
||||
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ar(Mi(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),o=new Bs(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,n,n],this.decorate(o,!1),yield o}}}function QE(t,e=!0,n){if(t){const r=(o,l,c)=>{const u=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(n)n(u,l,c);else throw new Ar([u,u+1],l,c)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return ev(t,e,r);case"block-scalar":return Zy({options:{strict:e}},t,r)}}return null}function JE(t,e){const{implicitKey:n=!1,indent:r,inFlow:o=!1,offset:l=-1,type:c="PLAIN"}=e,u=Zi({type:c,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:r,source:`
|
||||
`}];switch(u[0]){case"|":case">":{const p=u.indexOf(`
|
||||
`),g=u.substring(0,p),y=u.substring(p+1)+`
|
||||
`,v=[{type:"block-scalar-header",offset:l,indent:r,source:g}];return sv(v,d)||v.push({type:"newline",offset:-1,indent:r,source:`
|
||||
`}),{type:"block-scalar",offset:l,indent:r,props:v,source:y}}case'"':return{type:"double-quoted-scalar",offset:l,indent:r,source:u,end:d};case"'":return{type:"single-quoted-scalar",offset:l,indent:r,source:u,end:d};default:return{type:"scalar",offset:l,indent:r,source:u,end:d}}}function XE(t,e,n={}){let{afterKey:r=!1,implicitKey:o=!1,inFlow:l=!1,type:c}=n,u="indent"in t?t.indent:null;if(r&&typeof u=="number"&&(u+=2),!c)switch(t.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const p=t.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const d=Zi({type:c,value:e},{implicitKey:o||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":YE(t,d);break;case'"':Iu(t,d,"double-quoted-scalar");break;case"'":Iu(t,d,"single-quoted-scalar");break;default:Iu(t,d,"scalar")}}function YE(t,e){const n=e.indexOf(`
|
||||
`),r=e.substring(0,n),o=e.substring(n+1)+`
|
||||
`;if(t.type==="block-scalar"){const l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l.source=r,t.source=o}else{const{offset:l}=t,c="indent"in t?t.indent:-1,u=[{type:"block-scalar-header",offset:l,indent:c,source:r}];sv(u,"end"in t?t.end:void 0)||u.push({type:"newline",offset:-1,indent:c,source:`
|
||||
`});for(const d of Object.keys(t))d!=="type"&&d!=="offset"&&delete t[d];Object.assign(t,{type:"block-scalar",indent:c,props:u,source:o})}}function sv(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function Iu(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const r=t.props.slice(1);let o=e.length;t.props[0].type==="block-scalar-header"&&(o-=t.props[0].source.length);for(const l of r)l.offset+=o;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{const o={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
||||
`};delete t.items,Object.assign(t,{type:n,source:e,end:[o]});break}default:{const r="indent"in t?t.indent:-1,o="end"in t&&Array.isArray(t.end)?t.end.filter(l=>l.type==="space"||l.type==="comment"||l.type==="newline"):[];for(const l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:n,indent:r,source:e,end:o})}}}const ZE=t=>"type"in t?ta(t):Fl(t);function ta(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=ta(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=Fl(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=Fl(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=Fl(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function Fl({start:t,key:e,sep:n,value:r}){let o="";for(const l of t)o+=l.source;if(e&&(o+=ta(e)),n)for(const l of n)o+=l.source;return r&&(o+=ta(r)),o}const Gu=Symbol("break visit"),ek=Symbol("skip children"),iv=Symbol("remove item");function Mr(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),ov(Object.freeze([]),t,e)}Mr.BREAK=Gu;Mr.SKIP=ek;Mr.REMOVE=iv;Mr.itemAtPath=(t,e)=>{let n=t;for(const[r,o]of e){const l=n==null?void 0:n[r];if(l&&"items"in l)n=l.items[o];else return}return n};Mr.parentCollection=(t,e)=>{const n=Mr.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],o=n==null?void 0:n[r];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function ov(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const o of["key","value"]){const l=e[o];if(l&&"items"in l){for(let c=0;c<l.items.length;++c){const u=ov(Object.freeze(t.concat([[o,c]])),l.items[c],n);if(typeof u=="number")c=u-1;else{if(u===Gu)return Gu;u===iv&&(l.items.splice(c,1),c-=1)}}typeof r=="function"&&o==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const wa="\uFEFF",Sa="",xa="",Ji="",tk=t=>!!t&&"items"in t,nk=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function rk(t){switch(t){case wa:return"<BOM>";case Sa:return"<DOC>";case xa:return"<FLOW_END>";case Ji:return"<SCALAR>";default:return JSON.stringify(t)}}function lv(t){switch(t){case wa:return"byte-order-mark";case Sa:return"doc-mode";case xa:return"flow-error-end";case Ji:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
||||
`:case`\r
|
||||
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const sk=Object.freeze(Object.defineProperty({__proto__:null,BOM:wa,DOCUMENT:Sa,FLOW_END:xa,SCALAR:Ji,createScalarToken:JE,isCollection:tk,isScalar:nk,prettyToken:rk,resolveAsScalar:QE,setScalarValue:XE,stringify:ZE,tokenType:lv,visit:Mr},Symbol.toStringTag,{value:"Module"}));function en(t){switch(t){case void 0:case" ":case`
|
||||
`:case"\r":case" ":return!0;default:return!1}}const Nm=new Set("0123456789ABCDEFabcdef"),ik=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),bl=new Set(",[]{}"),ok=new Set(` ,[]{}
|
||||
\r `),Lu=t=>!t||ok.has(t);class av{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
|
||||
`?!0:n==="\r"?this.buffer[e+1]===`
|
||||
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){const o=this.buffer[r+e+1];if(o===`
|
||||
`||!o&&!this.atEnd)return e+r+1}return n===`
|
||||
`||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&en(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
||||
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===wa&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){const l=e[r-1];if(l===" "||l===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const l=e[n-1];if(l===" "||l===" ")n-=1;else break}const o=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Sa,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&en(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!en(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&en(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Lu),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&o[0]!=="#"||r===0&&(o.startsWith("---")||o.startsWith("..."))&&en(o[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield xa,yield*this.parseLineStart();let l=0;for(;o[l]===",";)l+=yield*this.pushCount(1),l+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(l+=yield*this.pushIndicators(),o[l]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-l),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Lu),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||en(c)||c===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let l=0;for(;this.buffer[n-1-l]==="\\";)l+=1;if(l%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let o=r.indexOf(`
|
||||
`,this.pos);if(o!==-1){for(;o!==-1;){const l=this.continueScalar(o+1);if(l===-1)break;o=r.indexOf(`
|
||||
`,l)}o!==-1&&(n=o-(r[o-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>en(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let l=this.pos;r=this.buffer[l];++l)switch(r){case" ":n+=1;break;case`
|
||||
`:e=l,n=0;break;case"\r":{const c=this.buffer[l+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
|
||||
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const l=this.continueScalar(e+1);if(l===-1)break;e=this.buffer.indexOf(`
|
||||
`,l)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let o=e+1;for(r=this.buffer[o];r===" ";)r=this.buffer[++o];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
||||
`;)r=this.buffer[++o];e=o-1}else if(!this.blockScalarKeep)do{let l=e-1,c=this.buffer[l];c==="\r"&&(c=this.buffer[--l]);const u=l;for(;c===" ";)c=this.buffer[--l];if(c===`
|
||||
`&&l>=this.pos&&l+1+n>u)e=l;else break}while(!0);return yield Ji,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,o;for(;o=this.buffer[++r];)if(o===":"){const l=this.buffer[r+1];if(en(l)||e&&bl.has(l))break;n=r}else if(en(o)){let l=this.buffer[r+1];if(o==="\r"&&(l===`
|
||||
`?(r+=1,o=`
|
||||
`,l=this.buffer[r+1]):n=r),l==="#"||e&&bl.has(l))break;if(o===`
|
||||
`){const c=this.continueScalar(r+1);if(c===-1)break;r=Math.max(r,c-2)}}else{if(e&&bl.has(o))break;n=r}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield Ji,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Lu))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(en(n)||e&&bl.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!en(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(ik.has(n))n=this.buffer[++e];else if(n==="%"&&Nm.has(this.buffer[e+1])&&Nm.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
|
||||
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
||||
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const o=n-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=n),o}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class cv{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){const l=n+r>>1;this.lineStarts[l]<e?n=l+1:r=l}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const o=this.lineStarts[n-1];return{line:n,col:e-o+1}}}}function Tr(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Am(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function uv(t){switch(t==null?void 0:t.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Tl(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function ms(t){var n;if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=t[++e])==null?void 0:n.type)==="space";);return t.splice(e,t.length)}function Im(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!Tr(e.start,"explicit-key-ind")&&!Tr(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,uv(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Bf{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new av,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=lv(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Im(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const o=r.items[r.items.length-1];if(o.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=n;else{Object.assign(o,{key:n,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=r.items[r.items.length-1];o.value?r.items.push({start:[],value:n}):o.value=n;break}case"flow-collection":{const o=r.items[r.items.length-1];!o||o.value?r.items.push({start:[],key:n,sep:[]}):o.sep?o.value=n:Object.assign(o,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const o=n.items[n.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&Am(o.start)===-1&&(n.indent===0||o.start.every(l=>l.type!=="comment"|
Line truncated
|
||||
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
||||
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const o=!this.onKeyLine&&this.indent===e.indent,l=o&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(l&&n.sep&&!n.value){const u=[];for(let d=0;d<n.sep.length;++d){const p=n.sep[d];switch(p.type){case"newline":u.push(d);break;case"space":break;case"comment":p.indent>e.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(c=n.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":l||n.value?(c.push(this.sourceToken),e.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):l||n.value?(c.push(this.sourceToken),e.items.push({start:c,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Tr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(uv(n.key)&&!Tr(n.sep,"newline")){const u=ms(n.start),d=n.key,p=n.sep;p.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:d,sep:p}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(Tr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const u=ms(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||l?e.items.push({start:c,key:null,sep:[this.sourceToken]}):Tr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);l||n.value?(e.items.push({start:c,key:u,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(u):(Object.assign(n,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{const u=this.startBlockValue(e);if(u){o&&u.type!=="block-seq"&&e.items.push({start:c}),this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Tr(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const o=this.startBlockValue(e);if(o){this.stack.push(o);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":c
Line truncated
|
||||
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
||||
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Tl(e),r=ms(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Tl(e),r=ms(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function fv(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new cv||null,prettyErrors:e}}function lk(t,e={}){const{lineCounter:n,prettyErrors:r}=fv(e),o=new Bf(n==null?void 0:n.addNewLine),l=new Ff(e),c=Array.from(l.compose(o.parse(t)));if(r&&n)for(const u of c)u.errors.forEach(ea(t,n)),u.warnings.forEach(ea(t,n));return c.length>0?c:Object.assign([],{empty:!0},l.streamInfo())}function dv(t,e={}){const{lineCounter:n,prettyErrors:r}=fv(e),o=new Bf(n==null?void 0:n.addNewLine),l=new Ff(e);let c=null;for(const u of l.compose(o.parse(t),!0,t.length))if(!c)c=u;else if(c.options.logLevel!=="silent"){c.errors.push(new Ar(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(c.errors.forEach(ea(t,n)),c.warnings.forEach(ea(t,n))),c}function ak(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const o=dv(t,n);if(!o)return null;if(o.warnings.forEach(l=>My(o.options.logLevel,l)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function ck(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(t===void 0){const{keepUndefined:o}=n??e??{};if(!o)return}return Rr(t)&&!r?t.toString(n):new Bs(t,r,n).toString(n)}const hv=Object.freeze(Object.defineProperty({__proto__:null,Alias:ca,CST:sk,Composer:Ff,Document:Bs,Lexer:av,LineCounter:cv,Pair:ct,Parser:Bf,Scalar:ue,Schema:va,YAMLError:$f,YAMLMap:Lt,YAMLParseError:Ar,YAMLSeq:nr,YAMLWarning:Xy,isAlias:Or,isCollection:Re,isDocument:Rr,isMap:Rs,isNode:$e,isPair:je,isScalar:Te,isSeq:$s,parse:ak,parseAllDocuments:lk,parseDocument:dv,stringify:ck,visit:tr,visitAsync:aa},Symbol.toStringTag,{value:"Module"})),uk=({action:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const[u,d]=$.useState("action"),[p]=Nn("shouldPopulateCanvasFromScreenshot",!1),g=$.useMemo(()=>pk(t),[t]),{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}=$.useMemo(()=>{const S=g[u];return S?mk(S,p):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[g,u,p]),E=$.useMemo(()=>y!==void 0?{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}:void 0,[y,v,x]);return w.jsxs("div",{className:"snapshot-tab vbox",children:[w.jsxs(rf,{children:[w.jsx(Ht,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>o(!r)}),["action","before","after"].map(S=>w.jsx(yg,{id:S,title:hk(S),selected:u===S,onSelect:()=>d(S)},S)),w.jsx("div",{style:{flex:"auto"}}),w.jsx(Ht,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(E!=null&&E.popoutUrl),onClick:()=>{const S=window.open((E==null?void 0:E.popoutUrl)||"","_blank");S==null||S.addEventListener("DOMContentLoaded",()=>{new gy(S,{isUnderTest:mv,sdkLanguage:e,testIdAttributeName:n,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),w.jsx(fk,{snapshotUrls:E,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})]})},fk=({snapshotUrls:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const u=$.useRef(null),d=$.u
Line truncated
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
var fe={exports:{}},pe;function be(){return pe||(pe=1,function(he,Se){(function(te,J){he.exports=J()})(self,()=>(()=>{var te={4567:function(I,r,a){var c=this&&this.__decorate||function(i,o,l,v){var m,h=arguments.length,p=h<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,o,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(o,l,p):m(o,l))||p);return h>3&&p&&Object.defineProperty(o,l,p),p},_=this&&this.__param||function(i,o){return function(l,v){o(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=a(9042),d=a(6114),f=a(9924),g=a(844),u=a(5596),e=a(4725),s=a(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,o){super(),this._terminal=i,this._renderService=o,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);if(this._topBoundaryFocusListener=l=>this._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
||||
`))),this.register(this._terminal.onA11yTab(l=>this._handleTab(l))),this.register(this._terminal.onKey(l=>this._handleKey(l.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new u.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,s.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let o=0;o<i;o++)this._handleChar(" ")}_handleChar(i){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===`
|
||||
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(i)||this._charsToConsume.push(i)}_refreshRows(i,o){this._liveRegionDebouncer.refresh(i,o,this._terminal.rows)}_renderRows(i,o){const l=this._terminal.buffer,v=l.lines.length.toString();for(let m=i;m<=o;m++){const h=l.translateBufferLineToString(l.ydisp+m,!0),p=(l.ydisp+m+1).toString(),b=this._rowElements[m];b&&(h.length===0?b.innerText=" ":b.textContent=h,b.setAttribute("aria-posinset",p),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,o){const l=i.target,v=this._rowElements[o===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")===(o===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==v)return;let m,h;if(o===0?(m=l,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(m=this._rowElements.shift(),h=l,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),o===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(o===0?-1:1),this._rowElements[o===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let o=this._rowContainer.children.length;o<this._terminal.rows;o++)this._rowElements[o]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[o]);for(;this._rowElements.length>i;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}}_refreshRowDimensions(i){i.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=t=c([_(1,e.IRenderService)],t)},3614:(I,r)=>{function a(d){return d.replace(/\r?\n/g,"\r")}function c(d,f){return f?"\x1B[200~"+d+"\x1B[201~":d}function _(d,f,g,u){d=c(d=a(d),g.decPrivateModes.bracketedPasteMode&&u.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),f.value=""}function n(d,f,g){const u=g.getBoundingClientRect(),e=d.clientX-u.left-10,s=d.clientY-u.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${s}px`,f.style.zIndex="1000",f.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=a,r.bracketTextForPaste=c,r.copyHandler=function(d,f){d.clipboardData&&d.clipboardData.setData("text/plain",f.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,f,g,u){d.stopPropagation(),d.clipboardData&&_(d.clipboardData.getData("text/plain"),f,g,u)},r.paste=_,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,f,g,u,e){n(d,f,g),e&&u.rightClickSelect(d),f.value=u.selectionText,f.select()}},7239:(I,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const c=a(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(_,n,d){this._css.set(_,n,d)}getCss(_,n){return this._css.get(_,n)}setColor(_,n,d){this._color.set(_,n,d)}getColor(_,n){return this._color.get(_,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(I,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(a,c,_,n)
Line truncated
|
||||
|
||||
WARNING: This link could potentially be dangerous`)){const s=window.open();if(s){try{s.opener=null}catch{}s.location.href=e}else console.warn("Opening link blocked as opener could not be cleared")}}r.OscLinkProvider=f=c([_(0,d.IBufferService),_(1,d.IOptionsService),_(2,d.IOscLinkService)],f)},6193:(I,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderDebouncer=void 0,r.RenderDebouncer=class{constructor(a,c){this._parentWindow=a,this._renderCallback=c,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(a){return this._refreshCallbacks.push(a),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(a,c,_){this._rowCount=_,a=a!==void 0?a:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const a=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,c),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const a of this._refreshCallbacks)a(0);this._refreshCallbacks=[]}}},5596:(I,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ScreenDprMonitor=void 0;const c=a(844);class _ extends c.Disposable{constructor(d){super(),this._parentWindow=d,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,c.toDisposable)(()=>{this.clearListener()}))}setListener(d){this._listener&&this.clearListener(),this._listener=d,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var d;this._outerListener&&((d=this._resolutionMediaMatchList)===null||d===void 0||d.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)}}r.ScreenDprMonitor=_},3236:(I,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Terminal=void 0;const c=a(3614),_=a(3656),n=a(6465),d=a(9042),f=a(3730),g=a(1680),u=a(3107),e=a(5744),s=a(2950),t=a(1296),i=a(428),o=a(4269),l=a(5114),v=a(8934),m=a(3230),h=a(9312),p=a(4725),b=a(6731),L=a(8055),y=a(8969),k=a(8460),x=a(844),T=a(6114),O=a(8437),M=a(2584),C=a(7399),w=a(5941),E=a(9074),D=a(2585),P=a(5435),H=a(4567),U=typeof window<"u"?window.document:null;class W extends y.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(S={}){super(S),this.browser=T,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new x.MutableDisposable),this._onCursorMove=this.register(new k.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new k.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new k.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new k.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new k.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new k.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new k.EventEmitter),this._onBlur=this.register(new k.EventEmitter),this._onA11yCharEmitter=this.register(new k.EventEmitter),this._onA11yTabEmitter=this.register(new k.EventEmitter),this._onWillOpen=this.register(new k.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(n.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(f.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(E.DecorationService),this._instantiationService.setService(D.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((R,B)=>this.refresh(R,B))),this.r
Line truncated
|
||||
`:`
|
||||
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(h){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),s.isLinux&&h&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(h){const p=this._getMouseBufferCoords(h),b=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!!(b&&L&&p)&&this._areCoordsInSelection(p,b,L)}isCellInSelection(h,p){const b=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!b||!L)&&this._areCoordsInSelection([h,p],b,L)}_areCoordsInSelection(h,p,b){return h[1]>p[1]&&h[1]<b[1]||p[1]===b[1]&&h[1]===p[1]&&h[0]>=p[0]&&h[0]<b[0]||p[1]<b[1]&&h[1]===b[1]&&h[0]<b[0]||p[1]<b[1]&&h[1]===p[1]&&h[0]>=p[0]}_selectWordAtCursor(h,p){var b,L;const y=(L=(b=this._linkifier.currentLink)===null||b===void 0?void 0:b.link)===null||L===void 0?void 0:L.range;if(y)return this._model.selectionStart=[y.start.x-1,y.start.y-1],this._model.selectionStartLength=(0,t.getRangeLength)(y,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const k=this._getMouseBufferCoords(h);return!!k&&(this._selectWordAt(k,p),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(h,p){this._model.clearSelection(),h=Math.max(h,0),p=Math.min(p,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,h],this._model.selectionEnd=[this._bufferService.cols,p],this.refresh(),this._onSelectionChange.fire()}_handleTrim(h){this._model.handleTrim(h)&&this.refresh()}_getMouseBufferCoords(h){const p=this._mouseService.getCoords(h,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(p)return p[0]--,p[1]--,p[1]+=this._bufferService.buffer.ydisp,p}_getMouseEventScrollAmount(h){let p=(0,n.getCoordsRelativeToElement)(this._coreBrowserService.window,h,this._screenElement)[1];const b=this._renderService.dimensions.css.canvas.height;return p>=0&&p<=b?0:(p>b&&(p-=b),p=Math.min(Math.max(p,-50),50),p/=50,p/Math.abs(p)+Math.round(14*p))}shouldForceSelection(h){return s.isMac?h.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:h.shiftKey}handleMouseDown(h){if(this._mouseDownTimeStamp=h.timeStamp,(h.button!==2||!this.hasSelection)&&h.button===0){if(!this._enabled){if(!this.shouldForceSelection(h))return;h.stopPropagation()}h.preventDefault(),this._dragScrollAmount=0,this._enabled&&h.shiftKey?this._handleIncrementalClick(h):h.detail===1?this._handleSingleClick(h):h.detail===2?this._handleDoubleClick(h):h.detail===3&&this._handleTripleClick(h),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(h){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(h))}_handleSingleClick(h){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(h)?3:0,this._model.selectionStart=this._getMouseBufferCoords(h),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const p=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);p&&p.length!==this._model.selectionStart[0]&&p.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(h){this._selectWordAtCursor(h,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(h){const p=this._getMouseBufferCoords(h);p&&(this._activeSelectionMode=2,this._selectLineAt(p[1]))}shouldColumnSelect(h){return h.altKey&&!(s.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(h){if(h.stopImmediatePropagation(),!this._model.selectionStart)return;const p=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(h),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.sele
Line truncated
|
||||
`,n.VT="\v",n.FF="\f",n.CR="\r",n.SO="",n.SI="",n.DLE="",n.DC1="",n.DC2="",n.DC3="",n.DC4="",n.NAK="",n.SYN="",n.ETB="",n.CAN="",n.EM="",n.SUB="",n.ESC="\x1B",n.FS="",n.GS="",n.RS="",n.US="",n.SP=" ",n.DEL=""}(a||(r.C0=a={})),function(n){n.PAD="",n.HOP="",n.BPH="",n.NBH="",n.IND="",n.NEL="
",n.SSA="",n.ESA="",n.HTS="",n.HTJ="",n.VTS="",n.PLD="",n.PLU="",n.RI="",n.SS2="",n.SS3="",n.DCS="",n.PU1="",n.PU2="",n.STS="",n.CCH="",n.MW="",n.SPA="",n.EPA="",n.SOS="",n.SGCI="",n.SCI="",n.CSI="",n.ST="",n.OSC="",n.PM="",n.APC=""}(c||(r.C1=c={})),function(n){n.ST=`${a.ESC}\\`}(_||(r.C1_ESCAPED=_={}))},7399:(I,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;const c=a(2584),_={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};r.evaluateKeyboardEvent=function(n,d,f,g){const u={type:0,cancel:!1,key:void 0},e=(n.shiftKey?1:0)|(n.altKey?2:0)|(n.ctrlKey?4:0)|(n.metaKey?8:0);switch(n.keyCode){case 0:n.key==="UIKeyInputUpArrow"?u.key=d?c.C0.ESC+"OA":c.C0.ESC+"[A":n.key==="UIKeyInputLeftArrow"?u.key=d?c.C0.ESC+"OD":c.C0.ESC+"[D":n.key==="UIKeyInputRightArrow"?u.key=d?c.C0.ESC+"OC":c.C0.ESC+"[C":n.key==="UIKeyInputDownArrow"&&(u.key=d?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:if(n.altKey){u.key=c.C0.ESC+c.C0.DEL;break}u.key=c.C0.DEL;break;case 9:if(n.shiftKey){u.key=c.C0.ESC+"[Z";break}u.key=c.C0.HT,u.cancel=!0;break;case 13:u.key=n.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,u.cancel=!0;break;case 27:u.key=c.C0.ESC,n.altKey&&(u.key=c.C0.ESC+c.C0.ESC),u.cancel=!0;break;case 37:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"D",u.key===c.C0.ESC+"[1;3D"&&(u.key=c.C0.ESC+(f?"b":"[1;5D"))):u.key=d?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"C",u.key===c.C0.ESC+"[1;3C"&&(u.key=c.C0.ESC+(f?"f":"[1;5C"))):u.key=d?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"A",f||u.key!==c.C0.ESC+"[1;3A"||(u.key=c.C0.ESC+"[1;5A")):u.key=d?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"B",f||u.key!==c.C0.ESC+"[1;3B"||(u.key=c.C0.ESC+"[1;5B")):u.key=d?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:n.shiftKey||n.ctrlKey||(u.key=c.C0.ESC+"[2~");break;case 46:u.key=e?c.C0.ESC+"[3;"+(e+1)+"~":c.C0.ESC+"[3~";break;case 36:u.key=e?c.C0.ESC+"[1;"+(e+1)+"H":d?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:u.key=e?c.C0.ESC+"[1;"+(e+1)+"F":d?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:n.shiftKey?u.type=2:n.ctrlKey?u.key=c.C0.ESC+"[5;"+(e+1)+"~":u.key=c.C0.ESC+"[5~";break;case 34:n.shiftKey?u.type=3:n.ctrlKey?u.key=c.C0.ESC+"[6;"+(e+1)+"~":u.key=c.C0.ESC+"[6~";break;case 112:u.key=e?c.C0.ESC+"[1;"+(e+1)+"P":c.C0.ESC+"OP";break;case 113:u.key=e?c.C0.ESC+"[1;"+(e+1)+"Q":c.C0.ESC+"OQ";break;case 114:u.key=e?c.C0.ESC+"[1;"+(e+1)+"R":c.C0.ESC+"OR";break;case 115:u.key=e?c.C0.ESC+"[1;"+(e+1)+"S":c.C0.ESC+"OS";break;case 116:u.key=e?c.C0.ESC+"[15;"+(e+1)+"~":c.C0.ESC+"[15~";break;case 117:u.key=e?c.C0.ESC+"[17;"+(e+1)+"~":c.C0.ESC+"[17~";break;case 118:u.key=e?c.C0.ESC+"[18;"+(e+1)+"~":c.C0.ESC+"[18~";break;case 119:u.key=e?c.C0.ESC+"[19;"+(e+1)+"~":c.C0.ESC+"[19~";break;case 120:u.key=e?c.C0.ESC+"[20;"+(e+1)+"~":c.C0.ESC+"[20~";break;case 121:u.key=e?c.C0.ESC+"[21;"+(e+1)+"~":c.C0.ESC+"[21~";break;case 122:u.key=e?c.C0.ESC+"[23;"+(e+1)+"~":c.C0.ESC+"[23~";break;case 123:u.key=e?c.C0.ESC+"[24;"+(e+1)+"~":c.C0.ESC+"[24~";break;default:if(!n.ctrlKey||n.shiftKey||n.altKey||n.metaKey)if(f&&!g||!n.altKey||n.metaKey)!f||n.altKey||n.ctrlKey||n.shiftKey||!n.metaKey?n.key&&!n.ctrlKey&&!n.altKey&&!n.metaKey&&n.keyCode>=48&&n.key.length===1?u.key=n.key:n.key&&n.ctrlKey&&(n.key==="_"&&(u.key=c.C0.US),n.key==="@"&&(u.key=c.C0.NUL)):n.keyCode===65&&(u.type=1);else{const s=_[n.keyCode],t=s==null?void 0:s[n.shiftKey?1:0];if(t)u.key=c.C0.ESC+t;else if(n.keyCode>=65&&n.keyCode<=90){const i=n.ctrlKey?n.keyCode-64:n.keyCode+32;let o=String.fromCharCode(i);n.shiftKey&&(o=o.toUpperCase()),u.key=c.C0.ESC+o}else if(n.keyCode===32)u.key=c.C0.ESC+(n.ctrlKey?c.C0.NUL:" ");else if(n.key==="Dead"&&n.code.startsWith("Key")){let i=n.code.slice(3,4);n.shiftKey||(i=i.toLowerCase()),u.key=c.C0.ESC+i,u.cancel=!0}}else n.keyCode>=65&&n.keyCode<=90?u.key=String.fromCharCode(n.keyCode-64):n.keyCode===32?u.key=c.C0.NUL:n.keyCode>=51&&n.keyCode<=55?u.key=String.fromCharCode(n.keyCode-51+27):n.keyCode===56?u.key=c.C0.DEL:n.keyCode===219?u.key=c.C0.ESC:n.keyCode===220?u.key=c.C0.FS:n.keyCode===221&&(u.key=c.C0.GS)}return u}},482:(I,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10Line truncated
|
||||
`,t)}paste(s){this._core.paste(s)}refresh(s,t){this._verifyIntegers(s,t),this._core.refresh(s,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(s){this._addonManager.loadAddon(this,s)}static get strings(){return r}_verifyIntegers(...s){for(const t of s)if(t===1/0||isNaN(t)||t%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...s){for(const t of s)if(t&&(t===1/0||isNaN(t)||t%1!=0||t<0))throw new Error("This API only accepts positive integers")}}I.Terminal=u})(),Z})())}(fe)),fe.exports}var ye=be(),ve={exports:{}},ge;function we(){return ge||(ge=1,function(he,Se){(function(te,J){he.exports=J()})(self,function(){return(()=>{var te={};return(()=>{var J=te;Object.defineProperty(J,"__esModule",{value:!0}),J.FitAddon=void 0,J.FitAddon=class{constructor(){}activate(q){this._terminal=q}dispose(){}fit(){const q=this.proposeDimensions();if(!q||!this._terminal||isNaN(q.cols)||isNaN(q.rows))return;const Z=this._terminal._core;this._terminal.rows===q.rows&&this._terminal.cols===q.cols||(Z._renderService.clear(),this._terminal.resize(q.cols,q.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const q=this._terminal._core,Z=q._renderService.dimensions;if(Z.css.cell.width===0||Z.css.cell.height===0)return;const I=this._terminal.options.scrollback===0?0:q.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(r.getPropertyValue("height")),c=Math.max(0,parseInt(r.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),n=a-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),d=c-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-I;return{cols:Math.max(2,Math.floor(d/Z.css.cell.width)),rows:Math.max(1,Math.floor(n/Z.css.cell.height))}}}})(),te})()})}(ve)),ve.exports}var Ee=we();const ke={Terminal:ye.Terminal,FitAddon:Ee.FitAddon};export{ke as default};
|
||||
+1
@@ -0,0 +1 @@
|
||||
.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:#ff96004d}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:coLine truncated
|
||||
BIN
Binary file not shown.
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
:root{color-scheme:light dark}body{--transparent-blue: #2196F355;--light-pink: #ff69b460;--gray: #888888;--sidebar-width: 250px;--box-shadow: rgba(0, 0, 0, .133) 0px 1.6px 3.6px 0px, rgba(0, 0, 0, .11) 0px .3px .9px 0px}html,body{width:100%;height:100%;padding:0;margin:0;overflow:hidden;display:flex;overscroll-behavior-x:none}#root{width:100%;height:100%;display:flex}body,dialog{background-color:var(--vscode-panel-background);color:var(--vscode-foreground);font-family:var(--vscode-font-family);font-weight:var(--vscode-font-weight);font-size:var(--vscode-font-size);-webkit-font-smoothing:antialiased}a{color:var(--vscode-textLink-foreground)}dialog{border:none;padding:0;box-shadow:var(--box-shadow);line-height:28px;max-width:400px}dialog .title{display:flex;align-items:center;margin:0;padding:0 5px;height:32px;background-color:var(--vscode-sideBar-background);max-width:400px}dialog .title .codicon{margin-right:3px}dialog .body{padding:10px;text-align:center}.button{color:var(--vscode-button-foreground);background:var(--vscode-button-background);margin:10px;border:none;height:28px;min-width:40px;cursor:pointer;-webkit-user-select:none;user-select:none}.button:focus{outline:1px solid var(--vscode-focusBorder)}.button:hover{background:var(--vscode-button-hoverBackground)}.button.secondary{color:var(--vscode-button-secondaryForeground);background:var(--vscode-button-secondaryBackground)}.button.secondary:hover{background:var(--vscode-button-secondaryHoverBackground)}*{box-sizing:border-box;min-width:0;min-height:0}*[hidden],.hidden{display:none!important}.invisible{visibility:hidden!important}svg{fill:currentColor}.vbox{display:flex;flex-direction:column;flex:auto;position:relative}.fill{position:absolute;top:0;right:0;bottom:0;left:0}.hbox{display:flex;flex:auto;position:relative}.spacer{flex:auto}.codicon-check{color:var(--vscode-charts-green)}.codicon-error{color:var(--vscode-errorForeground)}.codicon-warning{color:var(--vscode-list-warningForeground)}.codicon-circle-outline{color:var(--vscode-disabledForeground)}input[type=text],input[type=search]{color:var(--vscode-input-foreground);background-color:var(--vscode-input-background);border:none;outline:none}body.dark-mode ::-webkit-scrollbar{width:10px}body.dark-mode ::-webkit-scrollbar-thumb{background-color:#555}body.dark-mode ::-webkit-scrollbar-track{background-color:#333}body.dark-mode ::-webkit-scrollbar-thumb:hover{background-color:#777}body.dark-mode ::-webkit-scrollbar-track:hover{background-color:#444}.codicon-loading{animation:spin 1s infinite linear}::placeholder{color:var(--vscode-input-placeholderForeground)}@keyframes spin{to{transform:rotate(360deg)}}@font-face{font-family:codicon;src:url(./codicon.DCmgc-ay.ttf) format("truetype")}.codicon{font: 16px/1 codicon;flex:none;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.codicon-add:before{content:""}.codicon-plus:before{content:""}.codicon-gist-new:before{content:""}.codicon-repo-create:before{content:""}.codicon-lightbulb:before{content:""}.codicon-light-bulb:before{content:""}.codicon-repo:before{content:""}.codicon-repo-delete:before{content:""}.codicon-gist-fork:before{content:""}.codicon-repo-forked:before{content:""}.codicon-git-pull-request:before{content:""}.codicon-git-pull-request-abandoned:before{content:""}.codicon-record-keys:before{content:""}.codicon-keyboard:before{content:""}.codicon-tag:before{content:""}.codicon-git-pull-request-label:before{content:""}.codicon-tag-add:before{content:""}.codicon-tag-remove:before{content:""}.codicon-person:before{content:""}.codicon-person-follow:before{content:""}.codicon-person-outline:before{content:""}.codicon-person-filled:before{content:""}.codicon-git-branch:before{content:""}.codicon-git-branch-create:before{content:""}.codicon-git-branch-delete:before{content:""}.codicon-source-control:before{content:""}.codicon-mirror:before{content:""}.codicon-mirror-public:before{content:""}.codicon-star:before{content:""}.codicon-star-add:before{content:""}.codicon-star-delete:before{content:""}.codicon-star-empty:before{content:""}.codicon-comment:before{content:""}.codicon-comment-add:before{content:""}.codicon-alert:before{content:""}.codicon-warning:before{content:""}.codicon-search:before{content:""}.codicon-search-save:before{content:""}.codicon-log-out:before{content:""}.codicon-sign-out:before{content:""}.codicon-log-in:before{content:""}.codicon-sign-in:before{content:""}.codicon-eye:before{content:""}.codicon-eye-unwatch:before{content:""}.codicon-eye-watch:before{content:""}.codicon-circle-filled:before{content:""}.codicon-primitive-dot:before{content:""}.codicon-close-dirty:before{content:""}.codicon-debug-breakpLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
.drop-target{display:flex;align-items:center;justify-content:center;flex:auto;flex-direction:column;background-color:var(--vscode-editor-background);position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;line-height:24px}body .drop-target{background:#fffc}body.dark-mode .drop-target{background:#000c}.drop-target .title{font-size:24px;font-weight:700;margin-bottom:30px}.drop-target .processing-error{font-size:24px;color:#e74c3c;font-weight:700;text-align:center;margin:30px}.drop-target input{margin-top:50px}.drop-target button{color:#fff;background-color:#007acc;padding:8px 12px;border:none;margin:30px 0;cursor:pointer}.progress-dialog{width:400px;top:0;right:0;bottom:0;left:0;border:none;outline:none;background-color:var(--vscode-sideBar-background)}.progress-dialog::backdrop{background-color:#0006}.progress-content{padding:16px}.progress-content .title{background-color:unset;font-size:18px;font-weight:700;padding:0}.progress-wrapper{background-color:var(--vscode-commandCenter-activeBackground);width:100%;margin-top:16px;margin-bottom:8px}.inner-progress{background-color:var(--vscode-progressBar-background);height:4px}.header{display:flex;background-color:#000;flex:none;flex-basis:48px;line-height:48px;font-size:16px;color:#ccc}.workbench-loader{contain:size}.workbench-loader .header .toolbar-button{margin:12px;padding:8px 4px}.workbench-loader .logo{margin-left:16px;display:flex;align-items:center}.workbench-loader .logo img{height:32px;width:32px;pointer-events:none;flex:none}.workbench-loader .product{font-weight:600;margin-left:16px;flex:none}.workbench-loader .header .title{margin-left:16px;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}html,body{min-width:550px;min-height:450px;overflow:auto}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import{r,j as e,T as z,D as I,M as k,a as A,W as O,b as F,c as V,d as $}from"./assets/defaultSettingsView-Do_wwdKw.js";const M=({className:n,style:o,open:s,isModal:a,width:l,verticalOffset:m,requestClose:u,anchor:x,dataTestId:p,children:T})=>{const g=r.useRef(null),[E,b]=r.useState(0);let j=o;if(x!=null&&x.current){const h=x.current.getBoundingClientRect();j={position:"fixed",margin:0,top:h.bottom+(m??0),left:G(h,l??0),width:l,zIndex:1,...o}}return r.useEffect(()=>{const h=y=>{!g.current||!(y.target instanceof Node)||g.current.contains(y.target)||u==null||u()},L=y=>{y.key==="Escape"&&(u==null||u())};return s?(document.addEventListener("mousedown",h),document.addEventListener("keydown",L),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",L)}):()=>{}},[s,u]),r.useEffect(()=>{const h=()=>b(L=>L+1);return window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[]),r.useLayoutEffect(()=>{g.current&&(s?a?g.current.showModal():g.current.show():g.current.close())},[s,a]),e.jsx("dialog",{ref:g,style:j,className:n,"data-testid":p,children:T})},G=(n,o)=>{const s=U(n,o,"left");if(s.inBounds)return s.value;const a=U(n,o,"right");return a.inBounds?a.value:s.value},U=(n,o,s)=>{const a=document.documentElement.clientWidth;if(s==="left"){const l=n.left;return{value:l,inBounds:l+o<=a}}else return{value:n.right-o,inBounds:n.right-o>=0}},H=()=>{const n=r.useRef(null),[o,s]=r.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(z,{ref:n,icon:"settings-gear",title:"Settings",onClick:()=>s(a=>!a)}),e.jsx(M,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:o,width:200,verticalOffset:8,requestClose:()=>s(!1),anchor:n,dataTestId:"settings-toolbar-dialog",children:e.jsx(I,{})})]})},K=()=>{const[n,o]=r.useState(!1),[s,a]=r.useState([]),[l,m]=r.useState([]),[u,x]=r.useState(W),[p,T]=r.useState({done:0,total:0}),[g,E]=r.useState(!1),[b,j]=r.useState(null),[h,L]=r.useState(null),[y,N]=r.useState(!1),S=r.useCallback(t=>{const c=[],d=[],i=new URL(window.location.href);for(let f=0;f<t.length;f++){const w=t.item(f);if(!w)continue;const P=URL.createObjectURL(w);c.push(P),d.push(w.name),i.searchParams.append("trace",P),i.searchParams.append("traceFileName",w.name)}const v=i.toString();window.history.pushState({},"",v),a(c),m(d),E(!1),j(null)},[]);r.useEffect(()=>{const t=async c=>{var d;if((d=c.clipboardData)!=null&&d.files.length){for(const i of c.clipboardData.files)if(i.type!=="application/zip")return;c.preventDefault(),S(c.clipboardData.files)}};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),r.useEffect(()=>{const t=c=>{const{method:d,params:i}=c.data;if(d!=="load"||!((i==null?void 0:i.trace)instanceof Blob))return;const v=new File([i.trace],"trace.zip",{type:"application/zip"}),f=new DataTransfer;f.items.add(v),S(f.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const B=r.useCallback(t=>{t.preventDefault(),S(t.dataTransfer.files)},[S]),C=r.useCallback(t=>{t.preventDefault(),t.target.files&&S(t.target.files)},[S]);r.useEffect(()=>{const t=new URL(window.location.href).searchParams,c=t.getAll("trace");o(t.has("isServer"));for(const d of c)if(d.startsWith("file:")){L(d||null);return}if(t.has("isServer")){const d=new URLSearchParams(window.location.search).get("ws"),i=new URL(`../${d}`,window.location.toString());i.protocol=window.location.protocol==="https:"?"wss:":"ws:";const v=new A(new O(i));v.onLoadTraceRequested(async f=>{a(f.traceUrl?[f.traceUrl]:[]),E(!1),j(null)}),v.initialize({}).catch(()=>{})}else c.some(d=>d.startsWith("blob:"))||a(c)},[]),r.useEffect(()=>{(async()=>{if(s.length){const t=i=>{i.data.method==="progress"&&T(i.data.params)};navigator.serviceWorker.addEventListener("message",t),T({done:0,total:1});const c=[];for(let i=0;i<s.length;i++){const v=s[i],f=new URLSearchParams;f.set("trace",v),l.length&&f.set("traceFileName",l[i]),f.set("limit",String(s.length));const w=await fetch(`contexts?${f.toString()}`);if(!w.ok){n||a([]),j((await w.json()).error);return}c.push(...await w.json())}navigator.serviceWorker.removeEventListener("message",t);const d=new k(c);T({done:0,total:0}),x(d)}else x(W)})()},[n,s,l]);const D=p.done!==p.total&&p.total!==0;r.useEffect(()=>{if(D){const t=setTimeout(()=>{N(!0)},200);return()=>clearTimeout(t)}else N(!1)},[D]);const R=!!(!n&&!g&&!h&&(!s.length||b));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),E(!0)},children:[e.jsxs("div",{className:"hbox header",...R?{inert:"true"}:{},children:[e.jsx("div",{className:"logo",children:e.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"})}),e.jsx("div",{className:"product",children:"Playwright"}),u.title&&e.jsx("div",{className:"title",children:u.title}),e.jsx("div",{className:"spacer"}),e.jsx(H,{})]}),e.jsx(F,{model:u,inert:R}),h&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{children:"Trace Viewer uses
Line truncated
|
||||
Make sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(l=>{navigator.serviceWorker.oncontrollerchange=()=>l()}),setInterval(function(){fetch("ping")},1e4)}const o=n.get("trace"),a=(o==null?void 0:o.endsWith(".json"))?e.jsx(_,{traceJson:o}):e.jsx(K,{});$.createRoot(document.querySelector("#root")).render(a)})();
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" translate="no">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="./playwright-logo.svg" type="image/svg+xml">
|
||||
<link rel="manifest" href="./manifest.webmanifest">
|
||||
<title>Playwright Trace Viewer</title>
|
||||
<script type="module" crossorigin src="./index.BZPYnuWQ.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-Do_wwdKw.js">
|
||||
<link rel="stylesheet" crossorigin href="./defaultSettingsView.DVJHpiGt.css">
|
||||
<link rel="stylesheet" crossorigin href="./index.BFsek2M6.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<dialog id="fallback-error">
|
||||
<p>The Playwright Trace Viewer must be loaded over the <code>http://</code> or <code>https://</code> protocols.</p>
|
||||
<p>For more information, please see the <a href="https://aka.ms/playwright/trace-viewer-file-protocol">docs</a>.</p>
|
||||
</dialog>
|
||||
<script>
|
||||
if (!/^https?:/.test(window.location.protocol)) {
|
||||
const fallbackErrorDialog = document.getElementById('fallback-error');
|
||||
const isTraceViewerInsidePlaywrightReport = window.location.protocol === 'file:' && window.location.pathname.endsWith('/trace/index.html');
|
||||
// Best-effort to show the report path in the dialog.
|
||||
if (isTraceViewerInsidePlaywrightReport) {
|
||||
const reportPath = (() => {
|
||||
const base = window.location.pathname.replace(/\/trace\/index\.html$/, '');
|
||||
if (navigator.platform === 'Win32')
|
||||
return base.replace(/^\//, '').replace(/\//g, '\\\\');
|
||||
return base;
|
||||
})();
|
||||
const reportLink = document.createElement('div');
|
||||
const command = `npx playwright show-report ${reportPath}`;
|
||||
reportLink.innerHTML = `You can open the report via <code>${command}</code> from your Playwright project. <button type="button">Copy Command</button>`;
|
||||
fallbackErrorDialog.insertBefore(reportLink, fallbackErrorDialog.children[1]);
|
||||
reportLink.querySelector('button').addEventListener('click', () => navigator.clipboard.writeText(command));
|
||||
}
|
||||
fallbackErrorDialog.show();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<svg width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M136.444 221.556C123.558 225.213 115.104 231.625 109.535 238.032C114.869 233.364 122.014 229.08 131.652 226.348C141.51 223.554 149.92 223.574 156.869 224.915V219.481C150.941 218.939 144.145 219.371 136.444 221.556ZM108.946 175.876L61.0895 188.484C61.0895 188.484 61.9617 189.716 63.5767 191.36L104.153 180.668C104.153 180.668 103.578 188.077 98.5847 194.705C108.03 187.559 108.946 175.876 108.946 175.876ZM149.005 288.347C81.6582 306.486 46.0272 228.438 35.2396 187.928C30.2556 169.229 28.0799 155.067 27.5 145.928C27.4377 144.979 27.4665 144.179 27.5336 143.446C24.04 143.657 22.3674 145.473 22.7077 150.721C23.2876 159.855 25.4633 174.016 30.4473 192.721C41.2301 233.225 76.8659 311.273 144.213 293.134C158.872 289.185 169.885 281.992 178.152 272.81C170.532 279.692 160.995 285.112 149.005 288.347ZM161.661 128.11V132.903H188.077C187.535 131.206 186.989 129.677 186.447 128.11H161.661Z" fill="#2D4552"/>
|
||||
<path d="M193.981 167.584C205.861 170.958 212.144 179.287 215.465 186.658L228.711 190.42C228.711 190.42 226.904 164.623 203.57 157.995C181.741 151.793 168.308 170.124 166.674 172.496C173.024 167.972 182.297 164.268 193.981 167.584ZM299.422 186.777C277.573 180.547 264.145 198.916 262.535 201.255C268.89 196.736 278.158 193.031 289.837 196.362C301.698 199.741 307.976 208.06 311.307 215.436L324.572 219.212C324.572 219.212 322.736 193.41 299.422 186.777ZM286.262 254.795L176.072 223.99C176.072 223.99 177.265 230.038 181.842 237.869L274.617 263.805C282.255 259.386 286.262 254.795 286.262 254.795ZM209.867 321.102C122.618 297.71 133.166 186.543 147.284 133.865C153.097 112.156 159.073 96.0203 164.029 85.204C161.072 84.5953 158.623 86.1529 156.203 91.0746C150.941 101.747 144.212 119.124 137.7 143.45C123.586 196.127 113.038 307.29 200.283 330.682C241.406 341.699 273.442 324.955 297.323 298.659C274.655 319.19 245.714 330.701 209.867 321.102Z" fill="#2D4552"/>
|
||||
<path d="M161.661 262.296V239.863L99.3324 257.537C99.3324 257.537 103.938 230.777 136.444 221.556C146.302 218.762 154.713 218.781 161.661 220.123V128.11H192.869C189.471 117.61 186.184 109.526 183.423 103.909C178.856 94.612 174.174 100.775 163.545 109.665C156.059 115.919 137.139 129.261 108.668 136.933C80.1966 144.61 57.179 142.574 47.5752 140.911C33.9601 138.562 26.8387 135.572 27.5049 145.928C28.0847 155.062 30.2605 169.224 35.2445 187.928C46.0272 228.433 81.663 306.481 149.01 288.342C166.602 283.602 179.019 274.233 187.626 262.291H161.661V262.296ZM61.0848 188.484L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6614 203.743 61.0848 188.484 61.0848 188.484Z" fill="#E2574C"/>
|
||||
<path d="M341.786 129.174C329.345 131.355 299.498 134.072 262.612 124.185C225.716 114.304 201.236 97.0224 191.537 88.8994C177.788 77.3834 171.74 69.3802 165.788 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.098C297.093 344.47 343.53 242.92 357.644 190.238C364.157 165.917 367.013 147.5 367.799 135.625C368.695 122.173 359.455 126.078 341.786 129.174ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756ZM223.42 268.713C182.403 256.698 176.077 223.99 176.077 223.99L286.262 254.796C286.262 254.791 264.021 280.578 223.42 268.713ZM262.377 201.495C262.377 201.495 276.107 180.126 299.422 186.773C322.736 193.411 324.572 219.208 324.572 219.208L262.377 201.495Z" fill="#2EAD33"/>
|
||||
<path d="M139.88 246.04L99.3324 257.532C99.3324 257.532 103.737 232.44 133.607 222.496L110.647 136.33L108.663 136.933C80.1918 144.611 57.1742 142.574 47.5704 140.911C33.9554 138.563 26.834 135.572 27.5001 145.929C28.08 155.063 30.2557 169.224 35.2397 187.929C46.0225 228.433 81.6583 306.481 149.005 288.342L150.989 287.719L139.88 246.04ZM61.0848 188.485L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6615 203.743 61.0848 188.485 61.0848 188.485Z" fill="#D65348"/>
|
||||
<path d="M225.27 269.163L223.415 268.712C182.398 256.698 176.072 223.99 176.072 223.99L232.89 239.872L262.971 124.281L262.607 124.185C225.711 114.304 201.232 97.0224 191.532 88.8994C177.783 77.3834 171.735 69.3802 165.783 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.097L211.655 321.5L225.27 269.163ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756Z" fill="#1D8D22"/>
|
||||
<path d="M141.946 245.451L131.072 248.537C133.641 263.019 138.169 276.917 145.276 289.195C146.513 288.922 147.74 288.687 149 288.342C152.302 287.451 155.364 286.348 158.312 285.145C150.371 273.361 145.118 259.789 141.946 245.451ZM137.7 143.451C132.112 164.307 127.113 194.326 128.489 224.436C130.952 223.367 133.554 222.371 136.444 221.551L138.457 221.101C136.003 188.939 141.308 156.165 147.284 133.866C148.799 128.225 150.318 122.978 151.832 118.085C149.393 119.637 146.767 121.228 143.776 122.867C141.759 129.093 139.722 135.898 137.7 143.451Z" fill="#C04B41"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
+21
@@ -0,0 +1,21 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<body>
|
||||
<script>
|
||||
(async () => {
|
||||
if (!navigator.serviceWorker)
|
||||
throw new Error(`Service workers are not supported.\nMake sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);
|
||||
navigator.serviceWorker.register('sw.bundle.js');
|
||||
if (!navigator.serviceWorker.controller)
|
||||
await new Promise(f => navigator.serviceWorker.oncontrollerchange = f);
|
||||
const traceUrl = new URL(location.href).searchParams.get('trace');
|
||||
const params = new URLSearchParams();
|
||||
params.set('trace', traceUrl);
|
||||
await fetch('contexts?' + params.toString()).then(r => r.json());
|
||||
await location.reload();
|
||||
})();
|
||||
</script>
|
||||
<script src="stall.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
var Ys=Object.defineProperty;var Vs=(n,t,e)=>t in n?Ys(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var L=(n,t,e)=>Vs(n,typeof t!="symbol"?t+"":t,e);function Gs(n,t){const e=new Array(t.length).fill(0);return new Array(t.length).fill(0).map((s,r)=>(i,a)=>{e[r]=i/a*t[r]*1e3,n(e.reduce((c,l)=>c+l,0),1e3)})}const vn={"&":"&","<":"<",">":">",'"':""","'":"'"};function Zs(n){return n.replace(/[&<>"']/ug,t=>vn[t])}function Ks(n){return n.replace(/[&<]/ug,t=>vn[t])}function Lt(n,t,e){return n.find((s,r)=>{if(r===n.length-1)return!0;const i=n[r+1];return Math.abs(t(s)-e)<Math.abs(t(i)-e)})}function Ln(n){return Array.isArray(n)&&typeof n[0]=="string"}function Xs(n){return Array.isArray(n)&&Array.isArray(n[0])}class $s{constructor(t,e,s,r,i){L(this,"_htmlCache");L(this,"_snapshots");L(this,"_index");L(this,"snapshotName");L(this,"_resources");L(this,"_snapshot");L(this,"_callId");L(this,"_screencastFrames");this._htmlCache=t,this._resources=e,this._snapshots=s,this._index=i,this._snapshot=s[i],this._callId=s[i].callId,this._screencastFrames=r,this.snapshotName=s[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){var r;const{wallTime:t,timestamp:e}=this.snapshot(),s=t&&((r=this._screencastFrames[0])!=null&&r.frameSwapWallTime)?Lt(this._screencastFrames,i=>i.frameSwapWallTime,t):Lt(this._screencastFrames,i=>i.timestamp,e);return s==null?void 0:s.sha1}render(){const t=[],e=(i,a,c,l)=>{if(typeof i=="string"){c==="STYLE"||c==="style"?t.push(rr(tr(i))):t.push(Ks(i));return}if(Xs(i)){const _=a-i[0][0];if(_>=0&&_<=a){const f=Qs(this._snapshots[_]),b=i[0][1];if(b>=0&&b<f.length)return e(f[b],_,c,l)}}else if(Ln(i)){const[_,f,...b]=i,h=_==="NOSCRIPT"?"X-NOSCRIPT":_,S=Object.entries(f||{});t.push("<",h);const C="__playwright_current_src__",u=h==="IFRAME"||h==="FRAME",o=h==="A",d=h==="IMG",y=d&&S.some(m=>m[0]===C),g=h==="SOURCE"&&c==="PICTURE"&&(l==null?void 0:l.some(m=>m[0]===C));for(const[m,E]of S){let p=m;u&&m.toLowerCase()==="src"&&(p="__playwright_src__"),d&&m===C&&(p="src"),["src","srcset"].includes(m.toLowerCase())&&(y||g)&&(p="_"+p);let R=E;o&&m.toLowerCase()==="href"?R="link://"+E:(m.toLowerCase()==="href"||m.toLowerCase()==="src"||m===C)&&(R=rt(E)),t.push(" ",p,'="',Zs(R),'"')}t.push(">");for(const m of b)e(m,a,h,S);Js.has(h)||t.push("</",h,">");return}else return},s=this._snapshot;return{html:this._htmlCache.getOrCompute(this,()=>{e(s.html,this._index,void 0,void 0);const a=(s.doctype?`<!DOCTYPE ${s.doctype}>`:"")+["<style>*,*::before,*::after { visibility: hidden }</style>",`<script>${zs(this.viewport(),this._callId,this.snapshotName)}<\/script>`].join("")+t.join("");return{value:a,size:a.length}}),pageId:s.pageId,frameId:s.frameId,index:this._index}}resourceByUrl(t,e){const s=this._snapshot;let r,i;for(const c of this._resources){if(typeof c._monotonicTime=="number"&&c._monotonicTime>=s.timestamp)break;c.response.status!==304&&c.request.url===t&&c.request.method===e&&(c._frameref===s.frameId?r=c:i=c)}let a=r??i;if(a&&e.toUpperCase()==="GET"){for(const c of s.resourceOverrides)if(t===c.url&&c.sha1){a={...a,response:{...a.response,content:{...a.response.content,_sha1:c.sha1}}};break}}return a}}const Js=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]);function Qs(n){if(!n._nodes){const t=[],e=s=>{if(typeof s=="string")t.push(s);else if(Ln(s)){const[,,...r]=s;for(const i of r)e(i);t.push(s)}};e(n.html),n._nodes=t}return n._nodes}function zs(n,...t){function e(s,r,...i){const a=new URLSearchParams(location.search),c=a.has("shouldPopulateCanvasFromScreenshot"),l=a.has("isUnderTest"),_={viewport:r,frames:new WeakMap};window.__playwright_frame_bounding_rects__=_;const f="Recorded click position in absolute coordinates did not match the center of the clicked element. This is likely due to a difference between the test runner and the trace viewer operating systems.",b=[],h=[],S=[],C=[];let u=window;for(;u!==u.parent&&!u.location.pathname.match(/\/page@[a-z0-9]+$/);)u=u.parent;const o=g=>{for(const m of g.querySelectorAll("[__playwright_scroll_top_]"))b.push(m);for(const m of g.querySelectorAll("[__playwright_scroll_left_]"))h.push(m);for(const m of g.querySelectorAll("[__playwright_value_]")){const E=m;E.type!=="file"&&(E.value=E.getAttribute("__playwright_value_")),m.removeAttribute("__playwright_value_")}for(const m of g.querySelectorAll("[__playwright_checked_]"))m.checked=m.getAttribute("__playwright_checked_")==="true",m.removeAttribute("__playwright_checked_");for(const m of g.querySelectorAll("[__playwright_selected_]"))m.selected=m.getAttribute("__playwright_selected_")==="true",m.removeAttribute("__playwright_selected_");for(const m of g.querySelectorAll("[__playwright_popover_open_]")){try{m.showPopover()}catch{}m.removeAttribute("__playwright_popover_open_")}for(const m of g.querySelectorAll("[__playwrigLine truncated
|
||||
(${e.toString()})(${it.toString()}, ${JSON.stringify(n)}${t.map(s=>`, "${s}"`).join("")})`}const Fn=["about:","blob:","data:","file:","ftp:","http:","https:","mailto:","sftp:","ws:","wss:"],Ft="http://playwright.bloburl/#";function rt(n){n.startsWith(Ft)&&(n=n.substring(Ft.length));try{const t=new URL(n);if(t.protocol==="javascript:"||t.protocol==="vbscript:")return"javascript:void(0)";const e=t.protocol==="blob:",s=t.protocol==="file:";if(!e&&!s&&Fn.includes(t.protocol))return n;const r="pw-"+t.protocol.slice(0,t.protocol.length-1);return s||(t.protocol="https:"),t.hostname=t.hostname?`${r}--${t.hostname}`:r,s&&(t.protocol="https:"),t.toString()}catch{return n}}const er=/url\(['"]?([\w-]+:)\/\//ig;function tr(n){return n.replace(er,(t,e)=>!(e==="blob:")&&!(e==="file:")&&Fn.includes(e)?t:t.replace(e+"//",`https://pw-${e.slice(0,-1)}--`))}const nr=/url\(\s*'([^']*)'\s*\)/ig,sr=/url\(\s*"([^"]*)"\s*\)/ig;function rr(n){const t=(e,s)=>s.includes("</")?e.replace(s,encodeURI(s)):e;return n.replace(nr,t).replace(sr,t)}function it(n){const t=new URL(n);return t.pathname.endsWith("/snapshot.html")?t.searchParams.get("r"):n}class ir{constructor(t,e){L(this,"_snapshotStorage");L(this,"_resourceLoader");L(this,"_snapshotIds",new Map);this._snapshotStorage=t,this._resourceLoader=e}serveSnapshot(t,e,s){const r=this._snapshot(t,e);if(!r)return new Response(null,{status:404});const i=r.render();return this._snapshotIds.set(s,r),new Response(i.html,{status:200,headers:{"Content-Type":"text/html; charset=utf-8"}})}async serveClosestScreenshot(t,e){const s=this._snapshot(t,e),r=s==null?void 0:s.closestScreenshot();return r?new Response(await this._resourceLoader(r)):new Response(null,{status:404})}serveSnapshotInfo(t,e){const s=this._snapshot(t,e);return this._respondWithJson(s?{viewport:s.viewport(),url:s.snapshot().frameUrl,timestamp:s.snapshot().timestamp,wallTime:s.snapshot().wallTime}:{error:"No snapshot found"})}_snapshot(t,e){const s=e.get("name");return this._snapshotStorage.snapshotByName(t,s)}_respondWithJson(t){return new Response(JSON.stringify(t),{status:200,headers:{"Cache-Control":"public, max-age=31536000","Content-Type":"application/json"}})}async serveResource(t,e,s){let r;const i=this._snapshotIds.get(s);for(const S of t)if(r=i==null?void 0:i.resourceByUrl(ar(S),e),r)break;if(!r)return new Response(null,{status:404});const a=r.response.content._sha1,c=a?await this._resourceLoader(a)||new Blob([]):new Blob([]);let l=r.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(l)&&!l.includes("charset")&&(l=`${l}; charset=utf-8`);const f=new Headers;l!=="x-unknown"&&f.set("Content-Type",l);for(const{name:S,value:C}of r.response.headers)f.set(S,C);f.delete("Content-Encoding"),f.delete("Access-Control-Allow-Origin"),f.set("Access-Control-Allow-Origin","*"),f.delete("Content-Length"),f.set("Content-Length",String(c.size)),f.set("Cache-Control","public, max-age=31536000");const{status:b}=r.response,h=b===101||b===204||b===205||b===304;return new Response(h?null:c,{headers:f,status:r.response.status,statusText:r.response.statusText})}}function ar(n){try{const t=new URL(n);return t.hash="",t.toString()}catch{return n}}function or(n){const t=new Map,{files:e,stacks:s}=n;for(const r of s){const[i,a]=r;t.set(`call@${i}`,a.map(c=>({file:e[c[0]],line:c[1],column:c[2],function:c[3]})))}return t}class cr{constructor(t){L(this,"_maxSize");L(this,"_map");L(this,"_size");this._maxSize=t,this._map=new Map,this._size=0}getOrCompute(t,e){if(this._map.has(t)){const r=this._map.get(t);return this._map.delete(t),this._map.set(t,r),r.value}const s=e();for(;this._map.size&&this._size+s.size>this._maxSize;){const[r,i]=this._map.entries().next().value;this._size-=i.size,this._map.delete(r)}return this._map.set(t,s),this._size+=s.size,s.value}}class lr{constructor(){L(this,"_frameSnapshots",new Map);L(this,"_cache",new cr(1e8));L(this,"_contextToResources",new Map)}addResource(t,e){e.request.url=rt(e.request.url),this._ensureResourcesForContext(t).push(e)}addFrameSnapshot(t,e,s){for(const c of e.resourceOverrides)c.url=rt(c.url);let r=this._frameSnapshots.get(e.frameId);r||(r={raw:[],renderers:[]},this._frameSnapshots.set(e.frameId,r),e.isMainFrame&&this._frameSnapshots.set(e.pageId,r)),r.raw.push(e);const i=this._ensureResourcesForContext(t),a=new $s(this._cache,i,r.raw,s,r.raw.length-1);return r.renderers.push(a),a}snapshotByName(t,e){const s=this._frameSnapshots.get(t);return s==null?void 0:s.renderers.find(r=>r.snapshotName===e)}snapshotsForTest(){return[...this._frameSnapshots.keys()]}finalize(){for(const t of this._contextToResources.values())t.sort((e,s)=>(e._monotonicTime||0)-(s._monotonicTime||0))}_ensureResourcesForContext(t){let e=this._contextToResources.get(t);return e||(e=[],this._contextToResources.set(t,e)),e}}class Un extends Error{constructor(t){super(t),this.name="TraceVersionError"}}const Ut=8;class fr{constructor(t,e){L(this,"_contextEntry");L(this,"_snapshotStorage");L(this,"_actionMap",new Map);L(
Line truncated
|
||||
`))this._appendEvent(e)}actions(){return[...this._actionMap.values()]}_pageEntry(t){let e=this._pageEntries.get(t);return e||(e={pageId:t,screencastFrames:[]},this._pageEntries.set(t,e),this._contextEntry.pages.push(e)),e}_appendEvent(t){if(!t)return;const e=this._modernize(JSON.parse(t));for(const s of e)this._innerAppendEvent(s)}_innerAppendEvent(t){const e=this._contextEntry;switch(t.type){case"context-options":{if(t.version>Ut)throw new Un("The trace was created by a newer version of Playwright and is not supported by this version of the viewer. Please use latest Playwright to open the trace.");this._version=t.version,e.origin=t.origin,e.browserName=t.browserName,e.channel=t.channel,e.title=t.title,e.platform=t.platform,e.wallTime=t.wallTime,e.startTime=t.monotonicTime,e.sdkLanguage=t.sdkLanguage,e.options=t.options,e.testIdAttributeName=t.testIdAttributeName,e.contextId=t.contextId??"";break}case"screencast-frame":{this._pageEntry(t.pageId).screencastFrames.push(t);break}case"before":{this._actionMap.set(t.callId,{...t,type:"action",endTime:0,log:[]});break}case"input":{const s=this._actionMap.get(t.callId);s.inputSnapshot=t.inputSnapshot,s.point=t.point;break}case"log":{const s=this._actionMap.get(t.callId);if(!s)return;s.log.push({time:t.time,message:t.message});break}case"after":{const s=this._actionMap.get(t.callId);s.afterSnapshot=t.afterSnapshot,s.endTime=t.endTime,s.result=t.result,s.error=t.error,s.attachments=t.attachments,s.annotations=t.annotations,t.point&&(s.point=t.point);break}case"action":{this._actionMap.set(t.callId,{...t,log:[]});break}case"event":{e.events.push(t);break}case"stdout":{e.stdio.push(t);break}case"stderr":{e.stdio.push(t);break}case"error":{e.errors.push(t);break}case"console":{e.events.push(t);break}case"resource-snapshot":this._snapshotStorage.addResource(this._contextEntry.contextId,t.snapshot),e.resources.push(t.snapshot);break;case"frame-snapshot":this._snapshotStorage.addFrameSnapshot(this._contextEntry.contextId,t.snapshot,this._pageEntry(t.snapshot.pageId).screencastFrames);break}"pageId"in t&&t.pageId&&this._pageEntry(t.pageId),(t.type==="action"||t.type==="before")&&(e.startTime=Math.min(e.startTime,t.startTime)),(t.type==="action"||t.type==="after")&&(e.endTime=Math.max(e.endTime,t.endTime)),t.type==="event"&&(e.startTime=Math.min(e.startTime,t.time),e.endTime=Math.max(e.endTime,t.time)),t.type==="screencast-frame"&&(e.startTime=Math.min(e.startTime,t.timestamp),e.endTime=Math.max(e.endTime,t.timestamp))}_processedContextCreatedEvent(){return this._version!==void 0}_modernize(t){let e=this._version??t.version??6,s=[t];for(;e<Ut;++e)s=this[`_modernize_${e}_to_${e+1}`].call(this,s);return s}_modernize_0_to_1(t){for(const e of t)e.type==="action"&&typeof e.metadata.error=="string"&&(e.metadata.error={error:{name:"Error",message:e.metadata.error}});return t}_modernize_1_to_2(t){var e;for(const s of t)s.type!=="frame-snapshot"||!s.snapshot.isMainFrame||(s.snapshot.viewport=((e=this._contextEntry.options)==null?void 0:e.viewport)||{width:1280,height:720});return t}_modernize_2_to_3(t){for(const e of t){if(e.type!=="resource-snapshot"||e.snapshot.request)continue;const s=e.snapshot;e.snapshot={_frameref:s.frameId,request:{url:s.url,method:s.method,headers:s.requestHeaders,postData:s.requestSha1?{_sha1:s.requestSha1}:void 0},response:{status:s.status,headers:s.responseHeaders,content:{mimeType:s.contentType,_sha1:s.responseSha1}},_monotonicTime:s.timestamp}}return t}_modernize_3_to_4(t){const e=[];for(const s of t){const r=this._modernize_event_3_to_4(s);r&&e.push(r)}return e}_modernize_event_3_to_4(t){var s,r,i,a;if(t.type!=="action"&&t.type!=="event")return t;const e=t.metadata;return e.internal||e.method.startsWith("tracing")?null:t.type==="event"?e.method==="__create__"&&e.type==="ConsoleMessage"?{type:"object",class:e.type,guid:e.params.guid,initializer:e.params.initializer}:{type:"event",time:e.startTime,class:e.type,method:e.method,params:e.params,pageId:e.pageId}:{type:"action",callId:e.id,startTime:e.startTime,endTime:e.endTime,apiName:e.apiName||e.type+"."+e.method,class:e.type,method:e.method,params:e.params,wallTime:e.wallTime||Date.now(),log:e.log,beforeSnapshot:(s=e.snapshots.find(c=>c.title==="before"))==null?void 0:s.snapshotName,inputSnapshot:(r=e.snapshots.find(c=>c.title==="input"))==null?void 0:r.snapshotName,afterSnapshot:(i=e.snapshots.find(c=>c.title==="after"))==null?void 0:i.snapshotName,error:(a=e.error)==null?void 0:a.error,result:e.result,point:e.point,pageId:e.pageId}}_modernize_4_to_5(t){const e=[];for(const s of t){const r=this._modernize_event_4_to_5(s);r&&e.push(r)}return e}_modernize_event_4_to_5(t){var e,s;if(t.type==="event"&&t.method==="__create__"&&t.class==="JSHandle"&&this._jsHandles.set(t.params.guid,t.params.initializer),t.type==="object"){if(t.class!=="ConsoleMessage")return null;const r=(e=t.initializer.args)==null?void 0:e.map(i=>{if(i.guid){const a=this._jsHandles.get(i.guid);return{preview:(a==null?void 0:a.preview)||""
Line truncated
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/xtermModule-BoAIEibi.js","./xtermModule.Beg8tuEN.css"])))=>i.map(i=>d[i]);
|
||||
import{u as Mt,r as K,e as Dt,_ as Ft,f as Ot,g as At,j as o,R as d,E as Ut,s as vt,h as at,i as Wt,t as zt,m as Vt,k as Y,T as F,M as bt,b as Kt,l as $t,a as Ht,W as qt,S as Yt,D as Qt,c as Xt,d as Jt}from"./assets/defaultSettingsView-Do_wwdKw.js";var Zt={};class ot{constructor(t,e={}){this.isListing=!1,this._tests=new Map,this._rootSuite=new Q("","root"),this._options=e,this._reporter=t}reset(){this._rootSuite._entries=[],this._tests.clear()}dispatch(t){const{method:e,params:s}=t;if(e==="onConfigure"){this._onConfigure(s.config);return}if(e==="onProject"){this._onProject(s.project);return}if(e==="onBegin"){this._onBegin();return}if(e==="onTestBegin"){this._onTestBegin(s.testId,s.result);return}if(e==="onTestEnd"){this._onTestEnd(s.test,s.result);return}if(e==="onStepBegin"){this._onStepBegin(s.testId,s.resultId,s.step);return}if(e==="onAttach"){this._onAttach(s.testId,s.resultId,s.attachments);return}if(e==="onStepEnd"){this._onStepEnd(s.testId,s.resultId,s.step);return}if(e==="onError"){this._onError(s.error);return}if(e==="onStdIO"){this._onStdIO(s.type,s.testId,s.resultId,s.data,s.isBase64);return}if(e==="onEnd")return this._onEnd(s.result);if(e==="onExit")return this._onExit()}_onConfigure(t){var e,s;this._rootDir=t.rootDir,this._config=this._parseConfig(t),(s=(e=this._reporter).onConfigure)==null||s.call(e,this._config)}_onProject(t){let e=this._options.mergeProjects?this._rootSuite.suites.find(s=>s.project().name===t.name):void 0;e||(e=new Q(t.name,"project"),this._rootSuite._addSuite(e)),e._project=this._parseProject(t);for(const s of t.suites)this._mergeSuiteInto(s,e)}_onBegin(){var t,e;(e=(t=this._reporter).onBegin)==null||e.call(t,this._rootSuite)}_onTestBegin(t,e){var c,n;const s=this._tests.get(t);this._options.clearPreviousResultsWhenTestBegins&&(s.results=[]);const i=s._createTestResult(e.id);i.retry=e.retry,i.workerIndex=e.workerIndex,i.parallelIndex=e.parallelIndex,i.setStartTimeNumber(e.startTime),(n=(c=this._reporter).onTestBegin)==null||n.call(c,s,i)}_onTestEnd(t,e){var c,n,g;const s=this._tests.get(t.testId);s.timeout=t.timeout,s.expectedStatus=t.expectedStatus;const i=s.results.find(l=>l._id===e.id);i.duration=e.duration,i.status=e.status,i.errors=e.errors,i.error=(c=i.errors)==null?void 0:c[0],e.attachments&&(i.attachments=this._parseAttachments(e.attachments)),e.annotations&&(this._absoluteAnnotationLocationsInplace(e.annotations),i.annotations=e.annotations,s.annotations=e.annotations),(g=(n=this._reporter).onTestEnd)==null||g.call(n,s,i),i._stepMap=new Map}_onStepBegin(t,e,s){var _,a;const i=this._tests.get(t),c=i.results.find(h=>h._id===e),n=s.parentStepId?c._stepMap.get(s.parentStepId):void 0,g=this._absoluteLocation(s.location),l=new te(s,n,g,c);n?n.steps.push(l):c.steps.push(l),c._stepMap.set(s.id,l),(a=(_=this._reporter).onStepBegin)==null||a.call(_,i,c,l)}_onStepEnd(t,e,s){var g,l;const i=this._tests.get(t),c=i.results.find(_=>_._id===e),n=c._stepMap.get(s.id);n._endPayload=s,n.duration=s.duration,n.error=s.error,(l=(g=this._reporter).onStepEnd)==null||l.call(g,i,c,n)}_onAttach(t,e,s){this._tests.get(t).results.find(n=>n._id===e).attachments.push(...s.map(n=>({name:n.name,contentType:n.contentType,path:n.path,body:n.base64&&globalThis.Buffer?Buffer.from(n.base64,"base64"):void 0})))}_onError(t){var e,s;(s=(e=this._reporter).onError)==null||s.call(e,t)}_onStdIO(t,e,s,i,c){var _,a,h,v;const n=c?globalThis.Buffer?Buffer.from(i,"base64"):atob(i):i,g=e?this._tests.get(e):void 0,l=g&&s?g.results.find(u=>u._id===s):void 0;t==="stdout"?(l==null||l.stdout.push(n),(a=(_=this._reporter).onStdOut)==null||a.call(_,n,g,l)):(l==null||l.stderr.push(n),(v=(h=this._reporter).onStdErr)==null||v.call(h,n,g,l))}async _onEnd(t){var e,s;await((s=(e=this._reporter).onEnd)==null?void 0:s.call(e,{status:t.status,startTime:new Date(t.startTime),duration:t.duration}))}_onExit(){var t,e;return(e=(t=this._reporter).onExit)==null?void 0:e.call(t)}_parseConfig(t){const e={...se,...t};return this._options.configOverrides&&(e.configFile=this._options.configOverrides.configFile,e.reportSlowTests=this._options.configOverrides.reportSlowTests,e.quiet=this._options.configOverrides.quiet,e.reporter=[...this._options.configOverrides.reporter]),e}_parseProject(t){return{metadata:t.metadata,name:t.name,outputDir:this._absolutePath(t.outputDir),repeatEach:t.repeatEach,retries:t.retries,testDir:this._absolutePath(t.testDir),testIgnore:st(t.testIgnore),testMatch:st(t.testMatch),timeout:t.timeout,grep:st(t.grep),grepInvert:st(t.grepInvert),dependencies:t.dependencies,teardown:t.teardown,snapshotDir:this._absolutePath(t.snapshotDir),use:t.use}}_parseAttachments(t){return t.map(e=>({...e,body:e.base64&&globalThis.Buffer?Buffer.from(e.base64,"base64"):void 0}))}_mergeSuiteInto(t,e){let s=e.suites.find(i=>i.title===t.title);s||(s=new Q(t.title,e.type==="project"?"file":"describe"),e._addSuite(s)),s.location=this._absoluteLocation(t.location),t.entries.forEach(i=>{"testId"in i?this._mergeTestInto(i,s):this._mergeSuiteInto(iLine truncated
|
||||
Projects: `+v,onClick:()=>_(!l),children:[o.jsx("span",{className:"filter-label",children:"Status:"})," ",h,o.jsx("span",{className:"filter-label",children:"Projects:"})," ",v]}),l&&o.jsxs("div",{className:"hbox",style:{marginLeft:14,maxHeight:200,overflowY:"auto"},children:[o.jsx("div",{className:"filter-list",role:"list","data-testid":"status-filters",children:[...e.entries()].map(([u,b])=>o.jsx("div",{className:"filter-entry",role:"listitem",children:o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:b,onChange:()=>{const S=new Map(e);S.set(u,!S.get(u)),s(S)}}),o.jsx("div",{children:u})]})},u))}),o.jsx("div",{className:"filter-list",role:"list","data-testid":"project-filters",children:[...i.entries()].map(([u,b])=>o.jsx("div",{className:"filter-entry",role:"listitem",children:o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:b,onChange:()=>{var C;const S=new Map(i);S.set(u,!S.get(u)),c(S);const B=(C=n==null?void 0:n.config)==null?void 0:C.configFile;B&&vt.setObject(B+":projects",[...S.entries()].filter(([T,L])=>L).map(([T])=>T))}}),o.jsx("div",{children:u||"untitled"})]})},u))})]})]})},ue=({tag:r,style:t,onClick:e})=>o.jsx("span",{className:at("tag",`tag-color-${de(r)}`),onClick:e,style:{margin:"6px 0 0 6px",...t},title:`Click to filter by tag: ${r}`,children:r});function de(r){let t=0;for(let e=0;e<r.length;e++)t=r.charCodeAt(e)+((t<<8)-t);return Math.abs(t%6)}const he=Wt,fe=({filterText:r,testModel:t,testServerConnection:e,testTree:s,runTests:i,runningState:c,watchAll:n,watchedTreeIds:g,setWatchedTreeIds:l,isLoading:_,onItemSelected:a,requestedCollapseAllCount:h,requestedExpandAllCount:v,setFilterText:u,onRevealSource:b})=>{const[S,B]=d.useState({expandedItems:new Map}),[C,T]=d.useState(),[L,O]=d.useState(h),[$,N]=d.useState(v);d.useEffect(()=>{if(L!==h){S.expandedItems.clear();for(const x of s.flatTreeItems())S.expandedItems.set(x.id,!1);O(h),T(void 0),B({...S});return}if($!==v){S.expandedItems.clear();for(const x of s.flatTreeItems())S.expandedItems.set(x.id,!0);N(v),T(void 0),B({...S});return}if(!c||c.itemSelectedByUser)return;let f;const E=x=>{var M;x.children.forEach(E),!f&&x.status==="failed"&&(x.kind==="test"&&c.testIds.has(x.test.id)||x.kind==="case"&&c.testIds.has((M=x.tests[0])==null?void 0:M.id))&&(f=x)};E(s.rootItem),f&&T(f.id)},[c,T,s,L,O,h,$,N,v,S,B]);const R=d.useMemo(()=>{if(C)return s.treeItemById(C)},[C,s]);d.useEffect(()=>{if(!t)return;const f=pe(R,t);let E;(R==null?void 0:R.kind)==="test"?E=R.test:(R==null?void 0:R.kind)==="case"&&R.tests.length===1&&(E=R.tests[0]),a({treeItem:R,testCase:E,testFile:f})},[t,R,a]),d.useEffect(()=>{if(!_)if(n)e==null||e.watchNoReply({fileNames:s.fileNames()});else{const f=new Set;for(const E of g.value){const x=s.treeItemById(E),M=x==null?void 0:x.location.file;M&&f.add(M)}e==null||e.watchNoReply({fileNames:[...f]})}},[_,s,n,g,e]);const J=f=>{T(f.id),i("bounce-if-busy",s.collectTestIds(f))},H=(f,E)=>{if(f.preventDefault(),f.stopPropagation(),f.metaKey||f.ctrlKey){const x=r.split(" ");x.includes(E)?u(x.filter(M=>M!==E).join(" ").trim()):u((r+" "+E).trim())}else u((r.split(" ").filter(x=>!x.startsWith("@")).join(" ")+" "+E).trim())};return o.jsx(he,{name:"tests",treeState:S,setTreeState:B,rootItem:s.rootItem,dataTestId:"test-tree",render:f=>{const E=f.id.replace(/[^\w\d-_]/g,"-"),x=E+"-label",M=E+"-time";return o.jsxs("div",{className:"hbox ui-mode-tree-item","aria-labelledby":`${x} ${M}`,children:[o.jsxs("div",{id:x,className:"ui-mode-tree-item-title",children:[o.jsx("span",{children:f.title}),f.kind==="case"?f.tags.map(q=>o.jsx(ue,{tag:q.slice(1),onClick:Z=>H(Z,q)},q)):null]}),!!f.duration&&f.status!=="skipped"&&o.jsx("div",{id:M,className:"ui-mode-tree-item-time",children:Vt(f.duration)}),o.jsxs(Y,{noMinHeight:!0,noShadow:!0,children:[o.jsx(F,{icon:"play",title:"Run",onClick:()=>J(f),disabled:!!c&&!c.completed}),o.jsx(F,{icon:"go-to-file",title:"Show source",onClick:b,style:f.kind==="group"&&f.subKind==="folder"?{visibility:"hidden"}:{}}),!n&&o.jsx(F,{icon:"eye",title:"Watch",onClick:()=>{g.value.has(f.id)?g.value.delete(f.id):g.value.add(f.id),l({...g})},toggled:g.value.has(f.id)})]})]})},icon:f=>zt(f.status),title:f=>f.title,selectedItem:R,onAccepted:J,onSelected:f=>{c&&(c.itemSelectedByUser=!0),T(f.id)},isError:f=>f.kind==="group"?f.hasLoadErrors:!1,autoExpandDepth:r?5:1,noItemsMessage:_?"Loading…":"No tests"})};function pe(r,t){if(!(!r||!t))return{file:r.location.file,line:r.location.line,column:r.location.column,source:{errors:t.loadErrors.filter(e=>{var s;return((s=e.location)==null?void 0:s.file)===r.location.file}).map(e=>({line:e.location.line,message:e.message})),content:void 0}}}function ge(r){return`.playwright-artifacts-${r}`}const me=({item:r,rootDir:t,onOpenExternally:e,revealSource:s,pathSeparator:i})=>{var h,v;const[c,n]=d.useState(void 0),[g,l]=d.useState(0),_=d.useRef(null),{outputDir:a}=d.useMemo(()=>({outputDir:r.testCase?_e(r.testCase):void 0}),[r]);return d.useEffect(()=>{var B,C;_.current&&clearT
Line truncated
|
||||
`),c(!0)},pathSeparator:I.pathSeparator});return Et(m),h(void 0),L(!0),f({value:new Set}),(async()=>{try{await w.initialize({interceptStdio:!0,watchTestDirs:!0});const{status:k,report:y}=await w.runGlobalSetup({});if(m.processGlobalReport(y),k!=="passed")return;const P=await w.listTests({projects:I.projects,locations:I.args,grep:I.grep,grepInvert:I.grepInvert});m.processListReport(P.report),w.onReport(D=>{m.processTestReportEvent(D)});const{hasBrowsers:U}=await w.checkBrowsers({});ut(U)}finally{L(!1)}})(),()=>{clearTimeout(p)}},[w]),d.useEffect(()=>{if(!a)return;const{config:p,rootSuite:m}=a,k=p.configFile?vt.getObject(p.configFile+":projects",void 0):void 0,y=new Map(l);for(const P of y.keys())m.suites.find(U=>U.title===P)||y.delete(P);for(const P of m.suites)y.has(P.title)||y.set(P.title,!!(k!=null&&k.includes(P.title)));!k&&y.size&&![...y.values()].includes(!0)&&y.set(y.entries().next().value[0],!0),(l.size!==y.size||[...l].some(([P,U])=>y.get(P)!==U))&&_(y)},[l,a]),d.useEffect(()=>{N&&(a!=null&&a.progress)?u(a.progress):a||u(void 0)},[a,N]);const{testTree:Pt}=d.useMemo(()=>{if(!a)return{testTree:new nt("",new Q("","root"),[],l,I.pathSeparator)};const p=new nt("",a.rootSuite,a.loadErrors,l,I.pathSeparator);return p.filterTree(r,n,N?O==null?void 0:O.testIds:void 0),p.sortAndPropagateStatus(),p.shortenRoot(),p.flattenForSingleProject(),C(p.testIds()),{testTree:p}},[r,a,n,l,C,O,N]),V=d.useCallback((p,m)=>{!w||!a||p==="bounce-if-busy"&&N||(x.current=new Set([...x.current,...m]),E.current=E.current.then(async()=>{var P,U,D;const k=x.current;if(x.current=new Set,!k.size)return;{for(const j of((P=a.rootSuite)==null?void 0:P.allTests())||[])if(k.has(j.id)){j.results=[];const W=j._createTestResult("pending");W[X]="scheduled"}h({...a})}const y=" ["+new Date().toLocaleTimeString()+"]";z.write("\x1B[2m—".repeat(Math.max(0,_t.cols-y.length))+y+"\x1B[22m"),u({total:0,passed:0,failed:0,skipped:0}),$({testIds:k}),await w.runTests({locations:I.args,grep:I.grep,grepInvert:I.grepInvert,testIds:[...k],projects:[...l].filter(([j,W])=>W).map(([j])=>j),...ht?{workers:"1"}:{},...ft?{headed:!0}:{},...pt?{updateSnapshots:"all"}:{},reporters:I.reporters,trace:"on"});for(const j of((U=a.rootSuite)==null?void 0:U.allTests())||[])((D=j.results[0])==null?void 0:D.duration)===-1&&(j.results=[]);h({...a}),$(j=>j?{...j,completed:!0}:void 0)}))},[l,N,a,w,ht,ft,pt]);d.useEffect(()=>{if(!w||!G)return;const p=w.onTestFilesChanged(async m=>{if(E.current=E.current.then(async()=>{L(!0);try{const D=await w.listTests({projects:I.projects,locations:I.args,grep:I.grep,grepInvert:I.grepInvert});G.processListReport(D.report)}catch(D){console.log(D)}finally{L(!1)}}),await E.current,m.testFiles.length===0)return;const k=G.asModel(),y=new nt("",k.rootSuite,k.loadErrors,l,I.pathSeparator),P=[],U=new Set(m.testFiles);if(R){const D=j=>{const W=j.location.file;W&&U.has(W)&&P.push(...y.collectTestIds(j)),j.kind==="group"&&j.subKind==="folder"&&j.children.forEach(D)};D(y.rootItem)}else for(const D of H.value){const j=y.treeItemById(D),W=j==null?void 0:j.location.file;W&&U.has(W)&&P.push(...y.collectTestIds(j))}V("queue-if-busy",new Set(P))});return()=>p.dispose()},[V,w,R,H,G,l]),d.useEffect(()=>{if(!w)return;const p=m=>{m.code==="Backquote"&&m.ctrlKey?(m.preventDefault(),s(!e)):m.code==="F5"&&m.shiftKey?(m.preventDefault(),w==null||w.stopTestsNoReply({})):m.code==="F5"&&(m.preventDefault(),V("bounce-if-busy",B))};return addEventListener("keydown",p),()=>{removeEventListener("keydown",p)}},[V,et,w,B,e]);const it=d.useRef(null),Nt=d.useCallback(p=>{var m;p.preventDefault(),p.stopPropagation(),(m=it.current)==null||m.showModal()},[]),rt=d.useCallback(p=>{var m;p.preventDefault(),p.stopPropagation(),(m=it.current)==null||m.close()},[]),Lt=d.useCallback(p=>{rt(p),s(!0),w==null||w.installBrowsers({}).then(async()=>{s(!1);const{hasBrowsers:m}=await(w==null?void 0:w.checkBrowsers({}));ut(m)})},[rt,w]);return o.jsxs("div",{className:"vbox ui-mode",children:[!ct&&o.jsxs("dialog",{ref:it,children:[o.jsxs("div",{className:"title",children:[o.jsx("span",{className:"codicon codicon-lightbulb"}),"Install browsers"]}),o.jsxs("div",{className:"body",children:["Playwright did not find installed browsers.",o.jsx("br",{}),"Would you like to run `playwright install`?",o.jsx("br",{}),o.jsx("button",{className:"button",onClick:Lt,children:"Install"}),o.jsx("button",{className:"button secondary",onClick:rt,children:"Dismiss"})]})]}),Tt&&o.jsxs("div",{className:"disconnected",children:[o.jsx("div",{className:"title",children:"UI Mode disconnected"}),o.jsxs("div",{children:[o.jsx("a",{href:"#",onClick:()=>window.location.href="/",children:"Reload the page"})," to reconnect"]})]}),o.jsx(Yt,{sidebarSize:250,minSidebarSize:150,orientation:"horizontal",sidebarIsFirst:!0,settingName:"testListSidebar",main:o.jsxs("div",{className:"vbox",children:[o.jsxs("div",{className:at("vbox",!e&&"hidden"),children:[o.jsxs(Y,{children:[o.jsx("div",{className:"section-title",style:{flex:"none"},child
Line truncated
|
||||
Make sure to serve the website (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(r=>{navigator.serviceWorker.oncontrollerchange=()=>r()}),setInterval(function(){fetch("ping")},1e4)}Jt.createRoot(document.querySelector("#root")).render(o.jsx(ve,{}))})();
|
||||
+1
@@ -0,0 +1 @@
|
||||
.ui-mode-sidebar{background-color:var(--vscode-sideBar-background)}.ui-mode-sidebar>.settings-toolbar{border-top:1px solid var(--vscode-panel-border);cursor:pointer}.ui-mode-sidebar>.settings-view{margin:0 0 8px 23px}.ui-mode-sidebar input[type=search]{flex:auto}.ui-mode-sidebar .toolbar-button:not([disabled]) .codicon-play{color:var(--vscode-debugIcon-restartForeground)}.ui-mode-sidebar .toolbar-button:not([disabled]) .codicon-debug-stop{color:var(--vscode-debugIcon-stopForeground)}.ui-mode .section-title{display:flex;flex:auto;flex-direction:row;align-items:center;font-size:11px;text-transform:uppercase;font-weight:700;text-overflow:ellipsis;overflow:hidden;padding:8px;height:30px}.ui-mode-sidebar img{flex:none;margin-left:6px;width:24px;height:24px}.ui-mode .disconnected{display:flex;align-items:center;justify-content:center;flex:auto;flex-direction:column;background-color:var(--vscode-editor-background);position:absolute;top:0;right:0;bottom:0;left:0;z-index:1000;line-height:24px}.disconnected .title{font-size:24px;font-weight:700;margin-bottom:30px}.status-line{flex:auto;white-space:nowrap;line-height:22px;padding-left:10px;display:flex;flex-direction:row;align-items:center;height:30px}.status-line>div{overflow:hidden;text-overflow:ellipsis}.ui-mode-sidebar input[type=search]{flex:auto;padding:0 5px;line-height:24px;outline:none;margin:0 4px;border:none;color:var(--vscode-input-foreground);background-color:var(--vscode-input-background)}body{--vscode-font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif;--vscode-font-weight: normal;--vscode-font-size: 13px;--vscode-editor-font-family: "Droid Sans Mono", "monospace", monospace;--vscode-editor-font-weight: normal;--vscode-editor-font-size: 14px;--vscode-foreground: #616161;--vscode-disabledForeground: rgba(97, 97, 97, .5);--vscode-errorForeground: #a1260d;--vscode-descriptionForeground: #717171;--vscode-icon-foreground: #424242;--vscode-focusBorder: #0090f1;--vscode-textSeparator-foreground: rgba(0, 0, 0, .18);--vscode-textLink-foreground: #006ab1;--vscode-textLink-activeForeground: #006ab1;--vscode-textPreformat-foreground: #a31515;--vscode-textBlockQuote-background: rgba(127, 127, 127, .1);--vscode-textBlockQuote-border: rgba(0, 122, 204, .5);--vscode-textCodeBlock-background: rgba(220, 220, 220, .4);--vscode-widget-shadow: rgba(0, 0, 0, .16);--vscode-input-background: #ffffff;--vscode-input-foreground: #616161;--vscode-inputOption-activeBorder: #007acc;--vscode-inputOption-hoverBackground: rgba(184, 184, 184, .31);--vscode-inputOption-activeBackground: rgba(0, 144, 241, .2);--vscode-inputOption-activeForeground: #000000;--vscode-input-placeholderForeground: #767676;--vscode-inputValidation-infoBackground: #d6ecf2;--vscode-inputValidation-infoBorder: #007acc;--vscode-inputValidation-warningBackground: #f6f5d2;--vscode-inputValidation-warningBorder: #b89500;--vscode-inputValidation-errorBackground: #f2dede;--vscode-inputValidation-errorBorder: #be1100;--vscode-dropdown-background: #ffffff;--vscode-dropdown-border: #cecece;--vscode-checkbox-background: #ffffff;--vscode-checkbox-border: #cecece;--vscode-button-foreground: #ffffff;--vscode-button-separator: rgba(255, 255, 255, .4);--vscode-button-background: #007acc;--vscode-button-hoverBackground: #0062a3;--vscode-button-secondaryForeground: #ffffff;--vscode-button-secondaryBackground: #5f6a79;--vscode-button-secondaryHoverBackground: #4c5561;--vscode-badge-background: #c4c4c4;--vscode-badge-foreground: #333333;--vscode-scrollbar-shadow: #dddddd;--vscode-scrollbarSlider-background: rgba(100, 100, 100, .4);--vscode-scrollbarSlider-hoverBackground: rgba(100, 100, 100, .7);--vscode-scrollbarSlider-activeBackground: rgba(0, 0, 0, .6);--vscode-progressBar-background: #0e70c0;--vscode-editorError-foreground: #e51400;--vscode-editorWarning-foreground: #bf8803;--vscode-editorInfo-foreground: #1a85ff;--vscode-editorHint-foreground: #6c6c6c;--vscode-sash-hoverBorder: #0090f1;--vscode-editor-background: #ffffff;--vscode-editor-foreground: #000000;--vscode-editorStickyScroll-background: #ffffff;--vscode-editorStickyScrollHover-background: #f0f0f0;--vscode-editorWidget-background: #f3f3f3;--vscode-editorWidget-foreground: #616161;--vscode-editorWidget-border: #c8c8c8;--vscode-quickInput-background: #f3f3f3;--vscode-quickInput-foreground: #616161;--vscode-quickInputTitle-background: rgba(0, 0, 0, .06);--vscode-pickerGroup-foreground: #0066bf;--vscode-pickerGroup-border: #cccedb;--vscode-keybindingLabel-background: rgba(221, 221, 221, .4);--vscode-keybindingLabel-foreground: #555555;--vscode-keybindingLabel-border: rgba(204, 204, 204, .4);--vscode-keybindingLabel-bottomBorder: rgba(187, 187, 187, .4);--vscode-editor-selectionBackground: #add6ff;--vscode-editor-inactiveSelectionBackground: #e5ebf1;--vscode-editor-selectionHighlightBackground: rgba(173, 214, 255, .5);--vscode-editor-findMatchBackground: #a8ac94;--vscode-editor-findMatchHighlightBackground: rgba(234, 92, 0, .33);--vscode-editor-findRangeHighlightBackLine truncated
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" translate="no">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="./playwright-logo.svg" type="image/svg+xml">
|
||||
<title>Playwright Test</title>
|
||||
<script type="module" crossorigin src="./uiMode.9zHYMU6d.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-Do_wwdKw.js">
|
||||
<link rel="stylesheet" crossorigin href="./defaultSettingsView.DVJHpiGt.css">
|
||||
<link rel="stylesheet" crossorigin href="./uiMode.BatfzHMG.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* https://github.com/chjj/term.js
|
||||
* @license MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
* The original design remains. The terminal itself
|
||||
* has been extended to include xterm CSI codes, among
|
||||
* other features.
|
||||
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility,.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}
|
||||
Reference in new issue
Block a user