{"version":3,"file":"siteMetadata.CbrBmO2b.mjs","names":[],"sources":["https:/framerusercontent.com/modules/xKPrCqdyfBeUnQEIDk9Z/hTMnLzCr6hY0vKBC2Uaa/siteMetadata.js"],"sourcesContent":["// Generated by Framer (a2fc4a2)\nexport default function metadata(params,activeLocale){return{customHTMLBodyEnd:'<script>\\n/**\\n * Framer → Customer.io + PostHog (same events to both)\\n * - Page views on Framer SPA route changes (skips the very first load to avoid duplicate with vendors\\' auto page)\\n * - CTA clicks: `cta_click` with Framer Tracking ID\\n * - Forms:\\n *    • Lightweight: `form_submitted` (from framer:formsubmit, includes tracking_id)\\n *    • Detailed: `form_submitted_details` (whitelisted fields + form meta)\\n *    • identify(email, …) to both vendors\\n *\\n * REQUIREMENTS:\\n * - Customer.io JS snippet in <head> (window.cioanalytics)\\n * - PostHog JS snippet in <head> (window.posthog)\\n */\\n\\n(function () {\\n  // ---------------- CONFIG (edit to taste) ----------------\\n  const CONFIG = {\\n    DEBUG: false,\\n\\n    // Include only these fields in the detailed event (case-insensitive; substring match allowed)\\n    FORM_FIELD_ALLOWLIST: [\"email\", \"newsletter\", \"name\", \"first_name\", \"last_name\", \"company\"],\\n\\n    // Treat any of these field names as the email field (case-insensitive)\\n    EMAIL_FIELD_ALIASES: [\"email\", \"email_address\", \"e-mail\", \"newsletter\"]\\n  };\\n\\n  // ---------------- Helpers ----------------\\n  const log = (...a) => { if (CONFIG.DEBUG) console.log(\"[FRMR→CIO+PH]\", ...a); };\\n  const hasCIO = () => !!(window.cioanalytics && typeof window.cioanalytics.track === \"function\");\\n  const hasPH  = () => !!(window.posthog && typeof window.posthog.capture === \"function\");\\n\\n  const getFormData = (form) => {\\n    const out = {};\\n    new FormData(form).forEach((v, k) => { out[k] = v; });\\n    return out;\\n  };\\n\\n  const pickAllowed = (fields) => {\\n    const allow = CONFIG.FORM_FIELD_ALLOWLIST.map(s => s.toLowerCase());\\n    const safe = {};\\n    for (const [k, v] of Object.entries(fields)) {\\n      const key = k.toLowerCase();\\n      const ok = allow.some(a => key === a || key.includes(a));\\n      if (ok && v != null && String(v).trim() !== \"\") safe[k] = String(v);\\n    }\\n    return safe;\\n  };\\n\\n  const normalizeEmail = (form, fields) => {\\n    const aliases = CONFIG.EMAIL_FIELD_ALIASES.map(s => s.toLowerCase());\\n    // alias → canonical \"email\"\\n    const aliasKey = Object.keys(fields).find(k => aliases.includes(k.toLowerCase()));\\n    if (aliasKey && !fields.email) fields.email = String(fields[aliasKey]).trim();\\n    // fallback: input[type=email]\\n    if (!fields.email) {\\n      const el = form.querySelector(\\'input[type=\"email\"]\\');\\n      if (el && el.value) fields.email = String(el.value).trim();\\n    }\\n    return fields;\\n  };\\n\\n  // Resolve form identity even if id/name attributes aren’t present\\n  let __lastFormTrackingId = null; // from framer:formsubmit\\n  const resolveFormMeta = (form) => {\\n    const idAttr   = form.id || null;\\n    const nameAttr = form.getAttribute(\"name\") || null;\\n    const layer    = (form.closest(\"[data-framer-name]\") || form);\\n    const layerName = layer && layer.getAttribute ? layer.getAttribute(\"data-framer-name\") : null;\\n    const trackingId = __lastFormTrackingId || null;\\n    return {\\n      form_id: idAttr || layerName || trackingId || null,\\n      form_name: nameAttr || layerName || trackingId || null,\\n      form_tracking_id: trackingId || null\\n    };\\n  };\\n\\n  if (!hasCIO() && !hasPH()) { console.warn(\"Neither Customer.io nor PostHog is loaded.\"); return; }\\n\\n  // ---------------- Page views (Framer SPA) ----------------\\n  let seenFirstPV = false, lastPath = location.pathname;\\n  document.addEventListener(\"framer:pageview\", () => {\\n    const p = location.pathname;\\n    if (!seenFirstPV) { seenFirstPV = true; log(\"page (first skipped)\"); return; }\\n    if (p === lastPath) { log(\"page (dup skipped)\"); return; }\\n    lastPath = p;\\n\\n    try { if (hasCIO()) window.cioanalytics.page(); } catch (e) { log(\"cio.page error\", e); }\\n    try { if (hasPH())  window.posthog.capture(\"$pageview\"); } catch (e) { log(\"ph $pageview error\", e); }\\n    log(\"page\", p);\\n  });\\n\\n  // ---------------- CTA clicks → both ----------------\\n  document.addEventListener(\"framer:click\", (e) => {\\n    const d = e?.detail || {};\\n    const trackingId = d.trackingId || null;\\n    const href = d.href || null;\\n    if (!trackingId) { log(\"click without trackingId\"); return; }\\n\\n    const payload = {\\n      tracking_id: trackingId,\\n      href: href || null,\\n      path: location.pathname,\\n      title: document.title\\n    };\\n\\n    try { if (hasCIO()) window.cioanalytics.track(\"cta_click\", payload); } catch (e) { log(\"cio cta_click error\", e); }\\n    try { if (hasPH())  window.posthog.capture(\"cta_click\", payload);     } catch (e) { log(\"ph cta_click error\", e); }\\n    log(\"cta_click\", payload);\\n  });\\n\\n  // ---------------- Lightweight Framer form event → both ----------------\\n  document.addEventListener(\"framer:formsubmit\", (e) => {\\n    const d = e?.detail || {};\\n    __lastFormTrackingId = d.trackingId || null;\\n\\n    const payload = {\\n      tracking_id: d.trackingId || null,\\n      path: location.pathname,\\n      title: document.title\\n    };\\n\\n    try { if (hasCIO()) window.cioanalytics.track(\"form_submitted\", payload); } catch (e) { log(\"cio form_submitted error\", e); }\\n    try { if (hasPH())  window.posthog.capture(\"form_submitted\", payload);     } catch (e) { log(\"ph form_submitted error\", e); }\\n    log(\"form_submitted\", payload);\\n  });\\n\\n  // ---------------- Detailed form + identify → both ----------------\\n  document.addEventListener(\"submit\", (ev) => {\\n    const form = ev.target;\\n    if (!(form instanceof HTMLFormElement)) return;\\n\\n    const raw   = getFormData(form);           // requires \"Field name\" set on inputs\\n    const all   = normalizeEmail(form, raw);   // alias Newsletter → email, etc.\\n    const safe  = pickAllowed(all);            // whitelist only\\n    const meta  = resolveFormMeta(form);\\n    const email = all.email ? String(all.email).trim() : null;\\n\\n    // Identify person (both)\\n    if (email) {\\n      try {\\n        if (hasCIO()) {\\n          const prev = localStorage.getItem(\"cio_identified_email\");\\n          if (prev !== email) {\\n            window.cioanalytics.identify(email, { email, last_form_path: location.pathname });\\n            localStorage.setItem(\"cio_identified_email\", email);\\n          }\\n        }\\n      } catch (e) { log(\"cio identify error\", e); }\\n\\n      try {\\n        if (hasPH()) {\\n          window.posthog.identify(email);\\n          // optional: store traits as person properties\\n          if (Object.keys(safe).length) window.posthog.setPersonProperties({ email, ...safe, last_form_path: location.pathname });\\n        }\\n      } catch (e) { log(\"ph identify error\", e); }\\n    } else {\\n      log(\"no email found on submit\");\\n    }\\n\\n    // Detailed form event (both)\\n    const detail = { ...meta, path: location.pathname, title: document.title, fields: safe };\\n    try { if (hasCIO()) window.cioanalytics.track(\"form_submitted_details\", detail); } catch (e) { log(\"cio details error\", e); }\\n    try { if (hasPH())  window.posthog.capture(\"form_submitted_details\", detail);     } catch (e) { log(\"ph details error\", e); }\\n    log(\"form_submitted_details\", detail);\\n\\n    // allow Framer\\'s native submit to proceed\\n  }, true);\\n\\n})();\\n</script>\\n',customHTMLHeadEnd:'<script>\\n  !function(){var i=\"cioanalytics\", analytics=(window[i]=window[i]||[]);if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error(\"Snippet included twice.\");else{analytics.invoked=!0;analytics.methods=[\"trackSubmit\",\"trackClick\",\"trackLink\",\"trackForm\",\"pageview\",\"identify\",\"reset\",\"group\",\"track\",\"ready\",\"alias\",\"debug\",\"page\",\"once\",\"off\",\"on\",\"addSourceMiddleware\",\"addIntegrationMiddleware\",\"setAnonymousId\",\"addDestinationMiddleware\"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement(\"script\");t.type=\"text/javascript\";t.async=!0;t.setAttribute(\\'data-global-customerio-analytics-key\\', i);t.src=\"https://cdp.customer.io/v1/analytics-js/snippet/\" + key + \"/analytics.min.js\";var n=document.getElementsByTagName(\"script\")[0];n.parentNode.insertBefore(t,n);analytics._writeKey=key;analytics._loadOptions=e};analytics.SNIPPET_VERSION=\"4.15.3\";\\n    analytics.load(\\n      \"88d0a805c4ee32200ad6\",\\n      // Optional: enable anonymous in-app. See https://docs.customer.io/journeys/anonymous-in-app/#enable-anonymous-in-app-messaging.\\n      // {\\n      //   \"integrations\": {\\n      //     \"Customer.io In-App Plugin\": {\\n      //       anonymousInApp: true\\n      //     }\\n      //   }\\n      // }\\n    );\\n    analytics.page();\\n  }}();\\n</script>\\n\\n<script>\\n    !function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(\".\");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement(\"script\")).type=\"text/javascript\",p.crossOrigin=\"anonymous\",p.async=!0,p.src=s.api_host.replace(\".i.posthog.com\",\"-assets.i.posthog.com\")+\"/static/array.js\",(r=t.getElementsByTagName(\"script\")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a=\"posthog\",u.people=u.people||[],u.toString=function(t){var e=\"posthog\";return\"posthog\"!==a&&(e+=\".\"+a),t||(e+=\" (stub)\"),e},u.people.toString=function(){return u.toString(1)+\".people (stub)\"},o=\"init Ce Ls Ns Te As js capture Xe calculateEventProperties qs register register_once register_for_session unregister unregister_for_session Gs getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSurveysLoaded onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey canRenderSurveyAsync identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty Hs Us createPersonProfile Ws Os Js opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing get_explicit_consent_status is_capturing clear_opt_in_out_capturing zs debug L Bs getPageViewId captureTraceFeedback captureTraceMetric\".split(\" \"),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);\\n    posthog.init(\\'phc_KIOwukTHed6pGC7MpEgLqmjuOke8mvUEIcpZaj9kFU3\\', {\\n        api_host: \\'https://us.i.posthog.com\\',\\n        defaults: \\'2025-05-24\\',\\n        person_profiles: \\'identified_only\\', // or \\'always\\' to create profiles for anonymous users as well\\n    })\\n</script>',customHTMLHeadStart:'<!-- Warm both hosts used by the share-link + asset -->\\n<link rel=\"preconnect\" href=\"https://rive.app\" crossorigin=\"\">\\n<link rel=\"preconnect\" href=\"https://public.rive.app\" crossorigin=\"\">\\n\\n<!-- Preload the HERO share-link ES module (the one you import in code) -->\\n<link rel=\"modulepreload\" href=\"https://rive.app/api/s/Kf4VlSuG9EWd66XOYAtFYA/framer/?runtime=rive-renderer\" crossorigin=\"\" fetchpriority=\"high\">\\n\\n<!-- Preload the HERO .riv (your exact Request URL) -->\\n<link rel=\"preload\" href=\"https://public.rive.app/hosted/401472/303445/Kf4VlSuG9EWd66XOYAtFYA.riv\" as=\"fetch\" crossorigin=\"\" fetchpriority=\"high\">\\n',description:\"PiP World is an AI platform for traders and investors, enabling smarter investing and trading with clarity, speed, and conviction.\",favicon:\"https://framerusercontent.com/assets/umlDMKTWUe5yk6gmcZZt1i4w.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/N5SJMYV3FxbGJUzvn9QOcOjsjI.png\",title:\"PiP World | AI Platform for Smarter Investing\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"oDACA,SAAwB,EAAS,EAAO,EAAa,CAAC,MAAM,CAAC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA6hO,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;YAA0nH,oBAAoB;;;;;;;;;EAAonB,YAAY,qIAAqI,QAAQ,oEAAoE,OAAO,0BAA0B,YAAY,sEAAsE,MAAM,gDAAgD"}