{"version":3,"file":"landing-util-kPCW3YoI.js","sources":["../../src/util/landing-util.ts"],"sourcesContent":["import { eventService } from \"../services/event-service\";\nimport { EVENT_CTA_GET_STARTED_CLICK } from \"shared\";\nimport { pushState } from \"./route-util\";\nimport { ROUTES } from \"../config\";\nimport { html } from \"lit\";\nimport { repeat } from \"lit/directives/repeat.js\";\nimport { DirectiveResult } from \"lit/async-directive\";\n\n/**\n * Dispatches a darkmode event used for the landing page.\n * @param dark\n */\nexport function dispatchDarkmodeEvent(dark: boolean) {\n\twindow.dispatchEvent(new CustomEvent(\"darkmode\", { detail: dark, bubbles: true, composed: true }));\n}\n\n/**\n * Goes to the get started page while tracking a click event.\n * Ref is the element referer (eg. navbar, hero button and so on)\n * @param ref\n * @param feature\n */\nexport function getStarted(ref?: string, feature?: string) {\n\teventService.trackEvent(EVENT_CTA_GET_STARTED_CLICK, { ref });\n\tconst path = `${ROUTES.getStarted}${feature?.length ? `/${feature}` : \"\"}`;\n\tpushState(path);\n}\n\n/**\n * Renders feature chips\n * @param features\n */\nexport function renderFeatureChips(features: (DirectiveResult | string)[]) {\n\treturn html`\n\t\t\n\t\t
\n\t\t\t${repeat(\n\t\t\t\tfeatures,\n\t\t\t\t(feature) => html`\n\t\t\t\t\t\n\t\t\t\t\t\t${feature}\n\t\t\t\t\t\n\t\t\t\t`\n\t\t\t)}\n\t\t
\n\t`;\n}\n"],"names":["dispatchDarkmodeEvent","dark","getStarted","ref","feature","eventService","EVENT_CTA_GET_STARTED_CLICK","path","ROUTES","pushState","renderFeatureChips","features","html","repeat"],"mappings":"4EAYO,SAASA,EAAsBC,EAAe,CACpD,OAAO,cAAc,IAAI,YAAY,WAAY,CAAE,OAAQA,EAAM,QAAS,GAAM,SAAU,EAAK,CAAC,CAAC,CAClG,CAQgB,SAAAC,EAAWC,EAAcC,EAAkB,CAC1DC,EAAa,WAAWC,EAA6B,CAAE,IAAAH,CAAK,CAAA,EACtD,MAAAI,EAAO,GAAGC,EAAO,UAAU,GAAGJ,GAAA,MAAAA,EAAS,OAAS,IAAIA,CAAO,GAAK,EAAE,GACxEK,EAAUF,CAAI,CACf,CAMO,SAASG,EAAmBC,EAAwC,CACnE,OAAAC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,KAqBHC,EACDF,EACCP,GAAYQ;AAAAA;AAAAA,iBAEAR,CAAO;AAAA;AAAA,KAAA,CAGpB;AAAA;AAAA,EAGJ"}