diff --git a/3.1.0/Enums.html b/3.1.0/Enums.html new file mode 100644 index 00000000..8ca29955 --- /dev/null +++ b/3.1.0/Enums.html @@ -0,0 +1,429 @@ + + + + Enumerations Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Enumerations

+

The following enumerations are available globally.

+ +
+
+
+
+ + +
+ +

Consumer +

+
+
+
    +
  • +
    + + + + Consumer + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public indirect enum Consumer<Label> : Equatable, Sendable where Label : Hashable, Label : Sendable
    +
    extension Consumer: ExpressibleByStringLiteral, ExpressibleByArrayLiteral
    +
    extension Consumer: CustomStringConvertible
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + FeatureIdentifier + +
    +
    +
    +
    +
    +
    +

    A feature identifier identifies a Feature object.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum FeatureIdentifier : Hashable, Sendable
    +
    extension FeatureIdentifier: RawRepresentable
    +
    extension FeatureIdentifier: ExpressibleByStringLiteral
    +
    extension FeatureIdentifier: ExpressibleByIntegerLiteral
    +
    extension FeatureIdentifier: ExpressibleByFloatLiteral
    +
    extension FeatureIdentifier: Codable
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + GeoJSONObject + +
    +
    +
    +
    +
    +
    +

    A GeoJSON object represents a Geometry, Feature, or collection of Features.

    +
    +

    Note

    + Foreign members which may be present inside are coded only if used JSONEncoder or JSONDecoder has userInfo[.includesForeignMembers] = true. + +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum GeoJSONObject : Equatable, Sendable
    +
    extension GeoJSONObject: Codable
    +
    extension GeoJSONObject: GeoJSONObjectConvertible
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Geometry + +
    +
    +
    +
    +
    +
    +

    A Geometry object represents points, curves, and surfaces in coordinate space. Use an instance of this enumeration whenever a value could be any kind of Geometry object.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Geometry : Equatable, Sendable
    +
    extension Geometry: GeoJSONObjectConvertible
    +
    extension Geometry: Codable
    +
    extension Geometry: GeometryConvertible
    +
    extension Geometry: WKTConvertible
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + JSONValue + +
    +
    +
    +
    +
    +
    +

    A JSON value represents an object, array, or fragment.

    + +

    This type does not represent the null value in JSON. Use Optional<JSONValue> wherever null is accepted.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum JSONValue : Hashable, Sendable
    +
    extension JSONValue: RawRepresentable
    +
    extension JSONValue: ExpressibleByStringLiteral
    +
    extension JSONValue: ExpressibleByIntegerLiteral
    +
    extension JSONValue: ExpressibleByFloatLiteral
    +
    extension JSONValue: ExpressibleByBooleanLiteral
    +
    extension JSONValue: ExpressibleByArrayLiteral
    +
    extension JSONValue: ExpressibleByDictionaryLiteral
    +
    extension JSONValue: Codable
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Enums/Consumer.html b/3.1.0/Enums/Consumer.html new file mode 100644 index 00000000..0f99c75d --- /dev/null +++ b/3.1.0/Enums/Consumer.html @@ -0,0 +1,1286 @@ + + + + Consumer Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Consumer

+
+
+ +
public indirect enum Consumer<Label> : Equatable, Sendable where Label : Hashable, Label : Sendable
+
extension Consumer: ExpressibleByStringLiteral, ExpressibleByArrayLiteral
+
extension Consumer: CustomStringConvertible
+ +
+
+

Undocumented

+ + +
+
+
+
    +
  • +
    + + + + string(_:) + +
    +
    +
    +
    +
    +
    +

    Primitives

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case string(String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + charset(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case charset(Charset)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + any(_:) + +
    +
    +
    +
    +
    +
    +

    Combinators

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case any([Consumer])
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + sequence(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case sequence([Consumer])
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + optional(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case optional(Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + oneOrMore(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case oneOrMore(Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + not(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case not(Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + flatten(_:) + +
    +
    +
    +
    +
    +
    +

    Transforms

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case flatten(Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + discard(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case discard(Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + replace(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case replace(Consumer, String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + label(_:_:) + +
    +
    +
    +
    +
    +
    +

    References

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case label(Label, Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + reference(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case reference(Label)
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Matching +

+
+
+
    +
  • +
    + + + + match(_:) + +
    +
    +
    +
    +
    +
    +

    Parse input and return matched result

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func match(_ input: String) throws -> Match
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + isOptional + +
    +
    +
    +
    +
    +
    +

    Will the consumer match empty input?

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var isOptional: Bool { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Location + +
    +
    +
    +
    +
    +
    +

    Source location

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct Location : Equatable, Sendable
    +
    extension Consumer.Location: CustomStringConvertible
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Match + +
    +
    +
    +
    +
    +
    +

    Abstract syntax tree returned by consumer

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    indirect enum Match : Equatable, Sendable
    +
    extension Consumer.Match: CustomStringConvertible
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Charset + +
    +
    +
    +
    +
    +
    +

    Opaque type used for efficient character matching

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct Charset : Hashable, Sendable
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Transform + +
    +
    +
    +
    +
    +
    +

    Closure for transforming a Match to an application-specific data type

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    typealias Transform = (_ name: Label, _ values: [Sendable]) throws -> (Sendable)?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Error + +
    +
    +
    +
    +
    +
    +

    A Parsing error

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct Error : Swift.Error
    +
    extension Consumer.Error: CustomStringConvertible
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Syntax sugar +

+
+
+
    +
  • +
    + + + + init(stringLiteral:) + +
    +
    +
    +
    +
    +
    +

    Create .string() consumer from a string literal

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(stringLiteral: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(arrayLiteral:) + +
    +
    +
    +
    +
    +
    +

    Create .sequence() consumer from an array literal

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(arrayLiteral: Consumer...)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + |(_:_:) + +
    +
    +
    +
    +
    +
    +

    Converts two consumers into an .any() consumer

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func | (lhs: Consumer, rhs: Consumer) -> Consumer
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Character sets +

+
+
+
    +
  • +
    + + + + character(_:) + +
    +
    +
    +
    +
    +
    +

    Match a character

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func character(_ c: UnicodeScalar) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + character(in:) + +
    +
    +
    +
    +
    +
    +

    Match character in range

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func character(in range: ClosedRange<UnicodeScalar>) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + character(in:) + +
    +
    +
    +
    +
    +
    +

    Match character in string

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func character(in string: String) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + character(in:) + +
    +
    +
    +
    +
    +
    +

    Match character in set

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func character(in set: CharacterSet) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + anyCharacter(except:) + +
    +
    +
    +
    +
    +
    +

    Match any character except the one(s) specified

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func anyCharacter(except characters: UnicodeScalar...) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + anyCharacter(except:) + +
    +
    +
    +
    +
    +
    +

    Match any character except the specified set

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func anyCharacter(except set: CharacterSet) -> Consumer
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Composite rules +

+
+
+
    +
  • +
    + + + + zeroOrMore(_:) + +
    +
    +
    +
    +
    +
    +

    Matches a list of zero or more consumer instances

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func zeroOrMore(_ consumer: Consumer) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + interleaved(_:_:) + +
    +
    +
    +
    +
    +
    +

    Matches one or more consumer instances, separated by an instance of separator +This is useful for something like a comma-delimited list (without a trailing comma)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func interleaved(_ consumer: Consumer, _ separator: Consumer) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + ignore(_:in:) + +
    +
    +
    +
    +
    +
    +

    Matches the target consumer, ignoring any instances of the ignored consumer +This is useful for something like ignoring whitespace between tokens +Note: Instances of ignored inside flatten clauses will not be ignored

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func ignore(_ ignored: Consumer, in target: Consumer) -> Consumer
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Consumer implementation +

+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Human-readable description of what consumer matches

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Enums/Consumer/Charset.html b/3.1.0/Enums/Consumer/Charset.html new file mode 100644 index 00000000..aed755e1 --- /dev/null +++ b/3.1.0/Enums/Consumer/Charset.html @@ -0,0 +1,290 @@ + + + + Charset Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Charset

+
+
+ +
struct Charset : Hashable, Sendable
+ +
+
+

Opaque type used for efficient character matching

+ + +
+
+
+
+ + +
+ +

Charset implementation +

+
+
+
    +
  • +
    + + + + ranges + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var ranges: [CountableClosedRange<UInt32>] { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Enums/Consumer/Error.html b/3.1.0/Enums/Consumer/Error.html new file mode 100644 index 00000000..d6d539f0 --- /dev/null +++ b/3.1.0/Enums/Consumer/Error.html @@ -0,0 +1,416 @@ + + + + Error Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Error

+
+
+ +
struct Error : Swift.Error
+
extension Consumer.Error: CustomStringConvertible
+ +
+
+

A Parsing error

+ + +
+
+
+
    +
  • +
    + + + + Kind + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public indirect enum Kind : Sendable
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + kind + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var kind: Kind
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + location + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var location: Location?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + remaining + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var remaining: Substring.UnicodeScalarView? { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Error implementation +

+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Human-readable error description

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Enums/Consumer/Error/Kind.html b/3.1.0/Enums/Consumer/Error/Kind.html new file mode 100644 index 00000000..ce57692e --- /dev/null +++ b/3.1.0/Enums/Consumer/Error/Kind.html @@ -0,0 +1,343 @@ + + + + Kind Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Kind

+
+
+ +
public indirect enum Kind : Sendable
+ +
+
+

Undocumented

+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Enums/Consumer/Location.html b/3.1.0/Enums/Consumer/Location.html new file mode 100644 index 00000000..aa2a9070 --- /dev/null +++ b/3.1.0/Enums/Consumer/Location.html @@ -0,0 +1,415 @@ + + + + Location Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Location

+
+
+ +
struct Location : Equatable, Sendable
+
extension Consumer.Location: CustomStringConvertible
+ +
+
+

Source location

+ + +
+
+
+
    +
  • +
    + + + + range + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let range: Range<String.Index>
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + offset + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var offset: (line: Int, column: Int) { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Location implementation +

+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Human-readable description of the location

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Equatable implementation

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func == (lhs: Consumer.Location, rhs: Consumer.Location) -> Bool
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + at(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func at(_ range: CountableRange<Int>) -> Consumer.Location
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Enums/Consumer/Match.html b/3.1.0/Enums/Consumer/Match.html new file mode 100644 index 00000000..ccd5c3fb --- /dev/null +++ b/3.1.0/Enums/Consumer/Match.html @@ -0,0 +1,415 @@ + + + + Match Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Match

+
+
+ +
indirect enum Match : Equatable, Sendable
+
extension Consumer.Match: CustomStringConvertible
+ +
+
+

Abstract syntax tree returned by consumer

+ + +
+
+
+
    +
  • +
    + + + + token(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case token(String, Location)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + node(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case node(Label?, [Match])
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + location + +
    +
    +
    +
    +
    +
    +

    The location of the match in the original source (if known)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var location: Location? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + transform(_:) + +
    +
    +
    +
    +
    +
    +

    Transform generic AST to application-specific form

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func transform(_ fn: Transform) rethrows -> Sendable?
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Match implementation +

+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Lisp-like description of the AST

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Enums/FeatureIdentifier.html b/3.1.0/Enums/FeatureIdentifier.html new file mode 100644 index 00000000..8011fc80 --- /dev/null +++ b/3.1.0/Enums/FeatureIdentifier.html @@ -0,0 +1,734 @@ + + + + FeatureIdentifier Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

FeatureIdentifier

+
+
+ +
public enum FeatureIdentifier : Hashable, Sendable
+
extension FeatureIdentifier: RawRepresentable
+
extension FeatureIdentifier: ExpressibleByStringLiteral
+
extension FeatureIdentifier: ExpressibleByIntegerLiteral
+
extension FeatureIdentifier: ExpressibleByFloatLiteral
+
extension FeatureIdentifier: Codable
+ +
+
+

A feature identifier identifies a Feature object.

+ + +
+
+
+
    +
  • +
    + + + + string(_:) + +
    +
    +
    +
    +
    +
    +

    A string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case string(_: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + number(_:) + +
    +
    +
    +
    +
    +
    +

    A floating-point number.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case number(_: Double)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + number + + +
    +

    A floating-point number. JSON does not distinguish numeric types of different precisions. If you need integer precision, cast this associated value to an Int.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature identifier representing the given string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ string: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature identifier representing the given integer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init<Source>(_ number: Source) where Source : BinaryInteger
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + number + + +
    +

    An integer. JSON does not distinguish numeric types of different precisions, so the integer is stored as a floating-point number.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature identifier representing the given floating-point number.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init<Source>(_ number: Source) where Source : BinaryFloatingPoint
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + RawValue + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias RawValue = Any
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(rawValue:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init?(rawValue: Any)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + rawValue + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var rawValue: Any { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + string + +
    +
    +
    +
    +
    +
    +

    A string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var string: String? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + number + +
    +
    +
    +
    +
    +
    +

    A floating-point number.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var number: Double? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(stringLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(stringLiteral value: StringLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(integerLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(integerLiteral value: IntegerLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(floatLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(floatLiteral value: FloatLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Enums/GeoJSONObject.html b/3.1.0/Enums/GeoJSONObject.html new file mode 100644 index 00000000..dfbc4a3e --- /dev/null +++ b/3.1.0/Enums/GeoJSONObject.html @@ -0,0 +1,610 @@ + + + + GeoJSONObject Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

GeoJSONObject

+
+
+ +
public enum GeoJSONObject : Equatable, Sendable
+
extension GeoJSONObject: Codable
+
extension GeoJSONObject: GeoJSONObjectConvertible
+ +
+
+

A GeoJSON object represents a Geometry, Feature, or collection of Features.

+
+

Note

+ Foreign members which may be present inside are coded only if used JSONEncoder or JSONDecoder has userInfo[.includesForeignMembers] = true. + +
+ + +
+
+
+
    +
  • +
    + + + + geometry(_:) + +
    +
    +
    +
    +
    +
    +

    A Geometry object represents points, curves, and surfaces in coordinate space.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case geometry(_: Geometry)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + geometry + + +
    +

    The GeoJSON object as a Geometry object.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + feature(_:) + +
    +
    +
    +
    +
    +
    +

    A Feature object represents a spatially bounded thing.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case feature(_: Feature)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + feature + + +
    +

    The GeoJSON object as a Feature object.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + featureCollection(_:) + +
    +
    +
    +
    +
    +
    +

    A FeatureCollection object is a collection of Feature objects.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case featureCollection(_: FeatureCollection)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + featureCollection + + +
    +

    The GeoJSON object as a FeatureCollection object.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a GeoJSON object representing the given GeoJSON object–convertible instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ object: GeoJSONObjectConvertible)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    +

    A geometry object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + feature + +
    +
    +
    +
    +
    +
    +

    A feature object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var feature: Feature? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + featureCollection + +
    +
    +
    +
    +
    +
    +

    A feature collection object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var featureCollection: FeatureCollection? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geoJSONObject + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geoJSONObject: GeoJSONObject { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Enums/Geometry.html b/3.1.0/Enums/Geometry.html new file mode 100644 index 00000000..55676b94 --- /dev/null +++ b/3.1.0/Enums/Geometry.html @@ -0,0 +1,879 @@ + + + + Geometry Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Geometry

+
+
+ +
public enum Geometry : Equatable, Sendable
+
extension Geometry: GeoJSONObjectConvertible
+
extension Geometry: Codable
+
extension Geometry: GeometryConvertible
+
extension Geometry: WKTConvertible
+ +
+
+

A Geometry object represents points, curves, and surfaces in coordinate space. Use an instance of this enumeration whenever a value could be any kind of Geometry object.

+ + +
+
+
+
    +
  • +
    + + + + point(_:) + +
    +
    +
    +
    +
    +
    +

    A single position.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case point(_: Point)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + lineString(_:) + +
    +
    +
    +
    +
    +
    +

    A collection of two or more positions, each position connected to the next position linearly.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case lineString(_: LineString)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + polygon(_:) + +
    +
    +
    +
    +
    +
    +

    Conceptually, a collection of Rings that form a single connected geometry.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case polygon(_: Polygon)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiPoint(_:) + +
    +
    +
    +
    +
    +
    +

    A collection of positions that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case multiPoint(_: MultiPoint)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiLineString(_:) + +
    +
    +
    +
    +
    +
    +

    A collection of LineString geometries that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case multiLineString(_: MultiLineString)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiPolygon(_:) + +
    +
    +
    +
    +
    +
    +

    A collection of Polygon geometries that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case multiPolygon(_: MultiPolygon)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A heterogeneous collection of geometries that are related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case geometryCollection(_: GeometryCollection)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a geometry representing the given geometry–convertible instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ geometry: GeometryConvertible)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geoJSONObject + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geoJSONObject: GeoJSONObject { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + point + +
    +
    +
    +
    +
    +
    +

    A single position.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var point: Point? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + lineString + +
    +
    +
    +
    +
    +
    +

    A collection of two or more positions, each position connected to the next position linearly.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var lineString: LineString? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + polygon + +
    +
    +
    +
    +
    +
    +

    Conceptually, a collection of Rings that form a single connected geometry.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var polygon: Polygon? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiPoint + +
    +
    +
    +
    +
    +
    +

    A collection of positions that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var multiPoint: MultiPoint? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiLineString + +
    +
    +
    +
    +
    +
    +

    A collection of LineString geometries that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var multiLineString: MultiLineString? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiPolygon + +
    +
    +
    +
    +
    +
    +

    A collection of Polygon geometries that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var multiPolygon: MultiPolygon? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometryCollection + +
    +
    +
    +
    +
    +
    +

    A heterogeneous collection of geometries that are related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometryCollection: GeometryCollection? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Enums/JSONValue.html b/3.1.0/Enums/JSONValue.html new file mode 100644 index 00000000..daa6d367 --- /dev/null +++ b/3.1.0/Enums/JSONValue.html @@ -0,0 +1,1171 @@ + + + + JSONValue Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

JSONValue

+
+
+ +
public enum JSONValue : Hashable, Sendable
+
extension JSONValue: RawRepresentable
+
extension JSONValue: ExpressibleByStringLiteral
+
extension JSONValue: ExpressibleByIntegerLiteral
+
extension JSONValue: ExpressibleByFloatLiteral
+
extension JSONValue: ExpressibleByBooleanLiteral
+
extension JSONValue: ExpressibleByArrayLiteral
+
extension JSONValue: ExpressibleByDictionaryLiteral
+
extension JSONValue: Codable
+ +
+
+

A JSON value represents an object, array, or fragment.

+ +

This type does not represent the null value in JSON. Use Optional<JSONValue> wherever null is accepted.

+ + +
+
+
+
    +
  • +
    + + + + string(_:) + +
    +
    +
    +
    +
    +
    +

    A string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case string(_: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + number(_:) + +
    +
    +
    +
    +
    +
    +

    A floating-point number.

    + +

    JSON does not distinguish numeric types of different precisions. If you need integer precision, cast the value to an Int.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case number(_: Double)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + boolean(_:) + +
    +
    +
    +
    +
    +
    +

    A Boolean value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case boolean(_: Bool)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + array(_:) + +
    +
    +
    +
    +
    +
    +

    A heterogeneous array of JSON values and null values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case array(_: JSONArray)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + object(_:) + +
    +
    +
    +
    +
    +
    +

    An object containing JSON values and null values keyed by strings.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case object(_: JSONObject)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ string: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given integer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init<Source>(_ number: Source) where Source : BinaryInteger
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + number + + +
    +

    An integer. JSON does not distinguish numeric types of different precisions, so the integer is stored as a floating-point number.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given floating-point number.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init<Source>(_ number: Source) where Source : BinaryFloatingPoint
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given Boolean value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ bool: Bool)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given JSON array.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ values: JSONArray)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given JSON object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ properties: JSONObject)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + string + +
    +
    +
    +
    +
    +
    +

    A string value, if the JSON value represents a string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var string: String? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + number + +
    +
    +
    +
    +
    +
    +

    A floating-point number value, if the JSON value represents a number.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var number: Double? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + boolean + +
    +
    +
    +
    +
    +
    +

    A Boolean value, if the JSON value represents a Boolean.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var boolean: Bool? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + array + +
    +
    +
    +
    +
    +
    +

    An array of JSON values, if the JSON value represents an array.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var array: JSONArray? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + object + +
    +
    +
    +
    +
    +
    +

    An object containing JSON values keyed by strings, if the JSON value represents an object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var object: JSONObject? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + RawValue + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias RawValue = Any
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(rawValue:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init?(rawValue: Any)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + rawValue + +
    +
    +
    +
    +
    +
    +

    This branch must happen after the NSNumber branch +to avoid converting NSNumber instances with values +0 and 1 but of objCType != ‘c’ to Bool since as? Bool +can succeed when the NSNumber’s value is 0 or 1 even +when its objCType is not ‘c’.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var rawValue: Any { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(stringLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(stringLiteral value: StringLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(integerLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(integerLiteral value: IntegerLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(floatLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(floatLiteral value: FloatLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: BooleanLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + ArrayLiteralElement + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias ArrayLiteralElement = JSONValue?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(arrayLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(arrayLiteral elements: ArrayLiteralElement...)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Key + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Key = String
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Value + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Value = JSONValue?
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(dictionaryLiteral elements: (Key, Value)...)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Extensions.html b/3.1.0/Extensions.html new file mode 100644 index 00000000..f917c0db --- /dev/null +++ b/3.1.0/Extensions.html @@ -0,0 +1,442 @@ + + + + Extensions Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Extensions

+

The following extensions are available globally.

+ +
+
+
+
+ + +
+ +

Error implementation +

+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Extensions/CodingUserInfoKey.html b/3.1.0/Extensions/CodingUserInfoKey.html new file mode 100644 index 00000000..534b897a --- /dev/null +++ b/3.1.0/Extensions/CodingUserInfoKey.html @@ -0,0 +1,278 @@ + + + + CodingUserInfoKey Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

CodingUserInfoKey

+
+
+ +
public extension CodingUserInfoKey
+ +
+
+

Key to pass to populate a userInfo dictionary, which is passed to the JSONDecoder or JSONEncoder to enable processing foreign members.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Indicates if coding of foreign members is enabled.

    + +

    Boolean flag to enable coding. Default (or missing) value is to ignore foreign members.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static let includesForeignMembers: CodingUserInfoKey
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Extensions/JSONArray.html b/3.1.0/Extensions/JSONArray.html new file mode 100644 index 00000000..3f374272 --- /dev/null +++ b/3.1.0/Extensions/JSONArray.html @@ -0,0 +1,338 @@ + + + + JSONArray Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

JSONArray

+
+
+ +
extension JSONArray
+ +
+
+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Extensions/JSONObject.html b/3.1.0/Extensions/JSONObject.html new file mode 100644 index 00000000..fa93978f --- /dev/null +++ b/3.1.0/Extensions/JSONObject.html @@ -0,0 +1,338 @@ + + + + JSONObject Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

JSONObject

+
+
+ +
extension JSONObject
+ +
+
+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Extensions/LocationCoordinate2D.html b/3.1.0/Extensions/LocationCoordinate2D.html new file mode 100644 index 00000000..efdf897c --- /dev/null +++ b/3.1.0/Extensions/LocationCoordinate2D.html @@ -0,0 +1,433 @@ + + + + LocationCoordinate2D Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

LocationCoordinate2D

+
+
+ +
extension LocationCoordinate2D: Equatable
+ +
+
+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Extensions/LocationDegrees.html b/3.1.0/Extensions/LocationDegrees.html new file mode 100644 index 00000000..027d3c44 --- /dev/null +++ b/3.1.0/Extensions/LocationDegrees.html @@ -0,0 +1,312 @@ + + + + LocationDegrees Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

LocationDegrees

+
+
+ +
extension LocationDegrees
+ +
+
+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Extensions/LocationDirection.html b/3.1.0/Extensions/LocationDirection.html new file mode 100644 index 00000000..61a6d027 --- /dev/null +++ b/3.1.0/Extensions/LocationDirection.html @@ -0,0 +1,311 @@ + + + + LocationDirection Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

LocationDirection

+
+
+ +
extension LocationDirection
+ +
+
+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Functions.html b/3.1.0/Functions.html new file mode 100644 index 00000000..4d1b61dd --- /dev/null +++ b/3.1.0/Functions.html @@ -0,0 +1,306 @@ + + + + Functions Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Functions

+

The following functions are available globally.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Protocols.html b/3.1.0/Protocols.html new file mode 100644 index 00000000..9498cd33 --- /dev/null +++ b/3.1.0/Protocols.html @@ -0,0 +1,361 @@ + + + + Protocols Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Protocols

+

The following protocols are available globally.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Protocols/ForeignMemberContainer.html b/3.1.0/Protocols/ForeignMemberContainer.html new file mode 100644 index 00000000..4e4090e6 --- /dev/null +++ b/3.1.0/Protocols/ForeignMemberContainer.html @@ -0,0 +1,281 @@ + + + + ForeignMemberContainer Protocol Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

ForeignMemberContainer

+
+
+ +
public protocol ForeignMemberContainer : Sendable
+ +
+
+

A GeoJSON object that can contain foreign members in arbitrary keys.

+ + +
+
+
+
    +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    +

    Foreign members to round-trip to JSON.

    + +

    Members are coded only if used JSONEncoder or JSONDecoder has userInfo[.includesForeignMembers] = true.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var foreignMembers: JSONObject { get set }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Protocols/GeoJSONObjectConvertible.html b/3.1.0/Protocols/GeoJSONObjectConvertible.html new file mode 100644 index 00000000..e2c1d587 --- /dev/null +++ b/3.1.0/Protocols/GeoJSONObjectConvertible.html @@ -0,0 +1,279 @@ + + + + GeoJSONObjectConvertible Protocol Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

GeoJSONObjectConvertible

+
+
+ +
public protocol GeoJSONObjectConvertible
+ +
+
+

A type that can be represented as a GeoJSONObject instance.

+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Protocols/GeometryConvertible.html b/3.1.0/Protocols/GeometryConvertible.html new file mode 100644 index 00000000..11cae387 --- /dev/null +++ b/3.1.0/Protocols/GeometryConvertible.html @@ -0,0 +1,279 @@ + + + + GeometryConvertible Protocol Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

GeometryConvertible

+
+
+ +
public protocol GeometryConvertible : Sendable
+ +
+
+

A type that can be represented as a Geometry instance.

+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Protocols/WKTConvertible.html b/3.1.0/Protocols/WKTConvertible.html new file mode 100644 index 00000000..89016a5f --- /dev/null +++ b/3.1.0/Protocols/WKTConvertible.html @@ -0,0 +1,309 @@ + + + + WKTConvertible Protocol Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

WKTConvertible

+
+
+ +
public protocol WKTConvertible
+ +
+
+

Entity which can be converted to and from ‘Well Known Text’.

+ + +
+
+
+
    +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs.html b/3.1.0/Structs.html new file mode 100644 index 00000000..97af8fa6 --- /dev/null +++ b/3.1.0/Structs.html @@ -0,0 +1,657 @@ + + + + Structures Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Structures

+

The following structures are available globally.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/BoundingBox.html b/3.1.0/Structs/BoundingBox.html new file mode 100644 index 00000000..68762cd5 --- /dev/null +++ b/3.1.0/Structs/BoundingBox.html @@ -0,0 +1,573 @@ + + + + BoundingBox Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

BoundingBox

+
+
+ +
public struct BoundingBox : Sendable
+
extension BoundingBox: Hashable
+
extension BoundingBox: Codable
+ +
+
+

A bounding box indicates the extremes of a GeoJSONObject along the x- and y-axes (longitude and latitude, respectively).

+ + +
+
+
+
    +
  • +
    + + + + southWest + +
    +
    +
    +
    +
    +
    +

    The southwesternmost position contained in the bounding box.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var southWest: LocationCoordinate2D
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + northEast + +
    +
    +
    +
    +
    +
    +

    The northeasternmost position contained in the bounding box.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var northEast: LocationCoordinate2D
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    +

    Initializes the smallest bounding box that contains all the given coordinates.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init?(from coordinates: [LocationCoordinate2D]?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The coordinates to fit in the bounding box.

    +
    +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes a bounding box defined by its southwesternmost and northeasternmost positions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(southWest: LocationCoordinate2D, northEast: LocationCoordinate2D)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + southWest + + +
    +

    The southwesternmost position contained in the bounding box.

    +
    +
    + + northEast + + +
    +

    The northeasternmost position contained in the bounding box.

    +
    +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns a Boolean value indicating whether the bounding box contains the given position.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contains(_ coordinate: LocationCoordinate2D, ignoreBoundary: Bool = true) -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + coordinate + + +
    +

    The coordinate that may or may not be contained by the bounding box.

    +
    +
    + + ignoreBoundary + + +
    +

    A Boolean value indicating whether a position lying exactly on the edge of the bounding box should be considered to be contained in the bounding box.

    +
    +
    +
    +
    +

    Return Value

    +

    true if the bounding box contains the position; false otherwise.

    +
    + +
    +
    +
  • +
  • +
    + + + + hash(into:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func hash(into hasher: inout Hasher)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/Feature.html b/3.1.0/Structs/Feature.html new file mode 100644 index 00000000..2b2a9c79 --- /dev/null +++ b/3.1.0/Structs/Feature.html @@ -0,0 +1,557 @@ + + + + Feature Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Feature

+
+
+ +
public struct Feature : Equatable, ForeignMemberContainer
+
extension Feature: Codable
+
extension Feature: GeoJSONObjectConvertible
+ +
+
+

A Feature object represents a spatially bounded thing.

+ + +
+
+
+
    +
  • +
    + + + + identifier + +
    +
    +
    +
    +
    +
    +

    A string or number that commonly identifies the feature in the context of a data set.

    + +

    Turf does not guarantee that the feature is unique; however, a data set may make such a guarantee.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var identifier: FeatureIdentifier?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + properties + +
    +
    +
    +
    +
    +
    +

    Arbitrary, JSON-compatible attributes to associate with the feature.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var properties: JSONObject?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    +

    The geometry at which the feature is located.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(geometry:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature located at the given geometry.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(geometry: Geometry)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + geometry + + +
    +

    The geometry at which the feature is located.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(geometry:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature defined by the given geometry-convertible instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(geometry: GeometryConvertible?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + geometry + + +
    +

    The geometry-convertible instance that bounds the feature.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geoJSONObject + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geoJSONObject: GeoJSONObject { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/FeatureCollection.html b/3.1.0/Structs/FeatureCollection.html new file mode 100644 index 00000000..f9d80a6b --- /dev/null +++ b/3.1.0/Structs/FeatureCollection.html @@ -0,0 +1,446 @@ + + + + FeatureCollection Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

FeatureCollection

+
+
+ +
public struct FeatureCollection : Equatable, ForeignMemberContainer
+
extension FeatureCollection: Codable
+
extension FeatureCollection: GeoJSONObjectConvertible
+ +
+
+

A FeatureCollection object is a collection of Feature objects.

+ + +
+
+
+
    +
  • +
    + + + + features + +
    +
    +
    +
    +
    +
    +

    The features that the collection contains.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var features: [Feature]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(features:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature collection containing the given features.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(features: [Feature])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + features + + +
    +

    The features that the collection contains.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geoJSONObject + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geoJSONObject: GeoJSONObject { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/GeometryCollection.html b/3.1.0/Structs/GeometryCollection.html new file mode 100644 index 00000000..8b5b9aa8 --- /dev/null +++ b/3.1.0/Structs/GeometryCollection.html @@ -0,0 +1,558 @@ + + + + GeometryCollection Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

GeometryCollection

+
+
+ +
public struct GeometryCollection : Equatable, ForeignMemberContainer, Sendable
+
extension GeometryCollection: Codable
+
extension GeometryCollection: GeometryConvertible
+
extension GeometryCollection: WKTConvertible
+ +
+
+

A GeometryCollection geometry is a heterogeneous collection of Geometry objects that are related.

+ + +
+
+
+
    +
  • +
    + + + + geometries + +
    +
    +
    +
    +
    +
    +

    The geometries contained by the geometry collection.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometries: [Geometry]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(geometries:) + +
    +
    +
    +
    +
    +
    +

    Initializes a geometry collection defined by the given geometries.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(geometries: [Geometry])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + geometries + + +
    +

    The geometries contained by the geometry collection.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a geometry collection coincident to the given multipolygon.

    + +

    You should only use this initializer if you intend to add geometries other than multipolygons to the geometry collection after initializing it.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ multiPolygon: MultiPolygon)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + multiPolygon + + +
    +

    The multipolygon that is coincident to the geometry collection.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/LineString.html b/3.1.0/Structs/LineString.html new file mode 100644 index 00000000..23700b78 --- /dev/null +++ b/3.1.0/Structs/LineString.html @@ -0,0 +1,1014 @@ + + + + LineString Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

LineString

+
+
+ +
public struct LineString : Equatable, ForeignMemberContainer
+
extension LineString: Codable
+
extension LineString: GeometryConvertible
+
extension LineString: WKTConvertible
+ +
+
+

A LineString geometry is a collection of two or more positions, each position connected to the next position linearly.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The positions at which the line string is located.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: [LocationCoordinate2D]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a line string defined by given positions.

    + +

    This initializer is equivalent to the lineString function in the turf-helpers package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: [LocationCoordinate2D])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The positions at which the line string is located.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a line string coincident to the given linear ring.

    + +

    This initializer is roughly equivalent to the polygon-to-line package of Turf.js (source code), except that it accepts a linear ring instead of a full polygon.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ ring: Ring)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + ring + + +
    +

    The linear ring coincident to the line string.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns the line string transformed into an approximation of a curve by applying a Bézier spline algorithm.

    + +

    This method is equivalent to the turf-bezier-spline package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func bezier(resolution: Int = 10000, sharpness: Double = 0.85) -> LineString?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + trimmed(from:to:) + +
    +
    +
    +
    +
    +
    +

    Returns the portion of the line string that begins at the given start distance and extends the given stop distance along the line string.

    + +

    This method is equivalent to the turf-line-slice-along package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func trimmed(from startDistance: LocationDistance, to stopDistance: LocationDistance) -> LineString?
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns the portion of the line string that begins at the given coordinate and extends the given distance along the line string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func trimmed(from coordinate: LocationCoordinate2D, distance: LocationDistance) -> LineString?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + IndexedCoordinate + +
    +
    +
    +
    +
    +
    +

    IndexedCoordinate is a coordinate with additional information such as the index from its position in the polyline and distance from the start of the polyline.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct IndexedCoordinate : Sendable
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns a coordinate along a line string at a certain distance from the start of the polyline.

    + +

    This method is equivalent to the turf-along package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func coordinateFromStart(distance: LocationDistance) -> LocationCoordinate2D?
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns an indexed coordinate along a line string at a certain distance from the start of the polyline.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func indexedCoordinateFromStart(distance: LocationDistance) -> IndexedCoordinate?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + distance(from:to:) + +
    +
    +
    +
    +
    +
    +

    Returns the distance along a slice of the line string with the given endpoints.

    + +

    If the start and end arguments are unspecified, this method is equivalent to the turf-length package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func distance(from start: LocationCoordinate2D? = nil, to end: LocationCoordinate2D? = nil) -> LocationDistance?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + sliced(from:to:) + +
    +
    +
    +
    +
    +
    +

    Returns a subset of the line string between two given coordinates.

    + +

    This method is equivalent to the turf-line-slice package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func sliced(from start: LocationCoordinate2D? = nil, to end: LocationCoordinate2D? = nil) -> LineString?
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns the geographic coordinate along the line string that is closest to the given coordinate as the crow flies.

    + +

    The returned coordinate may not correspond to one of the polyline’s vertices, but it always lies along the polyline.

    + +

    This method is equivalent to the turf-nearest-point-on-line package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func closestCoordinate(to coordinate: LocationCoordinate2D) -> IndexedCoordinate?
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns a copy of the line string simplified using the Ramer–Douglas–Peucker algorithm.

    + +

    This method is equivalent to the turf-simplify package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func simplified(tolerance: Double = 1.0, highestQuality: Bool = false) -> LineString
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + tolerance + + +
    +

    Controls the level of simplification by specifying the maximum allowed distance between the original line point and the simplified point. A higher tolerance value results in higher simplification.

    +
    +
    + + highestQuality + + +
    +

    Excludes the distance-based preprocessing step that leads to highest-quality simplification. High-quality simplification runs considerably slower, so consider how much precision is needed in your application.

    +
    +
    +
    +
    +

    Return Value

    +

    A simplified line string.

    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Simplifies the line string in place using the Ramer–Douglas–Peucker algorithm.

    + +

    This method is nearly equivalent to the turf-simplify package of Turf.js (source code), except that it mutates the line string it is called on.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public mutating func simplify(tolerance: Double = 1.0, highestQuality: Bool = false)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + tolerance + + +
    +

    Controls the level of simplification by specifying the maximum allowed distance between the original line point and the simplified point. A higher tolerance value results in higher simplification.

    +
    +
    + + highestQuality + + +
    +

    Excludes the distance-based preprocessing step that leads to highest-quality simplification. High-quality simplification runs considerably slower, so consider how much precision is needed in your application.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + intersections(with:) + +
    +
    +
    +
    +
    +
    +

    Returns all intersections with another LineString.

    + +

    This function is roughly equivalent to the turf-line-intersect package of Turf.js (source code). Order of found intersections is not determined.

    + +

    You can also use Turf.intersection(_:, _:) if you need to find intersection of individual LineSegments.

    +
    +

    Seealso

    + Turf.intersection(_:, _:) + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func intersections(with line: LineString) -> [LocationCoordinate2D]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/LineString/IndexedCoordinate.html b/3.1.0/Structs/LineString/IndexedCoordinate.html new file mode 100644 index 00000000..4815efb7 --- /dev/null +++ b/3.1.0/Structs/LineString/IndexedCoordinate.html @@ -0,0 +1,341 @@ + + + + IndexedCoordinate Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

IndexedCoordinate

+
+
+ +
public struct IndexedCoordinate : Sendable
+ +
+
+

IndexedCoordinate is a coordinate with additional information such as the index from its position in the polyline and distance from the start of the polyline.

+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/LocationCoordinate2D.html b/3.1.0/Structs/LocationCoordinate2D.html new file mode 100644 index 00000000..02936b29 --- /dev/null +++ b/3.1.0/Structs/LocationCoordinate2D.html @@ -0,0 +1,296 @@ + + + + LocationCoordinate2D Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

LocationCoordinate2D

+

A geographic coordinate with its components measured in degrees.

+ +
+
+
+
    +
  • +
    + + + + latitude + +
    +
    +
    +
    +
    +
    +

    The latitude in degrees.

    + +
    +
    +
    +
  • +
  • +
    + + + + longitude + +
    +
    +
    +
    +
    +
    +

    The longitude in degrees.

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a degree-based geographic coordinate.

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/MultiLineString.html b/3.1.0/Structs/MultiLineString.html new file mode 100644 index 00000000..4f825504 --- /dev/null +++ b/3.1.0/Structs/MultiLineString.html @@ -0,0 +1,558 @@ + + + + MultiLineString Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

MultiLineString

+
+
+ +
public struct MultiLineString : Equatable, ForeignMemberContainer
+
extension MultiLineString: Codable
+
extension MultiLineString: GeometryConvertible
+
extension MultiLineString: WKTConvertible
+ +
+
+

A MultiLineString geometry is a collection of LineString geometries that are disconnected but related.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The positions at which the multi–line string is located. Each nested array corresponds to one line string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: [[LocationCoordinate2D]]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a multi–line string defined by the given positions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: [[LocationCoordinate2D]])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The positions at which the multi–line string is located. Each nested array corresponds to one line string.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a multi–line string coincident to the given polygon’s linear rings.

    + +

    This initializer is equivalent to the polygon-to-line package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ polygon: Polygon)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + polygon + + +
    +

    The polygon whose linear rings are coincident to the multi–line string.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/MultiPoint.html b/3.1.0/Structs/MultiPoint.html new file mode 100644 index 00000000..839c0d6f --- /dev/null +++ b/3.1.0/Structs/MultiPoint.html @@ -0,0 +1,507 @@ + + + + MultiPoint Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

MultiPoint

+
+
+ +
public struct MultiPoint : Equatable, ForeignMemberContainer
+
extension MultiPoint: Codable
+
extension MultiPoint: GeometryConvertible
+
extension MultiPoint: WKTConvertible
+ +
+
+

A MultiPoint geometry represents a collection of disconnected but related positions.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The positions at which the multipoint is located.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: [LocationCoordinate2D]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a multipoint defined by the given positions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: [LocationCoordinate2D])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The positions at which the multipoint is located.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/MultiPolygon.html b/3.1.0/Structs/MultiPolygon.html new file mode 100644 index 00000000..4c1a562f --- /dev/null +++ b/3.1.0/Structs/MultiPolygon.html @@ -0,0 +1,620 @@ + + + + MultiPolygon Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

MultiPolygon

+
+
+ +
public struct MultiPolygon : Equatable, ForeignMemberContainer
+
extension MultiPolygon: Codable
+
extension MultiPolygon: GeometryConvertible
+
extension MultiPolygon: WKTConvertible
+ +
+
+

A MultiPolygon geometry is a collection of Polygon geometries that are disconnected but related.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The positions at which the multipolygon is located. Each nested array corresponds to one polygon.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: [[[LocationCoordinate2D]]]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + polygons + +
    +
    +
    +
    +
    +
    +

    The polygon geometries that conceptually form the multipolygon.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var polygons: [Polygon] { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a multipolygon defined by the given positions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: [[[LocationCoordinate2D]]])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The positions at which the multipolygon is located. Each nested array corresponds to one polygon.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a multipolygon coincident to the given polygons.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ polygons: [Polygon])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + polygons + + +
    +

    The polygons that together are coincident to the multipolygon.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Determines if the given coordinate falls within any of the polygons. + The optional parameter ignoreBoundary will result in the method returning true if the given coordinate + lies on the boundary line of the polygon or its interior rings.

    + +

    Calls contains function for each contained polygon

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contains(_ coordinate: LocationCoordinate2D, ignoreBoundary: Bool = false) -> Bool
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/Point.html b/3.1.0/Structs/Point.html new file mode 100644 index 00000000..628b7b12 --- /dev/null +++ b/3.1.0/Structs/Point.html @@ -0,0 +1,509 @@ + + + + Point Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Point

+
+
+ +
public struct Point : Equatable, ForeignMemberContainer, Sendable
+
extension Point: Codable
+
extension Point: GeometryConvertible
+
extension Point: WKTConvertible
+ +
+
+

A Point geometry represents a single position.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The position at which the point is located.

    + +

    This property has a plural name for consistency with RFC 7946. For convenience, it is represented by a LocationCoordinate2D instead of a dedicated Position type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: LocationCoordinate2D
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a point defined by the given position.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: LocationCoordinate2D)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The position at which the point is located.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/Polygon.html b/3.1.0/Structs/Polygon.html new file mode 100644 index 00000000..9b143888 --- /dev/null +++ b/3.1.0/Structs/Polygon.html @@ -0,0 +1,1075 @@ + + + + Polygon Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Polygon

+
+
+ +
public struct Polygon : Equatable, ForeignMemberContainer
+
extension Polygon: Codable
+
extension Polygon: GeometryConvertible
+
extension Polygon: WKTConvertible
+ +
+
+

A Polygon geometry is conceptually a collection of Rings that form a single connected geometry.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The positions at which the polygon is located. Each nested array corresponds to one linear ring.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: [[LocationCoordinate2D]]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a polygon defined by the given positions.

    + +

    This initializer is equivalent to the polygon function in the turf-helpers package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: [[LocationCoordinate2D]])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The positions at which the polygon is located. Each nested array corresponds to one linear ring.

    +
    +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes a polygon defined by the given linear rings.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(outerRing: Ring, innerRings: [Ring] = [])
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + outerRing + + +
    +

    The outer linear ring.

    +
    +
    + + innerRings + + +
    +

    The inner linear rings that define “holes” in the polygon.

    +
    +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes a polygon as a given center coordinate with a given number of +vertices, as a means to approximate a circle.

    + +

    This initializer is equivalent to the turf-circle package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(center: LocationCoordinate2D, radius: LocationDistance, vertices: Int)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + center + + +
    +

    The center coordinate for the polygon.

    +
    +
    + + radius + + +
    +

    The radius of the polygon, measured in meters.

    +
    +
    + + vertices + + +
    +

    The number of vertices the polygon will have. + The recommended amount is 64.

    +
    +
    +
    +
    +

    Return Value

    +

    A polygon shape which approximates a circle.

    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + innerRings + +
    +
    +
    +
    +
    +
    +

    Representation of Polygons coordinates of inner rings

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var innerRings: [Ring] { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + outerRing + +
    +
    +
    +
    +
    +
    +

    Representation of Polygons coordinates of outer ring

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var outerRing: Ring { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + area + +
    +
    +
    +
    +
    +
    +

    The polygon’s area.

    + +

    This property is equivalent to the turf-area package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var area: Double { get }
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns whether the given coordinate falls within the polygon and outside of its interior rings.

    + +

    This method is equivalent to the turf-boolean-point-in-polygon package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contains(_ coordinate: LocationCoordinate2D, ignoreBoundary: Bool = false) -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + coordinate + + +
    +

    The coordinate to test for containment.

    +
    +
    + + ignoreBoundary + + +
    +

    Consider the coordinate to fall within the polygon even if it lies directly on one of the polygon’s linear rings.

    +
    +
    +
    +
    +

    Return Value

    +

    True if the coordinate falls within the polygon; false otherwise.

    +
    + +
    +
    +
  • +
  • +
    + + + + smooth(iterations:) + +
    +
    +
    +
    +
    +
    +

    Returns the polygon with corners smoothed out using Chaikin’s algorithm.

    + +

    This method is equivalent to the turf-polygon-smooth package of Turf.js (source code).

    +
    +

    Note

    + The returned polygon may be a degenerate polygon. + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func smooth(iterations: Int = 3) -> Polygon
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns a copy of the polygon simplified using the Ramer–Douglas–Peucker algorithm.

    + +

    This method is equivalent to the turf-simplify package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func simplified(tolerance: Double = 1.0, highestQuality: Bool = false) -> Polygon
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + tolerance + + +
    +

    Controls the level of simplification by specifying the maximum allowed distance between the original line point and the simplified point. A higher tolerance value results in higher simplification.

    +
    +
    + + highestQuality + + +
    +

    Excludes the distance-based preprocessing step that leads to highest-quality simplification. High-quality simplification runs considerably slower, so consider how much precision is needed in your application.

    +
    +
    +
    +
    +

    Return Value

    +

    A simplified polygon.

    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Simplifies the polygon in place using the Ramer–Douglas–Peucker algorithm.

    + +

    This method is nearly equivalent to the turf-simplify package of Turf.js (source code), except that it mutates the polygon it is called on.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public mutating func simplify(tolerance: Double = 1.0, highestQuality: Bool = false)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + tolerance + + +
    +

    Controls the level of simplification by specifying the maximum allowed distance between the original line point and the simplified point. A higher tolerance value results in higher simplification.

    +
    +
    + + highestQuality + + +
    +

    Excludes the distance-based preprocessing step that leads to highest-quality simplification. High-quality simplification runs considerably slower, so consider how much precision is needed in your application.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + center + +
    +
    +
    +
    +
    +
    +

    Calculates the absolute center of the bounding box.

    + +

    This property is equivalent to the turf-center package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var center: LocationCoordinate2D? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + centroid + +
    +
    +
    +
    +
    +
    +

    Calculates the centroid using the mean of all vertices.

    + +

    Compared to center and centerOfMass, the centroid is less affected by small islands and artifacts.

    + +

    This property is equivalent to the turf-centroid package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var centroid: LocationCoordinate2D? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + centerOfMass + +
    +
    +
    +
    +
    +
    +

    Calculates the center of mass using the centroid of polygon formula.

    + +

    This property is equivalent to the turf-center-of-mass package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var centerOfMass: LocationCoordinate2D? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/RadianCoordinate2D.html b/3.1.0/Structs/RadianCoordinate2D.html new file mode 100644 index 00000000..f5540794 --- /dev/null +++ b/3.1.0/Structs/RadianCoordinate2D.html @@ -0,0 +1,449 @@ + + + + RadianCoordinate2D Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

RadianCoordinate2D

+
+
+ +
public struct RadianCoordinate2D : Sendable
+ +
+
+

A coordinate pair measured in radians, as opposed to LocationCoordinate2D, which is measured in degrees of arc.

+ + +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Initializes a coordinate pair located at the given latitude and longitude.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(latitude: LocationRadians, longitude: LocationRadians)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + latitude + + +
    +

    The latitude measured in radians.

    +
    +
    + + longitude + + +
    +

    The longitude measured in radians.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a coordinate pair measured in radians that is coincident to the given coordinate pair measured in degrees of arc.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ degreeCoordinate: LocationCoordinate2D)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + degreeCoordinate + + +
    +

    A coordinate pair measured in degrees of arc.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + direction(to:) + +
    +
    +
    +
    +
    +
    +

    Returns direction given two coordinates.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func direction(to coordinate: RadianCoordinate2D) -> Measurement<UnitAngle>
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns coordinate at a given distance and direction away from coordinate.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func coordinate(at distance: RadianDistance, facing direction: Measurement<UnitAngle>) -> RadianCoordinate2D
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + distance(to:) + +
    +
    +
    +
    +
    +
    +

    Returns the Haversine distance between two coordinates measured in radians.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func distance(to coordinate: RadianCoordinate2D) -> RadianDistance
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/Structs/Ring.html b/3.1.0/Structs/Ring.html new file mode 100644 index 00000000..f7766fc3 --- /dev/null +++ b/3.1.0/Structs/Ring.html @@ -0,0 +1,456 @@ + + + + Ring Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Ring

+
+
+ +
public struct Ring : Sendable
+
extension Ring: Codable
+ +
+
+

A linear ring is a closed figure bounded by three or more straight line segments.

+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/Typealiases.html b/3.1.0/Typealiases.html new file mode 100644 index 00000000..545e7848 --- /dev/null +++ b/3.1.0/Typealiases.html @@ -0,0 +1,572 @@ + + + + Type Aliases Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Type Aliases

+

The following type aliases are available globally.

+ +
+
+
+
    +
  • +
    + + + + LocationDirection + +
    +
    +
    +
    +
    +
    +

    An azimuth measured in degrees clockwise from true north.

    + +

    This is a compatibility shim to keep the library’s public interface consistent between Apple and non-Apple platforms that lack Core Location. On Apple platforms, you can use CLLocationDirection anywhere you see this type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LocationDirection = CLLocationDirection
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LocationDistance + +
    +
    +
    +
    +
    +
    +

    A distance in meters.

    + +

    This is a compatibility shim to keep the library’s public interface consistent between Apple and non-Apple platforms that lack Core Location. On Apple platforms, you can use CLLocationDistance anywhere you see this type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LocationDistance = CLLocationDistance
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LocationDegrees + +
    +
    +
    +
    +
    +
    +

    A latitude or longitude in degrees.

    + +

    This is a compatibility shim to keep the library’s public interface consistent between Apple and non-Apple platforms that lack Core Location. On Apple platforms, you can use CLLocationDegrees anywhere you see this type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LocationDegrees = CLLocationDegrees
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LocationCoordinate2D + +
    +
    +
    +
    +
    +
    +

    A geographic coordinate.

    + +

    This is a compatibility shim to keep the library’s public interface consistent between Apple and non-Apple platforms that lack Core Location. On Apple platforms, you can use CLLocationCoordinate2D anywhere you see this type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LocationCoordinate2D = CLLocationCoordinate2D
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LocationDirection + +
    +
    +
    +
    +
    +
    +

    An azimuth measured in degrees clockwise from true north.

    + +
    +
    +
    +
  • +
  • +
    + + + + LocationDistance + +
    +
    +
    +
    +
    +
    +

    A distance in meters.

    + +
    +
    +
    +
  • +
  • +
    + + + + LocationDegrees + +
    +
    +
    +
    +
    +
    +

    A latitude or longitude in degrees.

    + +
    +
    +
    +
  • +
  • +
    + + + + JSONArray + +
    +
    +
    +
    +
    +
    +

    A JSON array of JSONValue instances.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias JSONArray = [JSONValue?]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + JSONObject + +
    +
    +
    +
    +
    +
    +

    A JSON object represented in memory by a dictionary with strings as keys and JSONValue instances as values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias JSONObject = [String : JSONValue?]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LocationRadians + +
    +
    +
    +
    +
    +
    +

    A latitude or longitude measured in radians, as opposed to LocationDegrees, which is measured in degrees of arc.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LocationRadians = Double
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + RadianDistance + +
    +
    +
    +
    +
    +
    +

    A difference in latitude or longitude measured in radians, as opposed to CLLocationDegrees, which is used by some libraries to represent a similar distance measured in degrees of arc.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias RadianDistance = Double
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LineSegment + +
    +
    +
    +
    +
    +
    +

    A segment between two positions in a LineString geometry or Ring.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LineSegment = (LocationCoordinate2D, LocationCoordinate2D)
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/badge.svg b/3.1.0/badge.svg new file mode 100644 index 00000000..be498fa5 --- /dev/null +++ b/3.1.0/badge.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + documentation + + + documentation + + + 86% + + + 86% + + + diff --git a/3.1.0/css/highlight.css b/3.1.0/css/highlight.css new file mode 100644 index 00000000..c170357c --- /dev/null +++ b/3.1.0/css/highlight.css @@ -0,0 +1,202 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ +/* Credit to https://gist.github.com/wataru420/2048287 */ +.highlight .c { + color: #999988; + font-style: italic; } + +.highlight .err { + color: #a61717; + background-color: #e3d2d2; } + +.highlight .k { + color: #000000; + font-weight: bold; } + +.highlight .o { + color: #000000; + font-weight: bold; } + +.highlight .cm { + color: #999988; + font-style: italic; } + +.highlight .cp { + color: #999999; + font-weight: bold; } + +.highlight .c1 { + color: #999988; + font-style: italic; } + +.highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + +.highlight .gd { + color: #000000; + background-color: #ffdddd; } + +.highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + +.highlight .ge { + color: #000000; + font-style: italic; } + +.highlight .gr { + color: #aa0000; } + +.highlight .gh { + color: #999999; } + +.highlight .gi { + color: #000000; + background-color: #ddffdd; } + +.highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + +.highlight .go { + color: #888888; } + +.highlight .gp { + color: #555555; } + +.highlight .gs { + font-weight: bold; } + +.highlight .gu { + color: #aaaaaa; } + +.highlight .gt { + color: #aa0000; } + +.highlight .kc { + color: #000000; + font-weight: bold; } + +.highlight .kd { + color: #000000; + font-weight: bold; } + +.highlight .kp { + color: #000000; + font-weight: bold; } + +.highlight .kr { + color: #000000; + font-weight: bold; } + +.highlight .kt { + color: #445588; } + +.highlight .m { + color: #009999; } + +.highlight .s { + color: #d14; } + +.highlight .na { + color: #008080; } + +.highlight .nb { + color: #0086B3; } + +.highlight .nc { + color: #445588; + font-weight: bold; } + +.highlight .no { + color: #008080; } + +.highlight .ni { + color: #800080; } + +.highlight .ne { + color: #990000; + font-weight: bold; } + +.highlight .nf { + color: #990000; } + +.highlight .nn { + color: #555555; } + +.highlight .nt { + color: #000080; } + +.highlight .nv { + color: #008080; } + +.highlight .ow { + color: #000000; + font-weight: bold; } + +.highlight .w { + color: #bbbbbb; } + +.highlight .mf { + color: #009999; } + +.highlight .mh { + color: #009999; } + +.highlight .mi { + color: #009999; } + +.highlight .mo { + color: #009999; } + +.highlight .sb { + color: #d14; } + +.highlight .sc { + color: #d14; } + +.highlight .sd { + color: #d14; } + +.highlight .s2 { + color: #d14; } + +.highlight .se { + color: #d14; } + +.highlight .sh { + color: #d14; } + +.highlight .si { + color: #d14; } + +.highlight .sx { + color: #d14; } + +.highlight .sr { + color: #009926; } + +.highlight .s1 { + color: #d14; } + +.highlight .ss { + color: #990073; } + +.highlight .bp { + color: #999999; } + +.highlight .vc { + color: #008080; } + +.highlight .vg { + color: #008080; } + +.highlight .vi { + color: #008080; } + +.highlight .il { + color: #009999; } diff --git a/3.1.0/css/jazzy.css b/3.1.0/css/jazzy.css new file mode 100644 index 00000000..f84ef864 --- /dev/null +++ b/3.1.0/css/jazzy.css @@ -0,0 +1,442 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ +html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { + background: transparent; + border: 0; + margin: 0; + outline: 0; + padding: 0; + vertical-align: baseline; } + +body { + background-color: #f2f2f2; + font-family: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + -webkit-font-smoothing: subpixel-antialiased; + word-wrap: break-word; } + +h1, h2, h3 { + margin-top: 0.8em; + margin-bottom: 0.3em; + font-weight: 100; + color: black; } + +h1 { + font-size: 2.5em; } + +h2 { + font-size: 2em; + border-bottom: 1px solid #e2e2e2; } + +h4 { + font-size: 13px; + line-height: 1.5; + margin-top: 21px; } + +h5 { + font-size: 1.1em; } + +h6 { + font-size: 1.1em; + color: #777; } + +.section-name { + color: gray; + display: block; + font-family: Helvetica; + font-size: 22px; + font-weight: 100; + margin-bottom: 15px; } + +pre, code { + font: 0.95em Menlo, monospace; + color: #777; + word-wrap: normal; } + +p code, li code { + background-color: #eee; + padding: 2px 4px; + border-radius: 4px; } + +pre > code { + padding: 0; } + +a { + color: #0088cc; + text-decoration: none; } + a code { + color: inherit; } + +ul { + padding-left: 15px; } + +li { + line-height: 1.8em; } + +img { + max-width: 100%; } + +blockquote { + margin-left: 0; + padding: 0 10px; + border-left: 4px solid #ccc; } + +hr { + height: 1px; + border: none; + background-color: #e2e2e2; } + +.footnote-ref { + display: inline-block; + scroll-margin-top: 70px; } + +.footnote-def { + scroll-margin-top: 70px; } + +.content-wrapper { + margin: 0 auto; + width: 980px; } + +header { + font-size: 0.85em; + line-height: 32px; + background-color: #414141; + position: fixed; + width: 100%; + z-index: 3; } + header img { + padding-right: 6px; + vertical-align: -3px; + height: 16px; } + header a { + color: #fff; } + header p { + float: left; + color: #999; } + header .header-right { + float: right; + margin-left: 16px; } + +#breadcrumbs { + background-color: #f2f2f2; + height: 26px; + padding-top: 12px; + position: fixed; + width: inherit; + z-index: 2; + margin-top: 32px; + white-space: nowrap; + overflow-x: scroll; } + #breadcrumbs #carat { + height: 10px; + margin: 0 5px; } + +.sidebar { + background-color: #f9f9f9; + border: 1px solid #e2e2e2; + overflow-y: auto; + overflow-x: hidden; + position: fixed; + top: 70px; + bottom: 0; + width: 230px; + word-wrap: normal; } + +.nav-groups { + list-style-type: none; + background: #fff; + padding-left: 0; } + +.nav-group-name { + border-bottom: 1px solid #e2e2e2; + font-size: 1.1em; + font-weight: 100; + padding: 15px 0 15px 20px; } + .nav-group-name > a { + color: #333; } + +.nav-group-tasks { + margin-top: 5px; } + +.nav-group-task { + font-size: 0.9em; + list-style-type: none; + white-space: nowrap; } + .nav-group-task a { + color: #888; } + +.main-content { + background-color: #fff; + border: 1px solid #e2e2e2; + margin-left: 246px; + position: absolute; + overflow: hidden; + padding-bottom: 20px; + top: 70px; + width: 734px; } + .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { + margin-bottom: 1em; } + .main-content p { + line-height: 1.8em; } + .main-content section .section:first-child { + margin-top: 0; + padding-top: 0; } + .main-content section .task-group-section .task-group:first-of-type { + padding-top: 10px; } + .main-content section .task-group-section .task-group:first-of-type .section-name { + padding-top: 15px; } + .main-content section .heading:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .main-content .section-name p { + margin-bottom: inherit; + line-height: inherit; } + .main-content .section-name code { + background-color: inherit; + padding: inherit; + color: inherit; } + +.section { + padding: 0 25px; } + +.highlight { + background-color: #eee; + padding: 10px 12px; + border: 1px solid #e2e2e2; + border-radius: 4px; + overflow-x: auto; } + +.declaration .highlight { + overflow-x: initial; + padding: 0 40px 40px 0; + margin-bottom: -25px; + background-color: transparent; + border: none; } + +.section-name { + margin: 0; + margin-left: 18px; } + +.task-group-section { + margin-top: 10px; + padding-left: 6px; + border-top: 1px solid #e2e2e2; } + +.task-group { + padding-top: 0px; } + +.task-name-container a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + +.section-name-container { + position: relative; + display: inline-block; } + .section-name-container .section-name-link { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + margin-bottom: 0; } + .section-name-container .section-name { + position: relative; + pointer-events: none; + z-index: 1; } + .section-name-container .section-name a { + pointer-events: auto; } + +.item { + padding-top: 8px; + width: 100%; + list-style-type: none; } + .item a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .item code { + background-color: transparent; + padding: 0; } + .item .token, .item .direct-link { + display: inline-block; + text-indent: -20px; + padding-left: 3px; + margin-left: 35px; + font-size: 11.9px; + transition: all 300ms; } + .item .token-open { + margin-left: 20px; } + .item .discouraged { + text-decoration: line-through; } + +.declaration-note { + font-size: .85em; + color: gray; + font-style: italic; } + +.pointer-container { + border-bottom: 1px solid #e2e2e2; + left: -23px; + padding-bottom: 13px; + position: relative; + width: 110%; } + +.pointer { + background: #f9f9f9; + border-left: 1px solid #e2e2e2; + border-top: 1px solid #e2e2e2; + height: 12px; + left: 21px; + top: -7px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + position: absolute; + width: 12px; } + +.height-container { + display: none; + left: -25px; + padding: 0 25px; + position: relative; + width: 100%; + overflow: hidden; } + .height-container .section { + background: #f9f9f9; + border-bottom: 1px solid #e2e2e2; + left: -25px; + position: relative; + width: 100%; + padding-top: 10px; + padding-bottom: 5px; } + +.aside, .language { + padding: 6px 12px; + margin: 12px 0; + border-left: 5px solid #dddddd; + overflow-y: hidden; } + .aside .aside-title, .language .aside-title { + font-size: 9px; + letter-spacing: 2px; + text-transform: uppercase; + padding-bottom: 0; + margin: 0; + color: #aaa; + -webkit-user-select: none; } + .aside p:last-child, .language p:last-child { + margin-bottom: 0; } + +.language { + border-left: 5px solid #cde9f4; } + .language .aside-title { + color: #4b8afb; } + +.aside-warning, .aside-deprecated, .aside-unavailable { + border-left: 5px solid #ff6666; } + .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { + color: #ff0000; } + +.graybox { + border-collapse: collapse; + width: 100%; } + .graybox p { + margin: 0; + word-break: break-word; + min-width: 50px; } + .graybox td { + border: 1px solid #e2e2e2; + padding: 5px 25px 5px 10px; + vertical-align: middle; } + .graybox tr td:first-of-type { + text-align: right; + padding: 7px; + vertical-align: top; + word-break: normal; + width: 40px; } + +.slightly-smaller { + font-size: 0.9em; } + +#footer { + position: relative; + top: 10px; + bottom: 0px; + margin-left: 25px; } + #footer p { + margin: 0; + color: #aaa; + font-size: 0.8em; } + +html.dash header, html.dash #breadcrumbs, html.dash .sidebar { + display: none; } + +html.dash .main-content { + width: 980px; + margin-left: 0; + border: none; + width: 100%; + top: 0; + padding-bottom: 0; } + +html.dash .height-container { + display: block; } + +html.dash .item .token { + margin-left: 0; } + +html.dash .content-wrapper { + width: auto; } + +html.dash #footer { + position: static; } + +form[role=search] { + float: right; } + form[role=search] input { + font: Helvetica, freesans, Arial, sans-serif; + margin-top: 6px; + font-size: 13px; + line-height: 20px; + padding: 0px 10px; + border: none; + border-radius: 1em; } + .loading form[role=search] input { + background: white url(../img/spinner.gif) center right 4px no-repeat; } + form[role=search] .tt-menu { + margin: 0; + min-width: 300px; + background: #fff; + color: #333; + border: 1px solid #e2e2e2; + z-index: 4; } + form[role=search] .tt-highlight { + font-weight: bold; } + form[role=search] .tt-suggestion { + font: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + padding: 0 8px; } + form[role=search] .tt-suggestion span { + display: table-cell; + white-space: nowrap; } + form[role=search] .tt-suggestion .doc-parent-name { + width: 100%; + text-align: right; + font-weight: normal; + font-size: 0.9em; + padding-left: 16px; } + form[role=search] .tt-suggestion:hover, + form[role=search] .tt-suggestion.tt-cursor { + cursor: pointer; + background-color: #4183c4; + color: #fff; } + form[role=search] .tt-suggestion:hover .doc-parent-name, + form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { + color: #fff; } diff --git a/3.1.0/docsets/Turf.docset/Contents/Info.plist b/3.1.0/docsets/Turf.docset/Contents/Info.plist new file mode 100644 index 00000000..f4de0a36 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleIdentifier + com.jazzy.turf + CFBundleName + Turf + DocSetPlatformFamily + turf + isDashDocset + + dashIndexFilePath + index.html + isJavaScriptEnabled + + DashDocSetFamily + dashtoc + DashDocSetFallbackURL + https://mapbox.github.io/turf-swift/3.1.0/ + + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums.html new file mode 100644 index 00000000..8ca29955 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums.html @@ -0,0 +1,429 @@ + + + + Enumerations Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Enumerations

+

The following enumerations are available globally.

+ +
+
+
+
+ + +
+ +

Consumer +

+
+
+
    +
  • +
    + + + + Consumer + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public indirect enum Consumer<Label> : Equatable, Sendable where Label : Hashable, Label : Sendable
    +
    extension Consumer: ExpressibleByStringLiteral, ExpressibleByArrayLiteral
    +
    extension Consumer: CustomStringConvertible
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + FeatureIdentifier + +
    +
    +
    +
    +
    +
    +

    A feature identifier identifies a Feature object.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum FeatureIdentifier : Hashable, Sendable
    +
    extension FeatureIdentifier: RawRepresentable
    +
    extension FeatureIdentifier: ExpressibleByStringLiteral
    +
    extension FeatureIdentifier: ExpressibleByIntegerLiteral
    +
    extension FeatureIdentifier: ExpressibleByFloatLiteral
    +
    extension FeatureIdentifier: Codable
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + GeoJSONObject + +
    +
    +
    +
    +
    +
    +

    A GeoJSON object represents a Geometry, Feature, or collection of Features.

    +
    +

    Note

    + Foreign members which may be present inside are coded only if used JSONEncoder or JSONDecoder has userInfo[.includesForeignMembers] = true. + +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum GeoJSONObject : Equatable, Sendable
    +
    extension GeoJSONObject: Codable
    +
    extension GeoJSONObject: GeoJSONObjectConvertible
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Geometry + +
    +
    +
    +
    +
    +
    +

    A Geometry object represents points, curves, and surfaces in coordinate space. Use an instance of this enumeration whenever a value could be any kind of Geometry object.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Geometry : Equatable, Sendable
    +
    extension Geometry: GeoJSONObjectConvertible
    +
    extension Geometry: Codable
    +
    extension Geometry: GeometryConvertible
    +
    extension Geometry: WKTConvertible
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + JSONValue + +
    +
    +
    +
    +
    +
    +

    A JSON value represents an object, array, or fragment.

    + +

    This type does not represent the null value in JSON. Use Optional<JSONValue> wherever null is accepted.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum JSONValue : Hashable, Sendable
    +
    extension JSONValue: RawRepresentable
    +
    extension JSONValue: ExpressibleByStringLiteral
    +
    extension JSONValue: ExpressibleByIntegerLiteral
    +
    extension JSONValue: ExpressibleByFloatLiteral
    +
    extension JSONValue: ExpressibleByBooleanLiteral
    +
    extension JSONValue: ExpressibleByArrayLiteral
    +
    extension JSONValue: ExpressibleByDictionaryLiteral
    +
    extension JSONValue: Codable
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer.html new file mode 100644 index 00000000..0f99c75d --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer.html @@ -0,0 +1,1286 @@ + + + + Consumer Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Consumer

+
+
+ +
public indirect enum Consumer<Label> : Equatable, Sendable where Label : Hashable, Label : Sendable
+
extension Consumer: ExpressibleByStringLiteral, ExpressibleByArrayLiteral
+
extension Consumer: CustomStringConvertible
+ +
+
+

Undocumented

+ + +
+
+
+
    +
  • +
    + + + + string(_:) + +
    +
    +
    +
    +
    +
    +

    Primitives

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case string(String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + charset(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case charset(Charset)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + any(_:) + +
    +
    +
    +
    +
    +
    +

    Combinators

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case any([Consumer])
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + sequence(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case sequence([Consumer])
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + optional(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case optional(Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + oneOrMore(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case oneOrMore(Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + not(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case not(Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + flatten(_:) + +
    +
    +
    +
    +
    +
    +

    Transforms

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case flatten(Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + discard(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case discard(Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + replace(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case replace(Consumer, String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + label(_:_:) + +
    +
    +
    +
    +
    +
    +

    References

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case label(Label, Consumer)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + reference(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case reference(Label)
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Matching +

+
+
+
    +
  • +
    + + + + match(_:) + +
    +
    +
    +
    +
    +
    +

    Parse input and return matched result

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func match(_ input: String) throws -> Match
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + isOptional + +
    +
    +
    +
    +
    +
    +

    Will the consumer match empty input?

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var isOptional: Bool { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Location + +
    +
    +
    +
    +
    +
    +

    Source location

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct Location : Equatable, Sendable
    +
    extension Consumer.Location: CustomStringConvertible
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Match + +
    +
    +
    +
    +
    +
    +

    Abstract syntax tree returned by consumer

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    indirect enum Match : Equatable, Sendable
    +
    extension Consumer.Match: CustomStringConvertible
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Charset + +
    +
    +
    +
    +
    +
    +

    Opaque type used for efficient character matching

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct Charset : Hashable, Sendable
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Transform + +
    +
    +
    +
    +
    +
    +

    Closure for transforming a Match to an application-specific data type

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    typealias Transform = (_ name: Label, _ values: [Sendable]) throws -> (Sendable)?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Error + +
    +
    +
    +
    +
    +
    +

    A Parsing error

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct Error : Swift.Error
    +
    extension Consumer.Error: CustomStringConvertible
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Syntax sugar +

+
+
+
    +
  • +
    + + + + init(stringLiteral:) + +
    +
    +
    +
    +
    +
    +

    Create .string() consumer from a string literal

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(stringLiteral: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(arrayLiteral:) + +
    +
    +
    +
    +
    +
    +

    Create .sequence() consumer from an array literal

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(arrayLiteral: Consumer...)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + |(_:_:) + +
    +
    +
    +
    +
    +
    +

    Converts two consumers into an .any() consumer

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func | (lhs: Consumer, rhs: Consumer) -> Consumer
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Character sets +

+
+
+
    +
  • +
    + + + + character(_:) + +
    +
    +
    +
    +
    +
    +

    Match a character

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func character(_ c: UnicodeScalar) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + character(in:) + +
    +
    +
    +
    +
    +
    +

    Match character in range

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func character(in range: ClosedRange<UnicodeScalar>) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + character(in:) + +
    +
    +
    +
    +
    +
    +

    Match character in string

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func character(in string: String) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + character(in:) + +
    +
    +
    +
    +
    +
    +

    Match character in set

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func character(in set: CharacterSet) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + anyCharacter(except:) + +
    +
    +
    +
    +
    +
    +

    Match any character except the one(s) specified

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func anyCharacter(except characters: UnicodeScalar...) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + anyCharacter(except:) + +
    +
    +
    +
    +
    +
    +

    Match any character except the specified set

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func anyCharacter(except set: CharacterSet) -> Consumer
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Composite rules +

+
+
+
    +
  • +
    + + + + zeroOrMore(_:) + +
    +
    +
    +
    +
    +
    +

    Matches a list of zero or more consumer instances

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func zeroOrMore(_ consumer: Consumer) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + interleaved(_:_:) + +
    +
    +
    +
    +
    +
    +

    Matches one or more consumer instances, separated by an instance of separator +This is useful for something like a comma-delimited list (without a trailing comma)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func interleaved(_ consumer: Consumer, _ separator: Consumer) -> Consumer
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + ignore(_:in:) + +
    +
    +
    +
    +
    +
    +

    Matches the target consumer, ignoring any instances of the ignored consumer +This is useful for something like ignoring whitespace between tokens +Note: Instances of ignored inside flatten clauses will not be ignored

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static func ignore(_ ignored: Consumer, in target: Consumer) -> Consumer
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Consumer implementation +

+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Human-readable description of what consumer matches

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Charset.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Charset.html new file mode 100644 index 00000000..aed755e1 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Charset.html @@ -0,0 +1,290 @@ + + + + Charset Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Charset

+
+
+ +
struct Charset : Hashable, Sendable
+ +
+
+

Opaque type used for efficient character matching

+ + +
+
+
+
+ + +
+ +

Charset implementation +

+
+
+
    +
  • +
    + + + + ranges + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var ranges: [CountableClosedRange<UInt32>] { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Error.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Error.html new file mode 100644 index 00000000..d6d539f0 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Error.html @@ -0,0 +1,416 @@ + + + + Error Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Error

+
+
+ +
struct Error : Swift.Error
+
extension Consumer.Error: CustomStringConvertible
+ +
+
+

A Parsing error

+ + +
+
+
+
    +
  • +
    + + + + Kind + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public indirect enum Kind : Sendable
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + kind + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var kind: Kind
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + location + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var location: Location?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + remaining + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var remaining: Substring.UnicodeScalarView? { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Error implementation +

+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Human-readable error description

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Error/Kind.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Error/Kind.html new file mode 100644 index 00000000..ce57692e --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Error/Kind.html @@ -0,0 +1,343 @@ + + + + Kind Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Kind

+
+
+ +
public indirect enum Kind : Sendable
+ +
+
+

Undocumented

+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Location.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Location.html new file mode 100644 index 00000000..aa2a9070 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Location.html @@ -0,0 +1,415 @@ + + + + Location Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Location

+
+
+ +
struct Location : Equatable, Sendable
+
extension Consumer.Location: CustomStringConvertible
+ +
+
+

Source location

+ + +
+
+
+
    +
  • +
    + + + + range + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let range: Range<String.Index>
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + offset + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var offset: (line: Int, column: Int) { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Location implementation +

+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Human-readable description of the location

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Equatable implementation

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func == (lhs: Consumer.Location, rhs: Consumer.Location) -> Bool
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + at(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func at(_ range: CountableRange<Int>) -> Consumer.Location
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Match.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Match.html new file mode 100644 index 00000000..ccd5c3fb --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Consumer/Match.html @@ -0,0 +1,415 @@ + + + + Match Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Match

+
+
+ +
indirect enum Match : Equatable, Sendable
+
extension Consumer.Match: CustomStringConvertible
+ +
+
+

Abstract syntax tree returned by consumer

+ + +
+
+
+
    +
  • +
    + + + + token(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case token(String, Location)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + node(_:_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case node(Label?, [Match])
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + location + +
    +
    +
    +
    +
    +
    +

    The location of the match in the original source (if known)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var location: Location? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + transform(_:) + +
    +
    +
    +
    +
    +
    +

    Transform generic AST to application-specific form

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func transform(_ fn: Transform) rethrows -> Sendable?
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ + +
+ +

Match implementation +

+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Lisp-like description of the AST

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/FeatureIdentifier.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/FeatureIdentifier.html new file mode 100644 index 00000000..8011fc80 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/FeatureIdentifier.html @@ -0,0 +1,734 @@ + + + + FeatureIdentifier Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

FeatureIdentifier

+
+
+ +
public enum FeatureIdentifier : Hashable, Sendable
+
extension FeatureIdentifier: RawRepresentable
+
extension FeatureIdentifier: ExpressibleByStringLiteral
+
extension FeatureIdentifier: ExpressibleByIntegerLiteral
+
extension FeatureIdentifier: ExpressibleByFloatLiteral
+
extension FeatureIdentifier: Codable
+ +
+
+

A feature identifier identifies a Feature object.

+ + +
+
+
+
    +
  • +
    + + + + string(_:) + +
    +
    +
    +
    +
    +
    +

    A string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case string(_: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + number(_:) + +
    +
    +
    +
    +
    +
    +

    A floating-point number.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case number(_: Double)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + number + + +
    +

    A floating-point number. JSON does not distinguish numeric types of different precisions. If you need integer precision, cast this associated value to an Int.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature identifier representing the given string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ string: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature identifier representing the given integer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init<Source>(_ number: Source) where Source : BinaryInteger
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + number + + +
    +

    An integer. JSON does not distinguish numeric types of different precisions, so the integer is stored as a floating-point number.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature identifier representing the given floating-point number.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init<Source>(_ number: Source) where Source : BinaryFloatingPoint
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + RawValue + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias RawValue = Any
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(rawValue:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init?(rawValue: Any)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + rawValue + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var rawValue: Any { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + string + +
    +
    +
    +
    +
    +
    +

    A string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var string: String? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + number + +
    +
    +
    +
    +
    +
    +

    A floating-point number.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var number: Double? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(stringLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(stringLiteral value: StringLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(integerLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(integerLiteral value: IntegerLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(floatLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(floatLiteral value: FloatLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/GeoJSONObject.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/GeoJSONObject.html new file mode 100644 index 00000000..dfbc4a3e --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/GeoJSONObject.html @@ -0,0 +1,610 @@ + + + + GeoJSONObject Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

GeoJSONObject

+
+
+ +
public enum GeoJSONObject : Equatable, Sendable
+
extension GeoJSONObject: Codable
+
extension GeoJSONObject: GeoJSONObjectConvertible
+ +
+
+

A GeoJSON object represents a Geometry, Feature, or collection of Features.

+
+

Note

+ Foreign members which may be present inside are coded only if used JSONEncoder or JSONDecoder has userInfo[.includesForeignMembers] = true. + +
+ + +
+
+
+
    +
  • +
    + + + + geometry(_:) + +
    +
    +
    +
    +
    +
    +

    A Geometry object represents points, curves, and surfaces in coordinate space.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case geometry(_: Geometry)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + geometry + + +
    +

    The GeoJSON object as a Geometry object.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + feature(_:) + +
    +
    +
    +
    +
    +
    +

    A Feature object represents a spatially bounded thing.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case feature(_: Feature)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + feature + + +
    +

    The GeoJSON object as a Feature object.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + featureCollection(_:) + +
    +
    +
    +
    +
    +
    +

    A FeatureCollection object is a collection of Feature objects.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case featureCollection(_: FeatureCollection)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + featureCollection + + +
    +

    The GeoJSON object as a FeatureCollection object.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a GeoJSON object representing the given GeoJSON object–convertible instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ object: GeoJSONObjectConvertible)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    +

    A geometry object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + feature + +
    +
    +
    +
    +
    +
    +

    A feature object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var feature: Feature? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + featureCollection + +
    +
    +
    +
    +
    +
    +

    A feature collection object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var featureCollection: FeatureCollection? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geoJSONObject + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geoJSONObject: GeoJSONObject { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Geometry.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Geometry.html new file mode 100644 index 00000000..55676b94 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/Geometry.html @@ -0,0 +1,879 @@ + + + + Geometry Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Geometry

+
+
+ +
public enum Geometry : Equatable, Sendable
+
extension Geometry: GeoJSONObjectConvertible
+
extension Geometry: Codable
+
extension Geometry: GeometryConvertible
+
extension Geometry: WKTConvertible
+ +
+
+

A Geometry object represents points, curves, and surfaces in coordinate space. Use an instance of this enumeration whenever a value could be any kind of Geometry object.

+ + +
+
+
+
    +
  • +
    + + + + point(_:) + +
    +
    +
    +
    +
    +
    +

    A single position.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case point(_: Point)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + lineString(_:) + +
    +
    +
    +
    +
    +
    +

    A collection of two or more positions, each position connected to the next position linearly.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case lineString(_: LineString)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + polygon(_:) + +
    +
    +
    +
    +
    +
    +

    Conceptually, a collection of Rings that form a single connected geometry.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case polygon(_: Polygon)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiPoint(_:) + +
    +
    +
    +
    +
    +
    +

    A collection of positions that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case multiPoint(_: MultiPoint)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiLineString(_:) + +
    +
    +
    +
    +
    +
    +

    A collection of LineString geometries that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case multiLineString(_: MultiLineString)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiPolygon(_:) + +
    +
    +
    +
    +
    +
    +

    A collection of Polygon geometries that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case multiPolygon(_: MultiPolygon)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A heterogeneous collection of geometries that are related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case geometryCollection(_: GeometryCollection)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a geometry representing the given geometry–convertible instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ geometry: GeometryConvertible)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geoJSONObject + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geoJSONObject: GeoJSONObject { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + point + +
    +
    +
    +
    +
    +
    +

    A single position.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var point: Point? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + lineString + +
    +
    +
    +
    +
    +
    +

    A collection of two or more positions, each position connected to the next position linearly.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var lineString: LineString? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + polygon + +
    +
    +
    +
    +
    +
    +

    Conceptually, a collection of Rings that form a single connected geometry.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var polygon: Polygon? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiPoint + +
    +
    +
    +
    +
    +
    +

    A collection of positions that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var multiPoint: MultiPoint? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiLineString + +
    +
    +
    +
    +
    +
    +

    A collection of LineString geometries that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var multiLineString: MultiLineString? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + multiPolygon + +
    +
    +
    +
    +
    +
    +

    A collection of Polygon geometries that are disconnected but related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var multiPolygon: MultiPolygon? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometryCollection + +
    +
    +
    +
    +
    +
    +

    A heterogeneous collection of geometries that are related.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometryCollection: GeometryCollection? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/JSONValue.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/JSONValue.html new file mode 100644 index 00000000..daa6d367 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Enums/JSONValue.html @@ -0,0 +1,1171 @@ + + + + JSONValue Enumeration Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

JSONValue

+
+
+ +
public enum JSONValue : Hashable, Sendable
+
extension JSONValue: RawRepresentable
+
extension JSONValue: ExpressibleByStringLiteral
+
extension JSONValue: ExpressibleByIntegerLiteral
+
extension JSONValue: ExpressibleByFloatLiteral
+
extension JSONValue: ExpressibleByBooleanLiteral
+
extension JSONValue: ExpressibleByArrayLiteral
+
extension JSONValue: ExpressibleByDictionaryLiteral
+
extension JSONValue: Codable
+ +
+
+

A JSON value represents an object, array, or fragment.

+ +

This type does not represent the null value in JSON. Use Optional<JSONValue> wherever null is accepted.

+ + +
+
+
+
    +
  • +
    + + + + string(_:) + +
    +
    +
    +
    +
    +
    +

    A string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case string(_: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + number(_:) + +
    +
    +
    +
    +
    +
    +

    A floating-point number.

    + +

    JSON does not distinguish numeric types of different precisions. If you need integer precision, cast the value to an Int.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case number(_: Double)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + boolean(_:) + +
    +
    +
    +
    +
    +
    +

    A Boolean value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case boolean(_: Bool)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + array(_:) + +
    +
    +
    +
    +
    +
    +

    A heterogeneous array of JSON values and null values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case array(_: JSONArray)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + object(_:) + +
    +
    +
    +
    +
    +
    +

    An object containing JSON values and null values keyed by strings.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case object(_: JSONObject)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ string: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given integer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init<Source>(_ number: Source) where Source : BinaryInteger
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + number + + +
    +

    An integer. JSON does not distinguish numeric types of different precisions, so the integer is stored as a floating-point number.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given floating-point number.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init<Source>(_ number: Source) where Source : BinaryFloatingPoint
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given Boolean value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ bool: Bool)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given JSON array.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ values: JSONArray)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a JSON value representing the given JSON object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ properties: JSONObject)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + string + +
    +
    +
    +
    +
    +
    +

    A string value, if the JSON value represents a string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var string: String? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + number + +
    +
    +
    +
    +
    +
    +

    A floating-point number value, if the JSON value represents a number.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var number: Double? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + boolean + +
    +
    +
    +
    +
    +
    +

    A Boolean value, if the JSON value represents a Boolean.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var boolean: Bool? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + array + +
    +
    +
    +
    +
    +
    +

    An array of JSON values, if the JSON value represents an array.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var array: JSONArray? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + object + +
    +
    +
    +
    +
    +
    +

    An object containing JSON values keyed by strings, if the JSON value represents an object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var object: JSONObject? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + RawValue + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias RawValue = Any
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(rawValue:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init?(rawValue: Any)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + rawValue + +
    +
    +
    +
    +
    +
    +

    This branch must happen after the NSNumber branch +to avoid converting NSNumber instances with values +0 and 1 but of objCType != ‘c’ to Bool since as? Bool +can succeed when the NSNumber’s value is 0 or 1 even +when its objCType is not ‘c’.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var rawValue: Any { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(stringLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(stringLiteral value: StringLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(integerLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(integerLiteral value: IntegerLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(floatLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(floatLiteral value: FloatLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(booleanLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(booleanLiteral value: BooleanLiteralType)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + ArrayLiteralElement + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias ArrayLiteralElement = JSONValue?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(arrayLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(arrayLiteral elements: ArrayLiteralElement...)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Key + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Key = String
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Value + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Value = JSONValue?
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(dictionaryLiteral elements: (Key, Value)...)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions.html new file mode 100644 index 00000000..f917c0db --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions.html @@ -0,0 +1,442 @@ + + + + Extensions Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Extensions

+

The following extensions are available globally.

+ +
+
+
+
+ + +
+ +

Error implementation +

+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/CodingUserInfoKey.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/CodingUserInfoKey.html new file mode 100644 index 00000000..534b897a --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/CodingUserInfoKey.html @@ -0,0 +1,278 @@ + + + + CodingUserInfoKey Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

CodingUserInfoKey

+
+
+ +
public extension CodingUserInfoKey
+ +
+
+

Key to pass to populate a userInfo dictionary, which is passed to the JSONDecoder or JSONEncoder to enable processing foreign members.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Indicates if coding of foreign members is enabled.

    + +

    Boolean flag to enable coding. Default (or missing) value is to ignore foreign members.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    static let includesForeignMembers: CodingUserInfoKey
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/JSONArray.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/JSONArray.html new file mode 100644 index 00000000..3f374272 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/JSONArray.html @@ -0,0 +1,338 @@ + + + + JSONArray Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

JSONArray

+
+
+ +
extension JSONArray
+ +
+
+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/JSONObject.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/JSONObject.html new file mode 100644 index 00000000..fa93978f --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/JSONObject.html @@ -0,0 +1,338 @@ + + + + JSONObject Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

JSONObject

+
+
+ +
extension JSONObject
+ +
+
+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/LocationCoordinate2D.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/LocationCoordinate2D.html new file mode 100644 index 00000000..efdf897c --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/LocationCoordinate2D.html @@ -0,0 +1,433 @@ + + + + LocationCoordinate2D Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

LocationCoordinate2D

+
+
+ +
extension LocationCoordinate2D: Equatable
+ +
+
+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/LocationDegrees.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/LocationDegrees.html new file mode 100644 index 00000000..027d3c44 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/LocationDegrees.html @@ -0,0 +1,312 @@ + + + + LocationDegrees Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

LocationDegrees

+
+
+ +
extension LocationDegrees
+ +
+
+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/LocationDirection.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/LocationDirection.html new file mode 100644 index 00000000..61a6d027 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Extensions/LocationDirection.html @@ -0,0 +1,311 @@ + + + + LocationDirection Extension Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

LocationDirection

+
+
+ +
extension LocationDirection
+ +
+
+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Functions.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Functions.html new file mode 100644 index 00000000..4d1b61dd --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Functions.html @@ -0,0 +1,306 @@ + + + + Functions Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Functions

+

The following functions are available globally.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols.html new file mode 100644 index 00000000..9498cd33 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols.html @@ -0,0 +1,361 @@ + + + + Protocols Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Protocols

+

The following protocols are available globally.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/ForeignMemberContainer.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/ForeignMemberContainer.html new file mode 100644 index 00000000..4e4090e6 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/ForeignMemberContainer.html @@ -0,0 +1,281 @@ + + + + ForeignMemberContainer Protocol Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

ForeignMemberContainer

+
+
+ +
public protocol ForeignMemberContainer : Sendable
+ +
+
+

A GeoJSON object that can contain foreign members in arbitrary keys.

+ + +
+
+
+
    +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    +

    Foreign members to round-trip to JSON.

    + +

    Members are coded only if used JSONEncoder or JSONDecoder has userInfo[.includesForeignMembers] = true.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var foreignMembers: JSONObject { get set }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/GeoJSONObjectConvertible.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/GeoJSONObjectConvertible.html new file mode 100644 index 00000000..e2c1d587 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/GeoJSONObjectConvertible.html @@ -0,0 +1,279 @@ + + + + GeoJSONObjectConvertible Protocol Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

GeoJSONObjectConvertible

+
+
+ +
public protocol GeoJSONObjectConvertible
+ +
+
+

A type that can be represented as a GeoJSONObject instance.

+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/GeometryConvertible.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/GeometryConvertible.html new file mode 100644 index 00000000..11cae387 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/GeometryConvertible.html @@ -0,0 +1,279 @@ + + + + GeometryConvertible Protocol Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

GeometryConvertible

+
+
+ +
public protocol GeometryConvertible : Sendable
+ +
+
+

A type that can be represented as a Geometry instance.

+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/WKTConvertible.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/WKTConvertible.html new file mode 100644 index 00000000..89016a5f --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Protocols/WKTConvertible.html @@ -0,0 +1,309 @@ + + + + WKTConvertible Protocol Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

WKTConvertible

+
+
+ +
public protocol WKTConvertible
+ +
+
+

Entity which can be converted to and from ‘Well Known Text’.

+ + +
+
+
+
    +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs.html new file mode 100644 index 00000000..97af8fa6 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs.html @@ -0,0 +1,657 @@ + + + + Structures Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Structures

+

The following structures are available globally.

+ +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/BoundingBox.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/BoundingBox.html new file mode 100644 index 00000000..68762cd5 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/BoundingBox.html @@ -0,0 +1,573 @@ + + + + BoundingBox Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

BoundingBox

+
+
+ +
public struct BoundingBox : Sendable
+
extension BoundingBox: Hashable
+
extension BoundingBox: Codable
+ +
+
+

A bounding box indicates the extremes of a GeoJSONObject along the x- and y-axes (longitude and latitude, respectively).

+ + +
+
+
+
    +
  • +
    + + + + southWest + +
    +
    +
    +
    +
    +
    +

    The southwesternmost position contained in the bounding box.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var southWest: LocationCoordinate2D
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + northEast + +
    +
    +
    +
    +
    +
    +

    The northeasternmost position contained in the bounding box.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var northEast: LocationCoordinate2D
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    +

    Initializes the smallest bounding box that contains all the given coordinates.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init?(from coordinates: [LocationCoordinate2D]?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The coordinates to fit in the bounding box.

    +
    +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes a bounding box defined by its southwesternmost and northeasternmost positions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(southWest: LocationCoordinate2D, northEast: LocationCoordinate2D)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + southWest + + +
    +

    The southwesternmost position contained in the bounding box.

    +
    +
    + + northEast + + +
    +

    The northeasternmost position contained in the bounding box.

    +
    +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns a Boolean value indicating whether the bounding box contains the given position.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contains(_ coordinate: LocationCoordinate2D, ignoreBoundary: Bool = true) -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + coordinate + + +
    +

    The coordinate that may or may not be contained by the bounding box.

    +
    +
    + + ignoreBoundary + + +
    +

    A Boolean value indicating whether a position lying exactly on the edge of the bounding box should be considered to be contained in the bounding box.

    +
    +
    +
    +
    +

    Return Value

    +

    true if the bounding box contains the position; false otherwise.

    +
    + +
    +
    +
  • +
  • +
    + + + + hash(into:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func hash(into hasher: inout Hasher)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Feature.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Feature.html new file mode 100644 index 00000000..2b2a9c79 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Feature.html @@ -0,0 +1,557 @@ + + + + Feature Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Feature

+
+
+ +
public struct Feature : Equatable, ForeignMemberContainer
+
extension Feature: Codable
+
extension Feature: GeoJSONObjectConvertible
+ +
+
+

A Feature object represents a spatially bounded thing.

+ + +
+
+
+
    +
  • +
    + + + + identifier + +
    +
    +
    +
    +
    +
    +

    A string or number that commonly identifies the feature in the context of a data set.

    + +

    Turf does not guarantee that the feature is unique; however, a data set may make such a guarantee.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var identifier: FeatureIdentifier?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + properties + +
    +
    +
    +
    +
    +
    +

    Arbitrary, JSON-compatible attributes to associate with the feature.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var properties: JSONObject?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    +

    The geometry at which the feature is located.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(geometry:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature located at the given geometry.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(geometry: Geometry)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + geometry + + +
    +

    The geometry at which the feature is located.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(geometry:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature defined by the given geometry-convertible instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(geometry: GeometryConvertible?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + geometry + + +
    +

    The geometry-convertible instance that bounds the feature.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geoJSONObject + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geoJSONObject: GeoJSONObject { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/FeatureCollection.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/FeatureCollection.html new file mode 100644 index 00000000..f9d80a6b --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/FeatureCollection.html @@ -0,0 +1,446 @@ + + + + FeatureCollection Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

FeatureCollection

+
+
+ +
public struct FeatureCollection : Equatable, ForeignMemberContainer
+
extension FeatureCollection: Codable
+
extension FeatureCollection: GeoJSONObjectConvertible
+ +
+
+

A FeatureCollection object is a collection of Feature objects.

+ + +
+
+
+
    +
  • +
    + + + + features + +
    +
    +
    +
    +
    +
    +

    The features that the collection contains.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var features: [Feature]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(features:) + +
    +
    +
    +
    +
    +
    +

    Initializes a feature collection containing the given features.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(features: [Feature])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + features + + +
    +

    The features that the collection contains.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geoJSONObject + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geoJSONObject: GeoJSONObject { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/GeometryCollection.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/GeometryCollection.html new file mode 100644 index 00000000..8b5b9aa8 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/GeometryCollection.html @@ -0,0 +1,558 @@ + + + + GeometryCollection Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

GeometryCollection

+
+
+ +
public struct GeometryCollection : Equatable, ForeignMemberContainer, Sendable
+
extension GeometryCollection: Codable
+
extension GeometryCollection: GeometryConvertible
+
extension GeometryCollection: WKTConvertible
+ +
+
+

A GeometryCollection geometry is a heterogeneous collection of Geometry objects that are related.

+ + +
+
+
+
    +
  • +
    + + + + geometries + +
    +
    +
    +
    +
    +
    +

    The geometries contained by the geometry collection.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometries: [Geometry]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(geometries:) + +
    +
    +
    +
    +
    +
    +

    Initializes a geometry collection defined by the given geometries.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(geometries: [Geometry])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + geometries + + +
    +

    The geometries contained by the geometry collection.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a geometry collection coincident to the given multipolygon.

    + +

    You should only use this initializer if you intend to add geometries other than multipolygons to the geometry collection after initializing it.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ multiPolygon: MultiPolygon)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + multiPolygon + + +
    +

    The multipolygon that is coincident to the geometry collection.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/LineString.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/LineString.html new file mode 100644 index 00000000..23700b78 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/LineString.html @@ -0,0 +1,1014 @@ + + + + LineString Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

LineString

+
+
+ +
public struct LineString : Equatable, ForeignMemberContainer
+
extension LineString: Codable
+
extension LineString: GeometryConvertible
+
extension LineString: WKTConvertible
+ +
+
+

A LineString geometry is a collection of two or more positions, each position connected to the next position linearly.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The positions at which the line string is located.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: [LocationCoordinate2D]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a line string defined by given positions.

    + +

    This initializer is equivalent to the lineString function in the turf-helpers package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: [LocationCoordinate2D])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The positions at which the line string is located.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a line string coincident to the given linear ring.

    + +

    This initializer is roughly equivalent to the polygon-to-line package of Turf.js (source code), except that it accepts a linear ring instead of a full polygon.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ ring: Ring)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + ring + + +
    +

    The linear ring coincident to the line string.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns the line string transformed into an approximation of a curve by applying a Bézier spline algorithm.

    + +

    This method is equivalent to the turf-bezier-spline package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func bezier(resolution: Int = 10000, sharpness: Double = 0.85) -> LineString?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + trimmed(from:to:) + +
    +
    +
    +
    +
    +
    +

    Returns the portion of the line string that begins at the given start distance and extends the given stop distance along the line string.

    + +

    This method is equivalent to the turf-line-slice-along package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func trimmed(from startDistance: LocationDistance, to stopDistance: LocationDistance) -> LineString?
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns the portion of the line string that begins at the given coordinate and extends the given distance along the line string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func trimmed(from coordinate: LocationCoordinate2D, distance: LocationDistance) -> LineString?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + IndexedCoordinate + +
    +
    +
    +
    +
    +
    +

    IndexedCoordinate is a coordinate with additional information such as the index from its position in the polyline and distance from the start of the polyline.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct IndexedCoordinate : Sendable
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns a coordinate along a line string at a certain distance from the start of the polyline.

    + +

    This method is equivalent to the turf-along package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func coordinateFromStart(distance: LocationDistance) -> LocationCoordinate2D?
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns an indexed coordinate along a line string at a certain distance from the start of the polyline.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func indexedCoordinateFromStart(distance: LocationDistance) -> IndexedCoordinate?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + distance(from:to:) + +
    +
    +
    +
    +
    +
    +

    Returns the distance along a slice of the line string with the given endpoints.

    + +

    If the start and end arguments are unspecified, this method is equivalent to the turf-length package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func distance(from start: LocationCoordinate2D? = nil, to end: LocationCoordinate2D? = nil) -> LocationDistance?
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + sliced(from:to:) + +
    +
    +
    +
    +
    +
    +

    Returns a subset of the line string between two given coordinates.

    + +

    This method is equivalent to the turf-line-slice package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func sliced(from start: LocationCoordinate2D? = nil, to end: LocationCoordinate2D? = nil) -> LineString?
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns the geographic coordinate along the line string that is closest to the given coordinate as the crow flies.

    + +

    The returned coordinate may not correspond to one of the polyline’s vertices, but it always lies along the polyline.

    + +

    This method is equivalent to the turf-nearest-point-on-line package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func closestCoordinate(to coordinate: LocationCoordinate2D) -> IndexedCoordinate?
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns a copy of the line string simplified using the Ramer–Douglas–Peucker algorithm.

    + +

    This method is equivalent to the turf-simplify package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func simplified(tolerance: Double = 1.0, highestQuality: Bool = false) -> LineString
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + tolerance + + +
    +

    Controls the level of simplification by specifying the maximum allowed distance between the original line point and the simplified point. A higher tolerance value results in higher simplification.

    +
    +
    + + highestQuality + + +
    +

    Excludes the distance-based preprocessing step that leads to highest-quality simplification. High-quality simplification runs considerably slower, so consider how much precision is needed in your application.

    +
    +
    +
    +
    +

    Return Value

    +

    A simplified line string.

    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Simplifies the line string in place using the Ramer–Douglas–Peucker algorithm.

    + +

    This method is nearly equivalent to the turf-simplify package of Turf.js (source code), except that it mutates the line string it is called on.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public mutating func simplify(tolerance: Double = 1.0, highestQuality: Bool = false)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + tolerance + + +
    +

    Controls the level of simplification by specifying the maximum allowed distance between the original line point and the simplified point. A higher tolerance value results in higher simplification.

    +
    +
    + + highestQuality + + +
    +

    Excludes the distance-based preprocessing step that leads to highest-quality simplification. High-quality simplification runs considerably slower, so consider how much precision is needed in your application.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + intersections(with:) + +
    +
    +
    +
    +
    +
    +

    Returns all intersections with another LineString.

    + +

    This function is roughly equivalent to the turf-line-intersect package of Turf.js (source code). Order of found intersections is not determined.

    + +

    You can also use Turf.intersection(_:, _:) if you need to find intersection of individual LineSegments.

    +
    +

    Seealso

    + Turf.intersection(_:, _:) + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func intersections(with line: LineString) -> [LocationCoordinate2D]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/LineString/IndexedCoordinate.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/LineString/IndexedCoordinate.html new file mode 100644 index 00000000..4815efb7 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/LineString/IndexedCoordinate.html @@ -0,0 +1,341 @@ + + + + IndexedCoordinate Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

IndexedCoordinate

+
+
+ +
public struct IndexedCoordinate : Sendable
+ +
+
+

IndexedCoordinate is a coordinate with additional information such as the index from its position in the polyline and distance from the start of the polyline.

+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/LocationCoordinate2D.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/LocationCoordinate2D.html new file mode 100644 index 00000000..02936b29 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/LocationCoordinate2D.html @@ -0,0 +1,296 @@ + + + + LocationCoordinate2D Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

LocationCoordinate2D

+

A geographic coordinate with its components measured in degrees.

+ +
+
+
+
    +
  • +
    + + + + latitude + +
    +
    +
    +
    +
    +
    +

    The latitude in degrees.

    + +
    +
    +
    +
  • +
  • +
    + + + + longitude + +
    +
    +
    +
    +
    +
    +

    The longitude in degrees.

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a degree-based geographic coordinate.

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/MultiLineString.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/MultiLineString.html new file mode 100644 index 00000000..4f825504 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/MultiLineString.html @@ -0,0 +1,558 @@ + + + + MultiLineString Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

MultiLineString

+
+
+ +
public struct MultiLineString : Equatable, ForeignMemberContainer
+
extension MultiLineString: Codable
+
extension MultiLineString: GeometryConvertible
+
extension MultiLineString: WKTConvertible
+ +
+
+

A MultiLineString geometry is a collection of LineString geometries that are disconnected but related.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The positions at which the multi–line string is located. Each nested array corresponds to one line string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: [[LocationCoordinate2D]]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a multi–line string defined by the given positions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: [[LocationCoordinate2D]])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The positions at which the multi–line string is located. Each nested array corresponds to one line string.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a multi–line string coincident to the given polygon’s linear rings.

    + +

    This initializer is equivalent to the polygon-to-line package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ polygon: Polygon)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + polygon + + +
    +

    The polygon whose linear rings are coincident to the multi–line string.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/MultiPoint.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/MultiPoint.html new file mode 100644 index 00000000..839c0d6f --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/MultiPoint.html @@ -0,0 +1,507 @@ + + + + MultiPoint Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

MultiPoint

+
+
+ +
public struct MultiPoint : Equatable, ForeignMemberContainer
+
extension MultiPoint: Codable
+
extension MultiPoint: GeometryConvertible
+
extension MultiPoint: WKTConvertible
+ +
+
+

A MultiPoint geometry represents a collection of disconnected but related positions.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The positions at which the multipoint is located.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: [LocationCoordinate2D]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a multipoint defined by the given positions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: [LocationCoordinate2D])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The positions at which the multipoint is located.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/MultiPolygon.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/MultiPolygon.html new file mode 100644 index 00000000..4c1a562f --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/MultiPolygon.html @@ -0,0 +1,620 @@ + + + + MultiPolygon Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

MultiPolygon

+
+
+ +
public struct MultiPolygon : Equatable, ForeignMemberContainer
+
extension MultiPolygon: Codable
+
extension MultiPolygon: GeometryConvertible
+
extension MultiPolygon: WKTConvertible
+ +
+
+

A MultiPolygon geometry is a collection of Polygon geometries that are disconnected but related.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The positions at which the multipolygon is located. Each nested array corresponds to one polygon.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: [[[LocationCoordinate2D]]]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + polygons + +
    +
    +
    +
    +
    +
    +

    The polygon geometries that conceptually form the multipolygon.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var polygons: [Polygon] { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a multipolygon defined by the given positions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: [[[LocationCoordinate2D]]])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The positions at which the multipolygon is located. Each nested array corresponds to one polygon.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a multipolygon coincident to the given polygons.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ polygons: [Polygon])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + polygons + + +
    +

    The polygons that together are coincident to the multipolygon.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Determines if the given coordinate falls within any of the polygons. + The optional parameter ignoreBoundary will result in the method returning true if the given coordinate + lies on the boundary line of the polygon or its interior rings.

    + +

    Calls contains function for each contained polygon

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contains(_ coordinate: LocationCoordinate2D, ignoreBoundary: Bool = false) -> Bool
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Point.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Point.html new file mode 100644 index 00000000..628b7b12 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Point.html @@ -0,0 +1,509 @@ + + + + Point Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Point

+
+
+ +
public struct Point : Equatable, ForeignMemberContainer, Sendable
+
extension Point: Codable
+
extension Point: GeometryConvertible
+
extension Point: WKTConvertible
+ +
+
+

A Point geometry represents a single position.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The position at which the point is located.

    + +

    This property has a plural name for consistency with RFC 7946. For convenience, it is represented by a LocationCoordinate2D instead of a dedicated Position type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: LocationCoordinate2D
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a point defined by the given position.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: LocationCoordinate2D)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The position at which the point is located.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Polygon.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Polygon.html new file mode 100644 index 00000000..9b143888 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Polygon.html @@ -0,0 +1,1075 @@ + + + + Polygon Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Polygon

+
+
+ +
public struct Polygon : Equatable, ForeignMemberContainer
+
extension Polygon: Codable
+
extension Polygon: GeometryConvertible
+
extension Polygon: WKTConvertible
+ +
+
+

A Polygon geometry is conceptually a collection of Rings that form a single connected geometry.

+ + +
+
+
+
    +
  • +
    + + + + coordinates + +
    +
    +
    +
    +
    +
    +

    The positions at which the polygon is located. Each nested array corresponds to one linear ring.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var coordinates: [[LocationCoordinate2D]]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + foreignMembers + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var foreignMembers: JSONObject
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a polygon defined by the given positions.

    + +

    This initializer is equivalent to the polygon function in the turf-helpers package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ coordinates: [[LocationCoordinate2D]])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + coordinates + + +
    +

    The positions at which the polygon is located. Each nested array corresponds to one linear ring.

    +
    +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes a polygon defined by the given linear rings.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(outerRing: Ring, innerRings: [Ring] = [])
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + outerRing + + +
    +

    The outer linear ring.

    +
    +
    + + innerRings + + +
    +

    The inner linear rings that define “holes” in the polygon.

    +
    +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes a polygon as a given center coordinate with a given number of +vertices, as a means to approximate a circle.

    + +

    This initializer is equivalent to the turf-circle package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(center: LocationCoordinate2D, radius: LocationDistance, vertices: Int)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + center + + +
    +

    The center coordinate for the polygon.

    +
    +
    + + radius + + +
    +

    The radius of the polygon, measured in meters.

    +
    +
    + + vertices + + +
    +

    The number of vertices the polygon will have. + The recommended amount is 64.

    +
    +
    +
    +
    +

    Return Value

    +

    A polygon shape which approximates a circle.

    +
    + +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(from decoder: Decoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + innerRings + +
    +
    +
    +
    +
    +
    +

    Representation of Polygons coordinates of inner rings

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var innerRings: [Ring] { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + outerRing + +
    +
    +
    +
    +
    +
    +

    Representation of Polygons coordinates of outer ring

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var outerRing: Ring { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + area + +
    +
    +
    +
    +
    +
    +

    The polygon’s area.

    + +

    This property is equivalent to the turf-area package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var area: Double { get }
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns whether the given coordinate falls within the polygon and outside of its interior rings.

    + +

    This method is equivalent to the turf-boolean-point-in-polygon package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func contains(_ coordinate: LocationCoordinate2D, ignoreBoundary: Bool = false) -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + coordinate + + +
    +

    The coordinate to test for containment.

    +
    +
    + + ignoreBoundary + + +
    +

    Consider the coordinate to fall within the polygon even if it lies directly on one of the polygon’s linear rings.

    +
    +
    +
    +
    +

    Return Value

    +

    True if the coordinate falls within the polygon; false otherwise.

    +
    + +
    +
    +
  • +
  • +
    + + + + smooth(iterations:) + +
    +
    +
    +
    +
    +
    +

    Returns the polygon with corners smoothed out using Chaikin’s algorithm.

    + +

    This method is equivalent to the turf-polygon-smooth package of Turf.js (source code).

    +
    +

    Note

    + The returned polygon may be a degenerate polygon. + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func smooth(iterations: Int = 3) -> Polygon
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns a copy of the polygon simplified using the Ramer–Douglas–Peucker algorithm.

    + +

    This method is equivalent to the turf-simplify package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func simplified(tolerance: Double = 1.0, highestQuality: Bool = false) -> Polygon
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + tolerance + + +
    +

    Controls the level of simplification by specifying the maximum allowed distance between the original line point and the simplified point. A higher tolerance value results in higher simplification.

    +
    +
    + + highestQuality + + +
    +

    Excludes the distance-based preprocessing step that leads to highest-quality simplification. High-quality simplification runs considerably slower, so consider how much precision is needed in your application.

    +
    +
    +
    +
    +

    Return Value

    +

    A simplified polygon.

    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Simplifies the polygon in place using the Ramer–Douglas–Peucker algorithm.

    + +

    This method is nearly equivalent to the turf-simplify package of Turf.js (source code), except that it mutates the polygon it is called on.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public mutating func simplify(tolerance: Double = 1.0, highestQuality: Bool = false)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + tolerance + + +
    +

    Controls the level of simplification by specifying the maximum allowed distance between the original line point and the simplified point. A higher tolerance value results in higher simplification.

    +
    +
    + + highestQuality + + +
    +

    Excludes the distance-based preprocessing step that leads to highest-quality simplification. High-quality simplification runs considerably slower, so consider how much precision is needed in your application.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + center + +
    +
    +
    +
    +
    +
    +

    Calculates the absolute center of the bounding box.

    + +

    This property is equivalent to the turf-center package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var center: LocationCoordinate2D? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + centroid + +
    +
    +
    +
    +
    +
    +

    Calculates the centroid using the mean of all vertices.

    + +

    Compared to center and centerOfMass, the centroid is less affected by small islands and artifacts.

    + +

    This property is equivalent to the turf-centroid package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var centroid: LocationCoordinate2D? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + centerOfMass + +
    +
    +
    +
    +
    +
    +

    Calculates the center of mass using the centroid of polygon formula.

    + +

    This property is equivalent to the turf-center-of-mass package of Turf.js (source code).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var centerOfMass: LocationCoordinate2D? { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + geometry + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var geometry: Geometry { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + wkt + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var wkt: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(wkt:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(wkt: String) throws
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/RadianCoordinate2D.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/RadianCoordinate2D.html new file mode 100644 index 00000000..f5540794 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/RadianCoordinate2D.html @@ -0,0 +1,449 @@ + + + + RadianCoordinate2D Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

RadianCoordinate2D

+
+
+ +
public struct RadianCoordinate2D : Sendable
+ +
+
+

A coordinate pair measured in radians, as opposed to LocationCoordinate2D, which is measured in degrees of arc.

+ + +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Initializes a coordinate pair located at the given latitude and longitude.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(latitude: LocationRadians, longitude: LocationRadians)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + latitude + + +
    +

    The latitude measured in radians.

    +
    +
    + + longitude + + +
    +

    The longitude measured in radians.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initializes a coordinate pair measured in radians that is coincident to the given coordinate pair measured in degrees of arc.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ degreeCoordinate: LocationCoordinate2D)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + degreeCoordinate + + +
    +

    A coordinate pair measured in degrees of arc.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + direction(to:) + +
    +
    +
    +
    +
    +
    +

    Returns direction given two coordinates.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func direction(to coordinate: RadianCoordinate2D) -> Measurement<UnitAngle>
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns coordinate at a given distance and direction away from coordinate.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func coordinate(at distance: RadianDistance, facing direction: Measurement<UnitAngle>) -> RadianCoordinate2D
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + distance(to:) + +
    +
    +
    +
    +
    +
    +

    Returns the Haversine distance between two coordinates measured in radians.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func distance(to coordinate: RadianCoordinate2D) -> RadianDistance
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Ring.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Ring.html new file mode 100644 index 00000000..f7766fc3 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Structs/Ring.html @@ -0,0 +1,456 @@ + + + + Ring Structure Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Ring

+
+
+ +
public struct Ring : Sendable
+
extension Ring: Codable
+ +
+
+

A linear ring is a closed figure bounded by three or more straight line segments.

+ + +
+
+
+ +
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Typealiases.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Typealiases.html new file mode 100644 index 00000000..545e7848 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/Typealiases.html @@ -0,0 +1,572 @@ + + + + Type Aliases Reference + + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+

Type Aliases

+

The following type aliases are available globally.

+ +
+
+
+
    +
  • +
    + + + + LocationDirection + +
    +
    +
    +
    +
    +
    +

    An azimuth measured in degrees clockwise from true north.

    + +

    This is a compatibility shim to keep the library’s public interface consistent between Apple and non-Apple platforms that lack Core Location. On Apple platforms, you can use CLLocationDirection anywhere you see this type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LocationDirection = CLLocationDirection
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LocationDistance + +
    +
    +
    +
    +
    +
    +

    A distance in meters.

    + +

    This is a compatibility shim to keep the library’s public interface consistent between Apple and non-Apple platforms that lack Core Location. On Apple platforms, you can use CLLocationDistance anywhere you see this type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LocationDistance = CLLocationDistance
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LocationDegrees + +
    +
    +
    +
    +
    +
    +

    A latitude or longitude in degrees.

    + +

    This is a compatibility shim to keep the library’s public interface consistent between Apple and non-Apple platforms that lack Core Location. On Apple platforms, you can use CLLocationDegrees anywhere you see this type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LocationDegrees = CLLocationDegrees
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LocationCoordinate2D + +
    +
    +
    +
    +
    +
    +

    A geographic coordinate.

    + +

    This is a compatibility shim to keep the library’s public interface consistent between Apple and non-Apple platforms that lack Core Location. On Apple platforms, you can use CLLocationCoordinate2D anywhere you see this type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LocationCoordinate2D = CLLocationCoordinate2D
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LocationDirection + +
    +
    +
    +
    +
    +
    +

    An azimuth measured in degrees clockwise from true north.

    + +
    +
    +
    +
  • +
  • +
    + + + + LocationDistance + +
    +
    +
    +
    +
    +
    +

    A distance in meters.

    + +
    +
    +
    +
  • +
  • +
    + + + + LocationDegrees + +
    +
    +
    +
    +
    +
    +

    A latitude or longitude in degrees.

    + +
    +
    +
    +
  • +
  • +
    + + + + JSONArray + +
    +
    +
    +
    +
    +
    +

    A JSON array of JSONValue instances.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias JSONArray = [JSONValue?]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + JSONObject + +
    +
    +
    +
    +
    +
    +

    A JSON object represented in memory by a dictionary with strings as keys and JSONValue instances as values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias JSONObject = [String : JSONValue?]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LocationRadians + +
    +
    +
    +
    +
    +
    +

    A latitude or longitude measured in radians, as opposed to LocationDegrees, which is measured in degrees of arc.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LocationRadians = Double
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + RadianDistance + +
    +
    +
    +
    +
    +
    +

    A difference in latitude or longitude measured in radians, as opposed to CLLocationDegrees, which is used by some libraries to represent a similar distance measured in degrees of arc.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias RadianDistance = Double
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + LineSegment + +
    +
    +
    +
    +
    +
    +

    A segment between two positions in a LineString geometry or Ring.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias LineSegment = (LocationCoordinate2D, LocationCoordinate2D)
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/css/highlight.css b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/css/highlight.css new file mode 100644 index 00000000..c170357c --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/css/highlight.css @@ -0,0 +1,202 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ +/* Credit to https://gist.github.com/wataru420/2048287 */ +.highlight .c { + color: #999988; + font-style: italic; } + +.highlight .err { + color: #a61717; + background-color: #e3d2d2; } + +.highlight .k { + color: #000000; + font-weight: bold; } + +.highlight .o { + color: #000000; + font-weight: bold; } + +.highlight .cm { + color: #999988; + font-style: italic; } + +.highlight .cp { + color: #999999; + font-weight: bold; } + +.highlight .c1 { + color: #999988; + font-style: italic; } + +.highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + +.highlight .gd { + color: #000000; + background-color: #ffdddd; } + +.highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + +.highlight .ge { + color: #000000; + font-style: italic; } + +.highlight .gr { + color: #aa0000; } + +.highlight .gh { + color: #999999; } + +.highlight .gi { + color: #000000; + background-color: #ddffdd; } + +.highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + +.highlight .go { + color: #888888; } + +.highlight .gp { + color: #555555; } + +.highlight .gs { + font-weight: bold; } + +.highlight .gu { + color: #aaaaaa; } + +.highlight .gt { + color: #aa0000; } + +.highlight .kc { + color: #000000; + font-weight: bold; } + +.highlight .kd { + color: #000000; + font-weight: bold; } + +.highlight .kp { + color: #000000; + font-weight: bold; } + +.highlight .kr { + color: #000000; + font-weight: bold; } + +.highlight .kt { + color: #445588; } + +.highlight .m { + color: #009999; } + +.highlight .s { + color: #d14; } + +.highlight .na { + color: #008080; } + +.highlight .nb { + color: #0086B3; } + +.highlight .nc { + color: #445588; + font-weight: bold; } + +.highlight .no { + color: #008080; } + +.highlight .ni { + color: #800080; } + +.highlight .ne { + color: #990000; + font-weight: bold; } + +.highlight .nf { + color: #990000; } + +.highlight .nn { + color: #555555; } + +.highlight .nt { + color: #000080; } + +.highlight .nv { + color: #008080; } + +.highlight .ow { + color: #000000; + font-weight: bold; } + +.highlight .w { + color: #bbbbbb; } + +.highlight .mf { + color: #009999; } + +.highlight .mh { + color: #009999; } + +.highlight .mi { + color: #009999; } + +.highlight .mo { + color: #009999; } + +.highlight .sb { + color: #d14; } + +.highlight .sc { + color: #d14; } + +.highlight .sd { + color: #d14; } + +.highlight .s2 { + color: #d14; } + +.highlight .se { + color: #d14; } + +.highlight .sh { + color: #d14; } + +.highlight .si { + color: #d14; } + +.highlight .sx { + color: #d14; } + +.highlight .sr { + color: #009926; } + +.highlight .s1 { + color: #d14; } + +.highlight .ss { + color: #990073; } + +.highlight .bp { + color: #999999; } + +.highlight .vc { + color: #008080; } + +.highlight .vg { + color: #008080; } + +.highlight .vi { + color: #008080; } + +.highlight .il { + color: #009999; } diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/css/jazzy.css b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/css/jazzy.css new file mode 100644 index 00000000..f84ef864 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/css/jazzy.css @@ -0,0 +1,442 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ +html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { + background: transparent; + border: 0; + margin: 0; + outline: 0; + padding: 0; + vertical-align: baseline; } + +body { + background-color: #f2f2f2; + font-family: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + -webkit-font-smoothing: subpixel-antialiased; + word-wrap: break-word; } + +h1, h2, h3 { + margin-top: 0.8em; + margin-bottom: 0.3em; + font-weight: 100; + color: black; } + +h1 { + font-size: 2.5em; } + +h2 { + font-size: 2em; + border-bottom: 1px solid #e2e2e2; } + +h4 { + font-size: 13px; + line-height: 1.5; + margin-top: 21px; } + +h5 { + font-size: 1.1em; } + +h6 { + font-size: 1.1em; + color: #777; } + +.section-name { + color: gray; + display: block; + font-family: Helvetica; + font-size: 22px; + font-weight: 100; + margin-bottom: 15px; } + +pre, code { + font: 0.95em Menlo, monospace; + color: #777; + word-wrap: normal; } + +p code, li code { + background-color: #eee; + padding: 2px 4px; + border-radius: 4px; } + +pre > code { + padding: 0; } + +a { + color: #0088cc; + text-decoration: none; } + a code { + color: inherit; } + +ul { + padding-left: 15px; } + +li { + line-height: 1.8em; } + +img { + max-width: 100%; } + +blockquote { + margin-left: 0; + padding: 0 10px; + border-left: 4px solid #ccc; } + +hr { + height: 1px; + border: none; + background-color: #e2e2e2; } + +.footnote-ref { + display: inline-block; + scroll-margin-top: 70px; } + +.footnote-def { + scroll-margin-top: 70px; } + +.content-wrapper { + margin: 0 auto; + width: 980px; } + +header { + font-size: 0.85em; + line-height: 32px; + background-color: #414141; + position: fixed; + width: 100%; + z-index: 3; } + header img { + padding-right: 6px; + vertical-align: -3px; + height: 16px; } + header a { + color: #fff; } + header p { + float: left; + color: #999; } + header .header-right { + float: right; + margin-left: 16px; } + +#breadcrumbs { + background-color: #f2f2f2; + height: 26px; + padding-top: 12px; + position: fixed; + width: inherit; + z-index: 2; + margin-top: 32px; + white-space: nowrap; + overflow-x: scroll; } + #breadcrumbs #carat { + height: 10px; + margin: 0 5px; } + +.sidebar { + background-color: #f9f9f9; + border: 1px solid #e2e2e2; + overflow-y: auto; + overflow-x: hidden; + position: fixed; + top: 70px; + bottom: 0; + width: 230px; + word-wrap: normal; } + +.nav-groups { + list-style-type: none; + background: #fff; + padding-left: 0; } + +.nav-group-name { + border-bottom: 1px solid #e2e2e2; + font-size: 1.1em; + font-weight: 100; + padding: 15px 0 15px 20px; } + .nav-group-name > a { + color: #333; } + +.nav-group-tasks { + margin-top: 5px; } + +.nav-group-task { + font-size: 0.9em; + list-style-type: none; + white-space: nowrap; } + .nav-group-task a { + color: #888; } + +.main-content { + background-color: #fff; + border: 1px solid #e2e2e2; + margin-left: 246px; + position: absolute; + overflow: hidden; + padding-bottom: 20px; + top: 70px; + width: 734px; } + .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { + margin-bottom: 1em; } + .main-content p { + line-height: 1.8em; } + .main-content section .section:first-child { + margin-top: 0; + padding-top: 0; } + .main-content section .task-group-section .task-group:first-of-type { + padding-top: 10px; } + .main-content section .task-group-section .task-group:first-of-type .section-name { + padding-top: 15px; } + .main-content section .heading:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .main-content .section-name p { + margin-bottom: inherit; + line-height: inherit; } + .main-content .section-name code { + background-color: inherit; + padding: inherit; + color: inherit; } + +.section { + padding: 0 25px; } + +.highlight { + background-color: #eee; + padding: 10px 12px; + border: 1px solid #e2e2e2; + border-radius: 4px; + overflow-x: auto; } + +.declaration .highlight { + overflow-x: initial; + padding: 0 40px 40px 0; + margin-bottom: -25px; + background-color: transparent; + border: none; } + +.section-name { + margin: 0; + margin-left: 18px; } + +.task-group-section { + margin-top: 10px; + padding-left: 6px; + border-top: 1px solid #e2e2e2; } + +.task-group { + padding-top: 0px; } + +.task-name-container a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + +.section-name-container { + position: relative; + display: inline-block; } + .section-name-container .section-name-link { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + margin-bottom: 0; } + .section-name-container .section-name { + position: relative; + pointer-events: none; + z-index: 1; } + .section-name-container .section-name a { + pointer-events: auto; } + +.item { + padding-top: 8px; + width: 100%; + list-style-type: none; } + .item a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .item code { + background-color: transparent; + padding: 0; } + .item .token, .item .direct-link { + display: inline-block; + text-indent: -20px; + padding-left: 3px; + margin-left: 35px; + font-size: 11.9px; + transition: all 300ms; } + .item .token-open { + margin-left: 20px; } + .item .discouraged { + text-decoration: line-through; } + +.declaration-note { + font-size: .85em; + color: gray; + font-style: italic; } + +.pointer-container { + border-bottom: 1px solid #e2e2e2; + left: -23px; + padding-bottom: 13px; + position: relative; + width: 110%; } + +.pointer { + background: #f9f9f9; + border-left: 1px solid #e2e2e2; + border-top: 1px solid #e2e2e2; + height: 12px; + left: 21px; + top: -7px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + position: absolute; + width: 12px; } + +.height-container { + display: none; + left: -25px; + padding: 0 25px; + position: relative; + width: 100%; + overflow: hidden; } + .height-container .section { + background: #f9f9f9; + border-bottom: 1px solid #e2e2e2; + left: -25px; + position: relative; + width: 100%; + padding-top: 10px; + padding-bottom: 5px; } + +.aside, .language { + padding: 6px 12px; + margin: 12px 0; + border-left: 5px solid #dddddd; + overflow-y: hidden; } + .aside .aside-title, .language .aside-title { + font-size: 9px; + letter-spacing: 2px; + text-transform: uppercase; + padding-bottom: 0; + margin: 0; + color: #aaa; + -webkit-user-select: none; } + .aside p:last-child, .language p:last-child { + margin-bottom: 0; } + +.language { + border-left: 5px solid #cde9f4; } + .language .aside-title { + color: #4b8afb; } + +.aside-warning, .aside-deprecated, .aside-unavailable { + border-left: 5px solid #ff6666; } + .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { + color: #ff0000; } + +.graybox { + border-collapse: collapse; + width: 100%; } + .graybox p { + margin: 0; + word-break: break-word; + min-width: 50px; } + .graybox td { + border: 1px solid #e2e2e2; + padding: 5px 25px 5px 10px; + vertical-align: middle; } + .graybox tr td:first-of-type { + text-align: right; + padding: 7px; + vertical-align: top; + word-break: normal; + width: 40px; } + +.slightly-smaller { + font-size: 0.9em; } + +#footer { + position: relative; + top: 10px; + bottom: 0px; + margin-left: 25px; } + #footer p { + margin: 0; + color: #aaa; + font-size: 0.8em; } + +html.dash header, html.dash #breadcrumbs, html.dash .sidebar { + display: none; } + +html.dash .main-content { + width: 980px; + margin-left: 0; + border: none; + width: 100%; + top: 0; + padding-bottom: 0; } + +html.dash .height-container { + display: block; } + +html.dash .item .token { + margin-left: 0; } + +html.dash .content-wrapper { + width: auto; } + +html.dash #footer { + position: static; } + +form[role=search] { + float: right; } + form[role=search] input { + font: Helvetica, freesans, Arial, sans-serif; + margin-top: 6px; + font-size: 13px; + line-height: 20px; + padding: 0px 10px; + border: none; + border-radius: 1em; } + .loading form[role=search] input { + background: white url(../img/spinner.gif) center right 4px no-repeat; } + form[role=search] .tt-menu { + margin: 0; + min-width: 300px; + background: #fff; + color: #333; + border: 1px solid #e2e2e2; + z-index: 4; } + form[role=search] .tt-highlight { + font-weight: bold; } + form[role=search] .tt-suggestion { + font: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + padding: 0 8px; } + form[role=search] .tt-suggestion span { + display: table-cell; + white-space: nowrap; } + form[role=search] .tt-suggestion .doc-parent-name { + width: 100%; + text-align: right; + font-weight: normal; + font-size: 0.9em; + padding-left: 16px; } + form[role=search] .tt-suggestion:hover, + form[role=search] .tt-suggestion.tt-cursor { + cursor: pointer; + background-color: #4183c4; + color: #fff; } + form[role=search] .tt-suggestion:hover .doc-parent-name, + form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { + color: #fff; } diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/carat.png b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/carat.png new file mode 100755 index 00000000..29d2f7fd Binary files /dev/null and b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/carat.png differ diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/dash.png b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/dash.png new file mode 100755 index 00000000..6f694c7a Binary files /dev/null and b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/dash.png differ diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/gh.png b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/gh.png new file mode 100755 index 00000000..628da97c Binary files /dev/null and b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/gh.png differ diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/spinner.gif b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/spinner.gif new file mode 100644 index 00000000..e3038d0a Binary files /dev/null and b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/img/spinner.gif differ diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/index.html b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/index.html new file mode 100644 index 00000000..34a9f7a2 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/index.html @@ -0,0 +1,463 @@ + + + + Turf Reference + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+ +

Turf for Swift

+ +

📱iOS     +🖥💻macOS     +📺tvOS     +⌚️watchOS     +Linux     +Documentation     +Carthage compatible     +CocoaPods     +SPM compatible    

+ +

A spatial analysis library written in Swift for native iOS, macOS, tvOS, watchOS, visionOS, and Linux applications, ported from Turf.js.

+

Requirements

+ +

Turf requires Xcode 14.1 or above and supports the following minimum deployment targets:

+ +
    +
  • iOS 11.0 and above
  • +
  • macOS 10.13 (High Sierra) and above
  • +
  • tvOS 11.0 and above
  • +
  • watchOS 4.0 and above
  • +
  • visionOS 1.0 and above (not supported via CocoaPods)
  • +
+ +

Alternatively, you can incorporate Turf into a command line tool without Xcode on any platform that Swift supports, including Linux.

+ +

If your project is written in Objective-C, you’ll need to write a compatibility layer between turf-swift and your Objective-C code. If your project is written in Objective-C++, you may be able to use spatial-algorithms as an alternative to Turf.

+

Installation

+ +

Releases are available for installation using any of the popular Swift dependency managers.

+

CocoaPods

+ +

To install Turf using CocoaPods:

+ +
    +
  1. Specify the following dependency in your Podfile: +rb +pod 'Turf', '~> 3.0' +
  2. +
  3. Run pod repo update if you haven’t lately.
  4. +
  5. Run pod install and open the resulting Xcode workspace.
  6. +
  7. Add import Turf to any Swift file in your application target.
  8. +
+

Carthage

+ +

To install Turf using Carthage:

+ +
    +
  1. Add the following dependency to your Cartfile: + +github "mapbox/turf-swift" ~> 3.0 +
  2. +
  3. Run carthage bootstrap.
  4. +
  5. Follow the rest of Carthage’s integration instructions. Your application target’s Embedded Frameworks should include Turf.framework.
  6. +
  7. Add import Turf to any Swift file in your application target.
  8. +
+

Swift Package Manager

+ +

To install Turf using the Swift Package Manager, add the following package to the dependencies in your Package.swift file:

+
.package(url: "https://github.com/mapbox/turf-swift.git", from: "3.0.0")
+
+ +

Then import Turf in any Swift file in your module.

+

Available functionality

+ +

This work-in-progress port of Turf.js contains the following functionality:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Turf.jsTurf for Swift
turf-along#alongLineString.coordinateFromStart(distance:)
turf-area#areaPolygon.area
turf-bearing#bearingCLLocationCoordinate2D.direction(to:)
LocationCoordinate2D.direction(to:) on Linux
RadianCoordinate2D.direction(to:)
turf-bezier-spline#bezierSplineLineString.bezier(resolution:sharpness:)
turf-boolean-point-in-polygon#booleanPointInPolygonPolygon.contains(_:ignoreBoundary:)
turf-center#centerPolygon.center
turf-center-of-mass#centerOfMassPolygon.centerOfMass
turf-centroid#centroidPolygon.centroid
turf-circle#circlePolygon(center:radius:vertices:)
turf-destination#destinationCLLocationCoordinate2D.coordinate(at:facing:)
LocationCoordinate2D.coordinate(at:facing:) on Linux
RadianCoordinate2D.coordinate(at:facing:)
turf-distance#distanceCLLocationCoordinate2D.distance(to:)
LocationCoordinate2D.distance(to:) on Linux
RadianCoordinate2D.distance(to:)
turf-helpers#polygonPolygon(_:)
turf-helpers#lineStringLineString(_:)
turf-helpers#degreesToRadiansCLLocationDegrees.toRadians()
LocationDegrees.toRadians() on Linux
turf-helpers#radiansToDegreesCLLocationDegrees.toDegrees()
LocationDegrees.toDegrees() on Linux
turf-helpers#convertLength
turf-helpers#convertArea
Measurement.converted(to:)
turf-length#lengthLineString.distance(from:to:)
turf-line-intersect#lineIntersectLineString.intersections(with:)
turf-line-slice#lineSliceLineString.sliced(from:to:)
turf-line-slice-along#lineSliceAlongLineString.trimmed(from:to:)
turf-midpoint#midpointmid(_:_:)
turf-nearest-point-on-line#nearestPointOnLineLineString.closestCoordinate(to:)
turf-polygon-to-line#polygonToLineLineString(_:)
MultiLineString(_:)
turf-simplify#simplifyLineString.simplify(tolerance:highestQuality:)
LineString.simplified(tolerance:highestQuality:)
turf-polygon-smooth#polygonSmoothPolygon.smooth(iterations:)
CLLocationDirection.difference(from:)
LocationDirection.difference(from:) on Linux
CLLocationDirection.wrap(min:max:)
LocationDirection.wrap(min:max:) on Linux
+

GeoJSON

+ +

turf-swift also contains a GeoJSON encoder/decoder with support for Codable.

+
// Decode an unknown GeoJSON object.
+let geojson = try JSONDecoder().decode(GeoJSONObject.self, from: data)
+guard case let .feature(feature) = geojson,
+      case let .point(point) = feature.geometry else {
+    return
+}
+
+// Decode a known GeoJSON object.
+let featureCollection = try JSONDecoder().decode(FeatureCollection.self, from: data)
+
+// Initialize a Point feature and encode it as GeoJSON.
+let coordinate = CLLocationCoordinate2D(latitude: 0, longitude: 1)
+let point = Point(coordinate)
+let pointFeature = Feature(geometry: .point(point))
+let data = try JSONEncoder().encode(pointFeature)
+let json = String(data: data, encoding: .utf8)
+print(json)
+
+/*
+{
+  "type": "Feature",
+  "geometry": {
+    "type": "Point",
+    "coordinates": [
+      1,
+      0
+    ]
+  }
+}
+*/
+
+
+

Well Known Text (WKT)

+ +

turf-swift contains a minimal WKT encoding/decoding support for geometries implementing WKTCodable protocol.

+
let wktString = "POINT(123.53 -12.12)"
+
+// Decoding is done using an init method
+let point = try? Point(wkt: wktString)
+let geometry = try? Geometry(wkt: wktString)
+
+print(point?.coordinates)
+
+// ...
+
+// Geometries then can be serialized using a property getter
+let serializedWKTString = point?.wkt
+print(serializedWKTString)
+
+
+ +
+
+ +
+
+ + diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/jazzy.js b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/jazzy.js new file mode 100755 index 00000000..1ac86992 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/jazzy.js @@ -0,0 +1,74 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + +window.jazzy = {'docset': false} +if (typeof window.dash != 'undefined') { + document.documentElement.className += ' dash' + window.jazzy.docset = true +} +if (navigator.userAgent.match(/xcode/i)) { + document.documentElement.className += ' xcode' + window.jazzy.docset = true +} + +function toggleItem($link, $content) { + var animationDuration = 300; + $link.toggleClass('token-open'); + $content.slideToggle(animationDuration); +} + +function itemLinkToContent($link) { + return $link.parent().parent().next(); +} + +// On doc load + hash-change, open any targeted item +function openCurrentItemIfClosed() { + if (window.jazzy.docset) { + return; + } + var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); + $content = itemLinkToContent($link); + if ($content.is(':hidden')) { + toggleItem($link, $content); + } +} + +$(openCurrentItemIfClosed); +$(window).on('hashchange', openCurrentItemIfClosed); + +// On item link ('token') click, toggle its discussion +$('.token').on('click', function(event) { + if (window.jazzy.docset) { + return; + } + var $link = $(this); + toggleItem($link, itemLinkToContent($link)); + + // Keeps the document from jumping to the hash. + var href = $link.attr('href'); + if (history.pushState) { + history.pushState({}, '', href); + } else { + location.hash = href; + } + event.preventDefault(); +}); + +// Clicks on links to the current, closed, item need to open the item +$("a:not('.token')").on('click', function() { + if (location == this.href) { + openCurrentItemIfClosed(); + } +}); + +// KaTeX rendering +if ("katex" in window) { + $($('.math').each( (_, element) => { + katex.render(element.textContent, element, { + displayMode: $(element).hasClass('m-block'), + throwOnError: false, + trust: true + }); + })) +} diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/jazzy.search.js b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/jazzy.search.js new file mode 100644 index 00000000..359cdbb8 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/jazzy.search.js @@ -0,0 +1,74 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + +$(function(){ + var $typeahead = $('[data-typeahead]'); + var $form = $typeahead.parents('form'); + var searchURL = $form.attr('action'); + + function displayTemplate(result) { + return result.name; + } + + function suggestionTemplate(result) { + var t = '
'; + t += '' + result.name + ''; + if (result.parent_name) { + t += '' + result.parent_name + ''; + } + t += '
'; + return t; + } + + $typeahead.one('focus', function() { + $form.addClass('loading'); + + $.getJSON(searchURL).then(function(searchData) { + const searchIndex = lunr(function() { + this.ref('url'); + this.field('name'); + this.field('abstract'); + for (const [url, doc] of Object.entries(searchData)) { + this.add({url: url, name: doc.name, abstract: doc.abstract}); + } + }); + + $typeahead.typeahead( + { + highlight: true, + minLength: 3, + autoselect: true + }, + { + limit: 10, + display: displayTemplate, + templates: { suggestion: suggestionTemplate }, + source: function(query, sync) { + const lcSearch = query.toLowerCase(); + const results = searchIndex.query(function(q) { + q.term(lcSearch, { boost: 100 }); + q.term(lcSearch, { + boost: 10, + wildcard: lunr.Query.wildcard.TRAILING + }); + }).map(function(result) { + var doc = searchData[result.ref]; + doc.url = result.ref; + return doc; + }); + sync(results); + } + } + ); + $form.removeClass('loading'); + $typeahead.trigger('focus'); + }); + }); + + var baseURL = searchURL.slice(0, -"search.json".length); + + $typeahead.on('typeahead:select', function(e, result) { + window.location = baseURL + result.url; + }); +}); diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/jquery.min.js b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/jquery.min.js new file mode 100644 index 00000000..7f37b5d9 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/typeahead.jquery.js b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/typeahead.jquery.js new file mode 100644 index 00000000..bcb734be --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/js/typeahead.jquery.js @@ -0,0 +1,1695 @@ +/*! + * typeahead.js 1.3.3 + * https://github.com/corejavascript/typeahead.js + * Copyright 2013-2024 Twitter, Inc. and other contributors; Licensed MIT + */ + + +(function(root, factory) { + if (typeof define === "function" && define.amd) { + define([ "jquery" ], function(a0) { + return factory(a0); + }); + } else if (typeof module === "object" && module.exports) { + module.exports = factory(require("jquery")); + } else { + factory(root["jQuery"]); + } +})(this, function($) { + var _ = function() { + "use strict"; + return { + isMsie: function() { + return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; + }, + isBlankString: function(str) { + return !str || /^\s*$/.test(str); + }, + escapeRegExChars: function(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + }, + isString: function(obj) { + return typeof obj === "string"; + }, + isNumber: function(obj) { + return typeof obj === "number"; + }, + isArray: $.isArray, + isFunction: $.isFunction, + isObject: $.isPlainObject, + isUndefined: function(obj) { + return typeof obj === "undefined"; + }, + isElement: function(obj) { + return !!(obj && obj.nodeType === 1); + }, + isJQuery: function(obj) { + return obj instanceof $; + }, + toStr: function toStr(s) { + return _.isUndefined(s) || s === null ? "" : s + ""; + }, + bind: $.proxy, + each: function(collection, cb) { + $.each(collection, reverseArgs); + function reverseArgs(index, value) { + return cb(value, index); + } + }, + map: $.map, + filter: $.grep, + every: function(obj, test) { + var result = true; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (!(result = test.call(null, val, key, obj))) { + return false; + } + }); + return !!result; + }, + some: function(obj, test) { + var result = false; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (result = test.call(null, val, key, obj)) { + return false; + } + }); + return !!result; + }, + mixin: $.extend, + identity: function(x) { + return x; + }, + clone: function(obj) { + return $.extend(true, {}, obj); + }, + getIdGenerator: function() { + var counter = 0; + return function() { + return counter++; + }; + }, + templatify: function templatify(obj) { + return $.isFunction(obj) ? obj : template; + function template() { + return String(obj); + } + }, + defer: function(fn) { + setTimeout(fn, 0); + }, + debounce: function(func, wait, immediate) { + var timeout, result; + return function() { + var context = this, args = arguments, later, callNow; + later = function() { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + } + }; + callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + } + return result; + }; + }, + throttle: function(func, wait) { + var context, args, timeout, result, previous, later; + previous = 0; + later = function() { + previous = new Date(); + timeout = null; + result = func.apply(context, args); + }; + return function() { + var now = new Date(), remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0) { + clearTimeout(timeout); + timeout = null; + previous = now; + result = func.apply(context, args); + } else if (!timeout) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }, + stringify: function(val) { + return _.isString(val) ? val : JSON.stringify(val); + }, + guid: function() { + function _p8(s) { + var p = (Math.random().toString(16) + "000000000").substr(2, 8); + return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p; + } + return "tt-" + _p8() + _p8(true) + _p8(true) + _p8(); + }, + noop: function() {} + }; + }(); + var WWW = function() { + "use strict"; + var defaultClassNames = { + wrapper: "twitter-typeahead", + input: "tt-input", + hint: "tt-hint", + menu: "tt-menu", + dataset: "tt-dataset", + suggestion: "tt-suggestion", + selectable: "tt-selectable", + empty: "tt-empty", + open: "tt-open", + cursor: "tt-cursor", + highlight: "tt-highlight" + }; + return build; + function build(o) { + var www, classes; + classes = _.mixin({}, defaultClassNames, o); + www = { + css: buildCss(), + classes: classes, + html: buildHtml(classes), + selectors: buildSelectors(classes) + }; + return { + css: www.css, + html: www.html, + classes: www.classes, + selectors: www.selectors, + mixin: function(o) { + _.mixin(o, www); + } + }; + } + function buildHtml(c) { + return { + wrapper: '', + menu: '
' + }; + } + function buildSelectors(classes) { + var selectors = {}; + _.each(classes, function(v, k) { + selectors[k] = "." + v; + }); + return selectors; + } + function buildCss() { + var css = { + wrapper: { + position: "relative", + display: "inline-block" + }, + hint: { + position: "absolute", + top: "0", + left: "0", + borderColor: "transparent", + boxShadow: "none", + opacity: "1" + }, + input: { + position: "relative", + verticalAlign: "top", + backgroundColor: "transparent" + }, + inputWithNoHint: { + position: "relative", + verticalAlign: "top" + }, + menu: { + position: "absolute", + top: "100%", + left: "0", + zIndex: "100", + display: "none" + }, + ltr: { + left: "0", + right: "auto" + }, + rtl: { + left: "auto", + right: " 0" + } + }; + if (_.isMsie()) { + _.mixin(css.input, { + backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" + }); + } + return css; + } + }(); + var EventBus = function() { + "use strict"; + var namespace, deprecationMap; + namespace = "typeahead:"; + deprecationMap = { + render: "rendered", + cursorchange: "cursorchanged", + select: "selected", + autocomplete: "autocompleted" + }; + function EventBus(o) { + if (!o || !o.el) { + $.error("EventBus initialized without el"); + } + this.$el = $(o.el); + } + _.mixin(EventBus.prototype, { + _trigger: function(type, args) { + var $e = $.Event(namespace + type); + this.$el.trigger.call(this.$el, $e, args || []); + return $e; + }, + before: function(type) { + var args, $e; + args = [].slice.call(arguments, 1); + $e = this._trigger("before" + type, args); + return $e.isDefaultPrevented(); + }, + trigger: function(type) { + var deprecatedType; + this._trigger(type, [].slice.call(arguments, 1)); + if (deprecatedType = deprecationMap[type]) { + this._trigger(deprecatedType, [].slice.call(arguments, 1)); + } + } + }); + return EventBus; + }(); + var EventEmitter = function() { + "use strict"; + var splitter = /\s+/, nextTick = getNextTick(); + return { + onSync: onSync, + onAsync: onAsync, + off: off, + trigger: trigger + }; + function on(method, types, cb, context) { + var type; + if (!cb) { + return this; + } + types = types.split(splitter); + cb = context ? bindContext(cb, context) : cb; + this._callbacks = this._callbacks || {}; + while (type = types.shift()) { + this._callbacks[type] = this._callbacks[type] || { + sync: [], + async: [] + }; + this._callbacks[type][method].push(cb); + } + return this; + } + function onAsync(types, cb, context) { + return on.call(this, "async", types, cb, context); + } + function onSync(types, cb, context) { + return on.call(this, "sync", types, cb, context); + } + function off(types) { + var type; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + while (type = types.shift()) { + delete this._callbacks[type]; + } + return this; + } + function trigger(types) { + var type, callbacks, args, syncFlush, asyncFlush; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + args = [].slice.call(arguments, 1); + while ((type = types.shift()) && (callbacks = this._callbacks[type])) { + syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args)); + asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args)); + syncFlush() && nextTick(asyncFlush); + } + return this; + } + function getFlush(callbacks, context, args) { + return flush; + function flush() { + var cancelled; + for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) { + cancelled = callbacks[i].apply(context, args) === false; + } + return !cancelled; + } + } + function getNextTick() { + var nextTickFn; + if (window.setImmediate) { + nextTickFn = function nextTickSetImmediate(fn) { + setImmediate(function() { + fn(); + }); + }; + } else { + nextTickFn = function nextTickSetTimeout(fn) { + setTimeout(function() { + fn(); + }, 0); + }; + } + return nextTickFn; + } + function bindContext(fn, context) { + return fn.bind ? fn.bind(context) : function() { + fn.apply(context, [].slice.call(arguments, 0)); + }; + } + }(); + var highlight = function(doc) { + "use strict"; + var defaults = { + node: null, + pattern: null, + tagName: "strong", + className: null, + wordsOnly: false, + caseSensitive: false, + diacriticInsensitive: false + }; + var accented = { + A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]", + B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]", + C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]", + D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]", + E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]", + F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]", + G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]", + H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]", + I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]", + J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]", + K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]", + L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]", + M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]", + N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]", + O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]", + P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]", + Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]", + R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]", + S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]", + T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]", + U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]", + V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]", + W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]", + X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]", + Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]", + Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]" + }; + return function hightlight(o) { + var regex; + o = _.mixin({}, defaults, o); + if (!o.node || !o.pattern) { + return; + } + o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ]; + regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive); + traverse(o.node, hightlightTextNode); + function hightlightTextNode(textNode) { + var match, patternNode, wrapperNode; + if (match = regex.exec(textNode.data)) { + wrapperNode = doc.createElement(o.tagName); + o.className && (wrapperNode.className = o.className); + patternNode = textNode.splitText(match.index); + patternNode.splitText(match[0].length); + wrapperNode.appendChild(patternNode.cloneNode(true)); + textNode.parentNode.replaceChild(wrapperNode, patternNode); + } + return !!match; + } + function traverse(el, hightlightTextNode) { + var childNode, TEXT_NODE_TYPE = 3; + for (var i = 0; i < el.childNodes.length; i++) { + childNode = el.childNodes[i]; + if (childNode.nodeType === TEXT_NODE_TYPE) { + i += hightlightTextNode(childNode) ? 1 : 0; + } else { + traverse(childNode, hightlightTextNode); + } + } + } + }; + function accent_replacer(chr) { + return accented[chr.toUpperCase()] || chr; + } + function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) { + var escapedPatterns = [], regexStr; + for (var i = 0, len = patterns.length; i < len; i++) { + var escapedWord = _.escapeRegExChars(patterns[i]); + if (diacriticInsensitive) { + escapedWord = escapedWord.replace(/\S/g, accent_replacer); + } + escapedPatterns.push(escapedWord); + } + regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")"; + return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i"); + } + }(window.document); + var Input = function() { + "use strict"; + var specialKeyCodeMap; + specialKeyCodeMap = { + 9: "tab", + 27: "esc", + 37: "left", + 39: "right", + 13: "enter", + 38: "up", + 40: "down" + }; + function Input(o, www) { + var id; + o = o || {}; + if (!o.input) { + $.error("input is missing"); + } + www.mixin(this); + this.$hint = $(o.hint); + this.$input = $(o.input); + this.$menu = $(o.menu); + id = this.$input.attr("id") || _.guid(); + this.$menu.attr("id", id + "_listbox"); + this.$hint.attr({ + "aria-hidden": true + }); + this.$input.attr({ + "aria-owns": id + "_listbox", + "aria-controls": id + "_listbox", + role: "combobox", + "aria-autocomplete": "list", + "aria-expanded": false + }); + this.query = this.$input.val(); + this.queryWhenFocused = this.hasFocus() ? this.query : null; + this.$overflowHelper = buildOverflowHelper(this.$input); + this._checkLanguageDirection(); + if (this.$hint.length === 0) { + this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop; + } + this.onSync("cursorchange", this._updateDescendent); + } + Input.normalizeQuery = function(str) { + return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " "); + }; + _.mixin(Input.prototype, EventEmitter, { + _onBlur: function onBlur() { + this.resetInputValue(); + this.trigger("blurred"); + }, + _onFocus: function onFocus() { + this.queryWhenFocused = this.query; + this.trigger("focused"); + }, + _onKeydown: function onKeydown($e) { + var keyName = specialKeyCodeMap[$e.which || $e.keyCode]; + this._managePreventDefault(keyName, $e); + if (keyName && this._shouldTrigger(keyName, $e)) { + this.trigger(keyName + "Keyed", $e); + } + }, + _onInput: function onInput() { + this._setQuery(this.getInputValue()); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + _managePreventDefault: function managePreventDefault(keyName, $e) { + var preventDefault; + switch (keyName) { + case "up": + case "down": + preventDefault = !withModifier($e); + break; + + default: + preventDefault = false; + } + preventDefault && $e.preventDefault(); + }, + _shouldTrigger: function shouldTrigger(keyName, $e) { + var trigger; + switch (keyName) { + case "tab": + trigger = !withModifier($e); + break; + + default: + trigger = true; + } + return trigger; + }, + _checkLanguageDirection: function checkLanguageDirection() { + var dir = (this.$input.css("direction") || "ltr").toLowerCase(); + if (this.dir !== dir) { + this.dir = dir; + this.$hint.attr("dir", dir); + this.trigger("langDirChanged", dir); + } + }, + _setQuery: function setQuery(val, silent) { + var areEquivalent, hasDifferentWhitespace; + areEquivalent = areQueriesEquivalent(val, this.query); + hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false; + this.query = val; + if (!silent && !areEquivalent) { + this.trigger("queryChanged", this.query); + } else if (!silent && hasDifferentWhitespace) { + this.trigger("whitespaceChanged", this.query); + } + }, + _updateDescendent: function updateDescendent(event, id) { + this.$input.attr("aria-activedescendant", id); + }, + bind: function() { + var that = this, onBlur, onFocus, onKeydown, onInput; + onBlur = _.bind(this._onBlur, this); + onFocus = _.bind(this._onFocus, this); + onKeydown = _.bind(this._onKeydown, this); + onInput = _.bind(this._onInput, this); + this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown); + if (!_.isMsie() || _.isMsie() > 9) { + this.$input.on("input.tt", onInput); + } else { + this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) { + if (specialKeyCodeMap[$e.which || $e.keyCode]) { + return; + } + _.defer(_.bind(that._onInput, that, $e)); + }); + } + return this; + }, + focus: function focus() { + this.$input.focus(); + }, + blur: function blur() { + this.$input.blur(); + }, + getLangDir: function getLangDir() { + return this.dir; + }, + getQuery: function getQuery() { + return this.query || ""; + }, + setQuery: function setQuery(val, silent) { + this.setInputValue(val); + this._setQuery(val, silent); + }, + hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() { + return this.query !== this.queryWhenFocused; + }, + getInputValue: function getInputValue() { + return this.$input.val(); + }, + setInputValue: function setInputValue(value) { + this.$input.val(value); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + resetInputValue: function resetInputValue() { + this.setInputValue(this.query); + }, + getHint: function getHint() { + return this.$hint.val(); + }, + setHint: function setHint(value) { + this.$hint.val(value); + }, + clearHint: function clearHint() { + this.setHint(""); + }, + clearHintIfInvalid: function clearHintIfInvalid() { + var val, hint, valIsPrefixOfHint, isValid; + val = this.getInputValue(); + hint = this.getHint(); + valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0; + isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow(); + !isValid && this.clearHint(); + }, + hasFocus: function hasFocus() { + return this.$input.is(":focus"); + }, + hasOverflow: function hasOverflow() { + var constraint = this.$input.width() - 2; + this.$overflowHelper.text(this.getInputValue()); + return this.$overflowHelper.width() >= constraint; + }, + isCursorAtEnd: function() { + var valueLength, selectionStart, range; + valueLength = this.$input.val().length; + selectionStart = this.$input[0].selectionStart; + if (_.isNumber(selectionStart)) { + return selectionStart === valueLength; + } else if (document.selection) { + range = document.selection.createRange(); + range.moveStart("character", -valueLength); + return valueLength === range.text.length; + } + return true; + }, + destroy: function destroy() { + this.$hint.off(".tt"); + this.$input.off(".tt"); + this.$overflowHelper.remove(); + this.$hint = this.$input = this.$overflowHelper = $("
"); + }, + setAriaExpanded: function setAriaExpanded(value) { + this.$input.attr("aria-expanded", value); + } + }); + return Input; + function buildOverflowHelper($input) { + return $('').css({ + position: "absolute", + visibility: "hidden", + whiteSpace: "pre", + fontFamily: $input.css("font-family"), + fontSize: $input.css("font-size"), + fontStyle: $input.css("font-style"), + fontVariant: $input.css("font-variant"), + fontWeight: $input.css("font-weight"), + wordSpacing: $input.css("word-spacing"), + letterSpacing: $input.css("letter-spacing"), + textIndent: $input.css("text-indent"), + textRendering: $input.css("text-rendering"), + textTransform: $input.css("text-transform") + }).insertAfter($input); + } + function areQueriesEquivalent(a, b) { + return Input.normalizeQuery(a) === Input.normalizeQuery(b); + } + function withModifier($e) { + return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey; + } + }(); + var Dataset = function() { + "use strict"; + var keys, nameGenerator; + keys = { + dataset: "tt-selectable-dataset", + val: "tt-selectable-display", + obj: "tt-selectable-object" + }; + nameGenerator = _.getIdGenerator(); + function Dataset(o, www) { + o = o || {}; + o.templates = o.templates || {}; + o.templates.notFound = o.templates.notFound || o.templates.empty; + if (!o.source) { + $.error("missing source"); + } + if (!o.node) { + $.error("missing node"); + } + if (o.name && !isValidName(o.name)) { + $.error("invalid dataset name: " + o.name); + } + www.mixin(this); + this.highlight = !!o.highlight; + this.name = _.toStr(o.name || nameGenerator()); + this.limit = o.limit || 5; + this.displayFn = getDisplayFn(o.display || o.displayKey); + this.templates = getTemplates(o.templates, this.displayFn); + this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source; + this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async; + this._resetLastSuggestion(); + this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name); + } + Dataset.extractData = function extractData(el) { + var $el = $(el); + if ($el.data(keys.obj)) { + return { + dataset: $el.data(keys.dataset) || "", + val: $el.data(keys.val) || "", + obj: $el.data(keys.obj) || null + }; + } + return null; + }; + _.mixin(Dataset.prototype, EventEmitter, { + _overwrite: function overwrite(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (this.async && this.templates.pending) { + this._renderPending(query); + } else if (!this.async && this.templates.notFound) { + this._renderNotFound(query); + } else { + this._empty(); + } + this.trigger("rendered", suggestions, false, this.name); + }, + _append: function append(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length && this.$lastSuggestion.length) { + this._appendSuggestions(query, suggestions); + } else if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (!this.$lastSuggestion.length && this.templates.notFound) { + this._renderNotFound(query); + } + this.trigger("rendered", suggestions, true, this.name); + }, + _renderSuggestions: function renderSuggestions(query, suggestions) { + var $fragment; + $fragment = this._getSuggestionsFragment(query, suggestions); + this.$lastSuggestion = $fragment.children().last(); + this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions)); + }, + _appendSuggestions: function appendSuggestions(query, suggestions) { + var $fragment, $lastSuggestion; + $fragment = this._getSuggestionsFragment(query, suggestions); + $lastSuggestion = $fragment.children().last(); + this.$lastSuggestion.after($fragment); + this.$lastSuggestion = $lastSuggestion; + }, + _renderPending: function renderPending(query) { + var template = this.templates.pending; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _renderNotFound: function renderNotFound(query) { + var template = this.templates.notFound; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _empty: function empty() { + this.$el.empty(); + this._resetLastSuggestion(); + }, + _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) { + var that = this, fragment; + fragment = document.createDocumentFragment(); + _.each(suggestions, function getSuggestionNode(suggestion) { + var $el, context; + context = that._injectQuery(query, suggestion); + $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable); + fragment.appendChild($el[0]); + }); + this.highlight && highlight({ + className: this.classes.highlight, + node: fragment, + pattern: query + }); + return $(fragment); + }, + _getFooter: function getFooter(query, suggestions) { + return this.templates.footer ? this.templates.footer({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _getHeader: function getHeader(query, suggestions) { + return this.templates.header ? this.templates.header({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _resetLastSuggestion: function resetLastSuggestion() { + this.$lastSuggestion = $(); + }, + _injectQuery: function injectQuery(query, obj) { + return _.isObject(obj) ? _.mixin({ + _query: query + }, obj) : obj; + }, + update: function update(query) { + var that = this, canceled = false, syncCalled = false, rendered = 0; + this.cancel(); + this.cancel = function cancel() { + canceled = true; + that.cancel = $.noop; + that.async && that.trigger("asyncCanceled", query, that.name); + }; + this.source(query, sync, async); + !syncCalled && sync([]); + function sync(suggestions) { + if (syncCalled) { + return; + } + syncCalled = true; + suggestions = (suggestions || []).slice(0, that.limit); + rendered = suggestions.length; + that._overwrite(query, suggestions); + if (rendered < that.limit && that.async) { + that.trigger("asyncRequested", query, that.name); + } + } + function async(suggestions) { + suggestions = suggestions || []; + if (!canceled && rendered < that.limit) { + that.cancel = $.noop; + var idx = Math.abs(rendered - that.limit); + rendered += idx; + that._append(query, suggestions.slice(0, idx)); + that.async && that.trigger("asyncReceived", query, that.name); + } + } + }, + cancel: $.noop, + clear: function clear() { + this._empty(); + this.cancel(); + this.trigger("cleared"); + }, + isEmpty: function isEmpty() { + return this.$el.is(":empty"); + }, + destroy: function destroy() { + this.$el = $("
"); + } + }); + return Dataset; + function getDisplayFn(display) { + display = display || _.stringify; + return _.isFunction(display) ? display : displayFn; + function displayFn(obj) { + return obj[display]; + } + } + function getTemplates(templates, displayFn) { + return { + notFound: templates.notFound && _.templatify(templates.notFound), + pending: templates.pending && _.templatify(templates.pending), + header: templates.header && _.templatify(templates.header), + footer: templates.footer && _.templatify(templates.footer), + suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate + }; + function userSuggestionTemplate(context) { + var template = templates.suggestion; + return $(template(context)).attr("id", _.guid()); + } + function suggestionTemplate(context) { + return $('
').attr("id", _.guid()).text(displayFn(context)); + } + } + function isValidName(str) { + return /^[_a-zA-Z0-9-]+$/.test(str); + } + }(); + var Menu = function() { + "use strict"; + function Menu(o, www) { + var that = this; + o = o || {}; + if (!o.node) { + $.error("node is required"); + } + www.mixin(this); + this.$node = $(o.node); + this.query = null; + this.datasets = _.map(o.datasets, initializeDataset); + function initializeDataset(oDataset) { + var node = that.$node.find(oDataset.node).first(); + oDataset.node = node.length ? node : $("
").appendTo(that.$node); + return new Dataset(oDataset, www); + } + } + _.mixin(Menu.prototype, EventEmitter, { + _onSelectableClick: function onSelectableClick($e) { + this.trigger("selectableClicked", $($e.currentTarget)); + }, + _onRendered: function onRendered(type, dataset, suggestions, async) { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetRendered", dataset, suggestions, async); + }, + _onCleared: function onCleared() { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetCleared"); + }, + _propagate: function propagate() { + this.trigger.apply(this, arguments); + }, + _allDatasetsEmpty: function allDatasetsEmpty() { + return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) { + var isEmpty = dataset.isEmpty(); + this.$node.attr("aria-expanded", !isEmpty); + return isEmpty; + }, this)); + }, + _getSelectables: function getSelectables() { + return this.$node.find(this.selectors.selectable); + }, + _removeCursor: function _removeCursor() { + var $selectable = this.getActiveSelectable(); + $selectable && $selectable.removeClass(this.classes.cursor); + }, + _ensureVisible: function ensureVisible($el) { + var elTop, elBottom, nodeScrollTop, nodeHeight; + elTop = $el.position().top; + elBottom = elTop + $el.outerHeight(true); + nodeScrollTop = this.$node.scrollTop(); + nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10); + if (elTop < 0) { + this.$node.scrollTop(nodeScrollTop + elTop); + } else if (nodeHeight < elBottom) { + this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight)); + } + }, + bind: function() { + var that = this, onSelectableClick; + onSelectableClick = _.bind(this._onSelectableClick, this); + this.$node.on("click.tt", this.selectors.selectable, onSelectableClick); + this.$node.on("mouseover", this.selectors.selectable, function() { + that.setCursor($(this)); + }); + this.$node.on("mouseleave", function() { + that._removeCursor(); + }); + _.each(this.datasets, function(dataset) { + dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that); + }); + return this; + }, + isOpen: function isOpen() { + return this.$node.hasClass(this.classes.open); + }, + open: function open() { + this.$node.scrollTop(0); + this.$node.addClass(this.classes.open); + }, + close: function close() { + this.$node.attr("aria-expanded", false); + this.$node.removeClass(this.classes.open); + this._removeCursor(); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.attr("dir", dir); + }, + selectableRelativeToCursor: function selectableRelativeToCursor(delta) { + var $selectables, $oldCursor, oldIndex, newIndex; + $oldCursor = this.getActiveSelectable(); + $selectables = this._getSelectables(); + oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1; + newIndex = oldIndex + delta; + newIndex = (newIndex + 1) % ($selectables.length + 1) - 1; + newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex; + return newIndex === -1 ? null : $selectables.eq(newIndex); + }, + setCursor: function setCursor($selectable) { + this._removeCursor(); + if ($selectable = $selectable && $selectable.first()) { + $selectable.addClass(this.classes.cursor); + this._ensureVisible($selectable); + } + }, + getSelectableData: function getSelectableData($el) { + return $el && $el.length ? Dataset.extractData($el) : null; + }, + getActiveSelectable: function getActiveSelectable() { + var $selectable = this._getSelectables().filter(this.selectors.cursor).first(); + return $selectable.length ? $selectable : null; + }, + getTopSelectable: function getTopSelectable() { + var $selectable = this._getSelectables().first(); + return $selectable.length ? $selectable : null; + }, + update: function update(query) { + var isValidUpdate = query !== this.query; + if (isValidUpdate) { + this.query = query; + _.each(this.datasets, updateDataset); + } + return isValidUpdate; + function updateDataset(dataset) { + dataset.update(query); + } + }, + empty: function empty() { + _.each(this.datasets, clearDataset); + this.query = null; + this.$node.addClass(this.classes.empty); + function clearDataset(dataset) { + dataset.clear(); + } + }, + destroy: function destroy() { + this.$node.off(".tt"); + this.$node = $("
"); + _.each(this.datasets, destroyDataset); + function destroyDataset(dataset) { + dataset.destroy(); + } + } + }); + return Menu; + }(); + var Status = function() { + "use strict"; + function Status(options) { + this.$el = $("", { + role: "status", + "aria-live": "polite" + }).css({ + position: "absolute", + padding: "0", + border: "0", + height: "1px", + width: "1px", + "margin-bottom": "-1px", + "margin-right": "-1px", + overflow: "hidden", + clip: "rect(0 0 0 0)", + "white-space": "nowrap" + }); + options.$input.after(this.$el); + _.each(options.menu.datasets, _.bind(function(dataset) { + if (dataset.onSync) { + dataset.onSync("rendered", _.bind(this.update, this)); + dataset.onSync("cleared", _.bind(this.cleared, this)); + } + }, this)); + } + _.mixin(Status.prototype, { + update: function update(event, suggestions) { + var length = suggestions.length; + var words; + if (length === 1) { + words = { + result: "result", + is: "is" + }; + } else { + words = { + result: "results", + is: "are" + }; + } + this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate."); + }, + cleared: function() { + this.$el.text(""); + } + }); + return Status; + }(); + var DefaultMenu = function() { + "use strict"; + var s = Menu.prototype; + function DefaultMenu() { + Menu.apply(this, [].slice.call(arguments, 0)); + } + _.mixin(DefaultMenu.prototype, Menu.prototype, { + open: function open() { + !this._allDatasetsEmpty() && this._show(); + return s.open.apply(this, [].slice.call(arguments, 0)); + }, + close: function close() { + this._hide(); + return s.close.apply(this, [].slice.call(arguments, 0)); + }, + _onRendered: function onRendered() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onRendered.apply(this, [].slice.call(arguments, 0)); + }, + _onCleared: function onCleared() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onCleared.apply(this, [].slice.call(arguments, 0)); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl); + return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); + }, + _hide: function hide() { + this.$node.hide(); + }, + _show: function show() { + this.$node.css("display", "block"); + } + }); + return DefaultMenu; + }(); + var Typeahead = function() { + "use strict"; + function Typeahead(o, www) { + var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; + o = o || {}; + if (!o.input) { + $.error("missing input"); + } + if (!o.menu) { + $.error("missing menu"); + } + if (!o.eventBus) { + $.error("missing event bus"); + } + www.mixin(this); + this.eventBus = o.eventBus; + this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; + this.input = o.input; + this.menu = o.menu; + this.enabled = true; + this.autoselect = !!o.autoselect; + this.active = false; + this.input.hasFocus() && this.activate(); + this.dir = this.input.getLangDir(); + this._hacks(); + this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this); + onFocused = c(this, "activate", "open", "_onFocused"); + onBlurred = c(this, "deactivate", "_onBlurred"); + onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed"); + onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed"); + onEscKeyed = c(this, "isActive", "_onEscKeyed"); + onUpKeyed = c(this, "isActive", "open", "_onUpKeyed"); + onDownKeyed = c(this, "isActive", "open", "_onDownKeyed"); + onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed"); + onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed"); + onQueryChanged = c(this, "_openIfActive", "_onQueryChanged"); + onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged"); + this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this); + } + _.mixin(Typeahead.prototype, { + _hacks: function hacks() { + var $input, $menu; + $input = this.input.$input || $("
"); + $menu = this.menu.$node || $("
"); + $input.on("blur.tt", function($e) { + var active, isActive, hasActive; + active = document.activeElement; + isActive = $menu.is(active); + hasActive = $menu.has(active).length > 0; + if (_.isMsie() && (isActive || hasActive)) { + $e.preventDefault(); + $e.stopImmediatePropagation(); + _.defer(function() { + $input.focus(); + }); + } + }); + $menu.on("mousedown.tt", function($e) { + $e.preventDefault(); + }); + }, + _onSelectableClicked: function onSelectableClicked(type, $el) { + this.select($el); + }, + _onDatasetCleared: function onDatasetCleared() { + this._updateHint(); + }, + _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) { + this._updateHint(); + if (this.autoselect) { + var cursorClass = this.selectors.cursor.substr(1); + this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass); + } + this.eventBus.trigger("render", suggestions, async, dataset); + }, + _onAsyncRequested: function onAsyncRequested(type, dataset, query) { + this.eventBus.trigger("asyncrequest", query, dataset); + }, + _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { + this.eventBus.trigger("asynccancel", query, dataset); + }, + _onAsyncReceived: function onAsyncReceived(type, dataset, query) { + this.eventBus.trigger("asyncreceive", query, dataset); + }, + _onFocused: function onFocused() { + this._minLengthMet() && this.menu.update(this.input.getQuery()); + }, + _onBlurred: function onBlurred() { + if (this.input.hasQueryChangedSinceLastFocus()) { + this.eventBus.trigger("change", this.input.getQuery()); + } + }, + _onEnterKeyed: function onEnterKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + if (this.select($selectable)) { + $e.preventDefault(); + $e.stopPropagation(); + } + } else if (this.autoselect) { + if (this.select(this.menu.getTopSelectable())) { + $e.preventDefault(); + $e.stopPropagation(); + } + } + }, + _onTabKeyed: function onTabKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + this.select($selectable) && $e.preventDefault(); + } else if (this.autoselect) { + if ($selectable = this.menu.getTopSelectable()) { + this.autocomplete($selectable) && $e.preventDefault(); + } + } + }, + _onEscKeyed: function onEscKeyed() { + this.close(); + }, + _onUpKeyed: function onUpKeyed() { + this.moveCursor(-1); + }, + _onDownKeyed: function onDownKeyed() { + this.moveCursor(+1); + }, + _onLeftKeyed: function onLeftKeyed() { + if (this.dir === "rtl" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onRightKeyed: function onRightKeyed() { + if (this.dir === "ltr" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onQueryChanged: function onQueryChanged(e, query) { + this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); + }, + _onWhitespaceChanged: function onWhitespaceChanged() { + this._updateHint(); + }, + _onLangDirChanged: function onLangDirChanged(e, dir) { + if (this.dir !== dir) { + this.dir = dir; + this.menu.setLanguageDirection(dir); + } + }, + _openIfActive: function openIfActive() { + this.isActive() && this.open(); + }, + _minLengthMet: function minLengthMet(query) { + query = _.isString(query) ? query : this.input.getQuery() || ""; + return query.length >= this.minLength; + }, + _updateHint: function updateHint() { + var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; + $selectable = this.menu.getTopSelectable(); + data = this.menu.getSelectableData($selectable); + val = this.input.getInputValue(); + if (data && !_.isBlankString(val) && !this.input.hasOverflow()) { + query = Input.normalizeQuery(val); + escapedQuery = _.escapeRegExChars(query); + frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i"); + match = frontMatchRegEx.exec(data.val); + match && this.input.setHint(val + match[1]); + } else { + this.input.clearHint(); + } + }, + isEnabled: function isEnabled() { + return this.enabled; + }, + enable: function enable() { + this.enabled = true; + }, + disable: function disable() { + this.enabled = false; + }, + isActive: function isActive() { + return this.active; + }, + activate: function activate() { + if (this.isActive()) { + return true; + } else if (!this.isEnabled() || this.eventBus.before("active")) { + return false; + } else { + this.active = true; + this.eventBus.trigger("active"); + return true; + } + }, + deactivate: function deactivate() { + if (!this.isActive()) { + return true; + } else if (this.eventBus.before("idle")) { + return false; + } else { + this.active = false; + this.close(); + this.eventBus.trigger("idle"); + return true; + } + }, + isOpen: function isOpen() { + return this.menu.isOpen(); + }, + open: function open() { + if (!this.isOpen() && !this.eventBus.before("open")) { + this.input.setAriaExpanded(true); + this.menu.open(); + this._updateHint(); + this.eventBus.trigger("open"); + } + return this.isOpen(); + }, + close: function close() { + if (this.isOpen() && !this.eventBus.before("close")) { + this.input.setAriaExpanded(false); + this.menu.close(); + this.input.clearHint(); + this.input.resetInputValue(); + this.eventBus.trigger("close"); + } + return !this.isOpen(); + }, + setVal: function setVal(val) { + this.input.setQuery(_.toStr(val)); + }, + getVal: function getVal() { + return this.input.getQuery(); + }, + select: function select($selectable) { + var data = this.menu.getSelectableData($selectable); + if (data && !this.eventBus.before("select", data.obj, data.dataset)) { + this.input.setQuery(data.val, true); + this.eventBus.trigger("select", data.obj, data.dataset); + this.close(); + return true; + } + return false; + }, + autocomplete: function autocomplete($selectable) { + var query, data, isValid; + query = this.input.getQuery(); + data = this.menu.getSelectableData($selectable); + isValid = data && query !== data.val; + if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) { + this.input.setQuery(data.val); + this.eventBus.trigger("autocomplete", data.obj, data.dataset); + return true; + } + return false; + }, + moveCursor: function moveCursor(delta) { + var query, $candidate, data, suggestion, datasetName, cancelMove, id; + query = this.input.getQuery(); + $candidate = this.menu.selectableRelativeToCursor(delta); + data = this.menu.getSelectableData($candidate); + suggestion = data ? data.obj : null; + datasetName = data ? data.dataset : null; + id = $candidate ? $candidate.attr("id") : null; + this.input.trigger("cursorchange", id); + cancelMove = this._minLengthMet() && this.menu.update(query); + if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { + this.menu.setCursor($candidate); + if (data) { + if (typeof data.val === "string") { + this.input.setInputValue(data.val); + } + } else { + this.input.resetInputValue(); + this._updateHint(); + } + this.eventBus.trigger("cursorchange", suggestion, datasetName); + return true; + } + return false; + }, + destroy: function destroy() { + this.input.destroy(); + this.menu.destroy(); + } + }); + return Typeahead; + function c(ctx) { + var methods = [].slice.call(arguments, 1); + return function() { + var args = [].slice.call(arguments); + _.each(methods, function(method) { + return ctx[method].apply(ctx, args); + }); + }; + } + }(); + (function() { + "use strict"; + var old, keys, methods; + old = $.fn.typeahead; + keys = { + www: "tt-www", + attrs: "tt-attrs", + typeahead: "tt-typeahead" + }; + methods = { + initialize: function initialize(o, datasets) { + var www; + datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); + o = o || {}; + www = WWW(o.classNames); + return this.each(attach); + function attach() { + var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor; + _.each(datasets, function(d) { + d.highlight = !!o.highlight; + }); + $input = $(this); + $wrapper = $(www.html.wrapper); + $hint = $elOrNull(o.hint); + $menu = $elOrNull(o.menu); + defaultHint = o.hint !== false && !$hint; + defaultMenu = o.menu !== false && !$menu; + defaultHint && ($hint = buildHintFromInput($input, www)); + defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); + $hint && $hint.val(""); + $input = prepInput($input, www); + if (defaultHint || defaultMenu) { + $wrapper.css(www.css.wrapper); + $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); + $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); + } + MenuConstructor = defaultMenu ? DefaultMenu : Menu; + eventBus = new EventBus({ + el: $input + }); + input = new Input({ + hint: $hint, + input: $input, + menu: $menu + }, www); + menu = new MenuConstructor({ + node: $menu, + datasets: datasets + }, www); + status = new Status({ + $input: $input, + menu: menu + }); + typeahead = new Typeahead({ + input: input, + menu: menu, + eventBus: eventBus, + minLength: o.minLength, + autoselect: o.autoselect + }, www); + $input.data(keys.www, www); + $input.data(keys.typeahead, typeahead); + } + }, + isEnabled: function isEnabled() { + var enabled; + ttEach(this.first(), function(t) { + enabled = t.isEnabled(); + }); + return enabled; + }, + enable: function enable() { + ttEach(this, function(t) { + t.enable(); + }); + return this; + }, + disable: function disable() { + ttEach(this, function(t) { + t.disable(); + }); + return this; + }, + isActive: function isActive() { + var active; + ttEach(this.first(), function(t) { + active = t.isActive(); + }); + return active; + }, + activate: function activate() { + ttEach(this, function(t) { + t.activate(); + }); + return this; + }, + deactivate: function deactivate() { + ttEach(this, function(t) { + t.deactivate(); + }); + return this; + }, + isOpen: function isOpen() { + var open; + ttEach(this.first(), function(t) { + open = t.isOpen(); + }); + return open; + }, + open: function open() { + ttEach(this, function(t) { + t.open(); + }); + return this; + }, + close: function close() { + ttEach(this, function(t) { + t.close(); + }); + return this; + }, + select: function select(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.select($el); + }); + return success; + }, + autocomplete: function autocomplete(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.autocomplete($el); + }); + return success; + }, + moveCursor: function moveCursoe(delta) { + var success = false; + ttEach(this.first(), function(t) { + success = t.moveCursor(delta); + }); + return success; + }, + val: function val(newVal) { + var query; + if (!arguments.length) { + ttEach(this.first(), function(t) { + query = t.getVal(); + }); + return query; + } else { + ttEach(this, function(t) { + t.setVal(_.toStr(newVal)); + }); + return this; + } + }, + destroy: function destroy() { + ttEach(this, function(typeahead, $input) { + revert($input); + typeahead.destroy(); + }); + return this; + } + }; + $.fn.typeahead = function(method) { + if (methods[method]) { + return methods[method].apply(this, [].slice.call(arguments, 1)); + } else { + return methods.initialize.apply(this, arguments); + } + }; + $.fn.typeahead.noConflict = function noConflict() { + $.fn.typeahead = old; + return this; + }; + function ttEach($els, fn) { + $els.each(function() { + var $input = $(this), typeahead; + (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); + }); + } + function buildHintFromInput($input, www) { + return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({ + readonly: true, + required: false + }).removeAttr("id name placeholder").removeClass("required").attr({ + spellcheck: "false", + tabindex: -1 + }); + } + function prepInput($input, www) { + $input.data(keys.attrs, { + dir: $input.attr("dir"), + autocomplete: $input.attr("autocomplete"), + spellcheck: $input.attr("spellcheck"), + style: $input.attr("style") + }); + $input.addClass(www.classes.input).attr({ + spellcheck: false + }); + try { + !$input.attr("dir") && $input.attr("dir", "auto"); + } catch (e) {} + return $input; + } + function getBackgroundStyles($el) { + return { + backgroundAttachment: $el.css("background-attachment"), + backgroundClip: $el.css("background-clip"), + backgroundColor: $el.css("background-color"), + backgroundImage: $el.css("background-image"), + backgroundOrigin: $el.css("background-origin"), + backgroundPosition: $el.css("background-position"), + backgroundRepeat: $el.css("background-repeat"), + backgroundSize: $el.css("background-size") + }; + } + function revert($input) { + var www, $wrapper; + www = $input.data(keys.www); + $wrapper = $input.parent().filter(www.selectors.wrapper); + _.each($input.data(keys.attrs), function(val, key) { + _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); + }); + $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); + if ($wrapper.length) { + $input.detach().insertAfter($wrapper); + $wrapper.remove(); + } + } + function $elOrNull(obj) { + var isValid, $el; + isValid = _.isJQuery(obj) || _.isElement(obj); + $el = isValid ? $(obj).first() : []; + return $el.length ? $el : null; + } + })(); +}); \ No newline at end of file diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/search.json b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/search.json new file mode 100644 index 00000000..d37b3a86 --- /dev/null +++ b/3.1.0/docsets/Turf.docset/Contents/Resources/Documents/search.json @@ -0,0 +1 @@ +{"Typealiases.html#/s:4Turf17LocationDirectiona":{"name":"LocationDirection","abstract":"\u003cp\u003eAn azimuth measured in degrees clockwise from true north.\u003c/p\u003e"},"Typealiases.html#/s:4Turf16LocationDistancea":{"name":"LocationDistance","abstract":"\u003cp\u003eA distance in meters.\u003c/p\u003e"},"Typealiases.html#/s:4Turf15LocationDegreesa":{"name":"LocationDegrees","abstract":"\u003cp\u003eA latitude or longitude in degrees.\u003c/p\u003e"},"Typealiases.html#/s:4Turf20LocationCoordinate2Da":{"name":"LocationCoordinate2D","abstract":"\u003cp\u003eA geographic coordinate.\u003c/p\u003e"},"Typealiases.html#/LocationDirection":{"name":"LocationDirection","abstract":"\u003cp\u003eAn azimuth measured in degrees clockwise from true north.\u003c/p\u003e"},"Typealiases.html#/LocationDistance":{"name":"LocationDistance","abstract":"\u003cp\u003eA distance in meters.\u003c/p\u003e"},"Typealiases.html#/LocationDegrees":{"name":"LocationDegrees","abstract":"\u003cp\u003eA latitude or longitude in degrees.\u003c/p\u003e"},"Typealiases.html#/s:4Turf9JSONArraya":{"name":"JSONArray","abstract":"\u003cp\u003eA JSON array of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/JSONValue.html\"\u003eJSONValue\u003c/a\u003e\u003c/code\u003e instances.\u003c/p\u003e"},"Typealiases.html#/s:4Turf10JSONObjecta":{"name":"JSONObject","abstract":"\u003cp\u003eA JSON object represented in memory by a dictionary with strings as keys and \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/JSONValue.html\"\u003eJSONValue\u003c/a\u003e\u003c/code\u003e instances as values.\u003c/p\u003e"},"Typealiases.html#/s:4Turf15LocationRadiansa":{"name":"LocationRadians","abstract":"\u003cp\u003eA latitude or longitude measured in radians, as opposed to \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbTypealiases.html#/s:4Turf15LocationDegreesa\"\u003eLocationDegrees\u003c/a\u003e\u003c/code\u003e, which is measured in degrees of arc.\u003c/p\u003e"},"Typealiases.html#/s:4Turf14RadianDistancea":{"name":"RadianDistance","abstract":"\u003cp\u003eA difference in latitude or longitude measured in radians, as opposed to \u003ccode\u003eCLLocationDegrees\u003c/code\u003e, which is used by some libraries to represent a similar distance measured in degrees of arc.\u003c/p\u003e"},"Typealiases.html#/s:4Turf11LineSegmenta":{"name":"LineSegment","abstract":"\u003cp\u003eA segment between two positions in a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/LineString.html\"\u003eLineString\u003c/a\u003e\u003c/code\u003e geometry or \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Ring.html\"\u003eRing\u003c/a\u003e\u003c/code\u003e.\u003c/p\u003e"},"Structs/Ring.html#/s:4Turf4RingV11coordinatesSaySo22CLLocationCoordinate2DVGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the linear ring is located.\u003c/p\u003e","parent_name":"Ring"},"Structs/Ring.html#/s:4Turf4RingV11coordinatesACSaySo22CLLocationCoordinate2DVG_tcfc":{"name":"init(coordinates:)","abstract":"\u003cp\u003eInitializes a linear ring defined by the given positions.\u003c/p\u003e","parent_name":"Ring"},"Structs/Ring.html#/s:4Turf4RingV4areaSdvp":{"name":"area","abstract":"\u003cp\u003eCalculate the approximate area of the polygon were it projected onto the earth, in square meters.","parent_name":"Ring"},"Structs/Ring.html#/s:4Turf4RingV8contains_14ignoreBoundarySbSo22CLLocationCoordinate2DV_SbtF":{"name":"contains(_:ignoreBoundary:)","abstract":"\u003cp\u003eDetermines if the given point falls within the ring.","parent_name":"Ring"},"Structs/Ring.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Ring"},"Structs/Ring.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Ring"},"Structs/RadianCoordinate2D.html#/s:4Turf18RadianCoordinate2DV8latitude9longitudeACSd_Sdtcfc":{"name":"init(latitude:longitude:)","abstract":"\u003cp\u003eInitializes a coordinate pair located at the given latitude and longitude.\u003c/p\u003e","parent_name":"RadianCoordinate2D"},"Structs/RadianCoordinate2D.html#/s:4Turf18RadianCoordinate2DVyACSo010CLLocationC1DVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a coordinate pair measured in radians that is coincident to the given coordinate pair measured in degrees of arc.\u003c/p\u003e","parent_name":"RadianCoordinate2D"},"Structs/RadianCoordinate2D.html#/s:4Turf18RadianCoordinate2DV9direction2to10Foundation11MeasurementVySo11NSUnitAngleCGAC_tF":{"name":"direction(to:)","abstract":"\u003cp\u003eReturns direction given two coordinates.\u003c/p\u003e","parent_name":"RadianCoordinate2D"},"Structs/RadianCoordinate2D.html#/s:4Turf18RadianCoordinate2DV10coordinate2at6facingACSd_10Foundation11MeasurementVySo11NSUnitAngleCGtF":{"name":"coordinate(at:facing:)","abstract":"\u003cp\u003eReturns coordinate at a given distance and direction away from coordinate.\u003c/p\u003e","parent_name":"RadianCoordinate2D"},"Structs/RadianCoordinate2D.html#/s:4Turf18RadianCoordinate2DV8distance2toSdAC_tF":{"name":"distance(to:)","abstract":"\u003cp\u003eReturns the Haversine distance between two coordinates measured in radians.\u003c/p\u003e","parent_name":"RadianCoordinate2D"},"Structs/Polygon.html#/s:4Turf7PolygonV11coordinatesSaySaySo22CLLocationCoordinate2DVGGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the polygon is located. Each nested array corresponds to one linear ring.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonVyACSaySaySo22CLLocationCoordinate2DVGGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a polygon defined by the given positions.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV9outerRing10innerRingsAcA0D0V_SayAGGtcfc":{"name":"init(outerRing:innerRings:)","abstract":"\u003cp\u003eInitializes a polygon defined by the given linear rings.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV6center6radius8verticesACSo22CLLocationCoordinate2DV_SdSitcfc":{"name":"init(center:radius:vertices:)","abstract":"\u003cp\u003eInitializes a polygon as a given center coordinate with a given number of","parent_name":"Polygon"},"Structs/Polygon.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Polygon"},"Structs/Polygon.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV10innerRingsSayAA4RingVGvp":{"name":"innerRings","abstract":"\u003cp\u003eRepresentation of \u003ccode\u003ePolygon\u003c/code\u003es coordinates of inner rings\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV9outerRingAA0D0Vvp":{"name":"outerRing","abstract":"\u003cp\u003eRepresentation of \u003ccode\u003ePolygon\u003c/code\u003es coordinates of outer ring\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV4areaSdvp":{"name":"area","abstract":"\u003cp\u003eThe polygon’s area.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV8contains_14ignoreBoundarySbSo22CLLocationCoordinate2DV_SbtF":{"name":"contains(_:ignoreBoundary:)","abstract":"\u003cp\u003eReturns whether the given coordinate falls within the polygon and outside of its interior rings.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV6smooth10iterationsACSi_tF":{"name":"smooth(iterations:)","abstract":"\u003cp\u003eReturns the polygon with corners smoothed out using \u003ca href=\"https://www.cs.unc.edu/%7Edm/UNC/COMP258/LECTURES/Chaikins-Algorithm.pdf\"\u003eChaikin’s algorithm\u003c/a\u003e.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV10simplified9tolerance14highestQualityACSd_SbtF":{"name":"simplified(tolerance:highestQuality:)","abstract":"\u003cp\u003eReturns a copy of the polygon simplified using the Ramer–Douglas–Peucker algorithm.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV8simplify9tolerance14highestQualityySd_SbtF":{"name":"simplify(tolerance:highestQuality:)","abstract":"\u003cp\u003eSimplifies the polygon in place using the Ramer–Douglas–Peucker algorithm.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV6centerSo22CLLocationCoordinate2DVSgvp":{"name":"center","abstract":"\u003cp\u003eCalculates the absolute center of the bounding box.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV8centroidSo22CLLocationCoordinate2DVSgvp":{"name":"centroid","abstract":"\u003cp\u003eCalculates the centroid using the mean of all vertices.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV12centerOfMassSo22CLLocationCoordinate2DVSgvp":{"name":"centerOfMass","abstract":"\u003cp\u003eCalculates the \u003ca href=\"https://en.wikipedia.org/wiki/Center_of_mass\"\u003ecenter of mass\u003c/a\u003e using the \u003ca href=\"https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon\"\u003ecentroid of polygon\u003c/a\u003e formula.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Polygon"},"Structs/Point.html#/s:4Turf5PointV11coordinatesSo22CLLocationCoordinate2DVvp":{"name":"coordinates","abstract":"\u003cp\u003eThe position at which the point is located.\u003c/p\u003e","parent_name":"Point"},"Structs/Point.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"Point"},"Structs/Point.html#/s:4Turf5PointVyACSo22CLLocationCoordinate2DVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a point defined by the given position.\u003c/p\u003e","parent_name":"Point"},"Structs/Point.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Point"},"Structs/Point.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Point"},"Structs/Point.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"Point"},"Structs/Point.html#/s:4Turf5PointV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Point"},"Structs/Point.html#/s:4Turf5PointV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Point"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonV11coordinatesSaySaySaySo22CLLocationCoordinate2DVGGGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the multipolygon is located. Each nested array corresponds to one polygon.\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonV8polygonsSayAA0C0VGvp":{"name":"polygons","abstract":"\u003cp\u003eThe polygon geometries that conceptually form the multipolygon.\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonVyACSaySaySaySo22CLLocationCoordinate2DVGGGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a multipolygon defined by the given positions.\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonVyACSayAA0C0VGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a multipolygon coincident to the given polygons.\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonV8contains_14ignoreBoundarySbSo22CLLocationCoordinate2DV_SbtF":{"name":"contains(_:ignoreBoundary:)","abstract":"\u003cp\u003eDetermines if the given coordinate falls within any of the polygons.","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPoint.html#/s:4Turf10MultiPointV11coordinatesSaySo22CLLocationCoordinate2DVGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the multipoint is located.\u003c/p\u003e","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:4Turf10MultiPointVyACSaySo22CLLocationCoordinate2DVGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a multipoint defined by the given positions.\u003c/p\u003e","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:4Turf10MultiPointV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:4Turf10MultiPointV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiPoint"},"Structs/MultiLineString.html#/s:4Turf15MultiLineStringV11coordinatesSaySaySo22CLLocationCoordinate2DVGGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the multi–line string is located. Each nested array corresponds to one line string.\u003c/p\u003e","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf15MultiLineStringVyACSaySaySo22CLLocationCoordinate2DVGGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a multi–line string defined by the given positions.\u003c/p\u003e","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf15MultiLineStringVyAcA7PolygonVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a multi–line string coincident to the given polygon’s linear rings.\u003c/p\u003e","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf15MultiLineStringV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf15MultiLineStringV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiLineString"},"Structs/LineString/IndexedCoordinate.html#/s:4Turf10LineStringV17IndexedCoordinateV10coordinateSo22CLLocationCoordinate2DVvp":{"name":"coordinate","abstract":"\u003cp\u003eThe coordinate\u003c/p\u003e","parent_name":"IndexedCoordinate"},"Structs/LineString/IndexedCoordinate.html#/s:4Turf10LineStringV17IndexedCoordinateV8distanceSdvp":{"name":"distance","abstract":"\u003cp\u003eThe coordinate’s distance from the start of the polyline\u003c/p\u003e","parent_name":"IndexedCoordinate"},"Structs/LineString.html#/s:4Turf10LineStringV11coordinatesSaySo22CLLocationCoordinate2DVGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the line string is located.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringVyACSaySo22CLLocationCoordinate2DVGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a line string defined by given positions.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringVyAcA4RingVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a line string coincident to the given linear ring.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"LineString"},"Structs/LineString.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV6bezier10resolution9sharpnessACSgSi_SdtF":{"name":"bezier(resolution:sharpness:)","abstract":"\u003cp\u003eReturns the line string transformed into an approximation of a curve by applying a Bézier spline algorithm.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV7trimmed4from2toACSgSd_SdtF":{"name":"trimmed(from:to:)","abstract":"\u003cp\u003eReturns the portion of the line string that begins at the given start distance and extends the given stop distance along the line string.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV7trimmed4from8distanceACSgSo22CLLocationCoordinate2DV_SdtF":{"name":"trimmed(from:distance:)","abstract":"\u003cp\u003eReturns the portion of the line string that begins at the given coordinate and extends the given distance along the line string.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString/IndexedCoordinate.html":{"name":"IndexedCoordinate","abstract":"\u003cp\u003e\u003ccode\u003eIndexedCoordinate\u003c/code\u003e is a coordinate with additional information such as the index from its position in the polyline and distance from the start of the polyline.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV19coordinateFromStart8distanceSo22CLLocationCoordinate2DVSgSd_tF":{"name":"coordinateFromStart(distance:)","abstract":"\u003cp\u003eReturns a coordinate along a line string at a certain distance from the start of the polyline.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV26indexedCoordinateFromStart8distanceAC07IndexedE0VSgSd_tF":{"name":"indexedCoordinateFromStart(distance:)","abstract":"\u003cp\u003eReturns an indexed coordinate along a line string at a certain distance from the start of the polyline.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV8distance4from2toSdSgSo22CLLocationCoordinate2DVSg_AJtF":{"name":"distance(from:to:)","abstract":"\u003cp\u003eReturns the distance along a slice of the line string with the given endpoints.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV6sliced4from2toACSgSo22CLLocationCoordinate2DVSg_AJtF":{"name":"sliced(from:to:)","abstract":"\u003cp\u003eReturns a subset of the line string between two given coordinates.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV17closestCoordinate2toAC07IndexedE0VSgSo22CLLocationCoordinate2DV_tF":{"name":"closestCoordinate(to:)","abstract":"\u003cp\u003eReturns the geographic coordinate along the line string that is closest to the given coordinate as the crow flies.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV10simplified9tolerance14highestQualityACSd_SbtF":{"name":"simplified(tolerance:highestQuality:)","abstract":"\u003cp\u003eReturns a copy of the line string simplified using the Ramer–Douglas–Peucker algorithm.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV8simplify9tolerance14highestQualityySd_SbtF":{"name":"simplify(tolerance:highestQuality:)","abstract":"\u003cp\u003eSimplifies the line string in place using the Ramer–Douglas–Peucker algorithm.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV13intersections4withSaySo22CLLocationCoordinate2DVGAC_tF":{"name":"intersections(with:)","abstract":"\u003cp\u003eReturns all intersections with another \u003ccode\u003eLineString\u003c/code\u003e.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"LineString"},"Structs/GeometryCollection.html#/s:4Turf18GeometryCollectionV10geometriesSayAA0B0OGvp":{"name":"geometries","abstract":"\u003cp\u003eThe geometries contained by the geometry collection.\u003c/p\u003e","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf18GeometryCollectionV10geometriesACSayAA0B0OG_tcfc":{"name":"init(geometries:)","abstract":"\u003cp\u003eInitializes a geometry collection defined by the given geometries.\u003c/p\u003e","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf18GeometryCollectionVyAcA12MultiPolygonVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a geometry collection coincident to the given multipolygon.\u003c/p\u003e","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf18GeometryCollectionV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf18GeometryCollectionV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"GeometryCollection"},"Structs/FeatureCollection.html#/s:4Turf17FeatureCollectionV8featuresSayAA0B0VGvp":{"name":"features","abstract":"\u003cp\u003eThe features that the collection contains.\u003c/p\u003e","parent_name":"FeatureCollection"},"Structs/FeatureCollection.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"FeatureCollection"},"Structs/FeatureCollection.html#/s:4Turf17FeatureCollectionV8featuresACSayAA0B0VG_tcfc":{"name":"init(features:)","abstract":"\u003cp\u003eInitializes a feature collection containing the given features.\u003c/p\u003e","parent_name":"FeatureCollection"},"Structs/FeatureCollection.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"FeatureCollection"},"Structs/FeatureCollection.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"FeatureCollection"},"Structs/FeatureCollection.html#/s:4Turf24GeoJSONObjectConvertibleP03geoC0AA0bC0Ovp":{"name":"geoJSONObject","parent_name":"FeatureCollection"},"Structs/Feature.html#/s:4Turf7FeatureV10identifierAA0B10IdentifierOSgvp":{"name":"identifier","abstract":"\u003cp\u003eA string or number that commonly identifies the feature in the context of a data set.\u003c/p\u003e","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf7FeatureV10propertiesSDySSAA9JSONValueOSgGSgvp":{"name":"properties","abstract":"\u003cp\u003eArbitrary, JSON-compatible attributes to associate with the feature.\u003c/p\u003e","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf7FeatureV8geometryAA8GeometryOSgvp":{"name":"geometry","abstract":"\u003cp\u003eThe geometry at which the feature is located.\u003c/p\u003e","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf7FeatureV8geometryAcA8GeometryO_tcfc":{"name":"init(geometry:)","abstract":"\u003cp\u003eInitializes a feature located at the given geometry.\u003c/p\u003e","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf7FeatureV8geometryAcA19GeometryConvertible_pSg_tcfc":{"name":"init(geometry:)","abstract":"\u003cp\u003eInitializes a feature defined by the given geometry-convertible instance.\u003c/p\u003e","parent_name":"Feature"},"Structs/Feature.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Feature"},"Structs/Feature.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf24GeoJSONObjectConvertibleP03geoC0AA0bC0Ovp":{"name":"geoJSONObject","parent_name":"Feature"},"Structs/LocationCoordinate2D.html#/latitude":{"name":"latitude","abstract":"\u003cp\u003eThe latitude in degrees.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Structs/LocationCoordinate2D.html#/longitude":{"name":"longitude","abstract":"\u003cp\u003eThe longitude in degrees.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Structs/LocationCoordinate2D.html#/init(latitude:longitude:)":{"name":"init(latitude:longitude:)","abstract":"\u003cp\u003eCreates a degree-based geographic coordinate.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Structs/BoundingBox.html#/s:4Turf11BoundingBoxV9southWestSo22CLLocationCoordinate2DVvp":{"name":"southWest","abstract":"\u003cp\u003eThe southwesternmost position contained in the bounding box.\u003c/p\u003e","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:4Turf11BoundingBoxV9northEastSo22CLLocationCoordinate2DVvp":{"name":"northEast","abstract":"\u003cp\u003eThe northeasternmost position contained in the bounding box.\u003c/p\u003e","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:4Turf11BoundingBoxV4fromACSgSaySo22CLLocationCoordinate2DVGSg_tcfc":{"name":"init(from:)","abstract":"\u003cp\u003eInitializes the smallest bounding box that contains all the given coordinates.\u003c/p\u003e","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:4Turf11BoundingBoxV9southWest9northEastACSo22CLLocationCoordinate2DV_AGtcfc":{"name":"init(southWest:northEast:)","abstract":"\u003cp\u003eInitializes a bounding box defined by its southwesternmost and northeasternmost positions.\u003c/p\u003e","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:4Turf11BoundingBoxV8contains_14ignoreBoundarySbSo22CLLocationCoordinate2DV_SbtF":{"name":"contains(_:ignoreBoundary:)","abstract":"\u003cp\u003eReturns a Boolean value indicating whether the bounding box contains the given position.\u003c/p\u003e","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:SH4hash4intoys6HasherVz_tF":{"name":"hash(into:)","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BoundingBox"},"Structs/BoundingBox.html":{"name":"BoundingBox","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-5\"\u003ebounding box\u003c/a\u003e indicates the extremes of a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/GeoJSONObject.html\"\u003eGeoJSONObject\u003c/a\u003e\u003c/code\u003e along the x- and y-axes (longitude and latitude, respectively).\u003c/p\u003e"},"Structs/LocationCoordinate2D.html":{"name":"LocationCoordinate2D","abstract":"\u003cp\u003eA geographic coordinate with its components measured in degrees.\u003c/p\u003e"},"Structs/Feature.html":{"name":"Feature","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.2\"\u003eFeature object\u003c/a\u003e represents a spatially bounded thing.\u003c/p\u003e"},"Structs/FeatureCollection.html":{"name":"FeatureCollection","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.3\"\u003eFeatureCollection object\u003c/a\u003e is a collection of Feature objects.\u003c/p\u003e"},"Structs/GeometryCollection.html":{"name":"GeometryCollection","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.8\"\u003eGeometryCollection geometry\u003c/a\u003e is a heterogeneous collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/Geometry.html\"\u003eGeometry\u003c/a\u003e\u003c/code\u003e objects that are related.\u003c/p\u003e"},"Structs/LineString.html":{"name":"LineString","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.4\"\u003eLineString geometry\u003c/a\u003e is a collection of two or more positions, each position connected to the next position linearly.\u003c/p\u003e"},"Structs/MultiLineString.html":{"name":"MultiLineString","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.5\"\u003eMultiLineString geometry\u003c/a\u003e is a collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/LineString.html\"\u003eLineString\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e"},"Structs/MultiPoint.html":{"name":"MultiPoint","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.3\"\u003eMultiPoint geometry\u003c/a\u003e represents a collection of disconnected but related positions.\u003c/p\u003e"},"Structs/MultiPolygon.html":{"name":"MultiPolygon","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.7\"\u003eMultiPolygon geometry\u003c/a\u003e is a collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Polygon.html\"\u003ePolygon\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e"},"Structs/Point.html":{"name":"Point","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.2\"\u003ePoint geometry\u003c/a\u003e represents a single position.\u003c/p\u003e"},"Structs/Polygon.html":{"name":"Polygon","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6\"\u003ePolygon geometry\u003c/a\u003e is conceptually a collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Ring.html\"\u003eRing\u003c/a\u003e\u003c/code\u003es that form a single connected geometry.\u003c/p\u003e"},"Structs/RadianCoordinate2D.html":{"name":"RadianCoordinate2D","abstract":"\u003cp\u003eA coordinate pair measured in radians, as opposed to \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbTypealiases.html#/s:4Turf20LocationCoordinate2Da\"\u003eLocationCoordinate2D\u003c/a\u003e\u003c/code\u003e, which is measured in degrees of arc.\u003c/p\u003e"},"Structs/Ring.html":{"name":"Ring","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6\"\u003elinear ring\u003c/a\u003e is a closed figure bounded by three or more straight line segments.\u003c/p\u003e"},"Protocols/WKTConvertible.html#/s:4Turf14WKTConvertibleP3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"WKTConvertible"},"Protocols/WKTConvertible.html#/s:4Turf14WKTConvertibleP3wktxSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"WKTConvertible"},"Protocols/GeometryConvertible.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","abstract":"\u003cp\u003eThe instance wrapped in a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/Geometry.html\"\u003eGeometry\u003c/a\u003e\u003c/code\u003e instance.\u003c/p\u003e","parent_name":"GeometryConvertible"},"Protocols/ForeignMemberContainer.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","abstract":"\u003cp\u003e\u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-6.1\"\u003eForeign members\u003c/a\u003e to round-trip to JSON.\u003c/p\u003e","parent_name":"ForeignMemberContainer"},"Protocols/GeoJSONObjectConvertible.html#/s:4Turf24GeoJSONObjectConvertibleP03geoC0AA0bC0Ovp":{"name":"geoJSONObject","abstract":"\u003cp\u003eThe instance wrapped in a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/GeoJSONObject.html\"\u003eGeoJSONObject\u003c/a\u003e\u003c/code\u003e instance.\u003c/p\u003e","parent_name":"GeoJSONObjectConvertible"},"Protocols/GeoJSONObjectConvertible.html":{"name":"GeoJSONObjectConvertible","abstract":"\u003cp\u003eA type that can be represented as a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/GeoJSONObject.html\"\u003eGeoJSONObject\u003c/a\u003e\u003c/code\u003e instance.\u003c/p\u003e"},"Protocols/ForeignMemberContainer.html":{"name":"ForeignMemberContainer","abstract":"\u003cp\u003eA GeoJSON object that can contain \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-6.1\"\u003eforeign members\u003c/a\u003e in arbitrary keys.\u003c/p\u003e"},"Protocols/GeometryConvertible.html":{"name":"GeometryConvertible","abstract":"\u003cp\u003eA type that can be represented as a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/Geometry.html\"\u003eGeometry\u003c/a\u003e\u003c/code\u003e instance.\u003c/p\u003e"},"Protocols/WKTConvertible.html":{"name":"WKTConvertible","abstract":"\u003cp\u003eEntity which can be converted to and from \u0026lsquo;Well Known Text\u0026rsquo;.\u003c/p\u003e"},"Functions.html#/s:4Turf12intersectionySo22CLLocationCoordinate2DVSgAD_ADt_AD_ADttF":{"name":"intersection(_:_:)","abstract":"\u003cp\u003eReturns the intersection of two line segments.\u003c/p\u003e"},"Functions.html#/s:4Turf3midySo22CLLocationCoordinate2DVAD_ADtF":{"name":"mid(_:_:)","abstract":"\u003cp\u003eReturns the point midway between two coordinates measured in degrees.\u003c/p\u003e"},"Extensions/JSONObject.html#/s:SD4TurfSSRszAA9JSONValueOSgRs_rlE0A8RawValuea":{"name":"TurfRawValue","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONObject"},"Extensions/JSONObject.html#/s:SD4TurfSSRszAA9JSONValueOSgRs_rlE12turfRawValueSDySSADGSgSDySSypSgG_tcfc":{"name":"init(turfRawValue:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONObject"},"Extensions/JSONObject.html#/s:SD4TurfSSRszAA9JSONValueOSgRs_rlE12turfRawValueSDySSypSgGvp":{"name":"turfRawValue","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONObject"},"Extensions/JSONArray.html#/s:Sa4TurfAA9JSONValueOSgRszlE0A8RawValuea":{"name":"TurfRawValue","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONArray"},"Extensions/JSONArray.html#/s:Sa4TurfAA9JSONValueOSgRszlE12turfRawValueSayADGSgSayypSgG_tcfc":{"name":"init(turfRawValue:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONArray"},"Extensions/JSONArray.html#/s:Sa4TurfAA9JSONValueOSgRszlE12turfRawValueSayypSgGvp":{"name":"turfRawValue","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONArray"},"Extensions/CodingUserInfoKey.html#/s:s17CodingUserInfoKeyV4TurfE22includesForeignMembersABvpZ":{"name":"includesForeignMembers","abstract":"\u003cp\u003eIndicates if coding of foreign members is enabled.\u003c/p\u003e","parent_name":"CodingUserInfoKey"},"Extensions/LocationCoordinate2D.html#/s:So22CLLocationCoordinate2DV4TurfEyAbC06RadianB1DVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInstantiates a LocationCoordinate2D from a RadianCoordinate2D\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Extensions/LocationCoordinate2D.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"LocationCoordinate2D"},"Extensions/LocationCoordinate2D.html#/s:So22CLLocationCoordinate2DV4TurfE9direction2toSdAB_tF":{"name":"direction(to:)","abstract":"\u003cp\u003eReturns the direction from the receiver to the given coordinate.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Extensions/LocationCoordinate2D.html#/s:So22CLLocationCoordinate2DV4TurfE10coordinate2at6facingABSd_SdtF":{"name":"coordinate(at:facing:)","abstract":"\u003cp\u003eReturns a coordinate a certain Haversine distance away in the given direction.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Extensions/LocationCoordinate2D.html#/s:So22CLLocationCoordinate2DV4TurfE10coordinate2at6facingABSd_10Foundation11MeasurementVySo11NSUnitAngleCGtF":{"name":"coordinate(at:facing:)","abstract":"\u003cp\u003eReturns a coordinate a certain Haversine distance away in the given direction.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Extensions/LocationCoordinate2D.html#/s:So22CLLocationCoordinate2DV4TurfE8distance2toSdAB_tF":{"name":"distance(to:)","abstract":"\u003cp\u003eReturns the Haversine distance between two coordinates measured in degrees.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Extensions/LocationDegrees.html#/s:Sd4TurfE9toRadiansSdyF":{"name":"toRadians()","abstract":"\u003cp\u003eReturns the direction in radians.\u003c/p\u003e","parent_name":"LocationDegrees"},"Extensions/LocationDegrees.html#/s:Sd4TurfE9toDegreesSdyF":{"name":"toDegrees()","abstract":"\u003cp\u003eReturns the direction in degrees.\u003c/p\u003e","parent_name":"LocationDegrees"},"Extensions/LocationDirection.html#/s:Sd4TurfE4wrap3min3maxS2d_SdtF":{"name":"wrap(min:max:)","abstract":"\u003cp\u003eReturns a normalized number given min and max bounds.\u003c/p\u003e","parent_name":"LocationDirection"},"Extensions/LocationDirection.html#/s:Sd4TurfE10difference4fromS2d_tF":{"name":"difference(from:)","abstract":"\u003cp\u003eReturns the smaller difference between the receiver and another direction.\u003c/p\u003e","parent_name":"LocationDirection"},"Extensions.html#/CharacterSet":{"name":"CharacterSet"},"Extensions/LocationDirection.html":{"name":"LocationDirection"},"Extensions/LocationDegrees.html":{"name":"LocationDegrees"},"Extensions/LocationCoordinate2D.html":{"name":"LocationCoordinate2D"},"Extensions/CodingUserInfoKey.html":{"name":"CodingUserInfoKey","abstract":"\u003cp\u003eKey to pass to populate a \u003ccode\u003euserInfo\u003c/code\u003e dictionary, which is passed to the \u003ccode\u003eJSONDecoder\u003c/code\u003e or \u003ccode\u003eJSONEncoder\u003c/code\u003e to enable processing foreign members.\u003c/p\u003e"},"Extensions/JSONArray.html":{"name":"JSONArray"},"Extensions/JSONObject.html":{"name":"JSONObject"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6stringyACSScACmF":{"name":"string(_:)","abstract":"\u003cp\u003eA string.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6numberyACSdcACmF":{"name":"number(_:)","abstract":"\u003cp\u003eA floating-point number.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO7booleanyACSbcACmF":{"name":"boolean(_:)","abstract":"\u003cp\u003eA Boolean value.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO5arrayyACSayACSgGcACmF":{"name":"array(_:)","abstract":"\u003cp\u003eA heterogeneous array of JSON values and \u003ccode\u003enull\u003c/code\u003e values.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6objectyACSDySSACSgGcACmF":{"name":"object(_:)","abstract":"\u003cp\u003eAn object containing JSON values and \u003ccode\u003enull\u003c/code\u003e values keyed by strings.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACSScfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given string.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACxcSzRzlufc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given integer.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACxcSBRzlufc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given floating-point number.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACSbcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given Boolean value.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACSayACSgGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given JSON array.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACSDySSACSgGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given JSON object.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6stringSSSgvp":{"name":"string","abstract":"\u003cp\u003eA string value, if the JSON value represents a string.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6numberSdSgvp":{"name":"number","abstract":"\u003cp\u003eA floating-point number value, if the JSON value represents a number.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO7booleanSbSgvp":{"name":"boolean","abstract":"\u003cp\u003eA Boolean value, if the JSON value represents a Boolean.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO5arraySayACSgGSgvp":{"name":"array","abstract":"\u003cp\u003eAn array of JSON values, if the JSON value represents an array.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6objectSDySSACSgGSgvp":{"name":"object","abstract":"\u003cp\u003eAn object containing JSON values keyed by strings, if the JSON value represents an object.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:SY8RawValueQa":{"name":"RawValue","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","abstract":"\u003cp\u003eThis branch must happen after the \u003ccode\u003eNSNumber\u003c/code\u003e branch","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s27ExpressibleByIntegerLiteralP07integerD0x0cD4TypeQz_tcfc":{"name":"init(integerLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s25ExpressibleByFloatLiteralP05floatD0x0cD4TypeQz_tcfc":{"name":"init(floatLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s25ExpressibleByArrayLiteralP0cD7ElementQa":{"name":"ArrayLiteralElement","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s25ExpressibleByArrayLiteralP05arrayD0x0cD7ElementQzd_tcfc":{"name":"init(arrayLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s30ExpressibleByDictionaryLiteralP3KeyQa":{"name":"Key","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s30ExpressibleByDictionaryLiteralP5ValueQa":{"name":"Value","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s30ExpressibleByDictionaryLiteralP010dictionaryD0x3KeyQz_5ValueQztd_tcfc":{"name":"init(dictionaryLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"JSONValue"},"Enums/Geometry.html#/s:4Turf8GeometryO5pointyAcA5PointVcACmF":{"name":"point(_:)","abstract":"\u003cp\u003eA single position.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO10lineStringyAcA04LineD0VcACmF":{"name":"lineString(_:)","abstract":"\u003cp\u003eA collection of two or more positions, each position connected to the next position linearly.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO7polygonyAcA7PolygonVcACmF":{"name":"polygon(_:)","abstract":"\u003cp\u003eConceptually, a collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Ring.html\"\u003eRing\u003c/a\u003e\u003c/code\u003es that form a single connected geometry.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO10multiPointyAcA05MultiD0VcACmF":{"name":"multiPoint(_:)","abstract":"\u003cp\u003eA collection of positions that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO15multiLineStringyAcA05MultidE0VcACmF":{"name":"multiLineString(_:)","abstract":"\u003cp\u003eA collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/LineString.html\"\u003eLineString\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO12multiPolygonyAcA05MultiD0VcACmF":{"name":"multiPolygon(_:)","abstract":"\u003cp\u003eA collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Polygon.html\"\u003ePolygon\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO18geometryCollectionyAcA0bD0VcACmF":{"name":"geometryCollection(_:)","abstract":"\u003cp\u003eA heterogeneous collection of geometries that are related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryOyAcA0B11Convertible_pcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a geometry representing the given geometry–convertible instance.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf24GeoJSONObjectConvertibleP03geoC0AA0bC0Ovp":{"name":"geoJSONObject","parent_name":"Geometry"},"Enums/Geometry.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Geometry"},"Enums/Geometry.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO5pointAA5PointVSgvp":{"name":"point","abstract":"\u003cp\u003eA single position.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO10lineStringAA04LineD0VSgvp":{"name":"lineString","abstract":"\u003cp\u003eA collection of two or more positions, each position connected to the next position linearly.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO7polygonAA7PolygonVSgvp":{"name":"polygon","abstract":"\u003cp\u003eConceptually, a collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Ring.html\"\u003eRing\u003c/a\u003e\u003c/code\u003es that form a single connected geometry.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO10multiPointAA05MultiD0VSgvp":{"name":"multiPoint","abstract":"\u003cp\u003eA collection of positions that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO15multiLineStringAA05MultidE0VSgvp":{"name":"multiLineString","abstract":"\u003cp\u003eA collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/LineString.html\"\u003eLineString\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO12multiPolygonAA05MultiD0VSgvp":{"name":"multiPolygon","abstract":"\u003cp\u003eA collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Polygon.html\"\u003ePolygon\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO18geometryCollectionAA0bD0VSgvp":{"name":"geometryCollection","abstract":"\u003cp\u003eA heterogeneous collection of geometries that are related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Geometry"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO8geometryyAcA8GeometryOcACmF":{"name":"geometry(_:)","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1\"\u003eGeometry object\u003c/a\u003e represents points, curves, and surfaces in coordinate space.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO7featureyAcA7FeatureVcACmF":{"name":"feature(_:)","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.2\"\u003eFeature object\u003c/a\u003e represents a spatially bounded thing.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO17featureCollectionyAcA07FeatureE0VcACmF":{"name":"featureCollection(_:)","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.3\"\u003eFeatureCollection object\u003c/a\u003e is a collection of Feature objects.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectOyAcA0bC11Convertible_pcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a GeoJSON object representing the given GeoJSON object–convertible instance.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO8geometryAA8GeometryOSgvp":{"name":"geometry","abstract":"\u003cp\u003eA geometry object.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO7featureAA7FeatureVSgvp":{"name":"feature","abstract":"\u003cp\u003eA feature object.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO17featureCollectionAA07FeatureE0VSgvp":{"name":"featureCollection","abstract":"\u003cp\u003eA feature collection object.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf24GeoJSONObjectConvertibleP03geoC0AA0bC0Ovp":{"name":"geoJSONObject","parent_name":"GeoJSONObject"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierO6stringyACSScACmF":{"name":"string(_:)","abstract":"\u003cp\u003eA string.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierO6numberyACSdcACmF":{"name":"number(_:)","abstract":"\u003cp\u003eA floating-point number.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierOyACSScfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a feature identifier representing the given string.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierOyACxcSzRzlufc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a feature identifier representing the given integer.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierOyACxcSBRzlufc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a feature identifier representing the given floating-point number.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:SY8RawValueQa":{"name":"RawValue","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierO6stringSSSgvp":{"name":"string","abstract":"\u003cp\u003eA string.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierO6numberSdSgvp":{"name":"number","abstract":"\u003cp\u003eA floating-point number.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:s27ExpressibleByIntegerLiteralP07integerD0x0cD4TypeQz_tcfc":{"name":"init(integerLiteral:)","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:s25ExpressibleByFloatLiteralP05floatD0x0cD4TypeQz_tcfc":{"name":"init(floatLiteral:)","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"FeatureIdentifier"},"Enums/Consumer/Error/Kind.html#/s:4Turf8ConsumerO5ErrorV4KindO8expectedyAGyx__GACyxGcAImSHRzs8SendableRzlF":{"name":"expected(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Kind"},"Enums/Consumer/Error/Kind.html#/s:4Turf8ConsumerO5ErrorV4KindO15unexpectedTokenyAGyx__GAImSHRzs8SendableRzlF":{"name":"unexpectedToken","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Kind"},"Enums/Consumer/Error/Kind.html#/s:4Turf8ConsumerO5ErrorV4KindO6customyAGyx__GsAD_pcAImSHRzs8SendableRzlF":{"name":"custom(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Kind"},"Enums/Consumer/Error/Kind.html":{"name":"Kind","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Error"},"Enums/Consumer/Error.html#/s:4Turf8ConsumerO5ErrorV4kindAE4KindOyx__Gvp":{"name":"kind","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Error"},"Enums/Consumer/Error.html#/s:4Turf8ConsumerO5ErrorV8locationAC8LocationVyx_GSgvp":{"name":"location","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Error"},"Enums/Consumer/Error.html#/s:4Turf8ConsumerO5ErrorV9remainingSs17UnicodeScalarViewVSgvp":{"name":"remaining","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Error"},"Enums/Consumer/Error.html#/s:4Turf8ConsumerO5ErrorV11descriptionSSvp":{"name":"description","abstract":"\u003cp\u003eHuman-readable error description\u003c/p\u003e","parent_name":"Error"},"Enums/Consumer/Charset.html#/s:4Turf8ConsumerO7CharsetV6rangesSaySNys6UInt32VGGvp":{"name":"ranges","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Charset"},"Enums/Consumer/Match.html#/s:4Turf8ConsumerO5MatchO5tokenyAEyx_GSS_AC8LocationVyx_GtcAGmSHRzs8SendableRzlF":{"name":"token(_:_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Match"},"Enums/Consumer/Match.html#/s:4Turf8ConsumerO5MatchO4nodeyAEyx_GxSg_SayAGGtcAGmSHRzs8SendableRzlF":{"name":"node(_:_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Match"},"Enums/Consumer/Match.html#/s:4Turf8ConsumerO5MatchO8locationAC8LocationVyx_GSgvp":{"name":"location","abstract":"\u003cp\u003eThe location of the match in the original source (if known)\u003c/p\u003e","parent_name":"Match"},"Enums/Consumer/Match.html#/s:4Turf8ConsumerO5MatchO9transformys8Sendable_pSgAHx_SaysAG_pGtKXEKF":{"name":"transform(_:)","abstract":"\u003cp\u003eTransform generic AST to application-specific form\u003c/p\u003e","parent_name":"Match"},"Enums/Consumer/Match.html#/s:4Turf8ConsumerO5MatchO11descriptionSSvp":{"name":"description","abstract":"\u003cp\u003eLisp-like description of the AST\u003c/p\u003e","parent_name":"Match"},"Enums/Consumer/Location.html#/s:4Turf8ConsumerO8LocationV5rangeSnySS5IndexVGvp":{"name":"range","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Location"},"Enums/Consumer/Location.html#/s:4Turf8ConsumerO8LocationV6offsetSi4line_Si6columntvp":{"name":"offset","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Location"},"Enums/Consumer/Location.html#/s:4Turf8ConsumerO8LocationV11descriptionSSvp":{"name":"description","abstract":"\u003cp\u003eHuman-readable description of the location\u003c/p\u003e","parent_name":"Location"},"Enums/Consumer/Location.html#/s:4Turf8ConsumerO8LocationV2eeoiySbAEyx_G_AGtFZ":{"name":"==(_:_:)","abstract":"\u003cp\u003eEquatable implementation\u003c/p\u003e","parent_name":"Location"},"Enums/Consumer/Location.html#/s:4Turf8ConsumerO8LocationV2atyAEyx_GSnySiGFZ":{"name":"at(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Location"},"Enums/Consumer.html#/s:4Turf8ConsumerO6stringyACyxGSScAEmSHRzs8SendableRzlF":{"name":"string(_:)","abstract":"\u003cp\u003ePrimitives\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO7charsetyACyxGAC7CharsetVyx_GcAEmSHRzs8SendableRzlF":{"name":"charset(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO3anyyACyxGSayAEGcAEmSHRzs8SendableRzlF":{"name":"any(_:)","abstract":"\u003cp\u003eCombinators\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO8sequenceyACyxGSayAEGcAEmSHRzs8SendableRzlF":{"name":"sequence(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO8optionalyACyxGAEcAEmSHRzs8SendableRzlF":{"name":"optional(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9oneOrMoreyACyxGAEcAEmSHRzs8SendableRzlF":{"name":"oneOrMore(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO3notyACyxGAEcAEmSHRzs8SendableRzlF":{"name":"not(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO7flattenyACyxGAEcAEmSHRzs8SendableRzlF":{"name":"flatten(_:)","abstract":"\u003cp\u003eTransforms\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO7discardyACyxGAEcAEmSHRzs8SendableRzlF":{"name":"discard(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO7replaceyACyxGAE_SStcAEmSHRzs8SendableRzlF":{"name":"replace(_:_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO5labelyACyxGx_AEtcAEmSHRzs8SendableRzlF":{"name":"label(_:_:)","abstract":"\u003cp\u003eReferences\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9referenceyACyxGxcAEmSHRzs8SendableRzlF":{"name":"reference(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO5matchyAC5MatchOyx_GSSKF":{"name":"match(_:)","abstract":"\u003cp\u003eParse input and return matched result\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO10isOptionalSbvp":{"name":"isOptional","abstract":"\u003cp\u003eWill the consumer match empty input?\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer/Location.html":{"name":"Location","abstract":"\u003cp\u003eSource location\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer/Match.html":{"name":"Match","abstract":"\u003cp\u003eAbstract syntax tree returned by consumer\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer/Charset.html":{"name":"Charset","abstract":"\u003cp\u003eOpaque type used for efficient character matching\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9Transforma":{"name":"Transform","abstract":"\u003cp\u003eClosure for transforming a Match to an application-specific data type\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer/Error.html":{"name":"Error","abstract":"\u003cp\u003eA Parsing error\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO13stringLiteralACyxGSS_tcfc":{"name":"init(stringLiteral:)","abstract":"\u003cp\u003eCreate .string() consumer from a string literal\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO12arrayLiteralACyxGAEd_tcfc":{"name":"init(arrayLiteral:)","abstract":"\u003cp\u003eCreate .sequence() consumer from an array literal\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO1ooiyACyxGAE_AEtFZ":{"name":"|(_:_:)","abstract":"\u003cp\u003eConverts two consumers into an .any() consumer\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9characteryACyxGs7UnicodeO6ScalarVFZ":{"name":"character(_:)","abstract":"\u003cp\u003eMatch a character\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9character2inACyxGSNys7UnicodeO6ScalarVG_tFZ":{"name":"character(in:)","abstract":"\u003cp\u003eMatch character in range\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9character2inACyxGSS_tFZ":{"name":"character(in:)","abstract":"\u003cp\u003eMatch character in string\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9character2inACyxG10Foundation12CharacterSetV_tFZ":{"name":"character(in:)","abstract":"\u003cp\u003eMatch character in set\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO12anyCharacter6exceptACyxGs7UnicodeO6ScalarVd_tFZ":{"name":"anyCharacter(except:)","abstract":"\u003cp\u003eMatch any character except the one(s) specified\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO12anyCharacter6exceptACyxG10Foundation0D3SetV_tFZ":{"name":"anyCharacter(except:)","abstract":"\u003cp\u003eMatch any character except the specified set\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO10zeroOrMoreyACyxGAEFZ":{"name":"zeroOrMore(_:)","abstract":"\u003cp\u003eMatches a list of zero or more \u003ccode\u003econsumer\u003c/code\u003e instances\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO11interleavedyACyxGAE_AEtFZ":{"name":"interleaved(_:_:)","abstract":"\u003cp\u003eMatches one or more \u003ccode\u003econsumer\u003c/code\u003e instances, separated by an instance of \u003ccode\u003eseparator\u003c/code\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO6ignore_2inACyxGAF_AFtFZ":{"name":"ignore(_:in:)","abstract":"\u003cp\u003eMatches the \u003ccode\u003etarget\u003c/code\u003e consumer, ignoring any instances of the \u003ccode\u003eignored\u003c/code\u003e consumer","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO11descriptionSSvp":{"name":"description","abstract":"\u003cp\u003eHuman-readable description of what consumer matches\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html":{"name":"Consumer","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e"},"Enums/FeatureIdentifier.html":{"name":"FeatureIdentifier","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.2\"\u003efeature identifier\u003c/a\u003e identifies a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Feature.html\"\u003eFeature\u003c/a\u003e\u003c/code\u003e object.\u003c/p\u003e"},"Enums/GeoJSONObject.html":{"name":"GeoJSONObject","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3\"\u003eGeoJSON object\u003c/a\u003e represents a Geometry, Feature, or collection of Features.\u003c/p\u003e"},"Enums/Geometry.html":{"name":"Geometry","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1\"\u003eGeometry object\u003c/a\u003e represents points, curves, and surfaces in coordinate space. Use an instance of this enumeration whenever a value could be any kind of Geometry object.\u003c/p\u003e"},"Enums/JSONValue.html":{"name":"JSONValue","abstract":"\u003cp\u003eA JSON value represents an object, array, or fragment.\u003c/p\u003e"},"Enums.html":{"name":"Enumerations","abstract":"\u003cp\u003eThe following enumerations are available globally.\u003c/p\u003e"},"Extensions.html":{"name":"Extensions","abstract":"\u003cp\u003eThe following extensions are available globally.\u003c/p\u003e"},"Functions.html":{"name":"Functions","abstract":"\u003cp\u003eThe following functions are available globally.\u003c/p\u003e"},"Protocols.html":{"name":"Protocols","abstract":"\u003cp\u003eThe following protocols are available globally.\u003c/p\u003e"},"Structs.html":{"name":"Structures","abstract":"\u003cp\u003eThe following structures are available globally.\u003c/p\u003e"},"Typealiases.html":{"name":"Type Aliases","abstract":"\u003cp\u003eThe following type aliases are available globally.\u003c/p\u003e"}} \ No newline at end of file diff --git a/3.1.0/docsets/Turf.docset/Contents/Resources/docSet.dsidx b/3.1.0/docsets/Turf.docset/Contents/Resources/docSet.dsidx new file mode 100644 index 00000000..3f96b098 Binary files /dev/null and b/3.1.0/docsets/Turf.docset/Contents/Resources/docSet.dsidx differ diff --git a/3.1.0/docsets/Turf.tgz b/3.1.0/docsets/Turf.tgz new file mode 100644 index 00000000..2237ca00 Binary files /dev/null and b/3.1.0/docsets/Turf.tgz differ diff --git a/3.1.0/docsets/Turf.xml b/3.1.0/docsets/Turf.xml new file mode 100644 index 00000000..ddfb11bb --- /dev/null +++ b/3.1.0/docsets/Turf.xml @@ -0,0 +1 @@ +3.1.0https://mapbox.github.io/turf-swift/3.1.0/docsets/Turf.tgz diff --git a/3.1.0/img/carat.png b/3.1.0/img/carat.png new file mode 100755 index 00000000..29d2f7fd Binary files /dev/null and b/3.1.0/img/carat.png differ diff --git a/3.1.0/img/dash.png b/3.1.0/img/dash.png new file mode 100755 index 00000000..6f694c7a Binary files /dev/null and b/3.1.0/img/dash.png differ diff --git a/3.1.0/img/gh.png b/3.1.0/img/gh.png new file mode 100755 index 00000000..628da97c Binary files /dev/null and b/3.1.0/img/gh.png differ diff --git a/3.1.0/img/spinner.gif b/3.1.0/img/spinner.gif new file mode 100644 index 00000000..e3038d0a Binary files /dev/null and b/3.1.0/img/spinner.gif differ diff --git a/3.1.0/index.html b/3.1.0/index.html new file mode 100644 index 00000000..34a9f7a2 --- /dev/null +++ b/3.1.0/index.html @@ -0,0 +1,463 @@ + + + + Turf Reference + + + + + + + + + + + + +
+
+

Turf for Swift (86% documented)

+

GitHubView on GitHub

+

DashInstall in Dash

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+ +

Turf for Swift

+ +

📱iOS     +🖥💻macOS     +📺tvOS     +⌚️watchOS     +Linux     +Documentation     +Carthage compatible     +CocoaPods     +SPM compatible    

+ +

A spatial analysis library written in Swift for native iOS, macOS, tvOS, watchOS, visionOS, and Linux applications, ported from Turf.js.

+

Requirements

+ +

Turf requires Xcode 14.1 or above and supports the following minimum deployment targets:

+ +
    +
  • iOS 11.0 and above
  • +
  • macOS 10.13 (High Sierra) and above
  • +
  • tvOS 11.0 and above
  • +
  • watchOS 4.0 and above
  • +
  • visionOS 1.0 and above (not supported via CocoaPods)
  • +
+ +

Alternatively, you can incorporate Turf into a command line tool without Xcode on any platform that Swift supports, including Linux.

+ +

If your project is written in Objective-C, you’ll need to write a compatibility layer between turf-swift and your Objective-C code. If your project is written in Objective-C++, you may be able to use spatial-algorithms as an alternative to Turf.

+

Installation

+ +

Releases are available for installation using any of the popular Swift dependency managers.

+

CocoaPods

+ +

To install Turf using CocoaPods:

+ +
    +
  1. Specify the following dependency in your Podfile: +rb +pod 'Turf', '~> 3.0' +
  2. +
  3. Run pod repo update if you haven’t lately.
  4. +
  5. Run pod install and open the resulting Xcode workspace.
  6. +
  7. Add import Turf to any Swift file in your application target.
  8. +
+

Carthage

+ +

To install Turf using Carthage:

+ +
    +
  1. Add the following dependency to your Cartfile: + +github "mapbox/turf-swift" ~> 3.0 +
  2. +
  3. Run carthage bootstrap.
  4. +
  5. Follow the rest of Carthage’s integration instructions. Your application target’s Embedded Frameworks should include Turf.framework.
  6. +
  7. Add import Turf to any Swift file in your application target.
  8. +
+

Swift Package Manager

+ +

To install Turf using the Swift Package Manager, add the following package to the dependencies in your Package.swift file:

+
.package(url: "https://github.com/mapbox/turf-swift.git", from: "3.0.0")
+
+ +

Then import Turf in any Swift file in your module.

+

Available functionality

+ +

This work-in-progress port of Turf.js contains the following functionality:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Turf.jsTurf for Swift
turf-along#alongLineString.coordinateFromStart(distance:)
turf-area#areaPolygon.area
turf-bearing#bearingCLLocationCoordinate2D.direction(to:)
LocationCoordinate2D.direction(to:) on Linux
RadianCoordinate2D.direction(to:)
turf-bezier-spline#bezierSplineLineString.bezier(resolution:sharpness:)
turf-boolean-point-in-polygon#booleanPointInPolygonPolygon.contains(_:ignoreBoundary:)
turf-center#centerPolygon.center
turf-center-of-mass#centerOfMassPolygon.centerOfMass
turf-centroid#centroidPolygon.centroid
turf-circle#circlePolygon(center:radius:vertices:)
turf-destination#destinationCLLocationCoordinate2D.coordinate(at:facing:)
LocationCoordinate2D.coordinate(at:facing:) on Linux
RadianCoordinate2D.coordinate(at:facing:)
turf-distance#distanceCLLocationCoordinate2D.distance(to:)
LocationCoordinate2D.distance(to:) on Linux
RadianCoordinate2D.distance(to:)
turf-helpers#polygonPolygon(_:)
turf-helpers#lineStringLineString(_:)
turf-helpers#degreesToRadiansCLLocationDegrees.toRadians()
LocationDegrees.toRadians() on Linux
turf-helpers#radiansToDegreesCLLocationDegrees.toDegrees()
LocationDegrees.toDegrees() on Linux
turf-helpers#convertLength
turf-helpers#convertArea
Measurement.converted(to:)
turf-length#lengthLineString.distance(from:to:)
turf-line-intersect#lineIntersectLineString.intersections(with:)
turf-line-slice#lineSliceLineString.sliced(from:to:)
turf-line-slice-along#lineSliceAlongLineString.trimmed(from:to:)
turf-midpoint#midpointmid(_:_:)
turf-nearest-point-on-line#nearestPointOnLineLineString.closestCoordinate(to:)
turf-polygon-to-line#polygonToLineLineString(_:)
MultiLineString(_:)
turf-simplify#simplifyLineString.simplify(tolerance:highestQuality:)
LineString.simplified(tolerance:highestQuality:)
turf-polygon-smooth#polygonSmoothPolygon.smooth(iterations:)
CLLocationDirection.difference(from:)
LocationDirection.difference(from:) on Linux
CLLocationDirection.wrap(min:max:)
LocationDirection.wrap(min:max:) on Linux
+

GeoJSON

+ +

turf-swift also contains a GeoJSON encoder/decoder with support for Codable.

+
// Decode an unknown GeoJSON object.
+let geojson = try JSONDecoder().decode(GeoJSONObject.self, from: data)
+guard case let .feature(feature) = geojson,
+      case let .point(point) = feature.geometry else {
+    return
+}
+
+// Decode a known GeoJSON object.
+let featureCollection = try JSONDecoder().decode(FeatureCollection.self, from: data)
+
+// Initialize a Point feature and encode it as GeoJSON.
+let coordinate = CLLocationCoordinate2D(latitude: 0, longitude: 1)
+let point = Point(coordinate)
+let pointFeature = Feature(geometry: .point(point))
+let data = try JSONEncoder().encode(pointFeature)
+let json = String(data: data, encoding: .utf8)
+print(json)
+
+/*
+{
+  "type": "Feature",
+  "geometry": {
+    "type": "Point",
+    "coordinates": [
+      1,
+      0
+    ]
+  }
+}
+*/
+
+
+

Well Known Text (WKT)

+ +

turf-swift contains a minimal WKT encoding/decoding support for geometries implementing WKTCodable protocol.

+
let wktString = "POINT(123.53 -12.12)"
+
+// Decoding is done using an init method
+let point = try? Point(wkt: wktString)
+let geometry = try? Geometry(wkt: wktString)
+
+print(point?.coordinates)
+
+// ...
+
+// Geometries then can be serialized using a property getter
+let serializedWKTString = point?.wkt
+print(serializedWKTString)
+
+
+ +
+
+ +
+
+ + diff --git a/3.1.0/js/jazzy.js b/3.1.0/js/jazzy.js new file mode 100755 index 00000000..1ac86992 --- /dev/null +++ b/3.1.0/js/jazzy.js @@ -0,0 +1,74 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + +window.jazzy = {'docset': false} +if (typeof window.dash != 'undefined') { + document.documentElement.className += ' dash' + window.jazzy.docset = true +} +if (navigator.userAgent.match(/xcode/i)) { + document.documentElement.className += ' xcode' + window.jazzy.docset = true +} + +function toggleItem($link, $content) { + var animationDuration = 300; + $link.toggleClass('token-open'); + $content.slideToggle(animationDuration); +} + +function itemLinkToContent($link) { + return $link.parent().parent().next(); +} + +// On doc load + hash-change, open any targeted item +function openCurrentItemIfClosed() { + if (window.jazzy.docset) { + return; + } + var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); + $content = itemLinkToContent($link); + if ($content.is(':hidden')) { + toggleItem($link, $content); + } +} + +$(openCurrentItemIfClosed); +$(window).on('hashchange', openCurrentItemIfClosed); + +// On item link ('token') click, toggle its discussion +$('.token').on('click', function(event) { + if (window.jazzy.docset) { + return; + } + var $link = $(this); + toggleItem($link, itemLinkToContent($link)); + + // Keeps the document from jumping to the hash. + var href = $link.attr('href'); + if (history.pushState) { + history.pushState({}, '', href); + } else { + location.hash = href; + } + event.preventDefault(); +}); + +// Clicks on links to the current, closed, item need to open the item +$("a:not('.token')").on('click', function() { + if (location == this.href) { + openCurrentItemIfClosed(); + } +}); + +// KaTeX rendering +if ("katex" in window) { + $($('.math').each( (_, element) => { + katex.render(element.textContent, element, { + displayMode: $(element).hasClass('m-block'), + throwOnError: false, + trust: true + }); + })) +} diff --git a/3.1.0/js/jazzy.search.js b/3.1.0/js/jazzy.search.js new file mode 100644 index 00000000..359cdbb8 --- /dev/null +++ b/3.1.0/js/jazzy.search.js @@ -0,0 +1,74 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + +$(function(){ + var $typeahead = $('[data-typeahead]'); + var $form = $typeahead.parents('form'); + var searchURL = $form.attr('action'); + + function displayTemplate(result) { + return result.name; + } + + function suggestionTemplate(result) { + var t = '
'; + t += '' + result.name + ''; + if (result.parent_name) { + t += '' + result.parent_name + ''; + } + t += '
'; + return t; + } + + $typeahead.one('focus', function() { + $form.addClass('loading'); + + $.getJSON(searchURL).then(function(searchData) { + const searchIndex = lunr(function() { + this.ref('url'); + this.field('name'); + this.field('abstract'); + for (const [url, doc] of Object.entries(searchData)) { + this.add({url: url, name: doc.name, abstract: doc.abstract}); + } + }); + + $typeahead.typeahead( + { + highlight: true, + minLength: 3, + autoselect: true + }, + { + limit: 10, + display: displayTemplate, + templates: { suggestion: suggestionTemplate }, + source: function(query, sync) { + const lcSearch = query.toLowerCase(); + const results = searchIndex.query(function(q) { + q.term(lcSearch, { boost: 100 }); + q.term(lcSearch, { + boost: 10, + wildcard: lunr.Query.wildcard.TRAILING + }); + }).map(function(result) { + var doc = searchData[result.ref]; + doc.url = result.ref; + return doc; + }); + sync(results); + } + } + ); + $form.removeClass('loading'); + $typeahead.trigger('focus'); + }); + }); + + var baseURL = searchURL.slice(0, -"search.json".length); + + $typeahead.on('typeahead:select', function(e, result) { + window.location = baseURL + result.url; + }); +}); diff --git a/3.1.0/js/jquery.min.js b/3.1.0/js/jquery.min.js new file mode 100644 index 00000000..7f37b5d9 --- /dev/null +++ b/3.1.0/js/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/3.1.0/js/typeahead.jquery.js b/3.1.0/js/typeahead.jquery.js new file mode 100644 index 00000000..bcb734be --- /dev/null +++ b/3.1.0/js/typeahead.jquery.js @@ -0,0 +1,1695 @@ +/*! + * typeahead.js 1.3.3 + * https://github.com/corejavascript/typeahead.js + * Copyright 2013-2024 Twitter, Inc. and other contributors; Licensed MIT + */ + + +(function(root, factory) { + if (typeof define === "function" && define.amd) { + define([ "jquery" ], function(a0) { + return factory(a0); + }); + } else if (typeof module === "object" && module.exports) { + module.exports = factory(require("jquery")); + } else { + factory(root["jQuery"]); + } +})(this, function($) { + var _ = function() { + "use strict"; + return { + isMsie: function() { + return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; + }, + isBlankString: function(str) { + return !str || /^\s*$/.test(str); + }, + escapeRegExChars: function(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + }, + isString: function(obj) { + return typeof obj === "string"; + }, + isNumber: function(obj) { + return typeof obj === "number"; + }, + isArray: $.isArray, + isFunction: $.isFunction, + isObject: $.isPlainObject, + isUndefined: function(obj) { + return typeof obj === "undefined"; + }, + isElement: function(obj) { + return !!(obj && obj.nodeType === 1); + }, + isJQuery: function(obj) { + return obj instanceof $; + }, + toStr: function toStr(s) { + return _.isUndefined(s) || s === null ? "" : s + ""; + }, + bind: $.proxy, + each: function(collection, cb) { + $.each(collection, reverseArgs); + function reverseArgs(index, value) { + return cb(value, index); + } + }, + map: $.map, + filter: $.grep, + every: function(obj, test) { + var result = true; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (!(result = test.call(null, val, key, obj))) { + return false; + } + }); + return !!result; + }, + some: function(obj, test) { + var result = false; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (result = test.call(null, val, key, obj)) { + return false; + } + }); + return !!result; + }, + mixin: $.extend, + identity: function(x) { + return x; + }, + clone: function(obj) { + return $.extend(true, {}, obj); + }, + getIdGenerator: function() { + var counter = 0; + return function() { + return counter++; + }; + }, + templatify: function templatify(obj) { + return $.isFunction(obj) ? obj : template; + function template() { + return String(obj); + } + }, + defer: function(fn) { + setTimeout(fn, 0); + }, + debounce: function(func, wait, immediate) { + var timeout, result; + return function() { + var context = this, args = arguments, later, callNow; + later = function() { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + } + }; + callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + } + return result; + }; + }, + throttle: function(func, wait) { + var context, args, timeout, result, previous, later; + previous = 0; + later = function() { + previous = new Date(); + timeout = null; + result = func.apply(context, args); + }; + return function() { + var now = new Date(), remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0) { + clearTimeout(timeout); + timeout = null; + previous = now; + result = func.apply(context, args); + } else if (!timeout) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }, + stringify: function(val) { + return _.isString(val) ? val : JSON.stringify(val); + }, + guid: function() { + function _p8(s) { + var p = (Math.random().toString(16) + "000000000").substr(2, 8); + return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p; + } + return "tt-" + _p8() + _p8(true) + _p8(true) + _p8(); + }, + noop: function() {} + }; + }(); + var WWW = function() { + "use strict"; + var defaultClassNames = { + wrapper: "twitter-typeahead", + input: "tt-input", + hint: "tt-hint", + menu: "tt-menu", + dataset: "tt-dataset", + suggestion: "tt-suggestion", + selectable: "tt-selectable", + empty: "tt-empty", + open: "tt-open", + cursor: "tt-cursor", + highlight: "tt-highlight" + }; + return build; + function build(o) { + var www, classes; + classes = _.mixin({}, defaultClassNames, o); + www = { + css: buildCss(), + classes: classes, + html: buildHtml(classes), + selectors: buildSelectors(classes) + }; + return { + css: www.css, + html: www.html, + classes: www.classes, + selectors: www.selectors, + mixin: function(o) { + _.mixin(o, www); + } + }; + } + function buildHtml(c) { + return { + wrapper: '', + menu: '
' + }; + } + function buildSelectors(classes) { + var selectors = {}; + _.each(classes, function(v, k) { + selectors[k] = "." + v; + }); + return selectors; + } + function buildCss() { + var css = { + wrapper: { + position: "relative", + display: "inline-block" + }, + hint: { + position: "absolute", + top: "0", + left: "0", + borderColor: "transparent", + boxShadow: "none", + opacity: "1" + }, + input: { + position: "relative", + verticalAlign: "top", + backgroundColor: "transparent" + }, + inputWithNoHint: { + position: "relative", + verticalAlign: "top" + }, + menu: { + position: "absolute", + top: "100%", + left: "0", + zIndex: "100", + display: "none" + }, + ltr: { + left: "0", + right: "auto" + }, + rtl: { + left: "auto", + right: " 0" + } + }; + if (_.isMsie()) { + _.mixin(css.input, { + backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" + }); + } + return css; + } + }(); + var EventBus = function() { + "use strict"; + var namespace, deprecationMap; + namespace = "typeahead:"; + deprecationMap = { + render: "rendered", + cursorchange: "cursorchanged", + select: "selected", + autocomplete: "autocompleted" + }; + function EventBus(o) { + if (!o || !o.el) { + $.error("EventBus initialized without el"); + } + this.$el = $(o.el); + } + _.mixin(EventBus.prototype, { + _trigger: function(type, args) { + var $e = $.Event(namespace + type); + this.$el.trigger.call(this.$el, $e, args || []); + return $e; + }, + before: function(type) { + var args, $e; + args = [].slice.call(arguments, 1); + $e = this._trigger("before" + type, args); + return $e.isDefaultPrevented(); + }, + trigger: function(type) { + var deprecatedType; + this._trigger(type, [].slice.call(arguments, 1)); + if (deprecatedType = deprecationMap[type]) { + this._trigger(deprecatedType, [].slice.call(arguments, 1)); + } + } + }); + return EventBus; + }(); + var EventEmitter = function() { + "use strict"; + var splitter = /\s+/, nextTick = getNextTick(); + return { + onSync: onSync, + onAsync: onAsync, + off: off, + trigger: trigger + }; + function on(method, types, cb, context) { + var type; + if (!cb) { + return this; + } + types = types.split(splitter); + cb = context ? bindContext(cb, context) : cb; + this._callbacks = this._callbacks || {}; + while (type = types.shift()) { + this._callbacks[type] = this._callbacks[type] || { + sync: [], + async: [] + }; + this._callbacks[type][method].push(cb); + } + return this; + } + function onAsync(types, cb, context) { + return on.call(this, "async", types, cb, context); + } + function onSync(types, cb, context) { + return on.call(this, "sync", types, cb, context); + } + function off(types) { + var type; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + while (type = types.shift()) { + delete this._callbacks[type]; + } + return this; + } + function trigger(types) { + var type, callbacks, args, syncFlush, asyncFlush; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + args = [].slice.call(arguments, 1); + while ((type = types.shift()) && (callbacks = this._callbacks[type])) { + syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args)); + asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args)); + syncFlush() && nextTick(asyncFlush); + } + return this; + } + function getFlush(callbacks, context, args) { + return flush; + function flush() { + var cancelled; + for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) { + cancelled = callbacks[i].apply(context, args) === false; + } + return !cancelled; + } + } + function getNextTick() { + var nextTickFn; + if (window.setImmediate) { + nextTickFn = function nextTickSetImmediate(fn) { + setImmediate(function() { + fn(); + }); + }; + } else { + nextTickFn = function nextTickSetTimeout(fn) { + setTimeout(function() { + fn(); + }, 0); + }; + } + return nextTickFn; + } + function bindContext(fn, context) { + return fn.bind ? fn.bind(context) : function() { + fn.apply(context, [].slice.call(arguments, 0)); + }; + } + }(); + var highlight = function(doc) { + "use strict"; + var defaults = { + node: null, + pattern: null, + tagName: "strong", + className: null, + wordsOnly: false, + caseSensitive: false, + diacriticInsensitive: false + }; + var accented = { + A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]", + B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]", + C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]", + D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]", + E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]", + F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]", + G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]", + H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]", + I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]", + J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]", + K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]", + L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]", + M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]", + N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]", + O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]", + P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]", + Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]", + R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]", + S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]", + T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]", + U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]", + V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]", + W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]", + X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]", + Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]", + Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]" + }; + return function hightlight(o) { + var regex; + o = _.mixin({}, defaults, o); + if (!o.node || !o.pattern) { + return; + } + o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ]; + regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive); + traverse(o.node, hightlightTextNode); + function hightlightTextNode(textNode) { + var match, patternNode, wrapperNode; + if (match = regex.exec(textNode.data)) { + wrapperNode = doc.createElement(o.tagName); + o.className && (wrapperNode.className = o.className); + patternNode = textNode.splitText(match.index); + patternNode.splitText(match[0].length); + wrapperNode.appendChild(patternNode.cloneNode(true)); + textNode.parentNode.replaceChild(wrapperNode, patternNode); + } + return !!match; + } + function traverse(el, hightlightTextNode) { + var childNode, TEXT_NODE_TYPE = 3; + for (var i = 0; i < el.childNodes.length; i++) { + childNode = el.childNodes[i]; + if (childNode.nodeType === TEXT_NODE_TYPE) { + i += hightlightTextNode(childNode) ? 1 : 0; + } else { + traverse(childNode, hightlightTextNode); + } + } + } + }; + function accent_replacer(chr) { + return accented[chr.toUpperCase()] || chr; + } + function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) { + var escapedPatterns = [], regexStr; + for (var i = 0, len = patterns.length; i < len; i++) { + var escapedWord = _.escapeRegExChars(patterns[i]); + if (diacriticInsensitive) { + escapedWord = escapedWord.replace(/\S/g, accent_replacer); + } + escapedPatterns.push(escapedWord); + } + regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")"; + return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i"); + } + }(window.document); + var Input = function() { + "use strict"; + var specialKeyCodeMap; + specialKeyCodeMap = { + 9: "tab", + 27: "esc", + 37: "left", + 39: "right", + 13: "enter", + 38: "up", + 40: "down" + }; + function Input(o, www) { + var id; + o = o || {}; + if (!o.input) { + $.error("input is missing"); + } + www.mixin(this); + this.$hint = $(o.hint); + this.$input = $(o.input); + this.$menu = $(o.menu); + id = this.$input.attr("id") || _.guid(); + this.$menu.attr("id", id + "_listbox"); + this.$hint.attr({ + "aria-hidden": true + }); + this.$input.attr({ + "aria-owns": id + "_listbox", + "aria-controls": id + "_listbox", + role: "combobox", + "aria-autocomplete": "list", + "aria-expanded": false + }); + this.query = this.$input.val(); + this.queryWhenFocused = this.hasFocus() ? this.query : null; + this.$overflowHelper = buildOverflowHelper(this.$input); + this._checkLanguageDirection(); + if (this.$hint.length === 0) { + this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop; + } + this.onSync("cursorchange", this._updateDescendent); + } + Input.normalizeQuery = function(str) { + return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " "); + }; + _.mixin(Input.prototype, EventEmitter, { + _onBlur: function onBlur() { + this.resetInputValue(); + this.trigger("blurred"); + }, + _onFocus: function onFocus() { + this.queryWhenFocused = this.query; + this.trigger("focused"); + }, + _onKeydown: function onKeydown($e) { + var keyName = specialKeyCodeMap[$e.which || $e.keyCode]; + this._managePreventDefault(keyName, $e); + if (keyName && this._shouldTrigger(keyName, $e)) { + this.trigger(keyName + "Keyed", $e); + } + }, + _onInput: function onInput() { + this._setQuery(this.getInputValue()); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + _managePreventDefault: function managePreventDefault(keyName, $e) { + var preventDefault; + switch (keyName) { + case "up": + case "down": + preventDefault = !withModifier($e); + break; + + default: + preventDefault = false; + } + preventDefault && $e.preventDefault(); + }, + _shouldTrigger: function shouldTrigger(keyName, $e) { + var trigger; + switch (keyName) { + case "tab": + trigger = !withModifier($e); + break; + + default: + trigger = true; + } + return trigger; + }, + _checkLanguageDirection: function checkLanguageDirection() { + var dir = (this.$input.css("direction") || "ltr").toLowerCase(); + if (this.dir !== dir) { + this.dir = dir; + this.$hint.attr("dir", dir); + this.trigger("langDirChanged", dir); + } + }, + _setQuery: function setQuery(val, silent) { + var areEquivalent, hasDifferentWhitespace; + areEquivalent = areQueriesEquivalent(val, this.query); + hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false; + this.query = val; + if (!silent && !areEquivalent) { + this.trigger("queryChanged", this.query); + } else if (!silent && hasDifferentWhitespace) { + this.trigger("whitespaceChanged", this.query); + } + }, + _updateDescendent: function updateDescendent(event, id) { + this.$input.attr("aria-activedescendant", id); + }, + bind: function() { + var that = this, onBlur, onFocus, onKeydown, onInput; + onBlur = _.bind(this._onBlur, this); + onFocus = _.bind(this._onFocus, this); + onKeydown = _.bind(this._onKeydown, this); + onInput = _.bind(this._onInput, this); + this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown); + if (!_.isMsie() || _.isMsie() > 9) { + this.$input.on("input.tt", onInput); + } else { + this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) { + if (specialKeyCodeMap[$e.which || $e.keyCode]) { + return; + } + _.defer(_.bind(that._onInput, that, $e)); + }); + } + return this; + }, + focus: function focus() { + this.$input.focus(); + }, + blur: function blur() { + this.$input.blur(); + }, + getLangDir: function getLangDir() { + return this.dir; + }, + getQuery: function getQuery() { + return this.query || ""; + }, + setQuery: function setQuery(val, silent) { + this.setInputValue(val); + this._setQuery(val, silent); + }, + hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() { + return this.query !== this.queryWhenFocused; + }, + getInputValue: function getInputValue() { + return this.$input.val(); + }, + setInputValue: function setInputValue(value) { + this.$input.val(value); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + resetInputValue: function resetInputValue() { + this.setInputValue(this.query); + }, + getHint: function getHint() { + return this.$hint.val(); + }, + setHint: function setHint(value) { + this.$hint.val(value); + }, + clearHint: function clearHint() { + this.setHint(""); + }, + clearHintIfInvalid: function clearHintIfInvalid() { + var val, hint, valIsPrefixOfHint, isValid; + val = this.getInputValue(); + hint = this.getHint(); + valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0; + isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow(); + !isValid && this.clearHint(); + }, + hasFocus: function hasFocus() { + return this.$input.is(":focus"); + }, + hasOverflow: function hasOverflow() { + var constraint = this.$input.width() - 2; + this.$overflowHelper.text(this.getInputValue()); + return this.$overflowHelper.width() >= constraint; + }, + isCursorAtEnd: function() { + var valueLength, selectionStart, range; + valueLength = this.$input.val().length; + selectionStart = this.$input[0].selectionStart; + if (_.isNumber(selectionStart)) { + return selectionStart === valueLength; + } else if (document.selection) { + range = document.selection.createRange(); + range.moveStart("character", -valueLength); + return valueLength === range.text.length; + } + return true; + }, + destroy: function destroy() { + this.$hint.off(".tt"); + this.$input.off(".tt"); + this.$overflowHelper.remove(); + this.$hint = this.$input = this.$overflowHelper = $("
"); + }, + setAriaExpanded: function setAriaExpanded(value) { + this.$input.attr("aria-expanded", value); + } + }); + return Input; + function buildOverflowHelper($input) { + return $('').css({ + position: "absolute", + visibility: "hidden", + whiteSpace: "pre", + fontFamily: $input.css("font-family"), + fontSize: $input.css("font-size"), + fontStyle: $input.css("font-style"), + fontVariant: $input.css("font-variant"), + fontWeight: $input.css("font-weight"), + wordSpacing: $input.css("word-spacing"), + letterSpacing: $input.css("letter-spacing"), + textIndent: $input.css("text-indent"), + textRendering: $input.css("text-rendering"), + textTransform: $input.css("text-transform") + }).insertAfter($input); + } + function areQueriesEquivalent(a, b) { + return Input.normalizeQuery(a) === Input.normalizeQuery(b); + } + function withModifier($e) { + return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey; + } + }(); + var Dataset = function() { + "use strict"; + var keys, nameGenerator; + keys = { + dataset: "tt-selectable-dataset", + val: "tt-selectable-display", + obj: "tt-selectable-object" + }; + nameGenerator = _.getIdGenerator(); + function Dataset(o, www) { + o = o || {}; + o.templates = o.templates || {}; + o.templates.notFound = o.templates.notFound || o.templates.empty; + if (!o.source) { + $.error("missing source"); + } + if (!o.node) { + $.error("missing node"); + } + if (o.name && !isValidName(o.name)) { + $.error("invalid dataset name: " + o.name); + } + www.mixin(this); + this.highlight = !!o.highlight; + this.name = _.toStr(o.name || nameGenerator()); + this.limit = o.limit || 5; + this.displayFn = getDisplayFn(o.display || o.displayKey); + this.templates = getTemplates(o.templates, this.displayFn); + this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source; + this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async; + this._resetLastSuggestion(); + this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name); + } + Dataset.extractData = function extractData(el) { + var $el = $(el); + if ($el.data(keys.obj)) { + return { + dataset: $el.data(keys.dataset) || "", + val: $el.data(keys.val) || "", + obj: $el.data(keys.obj) || null + }; + } + return null; + }; + _.mixin(Dataset.prototype, EventEmitter, { + _overwrite: function overwrite(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (this.async && this.templates.pending) { + this._renderPending(query); + } else if (!this.async && this.templates.notFound) { + this._renderNotFound(query); + } else { + this._empty(); + } + this.trigger("rendered", suggestions, false, this.name); + }, + _append: function append(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length && this.$lastSuggestion.length) { + this._appendSuggestions(query, suggestions); + } else if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (!this.$lastSuggestion.length && this.templates.notFound) { + this._renderNotFound(query); + } + this.trigger("rendered", suggestions, true, this.name); + }, + _renderSuggestions: function renderSuggestions(query, suggestions) { + var $fragment; + $fragment = this._getSuggestionsFragment(query, suggestions); + this.$lastSuggestion = $fragment.children().last(); + this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions)); + }, + _appendSuggestions: function appendSuggestions(query, suggestions) { + var $fragment, $lastSuggestion; + $fragment = this._getSuggestionsFragment(query, suggestions); + $lastSuggestion = $fragment.children().last(); + this.$lastSuggestion.after($fragment); + this.$lastSuggestion = $lastSuggestion; + }, + _renderPending: function renderPending(query) { + var template = this.templates.pending; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _renderNotFound: function renderNotFound(query) { + var template = this.templates.notFound; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _empty: function empty() { + this.$el.empty(); + this._resetLastSuggestion(); + }, + _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) { + var that = this, fragment; + fragment = document.createDocumentFragment(); + _.each(suggestions, function getSuggestionNode(suggestion) { + var $el, context; + context = that._injectQuery(query, suggestion); + $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable); + fragment.appendChild($el[0]); + }); + this.highlight && highlight({ + className: this.classes.highlight, + node: fragment, + pattern: query + }); + return $(fragment); + }, + _getFooter: function getFooter(query, suggestions) { + return this.templates.footer ? this.templates.footer({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _getHeader: function getHeader(query, suggestions) { + return this.templates.header ? this.templates.header({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _resetLastSuggestion: function resetLastSuggestion() { + this.$lastSuggestion = $(); + }, + _injectQuery: function injectQuery(query, obj) { + return _.isObject(obj) ? _.mixin({ + _query: query + }, obj) : obj; + }, + update: function update(query) { + var that = this, canceled = false, syncCalled = false, rendered = 0; + this.cancel(); + this.cancel = function cancel() { + canceled = true; + that.cancel = $.noop; + that.async && that.trigger("asyncCanceled", query, that.name); + }; + this.source(query, sync, async); + !syncCalled && sync([]); + function sync(suggestions) { + if (syncCalled) { + return; + } + syncCalled = true; + suggestions = (suggestions || []).slice(0, that.limit); + rendered = suggestions.length; + that._overwrite(query, suggestions); + if (rendered < that.limit && that.async) { + that.trigger("asyncRequested", query, that.name); + } + } + function async(suggestions) { + suggestions = suggestions || []; + if (!canceled && rendered < that.limit) { + that.cancel = $.noop; + var idx = Math.abs(rendered - that.limit); + rendered += idx; + that._append(query, suggestions.slice(0, idx)); + that.async && that.trigger("asyncReceived", query, that.name); + } + } + }, + cancel: $.noop, + clear: function clear() { + this._empty(); + this.cancel(); + this.trigger("cleared"); + }, + isEmpty: function isEmpty() { + return this.$el.is(":empty"); + }, + destroy: function destroy() { + this.$el = $("
"); + } + }); + return Dataset; + function getDisplayFn(display) { + display = display || _.stringify; + return _.isFunction(display) ? display : displayFn; + function displayFn(obj) { + return obj[display]; + } + } + function getTemplates(templates, displayFn) { + return { + notFound: templates.notFound && _.templatify(templates.notFound), + pending: templates.pending && _.templatify(templates.pending), + header: templates.header && _.templatify(templates.header), + footer: templates.footer && _.templatify(templates.footer), + suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate + }; + function userSuggestionTemplate(context) { + var template = templates.suggestion; + return $(template(context)).attr("id", _.guid()); + } + function suggestionTemplate(context) { + return $('
').attr("id", _.guid()).text(displayFn(context)); + } + } + function isValidName(str) { + return /^[_a-zA-Z0-9-]+$/.test(str); + } + }(); + var Menu = function() { + "use strict"; + function Menu(o, www) { + var that = this; + o = o || {}; + if (!o.node) { + $.error("node is required"); + } + www.mixin(this); + this.$node = $(o.node); + this.query = null; + this.datasets = _.map(o.datasets, initializeDataset); + function initializeDataset(oDataset) { + var node = that.$node.find(oDataset.node).first(); + oDataset.node = node.length ? node : $("
").appendTo(that.$node); + return new Dataset(oDataset, www); + } + } + _.mixin(Menu.prototype, EventEmitter, { + _onSelectableClick: function onSelectableClick($e) { + this.trigger("selectableClicked", $($e.currentTarget)); + }, + _onRendered: function onRendered(type, dataset, suggestions, async) { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetRendered", dataset, suggestions, async); + }, + _onCleared: function onCleared() { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetCleared"); + }, + _propagate: function propagate() { + this.trigger.apply(this, arguments); + }, + _allDatasetsEmpty: function allDatasetsEmpty() { + return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) { + var isEmpty = dataset.isEmpty(); + this.$node.attr("aria-expanded", !isEmpty); + return isEmpty; + }, this)); + }, + _getSelectables: function getSelectables() { + return this.$node.find(this.selectors.selectable); + }, + _removeCursor: function _removeCursor() { + var $selectable = this.getActiveSelectable(); + $selectable && $selectable.removeClass(this.classes.cursor); + }, + _ensureVisible: function ensureVisible($el) { + var elTop, elBottom, nodeScrollTop, nodeHeight; + elTop = $el.position().top; + elBottom = elTop + $el.outerHeight(true); + nodeScrollTop = this.$node.scrollTop(); + nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10); + if (elTop < 0) { + this.$node.scrollTop(nodeScrollTop + elTop); + } else if (nodeHeight < elBottom) { + this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight)); + } + }, + bind: function() { + var that = this, onSelectableClick; + onSelectableClick = _.bind(this._onSelectableClick, this); + this.$node.on("click.tt", this.selectors.selectable, onSelectableClick); + this.$node.on("mouseover", this.selectors.selectable, function() { + that.setCursor($(this)); + }); + this.$node.on("mouseleave", function() { + that._removeCursor(); + }); + _.each(this.datasets, function(dataset) { + dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that); + }); + return this; + }, + isOpen: function isOpen() { + return this.$node.hasClass(this.classes.open); + }, + open: function open() { + this.$node.scrollTop(0); + this.$node.addClass(this.classes.open); + }, + close: function close() { + this.$node.attr("aria-expanded", false); + this.$node.removeClass(this.classes.open); + this._removeCursor(); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.attr("dir", dir); + }, + selectableRelativeToCursor: function selectableRelativeToCursor(delta) { + var $selectables, $oldCursor, oldIndex, newIndex; + $oldCursor = this.getActiveSelectable(); + $selectables = this._getSelectables(); + oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1; + newIndex = oldIndex + delta; + newIndex = (newIndex + 1) % ($selectables.length + 1) - 1; + newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex; + return newIndex === -1 ? null : $selectables.eq(newIndex); + }, + setCursor: function setCursor($selectable) { + this._removeCursor(); + if ($selectable = $selectable && $selectable.first()) { + $selectable.addClass(this.classes.cursor); + this._ensureVisible($selectable); + } + }, + getSelectableData: function getSelectableData($el) { + return $el && $el.length ? Dataset.extractData($el) : null; + }, + getActiveSelectable: function getActiveSelectable() { + var $selectable = this._getSelectables().filter(this.selectors.cursor).first(); + return $selectable.length ? $selectable : null; + }, + getTopSelectable: function getTopSelectable() { + var $selectable = this._getSelectables().first(); + return $selectable.length ? $selectable : null; + }, + update: function update(query) { + var isValidUpdate = query !== this.query; + if (isValidUpdate) { + this.query = query; + _.each(this.datasets, updateDataset); + } + return isValidUpdate; + function updateDataset(dataset) { + dataset.update(query); + } + }, + empty: function empty() { + _.each(this.datasets, clearDataset); + this.query = null; + this.$node.addClass(this.classes.empty); + function clearDataset(dataset) { + dataset.clear(); + } + }, + destroy: function destroy() { + this.$node.off(".tt"); + this.$node = $("
"); + _.each(this.datasets, destroyDataset); + function destroyDataset(dataset) { + dataset.destroy(); + } + } + }); + return Menu; + }(); + var Status = function() { + "use strict"; + function Status(options) { + this.$el = $("", { + role: "status", + "aria-live": "polite" + }).css({ + position: "absolute", + padding: "0", + border: "0", + height: "1px", + width: "1px", + "margin-bottom": "-1px", + "margin-right": "-1px", + overflow: "hidden", + clip: "rect(0 0 0 0)", + "white-space": "nowrap" + }); + options.$input.after(this.$el); + _.each(options.menu.datasets, _.bind(function(dataset) { + if (dataset.onSync) { + dataset.onSync("rendered", _.bind(this.update, this)); + dataset.onSync("cleared", _.bind(this.cleared, this)); + } + }, this)); + } + _.mixin(Status.prototype, { + update: function update(event, suggestions) { + var length = suggestions.length; + var words; + if (length === 1) { + words = { + result: "result", + is: "is" + }; + } else { + words = { + result: "results", + is: "are" + }; + } + this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate."); + }, + cleared: function() { + this.$el.text(""); + } + }); + return Status; + }(); + var DefaultMenu = function() { + "use strict"; + var s = Menu.prototype; + function DefaultMenu() { + Menu.apply(this, [].slice.call(arguments, 0)); + } + _.mixin(DefaultMenu.prototype, Menu.prototype, { + open: function open() { + !this._allDatasetsEmpty() && this._show(); + return s.open.apply(this, [].slice.call(arguments, 0)); + }, + close: function close() { + this._hide(); + return s.close.apply(this, [].slice.call(arguments, 0)); + }, + _onRendered: function onRendered() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onRendered.apply(this, [].slice.call(arguments, 0)); + }, + _onCleared: function onCleared() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onCleared.apply(this, [].slice.call(arguments, 0)); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl); + return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); + }, + _hide: function hide() { + this.$node.hide(); + }, + _show: function show() { + this.$node.css("display", "block"); + } + }); + return DefaultMenu; + }(); + var Typeahead = function() { + "use strict"; + function Typeahead(o, www) { + var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; + o = o || {}; + if (!o.input) { + $.error("missing input"); + } + if (!o.menu) { + $.error("missing menu"); + } + if (!o.eventBus) { + $.error("missing event bus"); + } + www.mixin(this); + this.eventBus = o.eventBus; + this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; + this.input = o.input; + this.menu = o.menu; + this.enabled = true; + this.autoselect = !!o.autoselect; + this.active = false; + this.input.hasFocus() && this.activate(); + this.dir = this.input.getLangDir(); + this._hacks(); + this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this); + onFocused = c(this, "activate", "open", "_onFocused"); + onBlurred = c(this, "deactivate", "_onBlurred"); + onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed"); + onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed"); + onEscKeyed = c(this, "isActive", "_onEscKeyed"); + onUpKeyed = c(this, "isActive", "open", "_onUpKeyed"); + onDownKeyed = c(this, "isActive", "open", "_onDownKeyed"); + onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed"); + onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed"); + onQueryChanged = c(this, "_openIfActive", "_onQueryChanged"); + onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged"); + this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this); + } + _.mixin(Typeahead.prototype, { + _hacks: function hacks() { + var $input, $menu; + $input = this.input.$input || $("
"); + $menu = this.menu.$node || $("
"); + $input.on("blur.tt", function($e) { + var active, isActive, hasActive; + active = document.activeElement; + isActive = $menu.is(active); + hasActive = $menu.has(active).length > 0; + if (_.isMsie() && (isActive || hasActive)) { + $e.preventDefault(); + $e.stopImmediatePropagation(); + _.defer(function() { + $input.focus(); + }); + } + }); + $menu.on("mousedown.tt", function($e) { + $e.preventDefault(); + }); + }, + _onSelectableClicked: function onSelectableClicked(type, $el) { + this.select($el); + }, + _onDatasetCleared: function onDatasetCleared() { + this._updateHint(); + }, + _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) { + this._updateHint(); + if (this.autoselect) { + var cursorClass = this.selectors.cursor.substr(1); + this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass); + } + this.eventBus.trigger("render", suggestions, async, dataset); + }, + _onAsyncRequested: function onAsyncRequested(type, dataset, query) { + this.eventBus.trigger("asyncrequest", query, dataset); + }, + _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { + this.eventBus.trigger("asynccancel", query, dataset); + }, + _onAsyncReceived: function onAsyncReceived(type, dataset, query) { + this.eventBus.trigger("asyncreceive", query, dataset); + }, + _onFocused: function onFocused() { + this._minLengthMet() && this.menu.update(this.input.getQuery()); + }, + _onBlurred: function onBlurred() { + if (this.input.hasQueryChangedSinceLastFocus()) { + this.eventBus.trigger("change", this.input.getQuery()); + } + }, + _onEnterKeyed: function onEnterKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + if (this.select($selectable)) { + $e.preventDefault(); + $e.stopPropagation(); + } + } else if (this.autoselect) { + if (this.select(this.menu.getTopSelectable())) { + $e.preventDefault(); + $e.stopPropagation(); + } + } + }, + _onTabKeyed: function onTabKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + this.select($selectable) && $e.preventDefault(); + } else if (this.autoselect) { + if ($selectable = this.menu.getTopSelectable()) { + this.autocomplete($selectable) && $e.preventDefault(); + } + } + }, + _onEscKeyed: function onEscKeyed() { + this.close(); + }, + _onUpKeyed: function onUpKeyed() { + this.moveCursor(-1); + }, + _onDownKeyed: function onDownKeyed() { + this.moveCursor(+1); + }, + _onLeftKeyed: function onLeftKeyed() { + if (this.dir === "rtl" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onRightKeyed: function onRightKeyed() { + if (this.dir === "ltr" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onQueryChanged: function onQueryChanged(e, query) { + this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); + }, + _onWhitespaceChanged: function onWhitespaceChanged() { + this._updateHint(); + }, + _onLangDirChanged: function onLangDirChanged(e, dir) { + if (this.dir !== dir) { + this.dir = dir; + this.menu.setLanguageDirection(dir); + } + }, + _openIfActive: function openIfActive() { + this.isActive() && this.open(); + }, + _minLengthMet: function minLengthMet(query) { + query = _.isString(query) ? query : this.input.getQuery() || ""; + return query.length >= this.minLength; + }, + _updateHint: function updateHint() { + var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; + $selectable = this.menu.getTopSelectable(); + data = this.menu.getSelectableData($selectable); + val = this.input.getInputValue(); + if (data && !_.isBlankString(val) && !this.input.hasOverflow()) { + query = Input.normalizeQuery(val); + escapedQuery = _.escapeRegExChars(query); + frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i"); + match = frontMatchRegEx.exec(data.val); + match && this.input.setHint(val + match[1]); + } else { + this.input.clearHint(); + } + }, + isEnabled: function isEnabled() { + return this.enabled; + }, + enable: function enable() { + this.enabled = true; + }, + disable: function disable() { + this.enabled = false; + }, + isActive: function isActive() { + return this.active; + }, + activate: function activate() { + if (this.isActive()) { + return true; + } else if (!this.isEnabled() || this.eventBus.before("active")) { + return false; + } else { + this.active = true; + this.eventBus.trigger("active"); + return true; + } + }, + deactivate: function deactivate() { + if (!this.isActive()) { + return true; + } else if (this.eventBus.before("idle")) { + return false; + } else { + this.active = false; + this.close(); + this.eventBus.trigger("idle"); + return true; + } + }, + isOpen: function isOpen() { + return this.menu.isOpen(); + }, + open: function open() { + if (!this.isOpen() && !this.eventBus.before("open")) { + this.input.setAriaExpanded(true); + this.menu.open(); + this._updateHint(); + this.eventBus.trigger("open"); + } + return this.isOpen(); + }, + close: function close() { + if (this.isOpen() && !this.eventBus.before("close")) { + this.input.setAriaExpanded(false); + this.menu.close(); + this.input.clearHint(); + this.input.resetInputValue(); + this.eventBus.trigger("close"); + } + return !this.isOpen(); + }, + setVal: function setVal(val) { + this.input.setQuery(_.toStr(val)); + }, + getVal: function getVal() { + return this.input.getQuery(); + }, + select: function select($selectable) { + var data = this.menu.getSelectableData($selectable); + if (data && !this.eventBus.before("select", data.obj, data.dataset)) { + this.input.setQuery(data.val, true); + this.eventBus.trigger("select", data.obj, data.dataset); + this.close(); + return true; + } + return false; + }, + autocomplete: function autocomplete($selectable) { + var query, data, isValid; + query = this.input.getQuery(); + data = this.menu.getSelectableData($selectable); + isValid = data && query !== data.val; + if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) { + this.input.setQuery(data.val); + this.eventBus.trigger("autocomplete", data.obj, data.dataset); + return true; + } + return false; + }, + moveCursor: function moveCursor(delta) { + var query, $candidate, data, suggestion, datasetName, cancelMove, id; + query = this.input.getQuery(); + $candidate = this.menu.selectableRelativeToCursor(delta); + data = this.menu.getSelectableData($candidate); + suggestion = data ? data.obj : null; + datasetName = data ? data.dataset : null; + id = $candidate ? $candidate.attr("id") : null; + this.input.trigger("cursorchange", id); + cancelMove = this._minLengthMet() && this.menu.update(query); + if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { + this.menu.setCursor($candidate); + if (data) { + if (typeof data.val === "string") { + this.input.setInputValue(data.val); + } + } else { + this.input.resetInputValue(); + this._updateHint(); + } + this.eventBus.trigger("cursorchange", suggestion, datasetName); + return true; + } + return false; + }, + destroy: function destroy() { + this.input.destroy(); + this.menu.destroy(); + } + }); + return Typeahead; + function c(ctx) { + var methods = [].slice.call(arguments, 1); + return function() { + var args = [].slice.call(arguments); + _.each(methods, function(method) { + return ctx[method].apply(ctx, args); + }); + }; + } + }(); + (function() { + "use strict"; + var old, keys, methods; + old = $.fn.typeahead; + keys = { + www: "tt-www", + attrs: "tt-attrs", + typeahead: "tt-typeahead" + }; + methods = { + initialize: function initialize(o, datasets) { + var www; + datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); + o = o || {}; + www = WWW(o.classNames); + return this.each(attach); + function attach() { + var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor; + _.each(datasets, function(d) { + d.highlight = !!o.highlight; + }); + $input = $(this); + $wrapper = $(www.html.wrapper); + $hint = $elOrNull(o.hint); + $menu = $elOrNull(o.menu); + defaultHint = o.hint !== false && !$hint; + defaultMenu = o.menu !== false && !$menu; + defaultHint && ($hint = buildHintFromInput($input, www)); + defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); + $hint && $hint.val(""); + $input = prepInput($input, www); + if (defaultHint || defaultMenu) { + $wrapper.css(www.css.wrapper); + $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); + $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); + } + MenuConstructor = defaultMenu ? DefaultMenu : Menu; + eventBus = new EventBus({ + el: $input + }); + input = new Input({ + hint: $hint, + input: $input, + menu: $menu + }, www); + menu = new MenuConstructor({ + node: $menu, + datasets: datasets + }, www); + status = new Status({ + $input: $input, + menu: menu + }); + typeahead = new Typeahead({ + input: input, + menu: menu, + eventBus: eventBus, + minLength: o.minLength, + autoselect: o.autoselect + }, www); + $input.data(keys.www, www); + $input.data(keys.typeahead, typeahead); + } + }, + isEnabled: function isEnabled() { + var enabled; + ttEach(this.first(), function(t) { + enabled = t.isEnabled(); + }); + return enabled; + }, + enable: function enable() { + ttEach(this, function(t) { + t.enable(); + }); + return this; + }, + disable: function disable() { + ttEach(this, function(t) { + t.disable(); + }); + return this; + }, + isActive: function isActive() { + var active; + ttEach(this.first(), function(t) { + active = t.isActive(); + }); + return active; + }, + activate: function activate() { + ttEach(this, function(t) { + t.activate(); + }); + return this; + }, + deactivate: function deactivate() { + ttEach(this, function(t) { + t.deactivate(); + }); + return this; + }, + isOpen: function isOpen() { + var open; + ttEach(this.first(), function(t) { + open = t.isOpen(); + }); + return open; + }, + open: function open() { + ttEach(this, function(t) { + t.open(); + }); + return this; + }, + close: function close() { + ttEach(this, function(t) { + t.close(); + }); + return this; + }, + select: function select(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.select($el); + }); + return success; + }, + autocomplete: function autocomplete(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.autocomplete($el); + }); + return success; + }, + moveCursor: function moveCursoe(delta) { + var success = false; + ttEach(this.first(), function(t) { + success = t.moveCursor(delta); + }); + return success; + }, + val: function val(newVal) { + var query; + if (!arguments.length) { + ttEach(this.first(), function(t) { + query = t.getVal(); + }); + return query; + } else { + ttEach(this, function(t) { + t.setVal(_.toStr(newVal)); + }); + return this; + } + }, + destroy: function destroy() { + ttEach(this, function(typeahead, $input) { + revert($input); + typeahead.destroy(); + }); + return this; + } + }; + $.fn.typeahead = function(method) { + if (methods[method]) { + return methods[method].apply(this, [].slice.call(arguments, 1)); + } else { + return methods.initialize.apply(this, arguments); + } + }; + $.fn.typeahead.noConflict = function noConflict() { + $.fn.typeahead = old; + return this; + }; + function ttEach($els, fn) { + $els.each(function() { + var $input = $(this), typeahead; + (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); + }); + } + function buildHintFromInput($input, www) { + return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({ + readonly: true, + required: false + }).removeAttr("id name placeholder").removeClass("required").attr({ + spellcheck: "false", + tabindex: -1 + }); + } + function prepInput($input, www) { + $input.data(keys.attrs, { + dir: $input.attr("dir"), + autocomplete: $input.attr("autocomplete"), + spellcheck: $input.attr("spellcheck"), + style: $input.attr("style") + }); + $input.addClass(www.classes.input).attr({ + spellcheck: false + }); + try { + !$input.attr("dir") && $input.attr("dir", "auto"); + } catch (e) {} + return $input; + } + function getBackgroundStyles($el) { + return { + backgroundAttachment: $el.css("background-attachment"), + backgroundClip: $el.css("background-clip"), + backgroundColor: $el.css("background-color"), + backgroundImage: $el.css("background-image"), + backgroundOrigin: $el.css("background-origin"), + backgroundPosition: $el.css("background-position"), + backgroundRepeat: $el.css("background-repeat"), + backgroundSize: $el.css("background-size") + }; + } + function revert($input) { + var www, $wrapper; + www = $input.data(keys.www); + $wrapper = $input.parent().filter(www.selectors.wrapper); + _.each($input.data(keys.attrs), function(val, key) { + _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); + }); + $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); + if ($wrapper.length) { + $input.detach().insertAfter($wrapper); + $wrapper.remove(); + } + } + function $elOrNull(obj) { + var isValid, $el; + isValid = _.isJQuery(obj) || _.isElement(obj); + $el = isValid ? $(obj).first() : []; + return $el.length ? $el : null; + } + })(); +}); \ No newline at end of file diff --git a/3.1.0/latest_version b/3.1.0/latest_version new file mode 100644 index 00000000..fd2a0186 --- /dev/null +++ b/3.1.0/latest_version @@ -0,0 +1 @@ +3.1.0 diff --git a/3.1.0/search.json b/3.1.0/search.json new file mode 100644 index 00000000..d37b3a86 --- /dev/null +++ b/3.1.0/search.json @@ -0,0 +1 @@ +{"Typealiases.html#/s:4Turf17LocationDirectiona":{"name":"LocationDirection","abstract":"\u003cp\u003eAn azimuth measured in degrees clockwise from true north.\u003c/p\u003e"},"Typealiases.html#/s:4Turf16LocationDistancea":{"name":"LocationDistance","abstract":"\u003cp\u003eA distance in meters.\u003c/p\u003e"},"Typealiases.html#/s:4Turf15LocationDegreesa":{"name":"LocationDegrees","abstract":"\u003cp\u003eA latitude or longitude in degrees.\u003c/p\u003e"},"Typealiases.html#/s:4Turf20LocationCoordinate2Da":{"name":"LocationCoordinate2D","abstract":"\u003cp\u003eA geographic coordinate.\u003c/p\u003e"},"Typealiases.html#/LocationDirection":{"name":"LocationDirection","abstract":"\u003cp\u003eAn azimuth measured in degrees clockwise from true north.\u003c/p\u003e"},"Typealiases.html#/LocationDistance":{"name":"LocationDistance","abstract":"\u003cp\u003eA distance in meters.\u003c/p\u003e"},"Typealiases.html#/LocationDegrees":{"name":"LocationDegrees","abstract":"\u003cp\u003eA latitude or longitude in degrees.\u003c/p\u003e"},"Typealiases.html#/s:4Turf9JSONArraya":{"name":"JSONArray","abstract":"\u003cp\u003eA JSON array of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/JSONValue.html\"\u003eJSONValue\u003c/a\u003e\u003c/code\u003e instances.\u003c/p\u003e"},"Typealiases.html#/s:4Turf10JSONObjecta":{"name":"JSONObject","abstract":"\u003cp\u003eA JSON object represented in memory by a dictionary with strings as keys and \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/JSONValue.html\"\u003eJSONValue\u003c/a\u003e\u003c/code\u003e instances as values.\u003c/p\u003e"},"Typealiases.html#/s:4Turf15LocationRadiansa":{"name":"LocationRadians","abstract":"\u003cp\u003eA latitude or longitude measured in radians, as opposed to \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbTypealiases.html#/s:4Turf15LocationDegreesa\"\u003eLocationDegrees\u003c/a\u003e\u003c/code\u003e, which is measured in degrees of arc.\u003c/p\u003e"},"Typealiases.html#/s:4Turf14RadianDistancea":{"name":"RadianDistance","abstract":"\u003cp\u003eA difference in latitude or longitude measured in radians, as opposed to \u003ccode\u003eCLLocationDegrees\u003c/code\u003e, which is used by some libraries to represent a similar distance measured in degrees of arc.\u003c/p\u003e"},"Typealiases.html#/s:4Turf11LineSegmenta":{"name":"LineSegment","abstract":"\u003cp\u003eA segment between two positions in a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/LineString.html\"\u003eLineString\u003c/a\u003e\u003c/code\u003e geometry or \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Ring.html\"\u003eRing\u003c/a\u003e\u003c/code\u003e.\u003c/p\u003e"},"Structs/Ring.html#/s:4Turf4RingV11coordinatesSaySo22CLLocationCoordinate2DVGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the linear ring is located.\u003c/p\u003e","parent_name":"Ring"},"Structs/Ring.html#/s:4Turf4RingV11coordinatesACSaySo22CLLocationCoordinate2DVG_tcfc":{"name":"init(coordinates:)","abstract":"\u003cp\u003eInitializes a linear ring defined by the given positions.\u003c/p\u003e","parent_name":"Ring"},"Structs/Ring.html#/s:4Turf4RingV4areaSdvp":{"name":"area","abstract":"\u003cp\u003eCalculate the approximate area of the polygon were it projected onto the earth, in square meters.","parent_name":"Ring"},"Structs/Ring.html#/s:4Turf4RingV8contains_14ignoreBoundarySbSo22CLLocationCoordinate2DV_SbtF":{"name":"contains(_:ignoreBoundary:)","abstract":"\u003cp\u003eDetermines if the given point falls within the ring.","parent_name":"Ring"},"Structs/Ring.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Ring"},"Structs/Ring.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Ring"},"Structs/RadianCoordinate2D.html#/s:4Turf18RadianCoordinate2DV8latitude9longitudeACSd_Sdtcfc":{"name":"init(latitude:longitude:)","abstract":"\u003cp\u003eInitializes a coordinate pair located at the given latitude and longitude.\u003c/p\u003e","parent_name":"RadianCoordinate2D"},"Structs/RadianCoordinate2D.html#/s:4Turf18RadianCoordinate2DVyACSo010CLLocationC1DVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a coordinate pair measured in radians that is coincident to the given coordinate pair measured in degrees of arc.\u003c/p\u003e","parent_name":"RadianCoordinate2D"},"Structs/RadianCoordinate2D.html#/s:4Turf18RadianCoordinate2DV9direction2to10Foundation11MeasurementVySo11NSUnitAngleCGAC_tF":{"name":"direction(to:)","abstract":"\u003cp\u003eReturns direction given two coordinates.\u003c/p\u003e","parent_name":"RadianCoordinate2D"},"Structs/RadianCoordinate2D.html#/s:4Turf18RadianCoordinate2DV10coordinate2at6facingACSd_10Foundation11MeasurementVySo11NSUnitAngleCGtF":{"name":"coordinate(at:facing:)","abstract":"\u003cp\u003eReturns coordinate at a given distance and direction away from coordinate.\u003c/p\u003e","parent_name":"RadianCoordinate2D"},"Structs/RadianCoordinate2D.html#/s:4Turf18RadianCoordinate2DV8distance2toSdAC_tF":{"name":"distance(to:)","abstract":"\u003cp\u003eReturns the Haversine distance between two coordinates measured in radians.\u003c/p\u003e","parent_name":"RadianCoordinate2D"},"Structs/Polygon.html#/s:4Turf7PolygonV11coordinatesSaySaySo22CLLocationCoordinate2DVGGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the polygon is located. Each nested array corresponds to one linear ring.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonVyACSaySaySo22CLLocationCoordinate2DVGGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a polygon defined by the given positions.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV9outerRing10innerRingsAcA0D0V_SayAGGtcfc":{"name":"init(outerRing:innerRings:)","abstract":"\u003cp\u003eInitializes a polygon defined by the given linear rings.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV6center6radius8verticesACSo22CLLocationCoordinate2DV_SdSitcfc":{"name":"init(center:radius:vertices:)","abstract":"\u003cp\u003eInitializes a polygon as a given center coordinate with a given number of","parent_name":"Polygon"},"Structs/Polygon.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Polygon"},"Structs/Polygon.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV10innerRingsSayAA4RingVGvp":{"name":"innerRings","abstract":"\u003cp\u003eRepresentation of \u003ccode\u003ePolygon\u003c/code\u003es coordinates of inner rings\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV9outerRingAA0D0Vvp":{"name":"outerRing","abstract":"\u003cp\u003eRepresentation of \u003ccode\u003ePolygon\u003c/code\u003es coordinates of outer ring\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV4areaSdvp":{"name":"area","abstract":"\u003cp\u003eThe polygon’s area.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV8contains_14ignoreBoundarySbSo22CLLocationCoordinate2DV_SbtF":{"name":"contains(_:ignoreBoundary:)","abstract":"\u003cp\u003eReturns whether the given coordinate falls within the polygon and outside of its interior rings.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV6smooth10iterationsACSi_tF":{"name":"smooth(iterations:)","abstract":"\u003cp\u003eReturns the polygon with corners smoothed out using \u003ca href=\"https://www.cs.unc.edu/%7Edm/UNC/COMP258/LECTURES/Chaikins-Algorithm.pdf\"\u003eChaikin’s algorithm\u003c/a\u003e.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV10simplified9tolerance14highestQualityACSd_SbtF":{"name":"simplified(tolerance:highestQuality:)","abstract":"\u003cp\u003eReturns a copy of the polygon simplified using the Ramer–Douglas–Peucker algorithm.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV8simplify9tolerance14highestQualityySd_SbtF":{"name":"simplify(tolerance:highestQuality:)","abstract":"\u003cp\u003eSimplifies the polygon in place using the Ramer–Douglas–Peucker algorithm.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV6centerSo22CLLocationCoordinate2DVSgvp":{"name":"center","abstract":"\u003cp\u003eCalculates the absolute center of the bounding box.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV8centroidSo22CLLocationCoordinate2DVSgvp":{"name":"centroid","abstract":"\u003cp\u003eCalculates the centroid using the mean of all vertices.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV12centerOfMassSo22CLLocationCoordinate2DVSgvp":{"name":"centerOfMass","abstract":"\u003cp\u003eCalculates the \u003ca href=\"https://en.wikipedia.org/wiki/Center_of_mass\"\u003ecenter of mass\u003c/a\u003e using the \u003ca href=\"https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon\"\u003ecentroid of polygon\u003c/a\u003e formula.\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Polygon"},"Structs/Polygon.html#/s:4Turf7PolygonV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Polygon"},"Structs/Point.html#/s:4Turf5PointV11coordinatesSo22CLLocationCoordinate2DVvp":{"name":"coordinates","abstract":"\u003cp\u003eThe position at which the point is located.\u003c/p\u003e","parent_name":"Point"},"Structs/Point.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"Point"},"Structs/Point.html#/s:4Turf5PointVyACSo22CLLocationCoordinate2DVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a point defined by the given position.\u003c/p\u003e","parent_name":"Point"},"Structs/Point.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Point"},"Structs/Point.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Point"},"Structs/Point.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"Point"},"Structs/Point.html#/s:4Turf5PointV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Point"},"Structs/Point.html#/s:4Turf5PointV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Point"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonV11coordinatesSaySaySaySo22CLLocationCoordinate2DVGGGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the multipolygon is located. Each nested array corresponds to one polygon.\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonV8polygonsSayAA0C0VGvp":{"name":"polygons","abstract":"\u003cp\u003eThe polygon geometries that conceptually form the multipolygon.\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonVyACSaySaySaySo22CLLocationCoordinate2DVGGGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a multipolygon defined by the given positions.\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonVyACSayAA0C0VGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a multipolygon coincident to the given polygons.\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonV8contains_14ignoreBoundarySbSo22CLLocationCoordinate2DV_SbtF":{"name":"contains(_:ignoreBoundary:)","abstract":"\u003cp\u003eDetermines if the given coordinate falls within any of the polygons.","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPolygon.html#/s:4Turf12MultiPolygonV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiPolygon"},"Structs/MultiPoint.html#/s:4Turf10MultiPointV11coordinatesSaySo22CLLocationCoordinate2DVGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the multipoint is located.\u003c/p\u003e","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:4Turf10MultiPointVyACSaySo22CLLocationCoordinate2DVGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a multipoint defined by the given positions.\u003c/p\u003e","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:4Turf10MultiPointV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiPoint"},"Structs/MultiPoint.html#/s:4Turf10MultiPointV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiPoint"},"Structs/MultiLineString.html#/s:4Turf15MultiLineStringV11coordinatesSaySaySo22CLLocationCoordinate2DVGGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the multi–line string is located. Each nested array corresponds to one line string.\u003c/p\u003e","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf15MultiLineStringVyACSaySaySo22CLLocationCoordinate2DVGGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a multi–line string defined by the given positions.\u003c/p\u003e","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf15MultiLineStringVyAcA7PolygonVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a multi–line string coincident to the given polygon’s linear rings.\u003c/p\u003e","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf15MultiLineStringV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiLineString"},"Structs/MultiLineString.html#/s:4Turf15MultiLineStringV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"MultiLineString"},"Structs/LineString/IndexedCoordinate.html#/s:4Turf10LineStringV17IndexedCoordinateV10coordinateSo22CLLocationCoordinate2DVvp":{"name":"coordinate","abstract":"\u003cp\u003eThe coordinate\u003c/p\u003e","parent_name":"IndexedCoordinate"},"Structs/LineString/IndexedCoordinate.html#/s:4Turf10LineStringV17IndexedCoordinateV8distanceSdvp":{"name":"distance","abstract":"\u003cp\u003eThe coordinate’s distance from the start of the polyline\u003c/p\u003e","parent_name":"IndexedCoordinate"},"Structs/LineString.html#/s:4Turf10LineStringV11coordinatesSaySo22CLLocationCoordinate2DVGvp":{"name":"coordinates","abstract":"\u003cp\u003eThe positions at which the line string is located.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringVyACSaySo22CLLocationCoordinate2DVGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a line string defined by given positions.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringVyAcA4RingVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a line string coincident to the given linear ring.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"LineString"},"Structs/LineString.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV6bezier10resolution9sharpnessACSgSi_SdtF":{"name":"bezier(resolution:sharpness:)","abstract":"\u003cp\u003eReturns the line string transformed into an approximation of a curve by applying a Bézier spline algorithm.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV7trimmed4from2toACSgSd_SdtF":{"name":"trimmed(from:to:)","abstract":"\u003cp\u003eReturns the portion of the line string that begins at the given start distance and extends the given stop distance along the line string.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV7trimmed4from8distanceACSgSo22CLLocationCoordinate2DV_SdtF":{"name":"trimmed(from:distance:)","abstract":"\u003cp\u003eReturns the portion of the line string that begins at the given coordinate and extends the given distance along the line string.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString/IndexedCoordinate.html":{"name":"IndexedCoordinate","abstract":"\u003cp\u003e\u003ccode\u003eIndexedCoordinate\u003c/code\u003e is a coordinate with additional information such as the index from its position in the polyline and distance from the start of the polyline.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV19coordinateFromStart8distanceSo22CLLocationCoordinate2DVSgSd_tF":{"name":"coordinateFromStart(distance:)","abstract":"\u003cp\u003eReturns a coordinate along a line string at a certain distance from the start of the polyline.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV26indexedCoordinateFromStart8distanceAC07IndexedE0VSgSd_tF":{"name":"indexedCoordinateFromStart(distance:)","abstract":"\u003cp\u003eReturns an indexed coordinate along a line string at a certain distance from the start of the polyline.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV8distance4from2toSdSgSo22CLLocationCoordinate2DVSg_AJtF":{"name":"distance(from:to:)","abstract":"\u003cp\u003eReturns the distance along a slice of the line string with the given endpoints.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV6sliced4from2toACSgSo22CLLocationCoordinate2DVSg_AJtF":{"name":"sliced(from:to:)","abstract":"\u003cp\u003eReturns a subset of the line string between two given coordinates.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV17closestCoordinate2toAC07IndexedE0VSgSo22CLLocationCoordinate2DV_tF":{"name":"closestCoordinate(to:)","abstract":"\u003cp\u003eReturns the geographic coordinate along the line string that is closest to the given coordinate as the crow flies.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV10simplified9tolerance14highestQualityACSd_SbtF":{"name":"simplified(tolerance:highestQuality:)","abstract":"\u003cp\u003eReturns a copy of the line string simplified using the Ramer–Douglas–Peucker algorithm.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV8simplify9tolerance14highestQualityySd_SbtF":{"name":"simplify(tolerance:highestQuality:)","abstract":"\u003cp\u003eSimplifies the line string in place using the Ramer–Douglas–Peucker algorithm.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV13intersections4withSaySo22CLLocationCoordinate2DVGAC_tF":{"name":"intersections(with:)","abstract":"\u003cp\u003eReturns all intersections with another \u003ccode\u003eLineString\u003c/code\u003e.\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"LineString"},"Structs/LineString.html#/s:4Turf10LineStringV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"LineString"},"Structs/GeometryCollection.html#/s:4Turf18GeometryCollectionV10geometriesSayAA0B0OGvp":{"name":"geometries","abstract":"\u003cp\u003eThe geometries contained by the geometry collection.\u003c/p\u003e","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf18GeometryCollectionV10geometriesACSayAA0B0OG_tcfc":{"name":"init(geometries:)","abstract":"\u003cp\u003eInitializes a geometry collection defined by the given geometries.\u003c/p\u003e","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf18GeometryCollectionVyAcA12MultiPolygonVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a geometry collection coincident to the given multipolygon.\u003c/p\u003e","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf18GeometryCollectionV3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"GeometryCollection"},"Structs/GeometryCollection.html#/s:4Turf18GeometryCollectionV3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"GeometryCollection"},"Structs/FeatureCollection.html#/s:4Turf17FeatureCollectionV8featuresSayAA0B0VGvp":{"name":"features","abstract":"\u003cp\u003eThe features that the collection contains.\u003c/p\u003e","parent_name":"FeatureCollection"},"Structs/FeatureCollection.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"FeatureCollection"},"Structs/FeatureCollection.html#/s:4Turf17FeatureCollectionV8featuresACSayAA0B0VG_tcfc":{"name":"init(features:)","abstract":"\u003cp\u003eInitializes a feature collection containing the given features.\u003c/p\u003e","parent_name":"FeatureCollection"},"Structs/FeatureCollection.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"FeatureCollection"},"Structs/FeatureCollection.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"FeatureCollection"},"Structs/FeatureCollection.html#/s:4Turf24GeoJSONObjectConvertibleP03geoC0AA0bC0Ovp":{"name":"geoJSONObject","parent_name":"FeatureCollection"},"Structs/Feature.html#/s:4Turf7FeatureV10identifierAA0B10IdentifierOSgvp":{"name":"identifier","abstract":"\u003cp\u003eA string or number that commonly identifies the feature in the context of a data set.\u003c/p\u003e","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf7FeatureV10propertiesSDySSAA9JSONValueOSgGSgvp":{"name":"properties","abstract":"\u003cp\u003eArbitrary, JSON-compatible attributes to associate with the feature.\u003c/p\u003e","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf7FeatureV8geometryAA8GeometryOSgvp":{"name":"geometry","abstract":"\u003cp\u003eThe geometry at which the feature is located.\u003c/p\u003e","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf7FeatureV8geometryAcA8GeometryO_tcfc":{"name":"init(geometry:)","abstract":"\u003cp\u003eInitializes a feature located at the given geometry.\u003c/p\u003e","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf7FeatureV8geometryAcA19GeometryConvertible_pSg_tcfc":{"name":"init(geometry:)","abstract":"\u003cp\u003eInitializes a feature defined by the given geometry-convertible instance.\u003c/p\u003e","parent_name":"Feature"},"Structs/Feature.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Feature"},"Structs/Feature.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Feature"},"Structs/Feature.html#/s:4Turf24GeoJSONObjectConvertibleP03geoC0AA0bC0Ovp":{"name":"geoJSONObject","parent_name":"Feature"},"Structs/LocationCoordinate2D.html#/latitude":{"name":"latitude","abstract":"\u003cp\u003eThe latitude in degrees.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Structs/LocationCoordinate2D.html#/longitude":{"name":"longitude","abstract":"\u003cp\u003eThe longitude in degrees.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Structs/LocationCoordinate2D.html#/init(latitude:longitude:)":{"name":"init(latitude:longitude:)","abstract":"\u003cp\u003eCreates a degree-based geographic coordinate.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Structs/BoundingBox.html#/s:4Turf11BoundingBoxV9southWestSo22CLLocationCoordinate2DVvp":{"name":"southWest","abstract":"\u003cp\u003eThe southwesternmost position contained in the bounding box.\u003c/p\u003e","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:4Turf11BoundingBoxV9northEastSo22CLLocationCoordinate2DVvp":{"name":"northEast","abstract":"\u003cp\u003eThe northeasternmost position contained in the bounding box.\u003c/p\u003e","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:4Turf11BoundingBoxV4fromACSgSaySo22CLLocationCoordinate2DVGSg_tcfc":{"name":"init(from:)","abstract":"\u003cp\u003eInitializes the smallest bounding box that contains all the given coordinates.\u003c/p\u003e","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:4Turf11BoundingBoxV9southWest9northEastACSo22CLLocationCoordinate2DV_AGtcfc":{"name":"init(southWest:northEast:)","abstract":"\u003cp\u003eInitializes a bounding box defined by its southwesternmost and northeasternmost positions.\u003c/p\u003e","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:4Turf11BoundingBoxV8contains_14ignoreBoundarySbSo22CLLocationCoordinate2DV_SbtF":{"name":"contains(_:ignoreBoundary:)","abstract":"\u003cp\u003eReturns a Boolean value indicating whether the bounding box contains the given position.\u003c/p\u003e","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:SH4hash4intoys6HasherVz_tF":{"name":"hash(into:)","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BoundingBox"},"Structs/BoundingBox.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BoundingBox"},"Structs/BoundingBox.html":{"name":"BoundingBox","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-5\"\u003ebounding box\u003c/a\u003e indicates the extremes of a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/GeoJSONObject.html\"\u003eGeoJSONObject\u003c/a\u003e\u003c/code\u003e along the x- and y-axes (longitude and latitude, respectively).\u003c/p\u003e"},"Structs/LocationCoordinate2D.html":{"name":"LocationCoordinate2D","abstract":"\u003cp\u003eA geographic coordinate with its components measured in degrees.\u003c/p\u003e"},"Structs/Feature.html":{"name":"Feature","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.2\"\u003eFeature object\u003c/a\u003e represents a spatially bounded thing.\u003c/p\u003e"},"Structs/FeatureCollection.html":{"name":"FeatureCollection","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.3\"\u003eFeatureCollection object\u003c/a\u003e is a collection of Feature objects.\u003c/p\u003e"},"Structs/GeometryCollection.html":{"name":"GeometryCollection","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.8\"\u003eGeometryCollection geometry\u003c/a\u003e is a heterogeneous collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/Geometry.html\"\u003eGeometry\u003c/a\u003e\u003c/code\u003e objects that are related.\u003c/p\u003e"},"Structs/LineString.html":{"name":"LineString","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.4\"\u003eLineString geometry\u003c/a\u003e is a collection of two or more positions, each position connected to the next position linearly.\u003c/p\u003e"},"Structs/MultiLineString.html":{"name":"MultiLineString","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.5\"\u003eMultiLineString geometry\u003c/a\u003e is a collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/LineString.html\"\u003eLineString\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e"},"Structs/MultiPoint.html":{"name":"MultiPoint","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.3\"\u003eMultiPoint geometry\u003c/a\u003e represents a collection of disconnected but related positions.\u003c/p\u003e"},"Structs/MultiPolygon.html":{"name":"MultiPolygon","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.7\"\u003eMultiPolygon geometry\u003c/a\u003e is a collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Polygon.html\"\u003ePolygon\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e"},"Structs/Point.html":{"name":"Point","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.2\"\u003ePoint geometry\u003c/a\u003e represents a single position.\u003c/p\u003e"},"Structs/Polygon.html":{"name":"Polygon","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6\"\u003ePolygon geometry\u003c/a\u003e is conceptually a collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Ring.html\"\u003eRing\u003c/a\u003e\u003c/code\u003es that form a single connected geometry.\u003c/p\u003e"},"Structs/RadianCoordinate2D.html":{"name":"RadianCoordinate2D","abstract":"\u003cp\u003eA coordinate pair measured in radians, as opposed to \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbTypealiases.html#/s:4Turf20LocationCoordinate2Da\"\u003eLocationCoordinate2D\u003c/a\u003e\u003c/code\u003e, which is measured in degrees of arc.\u003c/p\u003e"},"Structs/Ring.html":{"name":"Ring","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6\"\u003elinear ring\u003c/a\u003e is a closed figure bounded by three or more straight line segments.\u003c/p\u003e"},"Protocols/WKTConvertible.html#/s:4Turf14WKTConvertibleP3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"WKTConvertible"},"Protocols/WKTConvertible.html#/s:4Turf14WKTConvertibleP3wktxSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"WKTConvertible"},"Protocols/GeometryConvertible.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","abstract":"\u003cp\u003eThe instance wrapped in a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/Geometry.html\"\u003eGeometry\u003c/a\u003e\u003c/code\u003e instance.\u003c/p\u003e","parent_name":"GeometryConvertible"},"Protocols/ForeignMemberContainer.html#/s:4Turf22ForeignMemberContainerP14foreignMembersSDySSAA9JSONValueOSgGvp":{"name":"foreignMembers","abstract":"\u003cp\u003e\u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-6.1\"\u003eForeign members\u003c/a\u003e to round-trip to JSON.\u003c/p\u003e","parent_name":"ForeignMemberContainer"},"Protocols/GeoJSONObjectConvertible.html#/s:4Turf24GeoJSONObjectConvertibleP03geoC0AA0bC0Ovp":{"name":"geoJSONObject","abstract":"\u003cp\u003eThe instance wrapped in a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/GeoJSONObject.html\"\u003eGeoJSONObject\u003c/a\u003e\u003c/code\u003e instance.\u003c/p\u003e","parent_name":"GeoJSONObjectConvertible"},"Protocols/GeoJSONObjectConvertible.html":{"name":"GeoJSONObjectConvertible","abstract":"\u003cp\u003eA type that can be represented as a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/GeoJSONObject.html\"\u003eGeoJSONObject\u003c/a\u003e\u003c/code\u003e instance.\u003c/p\u003e"},"Protocols/ForeignMemberContainer.html":{"name":"ForeignMemberContainer","abstract":"\u003cp\u003eA GeoJSON object that can contain \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-6.1\"\u003eforeign members\u003c/a\u003e in arbitrary keys.\u003c/p\u003e"},"Protocols/GeometryConvertible.html":{"name":"GeometryConvertible","abstract":"\u003cp\u003eA type that can be represented as a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbEnums/Geometry.html\"\u003eGeometry\u003c/a\u003e\u003c/code\u003e instance.\u003c/p\u003e"},"Protocols/WKTConvertible.html":{"name":"WKTConvertible","abstract":"\u003cp\u003eEntity which can be converted to and from \u0026lsquo;Well Known Text\u0026rsquo;.\u003c/p\u003e"},"Functions.html#/s:4Turf12intersectionySo22CLLocationCoordinate2DVSgAD_ADt_AD_ADttF":{"name":"intersection(_:_:)","abstract":"\u003cp\u003eReturns the intersection of two line segments.\u003c/p\u003e"},"Functions.html#/s:4Turf3midySo22CLLocationCoordinate2DVAD_ADtF":{"name":"mid(_:_:)","abstract":"\u003cp\u003eReturns the point midway between two coordinates measured in degrees.\u003c/p\u003e"},"Extensions/JSONObject.html#/s:SD4TurfSSRszAA9JSONValueOSgRs_rlE0A8RawValuea":{"name":"TurfRawValue","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONObject"},"Extensions/JSONObject.html#/s:SD4TurfSSRszAA9JSONValueOSgRs_rlE12turfRawValueSDySSADGSgSDySSypSgG_tcfc":{"name":"init(turfRawValue:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONObject"},"Extensions/JSONObject.html#/s:SD4TurfSSRszAA9JSONValueOSgRs_rlE12turfRawValueSDySSypSgGvp":{"name":"turfRawValue","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONObject"},"Extensions/JSONArray.html#/s:Sa4TurfAA9JSONValueOSgRszlE0A8RawValuea":{"name":"TurfRawValue","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONArray"},"Extensions/JSONArray.html#/s:Sa4TurfAA9JSONValueOSgRszlE12turfRawValueSayADGSgSayypSgG_tcfc":{"name":"init(turfRawValue:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONArray"},"Extensions/JSONArray.html#/s:Sa4TurfAA9JSONValueOSgRszlE12turfRawValueSayypSgGvp":{"name":"turfRawValue","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"JSONArray"},"Extensions/CodingUserInfoKey.html#/s:s17CodingUserInfoKeyV4TurfE22includesForeignMembersABvpZ":{"name":"includesForeignMembers","abstract":"\u003cp\u003eIndicates if coding of foreign members is enabled.\u003c/p\u003e","parent_name":"CodingUserInfoKey"},"Extensions/LocationCoordinate2D.html#/s:So22CLLocationCoordinate2DV4TurfEyAbC06RadianB1DVcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInstantiates a LocationCoordinate2D from a RadianCoordinate2D\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Extensions/LocationCoordinate2D.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"LocationCoordinate2D"},"Extensions/LocationCoordinate2D.html#/s:So22CLLocationCoordinate2DV4TurfE9direction2toSdAB_tF":{"name":"direction(to:)","abstract":"\u003cp\u003eReturns the direction from the receiver to the given coordinate.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Extensions/LocationCoordinate2D.html#/s:So22CLLocationCoordinate2DV4TurfE10coordinate2at6facingABSd_SdtF":{"name":"coordinate(at:facing:)","abstract":"\u003cp\u003eReturns a coordinate a certain Haversine distance away in the given direction.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Extensions/LocationCoordinate2D.html#/s:So22CLLocationCoordinate2DV4TurfE10coordinate2at6facingABSd_10Foundation11MeasurementVySo11NSUnitAngleCGtF":{"name":"coordinate(at:facing:)","abstract":"\u003cp\u003eReturns a coordinate a certain Haversine distance away in the given direction.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Extensions/LocationCoordinate2D.html#/s:So22CLLocationCoordinate2DV4TurfE8distance2toSdAB_tF":{"name":"distance(to:)","abstract":"\u003cp\u003eReturns the Haversine distance between two coordinates measured in degrees.\u003c/p\u003e","parent_name":"LocationCoordinate2D"},"Extensions/LocationDegrees.html#/s:Sd4TurfE9toRadiansSdyF":{"name":"toRadians()","abstract":"\u003cp\u003eReturns the direction in radians.\u003c/p\u003e","parent_name":"LocationDegrees"},"Extensions/LocationDegrees.html#/s:Sd4TurfE9toDegreesSdyF":{"name":"toDegrees()","abstract":"\u003cp\u003eReturns the direction in degrees.\u003c/p\u003e","parent_name":"LocationDegrees"},"Extensions/LocationDirection.html#/s:Sd4TurfE4wrap3min3maxS2d_SdtF":{"name":"wrap(min:max:)","abstract":"\u003cp\u003eReturns a normalized number given min and max bounds.\u003c/p\u003e","parent_name":"LocationDirection"},"Extensions/LocationDirection.html#/s:Sd4TurfE10difference4fromS2d_tF":{"name":"difference(from:)","abstract":"\u003cp\u003eReturns the smaller difference between the receiver and another direction.\u003c/p\u003e","parent_name":"LocationDirection"},"Extensions.html#/CharacterSet":{"name":"CharacterSet"},"Extensions/LocationDirection.html":{"name":"LocationDirection"},"Extensions/LocationDegrees.html":{"name":"LocationDegrees"},"Extensions/LocationCoordinate2D.html":{"name":"LocationCoordinate2D"},"Extensions/CodingUserInfoKey.html":{"name":"CodingUserInfoKey","abstract":"\u003cp\u003eKey to pass to populate a \u003ccode\u003euserInfo\u003c/code\u003e dictionary, which is passed to the \u003ccode\u003eJSONDecoder\u003c/code\u003e or \u003ccode\u003eJSONEncoder\u003c/code\u003e to enable processing foreign members.\u003c/p\u003e"},"Extensions/JSONArray.html":{"name":"JSONArray"},"Extensions/JSONObject.html":{"name":"JSONObject"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6stringyACSScACmF":{"name":"string(_:)","abstract":"\u003cp\u003eA string.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6numberyACSdcACmF":{"name":"number(_:)","abstract":"\u003cp\u003eA floating-point number.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO7booleanyACSbcACmF":{"name":"boolean(_:)","abstract":"\u003cp\u003eA Boolean value.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO5arrayyACSayACSgGcACmF":{"name":"array(_:)","abstract":"\u003cp\u003eA heterogeneous array of JSON values and \u003ccode\u003enull\u003c/code\u003e values.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6objectyACSDySSACSgGcACmF":{"name":"object(_:)","abstract":"\u003cp\u003eAn object containing JSON values and \u003ccode\u003enull\u003c/code\u003e values keyed by strings.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACSScfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given string.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACxcSzRzlufc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given integer.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACxcSBRzlufc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given floating-point number.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACSbcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given Boolean value.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACSayACSgGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given JSON array.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueOyACSDySSACSgGcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a JSON value representing the given JSON object.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6stringSSSgvp":{"name":"string","abstract":"\u003cp\u003eA string value, if the JSON value represents a string.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6numberSdSgvp":{"name":"number","abstract":"\u003cp\u003eA floating-point number value, if the JSON value represents a number.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO7booleanSbSgvp":{"name":"boolean","abstract":"\u003cp\u003eA Boolean value, if the JSON value represents a Boolean.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO5arraySayACSgGSgvp":{"name":"array","abstract":"\u003cp\u003eAn array of JSON values, if the JSON value represents an array.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:4Turf9JSONValueO6objectSDySSACSgGSgvp":{"name":"object","abstract":"\u003cp\u003eAn object containing JSON values keyed by strings, if the JSON value represents an object.\u003c/p\u003e","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:SY8RawValueQa":{"name":"RawValue","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","abstract":"\u003cp\u003eThis branch must happen after the \u003ccode\u003eNSNumber\u003c/code\u003e branch","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s27ExpressibleByIntegerLiteralP07integerD0x0cD4TypeQz_tcfc":{"name":"init(integerLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s25ExpressibleByFloatLiteralP05floatD0x0cD4TypeQz_tcfc":{"name":"init(floatLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s25ExpressibleByArrayLiteralP0cD7ElementQa":{"name":"ArrayLiteralElement","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s25ExpressibleByArrayLiteralP05arrayD0x0cD7ElementQzd_tcfc":{"name":"init(arrayLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s30ExpressibleByDictionaryLiteralP3KeyQa":{"name":"Key","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s30ExpressibleByDictionaryLiteralP5ValueQa":{"name":"Value","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:s30ExpressibleByDictionaryLiteralP010dictionaryD0x3KeyQz_5ValueQztd_tcfc":{"name":"init(dictionaryLiteral:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"JSONValue"},"Enums/JSONValue.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"JSONValue"},"Enums/Geometry.html#/s:4Turf8GeometryO5pointyAcA5PointVcACmF":{"name":"point(_:)","abstract":"\u003cp\u003eA single position.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO10lineStringyAcA04LineD0VcACmF":{"name":"lineString(_:)","abstract":"\u003cp\u003eA collection of two or more positions, each position connected to the next position linearly.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO7polygonyAcA7PolygonVcACmF":{"name":"polygon(_:)","abstract":"\u003cp\u003eConceptually, a collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Ring.html\"\u003eRing\u003c/a\u003e\u003c/code\u003es that form a single connected geometry.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO10multiPointyAcA05MultiD0VcACmF":{"name":"multiPoint(_:)","abstract":"\u003cp\u003eA collection of positions that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO15multiLineStringyAcA05MultidE0VcACmF":{"name":"multiLineString(_:)","abstract":"\u003cp\u003eA collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/LineString.html\"\u003eLineString\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO12multiPolygonyAcA05MultiD0VcACmF":{"name":"multiPolygon(_:)","abstract":"\u003cp\u003eA collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Polygon.html\"\u003ePolygon\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO18geometryCollectionyAcA0bD0VcACmF":{"name":"geometryCollection(_:)","abstract":"\u003cp\u003eA heterogeneous collection of geometries that are related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryOyAcA0B11Convertible_pcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a geometry representing the given geometry–convertible instance.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf24GeoJSONObjectConvertibleP03geoC0AA0bC0Ovp":{"name":"geoJSONObject","parent_name":"Geometry"},"Enums/Geometry.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Geometry"},"Enums/Geometry.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO5pointAA5PointVSgvp":{"name":"point","abstract":"\u003cp\u003eA single position.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO10lineStringAA04LineD0VSgvp":{"name":"lineString","abstract":"\u003cp\u003eA collection of two or more positions, each position connected to the next position linearly.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO7polygonAA7PolygonVSgvp":{"name":"polygon","abstract":"\u003cp\u003eConceptually, a collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Ring.html\"\u003eRing\u003c/a\u003e\u003c/code\u003es that form a single connected geometry.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO10multiPointAA05MultiD0VSgvp":{"name":"multiPoint","abstract":"\u003cp\u003eA collection of positions that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO15multiLineStringAA05MultidE0VSgvp":{"name":"multiLineString","abstract":"\u003cp\u003eA collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/LineString.html\"\u003eLineString\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO12multiPolygonAA05MultiD0VSgvp":{"name":"multiPolygon","abstract":"\u003cp\u003eA collection of \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Polygon.html\"\u003ePolygon\u003c/a\u003e\u003c/code\u003e geometries that are disconnected but related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO18geometryCollectionAA0bD0VSgvp":{"name":"geometryCollection","abstract":"\u003cp\u003eA heterogeneous collection of geometries that are related.\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf19GeometryConvertibleP8geometryAA0B0Ovp":{"name":"geometry","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO3wktSSvp":{"name":"wkt","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Geometry"},"Enums/Geometry.html#/s:4Turf8GeometryO3wktACSS_tKcfc":{"name":"init(wkt:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Geometry"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO8geometryyAcA8GeometryOcACmF":{"name":"geometry(_:)","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1\"\u003eGeometry object\u003c/a\u003e represents points, curves, and surfaces in coordinate space.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO7featureyAcA7FeatureVcACmF":{"name":"feature(_:)","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.2\"\u003eFeature object\u003c/a\u003e represents a spatially bounded thing.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO17featureCollectionyAcA07FeatureE0VcACmF":{"name":"featureCollection(_:)","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.3\"\u003eFeatureCollection object\u003c/a\u003e is a collection of Feature objects.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectOyAcA0bC11Convertible_pcfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a GeoJSON object representing the given GeoJSON object–convertible instance.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO8geometryAA8GeometryOSgvp":{"name":"geometry","abstract":"\u003cp\u003eA geometry object.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO7featureAA7FeatureVSgvp":{"name":"feature","abstract":"\u003cp\u003eA feature object.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf13GeoJSONObjectO17featureCollectionAA07FeatureE0VSgvp":{"name":"featureCollection","abstract":"\u003cp\u003eA feature collection object.\u003c/p\u003e","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"GeoJSONObject"},"Enums/GeoJSONObject.html#/s:4Turf24GeoJSONObjectConvertibleP03geoC0AA0bC0Ovp":{"name":"geoJSONObject","parent_name":"GeoJSONObject"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierO6stringyACSScACmF":{"name":"string(_:)","abstract":"\u003cp\u003eA string.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierO6numberyACSdcACmF":{"name":"number(_:)","abstract":"\u003cp\u003eA floating-point number.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierOyACSScfc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a feature identifier representing the given string.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierOyACxcSzRzlufc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a feature identifier representing the given integer.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierOyACxcSBRzlufc":{"name":"init(_:)","abstract":"\u003cp\u003eInitializes a feature identifier representing the given floating-point number.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:SY8RawValueQa":{"name":"RawValue","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierO6stringSSSgvp":{"name":"string","abstract":"\u003cp\u003eA string.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:4Turf17FeatureIdentifierO6numberSdSgvp":{"name":"number","abstract":"\u003cp\u003eA floating-point number.\u003c/p\u003e","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:s27ExpressibleByIntegerLiteralP07integerD0x0cD4TypeQz_tcfc":{"name":"init(integerLiteral:)","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:s25ExpressibleByFloatLiteralP05floatD0x0cD4TypeQz_tcfc":{"name":"init(floatLiteral:)","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"FeatureIdentifier"},"Enums/FeatureIdentifier.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"FeatureIdentifier"},"Enums/Consumer/Error/Kind.html#/s:4Turf8ConsumerO5ErrorV4KindO8expectedyAGyx__GACyxGcAImSHRzs8SendableRzlF":{"name":"expected(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Kind"},"Enums/Consumer/Error/Kind.html#/s:4Turf8ConsumerO5ErrorV4KindO15unexpectedTokenyAGyx__GAImSHRzs8SendableRzlF":{"name":"unexpectedToken","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Kind"},"Enums/Consumer/Error/Kind.html#/s:4Turf8ConsumerO5ErrorV4KindO6customyAGyx__GsAD_pcAImSHRzs8SendableRzlF":{"name":"custom(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Kind"},"Enums/Consumer/Error/Kind.html":{"name":"Kind","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Error"},"Enums/Consumer/Error.html#/s:4Turf8ConsumerO5ErrorV4kindAE4KindOyx__Gvp":{"name":"kind","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Error"},"Enums/Consumer/Error.html#/s:4Turf8ConsumerO5ErrorV8locationAC8LocationVyx_GSgvp":{"name":"location","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Error"},"Enums/Consumer/Error.html#/s:4Turf8ConsumerO5ErrorV9remainingSs17UnicodeScalarViewVSgvp":{"name":"remaining","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Error"},"Enums/Consumer/Error.html#/s:4Turf8ConsumerO5ErrorV11descriptionSSvp":{"name":"description","abstract":"\u003cp\u003eHuman-readable error description\u003c/p\u003e","parent_name":"Error"},"Enums/Consumer/Charset.html#/s:4Turf8ConsumerO7CharsetV6rangesSaySNys6UInt32VGGvp":{"name":"ranges","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Charset"},"Enums/Consumer/Match.html#/s:4Turf8ConsumerO5MatchO5tokenyAEyx_GSS_AC8LocationVyx_GtcAGmSHRzs8SendableRzlF":{"name":"token(_:_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Match"},"Enums/Consumer/Match.html#/s:4Turf8ConsumerO5MatchO4nodeyAEyx_GxSg_SayAGGtcAGmSHRzs8SendableRzlF":{"name":"node(_:_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Match"},"Enums/Consumer/Match.html#/s:4Turf8ConsumerO5MatchO8locationAC8LocationVyx_GSgvp":{"name":"location","abstract":"\u003cp\u003eThe location of the match in the original source (if known)\u003c/p\u003e","parent_name":"Match"},"Enums/Consumer/Match.html#/s:4Turf8ConsumerO5MatchO9transformys8Sendable_pSgAHx_SaysAG_pGtKXEKF":{"name":"transform(_:)","abstract":"\u003cp\u003eTransform generic AST to application-specific form\u003c/p\u003e","parent_name":"Match"},"Enums/Consumer/Match.html#/s:4Turf8ConsumerO5MatchO11descriptionSSvp":{"name":"description","abstract":"\u003cp\u003eLisp-like description of the AST\u003c/p\u003e","parent_name":"Match"},"Enums/Consumer/Location.html#/s:4Turf8ConsumerO8LocationV5rangeSnySS5IndexVGvp":{"name":"range","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Location"},"Enums/Consumer/Location.html#/s:4Turf8ConsumerO8LocationV6offsetSi4line_Si6columntvp":{"name":"offset","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Location"},"Enums/Consumer/Location.html#/s:4Turf8ConsumerO8LocationV11descriptionSSvp":{"name":"description","abstract":"\u003cp\u003eHuman-readable description of the location\u003c/p\u003e","parent_name":"Location"},"Enums/Consumer/Location.html#/s:4Turf8ConsumerO8LocationV2eeoiySbAEyx_G_AGtFZ":{"name":"==(_:_:)","abstract":"\u003cp\u003eEquatable implementation\u003c/p\u003e","parent_name":"Location"},"Enums/Consumer/Location.html#/s:4Turf8ConsumerO8LocationV2atyAEyx_GSnySiGFZ":{"name":"at(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Location"},"Enums/Consumer.html#/s:4Turf8ConsumerO6stringyACyxGSScAEmSHRzs8SendableRzlF":{"name":"string(_:)","abstract":"\u003cp\u003ePrimitives\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO7charsetyACyxGAC7CharsetVyx_GcAEmSHRzs8SendableRzlF":{"name":"charset(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO3anyyACyxGSayAEGcAEmSHRzs8SendableRzlF":{"name":"any(_:)","abstract":"\u003cp\u003eCombinators\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO8sequenceyACyxGSayAEGcAEmSHRzs8SendableRzlF":{"name":"sequence(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO8optionalyACyxGAEcAEmSHRzs8SendableRzlF":{"name":"optional(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9oneOrMoreyACyxGAEcAEmSHRzs8SendableRzlF":{"name":"oneOrMore(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO3notyACyxGAEcAEmSHRzs8SendableRzlF":{"name":"not(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO7flattenyACyxGAEcAEmSHRzs8SendableRzlF":{"name":"flatten(_:)","abstract":"\u003cp\u003eTransforms\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO7discardyACyxGAEcAEmSHRzs8SendableRzlF":{"name":"discard(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO7replaceyACyxGAE_SStcAEmSHRzs8SendableRzlF":{"name":"replace(_:_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO5labelyACyxGx_AEtcAEmSHRzs8SendableRzlF":{"name":"label(_:_:)","abstract":"\u003cp\u003eReferences\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9referenceyACyxGxcAEmSHRzs8SendableRzlF":{"name":"reference(_:)","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO5matchyAC5MatchOyx_GSSKF":{"name":"match(_:)","abstract":"\u003cp\u003eParse input and return matched result\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO10isOptionalSbvp":{"name":"isOptional","abstract":"\u003cp\u003eWill the consumer match empty input?\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer/Location.html":{"name":"Location","abstract":"\u003cp\u003eSource location\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer/Match.html":{"name":"Match","abstract":"\u003cp\u003eAbstract syntax tree returned by consumer\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer/Charset.html":{"name":"Charset","abstract":"\u003cp\u003eOpaque type used for efficient character matching\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9Transforma":{"name":"Transform","abstract":"\u003cp\u003eClosure for transforming a Match to an application-specific data type\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer/Error.html":{"name":"Error","abstract":"\u003cp\u003eA Parsing error\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO13stringLiteralACyxGSS_tcfc":{"name":"init(stringLiteral:)","abstract":"\u003cp\u003eCreate .string() consumer from a string literal\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO12arrayLiteralACyxGAEd_tcfc":{"name":"init(arrayLiteral:)","abstract":"\u003cp\u003eCreate .sequence() consumer from an array literal\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO1ooiyACyxGAE_AEtFZ":{"name":"|(_:_:)","abstract":"\u003cp\u003eConverts two consumers into an .any() consumer\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9characteryACyxGs7UnicodeO6ScalarVFZ":{"name":"character(_:)","abstract":"\u003cp\u003eMatch a character\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9character2inACyxGSNys7UnicodeO6ScalarVG_tFZ":{"name":"character(in:)","abstract":"\u003cp\u003eMatch character in range\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9character2inACyxGSS_tFZ":{"name":"character(in:)","abstract":"\u003cp\u003eMatch character in string\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO9character2inACyxG10Foundation12CharacterSetV_tFZ":{"name":"character(in:)","abstract":"\u003cp\u003eMatch character in set\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO12anyCharacter6exceptACyxGs7UnicodeO6ScalarVd_tFZ":{"name":"anyCharacter(except:)","abstract":"\u003cp\u003eMatch any character except the one(s) specified\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO12anyCharacter6exceptACyxG10Foundation0D3SetV_tFZ":{"name":"anyCharacter(except:)","abstract":"\u003cp\u003eMatch any character except the specified set\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO10zeroOrMoreyACyxGAEFZ":{"name":"zeroOrMore(_:)","abstract":"\u003cp\u003eMatches a list of zero or more \u003ccode\u003econsumer\u003c/code\u003e instances\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO11interleavedyACyxGAE_AEtFZ":{"name":"interleaved(_:_:)","abstract":"\u003cp\u003eMatches one or more \u003ccode\u003econsumer\u003c/code\u003e instances, separated by an instance of \u003ccode\u003eseparator\u003c/code\u003e","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO6ignore_2inACyxGAF_AFtFZ":{"name":"ignore(_:in:)","abstract":"\u003cp\u003eMatches the \u003ccode\u003etarget\u003c/code\u003e consumer, ignoring any instances of the \u003ccode\u003eignored\u003c/code\u003e consumer","parent_name":"Consumer"},"Enums/Consumer.html#/s:4Turf8ConsumerO11descriptionSSvp":{"name":"description","abstract":"\u003cp\u003eHuman-readable description of what consumer matches\u003c/p\u003e","parent_name":"Consumer"},"Enums/Consumer.html":{"name":"Consumer","abstract":"\u003cp\u003eUndocumented\u003c/p\u003e"},"Enums/FeatureIdentifier.html":{"name":"FeatureIdentifier","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.2\"\u003efeature identifier\u003c/a\u003e identifies a \u003ccode\u003e\u003ca href=\"36f8f5912051ae747ef441d6511ca4cbStructs/Feature.html\"\u003eFeature\u003c/a\u003e\u003c/code\u003e object.\u003c/p\u003e"},"Enums/GeoJSONObject.html":{"name":"GeoJSONObject","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3\"\u003eGeoJSON object\u003c/a\u003e represents a Geometry, Feature, or collection of Features.\u003c/p\u003e"},"Enums/Geometry.html":{"name":"Geometry","abstract":"\u003cp\u003eA \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1\"\u003eGeometry object\u003c/a\u003e represents points, curves, and surfaces in coordinate space. Use an instance of this enumeration whenever a value could be any kind of Geometry object.\u003c/p\u003e"},"Enums/JSONValue.html":{"name":"JSONValue","abstract":"\u003cp\u003eA JSON value represents an object, array, or fragment.\u003c/p\u003e"},"Enums.html":{"name":"Enumerations","abstract":"\u003cp\u003eThe following enumerations are available globally.\u003c/p\u003e"},"Extensions.html":{"name":"Extensions","abstract":"\u003cp\u003eThe following extensions are available globally.\u003c/p\u003e"},"Functions.html":{"name":"Functions","abstract":"\u003cp\u003eThe following functions are available globally.\u003c/p\u003e"},"Protocols.html":{"name":"Protocols","abstract":"\u003cp\u003eThe following protocols are available globally.\u003c/p\u003e"},"Structs.html":{"name":"Structures","abstract":"\u003cp\u003eThe following structures are available globally.\u003c/p\u003e"},"Typealiases.html":{"name":"Type Aliases","abstract":"\u003cp\u003eThe following type aliases are available globally.\u003c/p\u003e"}} \ No newline at end of file diff --git a/3.1.0/undocumented.json b/3.1.0/undocumented.json new file mode 100644 index 00000000..d854272f --- /dev/null +++ b/3.1.0/undocumented.json @@ -0,0 +1,362 @@ +{ + "warnings": [ + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 36, + "symbol": "Consumer", + "symbol_kind": "source.lang.swift.decl.enum", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 39, + "symbol": "Consumer.charset(_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 43, + "symbol": "Consumer.sequence(_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 44, + "symbol": "Consumer.optional(_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 45, + "symbol": "Consumer.oneOrMore(_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 46, + "symbol": "Consumer.not(_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 50, + "symbol": "Consumer.discard(_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 51, + "symbol": "Consumer.replace(_:_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 55, + "symbol": "Consumer.reference(_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 60, + "symbol": "Consumer", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 72, + "symbol": "Consumer.Location.range", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 73, + "symbol": "Consumer.Location.offset", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 78, + "symbol": "Consumer.Match.token(_:_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 79, + "symbol": "Consumer.Match.node(_:_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 101, + "symbol": "Consumer.Error.Kind", + "symbol_kind": "source.lang.swift.decl.enum", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 102, + "symbol": "Consumer.Error.Kind.expected(_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 103, + "symbol": "Consumer.Error.Kind.unexpectedToken", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 104, + "symbol": "Consumer.Error.Kind.custom(_:)", + "symbol_kind": "source.lang.swift.decl.enumelement", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 107, + "symbol": "Consumer.Error.kind", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 108, + "symbol": "Consumer.Error.location", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 109, + "symbol": "Consumer.Error.remaining", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 117, + "symbol": "Consumer", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 156, + "symbol": "Consumer", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 191, + "symbol": "Consumer", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 213, + "symbol": "Consumer", + "symbol_kind": "source.lang.swift.decl.extension", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 655, + "symbol": "Consumer.Location.at(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.static", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/Consumer/Consumer.swift", + "line": 687, + "symbol": "Consumer.Charset.ranges", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/JSON.swift", + "line": 181, + "symbol": "JSONArray.TurfRawValue", + "symbol_kind": "source.lang.swift.decl.typealias", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/JSON.swift", + "line": 183, + "symbol": "JSONArray.init(turfRawValue:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/JSON.swift", + "line": 187, + "symbol": "JSONArray.turfRawValue", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/JSON.swift", + "line": 198, + "symbol": "JSONObject.TurfRawValue", + "symbol_kind": "source.lang.swift.decl.typealias", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/JSON.swift", + "line": 200, + "symbol": "JSONObject.init(turfRawValue:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/JSON.swift", + "line": 204, + "symbol": "JSONObject.turfRawValue", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 7, + "symbol": "WKTConvertible.wkt", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 8, + "symbol": "WKTConvertible.init(wkt:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 12, + "symbol": "Point.wkt", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 16, + "symbol": "Point.init(wkt:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 22, + "symbol": "MultiPoint.wkt", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 26, + "symbol": "MultiPoint.init(wkt:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 32, + "symbol": "LineString.wkt", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 36, + "symbol": "LineString.init(wkt:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 42, + "symbol": "MultiLineString.wkt", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 46, + "symbol": "MultiLineString.init(wkt:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 52, + "symbol": "Polygon.wkt", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 56, + "symbol": "Polygon.init(wkt:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 62, + "symbol": "MultiPolygon.wkt", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 66, + "symbol": "MultiPolygon.init(wkt:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 72, + "symbol": "Geometry.wkt", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 91, + "symbol": "Geometry.init(wkt:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 98, + "symbol": "GeometryCollection.wkt", + "symbol_kind": "source.lang.swift.decl.var.instance", + "warning": "undocumented" + }, + { + "file": "/Users/aleks/Developer/turf-swift/Sources/Turf/WKT.swift", + "line": 120, + "symbol": "GeometryCollection.init(wkt:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + } + ], + "source_directory": "/Users/aleks/Developer/turf-swift" +} \ No newline at end of file diff --git a/index.html b/index.html index 4261b26e..1c51f3f5 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ - +