@flowriki/agent 0.1.0-beta.3 → 0.1.0-beta.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,11 +25,44 @@ npx @flowriki/agent@latest doctor # diagnose setup problems
25
25
  npx @flowriki/agent@latest disconnect # forget this computer's credential
26
26
  ```
27
27
 
28
- ## Preparing a project
28
+ ## Write tests with Claude
29
29
 
30
- A project runs from a **local checkout** of its repository. A Flowriki
31
- invitation does not give you access to the git repository — clone it the way
32
- you normally would, then:
30
+ The agent is also an MCP server, so Claude Code or Claude Desktop can write
31
+ Flowriki tests for you, on your own Claude plan. Claude drives a browser on
32
+ this computer, each step is performed before it is kept, and what it writes is
33
+ saved to a **new branch** for you to review and publish in the dashboard.
34
+
35
+ Connect this computer first (`connect` above), then add Flowriki to Claude:
36
+
37
+ ```
38
+ claude mcp add flowriki -- npx -y @flowriki/agent@latest mcp
39
+ ```
40
+
41
+ For Claude Desktop, add this to its MCP settings (`claude_desktop_config.json`):
42
+
43
+ ```json
44
+ { "mcpServers": { "flowriki": { "command": "npx", "args": ["-y", "@flowriki/agent@latest", "mcp"] } } }
45
+ ```
46
+
47
+ Then ask, for example: *"Write a Flowriki test that signs up and verifies the
48
+ email"*. Claude reads your project's features, sign-in profiles and helpers,
49
+ and uses them. You do not run `mcp` yourself — Claude starts it. It works
50
+ alongside `start`, in a browser window of its own.
51
+
52
+ ## What you do not need
53
+
54
+ No checkout of Flowriki, and nothing to build. `connect` and `start` are the
55
+ whole installation.
56
+
57
+ For recording, running and debugging from the dashboard you do not need a
58
+ checkout of the project under test either: the service reads the flow from your
59
+ connected repository and sends it with the command, so this machine can be one
60
+ that has never cloned anything.
61
+
62
+ ## Serving a local checkout
63
+
64
+ Optional, and for one case: working against files on this machine rather than
65
+ what is committed.
33
66
 
34
67
  ```
35
68
  npx @flowriki/agent@latest start --project /path/to/checkout
@@ -39,6 +72,10 @@ Repeat `--project` for several. They are remembered, so later runs need no
39
72
  arguments. Each folder identifies itself from the `.flowriki/project.json`
40
73
  committed when its repository was connected — you never pass a project id.
41
74
 
75
+ One dashboard action still needs one: **verifying unsaved steps** from the
76
+ flow editor, which reads the flow from a checkout rather than being sent it. It
77
+ says so plainly when there is none. Recording, running and debugging do not.
78
+
42
79
  ## Where things are kept
43
80
 
44
81
  Credentials and project mappings live outside the npm cache, so upgrading or
@@ -52,7 +89,17 @@ clearing the cache does not lose them:
52
89
 
53
90
  `FLOWRIKI_HOME` overrides it.
54
91
 
55
- ## Self-hosting
92
+ ## Which Flowriki this talks to
93
+
94
+ Production, unless you say otherwise. `--service <url>` (or
95
+ `FLOWRIKI_SERVICE_URL`) points at another one — our own dev and staging
96
+ environments, or a self-hosted install.
97
+
98
+ Credentials are kept **per service**, so a production credential is never sent
99
+ to a development one, and connecting to a second does not disturb the first.
100
+ `doctor` prints which environment answered.
101
+
102
+ This is not the site your tests run against. That is a project setting in the
103
+ dashboard, and changing it never requires connecting this machine again.
56
104
 
57
- `--service <url>` points at another Flowriki. Credentials are kept per service,
58
- so a production credential is never sent to a development one.
105
+ For a terminal where Flowriki should not open the default browser, use `npx @flowriki/agent connect --no-open` and open the printed approval link yourself. Approval is still required.
@@ -0,0 +1 @@
1
+ "use strict";(()=>{function U(e,t,i){function u(n){let o=e.__flAccName;if(o){let l=o(n);return l||t(n.placeholder)||t(n.title)||""}return g(n)}function g(n){let o=n.getAttribute&&n.getAttribute("aria-labelledby");if(o){let b=o.split(/\s+/).map(y=>document.getElementById(y)).filter(Boolean).map(y=>t(y.textContent)).filter(Boolean).join(" ");if(b)return b}let l=t(n.getAttribute&&n.getAttribute("aria-label"));if(l)return l;if(n.id){let b=document.querySelector('label[for="'+CSS.escape(n.id)+'"]');if(b&&t(b.textContent))return t(b.textContent)}let a=n.closest&&n.closest("label");if(a&&t(a.textContent))return t(a.textContent);let s=n.tagName.toLowerCase(),m=(n.type||"").toLowerCase();return(["button","a","summary"].includes(s)||n.getAttribute&&n.getAttribute("role")==="button")&&t(n.textContent)?t(n.textContent):s==="input"&&["submit","button","reset"].includes(m)&&n.value?t(n.value):t(n.placeholder)||t(n.title)||""}let T="input,select,textarea,button,meter,output,progress,[contenteditable]";function h(n){let o=n.parentElement;if(!o||!n.matches?.(T))return"";for(let l of Array.from(o.querySelectorAll("label"))){let a=l.getAttribute("for");if(a&&document.getElementById(a))continue;let s=t(l.textContent);if(s)return s}return""}let L=new WeakMap,H=crypto.randomUUID(),D=0;function R(n){let o=n.getRootNode(),l=E=>o.querySelectorAll(E).length===1,a=[],s=n.getAttribute?.("data-testid");s&&l(`[data-testid=${JSON.stringify(s)}]`)&&a.push({strategy:"testId",value:s});let m=t(n.placeholder);m&&l(`[placeholder=${JSON.stringify(n.placeholder)}]`)&&a.push({strategy:"placeholder",value:m});let b=t(n.getAttribute?.("alt"));b&&l(`[alt=${JSON.stringify(n.getAttribute("alt"))}]`)&&a.push({strategy:"altText",value:b});let y=n.getAttribute?.("title");return y&&l(`[title=${JSON.stringify(y)}]`)&&a.push({strategy:"title",value:t(y)}),n.id&&!/:r|[a-f0-9]{12}|\d{6}/i.test(n.id)&&l(`#${CSS.escape(n.id)}`)&&a.push({strategy:"css",value:`#${CSS.escape(n.id)}`}),a.slice(0,4)}function O(n){let o=L.get(n);o||(o=`${H}:${++D}`,L.set(n,o));let l=R(n),a={__targetId:o,...l.length?{candidates:l}:{}},s=n.getRootNode(),m=u(n);if(m)return{...a,name:m};let b=h(n);if(b)return{...a,name:b,nameFrom:"adjacent-label"};let y=t(Array.from(n.childNodes||[]).filter(I=>I.nodeType===3).map(I=>I.textContent).join(" "));if(y&&y.length<=80)return{...a,name:y,nameFrom:"text"};let E=l[0];return E?{...a,name:"",locator:E.strategy==="placeholder"||E.strategy==="altText"?{strategy:"css",value:`[${E.strategy==="altText"?"alt":"placeholder"}=${JSON.stringify(E.value)}]`}:E}:{...a,name:""}}function $(n){let o=n.getAttribute&&n.getAttribute("role");if(o)return o;let l=n.tagName.toLowerCase(),a=(n.type||"").toLowerCase();return l==="button"?"button":l==="a"&&n.href?"link":l==="select"?n.multiple||n.size>1?"listbox":"combobox":l==="textarea"?"textbox":l==="input"?["submit","button","reset","file"].includes(a)?"button":a==="checkbox"||a==="radio"?a:a==="number"?"spinbutton":a==="search"?"searchbox":a==="range"?"slider":"textbox":n.isContentEditable?"textbox":V[l]??""}let V={li:"listitem",ul:"list",ol:"list",tr:"row",td:"cell",th:"columnheader",table:"table",nav:"navigation",main:"main",header:"banner",footer:"contentinfo",aside:"complementary",form:"form",dialog:"dialog",details:"group",fieldset:"group",img:"img",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading"};function M(n){let o=n,l=null;for(let a=0;o&&a<6&&!(o===document.body||o===document.documentElement);a++){let s="";try{s=getComputedStyle(o).cursor}catch{break}if(s==="pointer")l=o;else if(l)break;o=o.parentElement}return l}let C="tr, [role=row], li, [role=listitem], [role=article], [role=gridcell]";function B(n){try{let o=n.cloneNode(!0);for(let l of Array.from(o.querySelectorAll(i+", input, select, textarea")))l.remove();for(let l of Array.from(o.querySelectorAll("td, th, li, p, div, span, tr")))l.append(" ");return t(o.textContent).slice(0,120)}catch{return""}}function q(n,o,l){if(!l)return!1;let a;try{a=Array.from(document.querySelectorAll(i+", input, select, textarea"))}catch{return!1}if(a.length>400)return!0;let s=0;for(let m of a)if(m!==n&&$(m)===o&&O(m).name===l&&++s>0)return!0;return!1}function N(n,o,l){if(!q(n,o,l))return null;let a=n.closest&&n.closest(C);if(!a)return null;let s=B(a);if(!s)return null;let m=a.getAttribute&&a.getAttribute("role"),b=a.tagName.toLowerCase();return{scope:s,scopeRole:m||(b==="tr"?"row":b==="li"?"listitem":b)}}function r(n){if(!n.closest)return null;let o=n.closest("nav, main, aside, header, footer, [role=navigation], [role=main], [role=complementary], [role=banner], [role=contentinfo], [role=search]");if(!o)return null;let l=o.getAttribute&&o.getAttribute("role");if(l)return{scope:u(o),scopeRole:l};let a=o.tagName.toLowerCase();return a==="nav"?{scope:u(o),scopeRole:"navigation"}:a==="main"?{scope:u(o),scopeRole:"main"}:a==="aside"?{scope:u(o),scopeRole:"complementary"}:o.closest("article, aside, main, nav, section")!==o&&o.closest("article, aside, main, nav, section")!==null?null:a==="header"?{scope:u(o),scopeRole:"banner"}:a==="footer"?{scope:u(o),scopeRole:"contentinfo"}:null}let c=new WeakMap;function f(n,o){n&&o&&Object.keys(o).length&&c.set(n,o)}function w(n,o,l){let a=c.get(n);if(a&&(a.scopeRole||a.nth!==void 0||a.warning))return{scope:a.scope??"",...a.scopeRole?{scopeRole:a.scopeRole}:{},...a.nth===void 0?{}:{nth:a.nth},...a.warning?{warning:a.warning}:{}};let s=N(n,o,l);return s||{scope:S(n)}}function S(n){let o=n.closest&&n.closest("form, fieldset, section, [role=group], [role=region], [role=dialog], [role=alertdialog], dialog");return o?u(o):""}function A(n){if(n.id)return"#"+CSS.escape(n.id);let o=[],l=n;for(;l&&l.nodeType===1&&l!==document.body;){let a=Array.from(l.parentNode?l.parentNode.children:[]).filter(s=>s.tagName===l.tagName);o.unshift(a.length>1?`${l.tagName.toLowerCase()}:nth-of-type(${a.indexOf(l)+1})`:l.tagName.toLowerCase()),l=l.parentElement}return"body > "+o.join(" > ")}return{accName:u,identify:O,roleOf:$,pointerTarget:M,scoping:w,cssPath:A,isAmbiguous:q,landmarkScope:r,remember:f}}var ge=Object.prototype.toString;function Q(e){return typeof e=="function"||ge.call(e)==="[object Function]"}function ye(e){var t=Number(e);return isNaN(t)?0:t===0||!isFinite(t)?t:(t>0?1:-1)*Math.floor(Math.abs(t))}var he=Math.pow(2,53)-1;function ve(e){var t=ye(e);return Math.min(Math.max(t,0),he)}function v(e,t){var i=Array,u=Object(e);if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");if(typeof t<"u"&&!Q(t))throw new TypeError("Array.from: when provided, the second argument must be a function");for(var g=ve(u.length),T=Q(i)?Object(new i(g)):new Array(g),h=0,L;h<g;)L=u[h],t?T[h]=t(L,h):T[h]=L,h+=1;return T.length=g,T}function P(e){"@babel/helpers - typeof";return P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(e)}function we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e,t){for(var i=0;i<t.length;i++){var u=t[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(e,Y(u.key),u)}}function Se(e,t,i){return t&&X(e.prototype,t),i&&X(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ee(e,t,i){return t=Y(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Y(e){var t=xe(e,"string");return P(t)=="symbol"?t:t+""}function xe(e,t){if(P(e)!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var u=i.call(e,t||"default");if(P(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ae=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];we(this,e),Ee(this,"items",void 0),this.items=t}return Se(e,[{key:"add",value:function(i){return this.has(i)===!1&&this.items.push(i),this}},{key:"clear",value:function(){this.items=[]}},{key:"delete",value:function(i){var u=this.items.length;return this.items=this.items.filter(function(g){return g!==i}),u!==this.items.length}},{key:"forEach",value:function(i){var u=this;this.items.forEach(function(g){i(g,g,u)})}},{key:"has",value:function(i){return this.items.indexOf(i)!==-1}},{key:"size",get:function(){return this.items.length}}])})(),Z=typeof Set>"u"?Set:Ae;function p(e){var t;return(t=e.localName)!==null&&t!==void 0?t:e.tagName.toLowerCase()}var Te={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",form:"form",footer:"contentinfo",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:"banner",hr:"separator",html:"document",legend:"legend",li:"listitem",math:"math",main:"main",menu:"list",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",section:"region",summary:"button",table:"table",tbody:"rowgroup",textarea:"textbox",tfoot:"rowgroup",td:"cell",th:"columnheader",thead:"rowgroup",tr:"row",ul:"list"},Le={caption:new Set(["aria-label","aria-labelledby"]),code:new Set(["aria-label","aria-labelledby"]),deletion:new Set(["aria-label","aria-labelledby"]),emphasis:new Set(["aria-label","aria-labelledby"]),generic:new Set(["aria-label","aria-labelledby","aria-roledescription"]),insertion:new Set(["aria-label","aria-labelledby"]),none:new Set(["aria-label","aria-labelledby"]),paragraph:new Set(["aria-label","aria-labelledby"]),presentation:new Set(["aria-label","aria-labelledby"]),strong:new Set(["aria-label","aria-labelledby"]),subscript:new Set(["aria-label","aria-labelledby"]),superscript:new Set(["aria-label","aria-labelledby"])};function Ne(e,t){return["aria-atomic","aria-busy","aria-controls","aria-current","aria-description","aria-describedby","aria-details","aria-dropeffect","aria-flowto","aria-grabbed","aria-hidden","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"].some(function(i){var u;return e.hasAttribute(i)&&!((u=Le[t])!==null&&u!==void 0&&u.has(i))})}function ee(e,t){return Ne(e,t)}function G(e){var t=Re(e);if(t===null||_.indexOf(t)!==-1){var i=Ce(e);if(_.indexOf(t||"")===-1||ee(e,i||""))return i}return t}function Ce(e){var t=Te[p(e)];if(t!==void 0)return t;switch(p(e)){case"a":case"area":case"link":if(e.hasAttribute("href"))return"link";break;case"img":return e.getAttribute("alt")===""&&!ee(e,"img")?"presentation":"img";case"input":{var i=e,u=i.type;switch(u){case"button":case"image":case"reset":case"submit":return"button";case"checkbox":case"radio":return u;case"range":return"slider";case"email":case"tel":case"text":case"url":return e.hasAttribute("list")?"combobox":"textbox";case"search":return e.hasAttribute("list")?"combobox":"searchbox";case"number":return"spinbutton";default:return null}}case"select":return e.hasAttribute("multiple")||e.size>1?"listbox":"combobox"}return null}function Re(e){var t=e.getAttribute("role");if(t!==null){var i=t.trim().split(" ")[0];if(i.length>0)return i}return null}var _=["presentation","none"];function d(e){return e!==null&&e.nodeType===e.ELEMENT_NODE}function W(e){return d(e)&&p(e)==="caption"}function j(e){return d(e)&&p(e)==="input"}function te(e){return d(e)&&p(e)==="optgroup"}function re(e){return d(e)&&p(e)==="select"}function ne(e){return d(e)&&p(e)==="table"}function ie(e){return d(e)&&p(e)==="textarea"}function ae(e){var t=e.ownerDocument===null?e:e.ownerDocument,i=t.defaultView;if(i===null)throw new TypeError("no window available");return i}function oe(e){return d(e)&&p(e)==="fieldset"}function le(e){return d(e)&&p(e)==="legend"}function ue(e){return d(e)&&p(e)==="slot"}function Ie(e){return d(e)&&e.ownerSVGElement!==void 0}function se(e){return d(e)&&p(e)==="svg"}function ce(e){return Ie(e)&&p(e)==="title"}function k(e,t){if(d(e)&&e.hasAttribute(t)){var i=e.getAttribute(t).split(" "),u=e.getRootNode?e.getRootNode():e.ownerDocument;return i.map(function(g){return u.getElementById(g)}).filter(function(g){return g!==null})}return[]}function x(e,t){return d(e)?t.indexOf(G(e))!==-1:!1}function Oe(e){return e.trim().replace(/\s\s+/g," ")}function Me(e,t){if(!d(e))return!1;if(e.hasAttribute("hidden")||e.getAttribute("aria-hidden")==="true")return!0;var i=t(e);return i.getPropertyValue("display")==="none"||i.getPropertyValue("visibility")==="hidden"}function Pe(e){return x(e,["button","combobox","listbox","textbox"])||pe(e,"range")}function pe(e,t){if(!d(e))return!1;if(t==="range")return x(e,["meter","progressbar","scrollbar","slider","spinbutton"]);throw new TypeError("No knowledge about abstract role '".concat(t,"'. This is likely a bug :("))}function fe(e,t){var i=v(e.querySelectorAll(t));return k(e,"aria-owns").forEach(function(u){i.push.apply(i,v(u.querySelectorAll(t)))}),i}function _e(e){return re(e)?e.selectedOptions||fe(e,"[selected]"):fe(e,'[aria-selected="true"]')}function je(e){return x(e,_)}function ke(e){return W(e)}function He(e){return x(e,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}function De(e){return!1}function $e(e){return j(e)||ie(e)?e.value:e.textContent||""}function de(e){var t=e.getPropertyValue("content");return/^["'].*["']$/.test(t)?t.slice(1,-1):""}function me(e){var t=p(e);return t==="button"||t==="input"&&e.getAttribute("type")!=="hidden"||t==="meter"||t==="output"||t==="progress"||t==="select"||t==="textarea"}function be(e){if(me(e))return e;var t=null;return e.childNodes.forEach(function(i){if(t===null&&d(i)){var u=be(i);u!==null&&(t=u)}}),t}function Ve(e){if(e.control!==void 0)return e.control;var t=e.getAttribute("for");return t!==null?e.ownerDocument.getElementById(t):be(e)}function qe(e){var t=e.labels;if(t===null)return t;if(t!==void 0)return v(t);if(!me(e))return null;var i=e.ownerDocument;return v(i.querySelectorAll("label")).filter(function(u){return Ve(u)===e})}function Ge(e){var t=e.assignedNodes();return t.length===0?v(e.childNodes):t}function z(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=new Z,u=typeof Map>"u"?void 0:new Map,g=ae(e),T=t.compute,h=T===void 0?"name":T,L=t.computedStyleSupportsPseudoElements,H=L===void 0?t.getComputedStyle!==void 0:L,D=t.getComputedStyle,R=D===void 0?g.getComputedStyle.bind(g):D,O=t.hidden,$=O===void 0?!1:O,V=function(c,f){if(f!==void 0)throw new Error("use uncachedGetComputedStyle directly for pseudo elements");if(u===void 0)return R(c);var w=u.get(c);if(w)return w;var S=R(c,f);return u.set(c,S),S};function M(r,c){var f="";if(d(r)&&H){var w=R(r,"::before"),S=de(w);f="".concat(S," ").concat(f)}var A=ue(r)?Ge(r):v(r.childNodes).concat(k(r,"aria-owns"));if(A.forEach(function(l){var a=N(l,{isEmbeddedInLabel:c.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),s=d(l)?V(l).getPropertyValue("display"):"inline",m=s!=="inline"?" ":"";f+="".concat(m).concat(a).concat(m)}),d(r)&&H){var n=R(r,"::after"),o=de(n);f="".concat(f," ").concat(o)}return f.trim()}function C(r,c){var f=r.getAttributeNode(c);return f!==null&&!i.has(f)&&f.value.trim()!==""?(i.add(f),f.value):null}function B(r){return d(r)?C(r,"title"):null}function q(r){if(!d(r))return null;if(oe(r)){i.add(r);for(var c=v(r.childNodes),f=0;f<c.length;f+=1){var w=c[f];if(le(w))return N(w,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(ne(r)){i.add(r);for(var S=v(r.childNodes),A=0;A<S.length;A+=1){var n=S[A];if(W(n))return N(n,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(se(r)){i.add(r);for(var o=v(r.childNodes),l=0;l<o.length;l+=1){var a=o[l];if(ce(a))return a.textContent}return null}else if(p(r)==="img"||p(r)==="area"){var s=C(r,"alt");if(s!==null)return s}else if(te(r)){var m=C(r,"label");if(m!==null)return m}if(j(r)&&(r.type==="button"||r.type==="submit"||r.type==="reset")){var b=C(r,"value");if(b!==null)return b;if(r.type==="submit")return"Submit";if(r.type==="reset")return"Reset"}var y=qe(r);if(y!==null&&y.length!==0)return i.add(r),v(y).map(function(J){return N(J,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(J){return J.length>0}).join(" ");if(j(r)&&r.type==="image"){var E=C(r,"alt");if(E!==null)return E;var I=C(r,"title");return I!==null?I:"Submit Query"}if(x(r,["button"])){var K=M(r,{isEmbeddedInLabel:!1,isReferenced:!1});if(K!=="")return K}return null}function N(r,c){if(i.has(r))return"";if(!$&&Me(r,V)&&!c.isReferenced)return i.add(r),"";var f=d(r)?r.getAttributeNode("aria-labelledby"):null,w=f!==null&&!i.has(f)?k(r,"aria-labelledby"):[];if(h==="name"&&!c.isReferenced&&w.length>0)return i.add(f),w.map(function(s){return N(s,{isEmbeddedInLabel:c.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(" ");var S=c.recursion&&Pe(r)&&h==="name";if(!S){var A=(d(r)&&r.getAttribute("aria-label")||"").trim();if(A!==""&&h==="name")return i.add(r),A;if(!je(r)){var n=q(r);if(n!==null)return i.add(r),n}}if(x(r,["menu"]))return i.add(r),"";if(S||c.isEmbeddedInLabel||c.isReferenced){if(x(r,["combobox","listbox"])){i.add(r);var o=_e(r);return o.length===0?j(r)?r.value:"":v(o).map(function(s){return N(s,{isEmbeddedInLabel:c.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(" ")}if(pe(r,"range"))return i.add(r),r.hasAttribute("aria-valuetext")?r.getAttribute("aria-valuetext"):r.hasAttribute("aria-valuenow")?r.getAttribute("aria-valuenow"):r.getAttribute("value")||"";if(x(r,["textbox"]))return i.add(r),$e(r)}if(He(r)||d(r)&&c.isReferenced||ke(r)||De(r)){var l=M(r,{isEmbeddedInLabel:c.isEmbeddedInLabel,isReferenced:!1});if(l!=="")return i.add(r),l}if(r.nodeType===r.TEXT_NODE)return i.add(r),r.textContent||"";if(c.recursion)return i.add(r),M(r,{isEmbeddedInLabel:c.isEmbeddedInLabel,isReferenced:!1});var a=B(r);return a!==null?(i.add(r),a):(i.add(r),"")}return Oe(N(e,{isEmbeddedInLabel:!1,isReferenced:h==="description",recursion:!1}))}function Be(e){return x(e,["caption","code","deletion","emphasis","generic","insertion","none","paragraph","presentation","strong","subscript","superscript"])}function F(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Be(e)?"":z(e,t)}window.__flAccName=e=>{try{return F(e).replace(/\s+/g," ").trim()}catch{return""}};window.__flCreateTargetIdentity=U;})();