const animate = function(ks) {
  const tl = ks
    .animate(
      "#All",
      [
        {
          p: "mpath",
          t: [0, 1500],
          v: ["0%", "100%"],
          e: [[1, 0, 0, 0.6, 1], [0]],
          mp: "M305.8,-126.6L78.2,-426.6"
        },
        { p: "scaleX", t: [0, 1500], v: [1, 4.5], e: [[1, 0, 0, 0.6, 1], [0]] },
        { p: "scaleY", t: [0, 1500], v: [1, 4.5], e: [[1, 0, 0, 0.6, 1], [0]] }
      ],
      "#_a0",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "96%", "98%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M-71.8,24.9L78.1,-193.6L78,-199.1L78.1,-193.6"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [-430, -70, 290],
          e: [[0], [0], [0]]
        }
      ],
      "#_a1",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "94.9%", "97.4%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M-115,-4.9L83.4,-138.8L89.4,-136.4L83.4,-138.8"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [-346, 14, 374],
          e: [[0], [0], [0]]
        }
      ],
      "#_a2",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "95.4%", "97.7%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M-127.1,54.3L67.8,-167L73.8,-170.9L67.8,-167"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [-407, -47, 313],
          e: [[0], [0], [0]]
        }
      ],
      "#_a3",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "96%", "98%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M-153.6,109.9L87.1,-236.1L78.3,-236.3L87.1,-236.1"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [-288, 72, 432],
          e: [[0], [0], [0]]
        }
      ],
      "#_a4",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "97.4%", "98.7%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M-127.1,152.7L173.6,-96.9L168.6,-98.5L173.6,-96.9"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [-368, -8, 352],
          e: [[0], [0], [0]]
        }
      ],
      "#_a5",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "96%", "98%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M-166.8,196.1L61.4,-115.8L69.2,-117.8L61.4,-115.8"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [-201, 159, 519],
          e: [[0], [0], [0]]
        }
      ],
      "#_a6",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "95.8%", "97.9%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M-106,214.7L107.1,-73.1L100.4,-77.4L107.1,-73.1"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [-492, -132, 228],
          e: [[0], [0], [0]]
        }
      ],
      "#_a7",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "95.7%", "97.9%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M-60.7,267.1L77,-100.6L80.8,-92.6L77,-100.6"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [-397, -37, 323],
          e: [[0], [0], [0]]
        }
      ],
      "#_a8",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "98.4%", "99.2%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M-14.5,310.6L123.6,-100.2L124.8,-96.9L123.6,-100.2"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [-315, 45, 405],
          e: [[0], [0], [0]]
        }
      ],
      "#_a9",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "96%", "98%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M31.6,257.1L163.4,-131.3L155.2,-129.2L163.4,-131.3"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [-498, -138, 222],
          e: [[0], [0], [0]]
        }
      ],
      "#_a10",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "97.6%", "98.8%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M89.8,257.1L163.9,-197.6L158.3,-197.6L163.9,-197.6"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [-335, 25, 385],
          e: [[0], [0], [0]]
        }
      ],
      "#_a11",
      [
        {
          p: "mpath",
          t: [208, 2000, 3000, 4000],
          v: ["0%", "97.4%", "98.7%", "100%"],
          e: [
            [1, 0.2, 0.6, 0.4, 1],
            [1, 0.4, 0, 0.6, 1],
            [1, 0.4, 0, 0.6, 1],
            [0]
          ],
          mp: "M151.9,230.3L125.4,-215.8L131.1,-213.9L125.4,-215.8"
        },
        {
          p: "rotate",
          t: [0, 2000, 4000],
          v: [0, 360, 720],
          e: [[0], [0], [0]]
        }
      ],
      "#_a12",
      [
        {
          p: "mpath",
          t: [208, 2000],
          v: ["0%", "100%"],
          e: [[0], [0]],
          mp: "M127.6,199.2L109.2,-154.3"
        },
        { p: "rotate", t: [0, 2000], v: [-419, -59], e: [[0], [0]] }
      ],
      "#_a13",
      [
        {
          p: "mpath",
          t: [208, 2000],
          v: ["0%", "100%"],
          e: [[0], [0]],
          mp: "M151.2,75.9L108.5,-177.9"
        },
        { p: "rotate", t: [0, 2000], v: [-130, 230], e: [[0], [0]] }
      ],
      "#_a14",
      [
        {
          p: "mpath",
          t: [208, 2000],
          v: ["0%", "100%"],
          e: [[0], [0]],
          mp: "M151.3,143.1L131.1,-157.7"
        },
        { p: "rotate", t: [0, 2000], v: [-276, 84], e: [[0], [0]] }
      ],
      "#_a15",
      [
        {
          p: "mpath",
          t: [208, 2000],
          v: ["0%", "100%"],
          e: [[0], [0]],
          mp: "M85.9,0L118,-186.5"
        },
        { p: "rotate", t: [0, 2000], v: [-411, -51], e: [[0], [0]] }
      ],
      "#_a16",
      [
        {
          p: "mpath",
          t: [208, 2000],
          v: ["0%", "100%"],
          e: [[0], [0]],
          mp: "M16.2,13.6L93,-169.9"
        },
        { p: "rotate", t: [0, 2000], v: [-304, 56], e: [[0], [0]] }
      ],
      "#_a17",
      [
        {
          p: "mpath",
          t: [208, 2000],
          v: ["0%", "100%"],
          e: [[0], [0]],
          mp: "M99.1,47.7L137.2,-183.4"
        },
        { p: "rotate", t: [0, 2000], v: [-260, 100], e: [[0], [0]] }
      ],
      { autoremove: false, markers: { LoopStart: 2000 } }
    )
    .range(0, 4000);
  if (
    document.location.search
      .substr(1)
      .split("&")
      .indexOf("global=paused") >= 0
  )
    ks.globalPause();

  return tl;
};

module.exports = animate;
