+
+
-
-
-
-
+
+
+
-
-
+
+ }).call(window, __hfScopedDocument, __hfScopedGsap, __hfScopedWindow, __hfScopedHyperframes);
+ } catch (_err) {
+ console.error(__hfErrorLabel, __hfCompId, _err);
+ }
+ };
+ __hfFindRoot();
+ __hfRun();
+})();
+;
+(function(){
+ var __hfCompId = "captions-comp";
+ var __hfTimelineCompId = "captions-comp";
+ var __hfErrorLabel = "[Compiler] Composition script failed";
+ var __hfAuthoredRootId = null;
+ var __hfAuthoredRootAttr = "data-hf-authored-id";
+ var __hfEscapeAttr = function(value) {
+ return (value + "").replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
+ };
+ var __hfRootSelector = "[data-composition-id=\"captions-comp\"]" || (__hfCompId
+ ? '[data-composition-id="' + __hfEscapeAttr(__hfCompId) + '"]'
+ : "");
+ var __hfRoot = null;
+ var __hfRootSelectorPattern = "\\[\\s*data-composition-id\\s*=\\s*(?:\"captions-comp\"|'captions-comp')\\s*\\]";
+ var __hfTimingSelectorPattern = "\\s*\\[\\s*data-(?:start|duration)\\s*=\\s*(?:\"[^\"]*\"|'[^']*')\\s*\\]";
+ var __hfAuthoredRootIdForms = [];
+ var __hfAuthoredRootSelector = __hfAuthoredRootId
+ ? "[" + __hfAuthoredRootAttr + '="' + __hfEscapeAttr(__hfAuthoredRootId) + '"]'
+ : "";
+ var __hfIsSelectorNameChar = function(char) {
+ return !!char && /[\w-]/.test(char);
+ };
+ var __hfReplaceAuthoredRootIdSelectors = function(selector) {
+ if (!__hfAuthoredRootSelector || !__hfAuthoredRootIdForms.length || typeof selector !== "string") {
+ return selector;
+ }
+ var result = "";
+ var bracketDepth = 0;
+ var quote = null;
+ for (var index = 0; index < selector.length; index += 1) {
+ var char = selector[index];
+ var previousChar = index > 0 ? selector[index - 1] : "";
+ if (quote) {
+ result += char;
+ if (char === quote && previousChar !== "\\") {
+ quote = null;
+ }
+ continue;
+ }
+ if (char === '"' || char === "'") {
+ quote = char;
+ result += char;
+ continue;
+ }
+ if (char === "[") {
+ bracketDepth += 1;
+ result += char;
+ continue;
+ }
+ if (char === "]") {
+ bracketDepth = Math.max(0, bracketDepth - 1);
+ result += char;
+ continue;
+ }
+ if (char === "#" && bracketDepth === 0) {
+ var matchedForm = null;
+ for (var formIndex = 0; formIndex < __hfAuthoredRootIdForms.length; formIndex += 1) {
+ var form = __hfAuthoredRootIdForms[formIndex];
+ if (selector.slice(index + 1, index + 1 + form.length) === form) {
+ matchedForm = form;
+ break;
+ }
+ }
+ if (matchedForm) {
+ var nextChar = selector[index + 1 + matchedForm.length];
+ if (!__hfIsSelectorNameChar(nextChar)) {
+ result += __hfAuthoredRootSelector;
+ index += matchedForm.length;
+ continue;
+ }
+ }
+ }
+ result += char;
+ }
+ return result;
+ };
+ var __hfNormalizeSelector = function(selector) {
+ if (!__hfCompId || typeof selector !== "string") return selector;
+ var normalized = selector
+ .replace(new RegExp(__hfRootSelectorPattern + '(?:' + __hfTimingSelectorPattern + ')+', 'g'), __hfRootSelector)
+ .replace(new RegExp('(?:' + __hfTimingSelectorPattern + ')+' + __hfRootSelectorPattern, 'g'), __hfRootSelector);
+ if (__hfAuthoredRootSelector) {
+ normalized = __hfReplaceAuthoredRootIdSelectors(normalized);
+ }
+ return normalized;
+ };
+ var __hfFindRoot = function() {
+ if (!__hfRoot && __hfRootSelector) {
+ __hfRoot = window.document.querySelector(__hfRootSelector);
+ }
+ return __hfRoot;
+ };
+ var __hfContains = function(node) {
+ var root = __hfFindRoot();
+ return !root || node === root || root.contains(node);
+ };
+ var __hfQueryAll = function(selector) {
+ var root = __hfFindRoot();
+ if (!root || typeof selector !== "string") {
+ return window.document.querySelectorAll(selector);
+ }
+ return Array.prototype.filter.call(window.document.querySelectorAll(__hfNormalizeSelector(selector)), function(node) {
+ return __hfContains(node);
+ });
+ };
+ var __hfQueryOne = function(selector) {
+ var matches = __hfQueryAll(selector);
+ return matches[0] || null;
+ };
+ var __hfGetElementById = function(id) {
+ var found = window.document.getElementById(id);
+ if (found && __hfContains(found)) return found;
+ var root = __hfFindRoot();
+ if (!root) return found || null;
+ var idValue = id + "";
+ if (__hfAuthoredRootId && __hfAuthoredRootId === idValue && root.getAttribute && root.getAttribute(__hfAuthoredRootAttr) === idValue) {
+ return root;
+ }
+ if (root.id === idValue) return root;
+ if (typeof root.querySelector !== "function") return null;
+ try {
+ var authoredRootMatch = root.querySelector('[' + __hfAuthoredRootAttr + '="' + __hfEscapeAttr(idValue) + '"]');
+ if (authoredRootMatch) return authoredRootMatch;
+ } catch {}
+ if (typeof CSS !== "undefined" && CSS && typeof CSS.escape === "function") {
+ try {
+ return root.querySelector("#" + CSS.escape(idValue)) || null;
+ } catch {}
+ }
+ try {
+ return root.querySelector('[id="' + __hfEscapeAttr(idValue) + '"]') || null;
+ } catch {}
+ return null;
+ };
+ var __hfScopedDocument = typeof Proxy === "function"
+ ? new Proxy(window.document, {
+ get: function(target, prop, receiver) {
+ if (prop === "querySelector") return __hfQueryOne;
+ if (prop === "querySelectorAll") return __hfQueryAll;
+ if (prop === "getElementById") return __hfGetElementById;
+ var value = Reflect.get(target, prop, target);
+ return typeof value === "function" ? value.bind(target) : value;
+ },
+ })
+ : window.document;
+ var __hfTimelineRegistryProxy = null;
+ var __hfGetTimelineRegistry = function() {
+ window.__timelines = window.__timelines || {};
+ if (!__hfCompId || __hfCompId === __hfTimelineCompId || typeof Proxy !== "function") {
+ return window.__timelines;
+ }
+ if (!__hfTimelineRegistryProxy) {
+ __hfTimelineRegistryProxy = new Proxy(window.__timelines, {
+ get: function(target, prop, receiver) {
+ return Reflect.get(target, prop === __hfCompId ? __hfTimelineCompId : prop, target);
+ },
+ set: function(target, prop, value, receiver) {
+ return Reflect.set(target, prop === __hfCompId ? __hfTimelineCompId : prop, value, target);
+ },
+ });
+ }
+ return __hfTimelineRegistryProxy;
+ };
+ var __hfScopedWindow = typeof Proxy === "function"
+ ? new Proxy(window, {
+ get: function(target, prop, receiver) {
+ if (prop === "__timelines") return __hfGetTimelineRegistry();
+ var value = Reflect.get(target, prop, target);
+ return typeof value === "function" ? value.bind(target) : value;
+ },
+ set: function(target, prop, value, receiver) {
+ if (prop === "__timelines") {
+ target.__timelines = value || {};
+ __hfTimelineRegistryProxy = null;
+ return true;
+ }
+ return Reflect.set(target, prop, value, target);
+ },
+ })
+ : window;
+ var __hfResolveGsapTarget = function(target) {
+ if (typeof target !== "string") return target;
+ return __hfQueryAll(target);
+ };
+ var __hfScopeTimeline = function(timeline) {
+ if (!timeline || timeline.__hfScopedCompositionRoot === __hfFindRoot()) return timeline;
+ ["to", "from", "fromTo", "set"].forEach(function(method) {
+ var original = timeline[method];
+ if (typeof original !== "function") return;
+ timeline[method] = function(target) {
+ var args = Array.prototype.slice.call(arguments);
+ args[0] = __hfResolveGsapTarget(target);
+ return original.apply(timeline, args);
+ };
+ });
+ try {
+ Object.defineProperty(timeline, "__hfScopedCompositionRoot", {
+ value: __hfFindRoot(),
+ configurable: true,
+ });
+ } catch {
+ // Best-effort: timelines coming from user code may have a frozen target
+ // or a non-extensible defineProperty path. Swallow — the scoped root
+ // is an enrichment, not a correctness invariant for playback.
+ }
+ return timeline;
+ };
+ var __hfBaseGsap = typeof gsap === "undefined" ? window.gsap : gsap;
+ var __hfScopedGsap = !__hfBaseGsap || typeof Proxy !== "function"
+ ? __hfBaseGsap
+ : new Proxy(__hfBaseGsap, {
+ get: function(target, prop, receiver) {
+ if (prop === "timeline") {
+ return function() {
+ return __hfScopeTimeline(target.timeline.apply(target, arguments));
+ };
+ }
+ if (prop === "to" || prop === "from" || prop === "fromTo" || prop === "set") {
+ return function(firstArg) {
+ var args = Array.prototype.slice.call(arguments);
+ args[0] = __hfResolveGsapTarget(firstArg);
+ return target[prop].apply(target, args);
+ };
+ }
+ if (prop === "utils" && target.utils && typeof Proxy === "function") {
+ return new Proxy(target.utils, {
+ get: function(utilsTarget, utilsProp, utilsReceiver) {
+ if (utilsProp === "toArray") {
+ return function(firstArg) {
+ var args = Array.prototype.slice.call(arguments);
+ args[0] = __hfResolveGsapTarget(firstArg);
+ return utilsTarget.toArray.apply(utilsTarget, args);
+ };
+ }
+ if (utilsProp === "selector") {
+ return function(base) {
+ var baseEl = typeof base === "string" ? __hfQueryOne(base) : base;
+ var root = baseEl || __hfFindRoot();
+ return function(selector) {
+ if (!root || typeof selector !== "string") return [];
+ return Array.prototype.filter.call(
+ window.document.querySelectorAll(__hfNormalizeSelector(selector)),
+ function(node) {
+ return node === root || (typeof root.contains === "function" && root.contains(node));
+ },
+ );
+ };
+ };
+ }
+ var value = Reflect.get(utilsTarget, utilsProp, utilsTarget);
+ return typeof value === "function" ? value.bind(utilsTarget) : value;
+ },
+ });
+ }
+ var value = Reflect.get(target, prop, target);
+ return typeof value === "function" ? value.bind(target) : value;
+ },
+ });
+ var __hfBaseHyperframes = window.__hyperframes;
+ var __hfScopedHyperframes = !__hfBaseHyperframes
+ ? __hfBaseHyperframes
+ : Object.assign({}, __hfBaseHyperframes, {
+ getVariables: function() {
+ var byComp = window.__hfVariablesByComp;
+ var scoped = byComp && __hfTimelineCompId ? byComp[__hfTimelineCompId] : null;
+ return scoped ? Object.assign({}, scoped) : {};
+ },
+ });
+ var __hfRun = function() {
+ try {
+ (function(document, gsap, window, __hyperframes) {
+
+ (function () {
+ const TRANSCRIPT = [
+ { text: "We", start: 0.119, end: 0.259 },
+ { text: "asked", start: 0.319, end: 0.479 },
+ { text: "what", start: 0.519, end: 0.659 },
+ { text: "you", start: 0.699, end: 0.819 },
+ { text: "needed.", start: 0.859, end: 1.819 },
+ { text: "Forty-seven", start: 1.86, end: 2.299 },
+ { text: "percent", start: 2.399, end: 2.679 },
+ { text: "of", start: 2.7, end: 2.799 },
+ { text: "you", start: 2.839, end: 2.939 },
+ { text: "said", start: 3.039, end: 3.179 },
+ { text: "motion", start: 3.24, end: 3.559 },
+ { text: "graphics,", start: 3.579, end: 4.599 },
+ { text: "sixty-two", start: 4.679, end: 5.179 },
+ { text: "percent", start: 5.299, end: 5.759 },
+ { text: "said", start: 5.859, end: 5.98 },
+ { text: "static", start: 6.079, end: 6.399 },
+ { text: "content", start: 6.46, end: 6.879 },
+ { text: "was", start: 6.92, end: 7.079 },
+ { text: "costing", start: 7.099, end: 7.48 },
+ { text: "you", start: 7.5, end: 7.579 },
+ { text: "attention,", start: 7.679, end: 8.659 },
+ { text: "and", start: 8.699, end: 8.86 },
+ { text: "three", start: 8.88, end: 9.06 },
+ { text: "out", start: 9.079, end: 9.18 },
+ { text: "of", start: 9.199, end: 9.34 },
+ { text: "four", start: 9.38, end: 9.799 },
+ { text: "said", start: 9.84, end: 10.0 },
+ { text: "you", start: 10.019, end: 10.159 },
+ { text: "know", start: 10.179, end: 10.36 },
+ { text: "the", start: 10.38, end: 10.42 },
+ { text: "look", start: 10.519, end: 10.699 },
+ { text: "you", start: 10.739, end: 10.859 },
+ { text: "want,", start: 10.98, end: 11.34 },
+ { text: "but", start: 11.359, end: 11.52 },
+ { text: "don't", start: 11.56, end: 11.779 },
+ { text: "have", start: 11.819, end: 11.94 },
+ { text: "the", start: 11.96, end: 12.06 },
+ { text: "editing", start: 12.079, end: 12.4 },
+ { text: "skills", start: 12.52, end: 12.859 },
+ { text: "to", start: 12.88, end: 13.0 },
+ { text: "get", start: 13.019, end: 13.18 },
+ { text: "there.", start: 13.22, end: 14.22 },
+ { text: "So", start: 14.239, end: 14.399 },
+ { text: "we", start: 14.42, end: 14.52 },
+ { text: "built", start: 14.619, end: 14.88 },
+ { text: "Editor", start: 15.079, end: 15.42 },
+ { text: "Agent.", start: 15.619, end: 16.02 },
+ ];
+ const container = document.getElementById("captions-container");
+ const tl = gsap.timeline({ paused: true });
+
+ const lines = [];
+ let currentLine = [];
+
+ TRANSCRIPT.forEach((word, index) => {
+ currentLine.push(word);
+ if (currentLine.length === 5 || index === TRANSCRIPT.length - 1) {
+ lines.push({
+ words: [...currentLine],
+ text: currentLine
+ .map((w) => w.text)
+ .join(" ")
+ .toUpperCase(),
+ });
+ currentLine = [];
+ }
+ });
+
+ lines.forEach((line, index) => {
+ const startTime = line.words[0].start;
+ const endTime = line.words[line.words.length - 1].end;
+
+ const lineEl = document.createElement("div");
+ lineEl.className = "caption-line";
+ lineEl.textContent = line.text;
+ container.appendChild(lineEl);
+
+ // Center the line element relative to the container
+ gsap.set(lineEl, { left: "50%", xPercent: -50 });
+
+ tl.to(
+ lineEl,
+ {
+ opacity: 1,
+ y: -20,
+ duration: 0.2,
+ ease: "power2.out",
+ },
+ startTime,
+ );
+
+ tl.to(
+ lineEl,
+ {
+ opacity: 0,
+ y: -40,
+ duration: 0.1,
+ ease: "power2.in",
+ },
+ endTime,
+ );
+ });
+
+ window.__timelines["captions"] = tl;
+ })();
+
+ }).call(window, __hfScopedDocument, __hfScopedGsap, __hfScopedWindow, __hfScopedHyperframes);
+ } catch (_err) {
+ console.error(__hfErrorLabel, __hfCompId, _err);
+ }
+ };
+ __hfFindRoot();
+ __hfRun();
+})();
-
-
+ ASKED & ANSWERED
-
+
+
-
+
+
-
- ASKED & ANSWERED
+
-
-
+
+ 47%
- NEED MOTION
-
+
+
-
- 47%
+ NEED MOTION
+
-
-
-
-
-
- 62%
- INEFFECTIVE
-
-
-
-
-
- 75%
- LACK SKILLS
-
-
-
+
+ EDITOR AGENT
-
+
+
+
+
+
+ 62%
+ INEFFECTIVE
+
+
+
+
+ 75%
+ LACK SKILLS
+
+
+
+
+
+
+
+ EDITOR AGENT
+
-
+
-
-
-
+
+
+
+
+
+