@xenon-device-management/xenon 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/package.json +1 -1
- package/lib/public/assets/{ApiKeyGate-BSN8crwz.js → ApiKeyGate-BousCIQZ.js} +1 -1
- package/lib/public/assets/{BugReportButton-DNja1wQ1.js → BugReportButton-Gw4lnGnV.js} +1 -1
- package/lib/public/assets/{DeviceMosaicView-DVk1IpIR.js → DeviceMosaicView-BX2hfhBf.js} +2 -2
- package/lib/public/assets/{EmptyState-CqQ21n-H.js → EmptyState-CPOfuV3O.js} +1 -1
- package/lib/public/assets/{FieldGroup-DE3u01Nu.js → FieldGroup-C5UkCHbe.js} +1 -1
- package/lib/public/assets/{Modal-BJcFdiBP.js → Modal-MMGhL8eW.js} +1 -1
- package/lib/public/assets/{SegmentedControl-CSHjmrvy.js → SegmentedControl-CZfAicws.js} +1 -1
- package/lib/public/assets/{SettingCard-M-lFn_Wm.js → SettingCard-Dp7XIdcl.js} +1 -1
- package/lib/public/assets/{Table-B3EUgBi6.js → Table-DsN_IX6J.js} +1 -1
- package/lib/public/assets/{activity-DK3R5GAb.js → activity-DCBAvxuo.js} +1 -1
- package/lib/public/assets/ai-settings-yNS_bU1m.js +21 -0
- package/lib/public/assets/api-keys-CQ9g1g1b.js +1 -0
- package/lib/public/assets/apps-Bqh1eav9.js +21 -0
- package/lib/public/assets/apps-CTrGClro.css +1 -0
- package/lib/public/assets/{arrow-left-9933DNlF.js → arrow-left-GX0vzYtn.js} +1 -1
- package/lib/public/assets/{arrow-up-right-B7q_1mXs.js → arrow-up-right-DePHHOby.js} +1 -1
- package/lib/public/assets/auth-shell-BBGlC6i3.js +1 -0
- package/lib/public/assets/builds-page-Czf7RsmD.js +6 -0
- package/lib/public/assets/{button-lkxVyarW.js → button-ybNY3GYx.js} +1 -1
- package/lib/public/assets/{check-BkT38An9.js → check-BZMx8AhR.js} +1 -1
- package/lib/public/assets/{chevron-right-WELZ1Z8v.js → chevron-right-WL_bcB02.js} +1 -1
- package/lib/public/assets/{circle-check--2DSsfaI.js → circle-check-CI2xUlDo.js} +1 -1
- package/lib/public/assets/{circle-x-x7R8vTBo.js → circle-x-De3thbcr.js} +1 -1
- package/lib/public/assets/{clock-DIpGd4Pn.js → clock-BFVLE7wW.js} +1 -1
- package/lib/public/assets/{copy-CEcFYYHm.js → copy-ve3lNhva.js} +1 -1
- package/lib/public/assets/device-explorer-elRO7T00.css +1 -0
- package/lib/public/assets/device-explorer-vzZxT4-Y.js +210 -0
- package/lib/public/assets/{download-CaKkGvKw.js → download-BDZj44ke.js} +1 -1
- package/lib/public/assets/forgot-password-BSYQX2oR.js +1 -0
- package/lib/public/assets/{funnel-D2rLIKlM.js → funnel-CptlpFZ9.js} +1 -1
- package/lib/public/assets/index-BW3kENYH.css +1 -0
- package/lib/public/assets/{index-BrVV0Kla.js → index-PtnKslHU.js} +12 -12
- package/lib/public/assets/{layers-DZwF8z_0.js → layers-DRpwoKhI.js} +1 -1
- package/lib/public/assets/{lock-CVUUnm1V.js → lock-CrQhC34I.js} +1 -1
- package/lib/public/assets/login-DaJOt8Qz.js +1 -0
- package/lib/public/assets/maintenance-settings-D629C2IC.js +6 -0
- package/lib/public/assets/{mouse-pointer-2-n4xUMxHJ.js → mouse-pointer-2-Dpcc76zN.js} +1 -1
- package/lib/public/assets/overview-CGEKYX62.js +11 -0
- package/lib/public/assets/{page-header-C0pnt4xz.js → page-header-CSvuGbSO.js} +1 -1
- package/lib/public/assets/{plus-BObE-_z6.js → plus-vJJF9g79.js} +1 -1
- package/lib/public/assets/profile-page-CF7ZQNQz.js +6 -0
- package/lib/public/assets/reset-password-BgpjbCac.js +1 -0
- package/lib/public/assets/runbook-page-Dxuzftyv.js +124 -0
- package/lib/public/assets/selector-detail-page-B_puCd9g.js +1 -0
- package/lib/public/assets/{selector-health-DraY2a4b.js → selector-health-BjMHf106.js} +1 -1
- package/lib/public/assets/selector-health-page-Du_bGD2p.js +16 -0
- package/lib/public/assets/session-detail-page-lQTe5_B1.js +13 -0
- package/lib/public/assets/settings-Cxx_aYWT.css +1 -0
- package/lib/public/assets/settings-DhxWGUzy.js +1 -0
- package/lib/public/assets/{shield-BBc4qisQ.js → shield-JGzamJo5.js} +1 -1
- package/lib/public/assets/{shield-alert-BfoPJ8q_.js → shield-alert-DzE36jcb.js} +1 -1
- package/lib/public/assets/status-pill-outline-50aN0wRU.js +1 -0
- package/lib/public/assets/{tablet-CaOqzQv_.js → tablet-DHY88mxw.js} +1 -1
- package/lib/public/assets/teams-EOAIPbZC.js +1 -0
- package/lib/public/assets/time-B8FIgwPE.js +1 -0
- package/lib/public/assets/{trash-2-CE5TRHb2.js → trash-2-BrTSfFh5.js} +1 -1
- package/lib/public/assets/{useSocket-Bkt5i-U6.js → useSocket-BRto9a5m.js} +1 -1
- package/lib/public/assets/users-Dd44jLAB.js +11 -0
- package/lib/public/assets/webhook-settings-DBYmqim_.js +1 -0
- package/lib/public/assets/{webhook-settings-DEZQtSgr.css → webhook-settings-tW1oXXrJ.css} +1 -1
- package/lib/public/assets/{zap-BzdRuL9F.js → zap-JUbOoK3o.js} +1 -1
- package/lib/public/index.html +2 -2
- package/lib/src/app/routers/auth.js +19 -2
- package/lib/src/scripts/run-migrations.js +14 -3
- package/lib/test/unit/auth-me-auth-disabled.test.js +77 -0
- package/lib/test/unit/run-migrations-fail-fast.test.js +87 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/lib/public/assets/ai-settings-AKMDh8pd.js +0 -21
- package/lib/public/assets/api-keys-B5Q1EkGN.js +0 -1
- package/lib/public/assets/apps-CWWrkTZW.js +0 -21
- package/lib/public/assets/apps-Dt5dUIag.css +0 -1
- package/lib/public/assets/builds-page-DgWXOgh5.js +0 -6
- package/lib/public/assets/device-explorer-3H1hf8ld.css +0 -1
- package/lib/public/assets/device-explorer-nV6L3w7x.js +0 -210
- package/lib/public/assets/forgot-password-CsAF11d2.js +0 -1
- package/lib/public/assets/index-Dz1K6OJU.css +0 -1
- package/lib/public/assets/login-BavGkTli.js +0 -1
- package/lib/public/assets/maintenance-settings-Vr_u8hoR.js +0 -6
- package/lib/public/assets/overview-DVgoOoYF.js +0 -11
- package/lib/public/assets/profile-page-DNKD4MS2.js +0 -1
- package/lib/public/assets/reset-password-C2gSMy8a.js +0 -1
- package/lib/public/assets/runbook-page-BRxjWJVQ.js +0 -104
- package/lib/public/assets/selector-detail-page-DcV8jQuX.js +0 -1
- package/lib/public/assets/selector-health-page-tb5e3CXy.js +0 -16
- package/lib/public/assets/session-detail-page-CEtQr37W.js +0 -13
- package/lib/public/assets/settings-CpRbubta.css +0 -1
- package/lib/public/assets/settings-Cr-YjLbX.js +0 -1
- package/lib/public/assets/status-pill-outline-Cc4PF7Mg.js +0 -1
- package/lib/public/assets/teams-B3Tt_9i2.js +0 -1
- package/lib/public/assets/users-BIvjvjM6.js +0 -11
- package/lib/public/assets/webhook-settings-dAp8wwEB.js +0 -1
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import{w as _n,k as In,c as Tr,j as tn,L as Ir,B as Or}from"./index-BrVV0Kla.js";import{A as Lr}from"./arrow-left-9933DNlF.js";const qe=["http","https","mailto","tel"];function vr(n){const e=(n||"").trim(),t=e.charAt(0);if(t==="#"||t==="/")return e;const r=e.indexOf(":");if(r===-1)return e;let i=-1;for(;++i<qe.length;){const l=qe[i];if(r===l.length&&e.slice(0,l.length).toLowerCase()===l)return e}return i=e.indexOf("?"),i!==-1&&r>i||(i=e.indexOf("#"),i!==-1&&r>i)?e:"javascript:void(0)"}/*!
|
|
2
|
-
* Determine if an object is a Buffer
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/var Dr=function(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)};const vt=_n(Dr);function Nn(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?$e(n.position):"start"in n||"end"in n?$e(n):"line"in n||"column"in n?xe(n):""}function xe(n){return We(n&&n.line)+":"+We(n&&n.column)}function $e(n){return xe(n&&n.start)+"-"+xe(n&&n.end)}function We(n){return n&&typeof n=="number"?n:1}class ln extends Error{constructor(e,t,r){const i=[null,null];let l={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof t=="string"&&(r=t,t=void 0),typeof r=="string"){const o=r.indexOf(":");o===-1?i[1]=r:(i[0]=r.slice(0,o),i[1]=r.slice(o+1))}t&&("type"in t||"position"in t?t.position&&(l=t.position):"start"in t||"end"in t?l=t:("line"in t||"column"in t)&&(l.start=t)),this.name=Nn(t)||"1:1",this.message=typeof e=="object"?e.message:e,this.stack="",typeof e=="object"&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=l.start.line,this.column=l.start.column,this.position=l,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}ln.prototype.file="";ln.prototype.name="";ln.prototype.reason="";ln.prototype.message="";ln.prototype.stack="";ln.prototype.fatal=null;ln.prototype.column=null;ln.prototype.line=null;ln.prototype.source=null;ln.prototype.ruleId=null;ln.prototype.position=null;const fn={basename:zr,dirname:Rr,extname:Br,join:Nr,sep:"/"};function zr(n,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');jn(n);let t=0,r=-1,i=n.length,l;if(e===void 0||e.length===0||e.length>n.length){for(;i--;)if(n.charCodeAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":n.slice(t,r)}if(e===n)return"";let o=-1,u=e.length-1;for(;i--;)if(n.charCodeAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),u>-1&&(n.charCodeAt(i)===e.charCodeAt(u--)?u<0&&(r=i):(u=-1,r=o));return t===r?r=o:r<0&&(r=n.length),n.slice(t,r)}function Rr(n){if(jn(n),n.length===0)return".";let e=-1,t=n.length,r;for(;--t;)if(n.charCodeAt(t)===47){if(r){e=t;break}}else r||(r=!0);return e<0?n.charCodeAt(0)===47?"/":".":e===1&&n.charCodeAt(0)===47?"//":n.slice(0,e)}function Br(n){jn(n);let e=n.length,t=-1,r=0,i=-1,l=0,o;for(;e--;){const u=n.charCodeAt(e);if(u===47){if(o){r=e+1;break}continue}t<0&&(o=!0,t=e+1),u===46?i<0?i=e:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":n.slice(i,t)}function Nr(...n){let e=-1,t;for(;++e<n.length;)jn(n[e]),n[e]&&(t=t===void 0?n[e]:t+"/"+n[e]);return t===void 0?".":Mr(t)}function Mr(n){jn(n);const e=n.charCodeAt(0)===47;let t=_r(n,!e);return t.length===0&&!e&&(t="."),t.length>0&&n.charCodeAt(n.length-1)===47&&(t+="/"),e?"/"+t:t}function _r(n,e){let t="",r=0,i=-1,l=0,o=-1,u,s;for(;++o<=n.length;){if(o<n.length)u=n.charCodeAt(o);else{if(u===47)break;u=47}if(u===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}e&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+n.slice(i+1,o):t=n.slice(i+1,o),r=o-i-1;i=o,l=0}else u===46&&l>-1?l++:l=-1}return t}function jn(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const jr={cwd:Hr};function Hr(){return"/"}function ke(n){return n!==null&&typeof n=="object"&&n.href&&n.origin}function Ur(n){if(typeof n=="string")n=new URL(n);else if(!ke(n)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(n.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Vr(n)}function Vr(n){if(n.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=n.pathname;let t=-1;for(;++t<e.length;)if(e.charCodeAt(t)===37&&e.charCodeAt(t+1)===50){const r=e.charCodeAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const ue=["history","path","basename","stem","extname","dirname"];class Dt{constructor(e){let t;e?typeof e=="string"||qr(e)?t={value:e}:ke(e)?t={path:e}:t=e:t={},this.data={},this.messages=[],this.history=[],this.cwd=jr.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<ue.length;){const l=ue[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let i;for(i in t)ue.includes(i)||(this[i]=t[i])}get path(){return this.history[this.history.length-1]}set path(e){ke(e)&&(e=Ur(e)),se(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return typeof this.path=="string"?fn.dirname(this.path):void 0}set dirname(e){Qe(this.basename,"dirname"),this.path=fn.join(e||"",this.basename)}get basename(){return typeof this.path=="string"?fn.basename(this.path):void 0}set basename(e){se(e,"basename"),ae(e,"basename"),this.path=fn.join(this.dirname||"",e)}get extname(){return typeof this.path=="string"?fn.extname(this.path):void 0}set extname(e){if(ae(e,"extname"),Qe(this.dirname,"extname"),e){if(e.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=fn.join(this.dirname,this.stem+(e||""))}get stem(){return typeof this.path=="string"?fn.basename(this.path,this.extname):void 0}set stem(e){se(e,"stem"),ae(e,"stem"),this.path=fn.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,r){const i=new ln(e,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(e,t,r){const i=this.message(e,t,r);return i.fatal=null,i}fail(e,t,r){const i=this.message(e,t,r);throw i.fatal=!0,i}}function ae(n,e){if(n&&n.includes(fn.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+fn.sep+"`")}function se(n,e){if(!n)throw new Error("`"+e+"` cannot be empty")}function Qe(n,e){if(!n)throw new Error("Setting `"+e+"` requires `path` to be set too")}function qr(n){return vt(n)}function Xe(n){if(n)throw n}var qn=Object.prototype.hasOwnProperty,zt=Object.prototype.toString,Ye=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,Ge=function(e){return typeof Array.isArray=="function"?Array.isArray(e):zt.call(e)==="[object Array]"},Ze=function(e){if(!e||zt.call(e)!=="[object Object]")return!1;var t=qn.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&qn.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!r)return!1;var i;for(i in e);return typeof i>"u"||qn.call(e,i)},Je=function(e,t){Ye&&t.name==="__proto__"?Ye(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},nt=function(e,t){if(t==="__proto__")if(qn.call(e,t)){if(Ke)return Ke(e,t).value}else return;return e[t]},$r=function n(){var e,t,r,i,l,o,u=arguments[0],s=1,a=arguments.length,c=!1;for(typeof u=="boolean"&&(c=u,u=arguments[1]||{},s=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});s<a;++s)if(e=arguments[s],e!=null)for(t in e)r=nt(u,t),i=nt(e,t),u!==i&&(c&&i&&(Ze(i)||(l=Ge(i)))?(l?(l=!1,o=r&&Ge(r)?r:[]):o=r&&Ze(r)?r:{},Je(u,{name:t,newValue:n(c,o,i)})):typeof i<"u"&&Je(u,{name:t,newValue:i}));return u};const et=_n($r);function be(n){if(typeof n!="object"||n===null)return!1;const e=Object.getPrototypeOf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function Wr(){const n=[],e={run:t,use:r};return e;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);u(null,...i);function u(s,...a){const c=n[++l];let m=-1;if(s){o(s);return}for(;++m<i.length;)(a[m]===null||a[m]===void 0)&&(a[m]=i[m]);i=a,c?Qr(c,u)(...a):o(null,...a)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return n.push(i),e}}function Qr(n,e){let t;return r;function r(...o){const u=n.length>o.length;let s;u&&o.push(i);try{s=n.apply(this,o)}catch(a){const c=a;if(u&&t)throw c;return i(c)}u||(s&&s.then&&typeof s.then=="function"?s.then(l,i):s instanceof Error?i(s):l(s))}function i(o,...u){t||(t=!0,e(o,...u))}function l(o){i(null,o)}}const Xr=Bt().freeze(),Rt={}.hasOwnProperty;function Bt(){const n=Wr(),e=[];let t={},r,i=-1;return l.data=o,l.Parser=void 0,l.Compiler=void 0,l.freeze=u,l.attachers=e,l.use=s,l.parse=a,l.stringify=c,l.run=m,l.runSync=d,l.process=f,l.processSync=w,l;function l(){const x=Bt();let C=-1;for(;++C<e.length;)x.use(...e[C]);return x.data(et(!0,{},t)),x}function o(x,C){return typeof x=="string"?arguments.length===2?(fe("data",r),t[x]=C,l):Rt.call(t,x)&&t[x]||null:x?(fe("data",r),t=x,l):t}function u(){if(r)return l;for(;++i<e.length;){const[x,...C]=e[i];if(C[0]===!1)continue;C[0]===!0&&(C[0]=void 0);const k=x.call(l,...C);typeof k=="function"&&n.use(k)}return r=!0,i=Number.POSITIVE_INFINITY,l}function s(x,...C){let k;if(fe("use",r),x!=null)if(typeof x=="function")R(x,...C);else if(typeof x=="object")Array.isArray(x)?z(x):E(x);else throw new TypeError("Expected usable value, not `"+x+"`");return k&&(t.settings=Object.assign(t.settings||{},k)),l;function v(g){if(typeof g=="function")R(g);else if(typeof g=="object")if(Array.isArray(g)){const[P,...D]=g;R(P,...D)}else E(g);else throw new TypeError("Expected usable value, not `"+g+"`")}function E(g){z(g.plugins),g.settings&&(k=Object.assign(k||{},g.settings))}function z(g){let P=-1;if(g!=null)if(Array.isArray(g))for(;++P<g.length;){const D=g[P];v(D)}else throw new TypeError("Expected a list of plugins, not `"+g+"`")}function R(g,P){let D=-1,M;for(;++D<e.length;)if(e[D][0]===g){M=e[D];break}M?(be(M[1])&&be(P)&&(P=et(!0,M[1],P)),M[1]=P):e.push([...arguments])}}function a(x){l.freeze();const C=Bn(x),k=l.Parser;return ce("parse",k),tt(k,"parse")?new k(String(C),C).parse():k(String(C),C)}function c(x,C){l.freeze();const k=Bn(C),v=l.Compiler;return pe("stringify",v),rt(x),tt(v,"compile")?new v(x,k).compile():v(x,k)}function m(x,C,k){if(rt(x),l.freeze(),!k&&typeof C=="function"&&(k=C,C=void 0),!k)return new Promise(v);v(null,k);function v(E,z){n.run(x,Bn(C),R);function R(g,P,D){P=P||x,g?z(g):E?E(P):k(null,P,D)}}}function d(x,C){let k,v;return l.run(x,C,E),it("runSync","run",v),k;function E(z,R){Xe(z),k=R,v=!0}}function f(x,C){if(l.freeze(),ce("process",l.Parser),pe("process",l.Compiler),!C)return new Promise(k);k(null,C);function k(v,E){const z=Bn(x);l.run(l.parse(z),z,(g,P,D)=>{if(g||!P||!D)R(g);else{const M=l.stringify(P,D);M==null||(Gr(M)?D.value=M:D.result=M),R(g,D)}});function R(g,P){g||!P?E(g):v?v(P):C(null,P)}}}function w(x){let C;l.freeze(),ce("processSync",l.Parser),pe("processSync",l.Compiler);const k=Bn(x);return l.process(k,v),it("processSync","process",C),k;function v(E){C=!0,Xe(E)}}}function tt(n,e){return typeof n=="function"&&n.prototype&&(Yr(n.prototype)||e in n.prototype)}function Yr(n){let e;for(e in n)if(Rt.call(n,e))return!0;return!1}function ce(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `Parser`")}function pe(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `Compiler`")}function fe(n,e){if(e)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function rt(n){if(!be(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function it(n,e,t){if(!t)throw new Error("`"+n+"` finished async. Use `"+e+"` instead")}function Bn(n){return Kr(n)?n:new Dt(n)}function Kr(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function Gr(n){return typeof n=="string"||vt(n)}const Zr={};function Jr(n,e){const t=Zr,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Nt(n,r,i)}function Nt(n,e,t){if(ni(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(e&&"alt"in n&&n.alt)return n.alt;if("children"in n)return lt(n.children,e,t)}return Array.isArray(n)?lt(n,e,t):""}function lt(n,e,t){const r=[];let i=-1;for(;++i<n.length;)r[i]=Nt(n[i],e,t);return r.join("")}function ni(n){return!!(n&&typeof n=="object")}function mn(n,e,t,r){const i=n.length;let l=0,o;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(e,t),n.splice(...o);else for(t&&n.splice(e,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(e,0),n.splice(...o),l+=1e4,e+=1e4}function rn(n,e){return n.length>0?(mn(n,n.length,0,e),n):e}const ot={}.hasOwnProperty;function ei(n){const e={};let t=-1;for(;++t<n.length;)ti(e,n[t]);return e}function ti(n,e){let t;for(t in e){const i=(ot.call(n,t)?n[t]:void 0)||(n[t]={}),l=e[t];let o;if(l)for(o in l){ot.call(i,o)||(i[o]=[]);const u=l[o];ri(i[o],Array.isArray(u)?u:u?[u]:[])}}}function ri(n,e){let t=-1;const r=[];for(;++t<e.length;)(e[t].add==="after"?n:r).push(e[t]);mn(n,0,0,r)}const ii=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,hn=Sn(/[A-Za-z]/),en=Sn(/[\dA-Za-z]/),li=Sn(/[#-'*+\--9=?A-Z^-~]/);function we(n){return n!==null&&(n<32||n===127)}const Se=Sn(/\d/),oi=Sn(/[\dA-Fa-f]/),ui=Sn(/[!-/:-@[-`{-~]/);function I(n){return n!==null&&n<-2}function J(n){return n!==null&&(n<0||n===32)}function N(n){return n===-2||n===-1||n===32}const ai=Sn(ii),si=Sn(/\s/);function Sn(n){return e;function e(t){return t!==null&&n.test(String.fromCharCode(t))}}function V(n,e,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(s){return N(s)?(n.enter(t),u(s)):e(s)}function u(s){return N(s)&&l++<i?(n.consume(s),u):(n.exit(t),e(s))}}const ci={tokenize:pi};function pi(n){const e=n.attempt(this.parser.constructs.contentInitial,r,i);let t;return e;function r(u){if(u===null){n.consume(u);return}return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),V(n,e,"linePrefix")}function i(u){return n.enter("paragraph"),l(u)}function l(u){const s=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=s),t=s,o(u)}function o(u){if(u===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(u);return}return I(u)?(n.consume(u),n.exit("chunkText"),l):(n.consume(u),o)}}const fi={tokenize:hi},ut={tokenize:mi};function hi(n){const e=this,t=[];let r=0,i,l,o;return u;function u(E){if(r<t.length){const z=t[r];return e.containerState=z[1],n.attempt(z[0].continuation,s,a)(E)}return a(E)}function s(E){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&v();const z=e.events.length;let R=z,g;for(;R--;)if(e.events[R][0]==="exit"&&e.events[R][1].type==="chunkFlow"){g=e.events[R][1].end;break}k(r);let P=z;for(;P<e.events.length;)e.events[P][1].end=Object.assign({},g),P++;return mn(e.events,R+1,0,e.events.slice(z)),e.events.length=P,a(E)}return u(E)}function a(E){if(r===t.length){if(!i)return d(E);if(i.currentConstruct&&i.currentConstruct.concrete)return w(E);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},n.check(ut,c,m)(E)}function c(E){return i&&v(),k(r),d(E)}function m(E){return e.parser.lazy[e.now().line]=r!==t.length,o=e.now().offset,w(E)}function d(E){return e.containerState={},n.attempt(ut,f,w)(E)}function f(E){return r++,t.push([e.currentConstruct,e.containerState]),d(E)}function w(E){if(E===null){i&&v(),k(0),n.consume(E);return}return i=i||e.parser.flow(e.now()),n.enter("chunkFlow",{contentType:"flow",previous:l,_tokenizer:i}),x(E)}function x(E){if(E===null){C(n.exit("chunkFlow"),!0),k(0),n.consume(E);return}return I(E)?(n.consume(E),C(n.exit("chunkFlow")),r=0,e.interrupt=void 0,u):(n.consume(E),x)}function C(E,z){const R=e.sliceStream(E);if(z&&R.push(null),E.previous=l,l&&(l.next=E),l=E,i.defineSkip(E.start),i.write(R),e.parser.lazy[E.start.line]){let g=i.events.length;for(;g--;)if(i.events[g][1].start.offset<o&&(!i.events[g][1].end||i.events[g][1].end.offset>o))return;const P=e.events.length;let D=P,M,X;for(;D--;)if(e.events[D][0]==="exit"&&e.events[D][1].type==="chunkFlow"){if(M){X=e.events[D][1].end;break}M=!0}for(k(r),g=P;g<e.events.length;)e.events[g][1].end=Object.assign({},X),g++;mn(e.events,D+1,0,e.events.slice(P)),e.events.length=g}}function k(E){let z=t.length;for(;z-- >E;){const R=t[z];e.containerState=R[1],R[0].exit.call(e,n)}t.length=E}function v(){i.write([null]),l=void 0,i=void 0,e.containerState._closeFlow=void 0}}function mi(n,e,t){return V(n,n.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function at(n){if(n===null||J(n)||si(n))return 1;if(ai(n))return 2}function Pe(n,e,t){const r=[];let i=-1;for(;++i<n.length;){const l=n[i].resolveAll;l&&!r.includes(l)&&(e=l(e,t),r.push(l))}return e}const Ce={name:"attention",tokenize:gi,resolveAll:di};function di(n,e){let t=-1,r,i,l,o,u,s,a,c;for(;++t<n.length;)if(n[t][0]==="enter"&&n[t][1].type==="attentionSequence"&&n[t][1]._close){for(r=t;r--;)if(n[r][0]==="exit"&&n[r][1].type==="attentionSequence"&&n[r][1]._open&&e.sliceSerialize(n[r][1]).charCodeAt(0)===e.sliceSerialize(n[t][1]).charCodeAt(0)){if((n[r][1]._close||n[t][1]._open)&&(n[t][1].end.offset-n[t][1].start.offset)%3&&!((n[r][1].end.offset-n[r][1].start.offset+n[t][1].end.offset-n[t][1].start.offset)%3))continue;s=n[r][1].end.offset-n[r][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const m=Object.assign({},n[r][1].end),d=Object.assign({},n[t][1].start);st(m,-s),st(d,s),o={type:s>1?"strongSequence":"emphasisSequence",start:m,end:Object.assign({},n[r][1].end)},u={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[t][1].start),end:d},l={type:s>1?"strongText":"emphasisText",start:Object.assign({},n[r][1].end),end:Object.assign({},n[t][1].start)},i={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},u.end)},n[r][1].end=Object.assign({},o.start),n[t][1].start=Object.assign({},u.end),a=[],n[r][1].end.offset-n[r][1].start.offset&&(a=rn(a,[["enter",n[r][1],e],["exit",n[r][1],e]])),a=rn(a,[["enter",i,e],["enter",o,e],["exit",o,e],["enter",l,e]]),a=rn(a,Pe(e.parser.constructs.insideSpan.null,n.slice(r+1,t),e)),a=rn(a,[["exit",l,e],["enter",u,e],["exit",u,e],["exit",i,e]]),n[t][1].end.offset-n[t][1].start.offset?(c=2,a=rn(a,[["enter",n[t][1],e],["exit",n[t][1],e]])):c=0,mn(n,r-1,t-r+3,a),t=r+a.length-c-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function gi(n,e){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=at(r);let l;return o;function o(s){return l=s,n.enter("attentionSequence"),u(s)}function u(s){if(s===l)return n.consume(s),u;const a=n.exit("attentionSequence"),c=at(s),m=!c||c===2&&i||t.includes(s),d=!i||i===2&&c||t.includes(r);return a._open=!!(l===42?m:m&&(i||!d)),a._close=!!(l===42?d:d&&(c||!m)),e(s)}}function st(n,e){n.column+=e,n.offset+=e,n._bufferIndex+=e}const yi={name:"autolink",tokenize:xi};function xi(n,e,t){let r=0;return i;function i(f){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(f),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),l}function l(f){return hn(f)?(n.consume(f),o):a(f)}function o(f){return f===43||f===45||f===46||en(f)?(r=1,u(f)):a(f)}function u(f){return f===58?(n.consume(f),r=0,s):(f===43||f===45||f===46||en(f))&&r++<32?(n.consume(f),u):(r=0,a(f))}function s(f){return f===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(f),n.exit("autolinkMarker"),n.exit("autolink"),e):f===null||f===32||f===60||we(f)?t(f):(n.consume(f),s)}function a(f){return f===64?(n.consume(f),c):li(f)?(n.consume(f),a):t(f)}function c(f){return en(f)?m(f):t(f)}function m(f){return f===46?(n.consume(f),r=0,c):f===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(f),n.exit("autolinkMarker"),n.exit("autolink"),e):d(f)}function d(f){if((f===45||en(f))&&r++<63){const w=f===45?d:m;return n.consume(f),w}return t(f)}}const Qn={tokenize:ki,partial:!0};function ki(n,e,t){return r;function r(l){return N(l)?V(n,i,"linePrefix")(l):i(l)}function i(l){return l===null||I(l)?e(l):t(l)}}const Mt={name:"blockQuote",tokenize:bi,continuation:{tokenize:wi},exit:Si};function bi(n,e,t){const r=this;return i;function i(o){if(o===62){const u=r.containerState;return u.open||(n.enter("blockQuote",{_container:!0}),u.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(o),n.exit("blockQuoteMarker"),l}return t(o)}function l(o){return N(o)?(n.enter("blockQuotePrefixWhitespace"),n.consume(o),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),e):(n.exit("blockQuotePrefix"),e(o))}}function wi(n,e,t){const r=this;return i;function i(o){return N(o)?V(n,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return n.attempt(Mt,e,t)(o)}}function Si(n){n.exit("blockQuote")}const _t={name:"characterEscape",tokenize:Ci};function Ci(n,e,t){return r;function r(l){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(l),n.exit("escapeMarker"),i}function i(l){return ui(l)?(n.enter("characterEscapeValue"),n.consume(l),n.exit("characterEscapeValue"),n.exit("characterEscape"),e):t(l)}}const ct=document.createElement("i");function Te(n){const e="&"+n+";";ct.innerHTML=e;const t=ct.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===e?!1:t}const jt={name:"characterReference",tokenize:Ei};function Ei(n,e,t){const r=this;let i=0,l,o;return u;function u(m){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(m),n.exit("characterReferenceMarker"),s}function s(m){return m===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(m),n.exit("characterReferenceMarkerNumeric"),a):(n.enter("characterReferenceValue"),l=31,o=en,c(m))}function a(m){return m===88||m===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(m),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),l=6,o=oi,c):(n.enter("characterReferenceValue"),l=7,o=Se,c(m))}function c(m){if(m===59&&i){const d=n.exit("characterReferenceValue");return o===en&&!Te(r.sliceSerialize(d))?t(m):(n.enter("characterReferenceMarker"),n.consume(m),n.exit("characterReferenceMarker"),n.exit("characterReference"),e)}return o(m)&&i++<l?(n.consume(m),c):t(m)}}const pt={tokenize:Fi,partial:!0},ft={name:"codeFenced",tokenize:Ai,concrete:!0};function Ai(n,e,t){const r=this,i={tokenize:R,partial:!0};let l=0,o=0,u;return s;function s(g){return a(g)}function a(g){const P=r.events[r.events.length-1];return l=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,u=g,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),c(g)}function c(g){return g===u?(o++,n.consume(g),c):o<3?t(g):(n.exit("codeFencedFenceSequence"),N(g)?V(n,m,"whitespace")(g):m(g))}function m(g){return g===null||I(g)?(n.exit("codeFencedFence"),r.interrupt?e(g):n.check(pt,x,z)(g)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===null||I(g)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),m(g)):N(g)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),V(n,f,"whitespace")(g)):g===96&&g===u?t(g):(n.consume(g),d)}function f(g){return g===null||I(g)?m(g):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),w(g))}function w(g){return g===null||I(g)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),m(g)):g===96&&g===u?t(g):(n.consume(g),w)}function x(g){return n.attempt(i,z,C)(g)}function C(g){return n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),k}function k(g){return l>0&&N(g)?V(n,v,"linePrefix",l+1)(g):v(g)}function v(g){return g===null||I(g)?n.check(pt,x,z)(g):(n.enter("codeFlowValue"),E(g))}function E(g){return g===null||I(g)?(n.exit("codeFlowValue"),v(g)):(n.consume(g),E)}function z(g){return n.exit("codeFenced"),e(g)}function R(g,P,D){let M=0;return X;function X(B){return g.enter("lineEnding"),g.consume(B),g.exit("lineEnding"),A}function A(B){return g.enter("codeFencedFence"),N(B)?V(g,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):F(B)}function F(B){return B===u?(g.enter("codeFencedFenceSequence"),q(B)):D(B)}function q(B){return B===u?(M++,g.consume(B),q):M>=o?(g.exit("codeFencedFenceSequence"),N(B)?V(g,$,"whitespace")(B):$(B)):D(B)}function $(B){return B===null||I(B)?(g.exit("codeFencedFence"),P(B)):D(B)}}}function Fi(n,e,t){const r=this;return i;function i(o){return o===null?t(o):(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):e(o)}}const he={name:"codeIndented",tokenize:Ti},Pi={tokenize:Ii,partial:!0};function Ti(n,e,t){const r=this;return i;function i(a){return n.enter("codeIndented"),V(n,l,"linePrefix",5)(a)}function l(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(a):t(a)}function o(a){return a===null?s(a):I(a)?n.attempt(Pi,o,s)(a):(n.enter("codeFlowValue"),u(a))}function u(a){return a===null||I(a)?(n.exit("codeFlowValue"),o(a)):(n.consume(a),u)}function s(a){return n.exit("codeIndented"),e(a)}}function Ii(n,e,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):I(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),i):V(n,l,"linePrefix",5)(o)}function l(o){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?e(o):I(o)?i(o):t(o)}}const Oi={name:"codeText",tokenize:Di,resolve:Li,previous:vi};function Li(n){let e=n.length-4,t=3,r,i;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[e][1].type==="lineEnding"||n[e][1].type==="space")){for(r=t;++r<e;)if(n[r][1].type==="codeTextData"){n[t][1].type="codeTextPadding",n[e][1].type="codeTextPadding",t+=2,e-=2;break}}for(r=t-1,e++;++r<=e;)i===void 0?r!==e&&n[r][1].type!=="lineEnding"&&(i=r):(r===e||n[r][1].type==="lineEnding")&&(n[i][1].type="codeTextData",r!==i+2&&(n[i][1].end=n[r-1][1].end,n.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return n}function vi(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Di(n,e,t){let r=0,i,l;return o;function o(m){return n.enter("codeText"),n.enter("codeTextSequence"),u(m)}function u(m){return m===96?(n.consume(m),r++,u):(n.exit("codeTextSequence"),s(m))}function s(m){return m===null?t(m):m===32?(n.enter("space"),n.consume(m),n.exit("space"),s):m===96?(l=n.enter("codeTextSequence"),i=0,c(m)):I(m)?(n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),s):(n.enter("codeTextData"),a(m))}function a(m){return m===null||m===32||m===96||I(m)?(n.exit("codeTextData"),s(m)):(n.consume(m),a)}function c(m){return m===96?(n.consume(m),i++,c):i===r?(n.exit("codeTextSequence"),n.exit("codeText"),e(m)):(l.type="codeTextData",a(m))}}function Ht(n){const e={};let t=-1,r,i,l,o,u,s,a;for(;++t<n.length;){for(;t in e;)t=e[t];if(r=n[t],t&&r[1].type==="chunkFlow"&&n[t-1][1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,l=0,l<s.length&&s[l][1].type==="lineEndingBlank"&&(l+=2),l<s.length&&s[l][1].type==="content"))for(;++l<s.length&&s[l][1].type!=="content";)s[l][1].type==="chunkText"&&(s[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,zi(n,t)),t=e[t],a=!0);else if(r[1]._container){for(l=t,i=void 0;l--&&(o=n[l],o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(n[i][1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);i&&(r[1].end=Object.assign({},n[i][1].start),u=n.slice(i,t),u.unshift(r),mn(n,i,t-i+1,u))}}return!a}function zi(n,e){const t=n[e][1],r=n[e][2];let i=e-1;const l=[],o=t._tokenizer||r.parser[t.contentType](t.start),u=o.events,s=[],a={};let c,m,d=-1,f=t,w=0,x=0;const C=[x];for(;f;){for(;n[++i][1]!==f;);l.push(i),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),m&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),m=f,f=f.next}for(f=t;++d<u.length;)u[d][0]==="exit"&&u[d-1][0]==="enter"&&u[d][1].type===u[d-1][1].type&&u[d][1].start.line!==u[d][1].end.line&&(x=d+1,C.push(x),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):C.pop(),d=C.length;d--;){const k=u.slice(C[d],C[d+1]),v=l.pop();s.unshift([v,v+k.length-1]),mn(n,v,2,k)}for(d=-1;++d<s.length;)a[w+s[d][0]]=w+s[d][1],w+=s[d][1]-s[d][0]-1;return a}const Ri={tokenize:Mi,resolve:Ni},Bi={tokenize:_i,partial:!0};function Ni(n){return Ht(n),n}function Mi(n,e){let t;return r;function r(u){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?l(u):I(u)?n.check(Bi,o,l)(u):(n.consume(u),i)}function l(u){return n.exit("chunkContent"),n.exit("content"),e(u)}function o(u){return n.consume(u),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function _i(n,e,t){const r=this;return i;function i(o){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),V(n,l,"linePrefix")}function l(o){if(o===null||I(o))return t(o);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?e(o):n.interrupt(r.parser.constructs.flow,t,e)(o)}}function Ut(n,e,t,r,i,l,o,u,s){const a=s||Number.POSITIVE_INFINITY;let c=0;return m;function m(k){return k===60?(n.enter(r),n.enter(i),n.enter(l),n.consume(k),n.exit(l),d):k===null||k===32||k===41||we(k)?t(k):(n.enter(r),n.enter(o),n.enter(u),n.enter("chunkString",{contentType:"string"}),x(k))}function d(k){return k===62?(n.enter(l),n.consume(k),n.exit(l),n.exit(i),n.exit(r),e):(n.enter(u),n.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===62?(n.exit("chunkString"),n.exit(u),d(k)):k===null||k===60||I(k)?t(k):(n.consume(k),k===92?w:f)}function w(k){return k===60||k===62||k===92?(n.consume(k),f):f(k)}function x(k){return!c&&(k===null||k===41||J(k))?(n.exit("chunkString"),n.exit(u),n.exit(o),n.exit(r),e(k)):c<a&&k===40?(n.consume(k),c++,x):k===41?(n.consume(k),c--,x):k===null||k===32||k===40||we(k)?t(k):(n.consume(k),k===92?C:x)}function C(k){return k===40||k===41||k===92?(n.consume(k),x):x(k)}}function Vt(n,e,t,r,i,l){const o=this;let u=0,s;return a;function a(f){return n.enter(r),n.enter(i),n.consume(f),n.exit(i),n.enter(l),c}function c(f){return u>999||f===null||f===91||f===93&&!s||f===94&&!u&&"_hiddenFootnoteSupport"in o.parser.constructs?t(f):f===93?(n.exit(l),n.enter(i),n.consume(f),n.exit(i),n.exit(r),e):I(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),c):(n.enter("chunkString",{contentType:"string"}),m(f))}function m(f){return f===null||f===91||f===93||I(f)||u++>999?(n.exit("chunkString"),c(f)):(n.consume(f),s||(s=!N(f)),f===92?d:m)}function d(f){return f===91||f===92||f===93?(n.consume(f),u++,m):m(f)}}function qt(n,e,t,r,i,l){let o;return u;function u(d){return d===34||d===39||d===40?(n.enter(r),n.enter(i),n.consume(d),n.exit(i),o=d===40?41:d,s):t(d)}function s(d){return d===o?(n.enter(i),n.consume(d),n.exit(i),n.exit(r),e):(n.enter(l),a(d))}function a(d){return d===o?(n.exit(l),s(o)):d===null?t(d):I(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),V(n,a,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||I(d)?(n.exit("chunkString"),a(d)):(n.consume(d),d===92?m:c)}function m(d){return d===o||d===92?(n.consume(d),c):c(d)}}function Mn(n,e){let t;return r;function r(i){return I(i)?(n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),t=!0,r):N(i)?V(n,r,t?"linePrefix":"lineSuffix")(i):e(i)}}function On(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ji={name:"definition",tokenize:Ui},Hi={tokenize:Vi,partial:!0};function Ui(n,e,t){const r=this;let i;return l;function l(f){return n.enter("definition"),o(f)}function o(f){return Vt.call(r,n,u,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function u(f){return i=On(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(n.enter("definitionMarker"),n.consume(f),n.exit("definitionMarker"),s):t(f)}function s(f){return J(f)?Mn(n,a)(f):a(f)}function a(f){return Ut(n,c,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return n.attempt(Hi,m,m)(f)}function m(f){return N(f)?V(n,d,"whitespace")(f):d(f)}function d(f){return f===null||I(f)?(n.exit("definition"),r.parser.defined.push(i),e(f)):t(f)}}function Vi(n,e,t){return r;function r(u){return J(u)?Mn(n,i)(u):t(u)}function i(u){return qt(n,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return N(u)?V(n,o,"whitespace")(u):o(u)}function o(u){return u===null||I(u)?e(u):t(u)}}const qi={name:"hardBreakEscape",tokenize:$i};function $i(n,e,t){return r;function r(l){return n.enter("hardBreakEscape"),n.consume(l),i}function i(l){return I(l)?(n.exit("hardBreakEscape"),e(l)):t(l)}}const Wi={name:"headingAtx",tokenize:Xi,resolve:Qi};function Qi(n,e){let t=n.length-2,r=3,i,l;return n[r][1].type==="whitespace"&&(r+=2),t-2>r&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&n[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:n[r][1].start,end:n[t][1].end},l={type:"chunkText",start:n[r][1].start,end:n[t][1].end,contentType:"text"},mn(n,r,t-r+1,[["enter",i,e],["enter",l,e],["exit",l,e],["exit",i,e]])),n}function Xi(n,e,t){let r=0;return i;function i(c){return n.enter("atxHeading"),l(c)}function l(c){return n.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(n.consume(c),o):c===null||J(c)?(n.exit("atxHeadingSequence"),u(c)):t(c)}function u(c){return c===35?(n.enter("atxHeadingSequence"),s(c)):c===null||I(c)?(n.exit("atxHeading"),e(c)):N(c)?V(n,u,"whitespace")(c):(n.enter("atxHeadingText"),a(c))}function s(c){return c===35?(n.consume(c),s):(n.exit("atxHeadingSequence"),u(c))}function a(c){return c===null||c===35||J(c)?(n.exit("atxHeadingText"),u(c)):(n.consume(c),a)}}const Yi=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ht=["pre","script","style","textarea"],Ki={name:"htmlFlow",tokenize:nl,resolveTo:Ji,concrete:!0},Gi={tokenize:tl,partial:!0},Zi={tokenize:el,partial:!0};function Ji(n){let e=n.length;for(;e--&&!(n[e][0]==="enter"&&n[e][1].type==="htmlFlow"););return e>1&&n[e-2][1].type==="linePrefix"&&(n[e][1].start=n[e-2][1].start,n[e+1][1].start=n[e-2][1].start,n.splice(e-2,2)),n}function nl(n,e,t){const r=this;let i,l,o,u,s;return a;function a(h){return c(h)}function c(h){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(h),m}function m(h){return h===33?(n.consume(h),d):h===47?(n.consume(h),l=!0,x):h===63?(n.consume(h),i=3,r.interrupt?e:p):hn(h)?(n.consume(h),o=String.fromCharCode(h),C):t(h)}function d(h){return h===45?(n.consume(h),i=2,f):h===91?(n.consume(h),i=5,u=0,w):hn(h)?(n.consume(h),i=4,r.interrupt?e:p):t(h)}function f(h){return h===45?(n.consume(h),r.interrupt?e:p):t(h)}function w(h){const cn="CDATA[";return h===cn.charCodeAt(u++)?(n.consume(h),u===cn.length?r.interrupt?e:F:w):t(h)}function x(h){return hn(h)?(n.consume(h),o=String.fromCharCode(h),C):t(h)}function C(h){if(h===null||h===47||h===62||J(h)){const cn=h===47,An=o.toLowerCase();return!cn&&!l&&ht.includes(An)?(i=1,r.interrupt?e(h):F(h)):Yi.includes(o.toLowerCase())?(i=6,cn?(n.consume(h),k):r.interrupt?e(h):F(h)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(h):l?v(h):E(h))}return h===45||en(h)?(n.consume(h),o+=String.fromCharCode(h),C):t(h)}function k(h){return h===62?(n.consume(h),r.interrupt?e:F):t(h)}function v(h){return N(h)?(n.consume(h),v):X(h)}function E(h){return h===47?(n.consume(h),X):h===58||h===95||hn(h)?(n.consume(h),z):N(h)?(n.consume(h),E):X(h)}function z(h){return h===45||h===46||h===58||h===95||en(h)?(n.consume(h),z):R(h)}function R(h){return h===61?(n.consume(h),g):N(h)?(n.consume(h),R):E(h)}function g(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(n.consume(h),s=h,P):N(h)?(n.consume(h),g):D(h)}function P(h){return h===s?(n.consume(h),s=null,M):h===null||I(h)?t(h):(n.consume(h),P)}function D(h){return h===null||h===34||h===39||h===47||h===60||h===61||h===62||h===96||J(h)?R(h):(n.consume(h),D)}function M(h){return h===47||h===62||N(h)?E(h):t(h)}function X(h){return h===62?(n.consume(h),A):t(h)}function A(h){return h===null||I(h)?F(h):N(h)?(n.consume(h),A):t(h)}function F(h){return h===45&&i===2?(n.consume(h),G):h===60&&i===1?(n.consume(h),Y):h===62&&i===4?(n.consume(h),sn):h===63&&i===3?(n.consume(h),p):h===93&&i===5?(n.consume(h),dn):I(h)&&(i===6||i===7)?(n.exit("htmlFlowData"),n.check(Gi,gn,q)(h)):h===null||I(h)?(n.exit("htmlFlowData"),q(h)):(n.consume(h),F)}function q(h){return n.check(Zi,$,gn)(h)}function $(h){return n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),B}function B(h){return h===null||I(h)?q(h):(n.enter("htmlFlowData"),F(h))}function G(h){return h===45?(n.consume(h),p):F(h)}function Y(h){return h===47?(n.consume(h),o="",an):F(h)}function an(h){if(h===62){const cn=o.toLowerCase();return ht.includes(cn)?(n.consume(h),sn):F(h)}return hn(h)&&o.length<8?(n.consume(h),o+=String.fromCharCode(h),an):F(h)}function dn(h){return h===93?(n.consume(h),p):F(h)}function p(h){return h===62?(n.consume(h),sn):h===45&&i===2?(n.consume(h),p):F(h)}function sn(h){return h===null||I(h)?(n.exit("htmlFlowData"),gn(h)):(n.consume(h),sn)}function gn(h){return n.exit("htmlFlow"),e(h)}}function el(n,e,t){const r=this;return i;function i(o){return I(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):e(o)}}function tl(n,e,t){return r;function r(i){return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),n.attempt(Qn,e,t)}}const rl={name:"htmlText",tokenize:il};function il(n,e,t){const r=this;let i,l,o;return u;function u(p){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(p),s}function s(p){return p===33?(n.consume(p),a):p===47?(n.consume(p),R):p===63?(n.consume(p),E):hn(p)?(n.consume(p),D):t(p)}function a(p){return p===45?(n.consume(p),c):p===91?(n.consume(p),l=0,w):hn(p)?(n.consume(p),v):t(p)}function c(p){return p===45?(n.consume(p),f):t(p)}function m(p){return p===null?t(p):p===45?(n.consume(p),d):I(p)?(o=m,Y(p)):(n.consume(p),m)}function d(p){return p===45?(n.consume(p),f):m(p)}function f(p){return p===62?G(p):p===45?d(p):m(p)}function w(p){const sn="CDATA[";return p===sn.charCodeAt(l++)?(n.consume(p),l===sn.length?x:w):t(p)}function x(p){return p===null?t(p):p===93?(n.consume(p),C):I(p)?(o=x,Y(p)):(n.consume(p),x)}function C(p){return p===93?(n.consume(p),k):x(p)}function k(p){return p===62?G(p):p===93?(n.consume(p),k):x(p)}function v(p){return p===null||p===62?G(p):I(p)?(o=v,Y(p)):(n.consume(p),v)}function E(p){return p===null?t(p):p===63?(n.consume(p),z):I(p)?(o=E,Y(p)):(n.consume(p),E)}function z(p){return p===62?G(p):E(p)}function R(p){return hn(p)?(n.consume(p),g):t(p)}function g(p){return p===45||en(p)?(n.consume(p),g):P(p)}function P(p){return I(p)?(o=P,Y(p)):N(p)?(n.consume(p),P):G(p)}function D(p){return p===45||en(p)?(n.consume(p),D):p===47||p===62||J(p)?M(p):t(p)}function M(p){return p===47?(n.consume(p),G):p===58||p===95||hn(p)?(n.consume(p),X):I(p)?(o=M,Y(p)):N(p)?(n.consume(p),M):G(p)}function X(p){return p===45||p===46||p===58||p===95||en(p)?(n.consume(p),X):A(p)}function A(p){return p===61?(n.consume(p),F):I(p)?(o=A,Y(p)):N(p)?(n.consume(p),A):M(p)}function F(p){return p===null||p===60||p===61||p===62||p===96?t(p):p===34||p===39?(n.consume(p),i=p,q):I(p)?(o=F,Y(p)):N(p)?(n.consume(p),F):(n.consume(p),$)}function q(p){return p===i?(n.consume(p),i=void 0,B):p===null?t(p):I(p)?(o=q,Y(p)):(n.consume(p),q)}function $(p){return p===null||p===34||p===39||p===60||p===61||p===96?t(p):p===47||p===62||J(p)?M(p):(n.consume(p),$)}function B(p){return p===47||p===62||J(p)?M(p):t(p)}function G(p){return p===62?(n.consume(p),n.exit("htmlTextData"),n.exit("htmlText"),e):t(p)}function Y(p){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),an}function an(p){return N(p)?V(n,dn,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p):dn(p)}function dn(p){return n.enter("htmlTextData"),o(p)}}const Ie={name:"labelEnd",tokenize:cl,resolveTo:sl,resolveAll:al},ll={tokenize:pl},ol={tokenize:fl},ul={tokenize:hl};function al(n){let e=-1;for(;++e<n.length;){const t=n[e][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(n.splice(e+1,t.type==="labelImage"?4:2),t.type="data",e++)}return n}function sl(n,e){let t=n.length,r=0,i,l,o,u;for(;t--;)if(i=n[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;n[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(n[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const s={type:n[l][1].type==="labelLink"?"link":"image",start:Object.assign({},n[l][1].start),end:Object.assign({},n[n.length-1][1].end)},a={type:"label",start:Object.assign({},n[l][1].start),end:Object.assign({},n[o][1].end)},c={type:"labelText",start:Object.assign({},n[l+r+2][1].end),end:Object.assign({},n[o-2][1].start)};return u=[["enter",s,e],["enter",a,e]],u=rn(u,n.slice(l+1,l+r+3)),u=rn(u,[["enter",c,e]]),u=rn(u,Pe(e.parser.constructs.insideSpan.null,n.slice(l+r+4,o-3),e)),u=rn(u,[["exit",c,e],n[o-2],n[o-1],["exit",a,e]]),u=rn(u,n.slice(o+1)),u=rn(u,[["exit",s,e]]),mn(n,l,n.length,u),n}function cl(n,e,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return u;function u(d){return l?l._inactive?m(d):(o=r.parser.defined.includes(On(r.sliceSerialize({start:l.end,end:r.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(d),n.exit("labelMarker"),n.exit("labelEnd"),s):t(d)}function s(d){return d===40?n.attempt(ll,c,o?c:m)(d):d===91?n.attempt(ol,c,o?a:m)(d):o?c(d):m(d)}function a(d){return n.attempt(ul,c,m)(d)}function c(d){return e(d)}function m(d){return l._balanced=!0,t(d)}}function pl(n,e,t){return r;function r(m){return n.enter("resource"),n.enter("resourceMarker"),n.consume(m),n.exit("resourceMarker"),i}function i(m){return J(m)?Mn(n,l)(m):l(m)}function l(m){return m===41?c(m):Ut(n,o,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function o(m){return J(m)?Mn(n,s)(m):c(m)}function u(m){return t(m)}function s(m){return m===34||m===39||m===40?qt(n,a,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):c(m)}function a(m){return J(m)?Mn(n,c)(m):c(m)}function c(m){return m===41?(n.enter("resourceMarker"),n.consume(m),n.exit("resourceMarker"),n.exit("resource"),e):t(m)}}function fl(n,e,t){const r=this;return i;function i(u){return Vt.call(r,n,l,o,"reference","referenceMarker","referenceString")(u)}function l(u){return r.parser.defined.includes(On(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(u):t(u)}function o(u){return t(u)}}function hl(n,e,t){return r;function r(l){return n.enter("reference"),n.enter("referenceMarker"),n.consume(l),n.exit("referenceMarker"),i}function i(l){return l===93?(n.enter("referenceMarker"),n.consume(l),n.exit("referenceMarker"),n.exit("reference"),e):t(l)}}const ml={name:"labelStartImage",tokenize:dl,resolveAll:Ie.resolveAll};function dl(n,e,t){const r=this;return i;function i(u){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(u),n.exit("labelImageMarker"),l}function l(u){return u===91?(n.enter("labelMarker"),n.consume(u),n.exit("labelMarker"),n.exit("labelImage"),o):t(u)}function o(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(u):e(u)}}const gl={name:"labelStartLink",tokenize:yl,resolveAll:Ie.resolveAll};function yl(n,e,t){const r=this;return i;function i(o){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(o),n.exit("labelMarker"),n.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):e(o)}}const me={name:"lineEnding",tokenize:xl};function xl(n,e){return t;function t(r){return n.enter("lineEnding"),n.consume(r),n.exit("lineEnding"),V(n,e,"linePrefix")}}const $n={name:"thematicBreak",tokenize:kl};function kl(n,e,t){let r=0,i;return l;function l(a){return n.enter("thematicBreak"),o(a)}function o(a){return i=a,u(a)}function u(a){return a===i?(n.enter("thematicBreakSequence"),s(a)):r>=3&&(a===null||I(a))?(n.exit("thematicBreak"),e(a)):t(a)}function s(a){return a===i?(n.consume(a),r++,s):(n.exit("thematicBreakSequence"),N(a)?V(n,u,"whitespace")(a):u(a))}}const Z={name:"list",tokenize:Sl,continuation:{tokenize:Cl},exit:Al},bl={tokenize:Fl,partial:!0},wl={tokenize:El,partial:!0};function Sl(n,e,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return u;function u(f){const w=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Se(f)){if(r.containerState.type||(r.containerState.type=w,n.enter(w,{_container:!0})),w==="listUnordered")return n.enter("listItemPrefix"),f===42||f===45?n.check($n,t,a)(f):a(f);if(!r.interrupt||f===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),s(f)}return t(f)}function s(f){return Se(f)&&++o<10?(n.consume(f),s):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(n.exit("listItemValue"),a(f)):t(f)}function a(f){return n.enter("listItemMarker"),n.consume(f),n.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,n.check(Qn,r.interrupt?t:c,n.attempt(bl,d,m))}function c(f){return r.containerState.initialBlankLine=!0,l++,d(f)}function m(f){return N(f)?(n.enter("listItemPrefixWhitespace"),n.consume(f),n.exit("listItemPrefixWhitespace"),d):t(f)}function d(f){return r.containerState.size=l+r.sliceSerialize(n.exit("listItemPrefix"),!0).length,e(f)}}function Cl(n,e,t){const r=this;return r.containerState._closeFlow=void 0,n.check(Qn,i,l);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,V(n,e,"listItemIndent",r.containerState.size+1)(u)}function l(u){return r.containerState.furtherBlankLines||!N(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,n.attempt(wl,e,o)(u))}function o(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,V(n,n.attempt(Z,e,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function El(n,e,t){const r=this;return V(n,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?e(l):t(l)}}function Al(n){n.exit(this.containerState.type)}function Fl(n,e,t){const r=this;return V(n,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!N(l)&&o&&o[1].type==="listItemPrefixWhitespace"?e(l):t(l)}}const mt={name:"setextUnderline",tokenize:Tl,resolveTo:Pl};function Pl(n,e){let t=n.length,r,i,l;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){r=t;break}n[t][1].type==="paragraph"&&(i=t)}else n[t][1].type==="content"&&n.splice(t,1),!l&&n[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:Object.assign({},n[i][1].start),end:Object.assign({},n[n.length-1][1].end)};return n[i][1].type="setextHeadingText",l?(n.splice(i,0,["enter",o,e]),n.splice(l+1,0,["exit",n[r][1],e]),n[r][1].end=Object.assign({},n[l][1].end)):n[r][1]=o,n.push(["exit",o,e]),n}function Tl(n,e,t){const r=this;let i;return l;function l(a){let c=r.events.length,m;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){m=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(n.enter("setextHeadingLine"),i=a,o(a)):t(a)}function o(a){return n.enter("setextHeadingLineSequence"),u(a)}function u(a){return a===i?(n.consume(a),u):(n.exit("setextHeadingLineSequence"),N(a)?V(n,s,"lineSuffix")(a):s(a))}function s(a){return a===null||I(a)?(n.exit("setextHeadingLine"),e(a)):t(a)}}const Il={tokenize:Ol};function Ol(n){const e=this,t=n.attempt(Qn,r,n.attempt(this.parser.constructs.flowInitial,i,V(n,n.attempt(this.parser.constructs.flow,i,n.attempt(Ri,i)),"linePrefix")));return t;function r(l){if(l===null){n.consume(l);return}return n.enter("lineEndingBlank"),n.consume(l),n.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function i(l){if(l===null){n.consume(l);return}return n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),e.currentConstruct=void 0,t}}const Ll={resolveAll:Wt()},vl=$t("string"),Dl=$t("text");function $t(n){return{tokenize:e,resolveAll:Wt(n==="text"?zl:void 0)};function e(t){const r=this,i=this.parser.constructs[n],l=t.attempt(i,o,u);return o;function o(c){return a(c)?l(c):u(c)}function u(c){if(c===null){t.consume(c);return}return t.enter("data"),t.consume(c),s}function s(c){return a(c)?(t.exit("data"),l(c)):(t.consume(c),s)}function a(c){if(c===null)return!0;const m=i[c];let d=-1;if(m)for(;++d<m.length;){const f=m[d];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Wt(n){return e;function e(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return n?n(t,r):t}}function zl(n,e){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const r=n[t-1][1],i=e.sliceStream(r);let l=i.length,o=-1,u=0,s;for(;l--;){const a=i[l];if(typeof a=="string"){for(o=a.length;a.charCodeAt(o-1)===32;)u++,o--;if(o)break;o=-1}else if(a===-2)s=!0,u++;else if(a!==-1){l++;break}}if(u){const a={type:t===n.length||s||u<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-u,offset:r.end.offset-u,_index:r.start._index+l,_bufferIndex:l?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},a.start),r.start.offset===r.end.offset?Object.assign(r,a):(n.splice(t,0,["enter",a,e],["exit",a,e]),t+=2)}t++}return n}function Rl(n,e,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},l=[];let o=[],u=[];const s={consume:v,enter:E,exit:z,attempt:P(R),check:P(g),interrupt:P(g,{interrupt:!0})},a={previous:null,code:null,containerState:{},events:[],parser:n,sliceStream:f,sliceSerialize:d,now:w,defineSkip:x,write:m};let c=e.tokenize.call(a,s);return e.resolveAll&&l.push(e),a;function m(A){return o=rn(o,A),C(),o[o.length-1]!==null?[]:(D(e,0),a.events=Pe(l,a.events,a),a.events)}function d(A,F){return Nl(f(A),F)}function f(A){return Bl(o,A)}function w(){const{line:A,column:F,offset:q,_index:$,_bufferIndex:B}=r;return{line:A,column:F,offset:q,_index:$,_bufferIndex:B}}function x(A){i[A.line]=A.column,X()}function C(){let A;for(;r._index<o.length;){const F=o[r._index];if(typeof F=="string")for(A=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===A&&r._bufferIndex<F.length;)k(F.charCodeAt(r._bufferIndex));else k(F)}}function k(A){c=c(A)}function v(A){I(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,X()):A!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),a.previous=A}function E(A,F){const q=F||{};return q.type=A,q.start=w(),a.events.push(["enter",q,a]),u.push(q),q}function z(A){const F=u.pop();return F.end=w(),a.events.push(["exit",F,a]),F}function R(A,F){D(A,F.from)}function g(A,F){F.restore()}function P(A,F){return q;function q($,B,G){let Y,an,dn,p;return Array.isArray($)?gn($):"tokenize"in $?gn([$]):sn($);function sn(K){return Fn;function Fn(kn){const Pn=kn!==null&&K[kn],Tn=kn!==null&&K.null,le=[...Array.isArray(Pn)?Pn:Pn?[Pn]:[],...Array.isArray(Tn)?Tn:Tn?[Tn]:[]];return gn(le)(kn)}}function gn(K){return Y=K,an=0,K.length===0?G:h(K[an])}function h(K){return Fn;function Fn(kn){return p=M(),dn=K,K.partial||(a.currentConstruct=K),K.name&&a.parser.constructs.disable.null.includes(K.name)?An():K.tokenize.call(F?Object.assign(Object.create(a),F):a,s,cn,An)(kn)}}function cn(K){return A(dn,p),B}function An(K){return p.restore(),++an<Y.length?h(Y[an]):G}}}function D(A,F){A.resolveAll&&!l.includes(A)&&l.push(A),A.resolve&&mn(a.events,F,a.events.length-F,A.resolve(a.events.slice(F),a)),A.resolveTo&&(a.events=A.resolveTo(a.events,a))}function M(){const A=w(),F=a.previous,q=a.currentConstruct,$=a.events.length,B=Array.from(u);return{restore:G,from:$};function G(){r=A,a.previous=F,a.currentConstruct=q,a.events.length=$,u=B,X()}}function X(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Bl(n,e){const t=e.start._index,r=e.start._bufferIndex,i=e.end._index,l=e.end._bufferIndex;let o;if(t===i)o=[n[t].slice(r,l)];else{if(o=n.slice(t,i),r>-1){const u=o[0];typeof u=="string"?o[0]=u.slice(r):o.shift()}l>0&&o.push(n[i].slice(0,l))}return o}function Nl(n,e){let t=-1;const r=[];let i;for(;++t<n.length;){const l=n[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
7
|
-
`;break}case-3:{o=`\r
|
|
8
|
-
`;break}case-2:{o=e?" ":" ";break}case-1:{if(!e&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}const Ml={42:Z,43:Z,45:Z,48:Z,49:Z,50:Z,51:Z,52:Z,53:Z,54:Z,55:Z,56:Z,57:Z,62:Mt},_l={91:ji},jl={[-2]:he,[-1]:he,32:he},Hl={35:Wi,42:$n,45:[mt,$n],60:Ki,61:mt,95:$n,96:ft,126:ft},Ul={38:jt,92:_t},Vl={[-5]:me,[-4]:me,[-3]:me,33:ml,38:jt,42:Ce,60:[yi,rl],91:gl,92:[qi,_t],93:Ie,95:Ce,96:Oi},ql={null:[Ce,Ll]},$l={null:[42,95]},Wl={null:[]},Ql=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$l,contentInitial:_l,disable:Wl,document:Ml,flow:Hl,flowInitial:jl,insideSpan:ql,string:Ul,text:Vl},Symbol.toStringTag,{value:"Module"}));function Xl(n){const t=ei([Ql,...(n||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:i(ci),document:i(fi),flow:i(Il),string:i(vl),text:i(Dl)};return r;function i(l){return o;function o(u){return Rl(r,l,u)}}}const dt=/[\0\t\n\r]/g;function Yl(){let n=1,e="",t=!0,r;return i;function i(l,o,u){const s=[];let a,c,m,d,f;for(l=e+l.toString(o),m=0,e="",t&&(l.charCodeAt(0)===65279&&m++,t=void 0);m<l.length;){if(dt.lastIndex=m,a=dt.exec(l),d=a&&a.index!==void 0?a.index:l.length,f=l.charCodeAt(d),!a){e=l.slice(m);break}if(f===10&&m===d&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),m<d&&(s.push(l.slice(m,d)),n+=d-m),f){case 0:{s.push(65533),n++;break}case 9:{for(c=Math.ceil(n/4)*4,s.push(-2);n++<c;)s.push(-1);break}case 10:{s.push(-4),n=1;break}default:r=!0,n=1}m=d+1}return u&&(r&&s.push(-5),e&&s.push(e),s.push(null)),s}}function Kl(n){for(;!Ht(n););return n}function Qt(n,e){const t=Number.parseInt(n,e);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCharCode(t)}const Gl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Zl(n){return n.replace(Gl,Jl)}function Jl(n,e,t){if(e)return e;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return Qt(t.slice(l?2:1),l?16:10)}return Te(t)||n}const Xt={}.hasOwnProperty,no=function(n,e,t){return typeof e!="string"&&(t=e,e=void 0),eo(t)(Kl(Xl(t).document().write(Yl()(n,e,!0))))};function eo(n){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Ue),autolinkProtocol:A,autolinkEmail:A,atxHeading:u(_e),blockQuote:u(le),characterEscape:A,characterReference:A,codeFenced:u(Me),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:u(Me,s),codeText:u(kr,s),codeTextData:A,data:A,codeFlowValue:A,definition:u(br),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:u(wr),hardBreakEscape:u(je),hardBreakTrailing:u(je),htmlFlow:u(He,s),htmlFlowData:A,htmlText:u(He,s),htmlTextData:A,image:u(Sr),label:s,link:u(Ue),listItem:u(Cr),listItemValue:w,listOrdered:u(Ve,f),listUnordered:u(Ve),paragraph:u(Er),reference:An,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:u(_e),strong:u(Ar),thematicBreak:u(Pr)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:Tn,autolinkProtocol:Pn,blockQuote:c(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:Fn,characterReferenceMarkerNumeric:Fn,characterReferenceValue:kn,codeFenced:c(v),codeFencedFence:k,codeFencedFenceInfo:x,codeFencedFenceMeta:C,codeFlowValue:F,codeIndented:c(E),codeText:c(Y),codeTextData:F,data:F,definition:c(),definitionDestinationString:g,definitionLabelString:z,definitionTitleString:R,emphasis:c(),hardBreakEscape:c($),hardBreakTrailing:c($),htmlFlow:c(B),htmlFlowData:F,htmlText:c(G),htmlTextData:F,image:c(dn),label:sn,labelText:p,lineEnding:q,link:c(an),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:K,resourceDestinationString:gn,resourceTitleString:h,resource:cn,setextHeading:c(X),setextHeadingLineSequence:M,setextHeadingText:D,strong:c(),thematicBreak:c()}};Yt(e,(n||{}).mdastExtensions||[]);const t={};return r;function r(y){let S={type:"root",children:[]};const T={stack:[S],tokenStack:[],config:e,enter:a,exit:m,buffer:s,resume:d,setData:l,getData:o},j=[];let H=-1;for(;++H<y.length;)if(y[H][1].type==="listOrdered"||y[H][1].type==="listUnordered")if(y[H][0]==="enter")j.push(H);else{const pn=j.pop();H=i(y,pn,H)}for(H=-1;++H<y.length;){const pn=e[y[H][0]];Xt.call(pn,y[H][1].type)&&pn[y[H][1].type].call(Object.assign({sliceSerialize:y[H][2].sliceSerialize},T),y[H][1])}if(T.tokenStack.length>0){const pn=T.tokenStack[T.tokenStack.length-1];(pn[1]||gt).call(T,void 0,pn[0])}for(S.position={start:wn(y.length>0?y[0][1].start:{line:1,column:1,offset:0}),end:wn(y.length>0?y[y.length-2][1].end:{line:1,column:1,offset:0})},H=-1;++H<e.transforms.length;)S=e.transforms[H](S)||S;return S}function i(y,S,T){let j=S-1,H=-1,pn=!1,bn,yn,zn,Rn;for(;++j<=T;){const W=y[j];if(W[1].type==="listUnordered"||W[1].type==="listOrdered"||W[1].type==="blockQuote"?(W[0]==="enter"?H++:H--,Rn=void 0):W[1].type==="lineEndingBlank"?W[0]==="enter"&&(bn&&!Rn&&!H&&!zn&&(zn=j),Rn=void 0):W[1].type==="linePrefix"||W[1].type==="listItemValue"||W[1].type==="listItemMarker"||W[1].type==="listItemPrefix"||W[1].type==="listItemPrefixWhitespace"||(Rn=void 0),!H&&W[0]==="enter"&&W[1].type==="listItemPrefix"||H===-1&&W[0]==="exit"&&(W[1].type==="listUnordered"||W[1].type==="listOrdered")){if(bn){let oe=j;for(yn=void 0;oe--;){const xn=y[oe];if(xn[1].type==="lineEnding"||xn[1].type==="lineEndingBlank"){if(xn[0]==="exit")continue;yn&&(y[yn][1].type="lineEndingBlank",pn=!0),xn[1].type="lineEnding",yn=oe}else if(!(xn[1].type==="linePrefix"||xn[1].type==="blockQuotePrefix"||xn[1].type==="blockQuotePrefixWhitespace"||xn[1].type==="blockQuoteMarker"||xn[1].type==="listItemIndent"))break}zn&&(!yn||zn<yn)&&(bn._spread=!0),bn.end=Object.assign({},yn?y[yn][1].start:W[1].end),y.splice(yn||j,0,["exit",bn,W[2]]),j++,T++}W[1].type==="listItemPrefix"&&(bn={type:"listItem",_spread:!1,start:Object.assign({},W[1].start),end:void 0},y.splice(j,0,["enter",bn,W[2]]),j++,T++,zn=void 0,Rn=!0)}}return y[S][1]._spread=pn,T}function l(y,S){t[y]=S}function o(y){return t[y]}function u(y,S){return T;function T(j){a.call(this,y(j),j),S&&S.call(this,j)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(y,S,T){return this.stack[this.stack.length-1].children.push(y),this.stack.push(y),this.tokenStack.push([S,T]),y.position={start:wn(S.start)},y}function c(y){return S;function S(T){y&&y.call(this,T),m.call(this,T)}}function m(y,S){const T=this.stack.pop(),j=this.tokenStack.pop();if(j)j[0].type!==y.type&&(S?S.call(this,y,j[0]):(j[1]||gt).call(this,y,j[0]));else throw new Error("Cannot close `"+y.type+"` ("+Nn({start:y.start,end:y.end})+"): it’s not open");return T.position.end=wn(y.end),T}function d(){return Jr(this.stack.pop())}function f(){l("expectingFirstListItemValue",!0)}function w(y){if(o("expectingFirstListItemValue")){const S=this.stack[this.stack.length-2];S.start=Number.parseInt(this.sliceSerialize(y),10),l("expectingFirstListItemValue")}}function x(){const y=this.resume(),S=this.stack[this.stack.length-1];S.lang=y}function C(){const y=this.resume(),S=this.stack[this.stack.length-1];S.meta=y}function k(){o("flowCodeInside")||(this.buffer(),l("flowCodeInside",!0))}function v(){const y=this.resume(),S=this.stack[this.stack.length-1];S.value=y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),l("flowCodeInside")}function E(){const y=this.resume(),S=this.stack[this.stack.length-1];S.value=y.replace(/(\r?\n|\r)$/g,"")}function z(y){const S=this.resume(),T=this.stack[this.stack.length-1];T.label=S,T.identifier=On(this.sliceSerialize(y)).toLowerCase()}function R(){const y=this.resume(),S=this.stack[this.stack.length-1];S.title=y}function g(){const y=this.resume(),S=this.stack[this.stack.length-1];S.url=y}function P(y){const S=this.stack[this.stack.length-1];if(!S.depth){const T=this.sliceSerialize(y).length;S.depth=T}}function D(){l("setextHeadingSlurpLineEnding",!0)}function M(y){const S=this.stack[this.stack.length-1];S.depth=this.sliceSerialize(y).charCodeAt(0)===61?1:2}function X(){l("setextHeadingSlurpLineEnding")}function A(y){const S=this.stack[this.stack.length-1];let T=S.children[S.children.length-1];(!T||T.type!=="text")&&(T=Fr(),T.position={start:wn(y.start)},S.children.push(T)),this.stack.push(T)}function F(y){const S=this.stack.pop();S.value+=this.sliceSerialize(y),S.position.end=wn(y.end)}function q(y){const S=this.stack[this.stack.length-1];if(o("atHardBreak")){const T=S.children[S.children.length-1];T.position.end=wn(y.end),l("atHardBreak");return}!o("setextHeadingSlurpLineEnding")&&e.canContainEols.includes(S.type)&&(A.call(this,y),F.call(this,y))}function $(){l("atHardBreak",!0)}function B(){const y=this.resume(),S=this.stack[this.stack.length-1];S.value=y}function G(){const y=this.resume(),S=this.stack[this.stack.length-1];S.value=y}function Y(){const y=this.resume(),S=this.stack[this.stack.length-1];S.value=y}function an(){const y=this.stack[this.stack.length-1];if(o("inReference")){const S=o("referenceType")||"shortcut";y.type+="Reference",y.referenceType=S,delete y.url,delete y.title}else delete y.identifier,delete y.label;l("referenceType")}function dn(){const y=this.stack[this.stack.length-1];if(o("inReference")){const S=o("referenceType")||"shortcut";y.type+="Reference",y.referenceType=S,delete y.url,delete y.title}else delete y.identifier,delete y.label;l("referenceType")}function p(y){const S=this.sliceSerialize(y),T=this.stack[this.stack.length-2];T.label=Zl(S),T.identifier=On(S).toLowerCase()}function sn(){const y=this.stack[this.stack.length-1],S=this.resume(),T=this.stack[this.stack.length-1];if(l("inReference",!0),T.type==="link"){const j=y.children;T.children=j}else T.alt=S}function gn(){const y=this.resume(),S=this.stack[this.stack.length-1];S.url=y}function h(){const y=this.resume(),S=this.stack[this.stack.length-1];S.title=y}function cn(){l("inReference")}function An(){l("referenceType","collapsed")}function K(y){const S=this.resume(),T=this.stack[this.stack.length-1];T.label=S,T.identifier=On(this.sliceSerialize(y)).toLowerCase(),l("referenceType","full")}function Fn(y){l("characterReferenceType",y.type)}function kn(y){const S=this.sliceSerialize(y),T=o("characterReferenceType");let j;T?(j=Qt(S,T==="characterReferenceMarkerNumeric"?10:16),l("characterReferenceType")):j=Te(S);const H=this.stack.pop();H.value+=j,H.position.end=wn(y.end)}function Pn(y){F.call(this,y);const S=this.stack[this.stack.length-1];S.url=this.sliceSerialize(y)}function Tn(y){F.call(this,y);const S=this.stack[this.stack.length-1];S.url="mailto:"+this.sliceSerialize(y)}function le(){return{type:"blockquote",children:[]}}function Me(){return{type:"code",lang:null,meta:null,value:""}}function kr(){return{type:"inlineCode",value:""}}function br(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wr(){return{type:"emphasis",children:[]}}function _e(){return{type:"heading",depth:void 0,children:[]}}function je(){return{type:"break"}}function He(){return{type:"html",value:""}}function Sr(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function Ve(y){return{type:"list",ordered:y.type==="listOrdered",start:null,spread:y._spread,children:[]}}function Cr(y){return{type:"listItem",spread:y._spread,checked:null,children:[]}}function Er(){return{type:"paragraph",children:[]}}function Ar(){return{type:"strong",children:[]}}function Fr(){return{type:"text",value:""}}function Pr(){return{type:"thematicBreak"}}}function wn(n){return{line:n.line,column:n.column,offset:n.offset}}function Yt(n,e){let t=-1;for(;++t<e.length;){const r=e[t];Array.isArray(r)?Yt(n,r):to(n,r)}}function to(n,e){let t;for(t in e)if(Xt.call(e,t)){if(t==="canContainEols"){const r=e[t];r&&n[t].push(...r)}else if(t==="transforms"){const r=e[t];r&&n[t].push(...r)}else if(t==="enter"||t==="exit"){const r=e[t];r&&Object.assign(n[t],r)}}}function gt(n,e){throw n?new Error("Cannot close `"+n.type+"` ("+Nn({start:n.start,end:n.end})+"): a different token (`"+e.type+"`, "+Nn({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Nn({start:e.start,end:e.end})+") is still open")}function ro(n){Object.assign(this,{Parser:t=>{const r=this.data("settings");return no(t,Object.assign({},r,n,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function io(n,e){const t={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(e),!0)};return n.patch(e,t),n.applyData(e,t)}function lo(n,e){const t={type:"element",tagName:"br",properties:{},children:[]};return n.patch(e,t),[n.applyData(e,t),{type:"text",value:`
|
|
9
|
-
`}]}function oo(n,e){const t=e.value?e.value+`
|
|
10
|
-
`:"",r=e.lang?e.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:t}]};return e.meta&&(l.data={meta:e.meta}),n.patch(e,l),l=n.applyData(e,l),l={type:"element",tagName:"pre",properties:{},children:[l]},n.patch(e,l),l}function uo(n,e){const t={type:"element",tagName:"del",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function ao(n,e){const t={type:"element",tagName:"em",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function vn(n){const e=[];let t=-1,r=0,i=0;for(;++t<n.length;){const l=n.charCodeAt(t);let o="";if(l===37&&en(n.charCodeAt(t+1))&&en(n.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const u=n.charCodeAt(t+1);l<56320&&u>56319&&u<57344?(o=String.fromCharCode(l,u),i=1):o="�"}else o=String.fromCharCode(l);o&&(e.push(n.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return e.join("")+n.slice(r)}function Kt(n,e){const t=String(e.identifier).toUpperCase(),r=vn(t.toLowerCase()),i=n.footnoteOrder.indexOf(t);let l;i===-1?(n.footnoteOrder.push(t),n.footnoteCounts[t]=1,l=n.footnoteOrder.length):(n.footnoteCounts[t]++,l=i+1);const o=n.footnoteCounts[t],u={type:"element",tagName:"a",properties:{href:"#"+n.clobberPrefix+"fn-"+r,id:n.clobberPrefix+"fnref-"+r+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};n.patch(e,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return n.patch(e,s),n.applyData(e,s)}function so(n,e){const t=n.footnoteById;let r=1;for(;r in t;)r++;const i=String(r);return t[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:e.children}],position:e.position},Kt(n,{type:"footnoteReference",identifier:i,position:e.position})}function co(n,e){const t={type:"element",tagName:"h"+e.depth,properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function po(n,e){if(n.dangerous){const t={type:"raw",value:e.value};return n.patch(e,t),n.applyData(e,t)}return null}function Gt(n,e){const t=e.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return{type:"text",value:"!["+e.alt+r};const i=n.all(e),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function fo(n,e){const t=n.definition(e.identifier);if(!t)return Gt(n,e);const r={src:vn(t.url||""),alt:e.alt};t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"img",properties:r,children:[]};return n.patch(e,i),n.applyData(e,i)}function ho(n,e){const t={src:vn(e.url)};e.alt!==null&&e.alt!==void 0&&(t.alt=e.alt),e.title!==null&&e.title!==void 0&&(t.title=e.title);const r={type:"element",tagName:"img",properties:t,children:[]};return n.patch(e,r),n.applyData(e,r)}function mo(n,e){const t={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};n.patch(e,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return n.patch(e,r),n.applyData(e,r)}function go(n,e){const t=n.definition(e.identifier);if(!t)return Gt(n,e);const r={href:vn(t.url||"")};t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"a",properties:r,children:n.all(e)};return n.patch(e,i),n.applyData(e,i)}function yo(n,e){const t={href:vn(e.url)};e.title!==null&&e.title!==void 0&&(t.title=e.title);const r={type:"element",tagName:"a",properties:t,children:n.all(e)};return n.patch(e,r),n.applyData(e,r)}function xo(n,e,t){const r=n.all(e),i=t?ko(t):Zt(e),l={},o=[];if(typeof e.checked=="boolean"){const c=r[0];let m;c&&c.type==="element"&&c.tagName==="p"?m=c:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const c=r[u];(i||u!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
11
|
-
`}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&o.push({type:"text",value:`
|
|
12
|
-
`});const a={type:"element",tagName:"li",properties:l,children:o};return n.patch(e,a),n.applyData(e,a)}function ko(n){let e=!1;if(n.type==="list"){e=n.spread||!1;const t=n.children;let r=-1;for(;!e&&++r<t.length;)e=Zt(t[r])}return e}function Zt(n){const e=n.spread;return e??n.children.length>1}function bo(n,e){const t={},r=n.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:e.ordered?"ol":"ul",properties:t,children:n.wrap(r,!0)};return n.patch(e,l),n.applyData(e,l)}function wo(n,e){const t={type:"element",tagName:"p",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function So(n,e){const t={type:"root",children:n.wrap(n.all(e))};return n.patch(e,t),n.applyData(e,t)}function Co(n,e){const t={type:"element",tagName:"strong",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}const Oe=Jt("start"),Le=Jt("end");function Eo(n){return{start:Oe(n),end:Le(n)}}function Jt(n){return e;function e(t){const r=t&&t.position&&t.position[n]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function Ao(n,e){const t=n.all(e),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:n.wrap([r],!0)};n.patch(e.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:n.wrap(t,!0)},u=Oe(e.children[1]),s=Le(e.children[e.children.length-1]);u.line&&s.line&&(o.position={start:u,end:s}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:n.wrap(i,!0)};return n.patch(e,l),n.applyData(e,l)}function Fo(n,e,t){const r=t?t.children:void 0,l=(r?r.indexOf(e):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,u=o?o.length:e.children.length;let s=-1;const a=[];for(;++s<u;){const m=e.children[s],d={},f=o?o[s]:void 0;f&&(d.align=f);let w={type:"element",tagName:l,properties:d,children:[]};m&&(w.children=n.all(m),n.patch(m,w),w=n.applyData(e,w)),a.push(w)}const c={type:"element",tagName:"tr",properties:{},children:n.wrap(a,!0)};return n.patch(e,c),n.applyData(e,c)}function Po(n,e){const t={type:"element",tagName:"td",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}const yt=9,xt=32;function To(n){const e=String(n),t=/\r?\n|\r/g;let r=t.exec(e),i=0;const l=[];for(;r;)l.push(kt(e.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(e);return l.push(kt(e.slice(i),i>0,!1)),l.join("")}function kt(n,e,t){let r=0,i=n.length;if(e){let l=n.codePointAt(r);for(;l===yt||l===xt;)r++,l=n.codePointAt(r)}if(t){let l=n.codePointAt(i-1);for(;l===yt||l===xt;)i--,l=n.codePointAt(i-1)}return i>r?n.slice(r,i):""}function Io(n,e){const t={type:"text",value:To(String(e.value))};return n.patch(e,t),n.applyData(e,t)}function Oo(n,e){const t={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(e,t),n.applyData(e,t)}const Lo={blockquote:io,break:lo,code:oo,delete:uo,emphasis:ao,footnoteReference:Kt,footnote:so,heading:co,html:po,imageReference:fo,image:ho,inlineCode:mo,linkReference:go,link:yo,listItem:xo,list:bo,paragraph:wo,root:So,strong:Co,table:Ao,tableCell:Po,tableRow:Fo,text:Io,thematicBreak:Oo,toml:Un,yaml:Un,definition:Un,footnoteDefinition:Un};function Un(){return null}const nr=function(n){if(n==null)return Ro;if(typeof n=="string")return zo(n);if(typeof n=="object")return Array.isArray(n)?vo(n):Do(n);if(typeof n=="function")return Xn(n);throw new Error("Expected function, string, or object as test")};function vo(n){const e=[];let t=-1;for(;++t<n.length;)e[t]=nr(n[t]);return Xn(r);function r(...i){let l=-1;for(;++l<e.length;)if(e[l].call(this,...i))return!0;return!1}}function Do(n){return Xn(e);function e(t){let r;for(r in n)if(t[r]!==n[r])return!1;return!0}}function zo(n){return Xn(e);function e(t){return t&&t.type===n}}function Xn(n){return e;function e(t,...r){return!!(t&&typeof t=="object"&&"type"in t&&n.call(this,t,...r))}}function Ro(){return!0}const Bo=!0,bt=!1,No="skip",Mo=function(n,e,t,r){typeof e=="function"&&typeof t!="function"&&(r=t,t=e,e=null);const i=nr(e),l=r?-1:1;o(n,void 0,[])();function o(u,s,a){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const d=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(d?"<"+d+">":""))+")"})}return m;function m(){let d=[],f,w,x;if((!e||i(u,s,a[a.length-1]||null))&&(d=_o(t(u,a)),d[0]===bt))return d;if(u.children&&d[0]!==No)for(w=(r?u.children.length:-1)+l,x=a.concat(u);w>-1&&w<u.children.length;){if(f=o(u.children[w],w,x)(),f[0]===bt)return f;w=typeof f[1]=="number"?f[1]:w+l}return d}}};function _o(n){return Array.isArray(n)?n:typeof n=="number"?[Bo,n]:[n]}const ve=function(n,e,t,r){typeof e=="function"&&typeof t!="function"&&(r=t,t=e,e=null),Mo(n,e,i,r);function i(l,o){const u=o[o.length-1];return t(l,u?u.children.indexOf(l):null,u)}};function jo(n){return!n||!n.position||!n.position.start||!n.position.start.line||!n.position.start.column||!n.position.end||!n.position.end.line||!n.position.end.column}const wt={}.hasOwnProperty;function Ho(n){const e=Object.create(null);if(!n||!n.type)throw new Error("mdast-util-definitions expected node");return ve(n,"definition",r=>{const i=St(r.identifier);i&&!wt.call(e,i)&&(e[i]=r)}),t;function t(r){const i=St(r);return i&&wt.call(e,i)?e[i]:null}}function St(n){return String(n||"").toUpperCase()}const Wn={}.hasOwnProperty;function Uo(n,e){const t=e||{},r=t.allowDangerousHtml||!1,i={};return o.dangerous=r,o.clobberPrefix=t.clobberPrefix===void 0||t.clobberPrefix===null?"user-content-":t.clobberPrefix,o.footnoteLabel=t.footnoteLabel||"Footnotes",o.footnoteLabelTagName=t.footnoteLabelTagName||"h2",o.footnoteLabelProperties=t.footnoteLabelProperties||{className:["sr-only"]},o.footnoteBackLabel=t.footnoteBackLabel||"Back to content",o.unknownHandler=t.unknownHandler,o.passThrough=t.passThrough,o.handlers={...Lo,...t.handlers},o.definition=Ho(n),o.footnoteById=i,o.footnoteOrder=[],o.footnoteCounts={},o.patch=Vo,o.applyData=qo,o.one=u,o.all=s,o.wrap=Wo,o.augment=l,ve(n,"footnoteDefinition",a=>{const c=String(a.identifier).toUpperCase();Wn.call(i,c)||(i[c]=a)}),o;function l(a,c){if(a&&"data"in a&&a.data){const m=a.data;m.hName&&(c.type!=="element"&&(c={type:"element",tagName:"",properties:{},children:[]}),c.tagName=m.hName),c.type==="element"&&m.hProperties&&(c.properties={...c.properties,...m.hProperties}),"children"in c&&c.children&&m.hChildren&&(c.children=m.hChildren)}if(a){const m="type"in a?a:{position:a};jo(m)||(c.position={start:Oe(m),end:Le(m)})}return c}function o(a,c,m,d){return Array.isArray(m)&&(d=m,m={}),l(a,{type:"element",tagName:c,properties:m||{},children:d||[]})}function u(a,c){return er(o,a,c)}function s(a){return De(o,a)}}function Vo(n,e){n.position&&(e.position=Eo(n))}function qo(n,e){let t=e;if(n&&n.data){const r=n.data.hName,i=n.data.hChildren,l=n.data.hProperties;typeof r=="string"&&(t.type==="element"?t.tagName=r:t={type:"element",tagName:r,properties:{},children:[]}),t.type==="element"&&l&&(t.properties={...t.properties,...l}),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function er(n,e,t){const r=e&&e.type;if(!r)throw new Error("Expected node, got `"+e+"`");return Wn.call(n.handlers,r)?n.handlers[r](n,e,t):n.passThrough&&n.passThrough.includes(r)?"children"in e?{...e,children:De(n,e)}:e:n.unknownHandler?n.unknownHandler(n,e,t):$o(n,e)}function De(n,e){const t=[];if("children"in e){const r=e.children;let i=-1;for(;++i<r.length;){const l=er(n,r[i],e);if(l){if(i&&r[i-1].type==="break"&&(!Array.isArray(l)&&l.type==="text"&&(l.value=l.value.replace(/^\s+/,"")),!Array.isArray(l)&&l.type==="element")){const o=l.children[0];o&&o.type==="text"&&(o.value=o.value.replace(/^\s+/,""))}Array.isArray(l)?t.push(...l):t.push(l)}}}return t}function $o(n,e){const t=e.data||{},r="value"in e&&!(Wn.call(t,"hProperties")||Wn.call(t,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:De(n,e)};return n.patch(e,r),n.applyData(e,r)}function Wo(n,e){const t=[];let r=-1;for(e&&t.push({type:"text",value:`
|
|
13
|
-
`});++r<n.length;)r&&t.push({type:"text",value:`
|
|
14
|
-
`}),t.push(n[r]);return e&&n.length>0&&t.push({type:"text",value:`
|
|
15
|
-
`}),t}function Qo(n){const e=[];let t=-1;for(;++t<n.footnoteOrder.length;){const r=n.footnoteById[n.footnoteOrder[t]];if(!r)continue;const i=n.all(r),l=String(r.identifier).toUpperCase(),o=vn(l.toLowerCase());let u=0;const s=[];for(;++u<=n.footnoteCounts[l];){const m={type:"element",tagName:"a",properties:{href:"#"+n.clobberPrefix+"fnref-"+o+(u>1?"-"+u:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:n.footnoteBackLabel},children:[{type:"text",value:"↩"}]};u>1&&m.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(u)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(m)}const a=i[i.length-1];if(a&&a.type==="element"&&a.tagName==="p"){const m=a.children[a.children.length-1];m&&m.type==="text"?m.value+=" ":a.children.push({type:"text",value:" "}),a.children.push(...s)}else i.push(...s);const c={type:"element",tagName:"li",properties:{id:n.clobberPrefix+"fn-"+o},children:n.wrap(i,!0)};n.patch(r,c),e.push(c)}if(e.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:n.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(n.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:n.footnoteLabel}]},{type:"text",value:`
|
|
16
|
-
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(e,!0)},{type:"text",value:`
|
|
17
|
-
`}]}}function tr(n,e){const t=Uo(n,e),r=t.one(n,null),i=Qo(t);return i&&r.children.push({type:"text",value:`
|
|
18
|
-
`},i),Array.isArray(r)?{type:"root",children:r}:r}const Xo=function(n,e){return n&&"run"in n?Yo(n,e):Ko(n||e)};function Yo(n,e){return(t,r,i)=>{n.run(tr(t,e),r,l=>{i(l)})}}function Ko(n){return e=>tr(e,n)}var rr={exports:{}},Go="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Zo=Go,Jo=Zo;function ir(){}function lr(){}lr.resetWarningCache=ir;var nu=function(){function n(r,i,l,o,u,s){if(s!==Jo){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}n.isRequired=n;function e(){return n}var t={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:lr,resetWarningCache:ir};return t.PropTypes=t,t};rr.exports=nu();var eu=rr.exports;const O=_n(eu);class Hn{constructor(e,t,r){this.property=e,this.normal=t,r&&(this.space=r)}}Hn.prototype.property={};Hn.prototype.normal={};Hn.prototype.space=null;function or(n,e){const t={},r={};let i=-1;for(;++i<n.length;)Object.assign(t,n[i].property),Object.assign(r,n[i].normal);return new Hn(t,r,e)}function Ee(n){return n.toLowerCase()}class on{constructor(e,t){this.property=e,this.attribute=t}}on.prototype.space=null;on.prototype.boolean=!1;on.prototype.booleanish=!1;on.prototype.overloadedBoolean=!1;on.prototype.number=!1;on.prototype.commaSeparated=!1;on.prototype.spaceSeparated=!1;on.prototype.commaOrSpaceSeparated=!1;on.prototype.mustUseProperty=!1;on.prototype.defined=!1;let tu=0;const L=En(),Q=En(),ur=En(),b=En(),U=En(),Ln=En(),nn=En();function En(){return 2**++tu}const Ae=Object.freeze(Object.defineProperty({__proto__:null,boolean:L,booleanish:Q,commaOrSpaceSeparated:nn,commaSeparated:Ln,number:b,overloadedBoolean:ur,spaceSeparated:U},Symbol.toStringTag,{value:"Module"})),de=Object.keys(Ae);class ze extends on{constructor(e,t,r,i){let l=-1;if(super(e,t),Ct(this,"space",i),typeof r=="number")for(;++l<de.length;){const o=de[l];Ct(this,de[l],(r&Ae[o])===Ae[o])}}}ze.prototype.defined=!0;function Ct(n,e,t){t&&(n[e]=t)}const ru={}.hasOwnProperty;function Dn(n){const e={},t={};let r;for(r in n.properties)if(ru.call(n.properties,r)){const i=n.properties[r],l=new ze(r,n.transform(n.attributes||{},r),i,n.space);n.mustUseProperty&&n.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),e[r]=l,t[Ee(r)]=r,t[Ee(l.attribute)]=r}return new Hn(e,t,n.space)}const ar=Dn({space:"xlink",transform(n,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),sr=Dn({space:"xml",transform(n,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function cr(n,e){return e in n?n[e]:e}function pr(n,e){return cr(n,e.toLowerCase())}const fr=Dn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:pr,properties:{xmlns:null,xmlnsXLink:null}}),hr=Dn({transform(n,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Q,ariaAutoComplete:null,ariaBusy:Q,ariaChecked:Q,ariaColCount:b,ariaColIndex:b,ariaColSpan:b,ariaControls:U,ariaCurrent:null,ariaDescribedBy:U,ariaDetails:null,ariaDisabled:Q,ariaDropEffect:U,ariaErrorMessage:null,ariaExpanded:Q,ariaFlowTo:U,ariaGrabbed:Q,ariaHasPopup:null,ariaHidden:Q,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:U,ariaLevel:b,ariaLive:null,ariaModal:Q,ariaMultiLine:Q,ariaMultiSelectable:Q,ariaOrientation:null,ariaOwns:U,ariaPlaceholder:null,ariaPosInSet:b,ariaPressed:Q,ariaReadOnly:Q,ariaRelevant:null,ariaRequired:Q,ariaRoleDescription:U,ariaRowCount:b,ariaRowIndex:b,ariaRowSpan:b,ariaSelected:Q,ariaSetSize:b,ariaSort:null,ariaValueMax:b,ariaValueMin:b,ariaValueNow:b,ariaValueText:null,role:null}}),iu=Dn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:pr,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ln,acceptCharset:U,accessKey:U,action:null,allow:null,allowFullScreen:L,allowPaymentRequest:L,allowUserMedia:L,alt:null,as:null,async:L,autoCapitalize:null,autoComplete:U,autoFocus:L,autoPlay:L,blocking:U,capture:null,charSet:null,checked:L,cite:null,className:U,cols:b,colSpan:null,content:null,contentEditable:Q,controls:L,controlsList:U,coords:b|Ln,crossOrigin:null,data:null,dateTime:null,decoding:null,default:L,defer:L,dir:null,dirName:null,disabled:L,download:ur,draggable:Q,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:L,formTarget:null,headers:U,height:b,hidden:L,high:b,href:null,hrefLang:null,htmlFor:U,httpEquiv:U,id:null,imageSizes:null,imageSrcSet:null,inert:L,inputMode:null,integrity:null,is:null,isMap:L,itemId:null,itemProp:U,itemRef:U,itemScope:L,itemType:U,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:L,low:b,manifest:null,max:null,maxLength:b,media:null,method:null,min:null,minLength:b,multiple:L,muted:L,name:null,nonce:null,noModule:L,noValidate:L,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:L,optimum:b,pattern:null,ping:U,placeholder:null,playsInline:L,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:L,referrerPolicy:null,rel:U,required:L,reversed:L,rows:b,rowSpan:b,sandbox:U,scope:null,scoped:L,seamless:L,selected:L,shadowRootClonable:L,shadowRootDelegatesFocus:L,shadowRootMode:null,shape:null,size:b,sizes:null,slot:null,span:b,spellCheck:Q,src:null,srcDoc:null,srcLang:null,srcSet:null,start:b,step:null,style:null,tabIndex:b,target:null,title:null,translate:null,type:null,typeMustMatch:L,useMap:null,value:Q,width:b,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:U,axis:null,background:null,bgColor:null,border:b,borderColor:null,bottomMargin:b,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:L,declare:L,event:null,face:null,frame:null,frameBorder:null,hSpace:b,leftMargin:b,link:null,longDesc:null,lowSrc:null,marginHeight:b,marginWidth:b,noResize:L,noHref:L,noShade:L,noWrap:L,object:null,profile:null,prompt:null,rev:null,rightMargin:b,rules:null,scheme:null,scrolling:Q,standby:null,summary:null,text:null,topMargin:b,valueType:null,version:null,vAlign:null,vLink:null,vSpace:b,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:L,disableRemotePlayback:L,prefix:null,property:null,results:b,security:null,unselectable:null}}),lu=Dn({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:cr,properties:{about:nn,accentHeight:b,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:b,amplitude:b,arabicForm:null,ascent:b,attributeName:null,attributeType:null,azimuth:b,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:b,by:null,calcMode:null,capHeight:b,className:U,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:b,diffuseConstant:b,direction:null,display:null,dur:null,divisor:b,dominantBaseline:null,download:L,dx:null,dy:null,edgeMode:null,editable:null,elevation:b,enableBackground:null,end:null,event:null,exponent:b,externalResourcesRequired:null,fill:null,fillOpacity:b,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ln,g2:Ln,glyphName:Ln,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:b,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:b,horizOriginX:b,horizOriginY:b,id:null,ideographic:b,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:b,k:b,k1:b,k2:b,k3:b,k4:b,kernelMatrix:nn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:b,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:b,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:b,overlineThickness:b,paintOrder:null,panose1:null,path:null,pathLength:b,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:U,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:b,pointsAtY:b,pointsAtZ:b,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nn,rev:nn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nn,requiredFeatures:nn,requiredFonts:nn,requiredFormats:nn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:b,specularExponent:b,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:b,strikethroughThickness:b,string:null,stroke:null,strokeDashArray:nn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:b,strokeOpacity:b,strokeWidth:null,style:null,surfaceScale:b,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nn,tabIndex:b,tableValues:null,target:null,targetX:b,targetY:b,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:b,underlineThickness:b,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:b,values:null,vAlphabetic:b,vMathematical:b,vectorEffect:null,vHanging:b,vIdeographic:b,version:null,vertAdvY:b,vertOriginX:b,vertOriginY:b,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:b,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),ou=/^data[-\w.:]+$/i,Et=/-[a-z]/g,uu=/[A-Z]/g;function au(n,e){const t=Ee(e);let r=e,i=on;if(t in n.normal)return n.property[n.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&ou.test(e)){if(e.charAt(4)==="-"){const l=e.slice(5).replace(Et,cu);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=e.slice(4);if(!Et.test(l)){let o=l.replace(uu,su);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=ze}return new i(r,e)}function su(n){return"-"+n.toLowerCase()}function cu(n){return n.charAt(1).toUpperCase()}const At={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},pu=or([sr,ar,fr,hr,iu],"html"),fu=or([sr,ar,fr,hr,lu],"svg");function hu(n){if(n.allowedElements&&n.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(n.allowedElements||n.disallowedElements||n.allowElement)return e=>{ve(e,"element",(t,r,i)=>{const l=i;let o;if(n.allowedElements?o=!n.allowedElements.includes(t.tagName):n.disallowedElements&&(o=n.disallowedElements.includes(t.tagName)),!o&&n.allowElement&&typeof r=="number"&&(o=!n.allowElement(t,r,l)),o&&typeof r=="number")return n.unwrapDisallowed&&t.children?l.children.splice(r,1,...t.children):l.children.splice(r,1),r})}}var mr={exports:{}},_={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* react-is.production.min.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var Re=Symbol.for("react.element"),Be=Symbol.for("react.portal"),Yn=Symbol.for("react.fragment"),Kn=Symbol.for("react.strict_mode"),Gn=Symbol.for("react.profiler"),Zn=Symbol.for("react.provider"),Jn=Symbol.for("react.context"),mu=Symbol.for("react.server_context"),ne=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),du=Symbol.for("react.offscreen"),dr;dr=Symbol.for("react.module.reference");function un(n){if(typeof n=="object"&&n!==null){var e=n.$$typeof;switch(e){case Re:switch(n=n.type,n){case Yn:case Gn:case Kn:case ee:case te:return n;default:switch(n=n&&n.$$typeof,n){case mu:case Jn:case ne:case ie:case re:case Zn:return n;default:return e}}case Be:return e}}}_.ContextConsumer=Jn;_.ContextProvider=Zn;_.Element=Re;_.ForwardRef=ne;_.Fragment=Yn;_.Lazy=ie;_.Memo=re;_.Portal=Be;_.Profiler=Gn;_.StrictMode=Kn;_.Suspense=ee;_.SuspenseList=te;_.isAsyncMode=function(){return!1};_.isConcurrentMode=function(){return!1};_.isContextConsumer=function(n){return un(n)===Jn};_.isContextProvider=function(n){return un(n)===Zn};_.isElement=function(n){return typeof n=="object"&&n!==null&&n.$$typeof===Re};_.isForwardRef=function(n){return un(n)===ne};_.isFragment=function(n){return un(n)===Yn};_.isLazy=function(n){return un(n)===ie};_.isMemo=function(n){return un(n)===re};_.isPortal=function(n){return un(n)===Be};_.isProfiler=function(n){return un(n)===Gn};_.isStrictMode=function(n){return un(n)===Kn};_.isSuspense=function(n){return un(n)===ee};_.isSuspenseList=function(n){return un(n)===te};_.isValidElementType=function(n){return typeof n=="string"||typeof n=="function"||n===Yn||n===Gn||n===Kn||n===ee||n===te||n===du||typeof n=="object"&&n!==null&&(n.$$typeof===ie||n.$$typeof===re||n.$$typeof===Zn||n.$$typeof===Jn||n.$$typeof===ne||n.$$typeof===dr||n.getModuleId!==void 0)};_.typeOf=un;mr.exports=_;var gu=mr.exports;const yu=_n(gu);function xu(n){const e=n&&typeof n=="object"&&n.type==="text"?n.value||"":n;return typeof e=="string"&&e.replace(/[ \t\n\f\r]/g,"")===""}function ku(n){return n.join(" ").trim()}function bu(n,e){const t={};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var Ne={exports:{}},Ft=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,wu=/\n/g,Su=/^\s*/,Cu=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Eu=/^:\s*/,Au=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Fu=/^[;\s]*/,Pu=/^\s+|\s+$/g,Tu=`
|
|
27
|
-
`,Pt="/",Tt="*",Cn="",Iu="comment",Ou="declaration",Lu=function(n,e){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];e=e||{};var t=1,r=1;function i(w){var x=w.match(wu);x&&(t+=x.length);var C=w.lastIndexOf(Tu);r=~C?w.length-C:r+w.length}function l(){var w={line:t,column:r};return function(x){return x.position=new o(w),a(),x}}function o(w){this.start=w,this.end={line:t,column:r},this.source=e.source}o.prototype.content=n;function u(w){var x=new Error(e.source+":"+t+":"+r+": "+w);if(x.reason=w,x.filename=e.source,x.line=t,x.column=r,x.source=n,!e.silent)throw x}function s(w){var x=w.exec(n);if(x){var C=x[0];return i(C),n=n.slice(C.length),x}}function a(){s(Su)}function c(w){var x;for(w=w||[];x=m();)x!==!1&&w.push(x);return w}function m(){var w=l();if(!(Pt!=n.charAt(0)||Tt!=n.charAt(1))){for(var x=2;Cn!=n.charAt(x)&&(Tt!=n.charAt(x)||Pt!=n.charAt(x+1));)++x;if(x+=2,Cn===n.charAt(x-1))return u("End of comment missing");var C=n.slice(2,x-2);return r+=2,i(C),n=n.slice(x),r+=2,w({type:Iu,comment:C})}}function d(){var w=l(),x=s(Cu);if(x){if(m(),!s(Eu))return u("property missing ':'");var C=s(Au),k=w({type:Ou,property:It(x[0].replace(Ft,Cn)),value:C?It(C[0].replace(Ft,Cn)):Cn});return s(Fu),k}}function f(){var w=[];c(w);for(var x;x=d();)x!==!1&&(w.push(x),c(w));return w}return a(),f()};function It(n){return n?n.replace(Pu,Cn):Cn}var vu=Lu;function gr(n,e){var t=null;if(!n||typeof n!="string")return t;for(var r,i=vu(n),l=typeof e=="function",o,u,s=0,a=i.length;s<a;s++)r=i[s],o=r.property,u=r.value,l?e(o,u,r):u&&(t||(t={}),t[o]=u);return t}Ne.exports=gr;Ne.exports.default=gr;var Du=Ne.exports;const zu=_n(Du),Fe={}.hasOwnProperty,Ru=new Set(["table","thead","tbody","tfoot","tr"]);function yr(n,e){const t=[];let r=-1,i;for(;++r<e.children.length;)i=e.children[r],i.type==="element"?t.push(Bu(n,i,r,e)):i.type==="text"?(e.type!=="element"||!Ru.has(e.tagName)||!xu(i))&&t.push(i.value):i.type==="raw"&&!n.options.skipHtml&&t.push(i.value);return t}function Bu(n,e,t,r){const i=n.options,l=i.transformLinkUri===void 0?vr:i.transformLinkUri,o=n.schema,u=e.tagName,s={};let a=o,c;if(o.space==="html"&&u==="svg"&&(a=fu,n.schema=a),e.properties)for(c in e.properties)Fe.call(e.properties,c)&&Mu(s,c,e.properties[c],n);(u==="ol"||u==="ul")&&n.listDepth++;const m=yr(n,e);(u==="ol"||u==="ul")&&n.listDepth--,n.schema=o;const d=e.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},f=i.components&&Fe.call(i.components,u)?i.components[u]:u,w=typeof f=="string"||f===In.Fragment;if(!yu.isValidElementType(f))throw new TypeError(`Component for name \`${u}\` not defined or is not renderable`);if(s.key=t,u==="a"&&i.linkTarget&&(s.target=typeof i.linkTarget=="function"?i.linkTarget(String(s.href||""),e.children,typeof s.title=="string"?s.title:null):i.linkTarget),u==="a"&&l&&(s.href=l(String(s.href||""),e.children,typeof s.title=="string"?s.title:null)),!w&&u==="code"&&r.type==="element"&&r.tagName!=="pre"&&(s.inline=!0),!w&&(u==="h1"||u==="h2"||u==="h3"||u==="h4"||u==="h5"||u==="h6")&&(s.level=Number.parseInt(u.charAt(1),10)),u==="img"&&i.transformImageUri&&(s.src=i.transformImageUri(String(s.src||""),String(s.alt||""),typeof s.title=="string"?s.title:null)),!w&&u==="li"&&r.type==="element"){const x=Nu(e);s.checked=x&&x.properties?!!x.properties.checked:null,s.index=ge(r,e),s.ordered=r.tagName==="ol"}return!w&&(u==="ol"||u==="ul")&&(s.ordered=u==="ol",s.depth=n.listDepth),(u==="td"||u==="th")&&(s.align&&(s.style||(s.style={}),s.style.textAlign=s.align,delete s.align),w||(s.isHeader=u==="th")),!w&&u==="tr"&&r.type==="element"&&(s.isHeader=r.tagName==="thead"),i.sourcePos&&(s["data-sourcepos"]=Hu(d)),!w&&i.rawSourcePos&&(s.sourcePosition=e.position),!w&&i.includeElementIndex&&(s.index=ge(r,e),s.siblingCount=ge(r)),w||(s.node=e),m.length>0?In.createElement(f,s,m):In.createElement(f,s)}function Nu(n){let e=-1;for(;++e<n.children.length;){const t=n.children[e];if(t.type==="element"&&t.tagName==="input")return t}return null}function ge(n,e){let t=-1,r=0;for(;++t<n.children.length&&n.children[t]!==e;)n.children[t].type==="element"&&r++;return r}function Mu(n,e,t,r){const i=au(r.schema,e);let l=t;l==null||l!==l||(Array.isArray(l)&&(l=i.commaSeparated?bu(l):ku(l)),i.property==="style"&&typeof l=="string"&&(l=_u(l)),i.space&&i.property?n[Fe.call(At,i.property)?At[i.property]:i.property]=l:i.attribute&&(n[i.attribute]=l))}function _u(n){const e={};try{zu(n,t)}catch{}return e;function t(r,i){const l=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;e[l.replace(/-([a-z])/g,ju)]=i}}function ju(n,e){return e.toUpperCase()}function Hu(n){return[n.start.line,":",n.start.column,"-",n.end.line,":",n.end.column].map(String).join("")}const Ot={}.hasOwnProperty,Uu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Vn={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function xr(n){for(const l in Vn)if(Ot.call(Vn,l)&&Ot.call(n,l)){const o=Vn[l];console.warn(`[react-markdown] Warning: please ${o.to?`use \`${o.to}\` instead of`:"remove"} \`${l}\` (see <${Uu}#${o.id}> for more info)`),delete Vn[l]}const e=Xr().use(ro).use(n.remarkPlugins||[]).use(Xo,{...n.remarkRehypeOptions,allowDangerousHtml:!0}).use(n.rehypePlugins||[]).use(hu,n),t=new Dt;typeof n.children=="string"?t.value=n.children:n.children!==void 0&&n.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${n.children}\`)`);const r=e.runSync(e.parse(t),t);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=In.createElement(In.Fragment,{},yr({options:n,schema:pu,listDepth:0},r));return n.className&&(i=In.createElement("div",{className:n.className},i)),i}xr.propTypes={children:O.string,className:O.string,allowElement:O.func,allowedElements:O.arrayOf(O.string),disallowedElements:O.arrayOf(O.string),unwrapDisallowed:O.bool,remarkPlugins:O.arrayOf(O.oneOfType([O.object,O.func,O.arrayOf(O.oneOfType([O.bool,O.string,O.object,O.func,O.arrayOf(O.any)]))])),rehypePlugins:O.arrayOf(O.oneOfType([O.object,O.func,O.arrayOf(O.oneOfType([O.bool,O.string,O.object,O.func,O.arrayOf(O.any)]))])),sourcePos:O.bool,rawSourcePos:O.bool,skipHtml:O.bool,includeElementIndex:O.bool,transformLinkUri:O.oneOfType([O.func,O.bool]),linkTarget:O.oneOfType([O.func,O.string]),transformImageUri:O.func,components:O.object};const ye={hub_restart:{title:"Hub Restart",markdown:`# Hub Restart
|
|
28
|
-
|
|
29
|
-
A session was terminated because the Xenon hub restarted while the test was
|
|
30
|
-
mid-flight. The agent's connection was lost and the session was reaped by the
|
|
31
|
-
heartbeat watchdog.
|
|
32
|
-
|
|
33
|
-
## Likely causes
|
|
34
|
-
|
|
35
|
-
- Operator triggered a manual restart from the dashboard.
|
|
36
|
-
- Process supervisor restarted the hub after a crash or a deploy.
|
|
37
|
-
- The host running the hub was rebooted or hibernated.
|
|
38
|
-
|
|
39
|
-
## Remediation
|
|
40
|
-
|
|
41
|
-
> TODO: document remediation steps for hub restart failures.
|
|
42
|
-
|
|
43
|
-
In the meantime: re-trigger the affected sessions from your test runner. If
|
|
44
|
-
restarts repeat, check \`/var/log/xenon-hub.log\` and the supervisor's
|
|
45
|
-
restart history for a root cause before redeploying.
|
|
46
|
-
|
|
47
|
-
## Related
|
|
48
|
-
|
|
49
|
-
- Session lifecycle: see \`SessionLifecycleService.ts\`
|
|
50
|
-
- Heartbeat watchdog: see \`SessionManager.checkHeartbeat\`
|
|
51
|
-
`},timeout:{title:"Timeout",markdown:`# Timeout
|
|
52
|
-
|
|
53
|
-
The session hit a wall-clock timeout — either the per-command \`newCommandTimeout\`
|
|
54
|
-
or the session-level deadline. Xenon force-killed the session so its device
|
|
55
|
-
could be released back into the pool.
|
|
56
|
-
|
|
57
|
-
## Likely causes
|
|
58
|
-
|
|
59
|
-
- Test step waited indefinitely on a missing element.
|
|
60
|
-
- Slow device or flaky network.
|
|
61
|
-
- A driver bug caused the WebDriver call to never return.
|
|
62
|
-
|
|
63
|
-
## Remediation
|
|
64
|
-
|
|
65
|
-
> TODO: document remediation steps for timeout failures.
|
|
66
|
-
|
|
67
|
-
Check the last command in **Text Logs** to see what was in flight when the
|
|
68
|
-
timeout fired. If the same command consistently times out across runs, file a
|
|
69
|
-
bug against the test (or against the driver if the call obviously stalled).
|
|
70
|
-
`},infrastructure:{title:"Infrastructure",markdown:`# Infrastructure
|
|
71
|
-
|
|
72
|
-
The session failed because of a problem outside the test code — typically the
|
|
73
|
-
node, the device, or the network underneath them.
|
|
74
|
-
|
|
75
|
-
## Likely causes
|
|
76
|
-
|
|
77
|
-
- Node lost its connection to the hub.
|
|
78
|
-
- ADB / WDA daemon crashed on the node.
|
|
79
|
-
- Device went offline mid-session.
|
|
80
|
-
- Backing storage / Prisma DB hiccup.
|
|
81
|
-
|
|
82
|
-
## Remediation
|
|
83
|
-
|
|
84
|
-
> TODO: document remediation steps for infrastructure failures.
|
|
85
|
-
|
|
86
|
-
Cross-reference the **Device Logs** tab on this session and the node's own
|
|
87
|
-
process metrics around the failure timestamp. Restart the affected node if
|
|
88
|
-
its agent's heartbeat is missing.
|
|
89
|
-
`},unknown:{title:"Unknown",markdown:`# Unknown failure category
|
|
90
|
-
|
|
91
|
-
We weren't able to attribute this failure to a known bucket. The session has
|
|
92
|
-
\`failure_category=null\` (or a category we don't have a runbook for yet).
|
|
93
|
-
|
|
94
|
-
## What to do
|
|
95
|
-
|
|
96
|
-
1. Open the **Failure summary** card for the raw \`failure_reason\` and the
|
|
97
|
-
first error log entry.
|
|
98
|
-
2. If you can identify a clear category (timeout, hub restart, node outage,
|
|
99
|
-
etc.), file a follow-up to add the right \`failure_category\` mapping in
|
|
100
|
-
\`SessionLifecycleService\`.
|
|
101
|
-
3. For one-off oddities, re-run the session and watch for a pattern.
|
|
102
|
-
|
|
103
|
-
> TODO: improve auto-categorization so this runbook is rarely used.
|
|
104
|
-
`}};function Lt(n){if(!n)return ye.unknown;const e=n.toLowerCase().trim().replace(/[\s-]+/g,"_");return ye[e]??ye.unknown}const $u=()=>{const{category:n}=Tr(),e=Lt(n),t=!n||n&&Lt(n).title==="Unknown"&&n.toLowerCase()!=="unknown";return tn.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[tn.jsxs("header",{className:"flex items-center justify-between gap-4 px-4 py-3 border-b border-[var(--border)] bg-[var(--surface)]",children:[tn.jsxs(Ir,{to:"/builds",className:"inline-flex items-center gap-1.5 text-xs text-[var(--text-muted)] hover:text-[var(--text)] transition-colors",children:[tn.jsx(Lr,{className:"h-3.5 w-3.5"}),"Back to builds"]}),tn.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--text-dim)]",children:[tn.jsx(Or,{className:"h-3.5 w-3.5"}),tn.jsx("span",{className:"font-mono uppercase tracking-widest",children:"Runbook"})]})]}),tn.jsx("div",{className:"flex-1 overflow-y-auto",children:tn.jsxs("article",{className:"max-w-3xl mx-auto px-6 py-8 prose prose-invert prose-sm runbook-prose",children:[t&&tn.jsxs("div",{className:"mb-4 rounded-md border border-[var(--amber)]/30 bg-[var(--amber)]/5 px-3 py-2 text-xs text-[var(--amber)]",children:["No runbook for category ",tn.jsx("code",{className:"font-mono",children:n})," — showing the fallback."]}),tn.jsx(xr,{children:e.markdown})]})})]})};export{$u as RunbookPage,$u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as I,m as T,A as D,r,X as v,j as e,H as f,v as C,C as F,p as A}from"./index-BrVV0Kla.js";import{P as k}from"./page-header-C0pnt4xz.js";import{f as L,H as R,V as H,E as P}from"./selector-health-DraY2a4b.js";import{C as S,L as B}from"./layers-DZwF8z_0.js";import{C as E}from"./circle-check--2DSsfaI.js";import{Z as U}from"./zap-BzdRuL9F.js";import{C as O}from"./check-BkT38An9.js";import{C as K}from"./copy-CEcFYYHm.js";function V(d){const h=Date.parse(d);if(!Number.isFinite(h))return"";const x=Math.max(0,Date.now()-h),l=Math.floor(x/1e3);if(l<60)return`${l}s ago`;const i=Math.floor(l/60);if(i<60)return`${i}m ago`;const o=Math.floor(i/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function X(d){return d===0?"$0":d<.01?"<$0.01":`$${d.toFixed(2)}`}const se=()=>{const d=I(),{toast:h}=T(),[x]=D(),l=x.get("value")??"",i=x.get("strategy")??"",o=parseInt(x.get("windowDays")??"30",10)||30,[t,g]=r.useState(null),[a,p]=r.useState(null),[_,y]=r.useState(!1),[M,$]=r.useState(!1),[N,w]=r.useState(null),b=r.useCallback(async()=>{if(l){y(!0);try{const s=await v.getHealingSelectorDetail(l,o);g(s??null)}catch{g(null)}finally{y(!1),$(!0)}}},[l,o]),j=r.useCallback(async()=>{if(!i||!l){p(null);return}try{const s=await v.getSelectorState(i,l);p((s==null?void 0:s.state)??null)}catch{p(null)}},[i,l]);r.useEffect(()=>{b()},[b]),r.useEffect(()=>{j()},[j]);const m=r.useCallback(async s=>{if(!i||!l)return;const n=(()=>{switch(s){case"mark_fixed":return"Mark this selector as fixed? Move to Pending Verification.";case"mute":return"Mute this selector? It will be hidden from Hotspots, the CI gate, and digests.";case"unmute":return"Unmute this selector?";case"cancel_verification":return"Cancel verification? The selector returns to Active and the clean-build counter resets."}})();if(window.confirm(n))try{await v.postSelectorStateAction({original_strategy:i,original_selector:l,action:s}),h("Done.","success"),j()}catch(c){const u=c!=null&&c.currentStatus?` (currently ${c.currentStatus})`:"";h(`${(c==null?void 0:c.message)??"Action failed"}${u}`,"error")}},[i,l,h,j]),z=(s,n)=>{navigator.clipboard.writeText(s).catch(()=>{}),w(n),setTimeout(()=>w(c=>c===n?null:c),1500)};return l?e.jsxs("div",{className:"selector-health-page",children:[e.jsx(k,{icon:f,eyebrow:"Test Quality / Selector",title:e.jsx("span",{className:"sh-detail-title",children:e.jsx("code",{title:l,children:l})}),subtitle:`All heals for this selector over the last ${o} days.`,action:e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"sh-back-btn",onClick:()=>d("/selector-health"),children:[e.jsx(S,{size:12})," Back"]}),e.jsxs("button",{className:"sh-refresh-btn",onClick:b,disabled:_,title:"Refresh",children:[e.jsx(C,{size:12,className:_?"animate-spin":""}),"Refresh"]})]})}),e.jsxs("div",{className:"sh-content",children:[i&&e.jsxs("div",{className:"sh-detail-strategy-line",title:"Tuple identity for this drill-down",children:[e.jsx("span",{className:"sh-strategy-badge",children:L(i)}),e.jsx("code",{children:l})]}),!i&&e.jsxs("div",{className:"sh-detail-banner",children:["Showing every strategy that ever healed this selector value. To scope to a single tuple, append ",e.jsx("code",{children:"?strategy=<name>"})," ","to the URL or open this row from the Hotspots list."]}),a&&e.jsxs("div",{className:`sh-detail-state sh-detail-state--${a.status}`,children:[e.jsxs("div",{className:"sh-detail-state__head",children:[e.jsxs("span",{className:"sh-detail-state__badge",children:[a.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx(R,{size:16,style:{color:"var(--accent, #60a5fa)"}}),e.jsx("span",{children:"Pending verification"})]}),a.status==="resolved"&&e.jsxs(e.Fragment,{children:[e.jsx(E,{size:16,style:{color:"var(--green, #4ade80)"}}),e.jsx("span",{children:"Resolved"})]}),a.status==="muted"&&e.jsxs(e.Fragment,{children:[e.jsx(H,{size:16,style:{color:"var(--text-muted)"}}),e.jsx("span",{children:"Muted"})]}),a.status==="active"&&(a.regression_count>0?e.jsxs(e.Fragment,{children:[e.jsx(F,{size:16,style:{color:"var(--amber, #f59e0b)"}}),e.jsxs("span",{children:["Active — regressed ",a.regression_count,"×"]})]}):e.jsxs(e.Fragment,{children:[e.jsx(U,{size:16}),e.jsx("span",{children:"Active"})]}))]}),e.jsxs("div",{className:"sh-detail-state__actions",children:[a.status==="active"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn sh-action-btn--primary",onClick:()=>m("mark_fixed"),children:"Mark Fixed"}),e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"})]}),a.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("cancel_verification"),children:"Cancel verification"}),e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"})]}),a.status==="resolved"&&e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"}),a.status==="muted"&&e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("unmute"),children:"Unmute"})]})]}),e.jsxs("div",{className:"sh-detail-state__meta",children:[a.fixed_at&&e.jsxs("span",{children:["Marked fixed: ",new Date(a.fixed_at).toLocaleString()]}),a.resolved_at&&e.jsxs("span",{children:["Resolved: ",new Date(a.resolved_at).toLocaleString()]}),a.muted_at&&e.jsxs("span",{children:["Muted: ",new Date(a.muted_at).toLocaleString()]}),a.status==="pending"&&e.jsxs("span",{children:["Clean builds: ",a.clean_builds_count,"/3"]}),a.regression_count>0&&e.jsxs("span",{children:["Regressions on record: ",a.regression_count]})]})]}),_&&!M?e.jsxs("div",{className:"sh-empty",children:[e.jsx(C,{size:18,className:"animate-spin"}),e.jsx("span",{children:"Loading detail…"})]}):!t||t.healCount===0?e.jsxs("div",{className:"sh-empty sh-empty--clean",children:[e.jsx(f,{size:28}),e.jsxs("div",{children:[e.jsx("div",{className:"sh-empty__title",children:"No heals recorded"}),e.jsxs("div",{className:"sh-empty__subtitle",children:["This selector has no healing events in the last ",o," days."]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sh-detail-stats",children:[e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Heals"}),e.jsx("span",{className:"sh-detail-stat__value",children:t.healCount})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Sessions"}),e.jsx("span",{className:"sh-detail-stat__value",children:t.sessionCount})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Est. cost"}),e.jsx("span",{className:"sh-detail-stat__value",children:X(t.estCostUsd)})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Tiers used"}),e.jsx("span",{className:"sh-detail-stat__value",children:Object.keys(t.byTier).length||"—"})]})]}),e.jsxs("div",{className:"sh-detail-grid",children:[e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx(B,{size:12}),e.jsx("span",{children:"Suggested rewrites"}),e.jsx("span",{className:"sh-card__hint",children:"every alternate the healer landed on, ranked by frequency"})]}),e.jsxs("ul",{className:"sh-alternates",children:[t.alternates.length===0&&e.jsx("li",{className:"sh-alternates__empty",children:"No healed selectors recorded — only the failure was captured."}),t.alternates.map((s,n)=>{const c=Math.round(s.share*100),u=`alt-${n}`;return e.jsxs("li",{className:"sh-alternate",children:[e.jsxs("div",{className:"sh-alternate__top",children:[e.jsxs("span",{className:"sh-alternate__share",children:[c,"%"]}),e.jsx("code",{className:"sh-alternate__value",title:s.healedSelector,children:s.healedSelector}),e.jsx("button",{type:"button",className:`sh-icon-btn ${N===u?"copied":""}`,onClick:()=>z(s.healedSelector,u),"aria-label":"Copy alternate",title:N===u?"Copied":"Copy",children:N===u?e.jsx(O,{size:11}):e.jsx(K,{size:11})})]}),e.jsxs("div",{className:"sh-alternate__meta",children:[e.jsxs("span",{children:[s.count," heal",s.count===1?"":"s"]}),s.averageConfidence!==null&&e.jsxs("span",{children:["· avg ",Math.round(s.averageConfidence*100),"% confidence"]}),s.tiers.length>0&&e.jsxs("span",{children:["· via ",s.tiers.join(", ")]})]})]},s.healedSelector)})]})]}),e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx(A,{size:12}),e.jsx("span",{children:"Breakdown"})]}),e.jsxs("div",{className:"sh-breakdown",children:[e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By tier"}),Object.entries(t.byTier).sort((s,n)=>n[1]-s[1]).map(([s,n])=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-tier-pill",children:s}),e.jsx("span",{className:"sh-breakdown__count",children:n})]},s)),Object.keys(t.byTier).length===0&&e.jsx("div",{className:"sh-breakdown__empty",children:"none recorded"})]}),e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By platform"}),Object.entries(t.byPlatform).sort((s,n)=>n[1]-s[1]).map(([s,n])=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-platform-pill",children:s}),e.jsx("span",{className:"sh-breakdown__count",children:n})]},s))]}),e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By build"}),t.byBuild.slice(0,8).map(s=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-build-pill",title:s.buildId,children:s.buildId==="unattached"?"unattached":s.buildId.length>12?s.buildId.slice(0,8)+"…":s.buildId}),e.jsx("span",{className:"sh-breakdown__count",children:s.count})]},s.buildId)),t.byBuild.length===0&&e.jsx("div",{className:"sh-breakdown__empty",children:"none recorded"})]})]})]})]}),e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx("span",{children:"Timeline"}),e.jsxs("span",{className:"sh-card__hint",children:["most recent ",t.timeline.length," of ",t.healCount," heal",t.healCount===1?"":"s"]})]}),e.jsx("div",{className:"sh-timeline",children:t.timeline.map(s=>e.jsxs("div",{className:"sh-timeline__row",children:[e.jsx("span",{className:"sh-timeline__when",children:V(s.createdAt)}),s.tier&&e.jsx("span",{className:"sh-tier-pill",children:s.tier}),e.jsx("span",{className:"sh-timeline__cmd",children:s.commandName??"—"}),e.jsx("span",{className:"sh-timeline__device",children:s.deviceName??s.deviceUdid??"—"}),e.jsx("code",{className:"sh-timeline__healed",title:s.healedSelector??"",children:s.healedSelector??"—"}),s.confidence!==null&&e.jsxs("span",{className:"sh-timeline__conf",children:[Math.round(s.confidence*100),"%"]}),s.buildId&&s.sessionId&&e.jsx("a",{className:"sh-timeline__link",href:`/xenon/builds/${encodeURIComponent(s.buildId)}/sessions/${encodeURIComponent(s.sessionId)}`,title:"Open session detail",children:e.jsx(P,{size:11})})]},s.id))})]})]})]})]}):e.jsxs("div",{className:"selector-health-page",children:[e.jsx(k,{icon:f,eyebrow:"Test Quality",title:"Selector Detail",subtitle:"No selector specified."}),e.jsx("div",{className:"sh-content",children:e.jsxs("button",{className:"sh-back-btn",onClick:()=>d("/selector-health"),children:[e.jsx(S,{size:12})," Back to Selector Health"]})})]})};export{se as default};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{g as H,u as z,A as Q,j as e,r as h,q as le,n as P,C as re,X as k,v as A,m as oe,H as W,p as ce,I as de}from"./index-BrVV0Kla.js";import{Z as he}from"./zap-BzdRuL9F.js";import{H as B,V as R,f as w,E as ue}from"./selector-health-DraY2a4b.js";import{C as Y}from"./circle-check--2DSsfaI.js";import{M as me}from"./Modal-BJcFdiBP.js";import{C as pe}from"./check-BkT38An9.js";import{C as ge}from"./copy-CEcFYYHm.js";import{u as Z}from"./useSocket-Bkt5i-U6.js";import{E as fe}from"./EmptyState-CqQ21n-H.js";import{P as ve}from"./page-header-C0pnt4xz.js";import{S as xe}from"./SegmentedControl-CSHjmrvy.js";import{F as G}from"./funnel-D2rLIKlM.js";import{C as be}from"./chevron-right-WELZ1Z8v.js";import{A as J}from"./arrow-up-right-B7q_1mXs.js";/**
|
|
2
|
-
* @license lucide-react v0.555.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const _e=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],je=H("arrow-down-right",_e);/**
|
|
7
|
-
* @license lucide-react v0.555.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const ye=[["path",{d:"M5 12h14",key:"1ays0h"}]],q=H("minus",ye);/**
|
|
12
|
-
* @license lucide-react v0.555.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Ne=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],we=H("send",Ne),Se=[{id:"active",label:"Active",icon:he},{id:"pending",label:"Pending",icon:B,color:"var(--accent, #60a5fa)"},{id:"resolved",label:"Resolved",icon:Y,color:"var(--green, #4ade80)"},{id:"muted",label:"Muted",icon:R,color:"var(--text-muted)"}];function Ce({current:s,counts:r={}}){const i=z(),[a]=Q(),n=l=>{const c=new URLSearchParams(a);c.set("tab",l),i({search:c.toString()})};return e.jsx("nav",{className:"sh-tab-nav",role:"tablist","aria-label":"Selector Health tabs",children:Se.map(l=>{const c=r[l.id],o=l.icon;return e.jsxs("button",{type:"button",role:"tab","aria-selected":s===l.id,onClick:()=>n(l.id),className:`sh-tab ${s===l.id?"sh-tab--active":""}`,children:[e.jsx("span",{className:"sh-tab__icon","aria-hidden":"true",style:l.color?{color:l.color}:void 0,children:e.jsx(o,{size:14})}),e.jsx("span",{className:"sh-tab__label",children:l.label}),typeof c=="number"&&e.jsx("span",{className:"sh-tab__count","aria-label":`${c} ${l.label}`,children:c})]},l.id)})})}const $e={javascript:{"accessibility id":s=>`await driver.findElement('accessibility id', '${s}')`,xpath:s=>`await driver.findElement('xpath', '${s}')`,id:s=>`await driver.findElement('id', '${s}')`,name:s=>`await driver.findElement('name', '${s}')`,"class name":s=>`await driver.findElement('class name', '${s}')`,"-android uiautomator":s=>`await driver.findElement('-android uiautomator', '${s}')`,"-ios predicate string":s=>`await driver.findElement('-ios predicate string', '${s}')`,"-ios class chain":s=>`await driver.findElement('-ios class chain', '${s}')`},java:{"accessibility id":s=>`driver.findElement(AppiumBy.accessibilityId("${s}"))`,xpath:s=>`driver.findElement(AppiumBy.xpath("${s}"))`,id:s=>`driver.findElement(AppiumBy.id("${s}"))`,name:s=>`driver.findElement(AppiumBy.name("${s}"))`,"class name":s=>`driver.findElement(AppiumBy.className("${s}"))`,"-android uiautomator":s=>`driver.findElement(AppiumBy.androidUIAutomator("${s}"))`,"-ios predicate string":s=>`driver.findElement(AppiumBy.iOSNsPredicateString("${s}"))`,"-ios class chain":s=>`driver.findElement(AppiumBy.iOSClassChain("${s}"))`},python:{"accessibility id":s=>`driver.find_element(AppiumBy.ACCESSIBILITY_ID, '${s}')`,xpath:s=>`driver.find_element(AppiumBy.XPATH, '${s}')`,id:s=>`driver.find_element(AppiumBy.ID, '${s}')`,name:s=>`driver.find_element(AppiumBy.NAME, '${s}')`,"class name":s=>`driver.find_element(AppiumBy.CLASS_NAME, '${s}')`,"-android uiautomator":s=>`driver.find_element(AppiumBy.ANDROID_UIAUTOMATOR, '${s}')`,"-ios predicate string":s=>`driver.find_element(AppiumBy.IOS_PREDICATE, '${s}')`,"-ios class chain":s=>`driver.find_element(AppiumBy.IOS_CLASS_CHAIN, '${s}')`},csharp:{"accessibility id":s=>`driver.FindElement(MobileBy.AccessibilityId("${s}"))`,xpath:s=>`driver.FindElement(By.XPath("${s}"))`,id:s=>`driver.FindElement(By.Id("${s}"))`,name:s=>`driver.FindElement(By.Name("${s}"))`,"class name":s=>`driver.FindElement(By.ClassName("${s}"))`},ruby:{"accessibility id":s=>`driver.find_element(:accessibility_id, '${s}')`,xpath:s=>`driver.find_element(:xpath, '${s}')`,id:s=>`driver.find_element(:id, '${s}')`,name:s=>`driver.find_element(:name, '${s}')`,"class name":s=>`driver.find_element(:class_name, '${s}')`}};function ke(s,r){const i=s==="java"||s==="csharp",a=r.replace(/\\/g,"\\\\");return i?a.replace(/"/g,'\\"'):a.replace(/'/g,"\\'")}function ee(s,r,i){var n;if(r==="xenon:visual")return"/* Visual AI (coordinates) — no portable Appium snippet. Use snapshot view to find a stable native locator. */";const a=(n=$e[s])==null?void 0:n[r];return a?a(ke(s,i)):`${(r??"").toString().toUpperCase()}: ${i}`}const O=[{value:"javascript",short:"JS",label:"JavaScript (WebdriverIO)"},{value:"java",short:"Java",label:"Java (Appium-Java)"},{value:"python",short:"Py",label:"Python (Appium-Python)"},{value:"csharp",short:"C#",label:"C# (.NET)"},{value:"ruby",short:"Rb",label:"Ruby"}],se="xenon.copyLang";function Ae(){try{const s=localStorage.getItem(se);return s&&O.find(r=>r.value===s)?s:null}catch{return null}}function Me(s){try{localStorage.setItem(se,s)}catch{}}function D(s){var r;return((r=O.find(i=>i.value===s))==null?void 0:r.short)??s}function Ee({open:s,initialLang:r,strategy:i,value:a,onCopy:n,onClose:l}){const[c,o]=h.useState(r??"javascript"),[d,g]=h.useState(!0),x=ee(c,i,a),m=async()=>{try{await navigator.clipboard.writeText(x)}catch{}d&&Me(c),n(c,x),l()};return e.jsxs(me,{open:s,onClose:l,title:"Choose your default copy language",width:520,footer:e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn",onClick:l,children:"Cancel"}),e.jsxs("button",{type:"button",className:"sh-action-btn sh-action-btn--primary",onClick:m,children:["Copy as ",D(c)]})]}),children:[e.jsx("p",{className:"sh-copy-modal__hint",children:"Snippets will be copied in this language until you change it."}),e.jsx("ul",{className:"sh-copy-modal__lang-list",children:O.map(b=>e.jsx("li",{children:e.jsxs("label",{className:"sh-copy-modal__lang-row",children:[e.jsx("input",{type:"radio",name:"copy-lang",value:b.value,checked:c===b.value,onChange:()=>o(b.value)}),b.label]})},b.value))}),e.jsx("div",{className:"sh-copy-modal__preview-label",children:"Preview"}),e.jsx("pre",{className:"sh-copy-modal__preview",children:e.jsx("code",{children:x})}),e.jsxs("label",{className:"sh-copy-modal__remember",children:[e.jsx("input",{type:"checkbox",checked:d,onChange:b=>g(b.target.checked)}),"Remember my choice"]})]})}function Ie({hotspot:s,onCopied:r}){const[i,a]=h.useState(!1),[n,l]=h.useState(!1),c=Ae(),o=s.suggestedStrategy??s.originalStrategy??"",d=s.suggestedRewrite??"",g=o==="xenon:visual",x=async()=>{if(!c){a(!0);return}const m=ee(c,o,d);try{await navigator.clipboard.writeText(m)}catch{}l(!0),r(c),setTimeout(()=>l(!1),1500)};return e.jsxs("span",{className:"sh-copy-group",children:[e.jsxs("button",{type:"button",className:`sh-action-btn sh-copy-btn ${n?"sh-copy-btn--copied":""}`,onClick:m=>{m.stopPropagation(),x()},disabled:g&&!d,title:g?"Visual AI heals are coordinate-based — no portable Appium snippet":c?`Copy as ${D(c)}`:"Pick a language and copy",children:[n?e.jsx(pe,{size:11}):e.jsx(ge,{size:11}),c&&!n&&e.jsx("span",{className:"sh-copy-btn__lang",children:D(c)})]}),e.jsx("button",{type:"button",className:"sh-action-btn sh-copy-chevron",onClick:m=>{m.stopPropagation(),a(!0)},title:"Choose copy language","aria-label":"Choose copy language",children:e.jsx(le,{size:11})}),e.jsx(Ee,{open:i,initialLang:c??void 0,strategy:o,value:d,onCopy:m=>{l(!0),r(m),setTimeout(()=>l(!1),1500)},onClose:()=>a(!1)})]})}function N(s){if(!s)return"";const r=Date.parse(s);if(!Number.isFinite(r))return"";const i=Math.max(0,Date.now()-r),a=Math.floor(i/1e3);if(a<60)return`${a}s ago`;const n=Math.floor(a/60);if(n<60)return`${n}m ago`;const l=Math.floor(n/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function Te({hotspot:s,onCancel:r,onMute:i,onOpen:a}){const n=s.state??null,l=(n==null?void 0:n.clean_builds_count)??0,c=(n==null?void 0:n.fixed_at)??null,o=(n==null?void 0:n.fixed_by_api_key)??null;return e.jsx("div",{className:"sh-table__row sh-table__row--pending",role:"button",tabIndex:0,onClick:()=>a(s.originalSelector),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),a(s.originalSelector))},children:e.jsxs("div",{className:"sh-pending-row",children:[e.jsxs("div",{className:"sh-pending-row__head",children:[e.jsx(B,{size:14,className:"sh-pending-row__icon"}),e.jsx("span",{className:"sh-strategy-badge",children:w(s.originalStrategy)}),e.jsx("code",{className:"sh-pending-row__selector",title:s.originalSelector,children:s.originalSelector})]}),e.jsxs("div",{className:"sh-pending-row__meta",children:["Marked fixed ",N(c),o?` by ${o}`:""," • verifying…"]}),e.jsxs("div",{className:"sh-pending-progress",children:[e.jsx("div",{className:"sh-pending-progress__dots","aria-label":`${l} of 3 clean builds`,children:[0,1,2].map(d=>e.jsx("span",{className:`sh-pending-progress__dot ${d<l?"sh-pending-progress__dot--filled":""}`},d))}),e.jsxs("div",{className:"sh-pending-progress__legend",children:[l," of 3 clean CI builds since fix"]}),e.jsx("div",{className:"sh-pending-progress__hint",children:"Only sessions with a build_id count toward verification — local runs do not."})]}),e.jsxs("div",{className:"sh-pending-row__actions",children:[e.jsxs("button",{type:"button",className:"sh-action-btn",onClick:d=>{d.stopPropagation(),r(s)},title:"Revert to Active without waiting for verification",children:[e.jsx(P,{size:11})," Cancel verification"]}),e.jsx("button",{type:"button",className:"sh-action-btn",onClick:d=>{d.stopPropagation(),i(s)},title:"Mute this selector instead of verifying it",children:"Mute"})]})]})})}function Le({hotspot:s,onMute:r,onOpen:i}){const a=s.state??null,n=(a==null?void 0:a.fixed_at)??null,l=(a==null?void 0:a.resolved_at)??null,c=(a==null?void 0:a.clean_builds_count)??0,o=(a==null?void 0:a.regression_count)??0;return e.jsx("div",{className:"sh-table__row sh-table__row--resolved",role:"button",tabIndex:0,onClick:()=>i(s.originalSelector),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i(s.originalSelector))},children:e.jsxs("div",{className:"sh-resolved-row",children:[e.jsxs("div",{className:"sh-resolved-row__head",children:[e.jsx(Y,{size:14,className:"sh-resolved-row__icon"}),e.jsx("span",{className:"sh-strategy-badge",children:w(s.originalStrategy)}),e.jsx("code",{className:"sh-resolved-row__selector",title:s.originalSelector,children:s.originalSelector}),o>0&&e.jsxs("span",{className:"sh-resolved-row__regression",title:"This selector regressed at least once before being resolved again",children:[e.jsx(re,{size:11})," Previously regressed ",o,"×"]})]}),e.jsxs("div",{className:"sh-resolved-row__meta",children:["Resolved ",N(l)," • ",c," clean build",c===1?"":"s"," since fix"]}),e.jsxs("div",{className:"sh-resolved-row__history",children:["Marked fixed ",N(n)," • Verified ",N(l)]}),e.jsx("div",{className:"sh-resolved-row__actions",children:e.jsx("button",{type:"button",className:"sh-action-btn",onClick:d=>{d.stopPropagation(),r(s)},title:"Hide this selector entirely (e.g. if it regresses again later)",children:"Mute"})})]})})}function Pe({onUnmute:s}){const[r,i]=h.useState(null),[a,n]=h.useState(!0),l=h.useCallback(async()=>{n(!0);try{const o=await k.getMutedSelectors({limit:200});i(o??null)}catch{i({muted:[],total:0,limit:200,offset:0})}finally{n(!1)}},[]);h.useEffect(()=>{l()},[l]);const c=async o=>{window.confirm(`Unmute "${o.original_selector}"?`)&&(await s(o.original_strategy,o.original_selector),l())};return a?e.jsxs("div",{className:"sh-empty",children:[e.jsx(A,{size:18,className:"animate-spin"}),e.jsx("span",{children:"Loading muted selectors…"})]}):!r||r.muted.length===0?e.jsxs("div",{className:"sh-empty sh-empty--clean",children:[e.jsx(R,{size:28}),e.jsxs("div",{children:[e.jsx("div",{className:"sh-empty__title",children:"Nothing muted"}),e.jsx("div",{className:"sh-empty__subtitle",children:"Selectors silenced from Hotspots, the CI gate, and digests will appear here."})]})]}):e.jsx("ul",{className:"sh-muted-list",children:r.muted.map(o=>e.jsxs("li",{className:"sh-muted-list__item",children:[e.jsxs("div",{className:"sh-muted-list__head",children:[e.jsx(R,{size:13,className:"sh-muted-list__icon"}),e.jsx("span",{className:"sh-strategy-badge",children:w(o.original_strategy)}),e.jsx("code",{className:"sh-muted-list__selector",title:o.original_selector,children:o.original_selector})]}),e.jsxs("div",{className:"sh-muted-list__meta",children:["Muted ",N(o.muted_at),o.muted_by_api_key?` by ${o.muted_by_api_key}`:"",o.last_healed_at?` • Last healed ${N(o.last_healed_at)}`:" • Never healed (pre-emptively muted)",o.regression_count>0?` • ${o.regression_count} regression${o.regression_count===1?"":"s"} on record`:""]}),e.jsx("div",{className:"sh-muted-list__actions",children:e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>c(o),children:"Unmute"})})]},`${o.original_strategy}:${o.original_selector}`))})}const Re=3e4,De=5*6e4;function He(){const{on:s}=Z(),r=z(),[i,a]=h.useState([]);if(h.useEffect(()=>{const c=s("selector_regressed",o=>{a(d=>{const g=Date.now()-De;return[...d.filter(m=>m.receivedAt>=g),{original_strategy:(o==null?void 0:o.original_strategy)??"",original_selector:(o==null?void 0:o.original_selector)??"",resolved_at:(o==null?void 0:o.resolved_at)??null,regression_count:o==null?void 0:o.regression_count,receivedAt:Date.now()}]})});return()=>{c&&c()}},[s]),h.useEffect(()=>{if(i.length===0)return;const c=setTimeout(()=>a([]),Re);return()=>clearTimeout(c)},[i]),i.length===0)return null;const n=()=>a([]),l=()=>{r("/selector-health?tab=active"),a([])};if(i.length===1){const c=i[0];return e.jsxs("div",{className:"sh-regression-banner",role:"alert",children:[e.jsx(A,{size:14,className:"sh-regression-banner__icon"}),e.jsxs("span",{children:["A previously-fixed selector regressed:"," ",e.jsxs("strong",{children:[w(c.original_strategy),": ",c.original_selector]})," ","healed again."]}),e.jsx("button",{type:"button",className:"sh-regression-banner__action",onClick:l,children:"Show in Active →"}),e.jsx("button",{type:"button",className:"sh-regression-banner__close",onClick:n,"aria-label":"Dismiss",children:e.jsx(P,{size:13})})]})}return e.jsxs("div",{className:"sh-regression-banner",role:"alert",children:[e.jsx(A,{size:14,className:"sh-regression-banner__icon"}),e.jsxs("span",{children:[e.jsxs("strong",{children:[i.length," selectors"]})," have regressed in the last 5 minutes."]}),e.jsx("button",{type:"button",className:"sh-regression-banner__action",onClick:l,children:"Show all →"}),e.jsx("button",{type:"button",className:"sh-regression-banner__close",onClick:n,"aria-label":"Dismiss",children:e.jsx(P,{size:13})})]})}const ze=[{value:7,label:"7d"},{value:30,label:"30d"},{value:90,label:"90d"}],Be=["","LLM","Visual AI","OCR","Fuzzy XML","Resilio","Native"],Oe=["","ios","android","tvos"];function Fe(s){const r=Date.parse(s);if(!Number.isFinite(r))return"";const i=Math.max(0,Date.now()-r),a=Math.floor(i/1e3);if(a<60)return`${a}s ago`;const n=Math.floor(a/60);if(n<60)return`${n}m ago`;const l=Math.floor(n/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function Ue(s){return s===0?"$0":s<.01?"<$0.01":s<1?`$${s.toFixed(2)}`:s<100?`$${s.toFixed(2)}`:`$${Math.round(s)}`}function Ve(s){return s>=10?"severe":s>=5?"warn":"mild"}const E=({current:s,prior:r,invertColor:i=!1})=>{if(r===0&&s===0)return e.jsxs("span",{className:"sh-delta neutral",children:[e.jsx(q,{size:11}),"no change"]});if(r===0)return e.jsxs("span",{className:`sh-delta ${i?"good":"bad"}`,children:[e.jsx(J,{size:11}),"new"]});const a=Math.round((s-r)/r*100);if(a===0)return e.jsxs("span",{className:"sh-delta neutral",children:[e.jsx(q,{size:11}),"flat"]});const n=a>0,l=i?n:!n;return e.jsxs("span",{className:`sh-delta ${l?"good":"bad"}`,children:[n?e.jsx(J,{size:11}):e.jsx(je,{size:11}),Math.abs(a),"%"]})},y=({label:s,value:r,sub:i,delta:a,tone:n="neutral",size:l="md",hint:c})=>e.jsxs("div",{className:`sh-kpi sh-kpi--${n} sh-kpi--${l}`,children:[e.jsxs("div",{className:"sh-kpi__label",children:[s,c&&e.jsx("span",{className:"sh-kpi__info",title:c,"aria-label":c,role:"img",children:e.jsx(de,{size:11})})]}),e.jsx("div",{className:"sh-kpi__value",children:r}),(i||a)&&e.jsxs("div",{className:"sh-kpi__foot",children:[i&&e.jsx("span",{className:"sh-kpi__sub",children:i}),a&&e.jsx("span",{className:"sh-kpi__delta",children:a})]})]}),I={brittle:"Distinct selectors that needed at least one heal in the window. Lower is better.",totalHeals:"Number of times Xenon's self-heal kicked in within the selected window.",llm:"Heals that escalated all the way to an LLM. The most expensive tier — keep this small.",cost:"Estimated dollar spend on LLM heals in the window."},Ke=({summary:s,loading:r})=>{var c;const i=(s==null?void 0:s.current)??{totalHeals:0,distinctSelectors:0,sessionsTouched:0,byTier:{},estCostUsd:0},a=(s==null?void 0:s.prior)??{totalHeals:0,distinctSelectors:0,sessionsTouched:0,estCostUsd:0},n=((c=i.byTier)==null?void 0:c.LLM)??0,l=i.totalHeals>0?Math.round(n/i.totalHeals*100):0;return e.jsxs("div",{className:"sh-kpi-strip",children:[e.jsx(y,{size:"hero",label:"Brittle selectors",hint:I.brittle,value:r?"—":i.distinctSelectors.toLocaleString(),sub:"distinct selectors needing attention",delta:!r&&e.jsx(E,{current:i.distinctSelectors,prior:a.distinctSelectors}),tone:i.distinctSelectors>50?"warn":"neutral"}),e.jsx(y,{label:"Total heals",hint:I.totalHeals,value:r?"—":i.totalHeals.toLocaleString(),sub:`${(s==null?void 0:s.windowDays)??30}d window`,delta:!r&&e.jsx(E,{current:i.totalHeals,prior:a.totalHeals}),tone:i.totalHeals>a.totalHeals&&a.totalHeals>0?"warn":"neutral"}),e.jsx(y,{label:"Sessions touched",value:r?"—":i.sessionsTouched.toLocaleString(),sub:"by self-heal",delta:!r&&e.jsx(E,{current:i.sessionsTouched,prior:a.sessionsTouched})}),e.jsx(y,{label:"LLM heals",hint:I.llm,value:r?"—":n.toLocaleString(),sub:`${l}% of total`,tone:l>30?"critical":l>10?"warn":"neutral"}),e.jsx(y,{label:"Est. cost",hint:I.cost,value:r?"—":Ue(i.estCostUsd),sub:"this window",delta:!r&&e.jsx(E,{current:Math.round(i.estCostUsd*100),prior:Math.round(a.estCostUsd*100)})}),e.jsx(y,{label:"Resolved",value:r?"—":((s==null?void 0:s.resolvedCount)??0).toLocaleString(),sub:`last ${(s==null?void 0:s.windowDays)??30}d`,delta:!r&&typeof(s==null?void 0:s.pendingCount)=="number"?e.jsxs("span",{className:"sh-kpi__delta sh-kpi__delta--with-icon",children:[e.jsx(B,{size:11,style:{color:"var(--accent, #60a5fa)"}}),s.pendingCount," pending"]}):void 0,tone:"neutral"})]})},rs=()=>{const s=z(),{on:r}=Z(),{toast:i}=oe(),[a]=Q(),n=a.get("tab")??"active",[l,c]=h.useState(30),[o,d]=h.useState(""),[g,x]=h.useState(""),[m,b]=h.useState(null),[S,te]=h.useState([]),[M,F]=h.useState(!1),[U,ae]=h.useState(!1),[Xe,V]=h.useState(null),[T,K]=h.useState(!1),_=h.useCallback(async()=>{F(!0);try{const[t,u]=await Promise.all([k.getHealingSummary(l),k.getHealingHotspots({windowDays:l,limit:50,tier:o||void 0,platform:g||void 0,status:n})]);b(t??null),te(Array.isArray(u==null?void 0:u.hotspots)?u.hotspots:[])}catch{}finally{F(!1),ae(!0)}},[l,o,g,n]);h.useEffect(()=>{_()},[_]),h.useEffect(()=>{const u=["healing_event","selector_fixed","selector_resolved","selector_regressed","selector_cancelled","selector_muted","selector_unmuted","selector_progress"].map(f=>r(f,()=>_()));return()=>{u.forEach(f=>f&&f())}},[r,_]);const C=t=>{s(`/selector-health/detail?value=${encodeURIComponent(t)}&windowDays=${l}`)},j=h.useCallback(async(t,u)=>{const f=(()=>{switch(t){case"mark_fixed":return"Mark this selector as fixed? Xenon will move it to Pending Verification and watch for 3 clean CI builds.";case"mute":return"Mute this selector? It will be hidden from Hotspots, the CI gate, and digests until you unmute.";case"unmute":return"Unmute this selector?";case"cancel_verification":return"Cancel verification? The selector returns to Active and the clean-build counter resets."}})();if(window.confirm(f))try{await k.postSelectorStateAction({original_strategy:u.originalStrategy??"",original_selector:u.originalSelector,action:t});const p=(()=>{switch(t){case"mark_fixed":return"Marked fixed. Watching for clean builds.";case"mute":return"Muted.";case"unmute":return"Unmuted.";case"cancel_verification":return"Verification cancelled."}})();i(p,"success"),_()}catch(p){const $=p!=null&&p.currentStatus?` (currently ${p.currentStatus})`:"";i(`${(p==null?void 0:p.message)??"Action failed"}${$}`,"error")}},[_,i]),ie=async()=>{K(!0);try{const t=await k.sendHealingDigest({windowDays:l,limit:5,minHealCount:2}),u=(t==null?void 0:t.sent)??0,f=(t==null?void 0:t.hotspotsIncluded)??0;u===0?i("No webhook is subscribed to selector_health_digest yet. Add one in Notifications.","error"):i(`Digest sent to ${u} webhook${u===1?"":"s"} (${f} hotspot${f===1?"":"s"} included).`,"success")}catch{i("Failed to send digest. Check the server logs.","error")}finally{K(!1)}},L=!!o||!!g,ne=h.useMemo(()=>"Surface the selectors your suite quietly relies on auto-heal for. Rewrite the worst offenders to keep tests fast, cheap, and portable.",[]);return e.jsxs("div",{className:"selector-health-page",children:[e.jsx(ve,{icon:W,eyebrow:"Test Quality",title:"Selector Health",subtitle:ne,action:e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-ghost-btn",onClick:ie,disabled:T,title:T?"Sending digest…":"Send digest to subscribed webhooks","aria-label":"Send digest",children:e.jsx(we,{size:14,className:T?"animate-spin":""})}),e.jsx("button",{type:"button",className:"sh-ghost-btn",onClick:_,disabled:M,title:"Refresh hotspots","aria-label":"Refresh",children:e.jsx(A,{size:14,className:M?"animate-spin":""})})]})}),e.jsxs("div",{className:"sh-content",children:[e.jsx(He,{}),e.jsx(Ke,{summary:m,loading:M&&!U}),e.jsx(Ce,{current:n,counts:{[n]:S.length}}),n==="muted"?e.jsx(Pe,{onUnmute:async(t,u)=>{await j("unmute",{originalStrategy:t,originalSelector:u})}}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sh-filter-bar",children:[e.jsx("span",{className:"sh-filter-bar__lead",children:"Filter results"}),e.jsxs("div",{className:"sh-filter-bar__group",children:[e.jsx("span",{className:"sh-filter-bar__label",children:"Window"}),e.jsx(xe,{size:"sm",value:String(l),onChange:t=>c(parseInt(t,10)),segments:ze.map(t=>({value:String(t.value),label:t.label}))})]}),e.jsxs("div",{className:"sh-filter-bar__group",children:[e.jsx("span",{className:"sh-filter-bar__label",children:"Tier"}),e.jsx("select",{className:"sh-select",value:o,onChange:t=>d(t.target.value),children:Be.map(t=>e.jsx("option",{value:t,children:t||"All tiers"},t||"all"))})]}),e.jsxs("div",{className:"sh-filter-bar__group",children:[e.jsx("span",{className:"sh-filter-bar__label",children:"Platform"}),e.jsx("select",{className:"sh-select",value:g,onChange:t=>x(t.target.value),children:Oe.map(t=>e.jsx("option",{value:t,children:t?t.toUpperCase():"All platforms"},t||"all"))})]}),L&&e.jsxs("button",{type:"button",className:"sh-filter-bar__clear",onClick:()=>{d(""),x("")},children:[e.jsx(G,{size:11})," Clear filters"]})]}),M&&!U?e.jsxs("div",{className:"sh-empty",children:[e.jsx(A,{size:18,className:"animate-spin"}),e.jsx("span",{children:"Loading hotspots…"})]}):S.length===0?e.jsx(fe,{icon:e.jsx(W,{size:32,color:n==="active"?"var(--green)":"var(--text-dim)"}),title:n==="pending"?"Nothing pending":n==="resolved"?"Nothing resolved yet":"Locator hygiene is clean",description:n==="pending"?"When you mark a selector fixed, it shows here while we watch for 3 clean CI builds.":n==="resolved"?"Fix a hot selector and Xenon will track its verification here.":`No selectors required healing in the last ${l} days${L?" for the active filters":""}.`,action:e.jsxs("div",{className:"sh-empty-actions",children:[L&&n==="active"&&e.jsxs("button",{type:"button",className:"sh-ghost-btn sh-ghost-btn--inline",onClick:()=>{d(""),x("")},children:[e.jsx(G,{size:12})," Reset filters"]}),e.jsxs("a",{href:"/xenon/api-docs",target:"_blank",rel:"noreferrer",className:"sh-ghost-btn sh-ghost-btn--inline",children:[e.jsx(ue,{size:12})," View API docs"]})]})}):n==="pending"?e.jsx("div",{className:"sh-pending-list",children:S.map(t=>e.jsx(Te,{hotspot:t,onCancel:u=>j("cancel_verification",u),onMute:u=>j("mute",u),onOpen:C},`${t.originalStrategy??""}\0${t.originalSelector}`))}):n==="resolved"?e.jsx("div",{className:"sh-pending-list",children:S.map(t=>e.jsx(Le,{hotspot:t,onMute:u=>j("mute",u),onOpen:C},`${t.originalStrategy??""} ${t.originalSelector}`))}):e.jsxs("div",{className:"sh-table",children:[e.jsxs("div",{className:"sh-table__head",children:[e.jsx("div",{className:"sh-th sh-th--rank",children:"#"}),e.jsx("div",{className:"sh-th sh-th--selector",children:"Original selector"}),e.jsx("div",{className:"sh-th sh-th--count",children:"Heals"}),e.jsx("div",{className:"sh-th sh-th--meta",children:"Sessions"}),e.jsx("div",{className:"sh-th sh-th--meta",children:"Top tier"}),e.jsx("div",{className:"sh-th sh-th--meta",children:"Avg conf."}),e.jsx("div",{className:"sh-th sh-th--meta",children:"Last seen"}),e.jsx("div",{className:"sh-th sh-th--rewrite",children:"Suggested rewrite"}),e.jsx("div",{className:"sh-th sh-th--actions"})]}),S.map((t,u)=>{const f=Ve(t.healCount),p=t.suggestedRewriteShare!==null?Math.round(t.suggestedRewriteShare*100):null,$=`${u}-${t.originalSelector}`;return e.jsxs("div",{className:"sh-table__row",onClick:()=>C(t.originalSelector),role:"button",tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),C(t.originalSelector))},children:[e.jsx("div",{className:"sh-td sh-td--rank",children:u+1}),e.jsxs("div",{className:"sh-td sh-td--selector",children:[e.jsx("span",{className:"sh-strategy-badge",children:w(t.originalStrategy)}),e.jsx("code",{title:t.originalSelector,children:t.originalSelector})]}),e.jsx("div",{className:"sh-td sh-td--count",children:e.jsxs("span",{className:`sh-count-badge ${f}`,children:[e.jsx(ce,{size:10}),t.healCount]})}),e.jsx("div",{className:"sh-td sh-td--meta",children:t.sessionCount}),e.jsx("div",{className:"sh-td sh-td--meta",children:t.topTier?e.jsx("span",{className:"sh-tier-pill",children:t.topTier}):"—"}),e.jsx("div",{className:"sh-td sh-td--meta",children:t.averageConfidence!==null?`${Math.round(t.averageConfidence*100)}%`:"—"}),e.jsx("div",{className:"sh-td sh-td--meta",children:Fe(t.lastHealedAt)}),e.jsx("div",{className:"sh-td sh-td--rewrite",children:t.suggestedRewrite?e.jsxs(e.Fragment,{children:[p!==null&&e.jsxs("span",{className:"sh-rewrite-share",title:"Share of heals that landed on this selector",children:[p,"%"]}),t.suggestedStrategy&&e.jsx("span",{className:"sh-strategy-badge sh-strategy-badge--rewrite",title:"Strategy of the suggested rewrite",children:w(t.suggestedStrategy)}),e.jsx("code",{className:"sh-rewrite-value",title:t.suggestedRewrite,children:t.suggestedRewrite})]}):e.jsx("span",{className:"sh-rewrite-empty",children:"—"})}),e.jsxs("div",{className:"sh-td sh-td--actions",children:[t.suggestedRewrite&&e.jsx(Ie,{hotspot:t,onCopied:v=>{V($),setTimeout(()=>V(X=>X===$?null:X),1500),i(`Copied as ${v}`,"success")}}),n==="active"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn sh-action-btn--primary",onClick:v=>{v.stopPropagation(),j("mark_fixed",t)},title:"Move to Pending Verification",children:"Mark Fixed"}),e.jsx("button",{type:"button",className:"sh-action-btn sh-action-btn--ghost",onClick:v=>{v.stopPropagation(),j("mute",t)},title:"Hide from Hotspots, CI gate, and digests",children:"Mute"})]}),e.jsx("button",{type:"button",className:"sh-icon-btn",onClick:v=>{v.stopPropagation(),C(t.originalSelector)},"aria-label":"Open selector detail",title:"Drill in",children:e.jsx(be,{size:12})})]})]},$)})]})]})]})]})};export{rs as default};
|