load("@rules_closure//closure:defs.bzl", "closure_js_library")

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

alias(
    name = "abstractmultirange",
    actual = ":range",
)

closure_js_library(
    name = "asserts",
    srcs = ["asserts.js"],
    lenient = True,
    deps = [
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/utils",
    ],
)

closure_js_library(
    name = "browserfeature",
    srcs = ["browserfeature.js"],
    lenient = True,
    deps = ["//third_party/closure/goog/useragent"],
)

closure_js_library(
    name = "classlist",
    srcs = ["classlist.js"],
    lenient = True,
    deps = ["//third_party/closure/goog/array"],
)

alias(
    name = "controlrange",
    actual = ":range",
)

closure_js_library(
    name = "dataset",
    srcs = ["dataset.js"],
    lenient = True,
    deps = [
        "//third_party/closure/goog/labs/useragent:browser",
        "//third_party/closure/goog/string",
        "//third_party/closure/goog/useragent:product",
    ],
)

closure_js_library(
    name = "dom",
    srcs = ["dom.js"],
    lenient = True,
    deps = [
        ":browserfeature",
        ":nodetype",
        ":safe",
        ":tagname",
        "//third_party/closure/goog/array",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/asserts:dom",
        "//third_party/closure/goog/html:safehtml",
        "//third_party/closure/goog/html:uncheckedconversions",
        "//third_party/closure/goog/math:coordinate",
        "//third_party/closure/goog/math:size",
        "//third_party/closure/goog/object",
        "//third_party/closure/goog/string",
        "//third_party/closure/goog/string:const",
        "//third_party/closure/goog/useragent",
        "//third_party/closure/goog/utils",
    ],
)

closure_js_library(
    name = "element",
    srcs = ["element.js"],
    lenient = True,
    deps = [
        ":nodetype",
        ":tagname",
        "//third_party/closure/goog/utils",
    ],
)

closure_js_library(
    name = "forms",
    srcs = ["forms.js"],
    lenient = True,
    deps = [
        ":inputtype",
        ":safe",
        ":tagname",
        "//third_party/closure/goog/structs:map",
        "//third_party/closure/goog/window",
    ],
)

closure_js_library(
    name = "htmlelement",
    srcs = ["htmlelement.js"],
    lenient = True,
)

closure_js_library(
    name = "inputtype",
    srcs = ["inputtype.js"],
    lenient = True,
)

alias(
    name = "multirange",
    actual = ":range",
)

closure_js_library(
    name = "nodeiterator",
    srcs = ["nodeiterator.js"],
    lenient = True,
    deps = [
        ":tagiterator",
        "//third_party/closure/goog/iter",
    ],
)

closure_js_library(
    name = "nodetype",
    srcs = ["nodetype.js"],
    lenient = True,
)

closure_js_library(
    name = "safe",
    srcs = ["safe.js"],
    lenient = True,
    deps = [
        ":asserts",
        "//third_party/closure/goog/asserts",
        "//third_party/closure/goog/asserts:dom",
        "//third_party/closure/goog/functions",
        "//third_party/closure/goog/html:safehtml",
        "//third_party/closure/goog/html:safescript",
        "//third_party/closure/goog/html:safestyle",
        "//third_party/closure/goog/html:safeurl",
        "//third_party/closure/goog/html:trustedresourceurl",
        "//third_party/closure/goog/html:uncheckedconversions",
        "//third_party/closure/goog/string:const",
        "//third_party/closure/goog/string:internal",
    ],
)

alias(
    name = "savedcaretrange",
    actual = ":range",
)

alias(
    name = "savedrange",
    actual = ":abstractrange",
)

closure_js_library(
    name = "selection",
    srcs = ["selection.js"],
    lenient = True,
    deps = [
        ":inputtype",
        "//third_party/closure/goog/string",
        "//third_party/closure/goog/useragent",
    ],
)

closure_js_library(
    name = "tagiterator",
    srcs = ["tagiterator.js"],
    lenient = True,
    deps = [
        ":dom",
        ":nodetype",
        "//third_party/closure/goog/iter",
    ],
)

closure_js_library(
    name = "tagname",
    srcs = ["tagname.js"],
    lenient = True,
    deps = [":htmlelement"],
)

closure_js_library(
    name = "tags",
    srcs = ["tags.js"],
    lenient = True,
    deps = ["//third_party/closure/goog/object"],
)

alias(
    name = "textrange",
    actual = ":range",
)

closure_js_library(
    name = "vendor",
    srcs = ["vendor.js"],
    lenient = True,
    deps = [
        "//third_party/closure/goog/string",
        "//third_party/closure/goog/useragent",
    ],
)
