{"version":3,"file":"autoworklet.js","names":[],"sources":["esm/worklets/autoworklet.js"],"sourcesContent":["const AUTOWORKLET_FUNCTION_ARGS = Object.assign(\n  /* @__PURE__ */ Object.create(null),\n  {\n    useFrameCallback: [0],\n    useAnimatedStyle: [0],\n    useAnimatedProps: [0],\n    createAnimatedPropAdapter: [0],\n    useDerivedValue: [0],\n    useAnimatedScrollHandler: [0],\n    useAnimatedGestureHandler: [0],\n    useAnimatedReaction: [0, 1],\n    withTiming: [2],\n    withSpring: [2],\n    withDecay: [1],\n    withRepeat: [3],\n    runOnUI: [0],\n    executeOnUIRuntimeSync: [0],\n    scheduleOnUI: [0],\n    runOnUISync: [0],\n    runOnUIAsync: [0],\n    runOnRuntime: [1],\n    runOnRuntimeSync: [1],\n    runOnRuntimeAsync: [1],\n    scheduleOnRuntime: [1],\n    runOnRuntimeSyncWithId: [1],\n    scheduleOnRuntimeWithId: [1],\n    useTapGesture: [0],\n    usePanGesture: [0],\n    usePinchGesture: [0],\n    useRotationGesture: [0],\n    useFlingGesture: [0],\n    useLongPressGesture: [0],\n    useNativeGesture: [0],\n    useManualGesture: [0],\n    useHoverGesture: [0]\n  }\n);\nconst GESTURE_BUILDER_METHODS = /* @__PURE__ */ new Set([\n  \"onBegin\",\n  \"onStart\",\n  \"onEnd\",\n  \"onFinalize\",\n  \"onUpdate\",\n  \"onChange\",\n  \"onTouchesDown\",\n  \"onTouchesMove\",\n  \"onTouchesUp\",\n  \"onTouchesCancelled\"\n]);\nconst GESTURE_KINDS = /* @__PURE__ */ new Set([\n  \"Tap\",\n  \"Pan\",\n  \"Pinch\",\n  \"Rotation\",\n  \"Fling\",\n  \"LongPress\",\n  \"ForceTouch\",\n  \"Native\",\n  \"Manual\",\n  \"Race\",\n  \"Simultaneous\",\n  \"Exclusive\",\n  \"Hover\"\n]);\nconst LAYOUT_ANIMATIONS = new Set(\n  `BounceIn BounceInDown BounceInLeft BounceInRight BounceInUp BounceOut BounceOutDown\n   BounceOutLeft BounceOutRight BounceOutUp FadeIn FadeInDown FadeInLeft FadeInRight FadeInUp\n   FadeOut FadeOutDown FadeOutLeft FadeOutRight FadeOutUp FlipInEasyX FlipInEasyY FlipInXDown\n   FlipInXUp FlipInYLeft FlipInYRight FlipOutEasyX FlipOutEasyY FlipOutXDown FlipOutXUp\n   FlipOutYLeft FlipOutYRight LightSpeedInLeft LightSpeedInRight LightSpeedOutLeft\n   LightSpeedOutRight PinwheelIn PinwheelOut RollInLeft RollInRight RollOutLeft RollOutRight\n   RotateInDownLeft RotateInDownRight RotateInUpLeft RotateInUpRight RotateOutDownLeft\n   RotateOutDownRight RotateOutUpLeft RotateOutUpRight SlideInDown SlideInLeft SlideInRight\n   SlideInUp SlideOutDown SlideOutLeft SlideOutRight SlideOutUp StretchInX StretchInY\n   StretchOutX StretchOutY ZoomIn ZoomInDown ZoomInEasyDown ZoomInEasyUp ZoomInLeft ZoomInRight\n   ZoomInRotate ZoomInUp ZoomOut ZoomOutDown ZoomOutEasyDown ZoomOutEasyUp ZoomOutLeft\n   ZoomOutRight ZoomOutRotate ZoomOutUp Layout LinearTransition SequencedTransition\n   FadingTransition JumpingTransition CurvedTransition EntryExitTransition`.split(/\\s+/)\n);\nconst LAYOUT_ANIMATION_CHAIN_METHODS = /* @__PURE__ */ new Set([\n  \"build\",\n  \"duration\",\n  \"delay\",\n  \"getDuration\",\n  \"randomDelay\",\n  \"getDelay\",\n  \"getDelayFunction\",\n  \"easing\",\n  \"rotate\",\n  \"springify\",\n  \"damping\",\n  \"mass\",\n  \"stiffness\",\n  \"overshootClamping\",\n  \"energyThreshold\",\n  \"restDisplacementThreshold\",\n  \"restSpeedThreshold\",\n  \"withInitialValues\",\n  \"getAnimationAndConfig\",\n  \"easingX\",\n  \"easingY\",\n  \"easingWidth\",\n  \"easingHeight\",\n  \"entering\",\n  \"exiting\",\n  \"reverse\"\n]);\nfunction isGestureObject(exp) {\n  return exp?.type === \"CallExpression\" && exp.callee?.type === \"MemberExpression\" && exp.callee.object?.type === \"Identifier\" && exp.callee.object.name === \"Gesture\" && exp.callee.property?.type === \"Identifier\" && GESTURE_KINDS.has(exp.callee.property.name);\n}\nfunction containsGestureObject(exp) {\n  if (isGestureObject(exp)) return true;\n  return exp?.type === \"CallExpression\" && exp.callee?.type === \"MemberExpression\" && containsGestureObject(exp.callee.object);\n}\nfunction isLayoutAnimationChain(exp) {\n  if (exp?.type === \"Identifier\" && LAYOUT_ANIMATIONS.has(exp.name)) return true;\n  if (exp?.type === \"NewExpression\" && exp.callee?.type === \"Identifier\" && LAYOUT_ANIMATIONS.has(exp.callee.name)) {\n    return true;\n  }\n  return exp?.type === \"CallExpression\" && exp.callee?.type === \"MemberExpression\" && exp.callee.property?.type === \"Identifier\" && LAYOUT_ANIMATION_CHAIN_METHODS.has(exp.callee.property.name) && isLayoutAnimationChain(exp.callee.object);\n}\nfunction isChainedCallback(callee) {\n  if (callee?.type !== \"MemberExpression\" || callee.property?.type !== \"Identifier\") {\n    return false;\n  }\n  const name = callee.property.name;\n  if (GESTURE_BUILDER_METHODS.has(name)) return containsGestureObject(callee.object);\n  if (name === \"withCallback\") return isLayoutAnimationChain(callee.object);\n  return false;\n}\nconst WORKLET_DIRECTIVES = [\n  \"worklet\",\n  \"no-worklet-closure\",\n  \"limit-init-data-hoisting\"\n];\nfunction statementDirective(stmt) {\n  if (!stmt || stmt.type !== \"ExpressionStatement\") return void 0;\n  if (typeof stmt.directive === \"string\") return stmt.directive;\n  if (stmt.expression?.type === \"Literal\" && typeof stmt.expression.value === \"string\") {\n    return stmt.expression.value;\n  }\n  return void 0;\n}\nfunction hasDirective(fnNode, directive) {\n  if (!fnNode || !fnNode.body) return false;\n  if (Array.isArray(fnNode.body.directives)) {\n    for (const d of fnNode.body.directives) {\n      if (d.directive === directive || d.value === directive) {\n        return true;\n      }\n    }\n  }\n  if (fnNode.body.type === \"BlockStatement\" && Array.isArray(fnNode.body.body)) {\n    for (const stmt of fnNode.body.body) {\n      const found = statementDirective(stmt);\n      if (found === void 0) break;\n      if (found === directive) return true;\n    }\n  }\n  return false;\n}\nfunction hasWorkletDirective(fnNode) {\n  return hasDirective(fnNode, \"worklet\");\n}\nfunction bodyStartAfterDirectives(fnNode, code) {\n  let start = fnNode.body.start + 1;\n  if (fnNode.body.type !== \"BlockStatement\" || !Array.isArray(fnNode.body.body))\n    return start;\n  for (const stmt of fnNode.body.body) {\n    const found = statementDirective(stmt);\n    if (found === void 0 || !WORKLET_DIRECTIVES.includes(found)) break;\n    start = stmt.end;\n    while (start < fnNode.body.end && (code[start] === \";\" || /\\s/.test(code[start]))) {\n      start++;\n    }\n  }\n  return start;\n}\nfunction findWorkletCandidates(program) {\n  const candidates = [];\n  const seenStarts = /* @__PURE__ */ new Set();\n  function addCandidate(candidate) {\n    const fnStart = candidate.fnNode.start;\n    if (seenStarts.has(fnStart)) return;\n    seenStarts.add(fnStart);\n    candidates.push(candidate);\n  }\n  function getCalleeName(callee) {\n    if (!callee) return null;\n    if (callee.type === \"Identifier\") {\n      return callee.name;\n    }\n    if (callee.type === \"MemberExpression\" && !callee.computed && callee.property?.type === \"Identifier\") {\n      return callee.property.name;\n    }\n    return null;\n  }\n  function walk(node, parent) {\n    if (!node || typeof node !== \"object\") return;\n    if (node.type === \"FunctionDeclaration\" || node.type === \"FunctionExpression\" || node.type === \"ArrowFunctionExpression\") {\n      if (hasWorkletDirective(node)) {\n        let kind = \"function_expression\";\n        if (node.type === \"FunctionDeclaration\") kind = \"function_declaration\";\n        else if (node.type === \"ArrowFunctionExpression\") kind = \"arrow_function\";\n        let name = node.id?.name;\n        if (!name && parent?.type === \"VariableDeclarator\" && parent.id?.name) {\n          name = parent.id.name;\n        }\n        addCandidate({\n          node,\n          fnNode: node,\n          kind,\n          name,\n          parent,\n          isAutoWorklet: false\n        });\n      }\n    } else if (node.type === \"Property\" && (node.method || node.value?.type === \"FunctionExpression\" || node.value?.type === \"ArrowFunctionExpression\")) {\n      const fn = node.value;\n      if (hasWorkletDirective(fn)) {\n        addCandidate({\n          node: node.method ? node : fn,\n          fnNode: fn,\n          kind: node.method ? \"object_method\" : fn.type === \"ArrowFunctionExpression\" ? \"arrow_function\" : \"function_expression\",\n          // only a method is named by its key, as upstream's plugin does: a\n          // property's function has no binding of that name, so naming it would\n          // shadow an outer binding it closes over with the worklet itself.\n          name: node.method ? node.key?.name : fn.id?.name,\n          parent,\n          isAutoWorklet: false\n        });\n      }\n    }\n    if (node.type === \"CallExpression\") {\n      const calleeName = getCalleeName(node.callee);\n      const argIndices = calleeName ? AUTOWORKLET_FUNCTION_ARGS[calleeName] : void 0;\n      const chained = !argIndices && isChainedCallback(node.callee);\n      const indices = argIndices ?? (chained ? node.arguments.map((_, i) => i) : void 0);\n      if (indices) {\n        for (const idx of indices) {\n          const arg = node.arguments[idx];\n          if (!arg) continue;\n          if (arg.type === \"ArrowFunctionExpression\" || arg.type === \"FunctionExpression\") {\n            let name = arg.id?.name;\n            if (!name && parent?.type === \"VariableDeclarator\" && parent.id?.name) {\n              name = parent.id.name;\n            }\n            addCandidate({\n              node: arg,\n              fnNode: arg,\n              kind: arg.type === \"ArrowFunctionExpression\" ? \"arrow_function\" : \"function_expression\",\n              name,\n              parent: node,\n              isAutoWorklet: true\n            });\n          } else if (arg.type === \"ObjectExpression\" && Array.isArray(arg.properties)) {\n            for (const prop of arg.properties) {\n              if (prop.type === \"Property\") {\n                if (prop.method) {\n                  addCandidate({\n                    node: prop,\n                    fnNode: prop.value,\n                    kind: \"object_method\",\n                    name: prop.key?.name,\n                    parent: arg,\n                    isAutoWorklet: true\n                  });\n                } else if (prop.value?.type === \"ArrowFunctionExpression\" || prop.value?.type === \"FunctionExpression\") {\n                  addCandidate({\n                    node: prop.value,\n                    fnNode: prop.value,\n                    kind: prop.value.type === \"ArrowFunctionExpression\" ? \"arrow_function\" : \"function_expression\",\n                    name: prop.value.id?.name,\n                    parent: prop,\n                    isAutoWorklet: true\n                  });\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n    for (const key of Object.keys(node)) {\n      if (key === \"start\" || key === \"end\" || key === \"loc\" || key === \"range\") continue;\n      const child = node[key];\n      if (Array.isArray(child)) {\n        for (const item of child) {\n          walk(item, node);\n        }\n      } else if (child && typeof child === \"object\") {\n        walk(child, node);\n      }\n    }\n  }\n  walk(program, null);\n  return candidates;\n}\nexport {\n  AUTOWORKLET_FUNCTION_ARGS,\n  GESTURE_BUILDER_METHODS,\n  WORKLET_DIRECTIVES,\n  bodyStartAfterDirectives,\n  findWorkletCandidates,\n  hasDirective,\n  hasWorkletDirective\n};\n//# sourceMappingURL=autoworklet.js.map\n"],"mappings":";AAAA,MAAM,4BAA4B,OAAO,OACvB,uBAAO,OAAO,IAAI,GAClC;CACE,kBAAkB,CAAC,CAAC;CACpB,kBAAkB,CAAC,CAAC;CACpB,kBAAkB,CAAC,CAAC;CACpB,2BAA2B,CAAC,CAAC;CAC7B,iBAAiB,CAAC,CAAC;CACnB,0BAA0B,CAAC,CAAC;CAC5B,2BAA2B,CAAC,CAAC;CAC7B,qBAAqB,CAAC,GAAG,CAAC;CAC1B,YAAY,CAAC,CAAC;CACd,YAAY,CAAC,CAAC;CACd,WAAW,CAAC,CAAC;CACb,YAAY,CAAC,CAAC;CACd,SAAS,CAAC,CAAC;CACX,wBAAwB,CAAC,CAAC;CAC1B,cAAc,CAAC,CAAC;CAChB,aAAa,CAAC,CAAC;CACf,cAAc,CAAC,CAAC;CAChB,cAAc,CAAC,CAAC;CAChB,kBAAkB,CAAC,CAAC;CACpB,mBAAmB,CAAC,CAAC;CACrB,mBAAmB,CAAC,CAAC;CACrB,wBAAwB,CAAC,CAAC;CAC1B,yBAAyB,CAAC,CAAC;CAC3B,eAAe,CAAC,CAAC;CACjB,eAAe,CAAC,CAAC;CACjB,iBAAiB,CAAC,CAAC;CACnB,oBAAoB,CAAC,CAAC;CACtB,iBAAiB,CAAC,CAAC;CACnB,qBAAqB,CAAC,CAAC;CACvB,kBAAkB,CAAC,CAAC;CACpB,kBAAkB,CAAC,CAAC;CACpB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