diff --git a/pocs_go/ms/NetBIOS.go b/pocs_go/ms/NetBIOS.go index 63398adad..0f3de4f22 100644 --- a/pocs_go/ms/NetBIOS.go +++ b/pocs_go/ms/NetBIOS.go @@ -54,7 +54,7 @@ type HostInfo struct { var Scantype string -func NetBIOS(info *HostInfo) string,error { +func NetBIOS(info *HostInfo) (string, error) { nbname, err := NetBIOS1(info) var msg, isdc string @@ -69,7 +69,7 @@ func NetBIOS(info *HostInfo) string,error { if len(nbname.group) > 0 || len(nbname.unique) > 0 { return msg, nil } - return "",err + return "", err } func NetBIOS1(info *HostInfo) (nbname NbnsName, err error) { diff --git a/spider/atch_http.go b/spider/catch_http.go similarity index 100% rename from spider/atch_http.go rename to spider/catch_http.go diff --git a/vendor/github.com/chromedp/cdproto/.gitignore b/vendor/github.com/chromedp/cdproto/.gitignore new file mode 100644 index 000000000..c456f5327 --- /dev/null +++ b/vendor/github.com/chromedp/cdproto/.gitignore @@ -0,0 +1,2 @@ +*.json +*.pdl diff --git a/vendor/github.com/chromedp/cdproto/LICENSE b/vendor/github.com/chromedp/cdproto/LICENSE new file mode 100644 index 000000000..323e87a93 --- /dev/null +++ b/vendor/github.com/chromedp/cdproto/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2021 Kenneth Shaw + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/chromedp/cdproto/README.md b/vendor/github.com/chromedp/cdproto/README.md new file mode 100644 index 000000000..a21f77cac --- /dev/null +++ b/vendor/github.com/chromedp/cdproto/README.md @@ -0,0 +1,29 @@ +# About cdproto + +Package `cdproto` contains the generated commands, types, and events for the +[Chrome DevTools Protocol domains][devtools-protocol]. + +[![Unit Tests][cdproto-ci-status]][cdproto-ci] +[![Go Reference][goref-cdproto-status]][goref-cdproto] + +This package is generated by the [`cdproto-gen`][cdproto-gen] command. Please +refer to that project and to the main [`chromedp`][chromedp] project for +information on using the commands, types, and events available here. + +## API + +Please see the [Go Reference][goref-cdproto]. + +## Contributing + +If you would like to submit a change to the code in this package, please submit +your Pull Request to the [`cdproto-gen`][cdproto-gen] project. Any Issues and +Pull Requests submitted to this project will be closed without being reviewed. + +[cdproto-ci]: https://github.com/chromedp/cdproto/actions/workflows/build.yml (Build CI) +[cdproto-ci-status]: https://github.com/chromedp/cdproto/actions/workflows/build.yml/badge.svg (Build CI) +[cdproto-gen]: https://github.com/chromedp/cdproto-gen +[chromedp]: https://github.com/chromedp/chromedp +[devtools-protocol]: https://chromedevtools.github.io/devtools-protocol/ +[goref-cdproto]: https://pkg.go.dev/github.com/chromedp/cdproto +[goref-cdproto-status]: https://pkg.go.dev/badge/github.com/chromedp/chromedp.svg diff --git a/vendor/github.com/chromedp/cdproto/accessibility/accessibility.go b/vendor/github.com/chromedp/cdproto/accessibility/accessibility.go new file mode 100644 index 000000000..2256c616d --- /dev/null +++ b/vendor/github.com/chromedp/cdproto/accessibility/accessibility.go @@ -0,0 +1,404 @@ +// Package accessibility provides the Chrome DevTools Protocol +// commands, types, and events for the Accessibility domain. +// +// Generated by the cdproto-gen command. +package accessibility + +// Code generated by cdproto-gen. DO NOT EDIT. + +import ( + "context" + + "github.com/chromedp/cdproto/cdp" + "github.com/chromedp/cdproto/runtime" +) + +// DisableParams disables the accessibility domain. +type DisableParams struct{} + +// Disable disables the accessibility domain. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-disable +func Disable() *DisableParams { + return &DisableParams{} +} + +// Do executes Accessibility.disable against the provided context. +func (p *DisableParams) Do(ctx context.Context) (err error) { + return cdp.Execute(ctx, CommandDisable, nil, nil) +} + +// EnableParams enables the accessibility domain which causes AXNodeIds to +// remain consistent between method calls. This turns on accessibility for the +// page, which can impact performance until accessibility is disabled. +type EnableParams struct{} + +// Enable enables the accessibility domain which causes AXNodeIds to remain +// consistent between method calls. This turns on accessibility for the page, +// which can impact performance until accessibility is disabled. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-enable +func Enable() *EnableParams { + return &EnableParams{} +} + +// Do executes Accessibility.enable against the provided context. +func (p *EnableParams) Do(ctx context.Context) (err error) { + return cdp.Execute(ctx, CommandEnable, nil, nil) +} + +// GetPartialAXTreeParams fetches the accessibility node and partial +// accessibility tree for this DOM node, if it exists. +type GetPartialAXTreeParams struct { + NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node to get the partial accessibility tree for. + BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to get the partial accessibility tree for. + ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper to get the partial accessibility tree for. + FetchRelatives bool `json:"fetchRelatives,omitempty"` // Whether to fetch this nodes ancestors, siblings and children. Defaults to true. +} + +// GetPartialAXTree fetches the accessibility node and partial accessibility +// tree for this DOM node, if it exists. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getPartialAXTree +// +// parameters: +func GetPartialAXTree() *GetPartialAXTreeParams { + return &GetPartialAXTreeParams{} +} + +// WithNodeID identifier of the node to get the partial accessibility tree +// for. +func (p GetPartialAXTreeParams) WithNodeID(nodeID cdp.NodeID) *GetPartialAXTreeParams { + p.NodeID = nodeID + return &p +} + +// WithBackendNodeID identifier of the backend node to get the partial +// accessibility tree for. +func (p GetPartialAXTreeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *GetPartialAXTreeParams { + p.BackendNodeID = backendNodeID + return &p +} + +// WithObjectID JavaScript object id of the node wrapper to get the partial +// accessibility tree for. +func (p GetPartialAXTreeParams) WithObjectID(objectID runtime.RemoteObjectID) *GetPartialAXTreeParams { + p.ObjectID = objectID + return &p +} + +// WithFetchRelatives whether to fetch this nodes ancestors, siblings and +// children. Defaults to true. +func (p GetPartialAXTreeParams) WithFetchRelatives(fetchRelatives bool) *GetPartialAXTreeParams { + p.FetchRelatives = fetchRelatives + return &p +} + +// GetPartialAXTreeReturns return values. +type GetPartialAXTreeReturns struct { + Nodes []*Node `json:"nodes,omitempty"` // The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested. +} + +// Do executes Accessibility.getPartialAXTree against the provided context. +// +// returns: +// nodes - The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested. +func (p *GetPartialAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) { + // execute + var res GetPartialAXTreeReturns + err = cdp.Execute(ctx, CommandGetPartialAXTree, p, &res) + if err != nil { + return nil, err + } + + return res.Nodes, nil +} + +// GetFullAXTreeParams fetches the entire accessibility tree for the root +// Document. +type GetFullAXTreeParams struct { + Depth int64 `json:"depth,omitempty"` // The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned. + FrameID cdp.FrameID `json:"frameId,omitempty"` // The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used. +} + +// GetFullAXTree fetches the entire accessibility tree for the root Document. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getFullAXTree +// +// parameters: +func GetFullAXTree() *GetFullAXTreeParams { + return &GetFullAXTreeParams{} +} + +// WithDepth the maximum depth at which descendants of the root node should +// be retrieved. If omitted, the full tree is returned. +func (p GetFullAXTreeParams) WithDepth(depth int64) *GetFullAXTreeParams { + p.Depth = depth + return &p +} + +// WithFrameID the frame for whose document the AX tree should be retrieved. +// If omitted, the root frame is used. +func (p GetFullAXTreeParams) WithFrameID(frameID cdp.FrameID) *GetFullAXTreeParams { + p.FrameID = frameID + return &p +} + +// GetFullAXTreeReturns return values. +type GetFullAXTreeReturns struct { + Nodes []*Node `json:"nodes,omitempty"` +} + +// Do executes Accessibility.getFullAXTree against the provided context. +// +// returns: +// nodes +func (p *GetFullAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) { + // execute + var res GetFullAXTreeReturns + err = cdp.Execute(ctx, CommandGetFullAXTree, p, &res) + if err != nil { + return nil, err + } + + return res.Nodes, nil +} + +// GetRootAXNodeParams fetches the root node. Requires enable() to have been +// called previously. +type GetRootAXNodeParams struct { + FrameID cdp.FrameID `json:"frameId,omitempty"` // The frame in whose document the node resides. If omitted, the root frame is used. +} + +// GetRootAXNode fetches the root node. Requires enable() to have been called +// previously. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getRootAXNode +// +// parameters: +func GetRootAXNode() *GetRootAXNodeParams { + return &GetRootAXNodeParams{} +} + +// WithFrameID the frame in whose document the node resides. If omitted, the +// root frame is used. +func (p GetRootAXNodeParams) WithFrameID(frameID cdp.FrameID) *GetRootAXNodeParams { + p.FrameID = frameID + return &p +} + +// GetRootAXNodeReturns return values. +type GetRootAXNodeReturns struct { + Node *Node `json:"node,omitempty"` +} + +// Do executes Accessibility.getRootAXNode against the provided context. +// +// returns: +// node +func (p *GetRootAXNodeParams) Do(ctx context.Context) (node *Node, err error) { + // execute + var res GetRootAXNodeReturns + err = cdp.Execute(ctx, CommandGetRootAXNode, p, &res) + if err != nil { + return nil, err + } + + return res.Node, nil +} + +// GetAXNodeAndAncestorsParams fetches a node and all ancestors up to and +// including the root. Requires enable() to have been called previously. +type GetAXNodeAndAncestorsParams struct { + NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node to get. + BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to get. + ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper to get. +} + +// GetAXNodeAndAncestors fetches a node and all ancestors up to and including +// the root. Requires enable() to have been called previously. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getAXNodeAndAncestors +// +// parameters: +func GetAXNodeAndAncestors() *GetAXNodeAndAncestorsParams { + return &GetAXNodeAndAncestorsParams{} +} + +// WithNodeID identifier of the node to get. +func (p GetAXNodeAndAncestorsParams) WithNodeID(nodeID cdp.NodeID) *GetAXNodeAndAncestorsParams { + p.NodeID = nodeID + return &p +} + +// WithBackendNodeID identifier of the backend node to get. +func (p GetAXNodeAndAncestorsParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *GetAXNodeAndAncestorsParams { + p.BackendNodeID = backendNodeID + return &p +} + +// WithObjectID JavaScript object id of the node wrapper to get. +func (p GetAXNodeAndAncestorsParams) WithObjectID(objectID runtime.RemoteObjectID) *GetAXNodeAndAncestorsParams { + p.ObjectID = objectID + return &p +} + +// GetAXNodeAndAncestorsReturns return values. +type GetAXNodeAndAncestorsReturns struct { + Nodes []*Node `json:"nodes,omitempty"` +} + +// Do executes Accessibility.getAXNodeAndAncestors against the provided context. +// +// returns: +// nodes +func (p *GetAXNodeAndAncestorsParams) Do(ctx context.Context) (nodes []*Node, err error) { + // execute + var res GetAXNodeAndAncestorsReturns + err = cdp.Execute(ctx, CommandGetAXNodeAndAncestors, p, &res) + if err != nil { + return nil, err + } + + return res.Nodes, nil +} + +// GetChildAXNodesParams fetches a particular accessibility node by AXNodeId. +// Requires enable() to have been called previously. +type GetChildAXNodesParams struct { + ID NodeID `json:"id"` + FrameID cdp.FrameID `json:"frameId,omitempty"` // The frame in whose document the node resides. If omitted, the root frame is used. +} + +// GetChildAXNodes fetches a particular accessibility node by AXNodeId. +// Requires enable() to have been called previously. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getChildAXNodes +// +// parameters: +// id +func GetChildAXNodes(id NodeID) *GetChildAXNodesParams { + return &GetChildAXNodesParams{ + ID: id, + } +} + +// WithFrameID the frame in whose document the node resides. If omitted, the +// root frame is used. +func (p GetChildAXNodesParams) WithFrameID(frameID cdp.FrameID) *GetChildAXNodesParams { + p.FrameID = frameID + return &p +} + +// GetChildAXNodesReturns return values. +type GetChildAXNodesReturns struct { + Nodes []*Node `json:"nodes,omitempty"` +} + +// Do executes Accessibility.getChildAXNodes against the provided context. +// +// returns: +// nodes +func (p *GetChildAXNodesParams) Do(ctx context.Context) (nodes []*Node, err error) { + // execute + var res GetChildAXNodesReturns + err = cdp.Execute(ctx, CommandGetChildAXNodes, p, &res) + if err != nil { + return nil, err + } + + return res.Nodes, nil +} + +// QueryAXTreeParams query a DOM node's accessibility subtree for accessible +// name and role. This command computes the name and role for all nodes in the +// subtree, including those that are ignored for accessibility, and returns +// those that mactch the specified name and role. If no DOM node is specified, +// or the DOM node does not exist, the command returns an error. If neither +// accessibleName or role is specified, it returns all the accessibility nodes +// in the subtree. +type QueryAXTreeParams struct { + NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node for the root to query. + BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node for the root to query. + ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper for the root to query. + AccessibleName string `json:"accessibleName,omitempty"` // Find nodes with this computed name. + Role string `json:"role,omitempty"` // Find nodes with this computed role. +} + +// QueryAXTree query a DOM node's accessibility subtree for accessible name +// and role. This command computes the name and role for all nodes in the +// subtree, including those that are ignored for accessibility, and returns +// those that mactch the specified name and role. If no DOM node is specified, +// or the DOM node does not exist, the command returns an error. If neither +// accessibleName or role is specified, it returns all the accessibility nodes +// in the subtree. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-queryAXTree +// +// parameters: +func QueryAXTree() *QueryAXTreeParams { + return &QueryAXTreeParams{} +} + +// WithNodeID identifier of the node for the root to query. +func (p QueryAXTreeParams) WithNodeID(nodeID cdp.NodeID) *QueryAXTreeParams { + p.NodeID = nodeID + return &p +} + +// WithBackendNodeID identifier of the backend node for the root to query. +func (p QueryAXTreeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *QueryAXTreeParams { + p.BackendNodeID = backendNodeID + return &p +} + +// WithObjectID JavaScript object id of the node wrapper for the root to +// query. +func (p QueryAXTreeParams) WithObjectID(objectID runtime.RemoteObjectID) *QueryAXTreeParams { + p.ObjectID = objectID + return &p +} + +// WithAccessibleName find nodes with this computed name. +func (p QueryAXTreeParams) WithAccessibleName(accessibleName string) *QueryAXTreeParams { + p.AccessibleName = accessibleName + return &p +} + +// WithRole find nodes with this computed role. +func (p QueryAXTreeParams) WithRole(role string) *QueryAXTreeParams { + p.Role = role + return &p +} + +// QueryAXTreeReturns return values. +type QueryAXTreeReturns struct { + Nodes []*Node `json:"nodes,omitempty"` // A list of Accessibility.AXNode matching the specified attributes, including nodes that are ignored for accessibility. +} + +// Do executes Accessibility.queryAXTree against the provided context. +// +// returns: +// nodes - A list of Accessibility.AXNode matching the specified attributes, including nodes that are ignored for accessibility. +func (p *QueryAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) { + // execute + var res QueryAXTreeReturns + err = cdp.Execute(ctx, CommandQueryAXTree, p, &res) + if err != nil { + return nil, err + } + + return res.Nodes, nil +} + +// Command names. +const ( + CommandDisable = "Accessibility.disable" + CommandEnable = "Accessibility.enable" + CommandGetPartialAXTree = "Accessibility.getPartialAXTree" + CommandGetFullAXTree = "Accessibility.getFullAXTree" + CommandGetRootAXNode = "Accessibility.getRootAXNode" + CommandGetAXNodeAndAncestors = "Accessibility.getAXNodeAndAncestors" + CommandGetChildAXNodes = "Accessibility.getChildAXNodes" + CommandQueryAXTree = "Accessibility.queryAXTree" +) diff --git a/vendor/github.com/chromedp/cdproto/accessibility/easyjson.go b/vendor/github.com/chromedp/cdproto/accessibility/easyjson.go new file mode 100644 index 000000000..6bdb87437 --- /dev/null +++ b/vendor/github.com/chromedp/cdproto/accessibility/easyjson.go @@ -0,0 +1,2245 @@ +// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. + +package accessibility + +import ( + json "encoding/json" + runtime "github.com/chromedp/cdproto/runtime" + easyjson "github.com/mailru/easyjson" + jlexer "github.com/mailru/easyjson/jlexer" + jwriter "github.com/mailru/easyjson/jwriter" +) + +// suppress unused package warning +var ( + _ *json.RawMessage + _ *jlexer.Lexer + _ *jwriter.Writer + _ easyjson.Marshaler +) + +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility(in *jlexer.Lexer, out *ValueSource) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "value": + if in.IsNull() { + in.Skip() + out.Value = nil + } else { + if out.Value == nil { + out.Value = new(Value) + } + (*out.Value).UnmarshalEasyJSON(in) + } + case "attribute": + out.Attribute = string(in.String()) + case "attributeValue": + if in.IsNull() { + in.Skip() + out.AttributeValue = nil + } else { + if out.AttributeValue == nil { + out.AttributeValue = new(Value) + } + (*out.AttributeValue).UnmarshalEasyJSON(in) + } + case "superseded": + out.Superseded = bool(in.Bool()) + case "nativeSource": + (out.NativeSource).UnmarshalEasyJSON(in) + case "nativeSourceValue": + if in.IsNull() { + in.Skip() + out.NativeSourceValue = nil + } else { + if out.NativeSourceValue == nil { + out.NativeSourceValue = new(Value) + } + (*out.NativeSourceValue).UnmarshalEasyJSON(in) + } + case "invalid": + out.Invalid = bool(in.Bool()) + case "invalidReason": + out.InvalidReason = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility(out *jwriter.Writer, in ValueSource) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + (in.Type).MarshalEasyJSON(out) + } + if in.Value != nil { + const prefix string = ",\"value\":" + out.RawString(prefix) + (*in.Value).MarshalEasyJSON(out) + } + if in.Attribute != "" { + const prefix string = ",\"attribute\":" + out.RawString(prefix) + out.String(string(in.Attribute)) + } + if in.AttributeValue != nil { + const prefix string = ",\"attributeValue\":" + out.RawString(prefix) + (*in.AttributeValue).MarshalEasyJSON(out) + } + if in.Superseded { + const prefix string = ",\"superseded\":" + out.RawString(prefix) + out.Bool(bool(in.Superseded)) + } + if in.NativeSource != "" { + const prefix string = ",\"nativeSource\":" + out.RawString(prefix) + (in.NativeSource).MarshalEasyJSON(out) + } + if in.NativeSourceValue != nil { + const prefix string = ",\"nativeSourceValue\":" + out.RawString(prefix) + (*in.NativeSourceValue).MarshalEasyJSON(out) + } + if in.Invalid { + const prefix string = ",\"invalid\":" + out.RawString(prefix) + out.Bool(bool(in.Invalid)) + } + if in.InvalidReason != "" { + const prefix string = ",\"invalidReason\":" + out.RawString(prefix) + out.String(string(in.InvalidReason)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ValueSource) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ValueSource) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ValueSource) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ValueSource) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility1(in *jlexer.Lexer, out *Value) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "value": + (out.Value).UnmarshalEasyJSON(in) + case "relatedNodes": + if in.IsNull() { + in.Skip() + out.RelatedNodes = nil + } else { + in.Delim('[') + if out.RelatedNodes == nil { + if !in.IsDelim(']') { + out.RelatedNodes = make([]*RelatedNode, 0, 8) + } else { + out.RelatedNodes = []*RelatedNode{} + } + } else { + out.RelatedNodes = (out.RelatedNodes)[:0] + } + for !in.IsDelim(']') { + var v1 *RelatedNode + if in.IsNull() { + in.Skip() + v1 = nil + } else { + if v1 == nil { + v1 = new(RelatedNode) + } + (*v1).UnmarshalEasyJSON(in) + } + out.RelatedNodes = append(out.RelatedNodes, v1) + in.WantComma() + } + in.Delim(']') + } + case "sources": + if in.IsNull() { + in.Skip() + out.Sources = nil + } else { + in.Delim('[') + if out.Sources == nil { + if !in.IsDelim(']') { + out.Sources = make([]*ValueSource, 0, 8) + } else { + out.Sources = []*ValueSource{} + } + } else { + out.Sources = (out.Sources)[:0] + } + for !in.IsDelim(']') { + var v2 *ValueSource + if in.IsNull() { + in.Skip() + v2 = nil + } else { + if v2 == nil { + v2 = new(ValueSource) + } + (*v2).UnmarshalEasyJSON(in) + } + out.Sources = append(out.Sources, v2) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility1(out *jwriter.Writer, in Value) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"type\":" + out.RawString(prefix[1:]) + (in.Type).MarshalEasyJSON(out) + } + if (in.Value).IsDefined() { + const prefix string = ",\"value\":" + out.RawString(prefix) + (in.Value).MarshalEasyJSON(out) + } + if len(in.RelatedNodes) != 0 { + const prefix string = ",\"relatedNodes\":" + out.RawString(prefix) + { + out.RawByte('[') + for v3, v4 := range in.RelatedNodes { + if v3 > 0 { + out.RawByte(',') + } + if v4 == nil { + out.RawString("null") + } else { + (*v4).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.Sources) != 0 { + const prefix string = ",\"sources\":" + out.RawString(prefix) + { + out.RawByte('[') + for v5, v6 := range in.Sources { + if v5 > 0 { + out.RawByte(',') + } + if v6 == nil { + out.RawString("null") + } else { + (*v6).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Value) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Value) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Value) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Value) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility1(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility2(in *jlexer.Lexer, out *RelatedNode) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "backendDOMNodeId": + (out.BackendDOMNodeID).UnmarshalEasyJSON(in) + case "idref": + out.Idref = string(in.String()) + case "text": + out.Text = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility2(out *jwriter.Writer, in RelatedNode) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"backendDOMNodeId\":" + out.RawString(prefix[1:]) + out.Int64(int64(in.BackendDOMNodeID)) + } + if in.Idref != "" { + const prefix string = ",\"idref\":" + out.RawString(prefix) + out.String(string(in.Idref)) + } + if in.Text != "" { + const prefix string = ",\"text\":" + out.RawString(prefix) + out.String(string(in.Text)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RelatedNode) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RelatedNode) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RelatedNode) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RelatedNode) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility2(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility3(in *jlexer.Lexer, out *QueryAXTreeReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodes": + if in.IsNull() { + in.Skip() + out.Nodes = nil + } else { + in.Delim('[') + if out.Nodes == nil { + if !in.IsDelim(']') { + out.Nodes = make([]*Node, 0, 8) + } else { + out.Nodes = []*Node{} + } + } else { + out.Nodes = (out.Nodes)[:0] + } + for !in.IsDelim(']') { + var v7 *Node + if in.IsNull() { + in.Skip() + v7 = nil + } else { + if v7 == nil { + v7 = new(Node) + } + (*v7).UnmarshalEasyJSON(in) + } + out.Nodes = append(out.Nodes, v7) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility3(out *jwriter.Writer, in QueryAXTreeReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Nodes) != 0 { + const prefix string = ",\"nodes\":" + first = false + out.RawString(prefix[1:]) + { + out.RawByte('[') + for v8, v9 := range in.Nodes { + if v8 > 0 { + out.RawByte(',') + } + if v9 == nil { + out.RawString("null") + } else { + (*v9).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v QueryAXTreeReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v QueryAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *QueryAXTreeReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *QueryAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility3(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility4(in *jlexer.Lexer, out *QueryAXTreeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "backendNodeId": + (out.BackendNodeID).UnmarshalEasyJSON(in) + case "objectId": + out.ObjectID = runtime.RemoteObjectID(in.String()) + case "accessibleName": + out.AccessibleName = string(in.String()) + case "role": + out.Role = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility4(out *jwriter.Writer, in QueryAXTreeParams) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + const prefix string = ",\"nodeId\":" + first = false + out.RawString(prefix[1:]) + out.Int64(int64(in.NodeID)) + } + if in.BackendNodeID != 0 { + const prefix string = ",\"backendNodeId\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Int64(int64(in.BackendNodeID)) + } + if in.ObjectID != "" { + const prefix string = ",\"objectId\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.ObjectID)) + } + if in.AccessibleName != "" { + const prefix string = ",\"accessibleName\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.AccessibleName)) + } + if in.Role != "" { + const prefix string = ",\"role\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.Role)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v QueryAXTreeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v QueryAXTreeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *QueryAXTreeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *QueryAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility4(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility5(in *jlexer.Lexer, out *Property) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "name": + (out.Name).UnmarshalEasyJSON(in) + case "value": + if in.IsNull() { + in.Skip() + out.Value = nil + } else { + if out.Value == nil { + out.Value = new(Value) + } + (*out.Value).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility5(out *jwriter.Writer, in Property) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"name\":" + out.RawString(prefix[1:]) + (in.Name).MarshalEasyJSON(out) + } + { + const prefix string = ",\"value\":" + out.RawString(prefix) + if in.Value == nil { + out.RawString("null") + } else { + (*in.Value).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Property) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Property) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Property) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Property) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility5(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility6(in *jlexer.Lexer, out *Node) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + out.NodeID = NodeID(in.String()) + case "ignored": + out.Ignored = bool(in.Bool()) + case "ignoredReasons": + if in.IsNull() { + in.Skip() + out.IgnoredReasons = nil + } else { + in.Delim('[') + if out.IgnoredReasons == nil { + if !in.IsDelim(']') { + out.IgnoredReasons = make([]*Property, 0, 8) + } else { + out.IgnoredReasons = []*Property{} + } + } else { + out.IgnoredReasons = (out.IgnoredReasons)[:0] + } + for !in.IsDelim(']') { + var v10 *Property + if in.IsNull() { + in.Skip() + v10 = nil + } else { + if v10 == nil { + v10 = new(Property) + } + (*v10).UnmarshalEasyJSON(in) + } + out.IgnoredReasons = append(out.IgnoredReasons, v10) + in.WantComma() + } + in.Delim(']') + } + case "role": + if in.IsNull() { + in.Skip() + out.Role = nil + } else { + if out.Role == nil { + out.Role = new(Value) + } + (*out.Role).UnmarshalEasyJSON(in) + } + case "name": + if in.IsNull() { + in.Skip() + out.Name = nil + } else { + if out.Name == nil { + out.Name = new(Value) + } + (*out.Name).UnmarshalEasyJSON(in) + } + case "description": + if in.IsNull() { + in.Skip() + out.Description = nil + } else { + if out.Description == nil { + out.Description = new(Value) + } + (*out.Description).UnmarshalEasyJSON(in) + } + case "value": + if in.IsNull() { + in.Skip() + out.Value = nil + } else { + if out.Value == nil { + out.Value = new(Value) + } + (*out.Value).UnmarshalEasyJSON(in) + } + case "properties": + if in.IsNull() { + in.Skip() + out.Properties = nil + } else { + in.Delim('[') + if out.Properties == nil { + if !in.IsDelim(']') { + out.Properties = make([]*Property, 0, 8) + } else { + out.Properties = []*Property{} + } + } else { + out.Properties = (out.Properties)[:0] + } + for !in.IsDelim(']') { + var v11 *Property + if in.IsNull() { + in.Skip() + v11 = nil + } else { + if v11 == nil { + v11 = new(Property) + } + (*v11).UnmarshalEasyJSON(in) + } + out.Properties = append(out.Properties, v11) + in.WantComma() + } + in.Delim(']') + } + case "parentId": + out.ParentID = NodeID(in.String()) + case "childIds": + if in.IsNull() { + in.Skip() + out.ChildIDs = nil + } else { + in.Delim('[') + if out.ChildIDs == nil { + if !in.IsDelim(']') { + out.ChildIDs = make([]NodeID, 0, 4) + } else { + out.ChildIDs = []NodeID{} + } + } else { + out.ChildIDs = (out.ChildIDs)[:0] + } + for !in.IsDelim(']') { + var v12 NodeID + v12 = NodeID(in.String()) + out.ChildIDs = append(out.ChildIDs, v12) + in.WantComma() + } + in.Delim(']') + } + case "backendDOMNodeId": + (out.BackendDOMNodeID).UnmarshalEasyJSON(in) + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility6(out *jwriter.Writer, in Node) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"nodeId\":" + out.RawString(prefix[1:]) + out.String(string(in.NodeID)) + } + { + const prefix string = ",\"ignored\":" + out.RawString(prefix) + out.Bool(bool(in.Ignored)) + } + if len(in.IgnoredReasons) != 0 { + const prefix string = ",\"ignoredReasons\":" + out.RawString(prefix) + { + out.RawByte('[') + for v13, v14 := range in.IgnoredReasons { + if v13 > 0 { + out.RawByte(',') + } + if v14 == nil { + out.RawString("null") + } else { + (*v14).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.Role != nil { + const prefix string = ",\"role\":" + out.RawString(prefix) + (*in.Role).MarshalEasyJSON(out) + } + if in.Name != nil { + const prefix string = ",\"name\":" + out.RawString(prefix) + (*in.Name).MarshalEasyJSON(out) + } + if in.Description != nil { + const prefix string = ",\"description\":" + out.RawString(prefix) + (*in.Description).MarshalEasyJSON(out) + } + if in.Value != nil { + const prefix string = ",\"value\":" + out.RawString(prefix) + (*in.Value).MarshalEasyJSON(out) + } + if len(in.Properties) != 0 { + const prefix string = ",\"properties\":" + out.RawString(prefix) + { + out.RawByte('[') + for v15, v16 := range in.Properties { + if v15 > 0 { + out.RawByte(',') + } + if v16 == nil { + out.RawString("null") + } else { + (*v16).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.ParentID != "" { + const prefix string = ",\"parentId\":" + out.RawString(prefix) + out.String(string(in.ParentID)) + } + if len(in.ChildIDs) != 0 { + const prefix string = ",\"childIds\":" + out.RawString(prefix) + { + out.RawByte('[') + for v17, v18 := range in.ChildIDs { + if v17 > 0 { + out.RawByte(',') + } + out.String(string(v18)) + } + out.RawByte(']') + } + } + if in.BackendDOMNodeID != 0 { + const prefix string = ",\"backendDOMNodeId\":" + out.RawString(prefix) + out.Int64(int64(in.BackendDOMNodeID)) + } + if in.FrameID != "" { + const prefix string = ",\"frameId\":" + out.RawString(prefix) + out.String(string(in.FrameID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Node) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Node) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Node) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Node) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility6(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(in *jlexer.Lexer, out *GetRootAXNodeReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "node": + if in.IsNull() { + in.Skip() + out.Node = nil + } else { + if out.Node == nil { + out.Node = new(Node) + } + (*out.Node).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(out *jwriter.Writer, in GetRootAXNodeReturns) { + out.RawByte('{') + first := true + _ = first + if in.Node != nil { + const prefix string = ",\"node\":" + first = false + out.RawString(prefix[1:]) + (*in.Node).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetRootAXNodeReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetRootAXNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetRootAXNodeReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetRootAXNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(in *jlexer.Lexer, out *GetRootAXNodeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(out *jwriter.Writer, in GetRootAXNodeParams) { + out.RawByte('{') + first := true + _ = first + if in.FrameID != "" { + const prefix string = ",\"frameId\":" + first = false + out.RawString(prefix[1:]) + out.String(string(in.FrameID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetRootAXNodeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetRootAXNodeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetRootAXNodeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetRootAXNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility9(in *jlexer.Lexer, out *GetPartialAXTreeReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodes": + if in.IsNull() { + in.Skip() + out.Nodes = nil + } else { + in.Delim('[') + if out.Nodes == nil { + if !in.IsDelim(']') { + out.Nodes = make([]*Node, 0, 8) + } else { + out.Nodes = []*Node{} + } + } else { + out.Nodes = (out.Nodes)[:0] + } + for !in.IsDelim(']') { + var v19 *Node + if in.IsNull() { + in.Skip() + v19 = nil + } else { + if v19 == nil { + v19 = new(Node) + } + (*v19).UnmarshalEasyJSON(in) + } + out.Nodes = append(out.Nodes, v19) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility9(out *jwriter.Writer, in GetPartialAXTreeReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Nodes) != 0 { + const prefix string = ",\"nodes\":" + first = false + out.RawString(prefix[1:]) + { + out.RawByte('[') + for v20, v21 := range in.Nodes { + if v20 > 0 { + out.RawByte(',') + } + if v21 == nil { + out.RawString("null") + } else { + (*v21).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetPartialAXTreeReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetPartialAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetPartialAXTreeReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetPartialAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility9(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility10(in *jlexer.Lexer, out *GetPartialAXTreeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "backendNodeId": + (out.BackendNodeID).UnmarshalEasyJSON(in) + case "objectId": + out.ObjectID = runtime.RemoteObjectID(in.String()) + case "fetchRelatives": + out.FetchRelatives = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility10(out *jwriter.Writer, in GetPartialAXTreeParams) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + const prefix string = ",\"nodeId\":" + first = false + out.RawString(prefix[1:]) + out.Int64(int64(in.NodeID)) + } + if in.BackendNodeID != 0 { + const prefix string = ",\"backendNodeId\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Int64(int64(in.BackendNodeID)) + } + if in.ObjectID != "" { + const prefix string = ",\"objectId\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.ObjectID)) + } + if in.FetchRelatives { + const prefix string = ",\"fetchRelatives\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Bool(bool(in.FetchRelatives)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetPartialAXTreeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetPartialAXTreeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetPartialAXTreeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetPartialAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility10(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility11(in *jlexer.Lexer, out *GetFullAXTreeReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodes": + if in.IsNull() { + in.Skip() + out.Nodes = nil + } else { + in.Delim('[') + if out.Nodes == nil { + if !in.IsDelim(']') { + out.Nodes = make([]*Node, 0, 8) + } else { + out.Nodes = []*Node{} + } + } else { + out.Nodes = (out.Nodes)[:0] + } + for !in.IsDelim(']') { + var v22 *Node + if in.IsNull() { + in.Skip() + v22 = nil + } else { + if v22 == nil { + v22 = new(Node) + } + (*v22).UnmarshalEasyJSON(in) + } + out.Nodes = append(out.Nodes, v22) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility11(out *jwriter.Writer, in GetFullAXTreeReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Nodes) != 0 { + const prefix string = ",\"nodes\":" + first = false + out.RawString(prefix[1:]) + { + out.RawByte('[') + for v23, v24 := range in.Nodes { + if v23 > 0 { + out.RawByte(',') + } + if v24 == nil { + out.RawString("null") + } else { + (*v24).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetFullAXTreeReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetFullAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetFullAXTreeReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetFullAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility11(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility12(in *jlexer.Lexer, out *GetFullAXTreeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "depth": + out.Depth = int64(in.Int64()) + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility12(out *jwriter.Writer, in GetFullAXTreeParams) { + out.RawByte('{') + first := true + _ = first + if in.Depth != 0 { + const prefix string = ",\"depth\":" + first = false + out.RawString(prefix[1:]) + out.Int64(int64(in.Depth)) + } + if in.FrameID != "" { + const prefix string = ",\"frameId\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.FrameID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetFullAXTreeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetFullAXTreeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetFullAXTreeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetFullAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility12(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility13(in *jlexer.Lexer, out *GetChildAXNodesReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodes": + if in.IsNull() { + in.Skip() + out.Nodes = nil + } else { + in.Delim('[') + if out.Nodes == nil { + if !in.IsDelim(']') { + out.Nodes = make([]*Node, 0, 8) + } else { + out.Nodes = []*Node{} + } + } else { + out.Nodes = (out.Nodes)[:0] + } + for !in.IsDelim(']') { + var v25 *Node + if in.IsNull() { + in.Skip() + v25 = nil + } else { + if v25 == nil { + v25 = new(Node) + } + (*v25).UnmarshalEasyJSON(in) + } + out.Nodes = append(out.Nodes, v25) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility13(out *jwriter.Writer, in GetChildAXNodesReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Nodes) != 0 { + const prefix string = ",\"nodes\":" + first = false + out.RawString(prefix[1:]) + { + out.RawByte('[') + for v26, v27 := range in.Nodes { + if v26 > 0 { + out.RawByte(',') + } + if v27 == nil { + out.RawString("null") + } else { + (*v27).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetChildAXNodesReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetChildAXNodesReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetChildAXNodesReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetChildAXNodesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility13(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility14(in *jlexer.Lexer, out *GetChildAXNodesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "id": + out.ID = NodeID(in.String()) + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility14(out *jwriter.Writer, in GetChildAXNodesParams) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"id\":" + out.RawString(prefix[1:]) + out.String(string(in.ID)) + } + if in.FrameID != "" { + const prefix string = ",\"frameId\":" + out.RawString(prefix) + out.String(string(in.FrameID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetChildAXNodesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetChildAXNodesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetChildAXNodesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetChildAXNodesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility14(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility15(in *jlexer.Lexer, out *GetAXNodeAndAncestorsReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodes": + if in.IsNull() { + in.Skip() + out.Nodes = nil + } else { + in.Delim('[') + if out.Nodes == nil { + if !in.IsDelim(']') { + out.Nodes = make([]*Node, 0, 8) + } else { + out.Nodes = []*Node{} + } + } else { + out.Nodes = (out.Nodes)[:0] + } + for !in.IsDelim(']') { + var v28 *Node + if in.IsNull() { + in.Skip() + v28 = nil + } else { + if v28 == nil { + v28 = new(Node) + } + (*v28).UnmarshalEasyJSON(in) + } + out.Nodes = append(out.Nodes, v28) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility15(out *jwriter.Writer, in GetAXNodeAndAncestorsReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Nodes) != 0 { + const prefix string = ",\"nodes\":" + first = false + out.RawString(prefix[1:]) + { + out.RawByte('[') + for v29, v30 := range in.Nodes { + if v29 > 0 { + out.RawByte(',') + } + if v30 == nil { + out.RawString("null") + } else { + (*v30).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetAXNodeAndAncestorsReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility15(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetAXNodeAndAncestorsReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility15(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetAXNodeAndAncestorsReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility15(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetAXNodeAndAncestorsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility15(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility16(in *jlexer.Lexer, out *GetAXNodeAndAncestorsParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "backendNodeId": + (out.BackendNodeID).UnmarshalEasyJSON(in) + case "objectId": + out.ObjectID = runtime.RemoteObjectID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility16(out *jwriter.Writer, in GetAXNodeAndAncestorsParams) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + const prefix string = ",\"nodeId\":" + first = false + out.RawString(prefix[1:]) + out.Int64(int64(in.NodeID)) + } + if in.BackendNodeID != 0 { + const prefix string = ",\"backendNodeId\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.Int64(int64(in.BackendNodeID)) + } + if in.ObjectID != "" { + const prefix string = ",\"objectId\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + out.String(string(in.ObjectID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetAXNodeAndAncestorsParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility16(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetAXNodeAndAncestorsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility16(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetAXNodeAndAncestorsParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility16(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetAXNodeAndAncestorsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility16(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility17(in *jlexer.Lexer, out *EventNodesUpdated) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodes": + if in.IsNull() { + in.Skip() + out.Nodes = nil + } else { + in.Delim('[') + if out.Nodes == nil { + if !in.IsDelim(']') { + out.Nodes = make([]*Node, 0, 8) + } else { + out.Nodes = []*Node{} + } + } else { + out.Nodes = (out.Nodes)[:0] + } + for !in.IsDelim(']') { + var v31 *Node + if in.IsNull() { + in.Skip() + v31 = nil + } else { + if v31 == nil { + v31 = new(Node) + } + (*v31).UnmarshalEasyJSON(in) + } + out.Nodes = append(out.Nodes, v31) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility17(out *jwriter.Writer, in EventNodesUpdated) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"nodes\":" + out.RawString(prefix[1:]) + if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v32, v33 := range in.Nodes { + if v32 > 0 { + out.RawByte(',') + } + if v33 == nil { + out.RawString("null") + } else { + (*v33).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventNodesUpdated) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility17(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventNodesUpdated) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility17(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventNodesUpdated) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility17(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventNodesUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility17(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility18(in *jlexer.Lexer, out *EventLoadComplete) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "root": + if in.IsNull() { + in.Skip() + out.Root = nil + } else { + if out.Root == nil { + out.Root = new(Node) + } + (*out.Root).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility18(out *jwriter.Writer, in EventLoadComplete) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"root\":" + out.RawString(prefix[1:]) + if in.Root == nil { + out.RawString("null") + } else { + (*in.Root).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventLoadComplete) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventLoadComplete) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventLoadComplete) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventLoadComplete) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility18(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility19(in *jlexer.Lexer, out *EnableParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility19(out *jwriter.Writer, in EnableParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EnableParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility19(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility19(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility19(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility19(l, v) +} +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility20(in *jlexer.Lexer, out *DisableParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility20(out *jwriter.Writer, in DisableParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DisableParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility20(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility20(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility20(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility20(l, v) +} diff --git a/vendor/github.com/chromedp/cdproto/accessibility/events.go b/vendor/github.com/chromedp/cdproto/accessibility/events.go new file mode 100644 index 000000000..ae3b511fc --- /dev/null +++ b/vendor/github.com/chromedp/cdproto/accessibility/events.go @@ -0,0 +1,20 @@ +package accessibility + +// Code generated by cdproto-gen. DO NOT EDIT. + +// EventLoadComplete the loadComplete event mirrors the load complete event +// sent by the browser to assistive technology when the web page has finished +// loading. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#event-loadComplete +type EventLoadComplete struct { + Root *Node `json:"root"` // New document root node. +} + +// EventNodesUpdated the nodesUpdated event is sent every time a previously +// requested node has changed the in tree. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#event-nodesUpdated +type EventNodesUpdated struct { + Nodes []*Node `json:"nodes"` // Updated node data. +} diff --git a/vendor/github.com/chromedp/cdproto/accessibility/types.go b/vendor/github.com/chromedp/cdproto/accessibility/types.go new file mode 100644 index 000000000..3d9db8bbf --- /dev/null +++ b/vendor/github.com/chromedp/cdproto/accessibility/types.go @@ -0,0 +1,456 @@ +package accessibility + +// Code generated by cdproto-gen. DO NOT EDIT. + +import ( + "errors" + + "github.com/chromedp/cdproto/cdp" + "github.com/mailru/easyjson" + "github.com/mailru/easyjson/jlexer" + "github.com/mailru/easyjson/jwriter" +) + +// NodeID unique accessibility node identifier. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXNodeId +type NodeID string + +// String returns the NodeID as string value. +func (t NodeID) String() string { + return string(t) +} + +// ValueType enum of possible property types. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueType +type ValueType string + +// String returns the ValueType as string value. +func (t ValueType) String() string { + return string(t) +} + +// ValueType values. +const ( + ValueTypeBoolean ValueType = "boolean" + ValueTypeTristate ValueType = "tristate" + ValueTypeBooleanOrUndefined ValueType = "booleanOrUndefined" + ValueTypeIdref ValueType = "idref" + ValueTypeIdrefList ValueType = "idrefList" + ValueTypeInteger ValueType = "integer" + ValueTypeNode ValueType = "node" + ValueTypeNodeList ValueType = "nodeList" + ValueTypeNumber ValueType = "number" + ValueTypeString ValueType = "string" + ValueTypeComputedString ValueType = "computedString" + ValueTypeToken ValueType = "token" + ValueTypeTokenList ValueType = "tokenList" + ValueTypeDomRelation ValueType = "domRelation" + ValueTypeRole ValueType = "role" + ValueTypeInternalRole ValueType = "internalRole" + ValueTypeValueUndefined ValueType = "valueUndefined" +) + +// MarshalEasyJSON satisfies easyjson.Marshaler. +func (t ValueType) MarshalEasyJSON(out *jwriter.Writer) { + out.String(string(t)) +} + +// MarshalJSON satisfies json.Marshaler. +func (t ValueType) MarshalJSON() ([]byte, error) { + return easyjson.Marshal(t) +} + +// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. +func (t *ValueType) UnmarshalEasyJSON(in *jlexer.Lexer) { + switch ValueType(in.String()) { + case ValueTypeBoolean: + *t = ValueTypeBoolean + case ValueTypeTristate: + *t = ValueTypeTristate + case ValueTypeBooleanOrUndefined: + *t = ValueTypeBooleanOrUndefined + case ValueTypeIdref: + *t = ValueTypeIdref + case ValueTypeIdrefList: + *t = ValueTypeIdrefList + case ValueTypeInteger: + *t = ValueTypeInteger + case ValueTypeNode: + *t = ValueTypeNode + case ValueTypeNodeList: + *t = ValueTypeNodeList + case ValueTypeNumber: + *t = ValueTypeNumber + case ValueTypeString: + *t = ValueTypeString + case ValueTypeComputedString: + *t = ValueTypeComputedString + case ValueTypeToken: + *t = ValueTypeToken + case ValueTypeTokenList: + *t = ValueTypeTokenList + case ValueTypeDomRelation: + *t = ValueTypeDomRelation + case ValueTypeRole: + *t = ValueTypeRole + case ValueTypeInternalRole: + *t = ValueTypeInternalRole + case ValueTypeValueUndefined: + *t = ValueTypeValueUndefined + + default: + in.AddError(errors.New("unknown ValueType value")) + } +} + +// UnmarshalJSON satisfies json.Unmarshaler. +func (t *ValueType) UnmarshalJSON(buf []byte) error { + return easyjson.Unmarshal(buf, t) +} + +// ValueSourceType enum of possible property sources. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueSourceType +type ValueSourceType string + +// String returns the ValueSourceType as string value. +func (t ValueSourceType) String() string { + return string(t) +} + +// ValueSourceType values. +const ( + ValueSourceTypeAttribute ValueSourceType = "attribute" + ValueSourceTypeImplicit ValueSourceType = "implicit" + ValueSourceTypeStyle ValueSourceType = "style" + ValueSourceTypeContents ValueSourceType = "contents" + ValueSourceTypePlaceholder ValueSourceType = "placeholder" + ValueSourceTypeRelatedElement ValueSourceType = "relatedElement" +) + +// MarshalEasyJSON satisfies easyjson.Marshaler. +func (t ValueSourceType) MarshalEasyJSON(out *jwriter.Writer) { + out.String(string(t)) +} + +// MarshalJSON satisfies json.Marshaler. +func (t ValueSourceType) MarshalJSON() ([]byte, error) { + return easyjson.Marshal(t) +} + +// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. +func (t *ValueSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) { + switch ValueSourceType(in.String()) { + case ValueSourceTypeAttribute: + *t = ValueSourceTypeAttribute + case ValueSourceTypeImplicit: + *t = ValueSourceTypeImplicit + case ValueSourceTypeStyle: + *t = ValueSourceTypeStyle + case ValueSourceTypeContents: + *t = ValueSourceTypeContents + case ValueSourceTypePlaceholder: + *t = ValueSourceTypePlaceholder + case ValueSourceTypeRelatedElement: + *t = ValueSourceTypeRelatedElement + + default: + in.AddError(errors.New("unknown ValueSourceType value")) + } +} + +// UnmarshalJSON satisfies json.Unmarshaler. +func (t *ValueSourceType) UnmarshalJSON(buf []byte) error { + return easyjson.Unmarshal(buf, t) +} + +// ValueNativeSourceType enum of possible native property sources (as a +// subtype of a particular AXValueSourceType). +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueNativeSourceType +type ValueNativeSourceType string + +// String returns the ValueNativeSourceType as string value. +func (t ValueNativeSourceType) String() string { + return string(t) +} + +// ValueNativeSourceType values. +const ( + ValueNativeSourceTypeDescription ValueNativeSourceType = "description" + ValueNativeSourceTypeFigcaption ValueNativeSourceType = "figcaption" + ValueNativeSourceTypeLabel ValueNativeSourceType = "label" + ValueNativeSourceTypeLabelfor ValueNativeSourceType = "labelfor" + ValueNativeSourceTypeLabelwrapped ValueNativeSourceType = "labelwrapped" + ValueNativeSourceTypeLegend ValueNativeSourceType = "legend" + ValueNativeSourceTypeRubyannotation ValueNativeSourceType = "rubyannotation" + ValueNativeSourceTypeTablecaption ValueNativeSourceType = "tablecaption" + ValueNativeSourceTypeTitle ValueNativeSourceType = "title" + ValueNativeSourceTypeOther ValueNativeSourceType = "other" +) + +// MarshalEasyJSON satisfies easyjson.Marshaler. +func (t ValueNativeSourceType) MarshalEasyJSON(out *jwriter.Writer) { + out.String(string(t)) +} + +// MarshalJSON satisfies json.Marshaler. +func (t ValueNativeSourceType) MarshalJSON() ([]byte, error) { + return easyjson.Marshal(t) +} + +// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. +func (t *ValueNativeSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) { + switch ValueNativeSourceType(in.String()) { + case ValueNativeSourceTypeDescription: + *t = ValueNativeSourceTypeDescription + case ValueNativeSourceTypeFigcaption: + *t = ValueNativeSourceTypeFigcaption + case ValueNativeSourceTypeLabel: + *t = ValueNativeSourceTypeLabel + case ValueNativeSourceTypeLabelfor: + *t = ValueNativeSourceTypeLabelfor + case ValueNativeSourceTypeLabelwrapped: + *t = ValueNativeSourceTypeLabelwrapped + case ValueNativeSourceTypeLegend: + *t = ValueNativeSourceTypeLegend + case ValueNativeSourceTypeRubyannotation: + *t = ValueNativeSourceTypeRubyannotation + case ValueNativeSourceTypeTablecaption: + *t = ValueNativeSourceTypeTablecaption + case ValueNativeSourceTypeTitle: + *t = ValueNativeSourceTypeTitle + case ValueNativeSourceTypeOther: + *t = ValueNativeSourceTypeOther + + default: + in.AddError(errors.New("unknown ValueNativeSourceType value")) + } +} + +// UnmarshalJSON satisfies json.Unmarshaler. +func (t *ValueNativeSourceType) UnmarshalJSON(buf []byte) error { + return easyjson.Unmarshal(buf, t) +} + +// ValueSource a single source for a computed AX property. +// +// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueSource +type ValueSource struct { + Type ValueSourceType `json:"type"` // What type of source this is. + Value *Value `json:"value,omitempty"` // The value of this property source. + Attribute string `json:"attribute,omitempty"` // The name of the relevant attribute, if any. + AttributeValue *Value `json:"attributeValue,omitempty"` // The value of the relevant attribute, if any. + Superseded bool `json:"superseded,omitempty"` // Whether this source is superseded by a higher priority source. + NativeSource ValueNativeSourceType `json:"nativeSource,omitempty"` // The native markup source for this value, e.g. a