@burdenoff/ui-engine 2026.1204.1 → 2026.1204.3

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.
Files changed (67) hide show
  1. package/README.md +28 -4
  2. package/dist/analyze/analyze.d.ts +25 -3
  3. package/dist/analyze/context.d.ts +25 -9
  4. package/dist/analyze/index.d.ts +6 -4
  5. package/dist/analyze/messages.d.ts +5 -0
  6. package/dist/analyze/rules/ai-step-no-allowlist.d.ts +29 -0
  7. package/dist/analyze/rules/index.d.ts +1 -0
  8. package/dist/analyze/rules/run-command-from-variable.d.ts +2 -0
  9. package/dist/analyze/rules/sequence-too-long.d.ts +4 -0
  10. package/dist/analyze/rules/single-method-image-target.d.ts +7 -0
  11. package/dist/analyze/rules/unnamed-step.d.ts +10 -0
  12. package/dist/analyze/sensitive.d.ts +2 -2
  13. package/dist/analyze/types.d.ts +33 -4
  14. package/dist/analyze.js +8 -2
  15. package/dist/desk.d.ts +13 -0
  16. package/dist/desk.js +29 -0
  17. package/dist/dom-runtime.iife.js +1 -1
  18. package/dist/dom-runtime.js +2 -2
  19. package/dist/drivers/desk-backend.d.ts +40 -0
  20. package/dist/drivers/desk-driver.d.ts +41 -0
  21. package/dist/drivers/desk-errors.d.ts +19 -0
  22. package/dist/drivers/desk-tree.d.ts +28 -0
  23. package/dist/drivers/desk-wire.d.ts +237 -0
  24. package/dist/drivers/index.d.ts +3 -1
  25. package/dist/drivers.js +10 -7
  26. package/dist/heal.js +5 -5
  27. package/dist/index-0ps53dhe.js +85 -0
  28. package/dist/index-552x2bnm.js +56 -0
  29. package/dist/index-6m0chbhq.js +64 -0
  30. package/dist/{index-gvavb597.js → index-93hfbk5c.js} +10 -0
  31. package/dist/index-a8s39bse.js +920 -0
  32. package/dist/index-b5a306v7.js +43 -0
  33. package/dist/index-bx4bsvg0.js +458 -0
  34. package/dist/{index-9xgz8dxt.js → index-e2pk74e6.js} +4 -4
  35. package/dist/{index-vnv9tp11.js → index-e7pgqd60.js} +2 -2
  36. package/dist/index-hdq3y007.js +246 -0
  37. package/dist/{index-vpm1gnmy.js → index-mv0r8wrh.js} +219 -34
  38. package/dist/{index-zagmp5ya.js → index-n3nfhjrj.js} +2 -2
  39. package/dist/{index-wnch00m6.js → index-nmsg2wze.js} +2 -2
  40. package/dist/{index-zhbwhdya.js → index-q2jbva7c.js} +5 -3
  41. package/dist/{index-n7ah1jn7.js → index-rbem2yms.js} +16 -243
  42. package/dist/{index-mhv6a02p.js → index-reef7e8m.js} +1 -1
  43. package/dist/{index-dwp10g62.js → index-v3nw2n2g.js} +182 -54
  44. package/dist/{index-3r2y0mnc.js → index-wdbn4xjc.js} +5 -5
  45. package/dist/{index-ptrmf779.js → index-wk6416m8.js} +3 -3
  46. package/dist/{index-8eb4xd1j.js → index-x8fc4r4h.js} +101 -426
  47. package/dist/{index-0tfzfxx9.js → index-yhzykhdj.js} +1 -43
  48. package/dist/{index-t55wvhvh.js → index-z2v8prer.js} +1 -61
  49. package/dist/{index-5pv673wd.js → index-zj3zhbac.js} +2 -1
  50. package/dist/index.d.ts +1 -0
  51. package/dist/index.js +83 -31
  52. package/dist/interpret/driver.d.ts +109 -18
  53. package/dist/interpret/events.d.ts +5 -2
  54. package/dist/interpret/index.d.ts +4 -3
  55. package/dist/interpret/run.d.ts +28 -1
  56. package/dist/interpret.js +16 -9
  57. package/dist/script/adapters/recording-desktop.d.ts +52 -0
  58. package/dist/script/describe.d.ts +7 -2
  59. package/dist/script/desk-roles.d.ts +33 -0
  60. package/dist/script/desktop-capabilities.d.ts +7 -2
  61. package/dist/script/desktop-schema.d.ts +2 -0
  62. package/dist/script/index.d.ts +3 -1
  63. package/dist/script.js +35 -19
  64. package/dist/target/types.d.ts +10 -4
  65. package/dist/target.js +20 -16
  66. package/dist/testing.js +5 -3
  67. package/package.json +7 -3
@@ -1 +1 @@
1
- (()=>{var H=["data-fg-sensitive","data-sensitive","data-private"];function Q(e){return H.some((t)=>e.hasAttribute(t))}function I(e){let t=e.assignedSlot;if(t!==void 0)return t;let n=e.parentElement?.shadowRoot;if(!n)return null;for(let o of Array.from(n.querySelectorAll("slot")))if((typeof o.assignedNodes==="function"?o.assignedNodes():[]).includes(e))return o;return null}function x(e){let t=I(e);if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();if(n&&"host"in n)return n.host;try{return e.ownerDocument.defaultView?.frameElement??null}catch{return null}}function k(e){for(let t=e;t;t=x(t))if(Q(t))return!0;return!1}var ge={button:"button",submit:"button",reset:"button",image:"button",checkbox:"checkbox",radio:"radio",range:"slider",number:"spinbutton",search:"searchbox",email:"textbox",tel:"textbox",text:"textbox",url:"textbox",password:"textbox",date:"textbox","datetime-local":"textbox",month:"textbox",time:"textbox",week:"textbox",color:"textbox",file:"button"},Te={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",hr:"separator",li:"listitem",main:"main",menu:"list",meter:"meter",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",p:"paragraph",progress:"progressbar",summary:"button",table:"table",tbody:"rowgroup",td:"cell",textarea:"textbox",tfoot:"rowgroup",thead:"rowgroup",tr:"row",ul:"list"},xe=new Set(["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"]);var ee=256;function T(e){return(e??"").normalize("NFKC").replace(/\s+/g," ").trim().toLowerCase()}function V(e,t){return T(e)===T(t)}function Ae(e,t){let n=T(t);return n.length>0&&T(e).includes(n)}function rt(e,t){if(e===t)return 0;if(e.length===0)return t.length;if(t.length===0)return e.length;let n=Array.from({length:t.length+1},(o,r)=>r);for(let o=1;o<=e.length;o+=1){let r=[o];for(let i=1;i<=t.length;i+=1){let s=e[o-1]===t[i-1]?0:1;r[i]=Math.min((n[i]??0)+1,(r[i-1]??0)+1,(n[i-1]??0)+s)}n=r}return n[t.length]??0}function ye(e,t){let n=T(e).slice(0,256),o=T(t).slice(0,256),r=Math.max(n.length,o.length);if(r===0)return 0;return 1-rt(n,o)/r}function v(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}var ne=512,it=65536,st=new Set(["button","input","meter","output","progress","select","textarea"]),at=new Set(["script","style","noscript","template","head","title","meta","link"]);function M(e){return e.localName.toLowerCase()}function Se(e){return e.parentElement?.closest("article, aside, main, nav, section")!=null}function lt(e){let t=M(e);switch(t){case"a":case"area":return e.hasAttribute("href")?"link":"";case"input":{let n=(e.getAttribute("type")??"text").toLowerCase();if(n==="hidden")return"";if(e.hasAttribute("list")&&["text","search","email","tel","url"].includes(n))return"combobox";return ge[n]??"textbox"}case"select":{let n=Number(e.getAttribute("size")??"0");return e.hasAttribute("multiple")||n>1?"listbox":"combobox"}case"img":return e.getAttribute("alt")===""?"presentation":"img";case"th":return e.getAttribute("scope")==="row"?"rowheader":"columnheader";case"header":return Se(e)?"":"banner";case"footer":return Se(e)?"":"contentinfo";case"section":case"form":return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?t==="form"?"form":"region":"";default:return Te[t]??""}}function A(e){let t=e.getAttribute("role")?.trim().split(/\s+/)[0];return t?t.toLowerCase():lt(e)}function ut(e,t){let n=e.getRootNode();return typeof n.getElementById==="function"?n.getElementById(t):null}function ct(e){return e.hasAttribute("hidden")||e.getAttribute("aria-hidden")==="true"}function dt(e){let t=e.ownerDocument.defaultView;if(!t)return"none";let n=t.getComputedStyle(e);if(n.display==="none")return"subtree";return n.visibility==="hidden"||n.visibility==="collapse"?"self":"none"}function W(e){let t=e.getAttribute("contenteditable");if(t===null)return!1;let n=t.trim().toLowerCase();return n===""||n==="true"||n==="plaintext-only"}function ft(e){if(e.shadowRoot)return Array.from(e.shadowRoot.childNodes);if(M(e)==="slot"){let t=e,n=typeof t.assignedNodes==="function"?t.assignedNodes({flatten:!0}):[];if(n.length>0)return n}return Array.from(e.childNodes)}var mt=/^(div|p|li|tr|td|th|br|h[1-6]|section|article|header|footer)$/;function L(e,t){if(e.remaining<=0||t.length===0)return;let n=t.slice(0,e.remaining);e.parts.push(n),e.remaining-=n.length}function Me(e,t,n,o,r,i=!1){if(t>32||n.remaining<=0)return;if(e.nodeType===3){if(!i)L(n,e.textContent??"");return}if(e.nodeType!==1)return;let s=e,a=M(s);if(at.has(a)||Q(s))return;if(!r&&ct(s))return;let l=!1;if(t>0&&!r){let d=o?.isVisible?.(s);if(d===!1)l=!0;else if(d===void 0){let c=dt(s);if(c==="subtree")return;l=c==="self"}}let u=s.getAttribute("aria-label")?.trim();if(u&&t>0&&!l){L(n,` ${u} `);return}if(a==="img"||a==="input"&&s.getAttribute("type")==="image"){if(!l)L(n,` ${s.getAttribute("alt")??""} `);return}if(a==="input"||a==="textarea"||a==="select")return;if(t>0&&W(s))return;let f=t>0&&mt.test(a);if(f)L(n," ");for(let d of ft(s))Me(d,t+1,n,o,r,l);if(f)L(n," ")}function F(e){if(M(e)==="textarea"||W(e))return!0;for(let n=x(e);n;n=x(n))if(M(n)==="textarea"||W(n))return!0;return!1}function Re(e){for(let t=x(e);t;t=x(t)){let n=M(t);if(n==="textarea"||n==="select"||W(t))return!0}return!1}function B(e,t,n=!1){let o=M(e);if(o==="textarea"||o==="select"||W(e)||Re(e)||k(e))return"";return E(e.getAttribute("aria-label")??"")||X(e,t,ne,n)}function X(e,t,n=ne,o=!1){if(e.nodeType===1&&k(e))return"";let r={parts:[],remaining:n*2+64};return Me(e,0,r,t,o),E(r.parts.join(""),n)}function E(e,t=ne){return e.replace(/\s+/g," ").trim().slice(0,t)}function pt(e,t){let n=[],o=e.getAttribute("id");if(o){let i=e.getRootNode();for(let s of Array.from(i.querySelectorAll("label")))if(s.getAttribute("for")===o)n.push(B(s,t,!0))}let r=e.closest("label");if(r&&!r.hasAttribute("for"))n.push(B(r,t,!0));return E(n.join(" "))}function te(e,t,n){let o=Array.from(e.children).find((r)=>M(r)===t);return o?B(o,n):""}function R(e,t){return Ne(e,t,!0)}function ke(e,t){return Ne(e,t,!1)}function ht(e,t){let n=Array.from(e.children).find((o)=>M(o)==="title");if(!n||k(n)||Re(n))return"";return E(Array.from(n.childNodes).map((o)=>X(o,t)).join(" "))}function Ne(e,t,n){let o=e.getAttribute("aria-labelledby");if(o){let l=o.split(/\s+/).filter(Boolean).map((u)=>ut(e,u)).filter((u)=>u!==null).map((u)=>B(u,t,!0)).join(" ");if(E(l))return E(l)}let r=e.getAttribute("aria-label");if(r&&E(r))return E(r);let i=M(e);if(st.has(i)){let l=pt(e,t);if(l)return l}if(i==="input"){let l=(e.getAttribute("type")??"text").toLowerCase();if(l==="button"||l==="submit"||l==="reset"){let u=e.getAttribute("value");if(u!==null)return E(u);return l==="submit"?"Submit":l==="reset"?"Reset":""}if(l==="image")return E(e.getAttribute("alt")??"")}if(i==="img"||i==="area"){let l=e.getAttribute("alt");if(l)return E(l)}if(i==="svg"){let l=ht(e,t);if(l)return l}if(i==="fieldset"){let l=te(e,"legend",t);if(l)return l}if(i==="table"){let l=te(e,"caption",t);if(l)return l}if(i==="option"){let l=E(e.getAttribute("label")??"");if(l)return l}if(i==="figure"){let l=te(e,"figcaption",t);if(l)return l}if(n&&xe.has(A(e))){let l=X(e,t);if(l)return l}let s=e.getAttribute("title");if(s&&E(s))return E(s);let a=e.getAttribute("placeholder");if(a&&E(a))return E(a);return""}function O(e,t){if(M(e)==="input"){let o=(e.getAttribute("type")??"text").toLowerCase();return o==="button"||o==="submit"||o==="reset"?R(e,t):""}return X(e,t,it)}function oe(e,t,n,o){return A(e)===t.trim().toLowerCase()&&T(R(e,o))===T(n)}function bt(e){return e.ownerDocument.defaultView}function z(e){let t=I(e);if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n&&"host"in n?n.host:null}function N(e,t){let n=t?.isVisible?.(e);if(n!==void 0)return n;if(!e.isConnected)return!1;let o=bt(e),r=e;while(r){if(r.hasAttribute("hidden"))return!1;if(r.localName==="input"&&r.getAttribute("type")?.toLowerCase()==="hidden")return!1;if(o&&o.getComputedStyle(r).display==="none")return!1;r=z(r)}if(o){let s=o.getComputedStyle(e);if(s.visibility==="hidden"||s.visibility==="collapse")return!1;if(s.display==="contents")return!0}let i=e.checkVisibility;return typeof i==="function"?i.call(e):!0}function C(e){for(let n=e;n;n=x(n))if(n.getAttribute("aria-disabled")==="true"||n.hasAttribute("inert"))return!1;if(!Et.has(e.localName)){let n=e.parentElement?.closest("button, select, option, optgroup, textarea");return n?C(n):!0}if(e.hasAttribute("disabled"))return!1;let t=e.parentElement?.closest("fieldset[disabled]");if(t){if(!Array.from(t.children).find((o)=>o.localName==="legend")?.contains(e))return!1}try{return!e.matches(":disabled")}catch{return!0}}var Et=new Set(["button","input","select","textarea","optgroup","option","fieldset"]);function D(e,t,n){let r=t?.rectOf?.(e)??e.getBoundingClientRect();return{x:Math.round(r.x+(n?.x??0)),y:Math.round(r.y+(n?.y??0)),width:Math.round(r.width),height:Math.round(r.height)}}function w(e){let t=Array.from(e.querySelectorAll("*"));return e.nodeType===1?[e,...t]:t}var gt=/password|passcode|passwd|\bpin\b|otp|one[\s-]?time|verification|security code|auth(?:entication)? code|\bcvv\b|\bcvc\b|card number|secret|token|recovery/i,Tt=/password|one-time-code|^cc-/i;function xt(e){return gt.test(e)}function y(e){if(k(e))return!0;if(Ce(e))return!0;for(let t=x(e);t;t=x(t))if(Ce(t))return!0;return!1}function Ce(e){let t=e.localName,n=e.getAttribute("contenteditable"),o=n!==null&&n.trim().toLowerCase()!=="false";if(t!=="input"&&t!=="textarea"&&t!=="select"&&!o)return!1;if(e.getAttribute("type")?.toLowerCase()==="password")return!0;if((e.getAttribute("autocomplete")??"").trim().split(/\s+/).filter(Boolean).some((i)=>Tt.test(i)))return!0;return At(e).some((i)=>i.length>0&&xt(i.replace(/[-_]/g," ")))}function At(e){let t=(a)=>(a??"").slice(0,512),n=[R(e),t(e.getAttribute("aria-label")),t(e.getAttribute("placeholder")),t(e.getAttribute("title")),t(e.getAttribute("name")),t(e.getAttribute("id"))],o=e.getRootNode(),r=(a)=>typeof o.getElementById==="function"?o.getElementById(a):null;for(let a of(e.getAttribute("aria-labelledby")??"").split(/\s+/).filter(Boolean)){let l=r(a);if(l)n.push(t(l.getAttribute("aria-label")),t(l.textContent))}let i=e.getAttribute("id"),s=Array.from(o.querySelectorAll("label")).filter((a)=>i!==null&&a.getAttribute("for")===i||!a.hasAttribute("for")&&a.contains(e));for(let a of s)n.push(t(a.getAttribute("aria-label")),t(a.textContent));return n}var yt=0.8,St=0.05,Mt=4,we=1000,K=2,Rt=new Set(["button","checkbox","combobox","link","listbox","menuitem","menuitemcheckbox","menuitemradio","option","radio","searchbox","slider","spinbutton","switch","tab","textbox","treeitem"]),kt=/^[A-Za-z_][\w:.-]{0,127}$/;function Nt(e){return e.nodeType===9?e:e.ownerDocument}function Ct(e,t){return{kind:"list",elements:w(t.root).filter((o)=>oe(o,e.role,e.name,t.probe)),...e.nth!==void 0?{nth:e.nth}:{}}}function wt(e,t){try{return{kind:"list",elements:Array.from(t.root.querySelectorAll(e))}}catch{return{kind:"invalid"}}}function _t(e,t){let n=e.attribute??"data-testid";if(!kt.test(n))return{kind:"invalid"};return{kind:"list",elements:w(t.root).filter((r)=>r.getAttribute(n)===e.value)}}function vt(e,t){if(e.nodeType===9)return t.ownerDocument===e&&t.getRootNode()===e;return e===t||e.contains(t)}function Ot(e,t){let n=Nt(t.root);if(typeof n.evaluate!=="function")return{kind:"unsupported"};let o;try{o=n.evaluate(e.xpath,t.root,null,7,null)}catch{return{kind:"invalid"}}let r=[],i=Math.min(o.snapshotLength,we);for(let s=0;s<i;s+=1){let a=o.snapshotItem(s);if(a&&a.nodeType===1&&vt(t.root,a))r.push(a)}return{kind:"list",elements:r,...o.snapshotLength>we?{overflow:!0}:{}}}function Dt(e,t,n){let o=Math.min(T(e).length,ee),r=Math.max(o,t);return r>0&&Math.abs(o-t)<=(1-n)*r}function It(e,t){let n=Math.min(1,Math.max(0.5,e.threshold??yt)),o=e.role?.trim().toLowerCase(),r=Math.min(T(e.name).length,ee),i=[];for(let s of w(t.root)){let a=A(s);if(o?a!==o:a==="")continue;let l=R(s,t.probe);if(!Dt(l,r,n))continue;let u=ye(l,e.name);if(u>=n)i.push({element:s,score:u})}return{kind:"ranked",scored:i,margin:St}}function Oe(e,t){let n=w(e.root).filter((i)=>t(O(i,e.probe))),o=e.keep??(()=>!0),r=n.filter(o);return n.filter((i)=>!r.some((s)=>s!==i&&i.contains(s)))}function Lt(e,t){let n=e.exact?(o)=>V(o,e.text):(o)=>Ae(o,e.text);if(T(e.text).length===0)return{kind:"list",elements:[]};return{kind:"list",elements:Oe(t,n),...e.nth!==void 0?{nth:e.nth}:{}}}function re(e){return T(e).replace(/[\s:*]+$/u,"")}function Wt(e,t){return(e.kind==="role"?w(t.root).filter((o)=>oe(o,e.role,e.name,t.probe)):Oe(t,(o)=>re(o)===re(e.text)&&re(o)!=="")).filter((o)=>N(o,t.probe))}function De(e,t,n){let o=e.role?.trim().toLowerCase();return w(t.root).filter((r)=>{let i=A(r);if(o?i!==o:!Rt.has(i))return!1;return!n.some((s)=>s===r||r.contains(s))})}var Ut=new Set(["h1","h2","h3","h4","h5","h6","legend","caption","figcaption","summary","dt"]);function ie(e){return Ut.has(e.localName)||A(e)==="heading"}function Pt(e){for(let t=e;t;t=t.parentElement)if(ie(t))return t;return null}function Ht(e,t,n){let o=De(e,t,n),r=new Set;for(let i of n){let a=Pt(i)?.parentElement??i;for(let l of o)if(a.contains(l))r.add(l)}return{kind:"list",elements:o.filter((i)=>r.has(i))}}function _e(e,t,n,o){return e<o&&n<t}function Vt(e,t,n){let o=t.x+t.width,r=t.y+t.height,i=n.x+n.width,s=n.y+n.height,a=_e(t.y,r,n.y,s),l=_e(t.x,o,n.x,i);switch(e){case"rightOf":return a&&n.x>=o-K?Math.max(0,n.x-o):null;case"leftOf":return a&&i<=t.x+K?Math.max(0,t.x-i):null;case"below":return l&&n.y>=r-K?Math.max(0,n.y-r):null;case"above":return l&&s<=t.y+K?Math.max(0,t.y-s):null;case"sameRow":return a?Math.abs(n.x+n.width/2-(t.x+t.width/2)):null;default:return null}}function ve(e){return e.width>0&&e.height>0}function Bt(e,t){let n=Wt(e.anchor,t);if(n.length===0)return{kind:"list",elements:[]};if(e.relation==="inside")return Ht(e,t,n);let o=n.map((i)=>D(i,t.probe)).filter(ve);if(o.length===0)return{kind:"unsupported"};let r=[];for(let i of De(e,t,n)){let s=D(i,t.probe);if(!ve(s))continue;let a=null;for(let l of o){let u=Vt(e.relation,l,s);if(u!==null&&(a===null||u<a))a=u}if(a!==null)r.push({element:i,score:-a})}return{kind:"ranked",scored:r,margin:Mt}}function j(e,t){switch(e.kind){case"role":return Ct(e,t);case"css":return wt(e.selector,t);case"testId":return _t(e,t);case"xpath":return Ot(e,t);case"fuzzy":return It(e,t);case"anchor":return Bt(e,t);case"text":return Lt(e,t);default:return{kind:"unsupported"}}}var Ie=5,G=200;var Ft=12,Xt=3,zt=8,Kt=25,jt=5000,Gt=new Set(["alertdialog","article","banner","complementary","contentinfo","dialog","figure","form","grid","group","list","listitem","main","menu","menubar","navigation","radiogroup","region","row","search","tablist","table","tabpanel","toolbar","tree","treegrid"]);function $t(){return typeof performance>"u"?Date.now():performance.now()}function se(e=$t){return{answers:new Map,checksLeft:zt,now:e,deadline:e()+Kt}}function qt(e){return e.replace(/\s+/g," ").trim()}function Zt(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n<32||n>=127&&n<=159)return!0}return!1}function Le(e){let t=qt(e);return t.length>0&&t.length<=G&&!Zt(t)?t:void 0}function We(e){return y(e)||F(e)}function Yt(e,t){for(let n of Array.from(e.children))if(ie(n)&&!We(n)&&N(n,t))return n;return}function*Jt(e,t){if(We(e))return;let n=A(e),o=Gt.has(n)?Le(R(e,t)):void 0;if(o)yield{anchor:{kind:"role",role:n,name:o},role:n};let r=Yt(e,t);if(!r)return;let i=A(r)==="heading",s=Le(i?R(r,t):O(r,t));if(!s)return;yield{anchor:i?{kind:"role",role:"heading",name:s}:{kind:"text",text:s},role:n}}function Qt(e,t){return JSON.stringify([e,t])}function en(e,t,n,o,r){let s=j({kind:"anchor",anchor:e,relation:"inside",role:t},{root:n,keep:o,...r?{probe:r}:{}});return s.kind==="list"?s.elements.filter(o):[]}function tn(e,t){return e.nodeType!==1||e===t||e.contains(t)}function Ue(e,t,n,o,r=se()){let i=A(e);if(i===""||y(e))return;let s=0,a=0;for(let l=e.parentElement;l&&a<Ft&&tn(t,l);l=l.parentElement){a+=1;for(let u of Jt(l,o)){let f=Qt(u.anchor,i),d=r.answers.get(f);if(!d){if(r.now()>=r.deadline)return;if(s>=Xt||r.checksLeft<=0)continue;s+=1,r.checksLeft-=1,d=en(u.anchor,i,t,n,o),r.answers.set(f,d)}if(d.length===1&&d[0]===e)return u}}return}function Pe(e){return e.querySelectorAll("*").length<=jt}var nn={x:0,y:0,width:0,height:0};function on(e,t,n){let o={root:e,offset:nn,hidden:!1,disabled:!1};for(let[r,i]of(t??[]).entries()){let s;try{s=Array.from(o.root.querySelectorAll(i))}catch{return{index:r,reason:"invalid"}}if(s.length===0)return{index:r,reason:"notFound"};if(s.length>1)return{index:r,reason:"ambiguous"};let a=s[0],l=a.localName;if(l==="iframe"||l==="frame"){let u=a,f=null;try{f=u.contentDocument}catch{f=null}if(!f)return{index:r,reason:"inaccessible"};let d=D(a,n,o.offset);o={root:f,offset:{x:d.x+u.clientLeft,y:d.y+u.clientTop,width:0,height:0},hidden:o.hidden||!N(a,n),disabled:o.disabled||!C(a)}}else if(a.shadowRoot)o={root:a.shadowRoot,offset:o.offset,hidden:o.hidden,disabled:o.disabled};else return{index:r,reason:"notAFrame"}}return o}function He(e,t,n,o){if(t==="attached")return!0;if(n.hidden||!N(e,o))return!1;return t==="visible"||!n.disabled&&C(e)}function Ve(e,t,n,o,r){return{role:A(e),name:y(e)?"":v(F(e)?ke(e,r):R(e,r),G),bounds:D(e,r,o),method:t.kind,methodIndex:n}}function rn(e,t,n,o=!1){if(t.length===0)return e.length>0?{outcome:"notInteractable",elements:e,matches:0}:{outcome:"none",elements:[],matches:0};if(o)return{outcome:"ambiguous",elements:t,matches:t.length};if(n!==void 0){let r=t[n];return r?{outcome:"found",element:r,matches:t.length}:{outcome:"none",elements:[],matches:t.length}}return t.length===1?{outcome:"found",element:t[0],matches:1}:{outcome:"ambiguous",elements:t,matches:t.length}}function sn(e,t,n){if(t.length===0)return e.length>0?{outcome:"notInteractable",elements:e.map((a)=>a.element),matches:0}:{outcome:"none",elements:[],matches:0};let o=[...t].sort((a,l)=>l.score-a.score),r=o[0],i=o[1];if(!i||r.score-i.score>=n)return{outcome:"found",element:r.element,matches:t.length};let s=o.filter((a)=>r.score-a.score<n).map((a)=>a.element);return{outcome:"ambiguous",elements:s,matches:s.length}}function an(e,t){switch(e.kind){case"invalid":case"unsupported":return e.kind;case"list":return rn(e.elements,e.elements.filter(t),e.nth,e.overflow);case"ranked":return sn(e.scored,e.scored.filter((n)=>t(n.element)),e.margin)}}function U(e,t,n=[],o=0,r){return{status:"failed",code:e,candidates:n,candidateCount:o,attempts:t,...r?{frame:r}:{}}}function Be(e,t,n={}){let o=n.state??"interactable",r=on(e,t.frame,n);if(!("root"in r)){let d=t.methods.map((c,p)=>({index:p,method:c.kind,outcome:"notTried",matches:0}));return U("ELEMENT_NOT_FOUND",d,[],0,r)}let i=[],s=t.methods.findIndex((d)=>d.enabled!==!1),a,l,u;for(let[d,c]of t.methods.entries()){if(u){i.push({index:d,method:c.kind,outcome:"notTried",matches:0});continue}if(c.enabled===!1){i.push({index:d,method:c.kind,outcome:"disabled",matches:0});continue}let p=(h)=>He(h,o,r,n),m=an(j(c,{root:r.root,probe:n,keep:p}),p);if(m==="invalid"||m==="unsupported"){i.push({index:d,method:c.kind,outcome:m,matches:0});continue}if(i.push({index:d,method:c.kind,outcome:m.outcome,matches:m.matches}),m.outcome==="found")u={element:m.element,method:c,index:d};else if(m.outcome==="ambiguous"&&!a)a={elements:m.elements,method:c,index:d,count:m.matches};else if(m.outcome==="notInteractable"&&!l)l={elements:m.elements,method:c,index:d}}if(u)return{status:"found",element:u.element,method:u.method.kind,methodIndex:u.index,fallback:u.index!==s,candidate:Ve(u.element,u.method,u.index,r.offset,n),attempts:i};let f=(d)=>d.elements.slice(0,Ie).map((c)=>Ve(c,d.method,d.index,r.offset,n));if(a){let d=(b)=>He(b,o,r,n),c=f(a);if(!Pe(r.root))return U("ELEMENT_AMBIGUOUS",i,c,a.count);let p=se(),{elements:m}=a,h=c.map((b,g)=>{let _=m[g],S=Ue(_,r.root,d,n,p);return S?{...b,container:S}:b});return U("ELEMENT_AMBIGUOUS",i,h,a.count)}if(l)return U("ELEMENT_NOT_INTERACTABLE",i,f(l),l.elements.length);return U("ELEMENT_NOT_FOUND",i)}var ae="[REDACTED]",ln=[/\b(?:Bearer|Basic)\s+[^\s"'`,;)\]}]+/gi,/\b(?:sk|pk|rk|xai)-[^\s"'`,;)\]}]+/gi,/\b(?:gsk|hf|ghp|gho|ghs|ghu|glpat)_[^\s"'`,;)\]}]+/gi,/\bAIza[\w-]{10,}/g,/\b(?:AKIA|ASIA)[0-9A-Z]{12,}/g],un=/([\s"'`,;:=()[\]{}]+)/,cn=/^(?:api[_-]?key|access[_-]?key|secret|secret[_-]?key|client[_-]?secret|token|password)$/i;function dn(e){let t=e.indexOf("…");return e.includes("***")||t!==-1&&t<e.length-1}function fn(e){let t=e.split(un);for(let n=0;n<t.length;n+=2){let o=t[n]??"";if(o&&o!=="[REDACTED]"&&dn(o))t[n]="[REDACTED]";let r=t[n+1]??"";if(t[n+2]&&cn.test(o)&&/[:=]/.test(r))t[n+2]="[REDACTED]"}return t.join("")}function le(e){if(!e)return e;let t=e;for(let n of ln)t=t.replace(n,"[REDACTED]");return t=fn(t),t.replace(/(?:\[REDACTED\]){2,}/g,"[REDACTED]")}var Fe="";function q(e){if(!e)return!1;let t=e.replaceAll("[REDACTED]",Fe);return le(t).replaceAll(Fe,"[REDACTED]")!==e}function ue(e){try{return decodeURIComponent(e.replaceAll("+"," "))}catch{return e}}function Xe(e){return q(ue(e).replace(/[/?&#]/g," "))}var mn=500,ze=/reset|recover|verify|verification|magic|confirm|activate|invite|unsubscribe/i;function pn(e){let t=e;for(let n=0;n<3;n+=1){let o=ue(t);if(o===t)break;t=o}return t}function hn(e){let t=e.split(/[/?#;]/),n=t.findIndex((r)=>ze.test(r));return t.slice(0,n+1).map((r)=>q(r)?ae:r).join("/")}function ce(e){let t=e.trim();if(t==="")return null;let n=/^[a-z][a-z0-9+.-]*:/i.test(t)||t.startsWith("//"),o="",r;if(n){let f;try{f=new URL(t.startsWith("//")?`https:${t}`:t)}catch{return null}if(f.protocol!=="http:"&&f.protocol!=="https:")return null;o=t.startsWith("//")?`//${f.host}`:f.origin,r=f.pathname}else r=t.split(/[?#]/)[0]??"";let i=r.split("/"),s=i.map(pn),a=s.findIndex((f)=>ze.test(f)),u=(a>=0?i.slice(0,a+1):i).map((f,d)=>{let c=s[d]??f;if(d===a)return hn(c);return q(c)||Xe(f)?ae:f}).join("/");return v(`${o}${u}`,mn)}var bn=1,En=5000,gn=64,Tn=500,xn=new Set(["script","style","noscript","template","link","meta","base","head","object","embed"]),An=new Set(["textarea"]),yn=new Set(["id","class","role","name","type","for","title","alt","placeholder","label","autocomplete","tabindex","disabled","readonly","hidden","inert","contenteditable","list","multiple","size","scope","slot","part","lang","dir","data-testid","data-test","data-test-id","data-qa","data-cy","data-automation-id",...H]),Sn=new Set(["aria-valuenow","aria-valuetext","aria-checked","aria-selected","aria-pressed"]),Mn=new Set(["button","submit","reset"]),Rn=/^[a-z][a-z0-9-]{0,63}$/;var kn=/^[a-z][a-z0-9_:.-]{0,127}$/;function je(e){let t=e.getAttribute("contenteditable");return t!==null&&t.trim().toLowerCase()!=="false"}function Ge(e){for(let t=x(e);t;t=x(t))if(t.localName==="textarea"||je(t))return!0;return!1}function Nn(e){if(!e.parentElement?.shadowRoot)return!1;let t=I(e);return t!==null&&(y(t)||Ge(t))}function Z(e){return v(le(e),Tn)}var Cn=new Set(["alt","label","title","placeholder","value","aria-label","aria-description","aria-roledescription","aria-placeholder"]),wn=new Set(["aria-hidden","aria-disabled","aria-expanded","aria-haspopup","aria-controls","aria-owns","aria-labelledby","aria-describedby","aria-level","aria-current","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-readonly","aria-required","aria-invalid","aria-busy","aria-live","aria-atomic","aria-posinset","aria-setsize","aria-colcount","aria-colindex","aria-colspan","aria-rowcount","aria-rowindex","aria-rowspan","aria-sort"]);function _n(e,t){let n={},o=e.localName;for(let r of Array.from(e.attributes)){let i=r.name.toLowerCase();if(i.startsWith("on")||!kn.test(i))continue;if(t&&(Cn.has(i)||i==="href"||i.startsWith("aria-")&&!wn.has(i)))continue;if(yn.has(i)||i.startsWith("aria-")&&!Sn.has(i))n[i]=Z(r.value);else if(i==="href"&&(o==="a"||o==="area")){let s=ce(r.value);if(s!==null)n[i]=s}else if(i==="value"&&o==="input"&&Mn.has((e.getAttribute("type")??"").toLowerCase()))n[i]=Z(r.value)}return Object.keys(n).length>0?n:void 0}function vn(e,t){let n=t?.rectOf?.(e)??e.getBoundingClientRect(),o=[Math.round(n.x),Math.round(n.y),Math.round(n.width),Math.round(n.height)];return o[2]>0||o[3]>0?o:void 0}function Ke(e,t,n,o,r){let i=[];for(let s of Array.from(e.childNodes)){if(t.count>=t.max){t.truncated=!0;break}if(s.nodeType===3){if(!o||Nn(s))continue;let a=s.textContent??"";if(a.length===0)continue;let l=a.trim()===""?" ":Z(a);t.count+=1,i.push(l)}else if(s.nodeType===1){let a=Y(s,t,n+1,o,r);if(a)i.push(a)}}return i}function Y(e,t,n,o,r){let i=e.localName.toLowerCase();if(xn.has(i)||!Rn.test(i))return null;if(n>gn)return t.truncated=!0,null;t.count+=1;let s={t:i},a=Ge(e),l=r||a||k(e),u=_n(e,l);if(u)s.a=u;if(N(e,t.probe)){let h=vn(e,t.probe);if(h)s.r=h}else s.h=1;let f=y(e),d=o&&!a&&!f&&!An.has(i)&&!je(e),c=l||!d;if(i==="svg"){let h=Array.from(e.children).find((g)=>g.localName==="title"),b=h?Y(h,t,n+1,d,c):null;if(b)s.c=[b];return s}if(i==="iframe"||i==="frame"){let h=null;try{h=e.contentDocument}catch{h=null}let b=h?.documentElement;if(b){let g=Y(b,t,n+1,d,c);if(g)s.f=g}return s}let p=Ke(e,t,n,d,c);if(p.length>0)s.c=p;let m=e.shadowRoot;if(m){let h=Ke(m,t,n,d,c);if(h.length>0)s.s=h}return s}function On(e){let t=e.querySelector("title");if(t&&k(t))return"";return Z(e.title??"")}function $e(e,t={}){let n={count:0,max:Math.max(1,t.maxNodes??En),truncated:!1,probe:t},o=Y(e.documentElement,n,0,!0,!1)??{t:"html"},r=e.defaultView;return{snapshotVersion:bn,url:ce(e.URL)??"",title:On(e),viewport:{width:Math.round(r?.innerWidth??0),height:Math.round(r?.innerHeight??0)},root:o,nodeCount:n.count,truncated:n.truncated}}var de=65536,Dn=65536,Ze=new Set(["getText","getValue","getAttribute","exists"]),Ye=new Set(["click","doubleClick","hover","check"]);function In(e){return e.ownerDocument.defaultView}var Ln={left:0,middle:1,right:2},Wn={left:1,middle:4,right:2};function fe(e,t,n){let o=e.getBoundingClientRect();return{bubbles:!0,cancelable:!0,composed:!0,view:t,button:Ln[n],buttons:0,clientX:o.x+o.width/2,clientY:o.y+o.height/2,pointerId:1,pointerType:"mouse",isPrimary:!0}}function Je(e,t,n){let o=typeof t.PointerEvent==="function"?t.PointerEvent:t.MouseEvent,r=[];for(let s=e;s;s=z(s))r.unshift(s);let i={...n,bubbles:!1};e.dispatchEvent(new o("pointerover",n));for(let s of r)s.dispatchEvent(new o("pointerenter",i));e.dispatchEvent(new t.MouseEvent("mouseover",n));for(let s of r)s.dispatchEvent(new t.MouseEvent("mouseenter",i))}var Un='a[href], area[href], button, input, select, textarea, iframe, summary, [tabindex], [contenteditable]:not([contenteditable="false"])';function Pn(e,t){for(let o=e;o;o=z(o))if(o.matches(Un)&&C(o)&&o instanceof t.HTMLElement){o.focus();return}let n=e.ownerDocument.activeElement;if(n instanceof t.HTMLElement&&n!==e.ownerDocument.body)n.blur()}function Hn(e,t,n,o,r){let i=typeof t.PointerEvent==="function"?t.PointerEvent:t.MouseEvent,s={...n,buttons:Wn[o],detail:r},a={...n,detail:r};Je(e,t,n);let l=e.dispatchEvent(new i("pointerdown",s));if(l&&e.dispatchEvent(new t.MouseEvent("mousedown",s)))Pn(e,t);if(e.dispatchEvent(new i("pointerup",a)),l)e.dispatchEvent(new t.MouseEvent("mouseup",a))}function P(e,t,n,o=1){let r=fe(e,t,n);Hn(e,t,r,n,o);let i=n==="left"?"click":n==="right"?"contextmenu":"auxclick";e.dispatchEvent(new t.MouseEvent(i,{...r,detail:o}))}function Qe(e,t){if(e instanceof t.HTMLTextAreaElement)return!0;if(!(e instanceof t.HTMLInputElement))return!1;return!["button","submit","reset","image","checkbox","radio","file","range","color","hidden"].includes(e.type)}function Vn(e,t,n){let o=e instanceof t.HTMLTextAreaElement?t.HTMLTextAreaElement.prototype:t.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(o,"value")?.set;if(r)r.call(e,n);else e.value=n;e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),e.dispatchEvent(new t.Event("change",{bubbles:!0}))}function Bn(e,t){if(!(e instanceof t.HTMLElement))return!1;if(e.isContentEditable)return!0;let n=e.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return n===""||n==="true"||n==="plaintext-only"}function qe(e,t,n,o){if(n.length>Dn)return{ok:!1,problem:"INVALID_ACTION"};if(Qe(e,t)){if(e.readOnly)return{ok:!1,problem:"NOT_EDITABLE"};return e.focus(),Vn(e,t,o?`${e.value}${n}`:n),{ok:!0}}if(Bn(e,t))return e.focus(),e.textContent=o?`${e.textContent??""}${n}`:n,e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),{ok:!0};return{ok:!1,problem:"NOT_EDITABLE"}}function Fn(e){let t=e.getAttribute("label");return t!==null&&t.trim()!==""?t:e.textContent??""}function Xn(e,t,n){if(!(e instanceof t.HTMLSelectElement))return{ok:!1,problem:"NOT_SELECTABLE"};let o=Array.from(e.options),r=n.value!==void 0?o.find((i)=>i.value===n.value):n.label!==void 0?o.find((i)=>V(Fn(i),n.label)):n.index!==void 0?o[n.index]:void 0;if(!r||r.disabled||r.closest("optgroup")?.hasAttribute("disabled"))return{ok:!1,problem:"OPTION_NOT_FOUND"};return e.focus(),r.selected=!0,e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),e.dispatchEvent(new t.Event("change",{bubbles:!0})),{ok:!0}}function zn(e,t,n){if(e instanceof t.HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")){if(e.checked!==n){if(e.type==="radio"&&!n)return{ok:!1,problem:"NOT_CHECKABLE"};P(e,t,"left")}return e.checked===n?{ok:!0}:{ok:!1,problem:"STATE_NOT_CHANGED"}}let o=e.getAttribute("role");if(o==="checkbox"||o==="switch"||o==="radio"||o==="menuitemcheckbox"){let r=()=>e.getAttribute("aria-checked")==="true";if(r()!==n)P(e,t,"left");return r()===n?{ok:!0}:{ok:!1,problem:"STATE_NOT_CHANGED"}}return{ok:!1,problem:"NOT_CHECKABLE"}}var Kn=/^(?:[\s\S]|[A-Z][A-Za-z0-9]{1,23})$/u;function jn(e,t){if(e instanceof t.HTMLButtonElement)return!0;if(e instanceof t.HTMLInputElement)return["submit","button","reset","image"].includes(e.type);let n=e.localName;return n==="a"&&e.hasAttribute("href")||n==="summary"}function Gn(e,t){if(e instanceof t.HTMLButtonElement)return!0;if(e instanceof t.HTMLInputElement)return["submit","button","reset","image","checkbox","radio"].includes(e.type);return e.localName==="summary"}function me(e,t){e.dispatchEvent(new t.MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0,view:t,detail:0}))}function $n(e,t,n){if(!Kn.test(n))return{ok:!1,problem:"INVALID_ACTION"};let o=n==="Space"?" ":n;if(e instanceof t.HTMLElement)e.focus();let r={key:o,bubbles:!0,cancelable:!0,composed:!0},i=e.dispatchEvent(new t.KeyboardEvent("keydown",r));if(o==="Enter"&&i){if(jn(e,t))me(e,t);else if(e instanceof t.HTMLInputElement&&Qe(e,t)&&e.form)Yn(e.form,t)}let s=e.dispatchEvent(new t.KeyboardEvent("keyup",r));if(o===" "&&i&&s&&Gn(e,t))me(e,t);return{ok:!0}}var qn=new Set(["submit","image"]),Zn=new Set(["text","search","url","tel","email","password","date","month","week","time","datetime-local","number"]);function Yn(e,t){let n=Array.from(e.elements),o=e.getRootNode(),r=Array.from(o.querySelectorAll("button, input")).find((s)=>(s instanceof t.HTMLButtonElement&&s.type==="submit"||s instanceof t.HTMLInputElement&&qn.has(s.type))&&s.form===e);if(r){if(C(r))me(r,t);return}if(n.filter((s)=>s instanceof t.HTMLInputElement&&Zn.has(s.type)).length===1)e.requestSubmit()}function Jn(e,t){if(e instanceof t.HTMLInputElement&&(e.type==="checkbox"||e.type==="radio"))return e.checked;if(e instanceof t.HTMLInputElement||e instanceof t.HTMLTextAreaElement||e instanceof t.HTMLSelectElement)return e.value.slice(0,de);let n=e.getAttribute("aria-checked");if(n==="true"||n==="false")return n==="true";return e.getAttribute("aria-valuenow")??e.getAttribute("aria-valuetext")}var Qn=/^[A-Za-z_][\w:.-]{0,127}$/;function et(e,t){let n=In(e);if(!n)return{ok:!1,problem:"INVALID_ACTION"};switch(t.kind){case"click":return P(e,n,t.button??"left"),{ok:!0};case"doubleClick":return P(e,n,"left",1),P(e,n,"left",2),e.dispatchEvent(new n.MouseEvent("dblclick",{...fe(e,n,"left"),detail:2})),{ok:!0};case"hover":{let o=fe(e,n,"left"),r=typeof n.PointerEvent==="function"?n.PointerEvent:n.MouseEvent;return Je(e,n,o),e.dispatchEvent(new r("pointermove",o)),e.dispatchEvent(new n.MouseEvent("mousemove",o)),{ok:!0}}case"focus":if(e instanceof n.HTMLElement)e.focus();return{ok:!0};case"type":return typeof t.text==="string"?qe(e,n,t.text,t.append===!0):{ok:!1,problem:"INVALID_ACTION"};case"clear":return qe(e,n,"",!1);case"select":return Xn(e,n,t);case"check":return zn(e,n,t.checked===!0);case"pressKey":return typeof t.key==="string"?$n(e,n,t.key):{ok:!1,problem:"INVALID_ACTION"};case"scroll":return e.scrollBy?.({left:Number(t.dx??0)||0,top:Number(t.dy??0)||0}),{ok:!0};case"scrollIntoView":return e.scrollIntoView?.({block:"center",inline:"nearest"}),{ok:!0};case"getText":if(y(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:O(e).slice(0,de)};case"getValue":if(y(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:Jn(e,n)};case"getAttribute":{if(typeof t.name!=="string"||!Qn.test(t.name))return{ok:!1,problem:"INVALID_ACTION"};let o=t.name.toLowerCase();if(y(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:e.getAttribute(o)?.slice(0,de)??null}}case"exists":return{ok:!0,value:!0};default:return{ok:!1,problem:"INVALID_ACTION"}}}var nt=1,tt="__burdenoffUiRuntime",eo=60000,to="fg-ui-highlight",no=new Set(["role","css","testId","xpath","fuzzy","anchor","text"]);function pe(e){if(!e||typeof e!=="object")return!1;let t=e;if(!Array.isArray(t.methods)||t.methods.length===0||t.methods.length>8)return!1;if(t.frame!==void 0&&!(Array.isArray(t.frame)&&t.frame.every((n)=>typeof n==="string")))return!1;return t.methods.every((n)=>!!n&&typeof n==="object"&&no.has(String(n.kind)))}function he(){return{status:"failed",code:"ELEMENT_NOT_FOUND",candidates:[],candidateCount:0,attempts:[]}}function be(e){return{status:e.status,method:e.method,methodIndex:e.methodIndex,fallback:e.fallback,candidate:e.candidate,attempts:e.attempts}}function oo(e){try{return e.defaultView?.frameElement??null}catch{return null}}function ro(e,t,n,o){let r=e.getRootNode();if(typeof r.elementFromPoint!=="function")return null;let i=r.elementFromPoint(t,n);if(!i)return"offscreen";if(i===e||e.contains(i))return null;return o.some((s)=>s.contains(i))?null:"covered"}function io(e,t){let n=t.x+t.width/2,o=t.y+t.height/2,r=Array.from(e.labels??[]),i=e;for(let s=0;s<32;s+=1){let a=ro(i,n,o,s===0?r:[]);if(a)return a;let l=i.getRootNode();if(l&&"host"in l){i=l.host;continue}let u=oo(i.ownerDocument);if(!u)return null;let f=u.getBoundingClientRect();n+=f.x+u.clientLeft,o+=f.y+u.clientTop,i=u}return null}function so(e,t){let n=e.ownerDocument.defaultView;if(!n)return!1;let o=t.x+t.width/2,r=t.y+t.height/2;return o<0||r<0||o>=n.innerWidth||r>=n.innerHeight}function ao(e){let t=e.ownerDocument.defaultView;if(t&&t.getComputedStyle(e).pointerEvents==="none")return"noPointerEvents";let n=e.getBoundingClientRect();if(n.width<=0||n.height<=0)return null;if(so(e,n)&&typeof e.scrollIntoView==="function")e.scrollIntoView({block:"center",inline:"center"}),n=e.getBoundingClientRect();return io(e,n)}function lo(e,t={}){let n=t.root??e,o={...t.rectOf?{rectOf:t.rectOf}:{},...t.isVisible?{isVisible:t.isVisible}:{}},r=null,i=null,s=()=>{if(i!==null)clearTimeout(i),i=null;r?.remove(),r=null},a=(c,p)=>(s(),Be(n,c,{...o,...p?{state:p}:{}})),l=(c,p={})=>{if(!pe(c))return he();let m=a(c,p.state);return m.status==="found"?be(m):m},u=(c,p,m={})=>{if(!p||typeof p!=="object"||typeof p.kind!=="string")return{ok:!1,code:"INVALID_ACTION"};if(!pe(c))return{ok:!1,code:"ELEMENT_NOT_FOUND",resolution:he()};let h=m.state??(Ze.has(p.kind)?"visible":"interactable"),b=a(c,h);if(b.status!=="found"){if(p.kind==="exists"&&b.code==="ELEMENT_NOT_FOUND")return{ok:!0,value:!1,resolution:b};return{ok:!1,code:b.code,resolution:b}}let g=be(b),_=Ye.has(p.kind)?ao(b.element):null;if(_)return{ok:!1,code:"ELEMENT_NOT_INTERACTABLE",reason:_,resolution:{status:"failed",code:"ELEMENT_NOT_INTERACTABLE",candidates:[b.candidate],candidateCount:1,attempts:b.attempts}};let S=et(b.element,p);if(!S.ok)return{ok:!1,code:S.problem,resolution:g};return S.value===void 0?{ok:!0,resolution:g}:{ok:!0,resolution:g,value:S.value}},f=(c,p,m)=>{let h=e.createElement(to);h.setAttribute("aria-hidden","true"),h.setAttribute("style","all: initial; position: fixed; inset: 0; pointer-events: none; z-index: 2147483647;");let b=h.attachShadow({mode:"closed"});c.forEach((g,_)=>{let S=e.createElement("div");S.setAttribute("style",`position: fixed; left: ${g.bounds.x-3}px; top: ${g.bounds.y-3}px; width: ${g.bounds.width+6}px; height: ${g.bounds.height+6}px; outline: 3px solid Highlight; border-radius: 4px; box-sizing: border-box;`);let Ee=m?`${_+1}${p?` ${p}`:""}`:p;if(Ee){let J=e.createElement("span");J.textContent=Ee.slice(0,120),J.setAttribute("style","position: absolute; left: 0; top: 100%; margin-top: 4px; padding: 2px 6px; font: 600 11px system-ui, sans-serif; background: Highlight; color: HighlightText; border-radius: 3px; white-space: nowrap;"),S.appendChild(J)}b.appendChild(S)}),e.documentElement.appendChild(h),r=h};return{version:nt,resolve:l,act:u,highlight:(c,p={})=>{if(!pe(c))return he();let m=a(c,p.state??"visible");if(m.status==="found")f([m.candidate],p.label,!1);else if(m.candidates.length>0)f(m.candidates,p.label,!0);let h=Math.min(eo,Math.max(0,Number(p.durationMs??0)||0));if(r&&h>0)i=setTimeout(s,h);return m.status==="found"?be(m):m},clearHighlight:s,snapshot:(c={})=>(s(),$e(e,{...o,...c.maxNodes?{maxNodes:c.maxNodes}:{}}))}}function ot(e,t){let n=Reflect.get(e,tt);if(n&&typeof n==="object"&&typeof n.version==="number"&&n.version>=nt)return n;let o=Object.freeze(lo(t));return Object.defineProperty(e,tt,{value:o,configurable:!0,enumerable:!1,writable:!1}),o}ot(globalThis,globalThis.document);})();
1
+ (()=>{var H=["data-fg-sensitive","data-sensitive","data-private"];function Q(e){return H.some((t)=>e.hasAttribute(t))}function I(e){let t=e.assignedSlot;if(t!==void 0)return t;let n=e.parentElement?.shadowRoot;if(!n)return null;for(let o of Array.from(n.querySelectorAll("slot")))if((typeof o.assignedNodes==="function"?o.assignedNodes():[]).includes(e))return o;return null}function x(e){let t=I(e);if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();if(n&&"host"in n)return n.host;try{return e.ownerDocument.defaultView?.frameElement??null}catch{return null}}function k(e){for(let t=e;t;t=x(t))if(Q(t))return!0;return!1}var ge={button:"button",submit:"button",reset:"button",image:"button",checkbox:"checkbox",radio:"radio",range:"slider",number:"spinbutton",search:"searchbox",email:"textbox",tel:"textbox",text:"textbox",url:"textbox",password:"textbox",date:"textbox","datetime-local":"textbox",month:"textbox",time:"textbox",week:"textbox",color:"textbox",file:"button"},Te={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",hr:"separator",li:"listitem",main:"main",menu:"list",meter:"meter",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",p:"paragraph",progress:"progressbar",summary:"button",table:"table",tbody:"rowgroup",td:"cell",textarea:"textbox",tfoot:"rowgroup",thead:"rowgroup",tr:"row",ul:"list"},xe=new Set(["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"]);var ee=256;function T(e){return(e??"").normalize("NFKC").replace(/\s+/g," ").trim().toLowerCase()}function V(e,t){return T(e)===T(t)}function Ae(e,t){let n=T(t);return n.length>0&&T(e).includes(n)}function rt(e,t){if(e===t)return 0;if(e.length===0)return t.length;if(t.length===0)return e.length;let n=Array.from({length:t.length+1},(o,r)=>r);for(let o=1;o<=e.length;o+=1){let r=[o];for(let i=1;i<=t.length;i+=1){let s=e[o-1]===t[i-1]?0:1;r[i]=Math.min((n[i]??0)+1,(r[i-1]??0)+1,(n[i-1]??0)+s)}n=r}return n[t.length]??0}function ye(e,t){let n=T(e).slice(0,256),o=T(t).slice(0,256),r=Math.max(n.length,o.length);if(r===0)return 0;return 1-rt(n,o)/r}function v(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}var ne=512,it=65536,st=new Set(["button","input","meter","output","progress","select","textarea"]),at=new Set(["script","style","noscript","template","head","title","meta","link"]);function M(e){return e.localName.toLowerCase()}function Se(e){return e.parentElement?.closest("article, aside, main, nav, section")!=null}function lt(e){let t=M(e);switch(t){case"a":case"area":return e.hasAttribute("href")?"link":"";case"input":{let n=(e.getAttribute("type")??"text").toLowerCase();if(n==="hidden")return"";if(e.hasAttribute("list")&&["text","search","email","tel","url"].includes(n))return"combobox";return ge[n]??"textbox"}case"select":{let n=Number(e.getAttribute("size")??"0");return e.hasAttribute("multiple")||n>1?"listbox":"combobox"}case"img":return e.getAttribute("alt")===""?"presentation":"img";case"th":return e.getAttribute("scope")==="row"?"rowheader":"columnheader";case"header":return Se(e)?"":"banner";case"footer":return Se(e)?"":"contentinfo";case"section":case"form":return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?t==="form"?"form":"region":"";default:return Te[t]??""}}function A(e){let t=e.getAttribute("role")?.trim().split(/\s+/)[0];return t?t.toLowerCase():lt(e)}function ut(e,t){let n=e.getRootNode();return typeof n.getElementById==="function"?n.getElementById(t):null}function ct(e){return e.hasAttribute("hidden")||e.getAttribute("aria-hidden")==="true"}function dt(e){let t=e.ownerDocument.defaultView;if(!t)return"none";let n=t.getComputedStyle(e);if(n.display==="none")return"subtree";return n.visibility==="hidden"||n.visibility==="collapse"?"self":"none"}function W(e){let t=e.getAttribute("contenteditable");if(t===null)return!1;let n=t.trim().toLowerCase();return n===""||n==="true"||n==="plaintext-only"}function ft(e){if(e.shadowRoot)return Array.from(e.shadowRoot.childNodes);if(M(e)==="slot"){let t=e,n=typeof t.assignedNodes==="function"?t.assignedNodes({flatten:!0}):[];if(n.length>0)return n}return Array.from(e.childNodes)}var mt=/^(div|p|li|tr|td|th|br|h[1-6]|section|article|header|footer)$/;function L(e,t){if(e.remaining<=0||t.length===0)return;let n=t.slice(0,e.remaining);e.parts.push(n),e.remaining-=n.length}function Me(e,t,n,o,r,i=!1){if(t>32||n.remaining<=0)return;if(e.nodeType===3){if(!i)L(n,e.textContent??"");return}if(e.nodeType!==1)return;let s=e,a=M(s);if(at.has(a)||Q(s))return;if(!r&&ct(s))return;let l=!1;if(t>0&&!r){let d=o?.isVisible?.(s);if(d===!1)l=!0;else if(d===void 0){let c=dt(s);if(c==="subtree")return;l=c==="self"}}let u=s.getAttribute("aria-label")?.trim();if(u&&t>0&&!l){L(n,` ${u} `);return}if(a==="img"||a==="input"&&s.getAttribute("type")==="image"){if(!l)L(n,` ${s.getAttribute("alt")??""} `);return}if(a==="input"||a==="textarea"||a==="select")return;if(t>0&&W(s))return;let f=t>0&&mt.test(a);if(f)L(n," ");for(let d of ft(s))Me(d,t+1,n,o,r,l);if(f)L(n," ")}function F(e){if(M(e)==="textarea"||W(e))return!0;for(let n=x(e);n;n=x(n))if(M(n)==="textarea"||W(n))return!0;return!1}function Re(e){for(let t=x(e);t;t=x(t)){let n=M(t);if(n==="textarea"||n==="select"||W(t))return!0}return!1}function B(e,t,n=!1){let o=M(e);if(o==="textarea"||o==="select"||W(e)||Re(e)||k(e))return"";return E(e.getAttribute("aria-label")??"")||X(e,t,ne,n)}function X(e,t,n=ne,o=!1){if(e.nodeType===1&&k(e))return"";let r={parts:[],remaining:n*2+64};return Me(e,0,r,t,o),E(r.parts.join(""),n)}function E(e,t=ne){return e.replace(/\s+/g," ").trim().slice(0,t)}function pt(e,t){let n=[],o=e.getAttribute("id");if(o){let i=e.getRootNode();for(let s of Array.from(i.querySelectorAll("label")))if(s.getAttribute("for")===o)n.push(B(s,t,!0))}let r=e.closest("label");if(r&&!r.hasAttribute("for"))n.push(B(r,t,!0));return E(n.join(" "))}function te(e,t,n){let o=Array.from(e.children).find((r)=>M(r)===t);return o?B(o,n):""}function R(e,t){return Ne(e,t,!0)}function ke(e,t){return Ne(e,t,!1)}function ht(e,t){let n=Array.from(e.children).find((o)=>M(o)==="title");if(!n||k(n)||Re(n))return"";return E(Array.from(n.childNodes).map((o)=>X(o,t)).join(" "))}function Ne(e,t,n){let o=e.getAttribute("aria-labelledby");if(o){let l=o.split(/\s+/).filter(Boolean).map((u)=>ut(e,u)).filter((u)=>u!==null).map((u)=>B(u,t,!0)).join(" ");if(E(l))return E(l)}let r=e.getAttribute("aria-label");if(r&&E(r))return E(r);let i=M(e);if(st.has(i)){let l=pt(e,t);if(l)return l}if(i==="input"){let l=(e.getAttribute("type")??"text").toLowerCase();if(l==="button"||l==="submit"||l==="reset"){let u=e.getAttribute("value");if(u!==null)return E(u);return l==="submit"?"Submit":l==="reset"?"Reset":""}if(l==="image")return E(e.getAttribute("alt")??"")}if(i==="img"||i==="area"){let l=e.getAttribute("alt");if(l)return E(l)}if(i==="svg"){let l=ht(e,t);if(l)return l}if(i==="fieldset"){let l=te(e,"legend",t);if(l)return l}if(i==="table"){let l=te(e,"caption",t);if(l)return l}if(i==="option"){let l=E(e.getAttribute("label")??"");if(l)return l}if(i==="figure"){let l=te(e,"figcaption",t);if(l)return l}if(n&&xe.has(A(e))){let l=X(e,t);if(l)return l}let s=e.getAttribute("title");if(s&&E(s))return E(s);let a=e.getAttribute("placeholder");if(a&&E(a))return E(a);return""}function D(e,t){if(M(e)==="input"){let o=(e.getAttribute("type")??"text").toLowerCase();return o==="button"||o==="submit"||o==="reset"?R(e,t):""}return X(e,t,it)}function oe(e,t,n,o){return A(e)===t.trim().toLowerCase()&&T(R(e,o))===T(n)}function bt(e){return e.ownerDocument.defaultView}function K(e){let t=I(e);if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n&&"host"in n?n.host:null}function N(e,t){let n=t?.isVisible?.(e);if(n!==void 0)return n;if(!e.isConnected)return!1;let o=bt(e),r=e;while(r){if(r.hasAttribute("hidden"))return!1;if(r.localName==="input"&&r.getAttribute("type")?.toLowerCase()==="hidden")return!1;if(o&&o.getComputedStyle(r).display==="none")return!1;r=K(r)}if(o){let s=o.getComputedStyle(e);if(s.visibility==="hidden"||s.visibility==="collapse")return!1;if(s.display==="contents")return!0}let i=e.checkVisibility;return typeof i==="function"?i.call(e):!0}function C(e){for(let n=e;n;n=x(n))if(n.getAttribute("aria-disabled")==="true"||n.hasAttribute("inert"))return!1;if(!Et.has(e.localName)){let n=e.parentElement?.closest("button, select, option, optgroup, textarea");return n?C(n):!0}if(e.hasAttribute("disabled"))return!1;let t=e.parentElement?.closest("fieldset[disabled]");if(t){if(!Array.from(t.children).find((o)=>o.localName==="legend")?.contains(e))return!1}try{return!e.matches(":disabled")}catch{return!0}}var Et=new Set(["button","input","select","textarea","optgroup","option","fieldset"]);function O(e,t,n){let r=t?.rectOf?.(e)??e.getBoundingClientRect();return{x:Math.round(r.x+(n?.x??0)),y:Math.round(r.y+(n?.y??0)),width:Math.round(r.width),height:Math.round(r.height)}}function w(e){let t=Array.from(e.querySelectorAll("*"));return e.nodeType===1?[e,...t]:t}var gt=/password|passcode|passwd|\bpin\b|otp|one[\s-]?time|verification|security code|auth(?:entication)? code|\bcvv\b|\bcvc\b|card number|secret|token|recovery/i,Tt=/password|one-time-code|^cc-/i;function xt(e){return gt.test(e)}function y(e){if(k(e))return!0;if(Ce(e))return!0;for(let t=x(e);t;t=x(t))if(Ce(t))return!0;return!1}function Ce(e){let t=e.localName,n=e.getAttribute("contenteditable"),o=n!==null&&n.trim().toLowerCase()!=="false";if(t!=="input"&&t!=="textarea"&&t!=="select"&&!o)return!1;if(e.getAttribute("type")?.toLowerCase()==="password")return!0;if((e.getAttribute("autocomplete")??"").trim().split(/\s+/).filter(Boolean).some((i)=>Tt.test(i)))return!0;return At(e).some((i)=>i.length>0&&xt(i.replace(/[-_]/g," ")))}function At(e){let t=(a)=>(a??"").slice(0,512),n=[R(e),t(e.getAttribute("aria-label")),t(e.getAttribute("placeholder")),t(e.getAttribute("title")),t(e.getAttribute("name")),t(e.getAttribute("id"))],o=e.getRootNode(),r=(a)=>typeof o.getElementById==="function"?o.getElementById(a):null;for(let a of(e.getAttribute("aria-labelledby")??"").split(/\s+/).filter(Boolean)){let l=r(a);if(l)n.push(t(l.getAttribute("aria-label")),t(l.textContent))}let i=e.getAttribute("id"),s=Array.from(o.querySelectorAll("label")).filter((a)=>i!==null&&a.getAttribute("for")===i||!a.hasAttribute("for")&&a.contains(e));for(let a of s)n.push(t(a.getAttribute("aria-label")),t(a.textContent));return n}var yt=0.8,St=0.05,Mt=4,we=1000,z=2,Rt=new Set(["button","checkbox","combobox","link","listbox","menuitem","menuitemcheckbox","menuitemradio","option","radio","searchbox","slider","spinbutton","switch","tab","textbox","treeitem"]),kt=/^[A-Za-z_][\w:.-]{0,127}$/;function Nt(e){return e.nodeType===9?e:e.ownerDocument}function Ct(e,t){return{kind:"list",elements:w(t.root).filter((o)=>oe(o,e.role,e.name,t.probe)),...e.nth!==void 0?{nth:e.nth}:{}}}function wt(e,t){try{return{kind:"list",elements:Array.from(t.root.querySelectorAll(e))}}catch{return{kind:"invalid"}}}function _t(e,t){let n=e.attribute??"data-testid";if(!kt.test(n))return{kind:"invalid"};return{kind:"list",elements:w(t.root).filter((r)=>r.getAttribute(n)===e.value)}}function vt(e,t){if(e.nodeType===9)return t.ownerDocument===e&&t.getRootNode()===e;return e===t||e.contains(t)}function Dt(e,t){let n=Nt(t.root);if(typeof n.evaluate!=="function")return{kind:"unsupported"};let o;try{o=n.evaluate(e.xpath,t.root,null,7,null)}catch{return{kind:"invalid"}}let r=[],i=Math.min(o.snapshotLength,we);for(let s=0;s<i;s+=1){let a=o.snapshotItem(s);if(a&&a.nodeType===1&&vt(t.root,a))r.push(a)}return{kind:"list",elements:r,...o.snapshotLength>we?{overflow:!0}:{}}}function Ot(e,t,n){let o=Math.min(T(e).length,ee),r=Math.max(o,t);return r>0&&Math.abs(o-t)<=(1-n)*r}function It(e,t){let n=Math.min(1,Math.max(0.5,e.threshold??yt)),o=e.role?.trim().toLowerCase(),r=Math.min(T(e.name).length,ee),i=[];for(let s of w(t.root)){let a=A(s);if(o?a!==o:a==="")continue;let l=R(s,t.probe);if(!Ot(l,r,n))continue;let u=ye(l,e.name);if(u>=n)i.push({element:s,score:u})}return{kind:"ranked",scored:i,margin:St}}function De(e,t){let n=w(e.root).filter((i)=>t(D(i,e.probe))),o=e.keep??(()=>!0),r=n.filter(o);return n.filter((i)=>!r.some((s)=>s!==i&&i.contains(s)))}function Lt(e,t){let n=e.exact?(o)=>V(o,e.text):(o)=>Ae(o,e.text);if(T(e.text).length===0)return{kind:"list",elements:[]};return{kind:"list",elements:De(t,n),...e.nth!==void 0?{nth:e.nth}:{}}}function re(e){return T(e).replace(/[\s:*]+$/u,"")}function Wt(e,t){return(e.kind==="role"?w(t.root).filter((o)=>oe(o,e.role,e.name,t.probe)):De(t,(o)=>re(o)===re(e.text)&&re(o)!=="")).filter((o)=>N(o,t.probe))}function Oe(e,t,n){let o=e.role?.trim().toLowerCase();return w(t.root).filter((r)=>{let i=A(r);if(o?i!==o:!Rt.has(i))return!1;return!n.some((s)=>s===r||r.contains(s))})}var Ut=new Set(["h1","h2","h3","h4","h5","h6","legend","caption","figcaption","summary","dt"]);function ie(e){return Ut.has(e.localName)||A(e)==="heading"}function Pt(e){for(let t=e;t;t=t.parentElement)if(ie(t))return t;return null}function Ht(e,t,n){let o=Oe(e,t,n),r=new Set;for(let i of n){let a=Pt(i)?.parentElement??i;for(let l of o)if(a.contains(l))r.add(l)}return{kind:"list",elements:o.filter((i)=>r.has(i))}}function _e(e,t,n,o){return e<o&&n<t}function Vt(e,t,n){let o=t.x+t.width,r=t.y+t.height,i=n.x+n.width,s=n.y+n.height,a=_e(t.y,r,n.y,s),l=_e(t.x,o,n.x,i);switch(e){case"rightOf":return a&&n.x>=o-z?Math.max(0,n.x-o):null;case"leftOf":return a&&i<=t.x+z?Math.max(0,t.x-i):null;case"below":return l&&n.y>=r-z?Math.max(0,n.y-r):null;case"above":return l&&s<=t.y+z?Math.max(0,t.y-s):null;case"sameRow":return a?Math.abs(n.x+n.width/2-(t.x+t.width/2)):null;default:return null}}function ve(e){return e.width>0&&e.height>0}function Bt(e,t){let n=Wt(e.anchor,t);if(n.length===0)return{kind:"list",elements:[]};if(e.relation==="inside")return Ht(e,t,n);let o=n.map((i)=>O(i,t.probe)).filter(ve);if(o.length===0)return{kind:"unsupported"};let r=[];for(let i of Oe(e,t,n)){let s=O(i,t.probe);if(!ve(s))continue;let a=null;for(let l of o){let u=Vt(e.relation,l,s);if(u!==null&&(a===null||u<a))a=u}if(a!==null)r.push({element:i,score:-a})}return{kind:"ranked",scored:r,margin:Mt}}function j(e,t){switch(e.kind){case"role":return Ct(e,t);case"css":return wt(e.selector,t);case"testId":return _t(e,t);case"xpath":return Dt(e,t);case"fuzzy":return It(e,t);case"anchor":return Bt(e,t);case"text":return Lt(e,t);default:return{kind:"unsupported"}}}var Ie=5,G=200;var Ft=12,Xt=3,Kt=8,zt=25,jt=5000,Gt=new Set(["alertdialog","article","banner","complementary","contentinfo","dialog","figure","form","grid","group","list","listitem","main","menu","menubar","navigation","radiogroup","region","row","search","tablist","table","tabpanel","toolbar","tree","treegrid"]);function $t(){return typeof performance>"u"?Date.now():performance.now()}function se(e=$t){return{answers:new Map,checksLeft:Kt,now:e,deadline:e()+zt}}function qt(e){return e.replace(/\s+/g," ").trim()}function Zt(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n<32||n>=127&&n<=159)return!0}return!1}function Le(e){let t=qt(e);return t.length>0&&t.length<=G&&!Zt(t)?t:void 0}function We(e){return y(e)||F(e)}function Yt(e,t){for(let n of Array.from(e.children))if(ie(n)&&!We(n)&&N(n,t))return n;return}function*Jt(e,t){if(We(e))return;let n=A(e),o=Gt.has(n)?Le(R(e,t)):void 0;if(o)yield{anchor:{kind:"role",role:n,name:o},role:n};let r=Yt(e,t);if(!r)return;let i=A(r)==="heading",s=Le(i?R(r,t):D(r,t));if(!s)return;yield{anchor:i?{kind:"role",role:"heading",name:s}:{kind:"text",text:s},role:n}}function Qt(e,t){return JSON.stringify([e,t])}function en(e,t,n,o,r){let s=j({kind:"anchor",anchor:e,relation:"inside",role:t},{root:n,keep:o,...r?{probe:r}:{}});return s.kind==="list"?s.elements.filter(o):[]}function tn(e,t){return e.nodeType!==1||e===t||e.contains(t)}function Ue(e,t,n,o,r=se()){let i=A(e);if(i===""||y(e))return;let s=0,a=0;for(let l=e.parentElement;l&&a<Ft&&tn(t,l);l=l.parentElement){a+=1;for(let u of Jt(l,o)){let f=Qt(u.anchor,i),d=r.answers.get(f);if(!d){if(r.now()>=r.deadline)return;if(s>=Xt||r.checksLeft<=0)continue;s+=1,r.checksLeft-=1,d=en(u.anchor,i,t,n,o),r.answers.set(f,d)}if(d.length===1&&d[0]===e)return u}}return}function Pe(e){return e.querySelectorAll("*").length<=jt}var nn={x:0,y:0,width:0,height:0};function on(e,t,n){let o={root:e,offset:nn,hidden:!1,disabled:!1};for(let[r,i]of(t??[]).entries()){let s;try{s=Array.from(o.root.querySelectorAll(i))}catch{return{index:r,reason:"invalid"}}if(s.length===0)return{index:r,reason:"notFound"};if(s.length>1)return{index:r,reason:"ambiguous"};let a=s[0],l=a.localName;if(l==="iframe"||l==="frame"){let u=a,f=null;try{f=u.contentDocument}catch{f=null}if(!f)return{index:r,reason:"inaccessible"};let d=O(a,n,o.offset);o={root:f,offset:{x:d.x+u.clientLeft,y:d.y+u.clientTop,width:0,height:0},hidden:o.hidden||!N(a,n),disabled:o.disabled||!C(a)}}else if(a.shadowRoot)o={root:a.shadowRoot,offset:o.offset,hidden:o.hidden,disabled:o.disabled};else return{index:r,reason:"notAFrame"}}return o}function He(e,t,n,o){if(t==="attached")return!0;if(n.hidden||!N(e,o))return!1;return t==="visible"||!n.disabled&&C(e)}function Ve(e,t,n,o,r){return{role:A(e),name:y(e)?"":v(F(e)?ke(e,r):R(e,r),G),bounds:O(e,r,o),method:t.kind,methodIndex:n}}function rn(e,t,n,o=!1){if(t.length===0)return e.length>0?{outcome:"notInteractable",elements:e,matches:0}:{outcome:"none",elements:[],matches:0};if(o)return{outcome:"ambiguous",elements:t,matches:t.length};if(n!==void 0){let r=t[n];return r?{outcome:"found",element:r,matches:t.length}:{outcome:"none",elements:[],matches:t.length}}return t.length===1?{outcome:"found",element:t[0],matches:1}:{outcome:"ambiguous",elements:t,matches:t.length}}function sn(e,t,n){if(t.length===0)return e.length>0?{outcome:"notInteractable",elements:e.map((a)=>a.element),matches:0}:{outcome:"none",elements:[],matches:0};let o=[...t].sort((a,l)=>l.score-a.score),r=o[0],i=o[1];if(!i||r.score-i.score>=n)return{outcome:"found",element:r.element,matches:t.length};let s=o.filter((a)=>r.score-a.score<n).map((a)=>a.element);return{outcome:"ambiguous",elements:s,matches:s.length}}function an(e,t){switch(e.kind){case"invalid":case"unsupported":return e.kind;case"list":return rn(e.elements,e.elements.filter(t),e.nth,e.overflow);case"ranked":return sn(e.scored,e.scored.filter((n)=>t(n.element)),e.margin)}}function U(e,t,n=[],o=0,r){return{status:"failed",code:e,candidates:n,candidateCount:o,attempts:t,...r?{frame:r}:{}}}function Be(e,t,n={}){let o=n.state??"interactable",r=on(e,t.frame,n);if(!("root"in r)){let d=t.methods.map((c,p)=>({index:p,method:c.kind,outcome:"notTried",matches:0}));return U("ELEMENT_NOT_FOUND",d,[],0,r)}let i=[],s=t.methods.findIndex((d)=>d.enabled!==!1),a,l,u;for(let[d,c]of t.methods.entries()){if(u){i.push({index:d,method:c.kind,outcome:"notTried",matches:0});continue}if(c.enabled===!1){i.push({index:d,method:c.kind,outcome:"disabled",matches:0});continue}let p=(h)=>He(h,o,r,n),m=an(j(c,{root:r.root,probe:n,keep:p}),p);if(m==="invalid"||m==="unsupported"){i.push({index:d,method:c.kind,outcome:m,matches:0});continue}if(i.push({index:d,method:c.kind,outcome:m.outcome,matches:m.matches}),m.outcome==="found")u={element:m.element,method:c,index:d};else if(m.outcome==="ambiguous"&&!a)a={elements:m.elements,method:c,index:d,count:m.matches};else if(m.outcome==="notInteractable"&&!l)l={elements:m.elements,method:c,index:d}}if(u)return{status:"found",element:u.element,method:u.method.kind,methodIndex:u.index,fallback:u.index!==s,candidate:Ve(u.element,u.method,u.index,r.offset,n),attempts:i};let f=(d)=>d.elements.slice(0,Ie).map((c)=>Ve(c,d.method,d.index,r.offset,n));if(a){let d=(b)=>He(b,o,r,n),c=f(a);if(!Pe(r.root))return U("ELEMENT_AMBIGUOUS",i,c,a.count);let p=se(),{elements:m}=a,h=c.map((b,g)=>{let _=m[g],S=Ue(_,r.root,d,n,p);return S?{...b,container:S}:b});return U("ELEMENT_AMBIGUOUS",i,h,a.count)}if(l)return U("ELEMENT_NOT_INTERACTABLE",i,f(l),l.elements.length);return U("ELEMENT_NOT_FOUND",i)}var ae="[REDACTED]",ln=[/\b(?:Bearer|Basic)\s+[^\s"'`,;)\]}]+/gi,/\b(?:sk|pk|rk|xai)-[^\s"'`,;)\]}]+/gi,/\b(?:gsk|hf|ghp|gho|ghs|ghu|glpat)_[^\s"'`,;)\]}]+/gi,/\bAIza[\w-]{10,}/g,/\b(?:AKIA|ASIA)[0-9A-Z]{12,}/g],un=/([\s"'`,;:=()[\]{}]+)/,cn=/^(?:api[_-]?key|access[_-]?key|secret|secret[_-]?key|client[_-]?secret|token|password)$/i;function dn(e){let t=e.indexOf("…");return e.includes("***")||t!==-1&&t<e.length-1}function fn(e){let t=e.split(un);for(let n=0;n<t.length;n+=2){let o=t[n]??"";if(o&&o!=="[REDACTED]"&&dn(o))t[n]="[REDACTED]";let r=t[n+1]??"";if(t[n+2]&&cn.test(o)&&/[:=]/.test(r))t[n+2]="[REDACTED]"}return t.join("")}function le(e){if(!e)return e;let t=e;for(let n of ln)t=t.replace(n,"[REDACTED]");return t=fn(t),t.replace(/(?:\[REDACTED\]){2,}/g,"[REDACTED]")}var Fe="";function q(e){if(!e)return!1;let t=e.replaceAll("[REDACTED]",Fe);return le(t).replaceAll(Fe,"[REDACTED]")!==e}function ue(e){try{return decodeURIComponent(e.replaceAll("+"," "))}catch{return e}}function Xe(e){return q(ue(e).replace(/[/?&#]/g," "))}var mn=500,Ke=/reset|recover|verify|verification|magic|confirm|activate|invite|unsubscribe/i;function pn(e){let t=e;for(let n=0;n<3;n+=1){let o=ue(t);if(o===t)break;t=o}return t}function hn(e){let t=e.split(/[/?#;]/),n=t.findIndex((r)=>Ke.test(r));return t.slice(0,n+1).map((r)=>q(r)?ae:r).join("/")}function ce(e){let t=e.trim();if(t==="")return null;let n=/^[a-z][a-z0-9+.-]*:/i.test(t)||t.startsWith("//"),o="",r;if(n){let f;try{f=new URL(t.startsWith("//")?`https:${t}`:t)}catch{return null}if(f.protocol!=="http:"&&f.protocol!=="https:")return null;o=t.startsWith("//")?`//${f.host}`:f.origin,r=f.pathname}else r=t.split(/[?#]/)[0]??"";let i=r.split("/"),s=i.map(pn),a=s.findIndex((f)=>Ke.test(f)),u=(a>=0?i.slice(0,a+1):i).map((f,d)=>{let c=s[d]??f;if(d===a)return hn(c);return q(c)||Xe(f)?ae:f}).join("/");return v(`${o}${u}`,mn)}var bn=1,En=5000,gn=64,Tn=500,xn=new Set(["script","style","noscript","template","link","meta","base","head","object","embed"]),An=new Set(["textarea"]),yn=new Set(["id","class","role","name","type","for","title","alt","placeholder","label","autocomplete","tabindex","disabled","readonly","hidden","inert","contenteditable","list","multiple","size","scope","slot","part","lang","dir","data-testid","data-test","data-test-id","data-qa","data-cy","data-automation-id",...H]),Sn=new Set(["aria-valuenow","aria-valuetext","aria-checked","aria-selected","aria-pressed"]),Mn=new Set(["button","submit","reset"]),Rn=/^[a-z][a-z0-9-]{0,63}$/;var kn=/^[a-z][a-z0-9_:.-]{0,127}$/;function je(e){let t=e.getAttribute("contenteditable");return t!==null&&t.trim().toLowerCase()!=="false"}function Ge(e){for(let t=x(e);t;t=x(t))if(t.localName==="textarea"||je(t))return!0;return!1}function Nn(e){if(!e.parentElement?.shadowRoot)return!1;let t=I(e);return t!==null&&(y(t)||Ge(t))}function Z(e){return v(le(e),Tn)}var Cn=new Set(["alt","label","title","placeholder","value","aria-label","aria-description","aria-roledescription","aria-placeholder"]),wn=new Set(["aria-hidden","aria-disabled","aria-expanded","aria-haspopup","aria-controls","aria-owns","aria-labelledby","aria-describedby","aria-level","aria-current","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-readonly","aria-required","aria-invalid","aria-busy","aria-live","aria-atomic","aria-posinset","aria-setsize","aria-colcount","aria-colindex","aria-colspan","aria-rowcount","aria-rowindex","aria-rowspan","aria-sort"]);function _n(e,t){let n={},o=e.localName;for(let r of Array.from(e.attributes)){let i=r.name.toLowerCase();if(i.startsWith("on")||!kn.test(i))continue;if(t&&(Cn.has(i)||i==="href"||i.startsWith("aria-")&&!wn.has(i)))continue;if(yn.has(i)||i.startsWith("aria-")&&!Sn.has(i))n[i]=Z(r.value);else if(i==="href"&&(o==="a"||o==="area")){let s=ce(r.value);if(s!==null)n[i]=s}else if(i==="value"&&o==="input"&&Mn.has((e.getAttribute("type")??"").toLowerCase()))n[i]=Z(r.value)}return Object.keys(n).length>0?n:void 0}function vn(e,t){let n=t?.rectOf?.(e)??e.getBoundingClientRect(),o=[Math.round(n.x),Math.round(n.y),Math.round(n.width),Math.round(n.height)];return o[2]>0||o[3]>0?o:void 0}function ze(e,t,n,o,r){let i=[];for(let s of Array.from(e.childNodes)){if(t.count>=t.max){t.truncated=!0;break}if(s.nodeType===3){if(!o||Nn(s))continue;let a=s.textContent??"";if(a.length===0)continue;let l=a.trim()===""?" ":Z(a);t.count+=1,i.push(l)}else if(s.nodeType===1){let a=Y(s,t,n+1,o,r);if(a)i.push(a)}}return i}function Y(e,t,n,o,r){let i=e.localName.toLowerCase();if(xn.has(i)||!Rn.test(i))return null;if(n>gn)return t.truncated=!0,null;t.count+=1;let s={t:i},a=Ge(e),l=r||a||k(e),u=_n(e,l);if(u)s.a=u;if(N(e,t.probe)){let h=vn(e,t.probe);if(h)s.r=h}else s.h=1;let f=y(e),d=o&&!a&&!f&&!An.has(i)&&!je(e),c=l||!d;if(i==="svg"){let h=Array.from(e.children).find((g)=>g.localName==="title"),b=h?Y(h,t,n+1,d,c):null;if(b)s.c=[b];return s}if(i==="iframe"||i==="frame"){let h=null;try{h=e.contentDocument}catch{h=null}let b=h?.documentElement;if(b){let g=Y(b,t,n+1,d,c);if(g)s.f=g}return s}let p=ze(e,t,n,d,c);if(p.length>0)s.c=p;let m=e.shadowRoot;if(m){let h=ze(m,t,n,d,c);if(h.length>0)s.s=h}return s}function Dn(e){let t=e.querySelector("title");if(t&&k(t))return"";return Z(e.title??"")}function $e(e,t={}){let n={count:0,max:Math.max(1,t.maxNodes??En),truncated:!1,probe:t},o=Y(e.documentElement,n,0,!0,!1)??{t:"html"},r=e.defaultView;return{snapshotVersion:bn,url:ce(e.URL)??"",title:Dn(e),viewport:{width:Math.round(r?.innerWidth??0),height:Math.round(r?.innerHeight??0)},root:o,nodeCount:n.count,truncated:n.truncated}}var de=65536,On=65536,Ze=new Set(["getText","getValue","getAttribute","exists"]),Ye=new Set(["click","doubleClick","hover","check"]);function In(e){return e.ownerDocument.defaultView}var Ln={left:0,middle:1,right:2},Wn={left:1,middle:4,right:2};function fe(e,t,n){let o=e.getBoundingClientRect();return{bubbles:!0,cancelable:!0,composed:!0,view:t,button:Ln[n],buttons:0,clientX:o.x+o.width/2,clientY:o.y+o.height/2,pointerId:1,pointerType:"mouse",isPrimary:!0}}function Je(e,t,n){let o=typeof t.PointerEvent==="function"?t.PointerEvent:t.MouseEvent,r=[];for(let s=e;s;s=K(s))r.unshift(s);let i={...n,bubbles:!1};e.dispatchEvent(new o("pointerover",n));for(let s of r)s.dispatchEvent(new o("pointerenter",i));e.dispatchEvent(new t.MouseEvent("mouseover",n));for(let s of r)s.dispatchEvent(new t.MouseEvent("mouseenter",i))}var Un='a[href], area[href], button, input, select, textarea, iframe, summary, [tabindex], [contenteditable]:not([contenteditable="false"])';function Pn(e,t){for(let o=e;o;o=K(o))if(o.matches(Un)&&C(o)&&o instanceof t.HTMLElement){o.focus();return}let n=e.ownerDocument.activeElement;if(n instanceof t.HTMLElement&&n!==e.ownerDocument.body)n.blur()}function Hn(e,t,n,o,r){let i=typeof t.PointerEvent==="function"?t.PointerEvent:t.MouseEvent,s={...n,buttons:Wn[o],detail:r},a={...n,detail:r};Je(e,t,n);let l=e.dispatchEvent(new i("pointerdown",s));if(l&&e.dispatchEvent(new t.MouseEvent("mousedown",s)))Pn(e,t);if(e.dispatchEvent(new i("pointerup",a)),l)e.dispatchEvent(new t.MouseEvent("mouseup",a))}function P(e,t,n,o=1){let r=fe(e,t,n);Hn(e,t,r,n,o);let i=n==="left"?"click":n==="right"?"contextmenu":"auxclick";e.dispatchEvent(new t.MouseEvent(i,{...r,detail:o}))}function Qe(e,t){if(e instanceof t.HTMLTextAreaElement)return!0;if(!(e instanceof t.HTMLInputElement))return!1;return!["button","submit","reset","image","checkbox","radio","file","range","color","hidden"].includes(e.type)}function Vn(e,t,n){let o=e instanceof t.HTMLTextAreaElement?t.HTMLTextAreaElement.prototype:t.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(o,"value")?.set;if(r)r.call(e,n);else e.value=n;e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),e.dispatchEvent(new t.Event("change",{bubbles:!0}))}function Bn(e,t){if(!(e instanceof t.HTMLElement))return!1;if(e.isContentEditable)return!0;let n=e.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return n===""||n==="true"||n==="plaintext-only"}function qe(e,t,n,o){if(n.length>On)return{ok:!1,problem:"INVALID_ACTION"};if(Qe(e,t)){if(e.readOnly)return{ok:!1,problem:"NOT_EDITABLE"};return e.focus(),Vn(e,t,o?`${e.value}${n}`:n),{ok:!0}}if(Bn(e,t))return e.focus(),e.textContent=o?`${e.textContent??""}${n}`:n,e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),{ok:!0};return{ok:!1,problem:"NOT_EDITABLE"}}function Fn(e){let t=e.getAttribute("label");return t!==null&&t.trim()!==""?t:e.textContent??""}function Xn(e,t,n){if(!(e instanceof t.HTMLSelectElement))return{ok:!1,problem:"NOT_SELECTABLE"};let o=Array.from(e.options),r=n.value!==void 0?o.find((i)=>i.value===n.value):n.label!==void 0?o.find((i)=>V(Fn(i),n.label)):n.index!==void 0?o[n.index]:void 0;if(!r||r.disabled||r.closest("optgroup")?.hasAttribute("disabled"))return{ok:!1,problem:"OPTION_NOT_FOUND"};return e.focus(),r.selected=!0,e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),e.dispatchEvent(new t.Event("change",{bubbles:!0})),{ok:!0}}function Kn(e,t,n){if(e instanceof t.HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")){if(e.checked!==n){if(e.type==="radio"&&!n)return{ok:!1,problem:"NOT_CHECKABLE"};P(e,t,"left")}return e.checked===n?{ok:!0}:{ok:!1,problem:"STATE_NOT_CHANGED"}}let o=e.getAttribute("role");if(o==="checkbox"||o==="switch"||o==="radio"||o==="menuitemcheckbox"){let r=()=>e.getAttribute("aria-checked")==="true";if(r()!==n)P(e,t,"left");return r()===n?{ok:!0}:{ok:!1,problem:"STATE_NOT_CHANGED"}}return{ok:!1,problem:"NOT_CHECKABLE"}}var zn=/^(?:[\s\S]|[A-Z][A-Za-z0-9]{1,23})$/u;function jn(e,t){if(e instanceof t.HTMLButtonElement)return!0;if(e instanceof t.HTMLInputElement)return["submit","button","reset","image"].includes(e.type);let n=e.localName;return n==="a"&&e.hasAttribute("href")||n==="summary"}function Gn(e,t){if(e instanceof t.HTMLButtonElement)return!0;if(e instanceof t.HTMLInputElement)return["submit","button","reset","image","checkbox","radio"].includes(e.type);return e.localName==="summary"}function me(e,t){e.dispatchEvent(new t.MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0,view:t,detail:0}))}function $n(e,t,n){if(!zn.test(n))return{ok:!1,problem:"INVALID_ACTION"};let o=n==="Space"?" ":n;if(e instanceof t.HTMLElement)e.focus();let r={key:o,bubbles:!0,cancelable:!0,composed:!0},i=e.dispatchEvent(new t.KeyboardEvent("keydown",r));if(o==="Enter"&&i){if(jn(e,t))me(e,t);else if(e instanceof t.HTMLInputElement&&Qe(e,t)&&e.form)Yn(e.form,t)}let s=e.dispatchEvent(new t.KeyboardEvent("keyup",r));if(o===" "&&i&&s&&Gn(e,t))me(e,t);return{ok:!0}}var qn=new Set(["submit","image"]),Zn=new Set(["text","search","url","tel","email","password","date","month","week","time","datetime-local","number"]);function Yn(e,t){let n=Array.from(e.elements),o=e.getRootNode(),r=Array.from(o.querySelectorAll("button, input")).find((s)=>(s instanceof t.HTMLButtonElement&&s.type==="submit"||s instanceof t.HTMLInputElement&&qn.has(s.type))&&s.form===e);if(r){if(C(r))me(r,t);return}if(n.filter((s)=>s instanceof t.HTMLInputElement&&Zn.has(s.type)).length===1)e.requestSubmit()}function Jn(e,t){if(e instanceof t.HTMLInputElement&&(e.type==="checkbox"||e.type==="radio"))return e.checked;if(e instanceof t.HTMLInputElement||e instanceof t.HTMLTextAreaElement||e instanceof t.HTMLSelectElement)return e.value.slice(0,de);let n=e.getAttribute("aria-checked");if(n==="true"||n==="false")return n==="true";return e.getAttribute("aria-valuenow")??e.getAttribute("aria-valuetext")}var Qn=/^[A-Za-z_][\w:.-]{0,127}$/;function et(e,t){let n=In(e);if(!n)return{ok:!1,problem:"INVALID_ACTION"};switch(t.kind){case"click":return P(e,n,t.button??"left"),{ok:!0};case"doubleClick":return P(e,n,"left",1),P(e,n,"left",2),e.dispatchEvent(new n.MouseEvent("dblclick",{...fe(e,n,"left"),detail:2})),{ok:!0};case"hover":{let o=fe(e,n,"left"),r=typeof n.PointerEvent==="function"?n.PointerEvent:n.MouseEvent;return Je(e,n,o),e.dispatchEvent(new r("pointermove",o)),e.dispatchEvent(new n.MouseEvent("mousemove",o)),{ok:!0}}case"focus":if(e instanceof n.HTMLElement)e.focus();return{ok:!0};case"type":return typeof t.text==="string"?qe(e,n,t.text,t.append===!0):{ok:!1,problem:"INVALID_ACTION"};case"clear":return qe(e,n,"",!1);case"select":return Xn(e,n,t);case"check":return Kn(e,n,t.checked===!0);case"pressKey":return typeof t.key==="string"?$n(e,n,t.key):{ok:!1,problem:"INVALID_ACTION"};case"scroll":return e.scrollBy?.({left:Number(t.dx??0)||0,top:Number(t.dy??0)||0}),{ok:!0};case"scrollIntoView":return e.scrollIntoView?.({block:"center",inline:"nearest"}),{ok:!0};case"getText":if(y(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:D(e).slice(0,de)};case"getValue":if(y(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:Jn(e,n)};case"getAttribute":{if(typeof t.name!=="string"||!Qn.test(t.name))return{ok:!1,problem:"INVALID_ACTION"};let o=t.name.toLowerCase();if(y(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:e.getAttribute(o)?.slice(0,de)??null}}case"exists":return{ok:!0,value:!0};default:return{ok:!1,problem:"INVALID_ACTION"}}}var nt=1,tt="__burdenoffUiRuntime",eo=60000,to="fg-ui-highlight",no=new Set(["role","css","testId","xpath","fuzzy","anchor","text"]);function pe(e){if(!e||typeof e!=="object")return!1;let t=e;if(!Array.isArray(t.methods)||t.methods.length===0||t.methods.length>8)return!1;if(t.frame!==void 0&&!(Array.isArray(t.frame)&&t.frame.every((n)=>typeof n==="string")))return!1;return t.methods.every((n)=>!!n&&typeof n==="object"&&no.has(String(n.kind)))}function he(){return{status:"failed",code:"ELEMENT_NOT_FOUND",candidates:[],candidateCount:0,attempts:[]}}function be(e){return{status:e.status,method:e.method,methodIndex:e.methodIndex,fallback:e.fallback,candidate:e.candidate,attempts:e.attempts}}function oo(e){try{return e.defaultView?.frameElement??null}catch{return null}}function ro(e,t,n,o){let r=e.getRootNode();if(typeof r.elementFromPoint!=="function")return null;let i=r.elementFromPoint(t,n);if(!i)return"offscreen";if(i===e||e.contains(i))return null;return o.some((s)=>s.contains(i))?null:"covered"}function io(e,t){let n=t.x+t.width/2,o=t.y+t.height/2,r=Array.from(e.labels??[]),i=e;for(let s=0;s<32;s+=1){let a=ro(i,n,o,s===0?r:[]);if(a)return a;let l=i.getRootNode();if(l&&"host"in l){i=l.host;continue}let u=oo(i.ownerDocument);if(!u)return null;let f=u.getBoundingClientRect();n+=f.x+u.clientLeft,o+=f.y+u.clientTop,i=u}return null}function so(e,t){let n=e.ownerDocument.defaultView;if(!n)return!1;let o=t.x+t.width/2,r=t.y+t.height/2;return o<0||r<0||o>=n.innerWidth||r>=n.innerHeight}function ao(e){let t=e.ownerDocument.defaultView;if(t&&t.getComputedStyle(e).pointerEvents==="none")return"noPointerEvents";let n=e.getBoundingClientRect();if(n.width<=0||n.height<=0)return null;if(so(e,n)&&typeof e.scrollIntoView==="function")e.scrollIntoView({block:"center",inline:"center"}),n=e.getBoundingClientRect();return io(e,n)}function lo(e,t={}){let n=t.root??e,o={...t.rectOf?{rectOf:t.rectOf}:{},...t.isVisible?{isVisible:t.isVisible}:{}},r=null,i=null,s=()=>{if(i!==null)clearTimeout(i),i=null;r?.remove(),r=null},a=(c,p)=>(s(),Be(n,c,{...o,...p?{state:p}:{}})),l=(c,p={})=>{if(!pe(c))return he();let m=a(c,p.state);return m.status==="found"?be(m):m},u=(c,p,m={})=>{if(!p||typeof p!=="object"||typeof p.kind!=="string")return{ok:!1,code:"INVALID_ACTION"};if(!pe(c))return{ok:!1,code:"ELEMENT_NOT_FOUND",resolution:he()};let h=m.state??(Ze.has(p.kind)?"visible":"interactable"),b=a(c,h);if(b.status!=="found"){if(p.kind==="exists"&&b.code==="ELEMENT_NOT_FOUND")return{ok:!0,value:!1,resolution:b};return{ok:!1,code:b.code,resolution:b}}let g=be(b),_=Ye.has(p.kind)?ao(b.element):null;if(_)return{ok:!1,code:"ELEMENT_NOT_INTERACTABLE",reason:_,resolution:{status:"failed",code:"ELEMENT_NOT_INTERACTABLE",candidates:[b.candidate],candidateCount:1,attempts:b.attempts}};let S=et(b.element,p);if(!S.ok)return{ok:!1,code:S.problem,resolution:g};return S.value===void 0?{ok:!0,resolution:g}:{ok:!0,resolution:g,value:S.value}},f=(c,p,m)=>{let h=e.createElement(to);h.setAttribute("aria-hidden","true"),h.setAttribute("style","all: initial; position: fixed; inset: 0; pointer-events: none; z-index: 2147483647;");let b=h.attachShadow({mode:"closed"});c.forEach((g,_)=>{let S=e.createElement("div");S.setAttribute("style",`position: fixed; left: ${g.bounds.x-3}px; top: ${g.bounds.y-3}px; width: ${g.bounds.width+6}px; height: ${g.bounds.height+6}px; outline: 3px solid Highlight; border-radius: 4px; box-sizing: border-box;`);let Ee=m?`${_+1}${p?` ${p}`:""}`:p;if(Ee){let J=e.createElement("span");J.textContent=Ee.slice(0,120),J.setAttribute("style","position: absolute; left: 0; top: 100%; margin-top: 4px; padding: 2px 6px; font: 600 11px system-ui, sans-serif; background: Highlight; color: HighlightText; border-radius: 3px; white-space: nowrap;"),S.appendChild(J)}b.appendChild(S)}),e.documentElement.appendChild(h),r=h};return{version:nt,resolve:l,act:u,highlight:(c,p={})=>{if(!pe(c))return he();let m=a(c,p.state??"visible");if(m.status==="found")f([m.candidate],p.label,!1);else if(m.candidates.length>0)f(m.candidates,p.label,!0);let h=Math.min(eo,Math.max(0,Number(p.durationMs??0)||0));if(r&&h>0)i=setTimeout(s,h);return m.status==="found"?be(m):m},clearHighlight:s,snapshot:(c={})=>(s(),$e(e,{...o,...c.maxNodes?{maxNodes:c.maxNodes}:{}}))}}function ot(e,t){let n=Reflect.get(e,tt);if(n&&typeof n==="object"&&typeof n.version==="number"&&n.version>=nt)return n;let o=Object.freeze(lo(t));return Object.defineProperty(e,tt,{value:o,configurable:!0,enumerable:!1,writable:!1}),o}ot(globalThis,globalThis.document);})();
@@ -6,14 +6,14 @@ import {
6
6
  isRuntimeTarget2,
7
7
  createDomRuntime2,
8
8
  installDomRuntime2
9
- } from "./index-zagmp5ya.js";
9
+ } from "./index-n3nfhjrj.js";
10
10
  import {
11
11
  MAX_READ_TEXT2,
12
12
  MAX_TYPED_TEXT2,
13
13
  READ_ACTIONS2,
14
14
  POINTER_ACTIONS2,
15
15
  performDomAction2
16
- } from "./index-vnv9tp11.js";
16
+ } from "./index-e7pgqd60.js";
17
17
  export {
18
18
  DOM_RUNTIME_GLOBAL2 as DOM_RUNTIME_GLOBAL,
19
19
  DOM_RUNTIME_VERSION2 as DOM_RUNTIME_VERSION,
@@ -0,0 +1,40 @@
1
+ /**
2
+ * What the desk driver runs on: a desk that takes desk contract v3 actions
3
+ * (RPA plan package P2-03b; desk contract v3 sections 5 to 7).
4
+ *
5
+ * Inside the desk meta plugin's `run` entry (P2-04a) every action of a script
6
+ * goes through the SDK's per-action guard (`DeskRunContext.act`: fence, kill
7
+ * switch, consent, shell rule, timeout). `deskBackendFromAct` wraps exactly
8
+ * that one function, so the driver never reaches a provider around the guard.
9
+ */
10
+ import type { DeskCapabilitiesLike } from '../script/desktop-capabilities.js';
11
+ import type { DeskWireAction, DeskWireGetWhat, DeskWireResult, DeskWireSnapshotOptions, DeskWireTarget } from './desk-wire.js';
12
+ /** Where a desk call comes from: the script step, and the run's cancel signal. */
13
+ export interface DeskCallContext {
14
+ /** The script step the action belongs to (the guard reports it, and secret references are bound to it). */
15
+ stepId: string;
16
+ /** Aborted when the run is cancelled. */
17
+ signal?: AbortSignal;
18
+ /** The action's own timeout, when the step sets one. */
19
+ timeoutMs?: number;
20
+ }
21
+ /** A desk as the desk driver uses it. */
22
+ export interface DeskBackend {
23
+ /** The desk's capabilities: actions, target kinds, selector platforms, schema hashes, `allowShell`. */
24
+ capabilities(): DeskCapabilitiesLike;
25
+ /** Run one action. Refusals come back as `{ ok: false, error }`, never as a throw. */
26
+ act(action: DeskWireAction, context: DeskCallContext): Promise<DeskWireResult>;
27
+ /** `find`: every element a target matches, up to `max` (1 to 50). Never acts. */
28
+ find(target: DeskWireTarget, context: DeskCallContext, max?: number): Promise<DeskWireResult>;
29
+ /** `snapshot` with options: the `desk-tree-v1` tree. */
30
+ snapshot(options: DeskWireSnapshotOptions, context: DeskCallContext): Promise<DeskWireResult>;
31
+ /** `get`: read one element's text, value, name, state, bounds or attributes. */
32
+ get(target: DeskWireTarget, what: DeskWireGetWhat, context: DeskCallContext, attributes?: readonly string[]): Promise<DeskWireResult>;
33
+ }
34
+ export interface DeskBackendFromActOptions {
35
+ capabilities: () => DeskCapabilitiesLike;
36
+ /** One guarded desk action, such as the SDK's `DeskRunContext.act` with the step id and timeout. */
37
+ act: (action: DeskWireAction, context: DeskCallContext) => Promise<DeskWireResult>;
38
+ }
39
+ /** A backend whose `find`, `snapshot` and `get` are built on its one `act`. */
40
+ export declare function deskBackendFromAct(options: DeskBackendFromActOptions): DeskBackend;
@@ -0,0 +1,41 @@
1
+ import { type UiClock, type UiDeskDriver, type UiStepContext } from '../interpret/driver.js';
2
+ import type { DesktopUiTarget, DesktopUiTargetMethod } from '../script/desktop-types.js';
3
+ import type { DeskBackend } from './desk-backend.js';
4
+ import { type DeskWireMatch, type DeskWireTarget } from './desk-wire.js';
5
+ /** Elements one `find` asks for: enough to list `MAX_CANDIDATES` and prove there are more than one. */
6
+ export declare const DESK_FIND_MAX = 10;
7
+ /** Elements a read of every match takes (`find` returns at most 50). */
8
+ export declare const DESK_FIND_ALL_MAX = 50;
9
+ /** Tree nodes a snapshot for the engine's own methods asks for (the contract default). */
10
+ export declare const DEFAULT_DESK_SNAPSHOT_NODES = 2000;
11
+ export interface CreateDeskDriverOptions {
12
+ /** Absent means real time. */
13
+ clock?: UiClock;
14
+ /**
15
+ * Stores a screenshot the desk took (already masked on the machine) and
16
+ * returns a reference for the step event, or null. Absent: screenshot steps
17
+ * return null and failure screenshots are not taken.
18
+ */
19
+ storeScreenshot?: (png: Uint8Array, context: UiStepContext) => Promise<string | null>;
20
+ /**
21
+ * The one-time secret reference for a step's `typeSecret` (desk contract v3
22
+ * section 7.4: `DeskRunContext.secretRef`). Absent: the step's own
23
+ * `secretRef` is sent. A step it has no reference for fails with
24
+ * `SECRET_UNAVAILABLE`.
25
+ */
26
+ secretRefFor?: (stepId: string) => string | undefined;
27
+ /** Tree nodes asked for when the engine resolves a role, fuzzy or anchor method (default 2,000). */
28
+ maxSnapshotNodes?: number;
29
+ }
30
+ /** The desk target one method becomes, or undefined when the desk does not resolve it. */
31
+ export declare function deskTargetOfMethod(method: DesktopUiTargetMethod, target: DesktopUiTarget): DeskWireTarget | undefined;
32
+ /**
33
+ * Whether a desk element is a password or code field whose text, value or
34
+ * attributes the engine never reads (the web runtime's `SENSITIVE_ELEMENT`
35
+ * rule). Desks already never return a password field's value (desk contract
36
+ * v3 section 5.1); this is the engine's own check on top: a secure text role,
37
+ * or an editable field whose name reads like a secret.
38
+ */
39
+ export declare function isSensitiveDeskMatch(match: Pick<DeskWireMatch, 'role' | 'name'>): boolean;
40
+ /** Create a desk driver over a backend. */
41
+ export declare function createDeskDriver(backend: DeskBackend, options?: CreateDeskDriverOptions): UiDeskDriver;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Desk error codes as engine error codes (desk contract v3 section 11;
3
+ * document 05 section 10; RPA plan package P2-03b).
4
+ *
5
+ * The desk speaks its own vocabulary (`TARGET_NOT_FOUND`, `DESK_UNAVAILABLE`,
6
+ * ...); a run's step events and node failures speak the engine's. The desk
7
+ * code is kept in `detail.deskCode`, so nothing is lost. Codes with no engine
8
+ * counterpart of their own map to the nearest engine code of the same
9
+ * family: a refusal that means "this desk cannot be used now" (a stale fence,
10
+ * a takeover, the kill switch, missing consent, an offline provider) is
11
+ * `DESK_UNAVAILABLE` (DISPATCH_FAILED); a path outside the workspace folder is
12
+ * `ACTION_FAILED` with `detail.problem = 'OUTSIDE_WORKSPACE_FOLDER'`.
13
+ */
14
+ import type { UiErrorCode } from '../interpret/errors.js';
15
+ import type { DeskWireError } from './desk-wire.js';
16
+ /** The engine code for a desk error code. `TARGET_NOT_FOUND` depends on `detail.matches`. */
17
+ export declare function engineCodeOfDeskError(error: DeskWireError): UiErrorCode;
18
+ /** The engine detail of a desk error: the desk code, and the few detail fields that are safe to report. */
19
+ export declare function engineDetailOfDeskError(error: DeskWireError): Record<string, unknown>;
@@ -0,0 +1,28 @@
1
+ import type { WebElementState, WebRect } from '../target/types.js';
2
+ import type { UiAnchorMethod, UiFuzzyMethod, UiRoleMethod } from '../script/types.js';
3
+ import type { DeskWireBounds, DeskWireTreeNode, DeskWireTreeSnapshot } from './desk-wire.js';
4
+ /** The methods the engine resolves on a desk tree. */
5
+ export type DeskTreeMethod = UiRoleMethod | UiFuzzyMethod | UiAnchorMethod;
6
+ /** What a method found on the tree, before the state filter picks one. */
7
+ export type DeskTreePick = {
8
+ outcome: 'found';
9
+ node: DeskWireTreeNode;
10
+ matches: number;
11
+ } | {
12
+ outcome: 'ambiguous';
13
+ nodes: DeskWireTreeNode[];
14
+ matches: number;
15
+ } | {
16
+ outcome: 'none';
17
+ matches: 0;
18
+ } | {
19
+ outcome: 'notInteractable';
20
+ nodes: DeskWireTreeNode[];
21
+ matches: 0;
22
+ };
23
+ /** Screen bounds as the web resolver measures them. */
24
+ export declare function webRectOf(bounds: DeskWireBounds): WebRect;
25
+ /** Whether a node is in the state a step needs: `interactable` is visible and enabled, `visible` is visible. */
26
+ export declare function deskNodeInState(node: Pick<DeskWireTreeNode, 'visible' | 'enabled'>, state: WebElementState): boolean;
27
+ /** Resolve one engine method on a desk tree snapshot, in the state the step needs. */
28
+ export declare function matchDeskTreeMethod(method: DeskTreeMethod, snapshot: DeskWireTreeSnapshot, state: WebElementState): DeskTreePick;
@@ -0,0 +1,237 @@
1
+ /**
2
+ * The desk contract v3 shapes the desk driver sends and reads (fluidgrids-specs
3
+ * `contracts/desk-contract-v3.md` sections 4, 5 and 11; RPA plan package
4
+ * P2-03b).
5
+ *
6
+ * These are structural copies of the types in `@vibecontrols/plugin-sdk/desk-types`,
7
+ * kept here so the engine has no run-time dependency on the SDK and stays
8
+ * browser safe. A test (`tests/drivers/desk-parts.test.ts`) checks that the
9
+ * SDK's `DeskAction`, `DeskActResult` and `DeskCapabilities` fit them, so the
10
+ * desk meta plugin can pass its guarded `act` to the driver unchanged.
11
+ */
12
+ import type { DeskSelectorPlatformName } from '../script/desktop-capabilities.js';
13
+ /** Screen pixels, per-monitor aware. */
14
+ export interface DeskWireBounds {
15
+ x: number;
16
+ y: number;
17
+ w: number;
18
+ h: number;
19
+ }
20
+ /** One node of a selector path (contract section 4). */
21
+ export interface DeskWireSelectorNode {
22
+ role: string;
23
+ name?: string;
24
+ automationId?: string;
25
+ className?: string;
26
+ index?: number;
27
+ /** css only: the CSS selector for the final node. */
28
+ css?: string;
29
+ }
30
+ /** A strict selector the desk resolves itself, scoped to the window first. */
31
+ export interface DeskWireSelectorTarget {
32
+ by: 'selector';
33
+ app?: string;
34
+ window?: {
35
+ title?: string;
36
+ titleMatch?: 'exact' | 'wildcard';
37
+ class?: string;
38
+ processName?: string;
39
+ };
40
+ path: DeskWireSelectorNode[];
41
+ platform: DeskSelectorPlatformName;
42
+ }
43
+ /** Every target kind of desk contract v3. */
44
+ export type DeskWireTarget = {
45
+ by: 'ref';
46
+ ref: string;
47
+ } | {
48
+ by: 'point';
49
+ x: number;
50
+ y: number;
51
+ } | {
52
+ by: 'window';
53
+ app: string;
54
+ title?: string;
55
+ } | DeskWireSelectorTarget | {
56
+ by: 'image';
57
+ pngBase64: string;
58
+ threshold?: number;
59
+ region?: DeskWireBounds;
60
+ recordedScale?: number;
61
+ } | {
62
+ by: 'text';
63
+ text: string;
64
+ match?: 'exact' | 'contains';
65
+ occurrence?: number;
66
+ source?: 'accessibility' | 'ocr';
67
+ region?: DeskWireBounds;
68
+ };
69
+ /** What a `get` reads. */
70
+ export type DeskWireGetWhat = 'text' | 'value' | 'name' | 'state' | 'bounds' | 'attributes';
71
+ /** The `snapshot` options that switch the result to `desk-tree-v1` (contract section 5.2). */
72
+ export interface DeskWireSnapshotOptions {
73
+ scope?: {
74
+ app?: string;
75
+ title?: string;
76
+ } | {
77
+ target: DeskWireTarget;
78
+ };
79
+ depth?: number;
80
+ attributes?: string[];
81
+ maxNodes?: number;
82
+ }
83
+ /** The actions the desk driver sends: every desk contract v3 action. */
84
+ export type DeskWireAction = {
85
+ type: 'screenshot';
86
+ } | ({
87
+ type: 'snapshot';
88
+ } & DeskWireSnapshotOptions) | {
89
+ type: 'click';
90
+ target: DeskWireTarget;
91
+ button?: 'left' | 'right';
92
+ count?: 1 | 2;
93
+ } | {
94
+ type: 'type';
95
+ target?: DeskWireTarget;
96
+ text: string;
97
+ } | {
98
+ type: 'secret_fill';
99
+ target: DeskWireTarget;
100
+ secretRef: string;
101
+ expectedOrigin: string;
102
+ } | {
103
+ type: 'key';
104
+ keys: string[];
105
+ } | {
106
+ type: 'scroll';
107
+ target?: DeskWireTarget;
108
+ dx: number;
109
+ dy: number;
110
+ } | {
111
+ type: 'navigate';
112
+ url: string;
113
+ } | {
114
+ type: 'focus_window';
115
+ app: string;
116
+ title?: string;
117
+ } | {
118
+ type: 'shell';
119
+ command: string;
120
+ cwd?: string;
121
+ timeoutMs: number;
122
+ } | {
123
+ type: 'read_file';
124
+ path: string;
125
+ maxBytes: number;
126
+ } | {
127
+ type: 'write_file';
128
+ path: string;
129
+ content: string;
130
+ } | {
131
+ type: 'find';
132
+ target: DeskWireTarget;
133
+ max?: number;
134
+ } | {
135
+ type: 'get';
136
+ target: DeskWireTarget;
137
+ what: DeskWireGetWhat;
138
+ attributes?: string[];
139
+ } | {
140
+ type: 'invoke';
141
+ target: DeskWireTarget;
142
+ } | {
143
+ type: 'set_value';
144
+ target: DeskWireTarget;
145
+ value: string;
146
+ } | {
147
+ type: 'toggle';
148
+ target: DeskWireTarget;
149
+ state?: 'on' | 'off';
150
+ } | {
151
+ type: 'select';
152
+ target: DeskWireTarget;
153
+ item?: string;
154
+ } | {
155
+ type: 'expand';
156
+ target: DeskWireTarget;
157
+ state?: 'expanded' | 'collapsed';
158
+ } | {
159
+ type: 'list_windows';
160
+ app?: string;
161
+ } | {
162
+ type: 'open_app';
163
+ app: string;
164
+ args?: string[];
165
+ waitForTitle?: string;
166
+ } | {
167
+ type: 'close_app';
168
+ app: string;
169
+ title?: string;
170
+ } | {
171
+ type: 'window_state';
172
+ app: string;
173
+ title?: string;
174
+ state: 'normal' | 'minimized' | 'maximized';
175
+ } | {
176
+ type: 'highlight';
177
+ target: DeskWireTarget;
178
+ durationMs?: number;
179
+ };
180
+ export type DeskWireActionType = DeskWireAction['type'];
181
+ /** One element a desk found (contract section 5.1). */
182
+ export interface DeskWireMatch {
183
+ ref: string;
184
+ role: string;
185
+ name?: string;
186
+ automationId?: string;
187
+ className?: string;
188
+ value?: string;
189
+ enabled: boolean;
190
+ visible: boolean;
191
+ bounds: DeskWireBounds;
192
+ selector?: DeskWireSelectorTarget;
193
+ }
194
+ /** One node of a `desk-tree-v1` snapshot. */
195
+ export interface DeskWireTreeNode extends DeskWireMatch {
196
+ depth: number;
197
+ parentRef?: string;
198
+ }
199
+ /** An open window. */
200
+ export interface DeskWireWindow {
201
+ app: string;
202
+ title: string;
203
+ processName?: string;
204
+ pid?: number;
205
+ bounds: DeskWireBounds;
206
+ state: 'normal' | 'minimized' | 'maximized';
207
+ focused: boolean;
208
+ }
209
+ /** The `snapshot` result for a request with any option. */
210
+ export interface DeskWireTreeSnapshot {
211
+ format: 'desk-tree-v1';
212
+ nodes: DeskWireTreeNode[];
213
+ truncated: boolean;
214
+ window?: DeskWireWindow;
215
+ }
216
+ /** A desk refusal or failure. `code` is a desk error code (contract section 11). */
217
+ export interface DeskWireError {
218
+ code: string;
219
+ message: string;
220
+ detail?: Record<string, unknown>;
221
+ }
222
+ /** What `get` returns. */
223
+ export type DeskWireGetValue = string | boolean | number | DeskWireBounds | Record<string, string> | null;
224
+ /** The result of one desk action (the SDK's `DeskActResult`). */
225
+ export interface DeskWireResult {
226
+ ok: boolean;
227
+ screenshotPng?: Uint8Array;
228
+ snapshot?: unknown;
229
+ text?: string;
230
+ error?: DeskWireError;
231
+ matches?: DeskWireMatch[];
232
+ truncated?: boolean;
233
+ value?: DeskWireGetValue;
234
+ windows?: DeskWireWindow[];
235
+ }
236
+ /** Whether a snapshot result is the `desk-tree-v1` format. */
237
+ export declare function isDeskWireTreeSnapshot(value: unknown): value is DeskWireTreeSnapshot;
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * `@burdenoff/ui-engine/drivers`: desk drivers over a DOM (plan P1-02). The
3
3
  * DOM driver runs the P1-01 runtime in the interpreter's own world; the
4
- * snapshot driver replays a script on a stored tree snapshot (P1-05).
4
+ * snapshot driver replays a script on a stored tree snapshot (P1-05). The
5
+ * desk driver for desktop scripts (P2-03b) has no DOM dependency and is
6
+ * published on its own subpath, `@burdenoff/ui-engine/desk`.
5
7
  */
6
8
  export { type CreateDomDriverOptions, DOM_DRIVER_CAPABILITIES, type DomDriverNavigation, createDomDriver, safePageHtml, safePageText, } from './dom-driver.js';
7
9
  export { type CreateSnapshotDriverOptions, type ReplayUiScriptOnSnapshotOptions, SNAPSHOT_DRIVER_CAPABILITIES, type UiReplayStepVerdict, type UiSnapshotReplayResult, createSnapshotDriver, replayUiScriptOnSnapshot, } from './snapshot-driver.js';