                 circleLayer.strokeEnd = 0.5
                 circleLayer.transform = CATransform3DIdentity
                 circleLayer.path = NSBezierPath(ovalIn: bounds.insetBy(dx: -CGFloat(i) * 10, dy: -CGFloat(i) * 10)).cgPath
-                
+
                 let rotatingAnimation = CAKeyframeAnimation(keyPath: "transform")
                 let maxAngle: CGFloat = i % 2 == 0 ? -6.28 : 6.28
                 rotatingAnimation.values = [

            break
        }
    }
    
    fileprivate func transformWithAngle(_ angle: CGFloat) -> NSValue {
        return NSValue(caTransform3D: CATransform3DMakeRotation(angle, 0, 0, 1))
    }
}

import Cocoa

open class LoadingIndicatorLayer: CALayer {
    public enum Status {
        case idle
        case hover
        case loading
    }
    
    fileprivate var circleLayers = [CAShapeLayer]()

    required public init?(coder aDecoder: NSCoder) {
        fatalError()
    }

    override init(layer: Any) {
        super.init(layer: layer)
    }

    public override init() {
        super.init()

        for _ in 0 ..< 3 {
            let circleLayer = CAShapeLayer()
            circleLayer.lineWidth = 10
