{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/jfK7C7JmdHGaVBsvt1V7/G0lF2a2mezep3QZSQZwm/DotLottie.js"],
  "sourcesContent": ["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport { addPropertyControls, ControlType, RenderTarget } from \"framer\";\nimport { useEffect, useRef, useState } from \"react\";\nconst placeholderUrl = \"https://lottie.host/d826e0a7-b7e8-4072-8afe-c943ed2dd2ca/DpX3m5yT5Z.lottie\"; /**\n                                                                                                     * DOT LOTTIE\n                                                                                                     *\n                                                                                                     * @framerIntrinsicWidth 200\n                                                                                                     * @framerIntrinsicHeight 200\n                                                                                                     * @framerDisableUnlink\n                                                                                                     *\n                                                                                                     * @framerSupportedLayoutWidth fixed\n                                                                                                     * @framerSupportedLayoutHeight any-prefer-fixed\n                                                                                                     */\nexport default function DotLottie(props) {\n  return /*#__PURE__*/_jsx(OptimizationFriendly, {\n    loading: /*#__PURE__*/_jsx(\"div\", {}),\n    loaded: /*#__PURE__*/_jsx(LottiePlayer, {\n      ...props\n    })\n  });\n}\n;\nfunction LottiePlayer(props) {\n  /* Checks */const isCanvas = RenderTarget.current() === RenderTarget.canvas;\n  const lottieInstanceRef = useRef(null);\n  const shouldPlay = isCanvas || props.hover === true || props.autoplay === false ? null : true; /* File or URL */\n  let src;\n  switch (props.srcType) {\n    case \"url\":\n      src = props.srcUrl;\n      break;\n    case \"file\":\n      src = props.srcFile;\n      break;\n    default:\n      src = placeholderUrl;\n      break;\n  } /* Progress */\n  const [isReady, setIsReady] = useState(false); /* For canvas states */\n  useEffect(() => {\n    if (!lottieInstanceRef.current) return;\n    lottieInstanceRef.current.addEventListener(\"ready\", () => setIsReady(true));\n  }, []);\n  useEffect(() => {\n    if (!lottieInstanceRef.current) return;\n    lottieInstanceRef.current.seek(`${props.progress}%`);\n  }, [isReady, props.progress]);\n  const lastVariant = useRef(); /* For component variant support */\n  useEffect(() => {\n    if (isCanvas) return;\n    if (lastVariant.current !== props.autoplay) {\n      if (!lottieInstanceRef.current) return;\n      if (props.autoplay === true) {\n        lottieInstanceRef.current.play();\n      }\n      if (props.autoplay === false) {\n        lottieInstanceRef.current.pause();\n      }\n    }\n    lastVariant.current = props.autoplay;\n  }, [props.autoplay]);\n  return (\n    // @ts-ignore\n    /*#__PURE__*/\n    _jsx(\"dotlottie-player\", {\n      src: src,\n      ref: lottieInstanceRef,\n      autoplay: shouldPlay,\n      loop: props.loop ? true : null,\n      hover: props.hover ? true : null,\n      controls: props.controls ? true : null,\n      background: props.background ? props.background : null,\n      speed: props.speed,\n      direction: props.direction,\n      style: {\n        ...props.style,\n        width: \"100%\",\n        height: \"100%\"\n      }\n    }, src)\n  );\n}\nDotLottie.defaultProps = {\n  srcUrl: placeholderUrl,\n  autoplay: true,\n  background: \"#05F\",\n  controls: false,\n  direction: 1,\n  hover: false,\n  loop: true,\n  speed: 1\n};\nDotLottie.displayName = \"Dot Lottie\";\naddPropertyControls(DotLottie, {\n  srcType: {\n    type: ControlType.Enum,\n    displaySegmentedControl: true,\n    title: \"Source\",\n    options: [\"url\", \"file\"],\n    optionTitles: [\"URL\", \"File\"]\n  },\n  srcUrl: {\n    type: ControlType.String,\n    title: \"Link\",\n    placeholder: \"../example.lottie\",\n    hidden: props => props.srcType === \"file\"\n  },\n  srcFile: {\n    type: ControlType.File,\n    title: \"File\",\n    allowedFileTypes: [\"lottie\", \"json\"],\n    hidden: props => props.srcType === \"url\"\n  },\n  autoplay: {\n    type: ControlType.Boolean,\n    title: \"Autoplay\",\n    defaultValue: true\n  },\n  background: {\n    type: ControlType.Color,\n    title: \"Backdrop\",\n    defaultValue: \"#05F\"\n  },\n  controls: {\n    type: ControlType.Boolean,\n    title: \"Controls\"\n  },\n  direction: {\n    type: ControlType.Enum,\n    title: \"Direction\",\n    defaultValue: \"1\",\n    displaySegmentedControl: true,\n    segmentedControlDirection: \"horizontal\",\n    options: [\"1\", \"-1\"],\n    optionTitles: [\"Normal\", \"Reverse\"]\n  },\n  hover: {\n    type: ControlType.Boolean,\n    title: \"Hover Play\"\n  },\n  loop: {\n    type: ControlType.Boolean,\n    title: \"Loop\"\n  },\n  speed: {\n    type: ControlType.Number,\n    title: \"Speed\",\n    defaultValue: 1,\n    min: 1,\n    max: 10,\n    unit: \"x\",\n    step: .5,\n    displayStepper: true\n  },\n  progress: {\n    type: ControlType.Number,\n    title: \"Progress\",\n    defaultValue: 0,\n    min: 0,\n    max: 100,\n    step: 1,\n    description: \"This component is made for Lottie files. [Learn more here](https://dotlottie.io/).\"\n  }\n}); /* For SSG */\nfunction OptimizationFriendly({\n  loading,\n  loaded\n}) {\n  const [isLoading, setLoading] = React.useState(true); // We can't load web-components in ssg on the server,\n  // so we defer rendering until we hit the client.\n  React.useEffect(() => {\n    import(\"https://unpkg.com/@dotlottie/player-component@1.3.2/dist/dotlottie-player.js\").then(() => {\n      setLoading(false);\n    });\n  }, []);\n  return isLoading ? loading : loaded;\n}\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"default\": {\n      \"type\": \"reactComponent\",\n      \"name\": \"DotLottie\",\n      \"slots\": [],\n      \"annotations\": {\n        \"framerContractVersion\": \"1\",\n        \"framerIntrinsicWidth\": \"200\",\n        \"framerIntrinsicHeight\": \"200\",\n        \"framerSupportedLayoutHeight\": \"any-prefer-fixed\",\n        \"framerDisableUnlink\": \"*\",\n        \"framerSupportedLayoutWidth\": \"fixed\"\n      }\n    },\n    \"__FramerMetadata__\": {\n      \"type\": \"variable\"\n    }\n  }\n};\n//# sourceMappingURL=./DotLottie.map"],
  "mappings": "8JAAAA,IAIA,IAAMC,EAAiB,6EAUR,SAARC,EAA2BC,EAAO,CACvC,OAAoBC,EAAKC,EAAsB,CAC7C,QAAsBD,EAAK,MAAO,CAAC,CAAC,EACpC,OAAqBA,EAAKE,EAAc,CACtC,GAAGH,CACL,CAAC,CACH,CAAC,CACH,CAEA,SAASG,EAAaH,EAAO,CACf,IAAMI,EAAWC,EAAa,QAAQ,IAAMA,EA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EAAG,CAAC,CAAC,EACED,EAAYF,EAAUC,CAC/B",
  "names": ["init_shims", "placeholderUrl", "DotLottie", "props", "p", "OptimizationFriendly", "LottiePlayer", "isCanvas", "RenderTarget", "lottieInstanceRef", "pe", "shouldPlay", "src", "isReady", "setIsReady", "ye", "ue", "lastVariant", "addPropertyControls", "ControlType", "loading", "loaded", "isLoading", "setLoading"]
}
